/* BurnerPeople.com — playa dust palette, Oswald display over Barlow text. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: #ece2cf;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: #7a4a22; text-decoration: none; }
a:hover { color: #b06a2b; }
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 2px solid #b4551f; outline-offset: 3px; }

img { display: block; max-width: 100%; }

/* Author rules like the one above outrank the UA sheet's [hidden],
   so state the attribute's meaning explicitly. */
[hidden] { display: none !important; }

@keyframes dustRise {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.page {
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 78% 8%, rgba(255,246,226,.9) 0%, rgba(236,226,207,0) 60%),
    linear-gradient(180deg, #efe6d3 0%, #e6dac3 55%, #ded0b6 100%);
  font-family: Barlow, system-ui, sans-serif;
  color: #3b2d1e;
  padding: 0 0 64px;
}

/* ── masthead ─────────────────────────────────────────────────────────── */

.masthead {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark { display: flex; align-items: baseline; gap: 10px; }

.wordmark-name {
  font-family: Oswald, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #3b2d1e;
}

.wordmark-tld {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #6d5836;
}

.locale {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6d5836;
}

.locale-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b4551f;
  box-shadow: 0 0 0 4px rgba(180,85,31,.16);
}

/* ── layout ───────────────────────────────────────────────────────────── */

.grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 28px 0;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.col-copy { /* children animate individually — see the motion section */ }

.col-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  animation: dustRise .9s ease-out both;
}

.state[hidden] { display: none; }

/* ── copy ─────────────────────────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 22px;
  font-family: Oswald, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: #a4713a;
}

.display {
  margin: 0;
  font-family: Oswald, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: -.005em;
  font-size: clamp(46px, 7vw, 90px);
  color: #332618;
  text-wrap: balance;
}

#state-done .display { line-height: .9; font-size: clamp(46px, 7vw, 92px); }

.lede {
  margin: 26px 0 0;
  max-width: 46ch;
  font-size: clamp(17px, 1.4vw, 19.6px);
  line-height: 1.55;
  color: #5c4a34;
  text-wrap: pretty;
}

.lede p { margin: 0 0 1.05em; }
.lede p:last-child { margin-bottom: 0; }

.lede-done {
  margin: 24px 0 0;
  max-width: 44ch;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: #5c4a34;
  text-wrap: pretty;
}

/* ── form ─────────────────────────────────────────────────────────────── */

.signup { margin: 38px 0 0; max-width: 560px; }

.fields { display: grid; gap: 14px; }
.field  { display: grid; gap: 8px; }

.field-label {
  font-family: Oswald, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #6d5836;
}

.field input {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #c8b795;
  border-radius: 2px;
  background: rgba(255,252,244,.72);
  font-family: Barlow, sans-serif;
  font-size: 17px;
  color: #3b2d1e;
  transition: border-color .18s, background .18s;
}

