:root {
  --bg: #F2ECE2;
  --surface: #FBF8F2;
  --surface-alt: #EBE1D3;
  --text: #241E30;
  --text-muted: #5C5468;
  --border: #DCD1BF;
  --amber: #B9711A;
  --amber-ink: #FFFFFF;
  --amber-soft: #F0DAAE;
  --rose: #8C3F5B;
  --rose-ink: #FFFFFF;
  --rose-soft: #EBD2DB;
  --hero-1: #211A30;
  --hero-2: #37243F;
  --hero-text: #F4EEE3;
  --hero-text-muted: #C9BEDA;
  --shadow: 0 1px 2px rgba(33, 26, 48, 0.06);
  --ok: #4A7A5C;
  --ok-soft: #DCEADF;
  --danger: #A14432;
  --danger-soft: #F3DAD3;

  --font-display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-accent: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171220;
    --surface: #211A2E;
    --surface-alt: #292036;
    --text: #F1EAE0;
    --text-muted: #B6ABC4;
    --border: #392F49;
    --amber: #E7A83F;
    --amber-ink: #201503;
    --amber-soft: #453116;
    --rose: #E191AC;
    --rose-ink: #2C0E19;
    --rose-soft: #3B2130;
    --hero-1: #120E1A;
    --hero-2: #241A32;
    --hero-text: #F4EEE3;
    --hero-text-muted: #B7AAC8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --ok: #7FBB92;
    --ok-soft: #223526;
    --danger: #E08268;
    --danger-soft: #3C2419;
  }
}

:root[data-theme="dark"] {
  --bg: #171220;
  --surface: #211A2E;
  --surface-alt: #292036;
  --text: #F1EAE0;
  --text-muted: #B6ABC4;
  --border: #392F49;
  --amber: #E7A83F;
  --amber-ink: #201503;
  --amber-soft: #453116;
  --rose: #E191AC;
  --rose-ink: #2C0E19;
  --rose-soft: #3B2130;
  --hero-1: #120E1A;
  --hero-2: #241A32;
  --hero-text: #F4EEE3;
  --hero-text-muted: #B7AAC8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --ok: #7FBB92;
  --ok-soft: #223526;
  --danger: #E08268;
  --danger-soft: #3C2419;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { width: 100%; }

h1, h2, h3 { text-wrap: balance; margin: 0; }

em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

a { color: inherit; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.wrap-narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- NAV ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
  max-width: 1080px;
  margin: 0 auto;
}
.nav-mark {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.nav-mark span { color: var(--rose); }
.nav-links {
  display: none;
  gap: 1.5rem;
}
@media (min-width: 640px) { .nav-links { display: flex; } }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--rose); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: radial-gradient(ellipse 120% 90% at 50% -10%, var(--hero-2), var(--hero-1) 65%);
  color: var(--hero-text);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(circle, rgba(231, 168, 63, 0.22), transparent 60%);
  animation: sweep 14s ease-in-out infinite alternate;
}
@keyframes sweep {
  from { transform: translateX(-18%); }
  to { transform: translateX(18%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-eyebrow { color: var(--amber); margin-bottom: 1rem; }
.hero h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.05;
  max-width: 16ch;
  margin: 0 auto;
}
.hero-sub {
  max-width: 46ch;
  margin: 1.4rem auto 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--hero-text-muted);
  line-height: 1.55;
}

/* Compact page header (used on /cadastro, /grade, /admin) */
.page-head {
  position: relative;
  background: radial-gradient(ellipse 120% 100% at 50% -20%, var(--hero-2), var(--hero-1) 70%);
  color: var(--hero-text);
  padding: clamp(2.4rem, 6vw, 3.6rem) 0;
  text-align: center;
}
.page-head h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  max-width: 20ch;
  margin: 0.6rem auto 0;
}
.page-head p {
  color: var(--hero-text-muted);
  max-width: 50ch;
  margin: 0.9rem auto 0;
  line-height: 1.55;
  font-size: 1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  position: relative;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.btn-amber { background: var(--amber); color: var(--amber-ink); }
.btn-rose { background: var(--rose); color: var(--rose-ink); }
.btn-ghost { background: transparent; border-color: rgba(244, 238, 227, 0.35); color: var(--hero-text); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.82rem; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-stub { border-left: 2px dashed rgba(0,0,0,0.18); padding-left: 0.9rem; margin-left: 0.2rem; }

/* ---------- LANES ---------- */
.lanes { padding: clamp(3rem, 7vw, 5rem) 0; }
.lanes-head { text-align: center; max-width: 42ch; margin: 0 auto clamp(2rem, 5vw, 3rem); }
.lanes-head .eyebrow { color: var(--text-muted); }
.lanes-head h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin-top: 0.6rem;
}

.lane-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 800px) { .lane-grid { grid-template-columns: 1fr 1fr; gap: 0; } }

