/* Vortex · web pública. Sistema «Tinta y voltio» (ver docs/DISENO.md). */
@font-face { font-family: "Bricolage"; src: url("assets/fonts/bricolage-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("assets/fonts/bricolage-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bone: #EDEBE4;
  --paper: #F7F6F2;
  --line: #D3D0C6;
  --ink: #111214;
  --ink-2: #1E2024;
  --ink-3: #2A2C31;
  --muted: #5E6168;
  --muted-on-ink: #B9B7AF;
  --volt: #C6F432;
  --volt-deep: #2F3A0A;
  --signal: #E8541E;
  --warning: #C99A00;

  --display: "Bricolage", "Arial Black", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
  --max: 1200px;
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bone); color: var(--ink); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(36px, 5vw, 64px); }
h3 { font-size: 26px; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* Enlace para saltar */
.skip { position: fixed; left: var(--gutter); top: 12px; z-index: 100; transform: translateY(-160%); background: var(--volt); color: var(--ink); padding: 12px 18px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.skip:not(:focus) { opacity: 0; pointer-events: none; }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 3px; border-radius: 6px; }
.band-paper :focus-visible, .close :focus-visible, .plans :focus-visible { outline-color: var(--ink); }

/* Botones: un sistema, tres tonos */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 16px; font: 600 16px/1 var(--body); text-decoration: none; border: 1.5px solid transparent; transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .06s; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 14px; }
.btn-volt { background: var(--volt); color: var(--ink); }
.btn-volt:hover { box-shadow: 0 10px 28px -12px rgba(198, 244, 50, .7); }
.btn-ghost { color: var(--bone); border-color: rgba(237, 235, 228, .28); }
.btn-ghost:hover { border-color: var(--bone); }
.btn-ink { background: var(--ink); color: var(--volt); }
.btn-ghost-ink { color: var(--ink); border-color: var(--line); }
.btn-ghost-ink:hover { border-color: var(--ink); }

.link-quiet { text-decoration: none; font-weight: 600; font-size: 15px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; padding: 12px 2px; transition: background-size .25s var(--ease); }
.link-quiet:hover { background-size: 100% 1.5px; }

/* Navegación */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); color: var(--bone); transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
.nav.is-solid { background: rgba(17, 18, 20, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.nav-row { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 26px/1 var(--display); letter-spacing: -0.04em; min-height: 44px; }
.brand .mark { width: 30px; height: 30px; color: var(--volt); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a:not(.btn) { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted-on-ink); padding: 12px 12px; border-radius: 10px; transition: color .18s var(--ease), background-color .18s var(--ease); }
.nav-links a:not(.btn):hover { color: var(--bone); background: rgba(255, 255, 255, .06); }
.nav-mobile-cta { display: none; }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.menu-btn { display: none; }

/* Portada */
.hero { background: var(--ink); color: var(--bone); min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 32px) 0 56px; overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 900px; height: 900px; right: -260px; top: 50%; translate: 0 -50%; border-radius: 50%; border: 90px solid rgba(198, 244, 50, .06); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; align-items: center; position: relative; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--volt); margin-bottom: 22px; }
.hero h1 { font-size: clamp(42px, 5.6vw, 82px); letter-spacing: -0.045em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--volt); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted-on-ink); max-width: 33em; margin-top: 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 30px 0 0; font-size: 15px; color: var(--muted-on-ink); }
.facts li { display: inline-flex; align-items: center; gap: 9px; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--volt); }

