/* ============ METACON SpA — estilos ============ */

:root {
  --bg: #F7F7F5;
  --bg-alt: #EFF2EE;
  --ink: #1E2530;
  --ink-soft: #4A5361;
  --accent: #2F5233;
  --accent-dark: #244028;
  --petrol: #1F3A4D;
  --gold: #D9A441;
  --card: #FFFFFF;
  --line: #DDE1DA;
  --radius: 14px;
  --font-display: "Libre Caslon Text", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.18; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.9rem; }
h3 { font-size: 1.15rem; font-weight: 700; }

a { color: var(--accent); }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.eyebrow-light { color: var(--gold); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ Header ============ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand span { color: var(--accent); }

.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }
.site-nav .nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}
.site-nav .nav-cta:hover { background: var(--accent-dark); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 0.6rem 4%;
}
.mobile-nav a {
  padding: 0.75rem 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav.open { display: flex; }

/* ============ Hero ============ */

.hero {
  padding-top: 138px;
  background: linear-gradient(180deg, #F0F3EF 0%, var(--bg) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy .hero-sub {
  margin-top: 1.1rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

.hero-actions { margin-top: 1.8rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
  color: var(--accent);
  border: 1.5px solid var(--accent);
  background: transparent;
}
.btn-ghost:hover { background: var(--accent); color: #fff; }

.hero-art svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(31, 58, 77, 0.12));
  border-radius: 18px;
}

.horizon { margin-top: 3rem; }
.horizon svg { width: 100%; height: 70px; }

/* Fade-in del hero */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .hero-art {
    opacity: 0;
    transform: translateY(14px);
    animation: heroIn 0.7s ease forwards;
  }
  .hero-art { animation-delay: 0.15s; }
  @keyframes heroIn {
    to { opacity: 1; transform: none; }
  }
}

/* ============ Secciones ============ */

.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }

.section-lead {
  color: var(--ink-soft);
  max-width: 40rem;
  margin-bottom: 2.4rem;
}

/* Nosotros */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 1.4rem;
}

.about-text p { margin-bottom: 1rem; color: var(--ink-soft); }
.about-text p:first-child { color: var(--ink); }

.about-blocks { display: grid; gap: 1rem; }
.about-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
}
.about-block h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.about-block p { color: var(--ink-soft); font-size: 0.95rem; }

/* Servicios */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(31, 58, 77, 0.1);
}
.service-art { margin-bottom: 1rem; }
.service-art svg { width: 100%; height: auto; border-radius: 10px; }
.service-card h3 { margin-bottom: 0.4rem; }
.service-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* Proyectos */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.4rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-art svg { width: 100%; height: auto; }
.project-body { padding: 1.4rem 1.5rem 1.6rem; }
.project-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.project-body p { color: var(--ink-soft); margin-bottom: 0.8rem; }

.badge {
  background: rgba(47, 82, 51, 0.1);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.text-link {
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.project-card--placeholder {
  border-style: dashed;
  background: transparent;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.placeholder-text {
  color: var(--ink-soft);
  opacity: 0.7;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

/* Datos de la empresa */

.section-dark {
  background: var(--petrol);
  color: #EDF1F4;
}
.section-dark h2 { color: #fff; }

.company-data {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem 2.5rem;
}
.company-data > div {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 0.8rem;
}
.company-data dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.company-data dd { font-size: 1rem; }
.company-data a { color: #fff; }

/* Contacto */

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  margin-top: 1.4rem;
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 82, 51, 0.15);
}
.field textarea { resize: vertical; }

.contact-form .btn { border: none; cursor: pointer; font-family: var(--font-body); }

.hidden-field { display: none; }

.contact-aside h3 { margin-bottom: 1rem; }
.contact-aside p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.contact-aside strong { color: var(--ink); }

/* Footer */

.site-footer {
  background: var(--ink);
  color: #C7CDD6;
  padding: 2.6rem 0;
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.footer-nav { display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap; }
.footer-nav a { color: #C7CDD6; text-decoration: none; }
.footer-nav a:hover { color: #fff; }

/* Página de gracias */

.thanks-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}
.thanks-wrap .btn { margin-top: 1.4rem; }

/* ============ Responsive ============ */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .company-data { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .company-data { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
  .hero { padding-top: 110px; }
}
