/* =========================================================================
   Billions — Aplicativos e produtos digitais (direção de arte própria)
   Conceito: "Do fluxo ao produto."  Um aplicativo é um fluxo que se testa antes
   de ser construído. Hero com um protótipo navegável feito em CSS/JS, camadas do
   produto e um grafo de etapas com ciclo (prefixo ap-). Exemplo abstrato, sem
   cases de clientes.
   ========================================================================= */

/* ---------- Hero: texto à esquerda e um protótipo navegável ---------- */
.hero.sv-hero.ap-hero { padding: 148px 0 96px; text-align: left; }
.ap-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.hero.sv-hero.ap-hero h1 { max-width: 12.5em; margin: 0; font-size: clamp(34px, 4.5vw, 62px); line-height: 1.05; letter-spacing: -.032em; text-align: left; text-wrap: balance; }
.ap-mark { color: #fff; box-shadow: inset 0 -.1em 0 rgba(255,255,255,.55); }
.hero.sv-hero.ap-hero .sv-lede { max-width: 30em; margin: 22px 0 0; text-align: left; font-size: clamp(17px, 1.5vw, 21px); text-wrap: pretty; }
.ap-hero .actions { justify-content: flex-start; margin-top: 32px; }

.ap-proto { display: grid; justify-items: center; }
.ap-phone { position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 18.5; padding: 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 46px; background: #0b0b0d; box-shadow: 0 40px 100px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.04); }
.ap-notch { position: absolute; z-index: 3; left: 50%; top: 18px; width: 84px; height: 22px; transform: translateX(-50%); border-radius: 99px; background: #000; }
.ap-screens { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 37px; background: #fff; }
.ap-screen { position: absolute; inset: 0; display: grid; align-content: center; justify-items: start; gap: 12px; padding: 62px 24px 28px; background: #fff; color: #1d1d1f; transition: transform .5s var(--ease-out), opacity .4s var(--ease); }
.ap-screen h3 { font-size: 26px; line-height: 1.08; letter-spacing: -.03em; color: #1d1d1f; }
.ap-screen p { font-size: 14px; line-height: 1.4; color: #6e6e73; max-width: none; }
.ap-screens[data-screen="1"] .ap-s2, .ap-screens[data-screen="1"] .ap-s3, .ap-screens[data-screen="2"] .ap-s3 { transform: translateX(100%); }
.ap-screens[data-screen="2"] .ap-s1, .ap-screens[data-screen="3"] .ap-s1 { transform: translateX(-28%); opacity: 0; }
.ap-screens[data-screen="3"] .ap-s2 { transform: translateX(-28%); }
.ap-logo { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 16px; background: #1d1d1f; font: 700 24px/1 var(--font-display); color: #fff; }
.ap-btn { margin-top: 14px; padding: 13px 24px; border: 0; border-radius: 99px; background: var(--c-mint-dark-bg); font: 590 14px/1 var(--font-text); color: #000; cursor: pointer; transition: background-color .25s var(--ease), transform .2s var(--ease-out); }
.ap-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--c-mint-dark-bg) 82%, #fff); }
.ap-btn:active:not(:disabled) { transform: scale(.97); }
.ap-btn:disabled { opacity: .7; cursor: default; }
.ap-s2 { align-content: start; gap: 18px; }
.ap-s2 header { display: grid; gap: 2px; margin-top: 4px; }
.ap-s2 header b { font: 700 28px/1.05 var(--font-display); letter-spacing: -.03em; }
.ap-s2 header small { font-size: 12px; color: #6e6e73; }
.ap-list { display: grid; gap: 8px; width: 100%; list-style: none; }
.ap-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 14px; border: 1px solid #e5e5ea; border-radius: 16px; background: #fff; text-align: left; font: 590 14px/1.2 var(--font-text); color: #1d1d1f; cursor: pointer; transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.ap-row:hover:not(:disabled) { background: #f5f5f7; }
.ap-row:disabled { cursor: default; }
.ap-row i { width: 20px; height: 20px; border: 1.5px solid #c7c7cc; border-radius: 50%; position: relative; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.ap-row em { font-style: normal; font-size: 18px; color: #c7c7cc; }
.ap-row.is-done span { color: #8e8e93; text-decoration: line-through; }
.ap-row.is-done i { background: var(--c-mint-dark-bg); border-color: var(--c-mint-dark-bg); }
.ap-row.is-done i::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 9px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ap-s3 { align-content: start; gap: 10px; }
.ap-back { margin: 4px 0 18px -6px; padding: 8px 6px; border: 0; background: none; font: 590 14px/1 var(--font-text); color: #0071e3; cursor: pointer; }
.ap-back:disabled { cursor: default; }
.ap-meta { margin-bottom: 8px; font-size: 12px; }
.ap-l { display: block; width: 100%; height: 8px; border-radius: 4px; background: #e5e5ea; } .ap-l2 { width: 62%; }
.ap-screens button:focus-visible { outline: 2px solid #0071e3; outline-offset: 3px; }
.ap-flow { display: flex; align-items: center; gap: 0; margin-top: 28px; list-style: none; }
.ap-flow li { display: flex; align-items: center; }
.ap-flow li + li::before { content: ""; width: 36px; height: 1px; margin: 0 10px; background: var(--c-hairline-dark); }
.ap-flow button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 8px; border: 1px solid var(--c-hairline-dark); border-radius: 99px; background: none; font: 590 13px/1 var(--font-text); color: var(--c-on-dark-soft); cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.ap-flow button b { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; }
.ap-flow button[aria-current="step"] { border-color: #fff; background: #fff; color: #000; }
.ap-flow button:hover:not(:disabled) { color: #fff; }
.ap-flow button[aria-current="step"]:hover { color: #000; }
.ap-flow button:disabled { cursor: default; }
.ap-flow button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero .ap-note { max-width: 22em; margin: 14px 0 0; font-family: var(--font-text); font-size: 12px; line-height: 1.45; text-align: center; color: var(--c-on-dark-soft); }

/* ---------- Produto antes da tela: camadas ---------- */
.section.ap-product { background: #fff; color: var(--c-ink); }
.ap-product h2, .ap-product h3 { color: var(--c-ink); }
.ap-product p, .ap-product .kicker { color: var(--c-gray); }
.ap-product-head { max-width: 760px; margin-bottom: 80px; }
.ap-product-head p { margin-top: 16px; }
.ap-product-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
.ap-layers { grid-column: 1 / span 6; display: grid; justify-items: center; gap: 10px; }
.ap-layer { display: grid; align-content: center; justify-items: start; gap: 4px; height: 96px; padding: 0 28px; border: 1px solid var(--c-hairline); border-radius: 22px; background: #fff; text-align: left; color: var(--c-ink); cursor: pointer; transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease); }
.ap-layer span { font: 600 clamp(22px, 2.2vw, 30px)/1 var(--font-display); letter-spacing: -.025em; }
.ap-layer small { font-size: 13px; color: var(--c-gray); transition: color .4s var(--ease); }
.ap-layer--1 { width: 64%; } .ap-layer--2 { width: 82%; } .ap-layer--3 { width: 100%; }
.ap-layer[aria-pressed="true"] { border-color: var(--c-ink); background: var(--c-ink); color: #fff; }
.ap-layer[aria-pressed="true"] small { color: rgba(255,255,255,.7); }
.ap-layer:hover { border-color: var(--c-ink); }
.ap-layer:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }
.ap-items { grid-column: 8 / -1; list-style: none; }
.ap-item { padding: 28px 0; border-top: 1px solid var(--c-hairline); transition: opacity .4s var(--ease); }
.ap-item:last-child { border-bottom: 1px solid var(--c-hairline); }
.ap-tag { display: block; margin-bottom: 12px; font-size: 12px; font-weight: 590; letter-spacing: .06em; text-transform: uppercase; color: var(--c-gray); }
.ap-item h3 { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -.02em; margin-bottom: 10px; }
.ap-item p { max-width: 26em; }
.sv-js .ap-item:not(.is-on) { opacity: .38; }

/* ---------- Caminho do produto: grafo de etapas com ciclo ---------- */
.section.ap-process { background: var(--c-surface-dark); }
.ap-process-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.ap-process-head { grid-column: 1 / span 5; position: sticky; top: 120px; }
.ap-process-head p { margin-top: 16px; }
.ap-graph { grid-column: 7 / -1; position: relative; list-style: none; padding-left: 60px; }
.ap-node { position: relative; padding-bottom: 72px; }
.ap-node:last-child { padding-bottom: 0; }
.ap-node::before { content: ""; position: absolute; left: -48px; top: 30px; bottom: 6px; width: 1px; background: var(--c-hairline-dark); }
.ap-node::after { content: ""; position: absolute; left: -48px; top: 30px; bottom: 6px; width: 1px; background: #fff; transform-origin: top; transform: scaleY(0); transition: transform 1s var(--ease-out) .2s; }
.ap-node.is-in::after { transform: scaleY(1); }
.ap-node:last-child::before, .ap-node:last-child::after { display: none; }
.ap-node:nth-last-child(2)::after { transform: scaleY(1); }
.ap-dot { position: absolute; left: -60px; top: 4px; display: grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid var(--c-hairline-dark); border-radius: 50%; background: #000; font-size: 13px; color: #000; transition: border-color .5s var(--ease), background-color .5s var(--ease); }
.ap-node.is-in .ap-dot { border-color: #fff; background: #fff; }
.ap-dot--loop { border-style: dashed; color: var(--c-on-dark-soft); }
.ap-node--loop.is-in .ap-dot--loop { background: #000; color: #fff; border-style: solid; }
.ap-node-tag { margin-bottom: 10px; font-size: 12px; font-weight: 590; letter-spacing: .06em; text-transform: uppercase; }
.ap-node h3 { margin-bottom: 10px; font-size: clamp(26px, 3vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.ap-node p:not(.ap-node-tag) { max-width: 28em; }
html:not(.sv-js) .ap-node::after { transform: scaleY(1); } html:not(.sv-js) .ap-dot { border-color: #fff; background: #fff; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 1024px) {
  .ap-product-grid { grid-template-columns: 1fr; row-gap: 40px; } .ap-layers, .ap-items { grid-column: 1; }
  .ap-process-head { grid-column: 1 / span 5; } .ap-graph { grid-column: 6 / -1; }
}
@media (max-width: 900px) {
  .hero.sv-hero.ap-hero { padding: 132px 0 64px; }
  .ap-hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .ap-process-grid { display: block; } .ap-process-head { position: static; margin-bottom: 48px; }
  .ap-product-head { margin-bottom: 48px; }
}
@media (max-width: 760px) {
  .hero.sv-hero.ap-hero h1 { font-size: clamp(30px, 9vw, 42px); line-height: 1.08; }
  .ap-layer { height: 84px; padding: 0 20px; }
  .ap-graph { padding-left: 52px; } .ap-dot { left: -52px; } .ap-node::before, .ap-node::after { left: -40px; }
}

@media (max-width: 760px) {
  .ap-flow { max-width: 100%; }
  .ap-flow li + li::before { width: 12px; margin: 0 5px; }
  .ap-flow button { gap: 6px; padding: 0 10px 0 6px; font-size: 12px; }
}
