/* ═══════════════════════════════════════════════════════════
   MACAPOP · estilos
   Colores y fuentes: ver BRAND.md
   ═══════════════════════════════════════════════════════════ */

@font-face { font-family: "Sora"; src: url("../fonts/Sora-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/Sora-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #14161F;
  --ink-2: #252836;
  --coral: #F2552C;
  --coral-deep: #B83A1B;
  --cream: #FBF7F1;
  --sand: #EADFCF;
  --sand-2: #F3ECE1;
  --slate: #5B6170;
  --line: rgba(20, 22, 31, .12);
  --white: #FFFFFF;

  --f-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-body: "DM Sans", "Segoe UI", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 10vw, 128px);
  --radius: 20px;
  --ease: cubic-bezier(.22, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(16px, 1.05vw + 10px, 18px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--coral); color: var(--ink); }
:focus-visible { outline: 2px solid var(--coral-deep); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 8px; z-index: 1000; text-decoration: none; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── Tipografía ─────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
h1 em { font-style: normal; color: var(--coral); }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.05rem, 1.3vw, 1.25rem); color: var(--slate); max-width: 38em; }

.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-body); font-weight: 500;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--coral-deep); margin-bottom: 18px;
}
.label::before {
  content: ""; width: 22px; height: 10px; flex: none;
  background:
    radial-gradient(circle at 2px 7px, var(--ink) 2px, transparent 2.5px),
    radial-gradient(circle at 9px 6px, var(--ink) 3px, transparent 3.5px),
    radial-gradient(circle at 17px 5px, var(--coral) 4.5px, transparent 5px);
}

/* ─── Botones ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-family: var(--f-display); font-weight: 600; font-size: .95rem; letter-spacing: -.01em;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--coral); color: var(--ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }

/* ─── Cabecera ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.site-header.scrolled { background: rgba(251, 247, 241, .88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 28px; list-style: none; padding: 0; }
.nav-links a {
  white-space: nowrap; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2);
  background: linear-gradient(var(--coral), var(--coral)) no-repeat 0 100% / 0 2px;
  padding-bottom: 3px; transition: background-size .3s var(--ease), color .2s;
}
.nav-links a:hover { background-size: 100% 2px; color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.5); }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--f-display); font-weight: 600; font-size: .78rem; letter-spacing: .04em;
  min-width: 40px; height: 32px; border-radius: 999px; color: var(--slate);
  transition: background-color .2s, color .2s;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.lang-switch button:not([aria-pressed="true"]):hover { color: var(--ink); }
.header-cta { min-height: 42px; padding: 8px 18px; font-size: .9rem; }

.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 26px; }
.menu-open .burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1079px) {
  .burger { display: block; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .menu-open .site-header { background: var(--cream); }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; background: none; }
  .nav .btn { margin-top: 20px; }
}
@media (min-width: 1080px) { .nav .btn-mobile { display: none; } }

/* ─── Hero ───────────────────────────────────────────────── */
.hero { padding: clamp(32px, 6vw, 72px) 0 var(--section); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin: 6px 0 24px; }
.hero .lead { margin-bottom: 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; overflow: visible; }

