/* Gruds. Layout: coluna única alinhada à esquerda, 60% fundo neutro, 30% tinta, 10% azul de ação. */
:root {
  --ground: #F5F5F2;
  --surface: #FFFFFF;
  --ink: #15171C;
  --muted: #5B606B;
  --line: #E2E2DC;
  --accent: #2F4BFF;
  --on-accent: #FFFFFF;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #111318;
    --surface: #1A1D24;
    --ink: #F1F1EC;
    --muted: #A3A8B3;
    --line: #2B2F39;
    --accent: #93A2FF;
    --on-accent: #111318;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #111318;
  --surface: #1A1D24;
  --ink: #F1F1EC;
  --muted: #A3A8B3;
  --line: #2B2F39;
  --accent: #93A2FF;
  --on-accent: #111318;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Topo */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); padding: 8px 0; }
.nav a:hover { color: var(--ink); }

/* Abertura */
.hero { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 8px 32px; align-items: center; padding: 36px 0 64px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; min-width: 0; }
.hero h1 { font-size: clamp(42px, 7.2vw, 84px); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent); white-space: nowrap; }
.hero h1 em span { display: inline-block; animation: glue 1s cubic-bezier(.3,1.5,.5,1) backwards; animation-delay: calc(0.25s + var(--k) * 45ms); }
.lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 62ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 16px; text-decoration: none; border: 1.5px solid var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:hover { filter: brightness(0.94); }

/* Seções */
section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 62ch; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 800; }
.section-head p { color: var(--muted); }

