/* =========================================================
   The Perfect Burn — theperfectburn.com
   Palette: a dark room lit by one candle.
   ========================================================= */

:root{
  --ink:        #12100F;
  --room:       #1B1613;
  --surface:    #241C18;
  --surface-2:  #2E2420;
  --line:       #3A2E27;
  --wax:        #F4E7D3;
  --wax-dim:    #C4AE96;
  --wick:       #8A705C;
  --flame:      #FF9B33;
  --flame-hot:  #FFD98C;
  --ember:      #C7541F;

  --display: "Fraunces", Georgia, serif;
  --body: "Karla", system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 56px);
  --r: 16px;
  --r-lg: 26px;

  --glow: 0.55; /* dimmed by JS when the candle goes out */
}

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

html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  background:var(--ink);
  color:var(--wax);
  font-family:var(--body);
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* The room: a warm pool of light that dims when the candle is blown out */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  background:
    radial-gradient(60% 45% at 50% 22%, rgba(255,150,55,.16), transparent 70%),
    radial-gradient(90% 70% at 50% 0%, rgba(255,120,40,.07), transparent 75%);
  opacity:var(--glow);
  transition:opacity 1.4s ease;
}
body.room-dark{ --glow: 0.10; }

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

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

a{ color:var(--flame-hot); text-decoration:none; }
a:hover{ text-decoration:underline; }

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

.wrap{ width:100%; max-width:var(--wrap); margin-inline:auto; padding-inline:var(--pad); }

/* ---------- Type ---------- */

h1,h2,h3{
  font-family:var(--display);
  font-variation-settings:"SOFT" 60,"WONK" 1,"opsz" 40;
  font-weight:600;
  line-height:1.08;
  letter-spacing:-.015em;
  margin:0;
}

.eyebrow{
  font-family:var(--body);
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--wick);
  margin:0 0 14px;
}

.section-head{ max-width:640px; margin-bottom:clamp(32px,5vw,56px); }
.section-head h2{ font-size:clamp(2rem,4.4vw,3.1rem); }
.section-head p{ color:var(--wax-dim); margin:16px 0 0; font-size:1.05rem; }

section{ padding-block:clamp(64px,9vw,120px); }
section[id]{ scroll-margin-top:86px; }

/* ---------- Header ---------- */

.site-header{
  position:sticky; top:0; z-index:60;
  background:rgba(18,16,15,.82);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(58,46,39,.7);
}
.site-header .wrap{
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; min-height:70px;
}
.brand{ display:flex; align-items:center; gap:12px; color:var(--wax); text-decoration:none; }
.brand:hover{ text-decoration:none; }
.brand img{ width:38px; height:38px; object-fit:contain; }
.brand span{
  font-family:var(--display);
  font-variation-settings:"SOFT" 70,"WONK" 1,"opsz" 20;
  font-size:1.12rem; font-weight:600; letter-spacing:-.01em;
}
.nav{ display:flex; align-items:center; gap:clamp(14px,2.4vw,30px); }
.nav a{
  color:var(--wax-dim); font-size:.9rem; font-weight:600;
  letter-spacing:.02em; text-decoration:none;
}
.nav a:hover{ color:var(--wax); text-decoration:none; }
.nav .btn-sm{
  background:var(--flame); color:#211208; padding:9px 18px;
  border-radius:999px; font-weight:700; font-size:.86rem;
}
.nav .btn-sm:hover{ background:var(--flame-hot); }
@media (max-width:640px){
  .nav a:not(.btn-sm){ display:none; }
}

/* ---------- Hero ---------- */

.hero{
  padding-top:clamp(40px,6vw,72px);
  padding-bottom:clamp(48px,7vw,90px);
}
.hero-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:clamp(28px,5vw,64px);
  align-items:center;
}
@media (max-width:900px){
  .hero-grid{ grid-template-columns:1fr; gap:20px; }
  .hero-stage{ order:-1; max-width:280px; aspect-ratio:1/1.02; }
}
@media (max-width:420px){
  .hero-stage{ max-width:240px; }
  .brand span{ font-size:1rem; }
}

.hero h1{
  font-size:clamp(2.6rem,6.6vw,4.6rem);
  font-variation-settings:"SOFT" 80,"WONK" 1,"opsz" 100;
}
.hero h1 em{
  font-style:italic;
  color:var(--flame-hot);
  font-variation-settings:"SOFT" 100,"WONK" 1,"opsz" 100;
}
.hero p.lede{
  color:var(--wax-dim);
  font-size:clamp(1.02rem,1.7vw,1.18rem);
  max-width:46ch;
  margin:22px 0 0;
}
.hero-actions{ display:flex; flex-wrap:wrap; gap:12px; margin-top:32px; }

