/*
 * SambaTune — site público. Direção "o app na mão" (docs/design-history.md, revisão 3):
 * as telas reais do app são a peça principal; o celular do tour fica parado e a tela muda.
 */

:root {
  --ink: #0c0b09;
  --ink-2: #16140f;
  --paper: #f3eee4;
  --paper-2: #e9e2d4;
  --text-d: #f4efe6;      /* texto sobre escuro */
  --muted-d: #a79f90;
  --text-l: #17150f;      /* texto sobre claro */
  --muted-l: #5d574b;
  --gold: #e8b54b;
  --gold-ink: #7a5610;    /* dourado legível sobre o papel (AA) */
  --green: #3ddc84;
  --line-d: #2a2720;
  --line-l: #d8cfbd;
  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink); color: var(--text-d); font: 400 17px/1.55 var(--body); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- Cabeçalho ---------- */
.hd { position: absolute; inset: 0 0 auto; z-index: 10; }
.hd__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-d); }
.logo__mark { width: 30px; height: 20px; fill: var(--gold); }
.logo__word { font: 800 1.15rem/1 var(--display); font-stretch: 112%; letter-spacing: 0.12em; }
.logo__word b { color: var(--gold); font-weight: 800; }
.hd__nav { display: flex; align-items: center; gap: 26px; font-weight: 600; font-size: 0.95rem; }
.hd__nav a { text-decoration: none; color: var(--muted-d); }
.hd__nav a:hover { color: var(--text-d); }
.hd__nav .hd__cta { color: var(--ink); background: var(--gold); padding: 9px 16px; border-radius: 6px; }
.hd__nav .hd__cta:hover { color: var(--ink); background: #f2c465; }

/* ---------- Celular (moldura das telas reais) ---------- */
.phone {
  position: relative; margin: 0; padding: 40px 0 14px; border-radius: 46px; background: #0d0d0d; overflow: hidden;
  box-shadow: 0 0 0 9px #1f1d19, 0 0 0 10px #3a362e, 0 40px 80px -20px rgba(0, 0, 0, 0.55);
}
.phone::before {
  content: ''; position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 32%; height: 24px; border-radius: 20px; background: #000; z-index: 2;
}
.phone::after {
  content: '9:41'; position: absolute; top: 13px; left: 11%; font: 600 13px/20px var(--body); color: #f4efe6;
}
.phone img { width: 100%; }

/* ---------- Herói ---------- */
.hero { position: relative; overflow: hidden; padding: 120px 0 0; background: var(--ink); }
.hero__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: end; }
.hero__copy { padding-bottom: 120px; }
.hero__kicker { margin: 0 0 18px; color: var(--gold); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em; }
.hero h1 {
  font: 900 clamp(2.9rem, 6.4vw, 5.6rem)/0.92 var(--display); font-stretch: 72%;
  letter-spacing: -0.01em; text-transform: uppercase;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero__lead { max-width: 30rem; margin: 22px 0 30px; color: var(--muted-d); font-size: 1.12rem; }
.hero__act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.hero__fine { margin: 0; color: var(--muted-d); font-size: 0.9rem; }
.hero__stage { position: relative; display: flex; justify-content: center; align-self: stretch; align-items: flex-end; min-height: 560px; }
.hero__arc { position: absolute; left: 50%; bottom: 170px; width: 128%; transform: translateX(-50%); }
.hero__arc path { fill: none; stroke: var(--gold); stroke-width: 14; stroke-linecap: round; opacity: 0.9; }
.phone--hero { width: min(340px, 78vw); margin-bottom: -170px; }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--gold); color: var(--ink); font: 700 1rem/1 var(--body); padding: 16px 24px; border-radius: 6px;
}
.btn:hover { background: #f2c465; }
.btn:focus-visible, .hd__cta:focus-visible { outline: 3px solid var(--text-d); outline-offset: 3px; }

/* ---------- Tour ---------- */
.tour { background: var(--paper); color: var(--text-l); padding: 220px 0 80px; }
.tour__title {
  max-width: 14ch; font: 900 clamp(2.2rem, 4.6vw, 3.8rem)/0.95 var(--display); font-stretch: 75%; text-transform: uppercase;
}
.tour__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 40px; }
.tour__sticky { position: relative; }
.phone--tour { position: sticky; top: 9vh; width: min(340px, 100%); margin-left: auto; margin-right: 40px; }
.phone--tour img { position: absolute; top: 40px; left: 0; width: 100%; opacity: 0; transition: opacity 0.35s ease; }
.phone--tour img:first-child { position: relative; top: auto; }
.phone--tour img.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .phone--tour img { transition: none; } }
.tour__steps { list-style: none; margin: 0; padding: 0 0 18vh; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 20px 0; opacity: 0.35; transition: opacity 0.3s; }
.step.is-on { opacity: 1; }
.step__n { margin: 0 0 10px; font: 800 1rem/1 var(--display); font-stretch: 112%; letter-spacing: 0.14em; color: var(--gold-ink); }
.step h3 { font: 800 clamp(1.7rem, 3vw, 2.4rem)/1 var(--display); font-stretch: 85%; }
.step p { max-width: 26rem; color: var(--muted-l); margin: 12px 0 0; font-size: 1.08rem; }
.phone--inline { display: none; }
.profiles { margin-top: 22px; border-collapse: collapse; font-size: 0.92rem; max-width: 26rem; width: 100%; }
.profiles caption { text-align: left; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-l); padding-bottom: 6px; }
.profiles th, .profiles td { padding: 7px 0; border-top: 1px solid var(--line-l); text-align: left; font-weight: 500; }
.profiles td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted-l); }
.no-js .step { opacity: 1; }

