/*
  Sem Atrito — home v4 (index-v4.html) only. Owner: dev-head. Load after tokens.css and base.css.
  From Design's prototype departments/rnd-design/visuals/home/v4/ (handoff.md). Everything is scoped to body.hv4.
  The line (the spine) is drawn by shared/js/home-v4.js into #spine. The .docs boxes are static here;
  shared/css/docs-motion.css + js/docs-motion.js animate them (separate files, other developer).
*/

/* v4 tokens (Design handoff). Candidates for tokens.css if v4 becomes the home. */
.hv4 {
  --t-mega: clamp(42px, 6.6vw, 112px);
  --t-h2: clamp(36px, 4.6vw, 76px);
  --t-h3: clamp(21px, 1.2vw + .7rem, 30px);
  --t-num: clamp(72px, 9vw, 150px);
  --t-lead: clamp(18px, .5vw + 1rem, 22px);
  --t-small: var(--fs-sm);
  --t-label: clamp(11.5px, .1vw + .68rem, 12.5px);
  --max: 1360px;
  --margin: clamp(20px, 4vw, 56px);
  --rail: clamp(40px, 7vw, 112px);
  --gap: 24px;
  --sec: clamp(96px, 12vw, 184px);
  --hero-bg: #0B0F17;
  --hair-dark: #232937;
  --on-dark-2: #C9CED8;
  --settle: cubic-bezier(.16, 1, .3, 1);
  overflow-x: hidden;
}
@supports (overflow: clip) { .hv4 { overflow-x: clip; } }

