/* Let's Vibe: tokens carried over from vibethon.loop8.io */

:root {
  --bg:        #080811;
  --bg-alt:    #0F0F1E;
  --surface:   #141428;
  --surface-2: #1A1A30;
  --text:      #F0EFF8;
  --muted:     #9997B8;
  --dim:       #6B68A0;
  --accent:    #C084FC;
  --warm:      #FDBA74;
  --danger:    #FCA5A5;

  --line:   rgba(147, 51, 234, 0.10);
  --line-2: rgba(147, 51, 234, 0.20);
  --line-3: rgba(147, 51, 234, 0.40);

  --grad:   linear-gradient(135deg, #F97316 0%, #E05BA0 50%, #9333EA 100%);
  --grad-h: linear-gradient(90deg, #F97316 0%, #E05BA0 50%, #9333EA 100%);
  --glow:   0 2px 16px rgba(224, 91, 160, 0.28);
  --glow-h: 0 4px 24px rgba(224, 91, 160, 0.50);

  --sans: 'Nunito', system-ui, sans-serif;
  --head: 'Barlow', system-ui, sans-serif;
  --mono: 'Fira Code', ui-monospace, monospace;

  --col: 720px;
  --pad: 20px;
}

@media (min-width: 768px) { :root { --pad: 32px; } }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

h1, h2, h3 { font-family: var(--head); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
code { font-family: var(--mono); font-size: 0.92em; }
q { color: var(--text); font-style: italic; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: calc(var(--col) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 100; background: var(--surface); padding: 10px 16px; border-radius: 10px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border: 0; border-radius: 9999px;
  font-family: var(--head); font-weight: 700; font-size: 16px; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn--primary:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--glow-h); }
.btn--ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); }
.btn--ghost:hover { color: var(--text); border-color: var(--line-3); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.chip {
  padding: 5px 12px; border-radius: 9999px; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line-2);
  font-family: var(--head); font-weight: 700; font-size: 13px;
}
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.is-done { color: var(--warm); border-color: rgba(253, 186, 116, .4); }

/* ---------- header ---------- */

.top { border-bottom: 1px solid var(--line); background: rgba(8, 8, 17, .92); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.top__brand { display: flex; align-items: center; gap: 12px; }
.top__logo { height: 22px; width: auto; }
.top__divider { width: 1px; height: 18px; background: var(--line-2); }
.top__name { font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--muted); }
.top__help { font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; }
.top__help:hover { color: var(--text); }

/* ---------- hero + unlock ---------- */

.hero { padding: 56px 0 40px; }
@media (min-width: 768px) { .hero { padding: 88px 0 56px; } }

.hero__when { font-size: 15px; color: var(--dim); font-weight: 600; }

.hero__title {
  margin: 10px 0 18px;
  font-size: clamp(64px, 15vw, 128px);
  font-weight: 900; line-height: .92; letter-spacing: -0.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-bottom: .06em;
}

.hero__lede { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 34em; }

.unlock {
  margin-top: 36px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px;
}
.unlock__intro { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.unlock__fields { display: grid; gap: 14px; }
@media (min-width: 720px) {
  .unlock__fields { grid-template-columns: 1.4fr 1fr auto; align-items: end; }
}
.unlock__error { margin-top: 14px; color: var(--danger); font-weight: 600; font-size: 15px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--muted); }
.field__input {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px;
}
.field__input, .unlock__submit { height: 52px; }
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(192, 132, 252, .25); }

/* Returning visitors see the guide, with the form kept small above it. */
.is-unlocked .hero { padding-bottom: 24px; }
.is-unlocked .hero__title { font-size: clamp(48px, 10vw, 80px); }
.is-unlocked .hero__lede { display: none; }

/* ---------- build pass ---------- */