.hero-stage{
  position:relative;
  aspect-ratio:1/1.06;
  max-width:460px;
  margin-inline:auto;
  width:100%;
}
/* Ambient bloom lives in CSS so it isn't clipped by the canvas box */
.hero-stage::before{
  content:"";
  position:absolute; inset:-26%;
  pointer-events:none; z-index:0;
  background:radial-gradient(circle at 50% 40%,
    rgba(255,162,62,.19), rgba(255,130,45,.055) 44%, transparent 68%);
  opacity:1;
  transition:opacity 1.4s ease;
}
body.room-dark .hero-stage::before{ opacity:.10; }

#candle{
  position:relative; z-index:1;
  width:100%; height:100%; display:block;
  cursor:pointer;
  touch-action:none;
}
.stage-hint{
  position:absolute; left:50%; bottom:2%; z-index:2;
  transform:translateX(-50%);
  font-size:.76rem; letter-spacing:.16em; text-transform:uppercase;
  font-weight:700; color:var(--wick);
  white-space:nowrap;
  transition:opacity .5s ease, color .5s ease;
}
.stage-hint.out{ color:var(--flame); }

.relight{
  position:absolute; left:50%; top:38%; z-index:2;
  transform:translateX(-50%);
  opacity:0; pointer-events:none;
  transition:opacity .4s ease;
  background:var(--surface-2); color:var(--wax);
  border:1px solid var(--line);
  padding:10px 20px; border-radius:999px;
  font-family:var(--body); font-weight:700; font-size:.85rem;
  cursor:pointer;
}
.relight.show{ opacity:1; pointer-events:auto; }
.relight:hover{ border-color:var(--flame); color:var(--flame-hot); }

/* ---------- Buttons ---------- */

.btn{
  display:inline-flex; align-items:center; gap:9px;
  font-family:var(--body); font-weight:700; font-size:.95rem;
  padding:14px 26px; border-radius:999px;
  border:1px solid transparent; cursor:pointer;
  text-decoration:none; transition:all .2s ease;
}
.btn:hover{ text-decoration:none; }
.btn-primary{ background:var(--flame); color:#211208; }
.btn-primary:hover{ background:var(--flame-hot); transform:translateY(-1px); }
.btn-ghost{ background:transparent; color:var(--wax); border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--wick); background:rgba(255,255,255,.03); }

/* ---------- Marquee strip ---------- */

.strip{
  border-block:1px solid var(--line);
  background:var(--room);
  padding-block:16px;
  overflow:hidden;
}
.strip-track{
  display:flex; gap:44px; width:max-content;
  animation:drift 44s linear infinite;
}
.strip-track span{
  font-family:var(--display);
  font-variation-settings:"SOFT" 90,"WONK" 1,"opsz" 30;
  font-size:1.05rem; color:var(--wick); white-space:nowrap;
}
.strip-track span::after{ content:"·"; margin-left:44px; color:var(--ember); }
@keyframes drift{ to{ transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce){ .strip-track{ animation:none; } }

/* ---------- Scent grid ---------- */

.filters{ display:flex; flex-wrap:wrap; gap:9px; margin-bottom:34px; }
.filters button{
  font-family:var(--body); font-size:.84rem; font-weight:700;
  letter-spacing:.03em;
  background:transparent; color:var(--wax-dim);
  border:1px solid var(--line); border-radius:999px;
  padding:9px 18px; cursor:pointer; transition:all .18s ease;
}
.filters button:hover{ color:var(--wax); border-color:var(--wick); }
.filters button[aria-pressed="true"]{
  background:var(--flame); color:#211208; border-color:var(--flame);
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(268px,1fr));
  gap:clamp(16px,2.2vw,26px);
}

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  overflow:hidden;
  display:flex; flex-direction:column;
  transition:border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card:hover{
  border-color:#4A3A30;
  transform:translateY(-3px);
  box-shadow:0 18px 44px -22px rgba(255,140,50,.4);
}
.card[hidden]{ display:none; }

.card-media{
  position:relative;
  aspect-ratio:1/1;
  background:var(--room);
  overflow:hidden;
}
.card-media img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .6s cubic-bezier(.2,.7,.3,1), opacity .4s ease;
}
.card:hover .card-media img{ transform:scale(1.045); }
.card-media img.alt{ position:absolute; inset:0; opacity:0; }
.card:hover .card-media img.alt{ opacity:1; }