.hv4 .wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--margin) 0 calc(var(--margin) + var(--rail)); position: relative; z-index: 2; }
.hv4 .g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.hv4 .v4-label { font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); font-weight: 400; margin: 0; }
.hv4 .v4-link { color: inherit; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.hv4 .v4-link:hover { color: var(--c-accent); }
.hv4 .btn--lg { min-height: 54px; padding: 0 26px; font-weight: 600; font-size: 16px; white-space: nowrap; }

/* ---------- header: light by default; .is-dark (set by JS) only while the dark hero is under it ---------- */
.hv4 .site-header { background: rgb(255 255 255 / .97); transition: none; }
.hv4 .header-inner { max-width: var(--max); padding-inline: var(--margin); }
.hv4 .brand__lockup--dark { display: none; }
.hv4 .site-header.is-dark { background: var(--hero-bg); border-bottom-color: var(--hair-dark); }
.hv4 .site-header.is-dark .brand__lockup--light { display: none; }
.hv4 .site-header.is-dark .brand__lockup--dark { display: block; }
/* logo-lockup-dark.svg has a 24-unit margin baked in (144 tall vs 96): scale it up 1.5x and pull the margin back,
   so the dark and light headers show the same logo size */
.hv4 .brand__lockup--dark, .hv4 .site-footer .brand__lockup { height: 2.625rem; margin: -0.4375rem; }
@media (max-width: 30rem) { .hv4 .brand__lockup--dark, .hv4 .site-footer .brand__lockup { height: 2.25rem; margin: -0.375rem; } }
.hv4 .site-header.is-dark .site-nav a:not(.btn) { color: var(--c-dark-ink); }
.hv4 .site-header.is-dark .site-nav a:not(.btn):hover { color: var(--c-accent-on-dark); }
.hv4 .site-header.is-dark .nav-toggle { color: var(--c-dark-ink); border-color: var(--hair-dark); }
.hv4 .site-header.is-dark :focus-visible { outline-color: var(--c-accent-on-dark); }
@media (max-width: 68rem) {
  /* the open phone menu is a white sheet: keep its links dark in both header states */
  .hv4 .site-header.is-dark .site-nav ul a:not(.btn) { color: var(--c-ink); }
}

/* ---------- the spine: one SVG over the whole page, under the text ---------- */
#page { position: relative; }
#spine { position: absolute; left: 0; top: 0; width: 100%; max-width: none; height: 0; z-index: 1; pointer-events: none; overflow: visible; }
#spine path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#pHero { stroke: var(--c-accent-on-dark); stroke-width: 2.2; }
#pGlow { stroke: var(--c-accent); stroke-width: 9; opacity: .35; filter: blur(7px); }
#pRest { stroke: url(#gRest); stroke-width: 2; }
.hv4.motion #pHero, .hv4.motion #pGlow { stroke-dasharray: 1; animation: v4-draw 2.2s var(--settle) .25s both; }
@keyframes v4-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.hv4.motion #pRest { stroke-dasharray: 1; stroke-dashoffset: 1; }
#spine .node { fill: var(--c-surface-alt); stroke: var(--c-accent); stroke-width: 2; transition: fill .3s; }
#spine .node.on { fill: var(--c-accent); }

/* ---------- 00 hero (dark) ---------- */
.hv4 .hero { position: relative; background: var(--hero-bg); color: var(--c-dark-ink); min-height: clamp(640px, calc(100svh - var(--header-h)), 920px); display: flex; flex-direction: column; overflow: hidden; }
.hv4 .hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / .045) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .045) 1px, transparent 1px); background-size: 96px 96px; background-position: center top; -webkit-mask-image: radial-gradient(120% 80% at 70% 55%, #000 10%, transparent 75%); mask-image: radial-gradient(120% 80% at 70% 55%, #000 10%, transparent 75%); pointer-events: none; }
.hv4 .hero::after { content: ""; position: absolute; right: -10%; top: 38%; width: 70%; height: 50%; background: radial-gradient(closest-side, rgb(43 68 255 / .22), transparent); pointer-events: none; }
.hv4 .hero .v4-label { color: var(--c-dark-soft); }
.hv4 .hero > .wrap { width: 100%; }
.hv4 .hero-top { padding: clamp(28px, 5vh, 56px) 0 18px; border-bottom: 1px solid var(--hair-dark); }
.hv4 .hero h1 { font-size: var(--t-mega); font-weight: 600; letter-spacing: -.045em; line-height: .95; margin: clamp(28px, 5vh, 56px) 0 0; max-width: 19ch; color: var(--c-dark-ink); text-wrap: balance; }
.hv4 .hero h1 > span { display: block; }
.hv4 .hero h1 .acc { color: var(--c-accent-on-dark); }
.hv4.motion .hero h1 > span { animation: v4-rise 1s var(--settle) both; }
.hv4.motion .hero h1 .acc { animation-delay: .12s; }
@keyframes v4-rise { from { opacity: .01; transform: translateY(.25em); } to { opacity: 1; transform: none; } }
.hv4 .stage { position: relative; height: clamp(120px, 16vh, 200px); z-index: 2; }
.hv4 .cap { position: absolute; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--hair-dark); border-radius: var(--radius-pill); color: var(--c-dark-soft); background: var(--hero-bg); }
.hv4 .cap--a { right: var(--margin); bottom: -6px; }
.hv4 .cap--hint { right: calc(var(--margin) + 90px); bottom: -6px; border-style: dashed; }
@media (hover: none), (pointer: coarse) { .hv4 .cap--hint { display: none; } }
.hv4 .hero-low { margin-top: auto; padding-top: 24px; padding-bottom: clamp(28px, 5vh, 48px); align-items: end; }
.hv4 .hero-low .sub { grid-column: 1 / span 6; margin: 0; font-size: var(--t-lead); line-height: 1.5; color: var(--on-dark-2); max-width: 44ch; }
.hv4 .hero-low .cta { grid-column: 8 / span 5; justify-self: end; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hv4 .hero-low .row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hv4 .hero-low .note { margin: 0; font-size: var(--t-small); color: var(--c-dark-soft); }
.hv4 .hero .v4-link { color: var(--c-dark-ink); }
.hv4 .hero .v4-link:hover { color: var(--c-accent-on-dark); }
.hv4 .hero :focus-visible { outline-color: var(--c-accent-on-dark); }
.hv4 .hero-meta { list-style: none; margin: 0; padding: 18px 0 clamp(40px, 6vh, 64px); border-top: 1px solid var(--hair-dark); display: flex; flex-wrap: wrap; gap: 8px 32px; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .06em; text-transform: uppercase; color: var(--c-dark-soft); }
.hv4 .hero-meta li { display: flex; align-items: center; gap: 10px; }
.hv4 .hero-meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent-on-dark); flex: none; }
.hv4 .scrollcue { position: absolute; right: var(--margin); bottom: 16px; z-index: 2; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--c-dark-soft); text-decoration: none; }
.hv4 .scrollcue:hover { color: var(--c-dark-ink); }
.hv4 .scrollcue__coarse { display: none; }
@media (hover: none), (pointer: coarse) { .hv4 .scrollcue__fine { display: none; } .hv4 .scrollcue__coarse { display: inline; } }

