@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('assets/fonts/schibsted-grotesk.woff') format('woff');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   spreadmkt.es — estilos
   Colores de la marca y contrastes comprobados (WCAG AA)
   ========================================================= */

:root {
  --night: #140E2E;        /* fondo oscuro principal */
  --ink: #1A1238;          /* tinta de la marca */
  --ink-2: #221A4A;        /* superficies sobre oscuro */
  --paper: #F6F5FA;        /* fondo claro */
  --white: #FFFFFF;
  --text: #1A1238;         /* texto sobre claro: 16:1 */
  --muted: #57536B;        /* texto secundario sobre claro: 6.9:1 */
  --on-dark: #FFFFFF;
  --muted-dark: #C9C2EC;   /* texto secundario sobre oscuro: 10:1 */
  --violet: #5B34F2;       /* botones sobre claro, texto blanco 6.5:1 */
  --violet-light: #8B6DFF; /* acentos sobre oscuro: 5:1 */
  --magenta: #EE4E8B;
  --magenta-light: #FF5E98;/* acentos sobre oscuro: 6.5:1 */
  --magenta-ink: #A3164F;  /* acento como texto sobre claro: 7:1 */
  --lila: #CFC7FF;
  --line: #E4E1EE;
  --line-dark: rgba(255, 255, 255, 0.14);
  --radius: 18px;
  --wrap: 1180px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--on-dark);
  font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.02; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--magenta-light); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* ---------- marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-dark); }
.mark path:first-child { fill: var(--magenta-light); }
.mark path:last-child { fill: var(--violet-light); }
.wordmark { font-size: 22px; letter-spacing: -0.045em; line-height: 1; font-weight: 400; padding-bottom: 3px; }
.wordmark b { font-weight: 700; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-primary { background: var(--violet); color: var(--white); }
.btn-primary:hover { background: #4826D6; }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--lila); }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: var(--white); }
.btn-whatsapp { background: var(--white); color: var(--ink); margin-top: 28px; }

/* ---------- cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled { background: rgba(20, 14, 46, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line-dark); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { text-decoration: none; font-size: 16px; font-weight: 500; color: var(--muted-dark); transition: color .2s; }
.nav a:not(.btn):hover { color: var(--white); }
.menu-btn { display: none; width: 48px; height: 48px; border: 0; border-radius: 12px; background: transparent; color: var(--white); cursor: pointer; position: relative; }
.menu-lines, .menu-lines::before, .menu-lines::after { position: absolute; left: 13px; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.menu-lines { top: 23px; }
.menu-lines::before { content: ""; left: 0; top: -7px; }
.menu-lines::after { content: ""; left: 0; top: 7px; }
.nav-open .menu-lines { background: transparent; }
.nav-open .menu-lines::before { transform: translateY(7px) rotate(45deg); }
.nav-open .menu-lines::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- portada ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100svh, 920px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 60px + env(safe-area-inset-top, 0px)) 0 90px;
}
.hero-glow {
  position: absolute; inset: -20%; z-index: -1;
  background:
    radial-gradient(circle at var(--mx, 70%) var(--my, 35%), rgba(238, 78, 139, 0.55) 0, transparent 34%),
    radial-gradient(circle at calc(var(--mx, 70%) - 22%) calc(var(--my, 35%) + 26%), rgba(91, 52, 242, 0.65) 0, transparent 40%);
  filter: blur(60px) saturate(130%);
  transition: background-position .4s;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.08); }
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; z-index: -1; background: linear-gradient(to bottom, rgba(20, 14, 46, 0), var(--night)); pointer-events: none; }
.hero-inner { position: relative; }
.hero-kicker { color: var(--lila); font-weight: 600; font-size: 17px; margin-bottom: 22px; }
.hero-title { font-size: clamp(3.1rem, 10.5vw, 9.6rem); line-height: 0.94; letter-spacing: -0.055em; font-weight: 800; max-width: 11ch; }
.hero-lead { margin-top: 30px; max-width: 34ch; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.5; color: var(--muted-dark); }
.hero-cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- manifiesto ---------- */
.manifesto { padding: 40px 0 130px; }
.manifesto-text { max-width: 30ch; font-size: clamp(1.6rem, 3.6vw, 2.9rem); line-height: 1.22; letter-spacing: -0.03em; font-weight: 500; }

/* ---------- secciones ---------- */
.section { padding: 120px 0; }
.section.light { background: var(--paper); color: var(--text); }
.section.dark { background: var(--night); color: var(--on-dark); }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700; }
.section-head p { font-size: 19px; color: var(--muted); max-width: 52ch; }
.section.dark .section-head p { color: var(--muted-dark); }

/* servicios: filas que se despliegan */
.services { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--text); }
.service { border-bottom: 1px solid var(--line); }
.service-row {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 44px; align-items: center; gap: 24px;
  padding: 30px 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.service-name { font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; transition: color .25s; }
.service-short { color: var(--muted); font-size: 18px; }
.service-row:hover .service-name { color: var(--violet); }
.service-icon { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--text); position: relative; transition: background-color .25s, transform .35s var(--ease); }
.service-icon::before, .service-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; background: currentColor; transform: translate(-50%, -50%); border-radius: 2px; }
.service-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .35s var(--ease); }
.service-row[aria-expanded="true"] .service-icon { background: var(--text); color: var(--paper); }
.service-row[aria-expanded="true"] .service-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.service-body { padding: 0 0 34px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 44px; gap: 24px; }
.service-body[hidden] { display: none; }
.service-body .ticks { grid-column: 2 / 4; }
.service-body .service-note { grid-column: 2 / 4; color: var(--magenta-ink); font-weight: 600; }
.ticks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 14px; border-radius: 4px; background: var(--violet); }