.lane {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
@media (min-width: 800px) {
  .lane-a { border-radius: 6px 0 0 6px; border-right: none; }
  .lane-b { border-radius: 0 6px 6px 0; }
}
@media (max-width: 799px) { .lane { border-radius: 6px; } }
.lane-a { border-top: 4px solid var(--amber); }
.lane-b { border-top: 4px solid var(--rose); }

.lane-kicker { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.lane-a .lane-kicker { color: var(--amber); }
.lane-b .lane-kicker { color: var(--rose); }

.lane h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  line-height: 1.15;
}
.lane p.dek { color: var(--text-muted); line-height: 1.6; font-size: 0.98rem; }
.lane ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.lane li { display: flex; gap: 0.6rem; font-size: 0.92rem; line-height: 1.5; color: var(--text); }
.lane li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: 0.5em; flex-shrink: 0; }
.lane-a li::before { background: var(--amber); }
.lane-b li::before { background: var(--rose); }
.lane .btn { align-self: flex-start; margin-top: 0.4rem; }

/* ---------- HOW IT WORKS ---------- */
.how { background: var(--surface-alt); padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.how-head { text-align: center; max-width: 40ch; margin: 0 auto clamp(2.2rem, 5vw, 3rem); }
.how-head .eyebrow { color: var(--text-muted); }
.how-head h2 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: 0.6rem; }

.track-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; max-width: 900px; margin: 0 auto; }
@media (min-width: 720px) { .track-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 3rem; } }

.track-label { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.1em; margin-bottom: 1rem; display: block; }
.track-a .track-label { color: var(--amber); }
.track-b .track-label { color: var(--rose); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.1rem 1fr; gap: 0.9rem; padding-bottom: 1.1rem; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 1.05rem; top: 2.1rem; bottom: 0; width: 1px; background: var(--border); }
.steps li::before {
  content: counter(step);
  font-family: var(--font-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0; z-index: 1;
}
.track-a .steps li::before { background: var(--amber-soft); color: var(--amber); }
.track-b .steps li::before { background: var(--rose-soft); color: var(--rose); }
.steps li p { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.steps li strong { font-size: 1rem; }

.converge {
  max-width: 900px; margin: 0.5rem auto 0;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 8px;
  padding: 1.4rem 1.8rem; text-align: center;
  font-family: var(--font-accent); font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}
.converge span { font-family: var(--font-body); font-style: normal; font-weight: 700; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; display: block; margin-bottom: 0.5rem; }

/* ---------- GENERIC SECTION HEAD ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 46ch; margin: 0 auto clamp(1.5rem, 4vw, 2.2rem); }
.section-head .eyebrow { color: var(--text-muted); }
.section-head h2 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: 0.6rem; }
.section-head p { color: var(--text-muted); line-height: 1.6; font-size: 0.98rem; margin: 0.9rem auto 0; }

.mini-steps { list-style: none; margin: 1.8rem auto 0; padding: 0; max-width: 520px; display: flex; flex-direction: column; gap: 1rem; counter-reset: mini; }
.mini-steps li { counter-increment: mini; display: flex; gap: 0.9rem; align-items: flex-start; }
.mini-steps li::before {
  content: counter(mini);
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--rose-soft); color: var(--rose);
  font-weight: 700; font-size: 0.82rem; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mini-steps strong { display: block; font-size: 0.96rem; }
.mini-steps p { margin: 0.15rem 0 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* ---------- CREDIBILITY ---------- */
.cred { padding: clamp(3rem, 7vw, 5rem) 0; }
.cred-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; max-width: 900px; margin: 0 auto; }
@media (min-width: 700px) { .cred-inner { grid-template-columns: auto 1fr; gap: 3rem; } }
.cred-stat { font-family: var(--font-display); font-size: clamp(3.2rem, 9vw, 4.6rem); line-height: 0.9; color: var(--rose); text-align: center; }
.cred-stat small { display: block; font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-top: 0.5rem; }
.cred-text p { font-size: 1.02rem; line-height: 1.65; color: var(--text); margin: 0 0 0.9rem; }
.cred-text p:last-child { margin-bottom: 0; }

/* ---------- FINAL CTA ---------- */
.final {
  background: radial-gradient(ellipse 120% 100% at 50% 110%, var(--hero-2), var(--hero-1) 60%);
  color: var(--hero-text);
  padding: clamp(3rem, 7vw, 5rem) 0;
  text-align: center;
}
.final h2 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 2.4rem); max-width: 20ch; margin: 0 auto; }
.final p { color: var(--hero-text-muted); max-width: 42ch; margin: 0.9rem auto 0; line-height: 1.55; }