@media (prefers-reduced-motion: no-preference) {
  .float-a { animation: float 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .float-b { animation: float 9s ease-in-out -2s infinite; transform-box: fill-box; transform-origin: center; }
  .float-c { animation: float 11s ease-in-out -4s infinite; transform-box: fill-box; transform-origin: center; }
  .grow-bar { animation: grow 1.2s var(--ease) both; transform-box: fill-box; transform-origin: bottom; }
  .grow-bar:nth-of-type(2) { animation-delay: .15s; }
  .grow-bar:nth-of-type(3) { animation-delay: .3s; }
  .draw { stroke-dasharray: 6 8; animation: dash 30s linear infinite; }
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .08s; }
  .hero-copy > *:nth-child(3) { animation-delay: .16s; }
  .hero-copy > *:nth-child(4) { animation-delay: .24s; }
  .hero-copy > *:nth-child(5) { animation-delay: .32s; }
  .hero-art { animation: fade 1.2s .2s var(--ease) both; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dash { to { stroke-dashoffset: -280; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ─── Reveal ─────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; } .js .reveal.d2 { transition-delay: .16s; } .js .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ─── Secciones ──────────────────────────────────────────── */
section { padding-block: var(--section); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { margin-bottom: 18px; }

/* Quiénes somos */
.about { background: var(--white); border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0; }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about-art { background: var(--sand-2); border-radius: var(--radius); padding: clamp(16px, 3vw, 32px); }
.about-copy h2 { margin-bottom: 22px; }
.about-copy p + p { margin-top: 16px; }
.about-copy p { color: var(--slate); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; padding: 0; list-style: none; }
.values li { border-top: 2px solid var(--ink); padding-top: 16px; }
.values li:last-child { border-top-color: var(--coral); }
.values strong { display: block; font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.values span { color: var(--slate); font-size: .95rem; line-height: 1.5; display: block; }

/* Servicios */
.services { background: var(--white); padding-top: 0; }
.services-in { border-top: 1px solid var(--line); padding-top: var(--section); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; }
.card {
  position: relative; background: var(--cream); border: 1px solid transparent; border-radius: var(--radius);
  padding: 30px 28px 32px; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background-color .35s;
}
.card::after {
  content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%;
  right: -60px; top: -60px; background: var(--coral); opacity: 0; transform: scale(.4);
  transition: transform .5s var(--ease), opacity .4s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 18px 40px -24px rgba(20,22,31,.35); background: var(--white); }
.card:hover::after { opacity: .12; transform: scale(1); }
.card .icon { width: 48px; height: 48px; border-radius: 14px; background: var(--white); display: grid; place-items: center; margin-bottom: 22px; border: 1px solid var(--line); transition: background-color .35s; }
.card:hover .icon { background: var(--sand-2); }
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--slate); font-size: .98rem; line-height: 1.6; }
.card .num { position: absolute; top: 28px; right: 28px; font-family: var(--f-display); font-weight: 600; font-size: .8rem; color: var(--slate); opacity: .7; }

/* Proceso */
.process { background: var(--ink); color: var(--cream); }
.process .label { color: var(--coral); }
.process .label::before {
  background:
    radial-gradient(circle at 2px 7px, var(--cream) 2px, transparent 2.5px),
    radial-gradient(circle at 9px 6px, var(--cream) 3px, transparent 3.5px),
    radial-gradient(circle at 17px 5px, var(--coral) 4.5px, transparent 5px);
}
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; padding: 0; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 1px; background: rgba(251,247,241,.18); }
.step { position: relative; }
.step .dot-wrap { height: 68px; display: flex; align-items: center; margin-bottom: 22px; }
.step .dot { border-radius: 50%; background: var(--cream); flex: none; position: relative; box-shadow: 0 0 0 8px var(--ink); }
.step:nth-child(1) .dot { width: 18px; height: 18px; }
.step:nth-child(2) .dot { width: 28px; height: 28px; }
.step:nth-child(3) .dot { width: 42px; height: 42px; }
.step:nth-child(4) .dot { width: 60px; height: 60px; background: var(--coral); }
.step h3 { color: var(--cream); margin-bottom: 8px; }
.step h3 small { display: block; font-family: var(--f-body); font-weight: 500; font-size: .8rem; letter-spacing: .1em; color: rgba(251,247,241,.55); margin-bottom: 6px; }
.step p { color: rgba(251,247,241,.72); font-size: .98rem; line-height: 1.6; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy h2 { margin-bottom: 20px; }
.contact-list { list-style: none; padding: 0; margin-top: 40px; display: grid; gap: 22px; }
.contact-list .k { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-bottom: 4px; font-weight: 500; }
.contact-list .v { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; }
.contact-list a.v { text-decoration: none; background: linear-gradient(var(--coral), var(--coral)) no-repeat 0 100% / 100% 2px; padding-bottom: 2px; }
.contact-list a.v:hover { color: var(--coral-deep); }

/* Marcador «PENDIENTE» bien visible mientras falte el email */
.is-pending {
  display: inline-block; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem) !important; letter-spacing: .04em; line-height: 1.1;
  color: var(--coral-deep) !important; background: #FFE9E2 !important;
  border: 2px dashed var(--coral); border-radius: 12px; padding: 8px 16px !important;
}
.footer-links .is-pending, .legal .is-pending { font-size: 1.1rem !important; padding: 2px 10px !important; }

.form-card { background: var(--white); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 44px); box-shadow: 0 30px 60px -40px rgba(20,22,31,.35); border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--cream);
  padding: 13px 14px; font-size: 1rem; line-height: 1.4; transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: rgba(20,22,31,.28); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--white); box-shadow: 0 0 0 4px rgba(242,85,44,.18); }