/* proceso */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { background: var(--ink-2); border-radius: var(--radius); padding: 30px 28px 34px; display: grid; gap: 12px; align-content: start; }
.step-n { font-size: 64px; font-weight: 800; line-height: 1; color: var(--violet-light); letter-spacing: -0.04em; }
.step h3 { font-size: 28px; font-weight: 700; margin-top: 8px; }
.step p { color: var(--muted-dark); }

/* equipo */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 960px; }
.member { background: var(--white); border-radius: var(--radius); padding: 30px 28px; display: grid; gap: 8px; align-content: start; box-shadow: 0 0 0 1px var(--line); }
.avatar { width: 64px; height: 64px; border-radius: 50%; color: var(--white); display: grid; place-items: center; font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.member h3 { font-size: 28px; font-weight: 700; }
.member .role { color: var(--magenta-ink); font-weight: 600; margin-bottom: 6px; }
.member p:last-child { color: var(--muted); }

/* contacto */
.contact { position: relative; overflow: hidden; isolation: isolate; padding: 130px 0; background: var(--ink); }
.contact::before {
  content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; right: -260px; bottom: -320px;
  background: radial-gradient(circle, rgba(238, 78, 139, 0.32), transparent 62%);
}
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 64px; align-items: start; }
.contact-intro h2 { font-size: clamp(2.6rem, 6.5vw, 5.2rem); font-weight: 800; letter-spacing: -0.05em; line-height: 0.98; }
.contact-intro p { margin-top: 22px; font-size: 20px; color: var(--muted-dark); max-width: 36ch; }
.big-mail {
  display: inline-block; margin-top: 40px; font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em;
  text-decoration: none; color: var(--white);
  background: linear-gradient(90deg, var(--magenta-light), var(--violet-light)) no-repeat left bottom / 100% 3px;
  padding-bottom: 6px; transition: background-size .45s var(--ease);
  word-break: break-word;
}
.big-mail:hover { background-size: 35% 3px; }
.contact-intro .btn-whatsapp { display: flex; width: fit-content; }
.contact-intro .btn-whatsapp[hidden] { display: none; }
.contact-social { margin-top: 18px; }
.social-link { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-size: 17px; font-weight: 600; padding: 10px 18px 10px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-dark); transition: background .2s; }
.social-link:hover { background: rgba(255, 255, 255, 0.07); }
.social-link:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.social-icon { display: block; width: 22px; height: 22px; object-fit: contain; }
.social-icon[hidden], .social-prefix[hidden] { display: none; }
.social-prefix { font-weight: 400; color: var(--muted-dark); margin-right: -3px; }
.footer-links .social-link.small { padding: 0; box-shadow: none; gap: 8px; font-size: 15px; font-weight: 400; color: var(--muted-dark); }
.footer-links .social-link.small:hover { background: none; color: var(--white); }
.social-link.small .social-icon { width: 18px; height: 18px; }