/* tiny flame that lights on hover */
.wickmark{
  position:absolute; top:14px; right:16px;
  width:11px; height:17px;
  border-radius:50% 50% 50% 50% / 62% 62% 38% 38%;
  background:linear-gradient(to top,var(--ember),var(--flame) 45%,var(--flame-hot));
  opacity:0; transform:scale(.4) translateY(6px);
  transition:opacity .3s ease, transform .3s ease;
  filter:blur(.3px);
  box-shadow:0 0 18px 5px rgba(255,150,50,.42);
}
.card:hover .wickmark, .card:focus-within .wickmark{
  opacity:1; transform:scale(1) translateY(0);
  animation:lick 1.5s ease-in-out infinite;
}
@keyframes lick{
  0%,100%{ transform:scale(1) translateY(0) skewX(0deg); }
  30%{ transform:scale(1.1,.94) translateY(-1px) skewX(-6deg); }
  65%{ transform:scale(.94,1.08) translateY(0) skewX(5deg); }
}
@media (prefers-reduced-motion:reduce){
  .card:hover .wickmark{ animation:none; }
}

.card-body{ padding:20px 22px 22px; display:flex; flex-direction:column; flex:1; }
.card-body h3{
  font-size:1.32rem;
  font-variation-settings:"SOFT" 80,"WONK" 1,"opsz" 30;
}
.notes{
  color:var(--wax-dim); font-size:.92rem; line-height:1.5;
  margin:8px 0 0;
}

.more{
  background:none; border:0; padding:0; margin:12px 0 0;
  color:var(--flame); font-family:var(--body);
  font-size:.8rem; font-weight:700; letter-spacing:.09em;
  text-transform:uppercase; cursor:pointer; text-align:left;
}
.more:hover{ color:var(--flame-hot); }
.full{
  color:var(--wax-dim); font-size:.93rem; line-height:1.62;
  margin:12px 0 0; padding-left:14px;
  border-left:2px solid var(--line);
}
.full[hidden]{ display:none; }

.card-order{
  display:flex; gap:9px; align-items:stretch;
  margin-top:auto; padding-top:20px;
}
.card-order select{
  flex:1; min-width:0;
  background:var(--surface-2); color:var(--wax);
  border:1px solid var(--line); border-radius:11px;
  padding:11px 12px; font-family:var(--body); font-size:.9rem;
  cursor:pointer;
  appearance:none;
  background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23C4AE96' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  padding-right:32px;
}
.card-order button{
  flex:0 0 auto;
  background:var(--flame); color:#211208;
  border:0; border-radius:11px; padding:11px 18px;
  font-family:var(--body); font-weight:700; font-size:.9rem;
  cursor:pointer; transition:background .18s ease;
  white-space:nowrap;
}
.card-order button:hover{ background:var(--flame-hot); }
.card-order button.added{ background:#4E7A46; color:#EAF6E6; }

/* ---------- Story ---------- */

.story-grid{
  display:grid; grid-template-columns:1fr 1fr;
  gap:clamp(28px,5vw,64px); align-items:center;
}
@media (max-width:820px){ .story-grid{ grid-template-columns:1fr; } }
.story-grid img{ border-radius:var(--r-lg); border:1px solid var(--line); }
.story-grid h2{ font-size:clamp(1.9rem,4vw,2.8rem); }
.story-grid p{ color:var(--wax-dim); margin:18px 0 0; }

.facts{ display:flex; flex-wrap:wrap; gap:26px; margin-top:30px; }
.facts div{ min-width:110px; }
.facts strong{
  display:block; font-family:var(--display);
  font-variation-settings:"SOFT" 80,"WONK" 1,"opsz" 40;
  font-size:1.9rem; color:var(--flame-hot); line-height:1;
}
.facts span{
  font-size:.76rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--wick); font-weight:700;
}

/* ---------- Shows ---------- */

.shows{ border-top:1px solid var(--line); }

.show{
  display:grid;
  grid-template-columns:84px 1fr auto;
  gap:clamp(16px,2.6vw,32px);
  align-items:center;
  padding:22px 4px;
  border-bottom:1px solid var(--line);
  transition:background .2s ease;
}
.show[hidden]{ display:none; }
.show:hover{ background:rgba(255,255,255,.014); }

