/* AV Contadores. One stylesheet, mobile first, one typeface.
   Motif: the accountant's double rule under a total (report, page transitions). Gold only on dark. */
@font-face { font-family: Archivo; src: url(/fonts/archivo.woff2) format("woff2"); font-weight: 400 800; font-stretch: 100% 125%; font-display: swap; }
:root {
  --ink: #0e1a30;       /* dark surfaces */
  --ink-2: #16243f;
  --navy: #1c2b45;      /* text on light */
  --muted: #5b6472;
  --paper: #f3f5f7;
  --line: #d9dee5;
  --gold: #c9a24a;      /* on dark only */
  --gold-lite: #ecd9a6;
  --on-ink: #c4ccd8;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font: 400 17px/1.6 Archivo, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--navy);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.05; margin: 0 0 .5em; font-stretch: 125%; font-weight: 760; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 7.5vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
section { padding: clamp(56px, 10vh, 104px) 0; }
.lead { font-size: 1.15rem; max-width: 34em; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.hidden { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
body > header { position: sticky; top: 0; z-index: 10; background: rgb(14 26 48 / .94); backdrop-filter: blur(10px); color: #fff; }
body > header .wrap { display: flex; align-items: center; gap: 16px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 700; font-stretch: 115%; }
.brand img { width: 40px; }
body > header nav { margin-left: auto; display: flex; gap: 2px; }
body > header nav a { color: var(--on-ink); text-decoration: none; padding: 8px 12px; }
body > header nav a:hover { color: #fff; }
body > header nav a[aria-current] { color: #fff; box-shadow: inset 0 -2px var(--gold); }
@media (max-width: 760px) { body > header nav { display: none; } }

/* Buttons: gold is the one call to action everywhere */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 24px; border-radius: 3px; font: inherit; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.btn-wa { background: var(--gold); color: var(--ink); }
.btn-wa:hover { background: var(--gold-lite); }
.btn-main { background: var(--navy); color: #fff; }
.btn-main:hover { background: var(--ink); }
.btn-ghost { color: inherit; box-shadow: inset 0 0 0 1px currentColor; background: none; }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px currentColor; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Dark surfaces */
.hero, .band, body > footer { background: radial-gradient(80% 70% at 85% 10%, var(--ink-2), transparent 70%), var(--ink); color: var(--on-ink); }
.hero h1, .hero h2, .band h2, .band h3 { color: #fff; }
.hero a:not(.btn), .band a:not(.btn) { color: var(--gold-lite); }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(48px, 9vh, 96px) 0; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero .cols { grid-template-columns: 1.15fr .85fr; } }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; }
.season { border-left: 2px solid var(--gold); padding: 4px 0 4px 16px; margin-top: 32px; max-width: 34em; }
.season strong { color: #fff; }

/* The paper: a printed report as the hero object (js/paper.js). Flat CSS page first, WebGL sheet on GPUs. */
.paper-stage { position: relative; isolation: isolate; width: min(470px, 100%); aspect-ratio: 4 / 5; justify-self: center;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.paper-stage:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.paper2d, .paper-stage::before, .paper-stage::after { position: absolute; left: 13%; top: 5%; width: 74%; height: auto; aspect-ratio: 1024 / 1448;
  transform: perspective(1500px) rotateY(-13deg) rotateX(7deg) rotateZ(.5deg); }
.paper2d { box-shadow: 0 46px 60px -34px rgb(0 0 0 / .65), 0 2px 5px rgb(0 0 0 / .3); animation: settle 1.5s var(--ease) both; transition: opacity .7s; }
.paper2d.turn { animation: turn .45s var(--ease); }
.paper-stage::before, .paper-stage::after { content: ""; z-index: -1; background: #ecebe5; box-shadow: 0 30px 40px -26px rgb(0 0 0 / .6); transition: opacity .7s; }
.paper-stage::before { translate: 14px 9px; rotate: 2.4deg; }
.paper-stage::after { translate: -9px 14px; rotate: -1.8deg; background: #e4e3dc; }
.paper3d { position: absolute; top: 0; height: 100%; left: -35%; width: 170%; pointer-events: none; filter: drop-shadow(0 30px 28px rgb(0 0 0 / .5)); opacity: 0; transition: opacity .7s; }
.paper-stage.gl .paper3d { opacity: 1; } .paper-stage.gl .paper2d, .paper-stage.gl::before, .paper-stage.gl::after { opacity: 0; }
.paper-hint { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: .85rem; color: var(--on-ink); opacity: 0; transition: opacity .6s; }
.paper-stage.ready .paper-hint { opacity: .8; }
@keyframes turn { 40% { opacity: 0; translate: 26px -6px; } 41% { translate: -10px 4px; } }
@keyframes settle { from { opacity: 0; translate: 0 -40px; } }
@media (max-width: 899px) { .paper-stage { width: min(88vw, 420px); margin-top: 8px; } }
@keyframes sweep { 0% { background-position: 100% 0; } 28%, 100% { background-position: 0 0; } }

/* Clients: one centred group, heading and marks together */
.clients { text-align: center; }
.clients .logos { justify-content: center; }

/* Odometer digits (js/site.js) */
.rolling { display: inline-flex; vertical-align: baseline; }
.rolling > span:not(.sr) { display: block; height: 1.2em; line-height: 1.2em; overflow: hidden; }
.roll > span { display: block; transition: transform 1.1s var(--ease); }
.roll > span > span { display: block; height: 1.2em; }

/* Light sections */
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 28px clamp(28px, 6vw, 64px); margin-top: 20px; color: var(--navy); }
.logos img { height: var(--h, 48px); width: auto; opacity: .8; }
.rows { border-top: 1px solid var(--navy); }
.rows > div { display: grid; gap: 4px 40px; padding: 22px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .rows > div { grid-template-columns: 1fr 1.6fr; } }
.rows h3 { margin: 0; }
.rows p { margin: 0; color: var(--muted); }
.steps { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li::before { counter-increment: s; content: counter(s); display: block; font-size: 3.2rem; font-weight: 800; font-stretch: 125%; line-height: 1; color: var(--navy); padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.steps p { color: var(--muted); margin: 0; }
.band p { color: var(--on-ink); }
.two { display: grid; gap: 32px; }
@media (min-width: 860px) { .two { grid-template-columns: 1fr 1fr; } }

/* Cards (forms, links) */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 24px; }
.card p { color: var(--muted); margin: 0; }
a.card { text-decoration: none; transition: border-color .2s; }
a.card:hover { border-color: var(--navy); }

/* Services page */
.service { border-top: 1px solid var(--line); padding: 30px 0; display: grid; gap: 4px 40px; }
@media (min-width: 860px) { .service { grid-template-columns: 1fr 1.4fr; } }
.service small { display: block; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.service h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); }
.service ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
details { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px 20px; }
.faq details + details { margin-top: 10px; }
.faq h2 { margin-bottom: 20px; }
summary { cursor: pointer; font-weight: 700; }

/* Forms and calculator */
form { display: grid; gap: 14px; max-width: 540px; }
label { display: grid; gap: 6px; font-weight: 600; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; padding: 12px 14px; border: 1px solid #c3cad5; border-radius: 3px; background: #fff; color: var(--navy); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.band form, .band .card, .hero form, .hero .card { color: var(--navy); }
.result { background: #fff; border: 1px solid var(--navy); border-radius: 4px; padding: 24px; }
.result .label { font-weight: 700; margin: 0 0 4px; }
.result .big { font-size: 2.4rem; font-weight: 800; font-stretch: 112%; font-variant-numeric: tabular-nums lining-nums; padding-bottom: 6px; border-bottom: 5px double var(--navy); display: inline-block; margin-bottom: 12px; }
.result .big.rolling { display: inline-flex; white-space: pre; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
td, th { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); }
td:last-child, th:last-child { text-align: right; font-variant-numeric: tabular-nums lining-nums; }

/* Footer + sticky mobile bar */
body > footer { padding: 48px 0 104px; font-size: .95rem; }
body > footer a { color: #fff; }
body > footer .wrap { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
body > footer strong { color: #fff; }
.bar { position: fixed; inset: auto 0 0 0; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgb(14 26 48 / .96); z-index: 20; }
.bar .btn { flex: 1; padding: 13px; }
.bar .btn-main { background: none; box-shadow: inset 0 0 0 1px var(--on-ink); }
@media (min-width: 760px) { .bar { display: none; } body > footer { padding-bottom: 48px; } }

/* ---- The one orchestrated moment (home): headline words rise, figures roll, the total is ruled off ---- */
.intro h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.intro h1 .w > span { display: inline-block; transform: translateY(105%); animation: up .9s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + var(--late, 0s)); }
.intro h1:not(.split) { opacity: 0; animation: show 0s 1.2s forwards; } /* safety if JS never splits */
.veil-out { --late: 1s; } /* arriving through the veil: the intro waits for it */
@keyframes up { to { transform: none; } }
@keyframes show { to { opacity: 1; } }

/* ---- Page change: a navy sweep carrying the next page's name over a double rule ---- */
html::before, html::after { position: fixed; z-index: 100; pointer-events: none; visibility: hidden; }
html::before { content: ""; inset: 0; background: var(--ink); }
html::after { content: attr(data-veil); left: 8vw; right: 8vw; top: 42%; color: #fff; font: 780 clamp(2rem, 8vw, 5rem)/1.05 Archivo, system-ui, sans-serif; font-stretch: 125%; letter-spacing: -.015em; padding-bottom: 16px;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) 0 calc(100% - 5px) / 0 1.5px no-repeat; }
.veil-in::before, .veil-in::after, .veil-out::before, .veil-out::after { visibility: visible; }
.veil-in::before { animation: v-in .42s cubic-bezier(.7, 0, .2, 1) both; }
.veil-in::after { animation: v-in .42s cubic-bezier(.7, 0, .2, 1) both, t-in .45s var(--ease) .12s both; }
.veil-out::before { animation: v-out .6s cubic-bezier(.7, 0, .2, 1) .55s both; }
.veil-out::after { animation: t-hold .55s linear both, t-out .3s ease .55s forwards; }
@keyframes v-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes v-out { from { clip-path: inset(0); } to { clip-path: inset(0 0 100% 0); } }
@keyframes t-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes t-hold { from { background-size: 0 1.5px, 0 1.5px; } to { background-size: 100% 1.5px, 100% 1.5px; } }
@keyframes t-out { from { opacity: 1; background-size: 100% 1.5px, 100% 1.5px; } to { opacity: 0; transform: translateY(-12px); background-size: 100% 1.5px, 100% 1.5px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html::before, html::after { visibility: hidden !important; }
}