/* ---------- Faixa, não nota ---------- */
.why { background: var(--ink); padding: 110px 0; }
.why__in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.why__big { margin: 0; font: 900 clamp(2.4rem, 5.4vw, 4.6rem)/0.95 var(--display); font-stretch: 70%; text-transform: uppercase; }
.why__big span { color: var(--gold); }
.why__proof { border-left: 3px solid var(--gold); padding-left: 28px; }
.why__range { margin: 0; font: 900 clamp(2.6rem, 5vw, 4rem)/1 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums; }
.why__label { margin: 4px 0 18px; color: var(--muted-d); }
.why__marks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 18px; padding: 0; font: 700 1.15rem/1 var(--display); font-stretch: 100%; color: var(--green); }
.why__marks li::before { content: '●'; font-size: 0.7em; margin-right: 6px; vertical-align: 2px; }
.why__verdict { margin: 0; color: var(--muted-d); max-width: 30rem; }
.why__verdict strong { color: var(--text-d); }

/* ---------- Acesso ---------- */
.access { background: var(--paper); color: var(--text-l); padding: 100px 0; }
.access h2 { font: 900 clamp(2rem, 4vw, 3rem)/1 var(--display); font-stretch: 75%; text-transform: uppercase; }
.access__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 40px 0 0; }
.access__list div { padding: 22px 24px 0 0; border-top: 2px solid var(--text-l); margin-right: 24px; }
.access__list dt { font: 900 2rem/1 var(--display); font-stretch: 80%; margin-bottom: 8px; }
.access__list dd { margin: 0; color: var(--muted-l); }

