/* ============================================================
   eKarts · Landing de pacotes de festa
   Tema: pista de corrida (dark + neon), verde=aberta, vermelho=fechada
   ============================================================ */

:root {
  --bg:        #08080c;
  --bg-2:      #0d0d13;
  --surface:   #14141c;
  --surface-2: #1b1b26;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.16);

  --text:      #f4f4f7;
  --muted:     #a2a2b0;
  --faint:     #8b8b98;

  --brand:     #ff2b2b;   /* vermelho eKarts */
  --brand-ink: #ff5a4d;
  --electric:  #12e0ff;   /* azul neon */
  --gold:      #ffce3a;   /* amarelo (destaques da tabela) */
  --aberta:    #2ee66b;   /* verde casa aberta */
  --fechada:   #ff3b3b;   /* vermelho casa fechada */

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 18px 50px rgba(0,0,0,.55);
  --maxw:      1120px;

  --font-display: 'Anton', 'Barlow Semi Condensed', system-ui, sans-serif;
  --font-cond:    'Barlow Semi Condensed', system-ui, sans-serif;
  --font-body:    'Barlow', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* garante que o atributo [hidden] vença regras de display (flex/grid) */
[hidden] { display: none !important; }

/* foco visível de teclado (WCAG 2.4.7) — todos os controles custom */
:focus-visible { outline: 2px solid var(--electric); outline-offset: 2px; border-radius: 6px; }
.chip:focus-visible, .toggle__opt:focus-visible, .btn:focus-visible,
.tier:focus-visible, .topbar__cta:focus-visible, .brand:focus-visible,
a:focus-visible { outline: 2px solid var(--electric); outline-offset: 3px; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255,43,43,.10), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(18,224,255,.08), transparent 55%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle carbon / checker texture overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.015) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.015) 75%),
    linear-gradient(45deg, rgba(255,255,255,.015) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.015) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  pointer-events: none; z-index: 0; opacity: .5;
}

section, header, main, footer, .selbar { position: relative; z-index: 1; }

h1,h2,h3 { line-height: 1.05; letter-spacing: .5px; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }

/* ---------------- TOP BAR ---------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px clamp(16px, 4vw, 40px);
  max-width: var(--maxw); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 30px; letter-spacing: 1px; }
.brand__bolt { color: var(--gold); filter: drop-shadow(0 0 8px rgba(255,206,58,.6)); }
.brand__name { color: var(--brand); text-shadow: 0 0 16px rgba(255,43,43,.45); }
.brand__flag { font-size: 20px; }
.topbar__cta {
  font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text);
  transition: .2s; white-space: nowrap;
}
.topbar__cta:hover { border-color: var(--electric); color: var(--electric); box-shadow: 0 0 20px rgba(18,224,255,.25); }

/* ---------------- STEPPER ---------------- */
.stepper { max-width: var(--maxw); margin: 8px auto 0; padding: 0 clamp(16px,4vw,40px); }
.stepper ol { display: flex; gap: 10px; list-style: none; flex-wrap: wrap; }
.stepper__item {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-cond); font-weight: 600; font-size: 14px;
  color: var(--faint); padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  text-transform: uppercase; letter-spacing: .5px;
}
.stepper__item span {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800;
}
.stepper__item.is-current { color: var(--text); border-color: var(--brand); }
.stepper__item.is-current span { background: var(--brand); color: #fff; }
.stepper__item.is-done { color: var(--aberta); border-color: rgba(46,230,107,.35); }
.stepper__item.is-done span { background: rgba(46,230,107,.18); color: var(--aberta); }

/* ---------------- HERO ---------------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(36px,7vw,84px) clamp(16px,4vw,40px) clamp(20px,4vw,48px); overflow: hidden; }
.hero__speedlines {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    repeating-linear-gradient(115deg, transparent 0 60px, rgba(18,224,255,.05) 60px 61px),
    repeating-linear-gradient(115deg, transparent 0 140px, rgba(255,43,43,.05) 140px 141px);
  mask-image: linear-gradient(to bottom, #000, transparent);
}
.hero__eyebrow {
  display: inline-block; font-family: var(--font-cond); font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px; font-size: 14px;
  color: var(--electric); padding: 6px 14px; border: 1px solid rgba(18,224,255,.3);
  border-radius: 999px; background: rgba(18,224,255,.06); margin-bottom: 22px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 84px);
  text-transform: uppercase; letter-spacing: 1px; line-height: .96;
  max-width: 15ch;
}
.hero__title .hl { color: var(--brand); text-shadow: 0 0 28px rgba(255,43,43,.5); }
.hero__sub { color: var(--muted); font-size: clamp(16px,2.2vw,20px); max-width: 56ch; margin-top: 22px; }
.hero__sub strong { color: var(--text); }
.hero__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.hero__note { color: var(--faint); font-size: 13px; }

/* ---------------- BUTTONS ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-cond); font-weight: 700; font-size: 16px; letter-spacing: .5px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: .2s transform, .2s box-shadow, .2s background; text-transform: uppercase;
}
.btn--primary { background: linear-gradient(135deg, var(--brand), #ff6a3d); color: #fff; box-shadow: 0 10px 30px rgba(255,43,43,.35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(255,43,43,.5); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--electric); color: var(--electric); }
.btn--back { font-size: 13px; padding: 9px 16px; margin-bottom: 18px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------------- SECTION HEAD ---------------- */
.section-head { text-align: center; max-width: 720px; margin: clamp(40px,7vw,80px) auto clamp(24px,4vw,40px); padding: 0 clamp(16px,4vw,40px); }
.section-head--left { text-align: left; margin-left: 0; }
.section-head__kicker { font-family: var(--font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; color: var(--gold); }
.section-head__kicker em { color: var(--brand); }
.section-head__title { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(30px,5vw,52px); margin-top: 10px; }
.section-head__desc { color: var(--muted); margin-top: 14px; font-size: 17px; }

/* ---------------- CONFIG CONTROLS ---------------- */
.config { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px,4vw,40px) 20px; }
.control { margin-bottom: 34px; }
.control__label, .control__label--tiers { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.control__num {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  font-family: var(--font-display); color: var(--electric); font-size: 18px;
}
.control__label h3 { font-family: var(--font-cond); font-size: 22px; text-transform: uppercase; letter-spacing: .5px; }
.control__label p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.control__hint { margin-top: 12px; font-size: 14px; color: var(--gold); display: flex; gap: 8px; align-items: center;
  background: rgba(255,206,58,.08); border: 1px solid rgba(255,206,58,.25); padding: 10px 14px; border-radius: 10px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--font-cond); font-weight: 700; font-size: 17px; letter-spacing: .5px;
  padding: 12px 22px; border-radius: 12px; cursor: pointer; transition: .18s;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--muted);
}
.chip:hover { border-color: var(--electric); color: var(--text); }
.chip[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(255,43,43,.35); }

/* toggle */
.toggle { display: inline-flex; gap: 6px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); }
.toggle__opt {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--font-cond); font-weight: 700; font-size: 16px; letter-spacing: .5px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); transition: .18s;
}
.toggle__opt:hover { color: var(--text); }
.toggle__opt--aberta.is-active  { background: rgba(46,230,107,.14); color: var(--aberta); border-color: rgba(46,230,107,.4); }
.toggle__opt--fechada.is-active { background: rgba(255,59,59,.14); color: var(--fechada); border-color: rgba(255,59,59,.4); }
.toggle__opt:disabled { opacity: .35; cursor: not-allowed; }

.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot--aberta  { background: var(--aberta);  box-shadow: 0 0 10px rgba(46,230,107,.7); }
.dot--fechada { background: var(--fechada); box-shadow: 0 0 10px rgba(255,59,59,.7); }
.txt-fechada { color: var(--fechada); }