.field input::placeholder { color: #9c8a6c; }

.field input:focus {
  outline: none;
  border-color: #b4551f;
  background: #fffdf6;
  box-shadow: 0 6px 18px -14px rgba(90,40,10,.55);
}

.field:focus-within .field-label { color: #b4551f; }
.field-label { transition: color .2s ease; }

.field input[aria-invalid="true"] { border-color: #a8341c; }

.form-error {
  margin: 16px 0 0;
  padding: 11px 14px;
  border: 1px solid #c0704f;
  border-left: 3px solid #a8341c;
  border-radius: 2px;
  background: rgba(255,241,232,.8);
  font-size: 14.5px;
  line-height: 1.45;
  color: #7d3218;
}

.form-error[hidden] { display: none; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.actions-done { gap: 14px 24px; margin-top: 52px; }

.actions-note {
  font-size: 13.5px;
  line-height: 1.4;
  color: #6d5836;
  max-width: 24ch;
}

.actions-done .actions-note { max-width: 26ch; }

.btn-primary {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 18px 34px;
  min-height: 56px;
  border-radius: 2px;
  background: #b4551f;
  color: #fff6e6;
  font-family: Oswald, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .2em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px -14px rgba(90,40,10,.7);
  transition: background .18s, transform .18s;
}

.btn-primary:hover:not(:disabled) { background: #963f13; transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: .62; cursor: progress; transform: none; }

.btn-ghost {
  appearance: none;
  cursor: pointer;
  padding: 16px 28px;
  min-height: 52px;
  border-radius: 2px;
  border: 1px solid #b4551f;
  background: transparent;
  color: #933f13;
  font-family: Oswald, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: background .18s, color .18s;
}

.btn-ghost:hover { background: #b4551f; color: #fff6e6; }

/* ── confirmation ─────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 9px 16px 9px 13px;
  border: 1px solid #8c9450;
  background: rgba(246,248,232,.7);
  border-radius: 2px;
  font-family: Oswald, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #4f5626;
  max-width: 100%;
}

.badge > span:last-child { overflow-wrap: anywhere; }

.badge-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6d7a3a;
}

.ticket {
  position: relative;
  margin: 36px 0 0;
  max-width: 560px;
  padding: 26px 28px;
  border: 1px dashed #b78e5a;
  background: rgba(255,250,238,.78);
  border-radius: 2px;
}

.ticket-rows { display: grid; gap: 18px; }
.ticket-row  { display: grid; gap: 6px; }

.ticket-key {
  font-family: Oswald, sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #6d5836;
}

.ticket-burner {
  font-family: Oswald, sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 3vw, 34px);
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1;
  color: #332618;
  word-break: break-word;
}

.ticket-email {
  font-size: 17px;
  line-height: 1.3;
  color: #4a3b28;
  word-break: break-all;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding-top: 4px;
  border-top: 1px solid rgba(150,120,80,.3);
  font-family: Oswald, sans-serif;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #6d5836;
}

.stamp {
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 158px;
  height: 158px;
  transform: rotate(-12deg);
  opacity: .85;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero-frame { position: relative; width: min(520px, 100%); aspect-ratio: 1; }

.hero-glow {
  position: absolute;
  inset: -6% -6% -10%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(180,85,31,.16) 0%, rgba(180,85,31,0) 62%);
}

.hero-glow picture { display: block; width: 100%; height: 100%; }

.hero-glow img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 40px 70px -40px rgba(70,45,20,.65);
}

/* ── footer ───────────────────────────────────────────────────────────── */

.footer { max-width: 1240px; margin: 0 auto; padding: 72px 28px 0; }

.footer-rule {
  height: 1px;
  background: linear-gradient(90deg,
    rgba(150,120,80,0) 0%,
    rgba(150,120,80,.45) 20%,
    rgba(150,120,80,.45) 80%,
    rgba(150,120,80,0) 100%);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  padding-top: 22px;
  font-size: 13px;
  color: #6d5836;
}

.footer-mark {
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: Oswald, sans-serif;
  font-size: 11.5px;
}

/* ── motion ───────────────────────────────────────────────────────────── */
/* Everything here is decorative. The reduced-motion block at the bottom
   flattens all of it, so nothing below may be load-bearing for layout or
   for making content visible. */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(13px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes settleOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-12px) scale(.985); }
}

/* An ink stamp coming down on paper: overshoot the rotation, then settle. */
@keyframes stampPress {
  0%   { opacity: 0;   transform: rotate(-30deg) scale(1.8); }
  55%  { opacity: .95; transform: rotate(-8deg)  scale(.93); }
  78%  { opacity: .88; transform: rotate(-14deg) scale(1.04); }
  100% { opacity: .85; transform: rotate(-12deg) scale(1); }
}

/* Heat coming off the playa. Slow enough that you never catch it moving. */
@keyframes heatDrift {
  0%, 100% { transform: translateY(0)    scale(1); }
  50%      { transform: translateY(-9px) scale(1.006); }
}

@keyframes glowBreathe {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.05); }
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(180,85,31,.16); }
  50%      { box-shadow: 0 0 0 8px rgba(180,85,31,.04); }
}

@keyframes errorIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- entrance cascade ---------------------------------------------------
   Going from display:none to displayed restarts CSS animations, so simply
   un-hiding a state replays its cascade. That is what makes the confirmation
   animate on arrival and again after "Add another burner", with no JS. */

#state-form > .eyebrow,
#state-form > .display,
#state-form > .lede,
#state-form .fields,
#state-form .actions,
#state-done > .badge,
#state-done > .display,
#state-done > .lede-done,
#state-done > .ticket,
#state-done > .actions-done {
  animation: riseIn .62s cubic-bezier(.22, .68, .28, 1) both;
}

