/* ==========================================================================
   Nextgen Brasil · case.css  (páginas de case)
   Usa os tokens de base.css. Hero escuro com a mesma arte do cartão do case,
   leitura em coluna estreita, figuras largas com lightbox.
   ========================================================================== */

.cs-hero { position: relative; overflow: hidden; padding-block: calc(var(--header-h) + clamp(40px, 7vw, 88px)) clamp(48px, 7vw, 88px); background: var(--z-bg); }
.cs-hero::before { content: ""; position: absolute; inset: 0; opacity: .9; }
.cs-hero--a::before { background: repeating-radial-gradient(circle at 12% 130%, rgba(255, 255, 255, .09) 0 1.5px, transparent 1.5px 38px), linear-gradient(135deg, #07104A 0%, #0F2A9C 55%, #0B7FA8 130%); }
.cs-hero--b::before { background: linear-gradient(rgba(255, 255, 255, .08) 1.5px, transparent 1.5px) 0 0 / 38px 38px, linear-gradient(90deg, rgba(255, 255, 255, .08) 1.5px, transparent 1.5px) 0 0 / 38px 38px, linear-gradient(150deg, #0A1550 0%, #1537B5 60%, #1E8FC2 130%); }
.cs-hero--c::before { background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 22px), linear-gradient(160deg, #050B22 0%, #0F2A9C 70%, #1F5BE0 130%); }
.cs-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to top, rgba(5, 11, 34, .55), transparent); pointer-events: none; }
.cs-hero > .container { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3.4vw, 36px); }
.cs-back { display: inline-flex; align-items: center; gap: .5em; justify-self: start; min-height: 44px; font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.cs-back .i { width: 1em; height: 1em; transform: rotate(180deg); transition: transform .35s var(--ease); }
.cs-back:hover { color: var(--ink); }
.cs-back:hover .i { transform: rotate(180deg) translateX(4px); }
.cs-tag { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--z-accent); }
.cs-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.cs-h1 { font-size: clamp(34px, 5.2vw, 68px); font-weight: 300; letter-spacing: -.04em; line-height: 1.02; text-wrap: balance; max-width: 18ch; }
.cs-hero .lead { color: var(--ink-2); max-width: 60ch; }
.cs-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 18px 28px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 920px; }
.cs-meta dt { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.cs-meta dd { margin: 2px 0 0; font-weight: 500; color: var(--ink); }

.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; margin-top: 8px; }
.cs-stat { display: grid; gap: 6px; align-content: start; padding: clamp(18px, 2.4vw, 26px); border-radius: var(--r-3); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cs-stat b { font-size: clamp(38px, 4.6vw, 60px); font-weight: 300; letter-spacing: -.04em; line-height: 1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; font-variant-numeric: tabular-nums; }
.cs-stat span { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.cs-stat small { font-size: 13px; line-height: 1.4; color: var(--ink-3); }

/* seções ------------------------------------------------------------------ */
.cs { position: relative; padding-block: clamp(56px, 8vw, 104px); }
.cs + .cs { border-top: 1px solid var(--line); }
.cs--dark { border-top: 0 !important; background: linear-gradient(180deg, var(--z-bg-2), var(--z-bg)); }
.cs__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.cs__head { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 14px; align-content: start; }
.cs__head h2 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 300; letter-spacing: -.035em; line-height: 1.06; text-wrap: balance; }
.cs__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.cs__body p, .cs__body li { color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.cs__body strong { color: var(--ink); font-weight: 600; }
.cs__q { padding: 20px 22px; border-radius: var(--r-2); background: var(--surface); box-shadow: inset 4px 0 0 var(--electric), inset 0 0 0 1px var(--line); font-size: clamp(19px, 1.6vw, 23px); font-weight: 400; line-height: 1.35; letter-spacing: -.015em; color: var(--ink); max-width: 56ch; }
.cs__q small { display: block; margin-top: 6px; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }

.cs-list { display: grid; gap: 12px; }
.cs-list li { position: relative; padding-left: 26px; }
.cs-list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }

.cs-steps { display: grid; gap: 0; counter-reset: s; }
.cs-steps li { counter-increment: s; position: relative; display: grid; gap: 4px; padding: 0 0 26px 54px; max-width: 62ch; }
.cs-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 600; font-size: 15px; color: var(--accent); }
.cs-steps li::after { content: ""; position: absolute; left: 17.5px; top: 42px; bottom: 6px; width: 1px; background: var(--line-2); }
.cs-steps li:last-child { padding-bottom: 0; }
.cs-steps li:last-child::after { display: none; }
.cs-steps h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.3; padding-top: 5px; }
.cs-steps p { font-size: 16px; }

