/* =========================================================================
   Billions — Design digital e UX/UI (direção de arte própria)
   Conceito: "Interface em camadas."  Fluxo, estrutura, componentes e visual,
   mostrados como uma vista explodida em 3D (CSS) que o visitante separa e
   compara; o processo monta as mesmas camadas (prefixo dg-). Exemplo abstrato.
   ========================================================================= */

/* ---------- Hero: texto centrado e a vista explodida de uma interface ---------- */
.hero.sv-hero.dg-hero { padding: 148px 0 64px; text-align: center; overflow: hidden; }
.dg-hero-text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hero.sv-hero.dg-hero h1 { max-width: 15em; margin: 0 auto; font-size: clamp(34px, 4.8vw, 68px); line-height: 1.04; letter-spacing: -.034em; text-align: center; text-wrap: balance; }
.dg-mark { color: #fff; box-shadow: inset 0 -.1em 0 rgba(255,255,255,.55); }
.hero.sv-hero.dg-hero .sv-lede { max-width: 34em; margin: 22px auto 0; text-align: center; font-size: clamp(17px, 1.5vw, 21px); text-wrap: balance; }
.dg-hero .actions { justify-content: center; margin-top: 32px; }
.dg-lab-wrap { position: relative; z-index: 2; margin-top: 24px; }
.hero .dg-caption { max-width: 34em; margin: 8px auto 0; font-family: var(--font-text); font-size: 13px; line-height: 1.5; text-align: center; color: var(--c-on-dark-soft); }

/* vista explodida: quatro planos no mesmo tamanho, separados em profundidade */
.dg-stack { --gap: 62px; position: relative; width: min(560px, 86vw); aspect-ratio: 4 / 3; margin: 0 auto; perspective: 1800px; }
.dg-plane { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateY(8%) rotateX(58deg) rotateZ(-32deg); transition: transform .9s var(--ease-out); }
.dg-layer { position: absolute; inset: 0; border-radius: 22px; transform: translateZ(calc(var(--i) * var(--gap))); transition: transform .8s var(--ease-out), opacity .4s var(--ease); overflow: hidden; }
.dg-layer i, .dg-layer b { position: absolute; display: block; }
.dg-layer.is-off { opacity: 0; pointer-events: none; }
/* 0 · fluxo */
.dg-l0 { background: #101215; border: 1px solid rgba(255,255,255,.28); }
.dg-node { width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%; background: #101215; }
.dg-node.n1 { left: 12%; top: 22%; } .dg-node.n2 { left: 40%; top: 58%; } .dg-node.n3 { left: 64%; top: 30%; } .dg-node.n4 { left: 82%; top: 66%; background: #fff; }
.dg-path { height: 0; border-top: 2px dashed rgba(255,255,255,.45); transform-origin: left center; }
.dg-path.p1 { left: 17%; top: 31%; width: 29%; transform: rotate(52deg); } .dg-path.p2 { left: 45%; top: 64%; width: 28%; transform: rotate(-52deg); } .dg-path.p3 { left: 69%; top: 38%; width: 22%; transform: rotate(60deg); }
/* 1 · estrutura (wireframe) */
.dg-l1 { background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.45); }
.dg-wf { border: 1.5px dashed rgba(255,255,255,.5); border-radius: 8px; }
.wf-top { left: 6%; right: 6%; top: 7%; height: 9%; } .wf-hero { left: 6%; right: 6%; top: 22%; height: 36%; }
.wf-c1 { left: 6%; top: 64%; width: 26.5%; height: 28%; } .wf-c2 { left: 36.7%; top: 64%; width: 26.5%; height: 28%; } .wf-c3 { right: 6%; top: 64%; width: 26.5%; height: 28%; }
/* 2 · componentes */
.dg-l2 { background: rgba(40,42,48,.86); border: 1px solid rgba(255,255,255,.28); }
.dg-co { background: #e8e8ed; border-radius: 10px; }
.co-btn { left: 8%; top: 14%; width: 30%; height: 14%; border-radius: 99px; background: #fff; }
.co-input { left: 8%; top: 40%; width: 52%; height: 14%; background: transparent; border: 2px solid #e8e8ed; }
.co-card { right: 8%; top: 14%; width: 34%; height: 40%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); }
.co-chip { left: 8%; top: 70%; width: 18%; height: 11%; border-radius: 99px; } .co-chip.c2 { left: 29%; background: rgba(255,255,255,.3); }
/* 3 · interface (visual final) */
.dg-l3 { background: #fff; border: 1px solid rgba(0,0,0,.08); box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.ui-logo { left: 6%; top: 7%; width: 7%; aspect-ratio: 1; border-radius: 50%; background: #1d1d1f; }
.ui-nav { top: 10.5%; width: 8%; height: 2.4%; border-radius: 3px; background: #d2d2d7; } .ui-nav:nth-of-type(2) { right: 24%; } .ui-nav:nth-of-type(3) { right: 14%; } .ui-nav:nth-of-type(4) { right: 4%; }
.ui-h { left: 6%; top: 26%; font: 700 clamp(18px, 3.2vw, 34px)/1.05 var(--font-display); letter-spacing: -.03em; color: #1d1d1f; }
.ui-l { left: 6%; top: 52%; width: 34%; height: 2.6%; border-radius: 3px; background: #d2d2d7; } .ui-l.l2 { top: 58%; width: 22%; }
.ui-btn { left: 6%; top: 68%; width: 20%; height: 11%; border-radius: 99px; background: var(--c-mint-dark-bg); }
.ui-img { right: 6%; top: 24%; width: 36%; height: 56%; border-radius: 14px; background: linear-gradient(135deg, #1d1d1f, #6e6e73); }
/* controles */
.dg-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 40px; margin-top: 8px; }
.dg-explode { display: none; align-items: center; gap: 14px; font-size: 11px; font-weight: 590; letter-spacing: .08em; text-transform: uppercase; color: var(--c-on-dark-soft); }
.dg-lab-wrap.dg-ready .dg-explode { display: inline-flex; }
.dg-explode input { -webkit-appearance: none; appearance: none; width: 220px; height: 24px; background: none; cursor: pointer; }
.dg-explode input::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: rgba(255,255,255,.28); }
.dg-explode input::-moz-range-track { height: 2px; border-radius: 2px; background: rgba(255,255,255,.28); }
.dg-explode input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #000; }
.dg-explode input::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #000; }
.dg-explode input:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
.dg-layers { display: none; gap: 4px; padding: 4px; border: 1px solid var(--c-hairline-dark); border-radius: 99px; background: rgba(255,255,255,.04); }
.dg-lab-wrap.dg-ready .dg-layers { display: inline-flex; flex-wrap: wrap; justify-content: center; }
.dg-layers button { min-height: 40px; padding: 0 16px; border: 0; 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); }
.dg-layers button[aria-pressed="true"] { background: #fff; color: #000; }
.dg-layers button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Princípios: três demonstrações ---------- */
.section.dg-principles { background: #fff; color: var(--c-ink); }
.dg-principles h2, .dg-principles h3 { color: var(--c-ink); }
.dg-principles p, .dg-principles .kicker { color: var(--c-gray); }
.dg-head { max-width: 760px; margin-bottom: 88px; }
.dg-head p { margin-top: 16px; }
.dg-rows { display: grid; }
.dg-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; padding: 56px 0; border-top: 1px solid var(--c-hairline); }
.dg-row:last-child { border-bottom: 1px solid var(--c-hairline); }
.dg-row-copy { grid-column: 1 / span 4; }
.dg-row-copy h3 { font-size: clamp(28px, 3vw, 44px); line-height: 1.08; letter-spacing: -.025em; }
.dg-row-copy p { margin-top: 14px; max-width: 24em; }
.dg-tag { display: block; margin-bottom: 14px; font-size: 12px; font-weight: 590; letter-spacing: .06em; text-transform: uppercase; color: var(--c-gray); }
.dg-spec { grid-column: 6 / -1; }
.dg-row--flip .dg-row-copy { grid-column: 9 / -1; grid-row: 1; } .dg-row--flip .dg-spec { grid-column: 1 / span 7; grid-row: 1; }
/* 01 · jornada */
.dg-journey { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dg-j-node { padding: 14px 24px; border: 1px solid var(--c-ink); border-radius: 99px; font: 600 clamp(17px, 1.7vw, 22px)/1 var(--font-display); letter-spacing: -.01em; color: var(--c-ink); }
.dg-j-end { background: var(--c-ink); color: #fff; }
.dg-journey i { flex: 1; min-width: 24px; height: 1px; background: var(--c-ink); position: relative; }
.dg-journey i::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 1px solid var(--c-ink); border-right: 1px solid var(--c-ink); transform: rotate(45deg); }
.dg-journey small { flex-basis: 100%; margin-top: 10px; font-size: 13px; color: var(--c-gray); }
/* 02 · contraste */
.dg-contrast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; }
.dg-contrast li { display: grid; gap: 4px; }
.dg-sw { display: grid; place-items: center; height: 120px; border: 1px solid var(--c-hairline); border-radius: var(--radius-m); font: 600 44px/1 var(--font-display); letter-spacing: -.03em; }
.dg-contrast b { font: 600 22px/1.2 var(--font-display); letter-spacing: -.02em; color: var(--c-ink); }
.dg-contrast small { font-size: 12px; color: var(--c-gray); }
.dg-contrast .dg-contrast-note { grid-column: 1 / -1; margin-top: 6px; font-size: 13px; color: var(--c-gray); }
/* 03 · estados e tamanhos */
.dg-play-stage { display: grid; place-items: center; height: 200px; border: 1px solid var(--c-hairline); border-radius: var(--radius-l); background: var(--c-surface-alt); }
.dg-demo { --pad: 14px 28px; --fs: 16px; display: inline-block; padding: var(--pad); border-radius: 99px; background: var(--c-ink); color: #fff; font: 590 var(--fs)/1 var(--font-text); transition: background-color .25s var(--ease), transform .2s var(--ease-out), opacity .25s var(--ease), box-shadow .25s var(--ease), padding .3s var(--ease), font-size .3s var(--ease); }
.dg-play[data-size="sm"] .dg-demo { --pad: 10px 20px; --fs: 13px; } .dg-play[data-size="lg"] .dg-demo { --pad: 18px 38px; --fs: 20px; }
.dg-play[data-state="hover"] .dg-demo { background: #3a3a3c; }
.dg-play[data-state="focus"] .dg-demo { box-shadow: 0 0 0 3px var(--c-surface-alt), 0 0 0 5px var(--c-ink); }
.dg-play[data-state="pressed"] .dg-demo { background: #000; transform: scale(.96); }
.dg-play[data-state="disabled"] .dg-demo { opacity: .38; }
.dg-play-ctrl { display: grid; gap: 12px; margin-top: 16px; }
.dg-seg { display: inline-flex; flex-wrap: wrap; width: fit-content; gap: 4px; padding: 4px; border: 1px solid var(--c-hairline); border-radius: 99px; background: #fff; }
.dg-seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 99px; background: none; font: 590 13px/1 var(--font-text); color: var(--c-gray); cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease); }
.dg-seg button[aria-pressed="true"] { background: var(--c-ink); color: #fff; }
.dg-seg button:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.dg-play-note { margin-top: 14px; max-width: none; font-size: 13px; }

/* ---------- Processo: as mesmas camadas, montadas por etapa ---------- */
.section.dg-process { background: var(--c-surface-dark); }
.dg-process-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.dg-process-stick { grid-column: 1 / span 5; position: sticky; top: 100px; }
.dg-process-stick p { margin-top: 16px; }
.dg-mini { margin-top: 24px; }
.dg-stack--mini { --gap: 46px; width: min(380px, 100%); }
.dg-mini[data-step="1"] .dg-layer:nth-child(n+2), .dg-mini[data-step="2"] .dg-layer:nth-child(n+3), .dg-mini[data-step="3"] .dg-layer:nth-child(n+4) { opacity: 0; }
.dg-steps { grid-column: 7 / -1; list-style: none; }
.dg-step { display: grid; grid-template-columns: 72px 1fr; column-gap: 20px; align-content: center; min-height: 44vh; padding: 28px 0; border-top: 1px solid var(--c-hairline-dark); transition: opacity .5s var(--ease); }
.dg-step:last-child { border-bottom: 1px solid var(--c-hairline-dark); }
.dg-step-n { grid-row: 1 / span 3; font-family: var(--font-display); font-size: clamp(48px, 5vw, 72px); font-weight: 600; line-height: .9; letter-spacing: -.05em; color: rgba(255,255,255,.2); transition: color .5s var(--ease); }
.dg-step.is-on .dg-step-n { color: #fff; }
.dg-step-tag { margin-bottom: 10px; font-size: 12px; font-weight: 590; letter-spacing: .06em; text-transform: uppercase; }
.dg-step h3 { margin-bottom: 12px; font-size: clamp(26px, 3vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.dg-step p:not(.dg-step-tag) { max-width: 30em; }
body.has-motion .dg-step:not(.is-on) { opacity: .4; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 1024px) {
  .dg-row-copy { grid-column: 1 / span 5; } .dg-spec { grid-column: 6 / -1; }
  .dg-row--flip .dg-row-copy { grid-column: 8 / -1; } .dg-row--flip .dg-spec { grid-column: 1 / span 7; }
}
@media (max-width: 900px) {
  .hero.sv-hero.dg-hero { padding: 132px 0 48px; }
  .dg-row, .dg-row--flip { display: block; padding: 40px 0; } .dg-spec, .dg-row--flip .dg-spec { margin-top: 28px; }
  .dg-head { margin-bottom: 48px; }
  .dg-process-grid { display: block; } .dg-process-stick { position: static; margin-bottom: 40px; }
  .dg-mini { display: none; }
  .dg-step { min-height: 0; grid-template-columns: 56px 1fr; } body.has-motion .dg-step:not(.is-on) { opacity: 1; }
}
@media (max-width: 760px) {
  .hero.sv-hero.dg-hero h1 { font-size: clamp(30px, 9vw, 42px); line-height: 1.08; }
  .dg-stack { --gap: 38px; }
  .dg-explode input { width: 150px; }
  .dg-layers button { padding: 0 12px; }
  .dg-contrast { grid-template-columns: 1fr; } .dg-sw { height: 84px; }
}