/* ---------------- TIER CARDS ---------------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tier {
  display: flex; flex-direction: column; text-align: left;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-2); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: .22s; position: relative;
}
.tier:hover:not(.tier--off) { border-color: var(--electric); transform: translateY(-3px); box-shadow: var(--shadow); }
.tier.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(255,43,43,.5), var(--shadow); }
.tier--off { opacity: .55; cursor: not-allowed; }

.tier__badge {
  position: absolute; top: 14px; right: -30px; transform: rotate(38deg);
  background: var(--gold); color: #1a1400; font-family: var(--font-cond); font-weight: 700;
  font-size: 11px; letter-spacing: 1px; padding: 4px 40px; text-transform: uppercase;
}
.tier__head { padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.tier__name { font-family: var(--font-display); text-transform: uppercase; font-size: 26px; letter-spacing: .5px; }
.tier__tag { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tier__sched { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 5px; }
.tier__sched li { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.tier__sched li::before { content: "▹"; color: var(--electric); }
.tier__meta { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.tier__meta span { font-family: var(--font-cond); font-size: 13px; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; }

.tier__price { padding: 20px 22px 8px; }
.tier__price-type { font-family: var(--font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; }
.tier__price-type.aberta  { color: var(--aberta); }
.tier__price-type.fechada { color: var(--fechada); }
.tier__price-value { font-family: var(--font-display); font-size: 46px; line-height: 1; margin-top: 6px; }
.tier__price-value small { font-size: 20px; color: var(--muted); margin-right: 4px; }
.tier__price-bonus { margin-top: 8px; font-size: 13px; color: var(--gold); font-weight: 600; }
.tier__unavailable { padding: 20px 22px; }
.tier__unavailable > strong { display: block; font-family: var(--font-cond); text-transform: uppercase; color: var(--faint); font-size: 15px; }
.tier__unavailable span { color: var(--muted); font-size: 13.5px; }

.tier__toggle { margin: auto 22px 0; padding: 12px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--electric); font-family: var(--font-cond); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; }
.tier__chev { transition: .25s; }
.tier.is-open .tier__chev { transform: rotate(180deg); }

/* colapsado: visibility:hidden tira o botão interno da ordem de tabulação/AT */
.tier__details { max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s ease, visibility .3s; }
.tier.is-open .tier__details { max-height: 620px; visibility: visible; }
.tier__details-inner { padding: 4px 22px 22px; }
.tier__details h4 { font-family: var(--font-cond); text-transform: uppercase; font-size: 13px; letter-spacing: 1px; color: var(--muted); margin: 12px 0 8px; }
.tier__list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.tier__list li { font-size: 14px; display: flex; gap: 9px; align-items: flex-start; color: var(--text); }
.tier__list li .ic { flex: none; }
.tier__select { width: 100%; margin-top: 18px; }

/* ---------------- INCLUÍDO ---------------- */
.included { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px,4vw,40px); }
.included__grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 26px; }
.included__grid--tight { grid-template-columns: repeat(2,1fr); }
.included__grid li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; padding: 4px 0; }
.included__grid li .ic { flex: none; font-size: 20px; line-height: 1.4; }
.included__fechada {
  margin-top: 34px; padding: 26px clamp(18px,3vw,32px); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,59,59,.08), rgba(255,59,59,.02));
  border: 1px solid rgba(255,59,59,.28);
}
.included__fechada h3 { font-family: var(--font-cond); text-transform: uppercase; font-size: 20px; letter-spacing: .5px; margin-bottom: 16px; }