/* ---------- chapters ---------- */
.hv4 .chap { position: relative; padding: var(--sec) 0; }
.hv4 .chap.paper { background: var(--c-surface-alt); }
.hv4 .head { margin-bottom: clamp(48px, 6vw, 96px); align-items: end; }
.hv4 .head__label { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.hv4 .head__label::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.hv4 .head h2 { grid-column: 1 / span 7; margin: 0; font-size: var(--t-h2); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.hv4 .head > p { grid-column: 9 / span 4; margin: 0; font-size: var(--t-lead); line-height: 1.5; color: var(--c-ink-soft); }
.hv4 .foot-row { margin-top: 40px; align-items: center; }
.hv4 .foot-row .disc { grid-column: 1 / span 7; margin: 0; font-size: var(--t-small); color: var(--c-muted); }
.hv4 .foot-row .end { grid-column: 9 / span 4; justify-self: end; margin: 0; font-size: var(--t-lead); }
.hv4 .foot-row > .btn { grid-column: 9 / span 4; justify-self: end; }

/* 01 dores + 02 como funciona: compact chapters (v3.3). Tighter padding and head than the other chapters. */
.hv4 #dores, .hv4 #como-funciona { padding: clamp(72px, 8vw, 112px) 0; }
.hv4 #dores .head, .hv4 #como-funciona .head { margin-bottom: clamp(28px, 3.5vw, 48px); }
.hv4 #dores .head h2, .hv4 #como-funciona .head h2 { grid-column: 1 / span 6; }
.hv4 #dores .head > p, .hv4 #como-funciona .head > p { grid-column: 7 / span 6; padding-left: var(--gap); }
.hv4 #dores .foot-row { margin-top: 28px; }

/* the ± icon shared by the dores rows and the steps toggle (same drawing as the FAQ's) */
.hv4 .dor .pm, .hv4 .steps-toggle .pm { position: relative; flex: none; width: 32px; height: 32px; border: 1px solid var(--c-line); border-radius: 50%; transition: transform var(--dur) var(--ease), border-color .2s; }
.hv4 .dor .pm::before, .hv4 .dor .pm::after, .hv4 .steps-toggle .pm::before, .hv4 .steps-toggle .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: var(--c-ink); }
.hv4 .dor .pm::after, .hv4 .steps-toggle .pm::after { transform: rotate(90deg); }
.hv4 .dor[open] .pm, .hv4 .steps-toggle[aria-expanded="true"] .pm { transform: rotate(45deg); border-color: var(--c-accent); }
.hv4 .dor summary:hover .pm, .hv4 .steps-toggle:hover .pm { border-color: var(--c-accent); }

/* 01 dores: ledger of <details>; the whole row (summary) is the hit target; each row owns a piece of the line */
.hv4 .ledger { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--c-ink); interpolate-size: allow-keywords; }
.hv4 .ledger li { position: relative; border-bottom: 1px solid var(--c-line); }
.hv4 .dor summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; min-height: 44px; padding: 16px 0; }
.hv4 .dor summary::-webkit-details-marker { display: none; }
.hv4 .dor summary:focus-visible { outline-offset: -2px; border-radius: 0; }
.hv4 .ledger .n { grid-column: 1 / span 1; font-family: var(--font-mono); font-size: 13px; color: var(--c-muted); transition: color .3s; }
.hv4 .ledger .q { grid-column: 2 / span 10; font-size: var(--t-h3); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; transition: color .3s; }
.hv4 .dor .pm { grid-column: 12; justify-self: end; }
.hv4 .ledger li.on .n, .hv4 .ledger li.on .q, .hv4 .dor summary:hover .q { color: var(--c-accent); }
.hv4 .dor__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px var(--gap); padding: 0 0 26px; }
.hv4 .dor__body p { margin: 0; color: var(--c-ink-soft); }
.hv4 .dor__body .a { grid-column: 2 / span 4; }
.hv4 .dor__body .fix { grid-column: 7 / span 5; color: var(--c-ink); }
.hv4 .dor__body .lbl { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.hv4 .dor__body .fix .lbl { color: var(--c-accent); }
.hv4 .dor__body .v4-link { white-space: nowrap; }   /* D-4: the gap before it is a normal space in the HTML */
.hv4 .dor__body .fine { grid-column: 7 / span 5; font-size: var(--t-small); color: var(--c-muted); line-height: 1.5; }
/* before home-v4.js has set the state, rows 2-7 already look closed (same height as after), so nothing shifts */
html.js .hv4 .ledger:not(.is-ready) li + li .dor__body { display: none; }
html.js .hv4 .ledger:not(.is-ready) li + li .dor .pm { transform: none; border-color: var(--c-line); }
/* open/close: height animates where the browser can (::details-content), 220 ms; never under reduced motion */
@supports selector(::details-content) {
  .hv4.motion .dor::details-content { block-size: 0; overflow: clip; transition: block-size .22s var(--ease), content-visibility .22s allow-discrete; }
  .hv4.motion .dor[open]::details-content { block-size: auto; }
}
/* the sweep: a 1.5 px cobalt hairline under the row at the reading line (home-v4.js sets li.on) */
.hv4 .ledger li::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--c-accent); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.hv4.motion .ledger li::after { transition: transform .8s var(--settle); }
.hv4 .ledger li.on::after { transform: scaleX(1); }