/* ---------- Lista de espera ---------- */
.join { background: var(--ink-2); padding: 100px 0 0; overflow: hidden; }
.join__in { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.phone--join { width: min(300px, 100%); margin: 0 auto -140px; }
.join__form { padding-bottom: 100px; }
.join__form h2 { font: 900 clamp(2rem, 4vw, 3.2rem)/0.98 var(--display); font-stretch: 75%; text-transform: uppercase; max-width: 16ch; }
.join__form > p { color: var(--muted-d); margin: 16px 0 26px; max-width: 32rem; }

.form { display: grid; gap: 16px; max-width: 560px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--muted-d); }
.field em { font-style: normal; font-weight: 400; }
.field input, .field select {
  font: 500 1rem var(--body); color: var(--text-d); background: #0c0b09; border: 1px solid #3a362e;
  border-radius: 6px; padding: 13px 12px; width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.field input[aria-invalid='true'] { border-color: #ff7a6b; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--muted-d); }
.check input { margin-top: 4px; accent-color: var(--gold); }
.check a { color: var(--gold); }
.error { color: #ff9b8f; font-size: 0.82rem; font-weight: 500; }
.hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; }
.form--done { background: rgba(61, 220, 132, 0.08); border: 1px solid rgba(61, 220, 132, 0.35); border-radius: 8px; padding: 16px; gap: 8px; }
.form--done p { margin: 0; }
.status { display: inline-block; justify-self: start; font-size: 0.8rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; margin: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.status--in { background: var(--green); color: #07140c; }
.status--warn { background: #f0b44c; color: #1c1405; }
.status--muted { background: #3a362e; color: var(--text-d); }

/* ---------- Páginas de texto (termos, privacidade, exclusão) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 130px 20px 80px; color: var(--muted-d); }
.doc--narrow { max-width: 560px; }
.doc h1 { font: 900 clamp(2.2rem, 5vw, 3.2rem)/1 var(--display); font-stretch: 75%; text-transform: uppercase; color: var(--text-d); margin-bottom: 22px; }
.doc h2 { font: 800 1.35rem/1.2 var(--display); font-stretch: 90%; color: var(--text-d); margin: 32px 0 8px; }
.doc h3 { font-size: 1.1rem; color: var(--text-d); margin: 6px 0; }
.doc strong { color: var(--text-d); }
.doc a { color: var(--gold); }
.doc .form { margin: 18px 0; }
.eyebrow { font-size: 0.85rem; color: var(--gold); margin: 0 0 8px; font-weight: 600; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 12px 0; }
.doc-table th, .doc-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-d); vertical-align: top; }
.doc-table th { color: var(--text-d); }
.btn--danger { background: #e5534b; color: #fff; }
.btn--danger:hover { background: #c9403a; }
.warn { color: #ff9b8f; font-weight: 600; }
.link { color: var(--gold); font-size: 0.92rem; }
.code { letter-spacing: 0.35em; font-size: 1.4rem !important; max-width: 13rem; font-variant-numeric: tabular-nums; }

/* ---------- Rodapé ---------- */
.ft { background: var(--ink); border-top: 1px solid var(--line-d); padding: 36px 0; font-size: 0.9rem; color: var(--muted-d); }
.ft__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.ft__brand { margin: 0; }
.ft__brand .logo__word { font-size: 1rem; color: var(--text-d); }
.ft__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ft__links a { color: var(--muted-d); }
.ft__links a:hover { color: var(--text-d); }
.ft__legal { margin: 0; width: 100%; font-size: 0.8rem; color: #6f685b; }

/* ---------- Celular e tablet ---------- */
@media (max-width: 900px) {
  .hd__nav a:not(.hd__cta) { display: none; }
  .hero { padding-top: 100px; }
  .hero__in { grid-template-columns: 1fr; gap: 12px; }
  .hero__copy { padding-bottom: 20px; }
  .hero__stage { min-height: 0; padding-top: 40px; }
  .hero__arc { bottom: 110px; width: 118%; }
  .phone--hero { width: min(300px, 76vw); margin-bottom: -150px; }
  .tour { padding: 200px 0 70px; }
  .tour__grid { grid-template-columns: 1fr; gap: 0; margin-top: 16px; }
  .tour__steps { padding-bottom: 0; }
  .tour__sticky { display: none; }
  .step { min-height: 0; opacity: 1; padding: 40px 0 16px; border-top: 1px solid var(--line-l); }
  .step:first-child { border-top: 0; }
  .phone--inline { display: block; width: min(280px, 74vw); margin: 28px auto 0; }
  .why { padding: 80px 0; }
  .why__in { grid-template-columns: 1fr; gap: 36px; }
  .access { padding: 70px 0; }
  .access__list { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .join { padding-top: 70px; }
  .join__in { grid-template-columns: 1fr; gap: 36px; }
  .join__form { order: -1; padding-bottom: 0; }
  .phone--join { width: min(240px, 64vw); margin-bottom: -120px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .access__list { grid-template-columns: 1fr; }
  .access__list div { margin-right: 0; }
  .form .btn { justify-self: stretch; }
}