#state-form > .eyebrow  { animation-delay: .02s; }
#state-form > .display  { animation-delay: .10s; }
#state-form > .lede     { animation-delay: .19s; }
#state-form .fields     { animation-delay: .28s; }
#state-form .actions    { animation-delay: .36s; }

#state-done > .badge       { animation-delay: .02s; }
#state-done > .display     { animation-delay: .09s; }
#state-done > .lede-done   { animation-delay: .17s; }
#state-done > .ticket      { animation-delay: .26s; }
#state-done > .actions-done{ animation-delay: .40s; }

/* The stamp lands after the ticket it is stamping has arrived. */
#state-done > .ticket .stamp {
  animation: stampPress .52s cubic-bezier(.3, 1.4, .5, 1) .58s both;
}

/* Leaving state, driven by app.js adding .is-leaving before the swap. */
.state.is-leaving {
  animation: settleOut .26s ease-in both;
  pointer-events: none;
}

#state-form.is-leaving > *,
#state-done.is-leaving > * { animation: none; }

.form-error:not([hidden]) { animation: errorIn .3s ease-out both; }

/* --- ambient ------------------------------------------------------------ */

/* Delayed past the entrance so the two never fight over transform. */
.hero-frame { animation: heatDrift 14s ease-in-out 1.4s infinite; }

.hero-frame::before {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(180,85,31,.14) 0%, rgba(180,85,31,0) 66%);
  opacity: .78;
  animation: glowBreathe 11s ease-in-out infinite;
  pointer-events: none;
}

.locale-dot { animation: dotPulse 3.4s ease-in-out infinite; }
.badge-dot  { animation: dotPulse 3.4s ease-in-out .4s infinite; }

/* --- interaction -------------------------------------------------------- */

.btn-primary,
.btn-ghost { transition: background .18s, color .18s, transform .18s, box-shadow .18s; }

.btn-primary:hover:not(:disabled) { box-shadow: 0 16px 30px -16px rgba(90,40,10,.85); }
.btn-ghost:hover                  { box-shadow: 0 12px 24px -16px rgba(90,40,10,.7); }

/* Underline sweeps out from the left rather than snapping on. */
.footer-row a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size .32s cubic-bezier(.22, .68, .28, 1), color .18s;
  padding-bottom: 1px;
}

.footer-row a:hover,
.footer-row a:focus-visible { background-size: 100% 1px; }

/* The queue number ticks up; a fixed width stops the card from twitching. */
#ticket-queue { font-variant-numeric: tabular-nums; }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 34px;
  }
  /* Portrait first on a phone, copy underneath. */
  .col-hero { order: -1; }
  .hero-frame { width: min(360px, 78%); }
  .stamp { right: -10px; bottom: -26px; width: 128px; height: 128px; }
}

@media (max-width: 560px) {
  .masthead { padding-top: 20px; }
  .locale { font-size: 10.5px; letter-spacing: .14em; }
  .grid, .footer, .masthead { padding-left: 20px; padding-right: 20px; }
  .actions-note { max-width: none; }
  .btn-primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Shown only if the hero sources fail to load. */
.hero-fallback {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 40px 70px -40px rgba(70,45,20,.65);
}

.hero-fallback[hidden] { display: none; }