/* 02 como funciona: 4 steps side by side, one toggle for all details; the line is pinned through the steps */
.hv4 .steps { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--c-ink); }
.hv4 .step { grid-column: span 3; padding: 28px 0 0; min-width: 0; }
.hv4 .step + .step { border-left: 1px solid var(--c-line); padding-left: var(--gap); }
.hv4 .step .big { font-size: clamp(56px, 5.6vw, 88px); font-weight: 300; letter-spacing: -.06em; line-height: 1; margin: -.08em 0 14px; font-variant-numeric: tabular-nums; }
.hv4 .step .big span { display: inline-block; }
.hv4 .step .t { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 14px; }
.hv4 .step h3 { margin: 0; font-size: var(--t-h3); letter-spacing: -.02em; line-height: 1.1; }
.hv4 .chip { display: inline-block; font-family: var(--font-mono); font-size: 13px; padding: 4px 9px; border: 1px solid var(--c-ink); border-radius: var(--radius-sm); background: var(--c-bg); }
.hv4 .chip--free { border-color: var(--c-accent); color: var(--c-accent); }
.hv4 .step .line { margin: 0; color: var(--c-ink-soft); max-width: 34ch; }
.hv4 .step .d { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--c-border); font-size: var(--t-small); color: var(--c-ink-soft); }
html.js .hv4 .steps:not(.is-ready) .more { display: none; }
.hv4.motion .steps.is-open .more:not([hidden]) { animation: v4-more .24s var(--ease) both; }
@keyframes v4-more { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* step-rise (handoff §2): the number rises out of its slot, then the chip fades up; IO once, armed by JS */
.hv4.motion .steps.rise .big span { transition: clip-path .9s var(--settle) var(--d, 0ms), transform .9s var(--settle) var(--d, 0ms); }
.hv4.motion .steps.rise .chip { transition: opacity .5s var(--ease) calc(var(--d, 0ms) + 350ms), transform .5s var(--ease) calc(var(--d, 0ms) + 350ms); }
.hv4.motion .steps.rise .step:not(.is-in) .big span { clip-path: inset(100% 0 0 0); transform: translateY(.28em); }
.hv4.motion .steps.rise .step:not(.is-in) .chip { opacity: 0; transform: translateY(6px); }
.hv4.motion .steps.rise .step.is-in .big span { clip-path: inset(0); }
/* trust strip + the one toggle */
.hv4 .steps-bar { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--c-line); align-items: center; }
.hv4 .trust { grid-column: 1 / span 10; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink); }
.hv4 .trust li { display: flex; align-items: center; gap: 10px; }
.hv4 .trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); flex: none; }
.hv4 .steps-toggle { grid-column: 11 / span 2; white-space: nowrap; justify-self: end; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 0 0 8px; margin: 0; background: none; border: 0; font: inherit; font-weight: 600; color: var(--c-ink); cursor: pointer; }
.hv4 .steps-toggle:hover { color: var(--c-accent); }
html:not(.js) .hv4 .steps-toggle { display: none; }
.hv4 #como-funciona .steps-foot { margin-top: 32px; }