/* ---------------- FINE PRINT ---------------- */
.fineprint { max-width: var(--maxw); margin: clamp(40px,6vw,70px) auto 40px; padding: 0 clamp(16px,4vw,40px); }
.fineprint h3 { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 1px; font-size: 18px; color: var(--muted); margin-bottom: 14px; }
.fineprint ul { list-style: none; display: grid; grid-template-columns: repeat(2,1fr); gap: 10px 30px; }
.fineprint li { font-size: 13.5px; color: var(--faint); display: flex; gap: 9px; align-items: flex-start; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.fineprint li::before { content: "•"; color: var(--brand); }

/* ---------------- STICKY SELECTION BAR ---------------- */
.selbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto 14px; width: calc(100% - 32px);
  padding: 14px 20px; border-radius: 16px;
  background: rgba(20,20,28,.86); backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
  transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.9,.3,1);
}
.selbar.is-visible { transform: translateY(0); }
.selbar__info { display: flex; flex-direction: column; }
.selbar__label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--faint); font-weight: 700; }
.selbar__value { font-family: var(--font-cond); font-weight: 600; font-size: 16px; color: var(--text); }
.selbar__price { margin-left: auto; text-align: right; }
.selbar__price-value { font-family: var(--font-display); font-size: 30px; }
.selbar #selbar-continue { flex: none; }

/* ---------------- CHECKOUT (V2 STEPS) ---------------- */
.checkout { max-width: var(--maxw); margin: 20px auto 60px; padding: 0 clamp(16px,4vw,40px); display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
.checkout__title { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(28px,4vw,44px); margin-bottom: 18px; }
.placeholder {
  border: 2px dashed var(--line-2); border-radius: var(--radius); padding: clamp(28px,5vw,54px);
  text-align: center; background: rgba(255,255,255,.02);
}
.placeholder__badge { display: inline-block; font-family: var(--font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; color: var(--gold); border: 1px solid rgba(255,206,58,.35); background: rgba(255,206,58,.08); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.placeholder__lead { font-family: var(--font-cond); font-size: 22px; color: var(--text); }
.placeholder__note { color: var(--muted); font-size: 15px; margin: 12px auto 24px; max-width: 46ch; }

.checkout__summary { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; position: sticky; top: 20px; }
.summary__title { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 1px; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.summary__row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.summary__row span:first-child { color: var(--muted); }
.summary__row span:last-child { font-weight: 600; text-align: right; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.summary__total .lbl { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-size: 14px; }
.summary__total .val { font-family: var(--font-display); font-size: 38px; }
.summary__tag { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 3px 10px; border-radius: 999px; }
.summary__tag.aberta  { color: var(--aberta);  background: rgba(46,230,107,.14); }
.summary__tag.fechada { color: var(--fechada); background: rgba(255,59,59,.14); }

/* ---------------- STEP VISIBILITY ---------------- */
.step { display: none; }
.step--active { display: block; }
.step:not([hidden]).step--active { display: block; }

/* ---------------- FOOTER ---------------- */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 30px clamp(16px,4vw,40px) 120px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.footer strong { color: var(--text); }
.footer__fine { font-size: 12px; color: var(--faint); margin-top: 6px; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 860px) {
  .tiers { grid-template-columns: 1fr; }
  .tier.is-open .tier__details { max-height: 720px; }
  .checkout { grid-template-columns: 1fr; }
  .checkout__summary { position: static; order: -1; }
  .included__grid, .fineprint ul { grid-template-columns: 1fr; }
  .selbar { flex-wrap: wrap; }
  .selbar__price { margin-left: 0; }
  .selbar #selbar-continue { width: 100%; }
  /* reserva espaço para a selbar empilhada (~180px) não cobrir o rodapé/condições */
  .footer { padding-bottom: 210px; }
}
@media (max-width: 480px) {
  .hero__title { font-size: clamp(30px, 9vw, 42px); }
  .toggle { width: 100%; }
  .toggle__opt { flex: 1; justify-content: center; }
  /* topbar não estoura em ~360px */
  .brand { font-size: 24px; }
  .topbar__cta { padding: 8px 12px; font-size: 13px; }
  .tier__badge { font-size: 10px; padding: 4px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