[aria-invalid="true"] { border-color: var(--coral-deep) !important; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--slate); line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.consent input[aria-invalid="true"] { outline: 2px solid var(--coral-deep); outline-offset: 2px; }
.consent a { color: var(--ink); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.form-hint { font-size: .85rem; color: var(--slate); flex: 1 1 220px; line-height: 1.5; }
.form-status { grid-column: 1 / -1; font-size: .95rem; min-height: 1.5em; }
.form-status.is-error { color: var(--coral-deep); }
.form-status.is-ok { color: #1F6B45; }

/* ─── Pie ────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: rgba(251,247,241,.72); padding: 64px 0 36px; font-size: .95rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(251,247,241,.14); }
.footer-brand img { height: 30px; width: auto; margin-bottom: 14px; }
.footer-brand p { max-width: 30em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 28px; list-style: none; padding: 0; align-items: center; }
.footer-links a, .footer-links button { color: var(--cream); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: .95rem; }
.footer-links a:hover, .footer-links button:hover { color: var(--coral); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: .85rem; color: rgba(251,247,241,.55); }

/* ─── Banner de cookies ──────────────────────────────────── */
.cookie {
  position: fixed; z-index: 100; left: 16px; right: 16px; bottom: 16px;
  max-width: 560px; margin-inline: auto;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(20,22,31,.45);
  padding: 22px 22px 20px;
  transform: translateY(16px); opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.cookie.show { transform: none; opacity: 1; }
.cookie h2 { font-size: 1.05rem; letter-spacing: -.01em; margin-bottom: 6px; }
.cookie p { font-size: .92rem; color: var(--slate); line-height: 1.55; }
.cookie p a { color: var(--ink); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cookie-actions .btn { min-height: 44px; padding: 10px 18px; font-size: .9rem; flex: 1 1 auto; }
@media (min-width: 900px) { .cookie { left: auto; right: 24px; bottom: 24px; margin: 0; } }

/* ─── Páginas legales ────────────────────────────────────── */
.legal { padding-block: clamp(40px, 6vw, 80px) var(--section); }
.legal .wrap { max-width: calc(820px + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 12px; }
.legal .updated { color: var(--slate); font-size: .9rem; margin-bottom: 32px; }
.legal .notice { background: var(--sand-2); border-left: 4px solid var(--coral); border-radius: 0 12px 12px 0; padding: 16px 20px; margin-bottom: 36px; font-size: .95rem; }
.legal h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin: 40px 0 12px; }
.legal p, .legal li { color: #333744; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; margin: 12px 0; display: grid; gap: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .92rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-family: var(--f-display); font-weight: 600; background: var(--sand-2); }
.legal .back { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 28px; text-decoration: none; font-weight: 500; color: var(--slate); }
.legal .back:hover { color: var(--ink); }
html[lang="en"] [data-lang="es"], html[lang="es"] [data-lang="en"] { display: none; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .steps::before { display: none; }
}
@media (max-width: 899px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; margin-inline: auto; width: 100%; }
  .about-art { max-width: 420px; width: 100%; order: 2; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; gap: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; row-gap: 36px; }
  .step { display: grid; grid-template-columns: 76px 1fr; column-gap: 16px; }
  .step .dot-wrap { height: auto; justify-content: center; align-items: flex-start; margin: 0; padding-top: 4px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .brand img { height: 26px; }
  .footer-bottom { flex-direction: column; }
}