/* date block */
.show-when{
  overflow:hidden;
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; text-align:center;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  padding:9px 6px 10px;
  min-height:76px;
}
.show-month{
  font-size:.68rem; font-weight:800; letter-spacing:.18em;
  text-transform:uppercase; color:var(--flame);
}
.show-day{
  font-family:var(--display);
  font-variation-settings:"SOFT" 80,"WONK" 1,"opsz" 40;
  font-size:1.62rem; line-height:1.1; color:var(--wax);
  white-space:nowrap;
}
.show-month.tight{ font-size:.6rem; letter-spacing:.09em; }
.show-year{ font-size:.66rem; color:var(--wick); letter-spacing:.1em; }
.show-tbc{
  font-size:.7rem; font-weight:700; color:var(--wax-dim);
  letter-spacing:.02em; margin-top:5px; line-height:1.2;
}

.show-what h3{
  font-size:1.2rem;
  font-variation-settings:"SOFT" 80,"WONK" 1,"opsz" 30;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.show-what h3 a{ color:inherit; }
.show-what h3 a:hover{ color:var(--flame-hot); text-decoration:none; }
.show-meta{ color:var(--wax-dim); font-size:.9rem; margin:4px 0 0; }
.show-meta:empty{ display:none; }

.show-side{ text-align:right; }
.show-hours{ color:var(--wax-dim); font-size:.88rem; margin:0; }
.show-hours:empty{ display:none; }
.show-cal{
  display:inline-block; margin-top:7px;
  font-size:.74rem; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:var(--wick);
  border-bottom:1px solid transparent;
}
.show-cal:hover{ color:var(--flame-hot); border-bottom-color:currentColor; text-decoration:none; }

/* the soonest show gets picked out */
.show.next .show-when{
  background:rgba(255,155,51,.10);
  border-color:rgba(255,155,51,.42);
}
.show.next .show-day{ color:var(--flame-hot); }

.badge{
  font-family:var(--body);
  font-size:.64rem; font-weight:800; letter-spacing:.14em;
  text-transform:uppercase;
  padding:4px 9px; border-radius:999px;
  background:var(--flame); color:#211208;
  white-space:nowrap;
}
.badge.soon{ background:rgba(255,155,51,.16); color:var(--flame-hot); }

.countdown{
  font-size:.74rem; color:var(--wick); font-weight:700;
  letter-spacing:.08em; text-transform:uppercase;
  margin:5px 0 0;
}

.shows-empty{
  border:1px dashed var(--line);
  border-radius:var(--r-lg);
  padding:clamp(24px,4vw,40px);
  text-align:center; color:var(--wax-dim);
  margin:0;
}
.shows-empty[hidden]{ display:none; }

.shows-foot{
  color:var(--wick); font-size:.86rem; margin:22px 0 0;
}
.shows-foot[hidden]{ display:none; }

@media (max-width:720px){
  .show{
    grid-template-columns:66px 1fr;
    grid-template-areas:
      "when what"
      "when side";
    column-gap:16px;
    row-gap:6px;
    align-items:start;
    padding:20px 4px;
  }
  .show-when{
    grid-area:when; align-self:start;
    min-height:66px; padding:8px 4px;
  }
  .show-what{ grid-area:what; }
  .show-side{ grid-area:side; text-align:left; }
  .show-day{ font-size:1.32rem; }
  .show-cal{ margin-top:6px; }
  .show-what h3{ font-size:1.1rem; }
}

/* ---------- Order form ---------- */

.order-section{ background:var(--room); border-top:1px solid var(--line); }

.order-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:clamp(28px,4vw,54px);
  align-items:start;
}
@media (max-width:900px){ .order-layout{ grid-template-columns:1fr; } }

.how{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  padding:clamp(24px,3.4vw,36px);
}
.how ol{ margin:0; padding:0; list-style:none; counter-reset:step; }
.how li{
  position:relative; padding-left:48px; padding-bottom:26px;
  counter-increment:step;
}
.how li:last-child{ padding-bottom:0; }
.how li::before{
  content:counter(step);
  position:absolute; left:0; top:-2px;
  width:32px; height:32px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--surface-2); border:1px solid var(--line);
  color:var(--flame-hot); font-weight:700; font-size:.88rem;
}
.how li strong{ display:block; margin-bottom:4px; }
.how li span{ color:var(--wax-dim); font-size:.94rem; }

.callout{
  margin-top:26px; padding-top:24px; border-top:1px solid var(--line);
  color:var(--wax-dim); font-size:.94rem;
}
.callout a{ font-weight:700; }