.contact-form { background: var(--white); color: var(--text); border-radius: 24px; padding: 30px; display: grid; gap: 18px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 15px; font-weight: 600; color: var(--text); padding: 0; }
.field input, .field textarea {
  font: inherit; font-size: 17px; color: var(--text); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 50px; width: 100%;
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); background: var(--white); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-size: 16px; font-weight: 500; transition: all .2s; }
.choice input:checked + span { background: var(--violet); border-color: var(--violet); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--magenta); outline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-actions .btn-ghost { color: var(--text); border-color: var(--text); }
.form-actions [hidden] { display: none; }
.form-error { color: #B3123F; font-weight: 600; font-size: 15px; }
.form-note { font-size: 14px; color: var(--muted); }

/* pie */
.site-footer { background: var(--night); padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-dark); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--muted-dark); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.footer-links a[hidden] { display: none; }
.copy { color: var(--muted-dark); font-size: 15px; }

/* ---------- aparición al hacer scroll (solo con JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* ---------- móvil ---------- */
@media (max-width: 900px) {
  .steps, .team { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .service-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 10px 16px; }
  .service-short { grid-column: 1 / 2; grid-row: 2; font-size: 16px; }
  .service-icon { grid-column: 2; grid-row: 1 / 3; }
  .service-body { grid-template-columns: 1fr; }
  .service-body .ticks, .service-body .service-note { grid-column: 1; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 16px 20px 24px;
    background: var(--night); border-bottom: 1px solid var(--line-dark);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { font-size: 22px; padding: 12px 0; color: var(--white); }
  .nav .btn { margin-top: 10px; }
  .nav-open .site-header { background: var(--night); }
  .section { padding: 90px 0; }
  .manifesto { padding: 10px 0 100px; }
  .hero { min-height: auto; padding-bottom: 80px; }
  .contact { padding: 100px 0; }
  .contact-form { padding: 22px; }
}

/* Solo se desactiva lo que se mueve solo; las transiciones al tocar se mantienen */
@media (prefers-reduced-motion: reduce) {
  .hero-glow { animation: none; }
}

/* ---------- página legal ---------- */
.legal-page { background: var(--paper); color: var(--text); }
.legal { max-width: 760px; padding: calc(var(--header-h) + 70px) 0 100px; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); font-weight: 800; margin-bottom: 36px; }
.legal h2 { font-size: 24px; font-weight: 700; margin: 40px 0 12px; letter-spacing: -0.02em; }
.legal p, .legal li { color: #3A3550; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal a { color: var(--violet); }
.legal-date { margin-top: 48px; font-size: 15px; color: var(--muted); }

/* ---------- página 404 ---------- */
.notfound { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 24px; padding: 60px 0; }
.notfound h1 { font-size: clamp(2.6rem, 8vw, 5rem); font-weight: 800; letter-spacing: -0.05em; margin-top: 20px; }
.notfound p { color: var(--muted-dark); font-size: 19px; max-width: 40ch; }