.hero-visual { position: relative; height: min(76svh, 700px); min-height: 520px; }
.phone { border-radius: 44px; padding: 9px; background: #050506; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -30px rgba(0, 0, 0, .55); overflow: hidden; }
.phone img { border-radius: 36px; width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; transition: transform .5s var(--ease); }
.hero .phone { position: absolute; height: 100%; aspect-ratio: 408 / 862; }
.phone-front { left: 4%; top: 0; z-index: 2; }
.phone-back { right: 0; top: 7%; height: 86% !important; opacity: .85; }

/* Entrada de la portada (una vez, al cargar) */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] .hero-copy > * { animation: rise .9s var(--ease) both; }
  [data-enter] .hero-copy > :nth-child(2) { animation-delay: .06s; }
  [data-enter] .hero-copy > :nth-child(3) { animation-delay: .14s; }
  [data-enter] .hero-copy > :nth-child(4) { animation-delay: .22s; }
  [data-enter] .hero-copy > :nth-child(5) { animation-delay: .3s; }
  [data-enter] .phone-front { animation: rise-phone 1.1s .15s var(--ease) both; }
  [data-enter] .phone-back { animation: rise-phone-back 1.1s .3s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-phone { from { opacity: 0; transform: translateY(60px); } }
@keyframes rise-phone-back { from { opacity: 0; transform: translateY(90px); } }

/* Secciones: una por pantalla */
.band { min-height: 100svh; display: flex; align-items: center; padding: clamp(72px, 10vh, 120px) 0; }
.band-paper { background: var(--paper); }
.band-ink { background: var(--ink); color: var(--bone); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.split-flip > :first-child { order: 2; }
.split-copy > * + * { margin-top: 22px; }
.split-copy > p { font-size: 19px; color: var(--muted); max-width: 30em; }
.band-ink .split-copy > p { color: var(--muted-on-ink); }
.note { font-size: 16px !important; }

.ways { display: grid; gap: 14px; margin: 30px 0 0; }
.ways div { padding: 18px 20px; border-radius: var(--r-sm); background: var(--bone); }
.ways dt { font-weight: 600; }
.ways dd { margin: 4px 0 0; color: var(--muted); font-size: 16px; }

/* La tarjeta de la cifra: la interfaz real, en HTML */
.calc-card { background: var(--ink); color: var(--bone); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); box-shadow: 0 40px 80px -40px rgba(17, 18, 20, .5); }
.calc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.calc-label { font-size: 17px; }
.calc-sub { font-size: 15px; color: var(--muted-on-ink); margin-top: 4px; }
.ring { width: 104px; height: 104px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-linecap: round; }
.ring-track { stroke: var(--ink-3); stroke-width: 8; }
.ring-track-in { stroke-width: 10; }
.ring-month { stroke: var(--bone); stroke-width: 8; }
.ring-budget { stroke: var(--signal); stroke-width: 10; }
.ring text { transform: rotate(90deg); transform-origin: 52px 52px; fill: var(--bone); font: 700 17px var(--display); }
.calc-total { font: 800 clamp(56px, 7vw, 88px)/1 var(--display); letter-spacing: -0.045em; color: var(--volt); margin: 18px 0 26px; font-variant-numeric: tabular-nums; }
.calc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc-table th { text-align: left; font-weight: 400; color: var(--muted-on-ink); }
.calc-table td { text-align: right; font-weight: 600; }
.calc-table th, .calc-table td { padding: 12px 0; border-top: 1px solid var(--ink-3); }
.calc-result th, .calc-result td { color: var(--volt); font-weight: 600; border-top-color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  [data-moment] .ring-month, [data-moment] .ring-budget { transition: stroke-dasharray 1.4s var(--ease); }
  [data-moment][data-armed]:not(.is-live) .ring-month, [data-moment][data-armed]:not(.is-live) .ring-budget { stroke-dasharray: 0 100; }
  [data-moment] .ring-budget { transition-delay: .35s; }
}

/* Avisos */
.ticks { list-style: none; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; font-size: 17px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .38em; width: 16px; height: 16px; border-radius: 50%; background: var(--volt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23111214' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; align-items: center; }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.alert { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--paper); box-shadow: 0 1px 0 var(--line); transition: transform .2s var(--ease); }
.alert:hover { transform: translateY(-2px); }
.alert strong { display: block; font-size: 15.5px; line-height: 1.3; }
.alert span:not(.dot) { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.alert .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); margin-top: 5px; }
.alert-critical .dot { background: var(--signal); }
.alert-warning .dot { background: var(--warning); }
.phone-sm { max-width: 300px; justify-self: center; width: 100%; }

/* Presupuestos y objetivos */
#planes { padding-block: clamp(56px, 8vh, 88px); }
.head-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: end; margin-bottom: clamp(36px, 5vh, 56px); }
.head-row p { font-size: 19px; color: var(--muted); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); align-items: start; }
.trio .phone { max-width: 256px; width: 100%; justify-self: center; }
.trio .phone:hover img, .phone-sm:hover img, .phone-dark:hover img { transform: scale(1.025); }
.phone-raise { margin-top: -20px; }

