/* corvalan.tech — hoja de estilos (modo oscuro, azul marino y pizarra) */

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2-variations"),
       url("/assets/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Base */
  --navy-950: #070D18;   /* fondo */
  --navy-900: #0B1424;   /* secciones alternas */
  --navy-800: #111D32;   /* superficies */
  --slate-700: #24324A;  /* bordes fuertes */
  --text: #E8EDF4;       /* texto principal */
  --text-2: #A6B3C7;     /* texto secundario */
  --text-3: #7D8BA0;     /* texto terciario */
  --accent: #8DB2E8;     /* azul acero: enlaces, indicadores */
  --accent-strong: #B9D0F2;
  --ok: #86CFA8;
  --warn: #E8C27D;

  --line: rgba(166, 179, 199, .14);
  --line-strong: rgba(166, 179, 199, .28);
  --glass-bg: linear-gradient(180deg, rgba(30, 45, 72, .58), rgba(13, 22, 38, .62));
  --glass-border: rgba(185, 208, 242, .16);
  --glass-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);

  --font: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-3: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  --step-4: clamp(2.6rem, 1.4rem + 4.6vw, 5rem);

  --gutter: 24px;
  --max: 1200px;
  --section: clamp(88px, 10vw, 140px);
  --radius: 8px;
  --radius-lg: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; background: var(--navy-950); }

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; color: var(--text); }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
code { font-family: var(--mono); font-size: .8125em; }
::selection { background: rgba(141, 178, 232, .35); color: #fff; }

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

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--text); color: var(--navy-950); padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; color: var(--navy-950); }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.muted { color: var(--text-2); }

/* Vidrio */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-size: 1rem; font-weight: 560; letter-spacing: .005em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn-primary { background: var(--text); color: var(--navy-950); }
.btn-primary:hover { background: #fff; color: var(--navy-950); }
.btn-ghost { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); background: rgba(255, 255, 255, .05); }
.btn[disabled] { opacity: .6; cursor: progress; }

.link { font-weight: 560; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 13, 24, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(7, 13, 24, .85); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 26px; height: 26px; }
.brand-word, .brand-footer { font-size: 1.1875rem; font-weight: 640; letter-spacing: -.02em; }
.brand-word span, .brand-footer span { color: var(--text-3); font-weight: 500; }

.nav-list { display: flex; align-items: center; gap: 30px; }
.nav-list a:not(.btn) { color: var(--text-2); text-decoration: none; font-size: .9375rem; font-weight: 500; }
.nav-list a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 8vw, 112px) 0 0; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -72px 0 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(48% 52% at 74% 38%, rgba(52, 96, 168, .34), transparent 70%),
    radial-gradient(36% 40% at 18% 8%, rgba(36, 50, 74, .55), transparent 70%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(166, 179, 199, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 179, 199, .06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 60% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 60% 35%, #000 20%, transparent 75%);
}
.hero-grid { display: block; z-index: 1; padding-bottom: clamp(24px, 4vw, 48px); }
.display {
  font-size: var(--step-4);
  font-weight: 600;
  font-stretch: 86%;
  line-height: 1.02;
  letter-spacing: -.035em;
  max-width: 17ch;
}
.lead { margin-top: 28px; font-size: var(--step-1); line-height: 1.55; color: var(--text-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.trust { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 32px; }
.trust li { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; color: var(--text-2); }
.trust li::before {
  content: ""; width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  background: rgba(134, 207, 168, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2386CFA8' stroke-width='2'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* ---------- Secciones ---------- */
.section { padding: var(--section) 0; }
.section-alt { background: var(--navy-900); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

h2 { font-size: var(--step-3); line-height: 1.1; letter-spacing: -.025em; font-stretch: 90%; }
h3 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -.01em; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); }
.split-head { align-self: start; position: sticky; top: 112px; }
.split-head .muted { margin-top: 20px; max-width: 30em; }

.section-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 72px); }
.section-intro .muted { max-width: 34em; }

/* Módulos */
.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.module { padding: 28px 26px; }
.module .icon { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.module h3 { margin-top: 20px; }
.module p { margin-top: 8px; color: var(--text-2); font-size: 1rem; }

/* Situaciones */
.pains { border-top: 1px solid var(--line-strong); }
.pains li { padding: 22px 0 22px 28px; border-bottom: 1px solid var(--line); position: relative; }
.pains li::before { content: ""; position: absolute; left: 0; top: 33px; width: 12px; height: 1.5px; background: var(--accent); }
.pains p { color: var(--text); font-size: 1.0625rem; }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: var(--line-strong); }
.steps li { position: relative; padding-right: 32px; }
.step-n {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy-900); border: 1px solid var(--line-strong); color: var(--text);
  font-weight: 600; font-size: .9375rem; font-variant-numeric: tabular-nums;
}
.steps li:first-child .step-n { background: var(--text); border-color: var(--text); color: var(--navy-950); }
.steps h3 { margin-top: 28px; }
.steps p { margin-top: 10px; color: var(--text-2); font-size: 1rem; }
.steps .deliverable { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--text); }
.deliverable span { display: block; font-size: .8125rem; color: var(--accent); margin-bottom: 2px; }

.steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Escenarios */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix { width: 100%; border-collapse: collapse; font-size: .9688rem; min-width: 760px; }
.matrix th, .matrix td { text-align: left; vertical-align: top; padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line); }
.matrix thead th { font-size: .875rem; font-weight: 500; color: var(--text-3); padding-bottom: 14px; border-bottom-color: var(--line-strong); }
.matrix tbody th { font-weight: 600; color: var(--text); width: 18%; }
.matrix td { color: var(--text-2); }
.matrix td:last-child { color: var(--ok); padding-right: 0; }

/* Modalidades */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan { display: flex; flex-direction: column; gap: 14px; padding: 32px 28px 28px; }
.plan p { color: var(--text-2); font-size: 1rem; }
.plan .plan-fit { color: var(--text-3); font-size: .9375rem; margin-top: auto; padding-top: 8px; }
.plan .link { align-self: flex-start; margin-top: 6px; }
.plan-featured { border-color: rgba(141, 178, 232, .4); box-shadow: var(--glass-shadow), 0 0 0 1px rgba(141, 178, 232, .12); }

/* FAQ */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 24px 40px 24px 0; font-size: 1.125rem; font-weight: 560; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border: solid var(--text-2); border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--accent-strong); }
.faq details p { padding: 0 40px 26px 0; color: var(--text-2); max-width: 44em; }

/* ---------- Contacto ---------- */
.contact { position: relative; padding: var(--section) 0; background: var(--navy-950); overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(45% 55% at 80% 45%, rgba(52, 96, 168, .22), transparent 70%);
}
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.contact h2 { max-width: 13ch; }
.contact-copy > p { margin-top: 24px; color: var(--text-2); max-width: 30em; }
.contact-direct { margin-top: 40px; border-top: 1px solid var(--line); }
.contact-direct li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-direct span { color: var(--text-3); font-size: .9375rem; }
.contact-direct a { color: var(--text); text-decoration: none; font-weight: 500; }
.contact-direct a:hover { color: var(--accent-strong); text-decoration: underline; }

.form { display: grid; gap: 20px; padding: clamp(24px, 3vw, 36px); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.field { display: grid; gap: 8px; }
.field label { font-size: .9375rem; font-weight: 500; color: var(--text); }
.optional { color: var(--text-3); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: rgba(7, 13, 24, .55); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 12px 14px; min-height: 48px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 132px; }
.field textarea::placeholder { color: var(--text-3); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23A6B3C7' stroke-width='1.5'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field select option { background: var(--navy-900); color: var(--text); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(166, 179, 199, .45); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(7, 13, 24, .75); box-shadow: 0 0 0 3px rgba(141, 178, 232, .2); }
.field.has-error input, .field.has-error textarea { border-color: #E59A9A; }
.field-error { font-size: .875rem; color: #F2B0B0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-legal { font-size: .875rem; color: var(--text-3); }
.form-legal a { color: var(--text-2); }
.form .btn { justify-self: start; }
.form-status { min-height: 1.6em; font-size: .9688rem; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #F2B0B0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--text-3); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding-top: 32px; padding-bottom: 32px; }
.brand-footer { color: var(--text); text-decoration: none; }
.brand-footer:hover { color: var(--text); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer nav a { color: var(--text-2); text-decoration: none; font-size: .9375rem; }
.site-footer nav a:hover { color: var(--text); }
.copy { font-size: .875rem; }

/* ---------- Páginas legales / 404 / gracias ---------- */
.page { padding: clamp(56px, 8vw, 104px) 0 var(--section); min-height: 60vh; }
.page .prose { max-width: 42em; }
.page h1 { font-size: var(--step-3); letter-spacing: -.025em; font-stretch: 90%; line-height: 1.1; }
.prose h2 { font-size: var(--step-1); margin-top: 40px; letter-spacing: -.01em; }
.prose p, .prose ul { margin-top: 14px; color: var(--text-2); }
.prose ul { list-style: disc; padding-left: 1.2em; }
.page-actions { margin-top: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; }
  .steps::before { display: none; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 1.5px; background: var(--text); position: relative; transition: transform .2s var(--ease), background-color .2s;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .nav-list {
    position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7, 13, 24, .97); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px; display: none;
  }
  .nav-list.is-open { display: flex; }
  .nav-list li a:not(.btn) { display: block; padding: 14px 0; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .nav-wa { margin-top: 16px; }
  .nav-wa .btn { width: 100%; min-height: 48px; }
  .nav-cta { margin-top: 10px; }
  .nav-cta .btn { width: 100%; min-height: 48px; }

}

@media (max-width: 900px) {
  .split, .section-intro, .contact-grid { grid-template-columns: 1fr; }
  .split-head { position: static; }
  .section-intro { gap: 16px; }
  .plans { grid-template-columns: 1fr; }
  .steps-3 { grid-template-columns: 1fr; row-gap: 48px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .modules { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; row-gap: 40px; }
  .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .contact-direct li { flex-direction: column; gap: 2px; }
  .faq summary { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

.contact-direct li p { color: var(--text); font-weight: 500; }