form.order{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  padding:clamp(24px,3.4vw,36px);
}
.field{ margin-bottom:20px; }
.field:last-of-type{ margin-bottom:26px; }
.field label{
  display:block; font-size:.78rem; font-weight:700;
  letter-spacing:.13em; text-transform:uppercase;
  color:var(--wick); margin-bottom:8px;
}
.field .req{ color:var(--ember); }
input[type=text],input[type=email],input[type=tel],textarea,select.wide{
  width:100%;
  background:var(--ink); color:var(--wax);
  border:1px solid var(--line); border-radius:12px;
  padding:13px 15px;
  font-family:var(--body); font-size:.98rem;
  transition:border-color .18s ease;
}
input:focus,textarea:focus,select:focus{ border-color:var(--flame); outline:none; }
textarea{ resize:vertical; min-height:96px; line-height:1.55; }
textarea#order-items{ min-height:150px; }

.choices{ display:flex; flex-wrap:wrap; gap:9px; }
.choices label{
  display:inline-flex; align-items:center; gap:9px;
  background:var(--ink); border:1px solid var(--line);
  border-radius:999px; padding:10px 17px;
  font-size:.9rem; font-weight:600; color:var(--wax-dim);
  letter-spacing:0; text-transform:none;
  cursor:pointer; margin:0; transition:all .18s ease;
}
.choices label:hover{ border-color:var(--wick); color:var(--wax); }
.choices input{ accent-color:var(--flame); margin:0; }
.choices input:checked + span{ color:var(--wax); }

.hint{ color:var(--wick); font-size:.82rem; margin:8px 0 0; }
.hp{ position:absolute; left:-9999px; }

.total-line{
  display:flex; justify-content:space-between; align-items:baseline;
  padding:16px 0; margin-bottom:20px;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
}
.total-line span{ font-size:.78rem; letter-spacing:.13em; text-transform:uppercase; color:var(--wick); font-weight:700; }
.total-line strong{
  font-family:var(--display);
  font-variation-settings:"SOFT" 80,"WONK" 1,"opsz" 40;
  font-size:1.7rem; color:var(--flame-hot);
}

form.order .btn-primary{ width:100%; justify-content:center; }

/* ---------- Order tray ---------- */

.tray{
  position:fixed; right:clamp(14px,3vw,28px); bottom:clamp(14px,3vw,28px);
  z-index:70;
  display:flex; align-items:center; gap:12px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:999px;
  padding:11px 13px 11px 20px;
  box-shadow:0 20px 50px -20px rgba(0,0,0,.85);
  transform:translateY(140%);
  transition:transform .38s cubic-bezier(.2,.8,.3,1);
}
.tray.show{ transform:translateY(0); }
.tray.at-form{ transform:translateY(160%); }
.tray-count{ font-size:.9rem; color:var(--wax-dim); }
.tray-count b{ color:var(--wax); }
.tray a{
  background:var(--flame); color:#211208;
  padding:9px 18px; border-radius:999px;
  font-weight:700; font-size:.86rem; text-decoration:none;
}
.tray a:hover{ background:var(--flame-hot); text-decoration:none; }

/* ---------- Footer ---------- */

.site-footer{
  border-top:1px solid var(--line);
  padding-block:clamp(44px,6vw,72px) 36px;
  background:var(--ink);
}
.footer-grid{
  display:grid; grid-template-columns:1.4fr 1fr 1fr;
  gap:clamp(24px,4vw,52px);
}
@media (max-width:760px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:480px){ .footer-grid{ grid-template-columns:1fr; } }
.site-footer h4{
  font-family:var(--body); font-size:.74rem; font-weight:700;
  letter-spacing:.18em; text-transform:uppercase;
  color:var(--wick); margin:0 0 14px;
}
.site-footer ul{ list-style:none; margin:0; padding:0; }
.site-footer li{ margin-bottom:9px; }
.site-footer a{ color:var(--wax-dim); font-size:.94rem; }
.site-footer a:hover{ color:var(--wax); }
.footer-note{
  margin-top:44px; padding-top:24px;
  border-top:1px solid var(--line);
  display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between;
  color:var(--wick); font-size:.83rem;
}

/* ---------- Thanks page ---------- */

.thanks{
  min-height:78vh; display:grid; place-items:center; text-align:center;
}
.thanks-inner{ max-width:560px; }
.thanks h1{ font-size:clamp(2.2rem,5.5vw,3.4rem); margin-bottom:18px; }
.thanks p{ color:var(--wax-dim); }