.cs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; max-width: 640px; }
.cs-fact { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cs-fact b { font-size: 28px; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.cs-fact span { font-size: 14px; line-height: 1.4; color: var(--ink-3); }

.cs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.cs-card { display: grid; gap: 8px; align-content: start; padding: clamp(18px, 2.2vw, 24px); border-radius: var(--r-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cs-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.3; }
.cs-card p { font-size: 15.5px; line-height: 1.55; }
.cs--dark .cs-card { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line); }

.cs-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: var(--r-2); box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); font-variant-numeric: tabular-nums; }
.cs-table th, .cs-table td { padding: 14px 16px; text-align: right; border-bottom: 1px solid var(--line); }
.cs-table th:first-child, .cs-table td:first-child { text-align: left; }
.cs-table thead th { font-size: 13px; font-weight: 600; color: var(--ink-3); background: var(--bg-alt); }
.cs-table tbody th { font-weight: 600; color: var(--ink); }
.cs-table tbody tr:last-child > * { border-bottom: 0; }
.cs-table td { color: var(--ink-2); }
.cs-table td:last-child { font-weight: 700; color: var(--accent); }
.cs-tablewrap { overflow-x: auto; max-width: 640px; border-radius: var(--r-2); }
.cs-tablewrap .cs-table { min-width: 0; }
.cs--dark .cs-table thead th { background: rgba(255, 255, 255, .08); }
@media (max-width: 560px) { .cs-table th, .cs-table td { padding: 12px 10px; font-size: 15px; } }