/* Privacidad */
.grid-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 32px 0 0; }
.grid-facts div { padding: 20px; border-radius: var(--r-sm); background: var(--ink-2); transition: transform .2s var(--ease); }
.grid-facts div:hover { transform: translateY(-2px); }
.grid-facts dt { font-weight: 600; color: var(--volt); }
.grid-facts dd { margin: 6px 0 0; font-size: 15.5px; color: var(--muted-on-ink); }
.phone-dark { max-width: 300px; width: 100%; justify-self: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 90px -30px rgba(198, 244, 50, .18); }

/* Precios */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan { display: flex; flex-direction: column; gap: 18px; padding: 30px; border-radius: var(--r-md); background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.plan-volt { background: var(--volt); }
.price { font: 800 44px/1 var(--display); letter-spacing: -0.03em; }
.plan ul { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 10px; flex: 1; }
.plan li { padding-left: 22px; position: relative; font-size: 16px; }
.plan li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.plan .btn { align-self: flex-start; }

/* Cierre */
.close { background: var(--volt); color: var(--ink); min-height: 72svh; display: flex; align-items: center; padding: 96px 0; }
.close-inner { display: grid; justify-items: start; gap: 22px; }
.close h2 { font-size: clamp(48px, 8vw, 120px); letter-spacing: -0.05em; max-width: 12ch; }
.close p { font-size: 20px; color: var(--volt-deep); max-width: 32em; }
.close .actions { margin-top: 12px; }
.close .btn-volt { background: var(--ink); color: var(--volt); }
.close .btn-ghost { color: var(--ink); border-color: rgba(17, 18, 20, .3); }
.close .btn-ghost:hover { border-color: var(--ink); }

/* Pie */
.footer { background: var(--ink); color: var(--bone); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-links a { text-decoration: none; color: var(--muted-on-ink); font-size: 15px; padding: 12px 0; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 0 1px no-repeat; transition: background-size .25s var(--ease), color .2s; }
.footer-links a:hover { color: var(--bone); background-size: 100% 1px; }
.fine { width: 100%; font-size: 13.5px; color: var(--muted-on-ink); }

/* Tableta */
@media (max-width: 1080px) {
  .nav-links a:not(.btn) { padding-inline: 8px; }
  .duo { grid-template-columns: 1fr; }
  .phone-sm { display: none; }
}

@media (max-width: 900px) {
  .nav-links, .nav-actions .link-quiet { display: none; }
  .nav-actions { margin-left: auto; }
  .menu-btn { display: inline-grid; place-content: center; gap: 6px; width: 48px; height: 48px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: var(--bone); cursor: pointer; }
  .menu-btn span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s var(--ease); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav.is-open { background: var(--ink); }
  .nav.is-open .nav-links { display: flex; position: fixed; inset: var(--nav-h) 0 0 0; flex-direction: column; gap: 4px; padding: 24px var(--gutter); background: var(--ink); }
  .nav.is-open .nav-links a:not(.btn) { font: 800 34px/1.1 var(--display); color: var(--bone); padding: 12px 0; letter-spacing: -0.03em; }
  .nav.is-open .nav-mobile-cta { display: inline-flex; margin-top: 20px; }
  .nav-actions .btn { display: none; }

  .hero-grid, .split, .head-row { grid-template-columns: 1fr; }
  .split-flip > :first-child { order: 0; }
  .hero-visual { height: 560px; min-height: 0; }
  .phone-front { left: 50%; translate: -60% 0; }
  .phone-back { right: auto; left: 50%; translate: -12% 0; }
  .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; }
  .band { min-height: 0; }
}

/* Móvil */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { min-height: 0; padding-top: calc(var(--nav-h) + 20px); }
  .hero-visual { height: 480px; }
  .actions .btn { width: 100%; }
  .trio { grid-template-columns: 1fr; gap: 28px; }
  .trio .phone { max-width: 300px; }
  .trio .phone:last-child { display: none; }
  .phone-raise { margin-top: 0; }
  .grid-facts { grid-template-columns: 1fr; }
  .phone-dark { max-width: 290px; }
  .plan .btn { align-self: stretch; }
  .calc-total { font-size: 56px; }
  .ring { width: 84px; height: 84px; }
}

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