/* Cartão do Notinha: usa as cores do próprio app, iguais nos dois temas */
.app { background: #173B33; color: #FFFFFF; border-radius: 28px; transform: perspective(1400px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform .3s ease, box-shadow .3s ease; padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px; align-items: center; }
.app-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.app-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.app-title svg { width: 60px; height: 60px; border-radius: 15px; flex: none; }
.app-title h3 { font-size: 34px; font-weight: 800; }
.pill { font-size: 13px; font-weight: 700; background: #F2B01E; color: #14302A; border-radius: 999px; padding: 5px 12px; }
.app-info > p { color: #D5E0DB; font-size: 18px; }
.app ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.app li { display: flex; gap: 12px; align-items: flex-start; }
.app li svg { width: 20px; height: 20px; flex: none; margin-top: 4px; color: #F2B01E; }
.app .note { font-size: 14px; color: #B9CBC4; }
.app-cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 20px; border-radius: 14px; background: #F2B01E; color: #14302A; font-weight: 800; text-decoration: none; transition: gap .2s ease; }
.app-cta:hover { gap: 16px; }
.app-cta svg { width: 20px; height: 20px; }
.app:hover { box-shadow: 0 30px 60px rgba(15,38,33,0.28); }

.receipt { background: #F4F5F1; color: #14302A; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.receipt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; font-weight: 700; color: #5A6862; }
.rows { background: #FFFFFF; border: 1px solid #E1E5DD; border-radius: 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; }
.row + .row { border-top: 1px solid #ECEFE9; }
.row b { display: block; font-size: 15px; }
.row small { font-size: 12px; color: #5A6862; }
.price { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; white-space: nowrap; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; }
.delta svg { width: 11px; height: 11px; flex: none; }
.delta.up { color: #B4321F; background: #FBEAE5; }
.delta.down { color: #1A6498; background: #E6F0F8; }
.receipt figcaption, .caption { font-size: 12px; color: #5A6862; }
figure { margin: 0; }
.after-app { margin-top: 20px; color: var(--muted); font-size: 15px; }

/* Princípios */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 8px; transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform .25s ease, border-color .25s ease; }
.principle:hover { border-color: var(--accent); }
.glyph { width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: var(--ground); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.glyph svg { width: 24px; height: 24px; }
.principle h3 { font-size: 21px; font-weight: 700; }
.principle p { color: var(--muted); font-size: 16px; }

/* Contato e rodapé */
.contact { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
button.btn { font-family: inherit; background: transparent; color: inherit; cursor: pointer; }
.mail { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 5vw, 40px); letter-spacing: -0.02em; overflow-wrap: anywhere; }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot a { font-weight: 600; }

/* Página de texto (política) */
.doc { max-width: 720px; padding: 32px 0 64px; display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: clamp(32px, 6vw, 48px); font-weight: 800; }
.doc h2 { font-size: 23px; font-weight: 700; margin-top: 22px; }
.doc ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc .meta { color: var(--muted); font-size: 15px; }
.draft { border: 1.5px dashed var(--accent); border-radius: 14px; padding: 14px 16px; font-size: 15px; background: var(--surface); }
mark { background: transparent; color: var(--accent); font-weight: 700; }

/* Cena 3D da abertura: peças que grudam umas nas outras */
.stage { position: relative; height: 500px; perspective: 1500px; perspective-origin: 50% 45%; min-width: 0; }
.stage::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--line) 1.5px, transparent 1.6px); background-size: 20px 20px; -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 0%, transparent 78%); mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 0%, transparent 78%); pointer-events: none; }
.scale { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: scale(var(--s, 1)); transform-style: preserve-3d; }
.rig { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: rotateX(var(--rx, 14deg)) rotateY(var(--ry, -24deg)); will-change: transform; }
.cluster-shadow { position: absolute; left: -190px; top: -150px; width: 400px; height: 380px; border-radius: 50%; background: rgba(21,23,28,0.28); filter: blur(46px); transform: translateZ(-170px) translate(40px, 70px); }
.tile { position: absolute; left: -85px; top: -85px; width: 170px; height: 170px; transform-style: preserve-3d; transform: translate3d(var(--x), var(--y), var(--z)) rotateZ(var(--r)); transition: transform 1.1s cubic-bezier(.3,1.5,.5,1); transition-delay: calc(var(--i) * 90ms); }
.stage.apart .tile { transition: none; transform: translate3d(calc(var(--x) * 2.4), calc(var(--y) * 2.4), calc(var(--z) * 3 - 120px)) rotateZ(calc(var(--r) * 5)); }
.stage.loose .tile { transition-duration: .6s; transform: translate3d(calc(var(--x) * 1.28), calc(var(--y) * 1.28), calc(var(--z) * 1.7)) rotateZ(calc(var(--r) * 2)); }
.tile .slice, .tile .face { position: absolute; inset: 0; border-radius: 42px; }
.tile .slice { background: var(--c); background: color-mix(in srgb, var(--c) 70%, #000); }
.tile .face { background: var(--c); color: var(--f, #FFFFFF); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.14); }
.tile .face svg { width: 54%; height: 54%; }
.t-empty { --c: var(--surface); }
.t-empty .face { box-shadow: inset 0 0 0 2px var(--line); }
.t-empty .face::after { content: ''; position: absolute; inset: 26px; border: 2.5px dashed var(--line); border-radius: 24px; }
.t-ink { --c: var(--ink); --f: var(--ground); }
.t-accent { --c: var(--accent); }
.t-notinha { --c: #173B33; }
.t-notinha .face svg { width: 100%; height: 100%; border-radius: 42px; }

/* Linhas do exemplo entram em sequência quando o cartão aparece */
.rise.in .row { animation: rowin .6s cubic-bezier(.2,.9,.2,1) backwards; animation-delay: calc(0.25s + var(--i) * 0.12s); }
.rise.in .delta { animation: pop .45s cubic-bezier(.3,1.6,.5,1) backwards; animation-delay: calc(0.6s + var(--i, 0) * 0.12s); }
.rise.in { animation: rise .7s cubic-bezier(.2,.9,.2,1) backwards; animation-delay: calc(var(--d, 0) * 90ms); }

@keyframes glue { from { transform: translateX(calc((var(--k) - (var(--n) - 1) / 2) * 0.1em)) translateY(calc((var(--k) - (var(--n) - 1) / 2) * (var(--k) - (var(--n) - 1) / 2) * -0.03em)) rotate(calc((var(--k) - (var(--n) - 1) / 2) * 3deg)); opacity: 0.4; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0.25; } }
@keyframes rowin { from { transform: translateX(22px); opacity: 0.2; } }
@keyframes pop { from { transform: scale(0.4); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