.cs-note { display: grid; gap: 6px; padding: 18px 20px; border-radius: var(--r-2); background: var(--bg-alt); box-shadow: inset 0 0 0 1px var(--line); max-width: 62ch; }
.cs-note b { font-size: 14px; font-weight: 600; color: var(--ink); }
.cs-note p { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

/* figuras ----------------------------------------------------------------- */
.cs-figs { display: grid; gap: clamp(18px, 2.4vw, 28px); margin-top: clamp(28px, 4vw, 48px); }
.cs-figs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-figs--2 .cs-fig:last-child:nth-child(odd) { grid-column: 1 / -1; }
.cs-fig { display: grid; gap: 10px; margin: 0; min-width: 0; }
.cs-fig__btn { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-2); overflow: hidden; cursor: zoom-in; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.cs-fig__btn img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.cs-fig__btn:hover img { transform: scale(1.015); }
.cs-fig__btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.cs-fig__zoom { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(5, 11, 34, .72); color: #fff; opacity: 0; transform: scale(.85); transition: opacity .25s, transform .35s var(--ease); pointer-events: none; }
.cs-fig__zoom .i { width: 18px; height: 18px; }
.cs-fig__btn:hover .cs-fig__zoom, .cs-fig__btn:focus-visible .cs-fig__zoom { opacity: 1; transform: none; }
@media (hover: none) { .cs-fig__zoom { opacity: 1; transform: none; } }
.cs-fig figcaption { font-size: 14px; line-height: 1.5; color: var(--ink-3); max-width: 70ch; }

/* lightbox ---------------------------------------------------------------- */
.lb { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(3, 7, 22, .94); color: #EAF0FF; }
.lb::backdrop { background: rgba(3, 7, 22, .94); }
.lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: lbin .3s var(--ease); }
@keyframes lbin { from { opacity: 0; } }
.lb__stage { display: grid; place-items: center; min-height: 0; padding: calc(56px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.lb__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #fff; }
.lb__cap { padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); text-align: center; font-size: 14px; color: #B3C1E8; }
.lb__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .2s, transform .3s var(--ease); }
.lb__btn:hover { background: rgba(255, 255, 255, .24); }
.lb__btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.lb__btn .i { width: 22px; height: 22px; }
.lb__close { top: calc(10px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); }
.lb__prev, .lb__next { top: 50%; margin-top: -24px; }
.lb__prev { left: max(12px, env(safe-area-inset-left, 0px)); }
.lb__next { right: max(12px, env(safe-area-inset-right, 0px)); }
.lb__prev .i { transform: rotate(180deg); }
.lb__count { position: absolute; top: calc(22px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); font-size: 14px; color: #B3C1E8; }
@media (max-width: 640px) { .lb__prev, .lb__next { top: auto; bottom: calc(52px + env(safe-area-inset-bottom, 0px)); margin: 0; } }

/* adoção + navegação + CTA ------------------------------------------------- */
.cs-adopt { display: grid; gap: 18px; padding: clamp(24px, 3.4vw, 40px); border-radius: var(--r-4); background: var(--panel); color: #fff; box-shadow: 0 30px 60px -30px rgba(31, 91, 224, .6); }
.cs-adopt h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 300; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; max-width: 22ch; }
.cs-adopt p { color: rgba(255, 255, 255, .88); max-width: 66ch; }
.cs-adopt .label { color: rgba(255, 255, 255, .7); }
.cs-adopt__scope { padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .25); font-size: 15px; }

.cs-nav { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.cs-nav__in { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cs-nav a { display: grid; gap: 4px; padding: 20px 22px; border-radius: var(--r-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); transition: translate .4s var(--ease), box-shadow .3s; }
.cs-nav a:hover { translate: 0 -3px; box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow); }
.cs-nav small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.cs-nav span { font-size: clamp(17px, 1.6vw, 21px); font-weight: 500; letter-spacing: -.015em; line-height: 1.25; }
.cs-nav a:last-child { text-align: right; }

.cs-cta { padding-block: clamp(64px, 9vw, 112px); }
.cs-cta .container { display: grid; gap: 22px; justify-items: start; max-width: 900px; }
.cs-cta h2 { font-size: clamp(32px, 4.2vw, 54px); font-weight: 300; letter-spacing: -.04em; line-height: 1.04; text-wrap: balance; }
.cs-cta p { color: var(--ink-2); max-width: 56ch; }

@media (max-width: 900px) {
  .cs__grid { grid-template-columns: minmax(0, 1fr); }
  .cs__head { position: static; }
  .cs-figs--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cs-nav__in { grid-template-columns: minmax(0, 1fr); }
  .cs-nav a:last-child { text-align: left; }
  .cs-h1 { max-width: none; }
}

/* cabeçalho sobre o hero escuro (antes de rolar) */
.nav--on-dark:not(.is-scrolled):not(.is-open) {
  --ink: var(--z-ink); --ink-2: var(--z-ink-2); --glass: rgba(255, 255, 255, .1); --line-2: rgba(160, 185, 255, .4); --bg-alt: rgba(255, 255, 255, .14); --line: rgba(160, 185, 255, .3);
}
.nav--on-dark:not(.is-scrolled):not(.is-open) .logo--light { display: none; }
.nav--on-dark:not(.is-scrolled):not(.is-open) .logo--dark { display: block; }
.nav--on-dark:not(.is-scrolled):not(.is-open) .nav__toggle { background: rgba(255, 255, 255, .1); }
@media (max-width: 980px) {
  .nav--on-dark:not(.is-scrolled):not(.is-open) .nav__links a { color: var(--ink-2); }
}