.pass {
  position: relative; margin: 8px 0 56px;
  background: var(--surface); border: 1px solid var(--line-3); border-radius: 22px;
  box-shadow: 0 24px 60px rgba(147, 51, 234, .18);
  animation: pass-in .45s cubic-bezier(.2, .8, .2, 1) both;
  scroll-margin-top: 84px;
}
@keyframes pass-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.pass__band {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 26px 24px 22px; border-radius: 21px 21px 0 0; background: var(--grad);
}
.pass__title { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.pass__event { font-family: var(--head); font-weight: 700; font-size: 14px; color: rgba(255, 255, 255, .85); white-space: nowrap; }

/* Tear line with notches, like a ticket stub. */
.pass__body { position: relative; padding: 24px; border-top: 2px dashed rgba(8, 8, 17, .55); }
.pass__body::before, .pass__body::after {
  content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-3);
}
.pass__body::before { left: -13px; clip-path: inset(0 0 0 50%); }
.pass__body::after { right: -13px; clip-path: inset(0 50% 0 0); }

.pass__note { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.pass__rows { margin: 0; }
.pass__row {
  display: grid; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.pass__row:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 600px) { .pass__row { grid-template-columns: 110px 1fr; align-items: center; } }
.pass__row dt { font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--muted); }
.pass__row dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pass__value { font-size: 20px; font-weight: 500; color: var(--text); letter-spacing: .02em; margin-right: auto; overflow-wrap: anywhere; }
.pass__value--key { font-size: 16px; }
@media (max-width: 599px) { .pass__value { flex-basis: 100%; margin-right: 0; } }

/* ---------- steps ---------- */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }

.step {
  position: relative; counter-increment: step;
  padding: 0 0 52px 64px;
}
.step::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--head); font-weight: 800; font-size: 19px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line-3);
}
.step::after {
  content: ""; position: absolute; left: 20px; top: 46px; bottom: 6px;
  width: 2px; background: var(--line-2);
}
.step:last-child::after { display: none; }

.step__title { font-size: clamp(26px, 4vw, 32px); font-weight: 800; letter-spacing: -0.015em; margin-bottom: 12px; }
.step__subtitle { font-size: 20px; font-weight: 700; margin: 32px 0 10px; }
.step__text { color: var(--muted); max-width: 36em; }
.step__aside { margin-top: 18px; font-size: 15px; color: var(--dim); }
.step__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }

.substeps { margin: 14px 0 0; padding-left: 1.3em; color: var(--muted); }
.substeps li { padding-left: 6px; margin-bottom: 10px; }
.substeps strong, .plain strong { color: var(--text); }
.substeps code, .plain code { color: var(--text); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

.plain { margin: 10px 0 0; padding-left: 1.2em; color: var(--muted); }
.plain li { margin-bottom: 6px; }
.plain--spaced li { margin-bottom: 14px; }

.idea {
  display: block; width: 100%; margin-top: 20px; padding: 18px;
  font-family: var(--mono); font-size: 14px; line-height: 1.65; color: var(--text);
  background: var(--bg-alt); border: 1px solid var(--line-2); border-radius: 14px;
  resize: vertical;
}
.idea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(192, 132, 252, .25); }

.status { font-size: 15px; color: var(--warm); font-weight: 600; }

.example { margin-top: 22px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.example summary { cursor: pointer; padding: 14px 18px; font-family: var(--head); font-weight: 700; color: var(--text); }
.example[open] summary { border-bottom: 1px solid var(--line); }
.example__text {
  margin: 0; padding: 18px; max-height: 340px; overflow: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.65; color: var(--muted); white-space: pre-wrap;
}
.example .btn { margin: 0 18px 18px; }

/* ---------- help + footer ---------- */

.help { margin: 8px 0 72px; padding: 24px; border-radius: 18px; background: var(--bg-alt); border: 1px solid var(--line); }
.help__title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.help__text { color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.foot__inner { display: flex; flex-direction: column; gap: 16px; }
.foot__logos { display: flex; align-items: center; gap: 16px; }
.foot__logos img { height: 22px; width: auto; }
.foot__logos img.foot__aws { height: 34px; }
.foot__with { font-family: var(--head); font-weight: 600; font-size: 13px; color: var(--dim); }
.foot__note { font-size: 14px; color: var(--dim); max-width: 40em; }