/* ---------- FOOTER ---------- */
footer { background: var(--hero-1); color: var(--hero-text-muted); padding: 2.2rem 0; font-size: 0.85rem; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.foot-links { display: flex; gap: 1.4rem; }
.foot-links a { text-decoration: none; color: var(--hero-text); font-weight: 600; }
.foot-links a:hover { color: var(--amber); }
.foot-brand { color: var(--hero-text); font-weight: 700; }

/* ================= FORM (cadastro) ================= */
.form-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.3rem; }
.field:last-of-type { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.field .hint { display: block; font-size: 0.8rem; color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; margin-top: 0.3rem; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="url"],
.field input[type="file"],
.field textarea,
.field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
.field-row { display: grid; grid-template-columns: 1fr; gap: 1.3rem; }
@media (min-width: 560px) { .field-row.two { grid-template-columns: 1fr 1fr; } }

.form-error {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.3rem;
}
.form-actions { margin-top: 1.6rem; text-align: right; }
.form-actions .btn { width: 100%; justify-content: center; }
@media (min-width: 560px) { .form-actions .btn { width: auto; } }

.thanks-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.75rem, 5vw, 2.5rem);
  box-shadow: var(--shadow);
}
.thanks-card h1 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.5rem; }
.thanks-card p { color: var(--text-muted); line-height: 1.6; margin: 1rem 0 0; }

/* ================= GRADE (home teaser, right after hero) ================= */
.grade-feature {
  position: relative;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: clamp(2.6rem, 7vw, 4rem) 0 clamp(3.2rem, 7vw, 4.5rem);
}
.grade-feature .section-head { max-width: 54ch; }
.grade-feature .section-head h2 {
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
}
.grade-feature .grid-cards {
  margin-top: 0.5rem;
}
.grade-feature .band-card {
  box-shadow: 0 4px 16px rgba(33, 26, 48, 0.09);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grade-feature .band-card { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }
}
:root[data-theme="dark"] .grade-feature .band-card { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }

/* ================= GRADE (public gallery) ================= */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.band-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.band-photo {
  aspect-ratio: 4 / 3;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.band-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.band-photo .placeholder {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.band-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.band-body h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.05rem; line-height: 1.2; }
.band-tag { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rose); }
.band-city { font-size: 0.86rem; color: var(--text-muted); }
.band-body .btn { margin-top: 0.6rem; align-self: flex-start; }

.empty-state {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 3.5rem) 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.empty-state strong { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; margin-bottom: 0.6rem; }
.empty-state p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; margin: 0 0 1.2rem; }

/* ================= ADMIN ================= */
.admin-bar {
  background: var(--hero-1);
  color: var(--hero-text);
  padding: 0.9rem 0;
}
.admin-bar .wrap { display: flex; align-items: center; justify-content: space-between; }
.admin-bar form { margin: 0; }
.admin-bar a, .admin-bar button {
  color: var(--hero-text-muted);
  font-size: 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.admin-bar a:hover, .admin-bar button:hover { color: var(--amber); }

.admin-main { padding: clamp(2rem, 5vw, 3rem) 0 4rem; }
.admin-group { margin-bottom: 2.5rem; }
.admin-group h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.count-pill {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--text-muted);
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.admin-card-info { flex: 1; min-width: 220px; }
.admin-card-info h3 { font-size: 1rem; margin: 0 0 0.3rem; }
.admin-card-info dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem; font-size: 0.85rem; color: var(--text-muted); }
.admin-card-info dt { font-weight: 700; }
.admin-card-info dd { margin: 0; }
.admin-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-card-actions form { margin: 0; }

.status-badge { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.55rem; border-radius: 99px; }
.status-pendente { background: var(--amber-soft); color: var(--amber); }
.status-aprovado { background: var(--ok-soft); color: var(--ok); }
.status-recusado { background: var(--danger-soft); color: var(--danger); }

.login-card {
  max-width: 380px;
  margin: 3rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow);
}
.login-card h1 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.2rem; text-align: center; }