/* 03 exemplos: documents, before -> after (static styling; motion lives in docs-motion.css) */
.hv4 .notice { margin: 0 0 clamp(48px, 6vw, 88px); }
.hv4 .notice > div { grid-column: 1 / span 9; border-left: 2px solid var(--c-accent); padding: 4px 0 4px 20px; }
.hv4 .notice p + p { margin: 6px 0 0; color: var(--c-ink-soft); font-size: var(--t-small); max-width: 80ch; }
.hv4 .ex { padding: clamp(40px, 5vw, 72px) 0; border-top: 1.5px solid var(--c-ink); align-items: start; }
.hv4 .ex + .ex { border-top: 1px solid var(--c-line); }
.hv4 .ex .txt { grid-column: 1 / span 5; }
.hv4 .tags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.hv4 .pill { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--c-accent-soft); color: var(--c-accent); font-weight: 500; }
.hv4 .sim { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border: 1px dashed var(--c-border); color: var(--c-muted); border-radius: 3px; }
.hv4 .tags .v4-label { flex-basis: 100%; }
.hv4 .ex h3 { margin: 0 0 16px; font-size: var(--t-h3); letter-spacing: -.02em; line-height: 1.2; }
.hv4 .ex .fix { margin: 0 0 24px; color: var(--c-ink-soft); }
.hv4 .facts { margin: 0; border-top: 1px solid var(--c-line); }
.hv4 .facts div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-line); font-size: var(--t-small); }
.hv4 .facts dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--c-muted); padding-top: 2px; }
.hv4 .facts dd { margin: 0; }
.hv4 .docs { grid-column: 7 / span 6; display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: center; }
.hv4 .doc { border: 1px solid var(--c-line); background: var(--c-bg); border-radius: 6px; padding: 16px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6; color: var(--c-ink-soft); min-height: 230px; box-shadow: 0 1px 0 rgb(11 15 23 / .03); overflow-wrap: anywhere; }
.hv4 .doc .dh { display: flex; justify-content: space-between; gap: 8px; color: var(--c-muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--c-line); padding-bottom: 8px; margin-bottom: 10px; }
.hv4 .doc.before { background: var(--c-surface-alt); border-style: dashed; border-color: #C5CAD3; }
.hv4 .doc.before .mess { text-decoration: underline dotted #B0B6C1; text-underline-offset: 3px; }
.hv4 .doc.before .q { background: #FFF1C9; color: #5A4500; padding: 0 3px; }
.hv4 .doc.after { border-color: var(--c-accent); }
.hv4 .doc table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hv4 .doc td, .hv4 .doc th { overflow-wrap: normal; text-align: left; padding: 4px 8px 4px 0; vertical-align: top; border-bottom: 1px solid var(--c-line); font-weight: 400; }
.hv4 .doc th { color: var(--c-muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.hv4 .doc td:last-child, .hv4 .doc th:last-child { text-align: right; padding-right: 0; }
.hv4 .doc .chk { white-space: nowrap; }
.hv4 .doc .ok { color: var(--c-accent); }
.hv4 .doc .chk { color: #5A4500; background: #FFF1C9; padding: 0 4px; border-radius: 2px; }
.hv4 .doc .stamp { display: inline-block; margin-top: 10px; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--c-accent-soft); color: var(--c-accent); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.hv4 .docs .arrow { width: 44px; height: 24px; display: block; }
/* Job 2 (cycle 5): the example text runs ~2x taller than the documents; on desktop the documents ride along with it
   instead of leaving a white area under them. Sticky never shifts layout. Phone (stacked) unchanged. */
@media (min-width: 900px) {
  .hv4 .ex .docs { position: sticky; top: calc(var(--header-h, 69px) + 10vh); align-self: start; }
}
.hv4 .ex-more { margin-top: clamp(40px, 5vw, 64px); }
.hv4 .ex-more .disc { font-size: var(--fs-base); color: var(--c-ink-soft); }

/* 04 porque nos */
.hv4 .cmp-scroll { overflow-x: auto; }
.hv4 .cmp { width: 100%; border-collapse: collapse; font-size: var(--t-small); border-top: 1.5px solid var(--c-ink); }
.hv4 .cmp th, .hv4 .cmp td { text-align: left; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.hv4 .cmp thead th { font-family: var(--font-mono); font-weight: 400; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.hv4 .cmp tbody th { font-weight: 500; color: var(--c-muted); width: 16%; }
.hv4 .cmp td { color: var(--c-ink-soft); }
.hv4 .cmp .us { color: var(--c-ink); font-weight: 600; background: var(--c-accent-soft); padding-left: 16px; }
.hv4 .cmp thead .us { color: var(--c-accent); }
.hv4 .closers { margin-top: clamp(48px, 6vw, 88px); row-gap: 32px; }
.hv4 .closers p { grid-column: span 6; margin: 0; padding-top: 18px; border-top: 1px solid var(--c-ink); font-size: var(--t-lead); line-height: 1.35; letter-spacing: -.01em; }

/* 05 dados */
.hv4 .three article { grid-column: span 4; }
.hv4 .three .big { font-size: clamp(56px, 6vw, 96px); font-weight: 300; letter-spacing: -.06em; line-height: .8; margin: 0 0 28px; color: var(--c-accent); }
.hv4 .three h3 { margin: 0 0 12px; font-size: var(--t-h3); letter-spacing: -.02em; line-height: 1.15; padding-top: 18px; border-top: 1px solid var(--c-ink); }
.hv4 .three p { margin: 0; color: var(--c-ink-soft); }
.hv4 .gdpr { margin: 48px 0 0; font-size: var(--t-small); color: var(--c-muted); }

/* 06 faq */
.hv4 .faq { grid-column: 1 / span 10; border-top: 1.5px solid var(--c-ink); }
.hv4 .faq details { border-bottom: 1px solid var(--c-line); }
.hv4 .faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 36px; gap: 24px; align-items: center; padding: 26px 0; font-size: var(--t-h3); font-weight: 600; letter-spacing: -.018em; line-height: 1.25; }
.hv4 .faq summary::-webkit-details-marker { display: none; }
.hv4 .faq .pm { position: relative; width: 36px; height: 36px; border: 1px solid var(--c-line); border-radius: 50%; transition: transform .24s var(--ease), border-color .2s; }
.hv4 .faq .pm::before, .hv4 .faq .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: var(--c-ink); }
.hv4 .faq .pm::after { transform: rotate(90deg); }
.hv4 .faq details[open] .pm { transform: rotate(45deg); border-color: var(--c-accent); }
.hv4 .faq summary:hover .pm { border-color: var(--c-accent); }
.hv4 .faq .ans { margin: 0; padding: 0 64px 30px 0; color: var(--c-ink-soft); max-width: 70ch; }

/* 07 final: the line arrives flat and blue at the button */
.hv4 .final { position: relative; padding: clamp(120px, 14vw, 220px) 0 clamp(80px, 9vw, 140px); }
.hv4 .final h2 { grid-column: 1 / span 9; margin: 0; font-size: clamp(44px, 6.4vw, 108px); font-weight: 600; letter-spacing: -.045em; line-height: .96; }
.hv4 .final .txt { grid-column: 1 / span 6; margin: 28px 0 0; font-size: var(--t-lead); color: var(--c-ink-soft); }
.hv4 .final .end { margin-top: clamp(56px, 7vw, 110px); align-items: start; min-height: 80px; }
.hv4 .final .caps { grid-column: 1 / span 8; display: flex; flex-direction: column; gap: 6px; padding-top: 46px; margin: 0; }
.hv4 .final .caps b { font-family: var(--font-mono); font-weight: 500; font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); }
.hv4 .final .caps span { font-size: var(--t-small); color: var(--c-muted); }
.hv4 .final .end .btn { grid-column: 9 / span 4; justify-self: end; min-height: 60px; font-size: 17px; }

/* footer: same width rhythm as the page */
.hv4 .site-footer { position: relative; z-index: 2; }
.hv4 .site-footer > .container { max-width: var(--max); padding-inline: calc(var(--margin) + var(--rail)) var(--margin); }

/* ---------- phone / tablet ---------- */
@media (max-width: 899px) {
  .hv4 { --rail: 26px; --gap: 16px; }
  .hv4 .hero { min-height: auto; }
  .hv4 .hero h1 { line-height: .98; letter-spacing: -.04em; margin-top: 28px; }
  .hv4 .stage { height: 128px; }
  .hv4 .cap--a { bottom: -10px; }
  .hv4 .hero-low { padding-bottom: 28px; }
  .hv4 .hero-low .sub, .hv4 .hero-low .cta,
  .hv4 .head h2, .hv4 .head > p, .hv4 .foot-row .disc, .hv4 .foot-row .end, .hv4 .foot-row > .btn,
  .hv4 .notice > div, .hv4 .ex .txt, .hv4 .docs, .hv4 .closers p, .hv4 .three article, .hv4 .faq,
  .hv4 .final h2, .hv4 .final .txt, .hv4 .final .caps, .hv4 .final .end .btn { grid-column: 1 / -1; justify-self: start; }
  .hv4 .hero-meta { flex-direction: column; padding-bottom: 56px; }
  .hv4 .head > p { margin-top: 8px; }
  /* dores + steps: compact phone lists */
  .hv4 #dores, .hv4 #como-funciona { padding: 64px 0; }
  .hv4 #dores .head h2, .hv4 #como-funciona .head h2 { grid-column: 1 / -1; }
  .hv4 #dores .head > p, .hv4 #como-funciona .head > p { grid-column: 1 / -1; padding-left: 0; font-size: var(--fs-base); }
  .hv4 .dor summary { grid-template-columns: 24px minmax(0, 1fr) 32px; gap: 12px; padding: 14px 0; }
  .hv4 .ledger .n { grid-column: 1; font-size: 12px; }
  .hv4 .ledger .q { grid-column: 2; font-size: 19px; }
  .hv4 .dor .pm { grid-column: 3; }
  .hv4 .dor__body { grid-template-columns: minmax(0, 1fr); padding: 0 44px 20px 36px; font-size: var(--t-small); }
  .hv4 .dor__body .a, .hv4 .dor__body .fix, .hv4 .dor__body .fine { grid-column: 1 / -1; }
  .hv4 .dor__body .lbl { margin-bottom: 2px; }
  .hv4 .step { grid-column: 1 / -1; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--c-line); }
  .hv4 .step + .step { border-left: 0; padding-left: 0; }
  .hv4 .step .big { grid-row: 1 / span 3; font-size: 44px; margin: -.06em 0 0; }
  .hv4 .step .t, .hv4 .step .line, .hv4 .step .more { grid-column: 2; }
  .hv4 .step .t { margin-bottom: 6px; gap: 6px 10px; }
  .hv4 .step h3 { font-size: 20px; }
  .hv4 .step .line { font-size: var(--t-small); }
  .hv4 .step .d { margin-top: 10px; padding-top: 10px; }
  .hv4 .steps-bar { margin-top: 0; padding-top: 16px; border-top: 0; row-gap: 12px; }
  .hv4 .trust { grid-column: 1 / -1; flex-direction: column; gap: 8px; }
  .hv4 .steps-toggle { grid-column: 1 / -1; justify-self: start; padding: 0; }
  .hv4 #como-funciona .steps-foot { margin-top: 20px; }
  .hv4 .foot-row { row-gap: 20px; }
  .hv4 .foot-row .end { justify-self: start; }
  .hv4 .docs { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 28px; width: 100%; }
  .hv4 .docs .arrow { transform: rotate(90deg); margin: 6px auto; }
  .hv4 .doc { min-height: 0; }
  .hv4 .facts div { grid-template-columns: 110px 1fr; }
  .hv4 .cmp { min-width: 680px; }
  .hv4 .cmp-scroll { margin-right: calc(var(--margin) * -1); }
  .hv4 .closers { row-gap: 20px; }
  .hv4 .faq summary { font-size: 19px; }
  .hv4 .faq .ans { padding-right: 0; }
  .hv4 .final .end { gap: 28px; }
  .hv4 .final .caps { padding-top: 0; order: 2; }
  .hv4 .final .end .btn { width: 100%; white-space: normal; min-height: 56px; padding: 14px 18px; }
  .hv4 .scrollcue { display: none; }
}
@media (max-width: 899px) and (min-width: 600px) {
  .hv4 .closers p { grid-column: span 6; }
}
/* D-2: on phones the chip always sits on its own line under the step name, 8 px below it */
@media (max-width: 599px) {
  .hv4 .step .t { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .hv4 #pHero, .hv4 #pGlow, .hv4 #pRest { animation: none !important; stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .hv4 .dor .pm, .hv4 .steps-toggle .pm, .hv4 .ledger .n, .hv4 .ledger .q { transition: none; }
}
