/* Grill Gremlinz
   Palette is lifted from the showroom art: display-case velvet, gold
   fittings, rose-gold settings, diamond white, and the blue of the plush. */
:root {
  --velvet: #4d0c1b;
  --velvet-deep: #2c0710;
  --velvet-line: #7a2434;
  --gold: #e9b949;
  --rose: #e2a08a;
  --paper: #f8ecd4;
  --paper-line: #dcc79c;
  --ink: #2c0710;
  --ice: #e6f4ff;
  --plush: #1f6de0;
  --plush-deep: #14479a;

  /* Blackletter for the name only: the lettering of nameplates and grillz.
     Everything else is one grotesque, set heavy and a little wide for headings. */
  --display: "Grenze Gotisch", "Old English Text MT", "UnifrakturCook", serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 62ch;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--velvet-deep);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-family: var(--display); font-weight: 800; }
h2, h3 { font-family: var(--body); font-weight: 800; font-stretch: 112%; }
h2 { font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.04; letter-spacing: -0.025em; margin-bottom: 0.55em; }
h3 { font-size: 1.18rem; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: var(--measure); }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.band-paper :focus-visible { outline-color: var(--plush); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 999px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 10px var(--gutter);
  background: rgb(44 7 16 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--velvet-line);
}
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1; text-decoration: none; color: var(--gold); white-space: nowrap; }
.topnav { display: flex; gap: 22px; margin-left: auto; font-size: 0.95rem; }
.topnav a { text-decoration: none; opacity: 0.85; }
.topnav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-weight: 700; font-size: 1.05rem; line-height: 1.2;
  padding: 14px 24px; border-radius: 999px;
  border: 2px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 #a8791c; }
.btn-gold:hover { background: #f3c95f; }
.btn-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 #a8791c; }
.btn-line { border-color: var(--paper); color: var(--paper); }
.btn-line:hover { background: rgb(248 236 212 / 0.12); }
.btn-small { font-size: 0.92rem; padding: 9px 16px; box-shadow: 0 3px 0 #a8791c; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; background: var(--velvet-deep); }
.hero-art img {
  /* Show the whole 8:3 frame where there is room; crop toward the heads where there isn't. */
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  min-height: 300px;
  max-height: 82vh;
  object-fit: cover;
  object-position: 42% 30%;
}
/* The art fades into the velvet so the copy sits on a solid ground. */
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgb(44 7 16 / 0.75) 78%, var(--velvet-deep) 100%);
  pointer-events: none;
}
.hero-art { position: relative; display: block; }
.hero-copy {
  position: relative;
  width: min(1180px, 100%);
  margin: clamp(-170px, -13vw, -70px) auto 0;
  padding: 0 var(--gutter) clamp(40px, 6vw, 80px);
}
.hero-title {
  font-size: clamp(3.9rem, 15.5vw, 12.5rem);
  line-height: 0.8;
  letter-spacing: 0;
  color: var(--paper);
  /* One soft shadow, only to hold the letters off the busy showroom art. */
  text-shadow: 0 0.03em 0.14em rgb(20 3 8 / 0.75);
  margin-bottom: 0.26em;
}
.hero-title span { display: inline-block; }
.hero-lede { font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.4; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 28px; }

.ca {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--velvet-line); border-radius: 14px;
  background: rgb(77 12 27 / 0.6);
  max-width: 100%;
}
.ca-label { font-size: 0.9rem; opacity: 0.8; }
.ca-value { font-family: var(--body); font-weight: 500; font-size: 0.95rem; overflow-wrap: anywhere; }
.ca-copy {
  font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  background: var(--paper); color: var(--ink);
  border: 0; border-radius: 999px; padding: 6px 14px;
}

/* One load moment: the two words of the title drop in like plush toys. */
@media (prefers-reduced-motion: no-preference) {
  .hero-title span { animation: plop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
  .hero-title span:nth-child(2) { animation-delay: 0.12s; }
  @keyframes plop {
    from { opacity: 0; transform: translateY(-0.35em) rotate(-4deg) scale(0.92); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- bands ---------- */
.band { padding-block: clamp(56px, 8vw, 112px); }
.band-velvet { background: var(--velvet); color: var(--paper); }
.band-paper { background: var(--paper); color: var(--ink); }
.band-paper h2 { color: var(--velvet); }
.band-velvet h2 { color: var(--gold); }
.intro { font-size: 1.15rem; margin-bottom: 2em; }

.textlink { font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--gold); }
.textlink:hover { text-decoration-color: currentColor; }

/* ---------- the grill ---------- */
.grill-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.mascot { margin: 0; }
.mascot img { border-radius: 28px; box-shadow: 0 0 0 6px var(--velvet-deep), 0 0 0 8px var(--gold); }
.mascot figcaption { font-size: 0.88rem; opacity: 0.75; margin-top: 16px; }
.prize-name { font-size: 1.45rem; font-weight: 700; color: var(--rose); line-height: 1.25; }

/* A jeweller's tag: one fact per line, ruled like a spec sheet. */
.tag { margin: 28px 0; border-top: 1px solid var(--velvet-line); }
.tag > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--velvet-line); }
.tag dt { color: var(--gold); font-weight: 500; }
.tag dd { margin: 0; }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.steps li { counter-increment: step; padding: 20px 22px 4px 0; border-top: 3px solid var(--velvet); position: relative; }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--paper-line); }
.steps li::before {
  content: counter(step);
  font-family: var(--body); font-weight: 900; font-stretch: 112%; font-size: 2.9rem; line-height: 1; letter-spacing: -0.03em; color: var(--plush);
  display: block; margin-bottom: 12px;
}
.steps h3 { margin-bottom: 8px; color: var(--velvet); }
.steps p { font-size: 0.98rem; }

/* ---------- the pot ---------- */
.pot-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.note { font-size: 0.95rem; opacity: 0.85; }
.footnote { font-size: 0.9rem; opacity: 0.75; margin-top: 36px; }
.footnote, .note { max-width: 72ch; }

.calc { display: grid; gap: 20px; margin: 28px 0; }
.field { display: grid; gap: 8px; }
.field-name { display: flex; justify-content: space-between; gap: 16px; font-weight: 500; }
.field-name output { font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }

input[type="range"] { width: 100%; height: 28px; margin: 0; background: transparent; accent-color: var(--gold); cursor: pointer; }
input[type="range"]:disabled { cursor: not-allowed; opacity: 0.4; }
input[type="number"] {
  font: inherit; font-weight: 700; font-variant-numeric: tabular-nums;
  width: 11em; max-width: 100%; padding: 10px 14px;
  color: var(--paper); background: var(--velvet-deep);
  border: 1px solid var(--velvet-line); border-radius: 10px;
}

.split { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.split caption { text-align: left; font-weight: 500; padding-bottom: 10px; }
.split th, .split td { padding: 9px 0; border-top: 1px solid var(--velvet-line); font-weight: 400; text-align: left; }
.split td { text-align: right; font-weight: 700; }
.split tr:first-child th, .split tr:first-child td { color: var(--gold); font-weight: 700; }

/* The meter is the gremlin's grin: sixteen stones in a rose-gold set. */
.meter { position: sticky; top: 96px; }
.meter-headline { font-weight: 800; font-stretch: 112%; font-size: clamp(1.4rem, 2.3vw, 1.95rem); line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 26px; max-width: 19ch; }
.meter-headline strong { font-weight: inherit; color: var(--gold); font-variant-numeric: tabular-nums; }

.mouth {
  background: var(--plush);
  border-radius: 46% 46% 50% 50% / 62% 62% 44% 44%;
  padding: clamp(22px, 4vw, 40px) clamp(20px, 4vw, 38px) clamp(26px, 4.5vw, 46px);
  box-shadow: inset 0 -14px 0 var(--plush-deep), inset 0 10px 18px rgb(255 255 255 / 0.18);
}
.teeth {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px 3px;
  background: #16070b;
  border-radius: 14px 14px 46px 46px / 14px 14px 60px 60px;
  padding: 12px 12px 16px;
  box-shadow: inset 0 6px 14px rgb(0 0 0 / 0.6);
}
.tooth {
  aspect-ratio: 1.12;
  clip-path: polygon(25% 2%, 75% 2%, 100% 50%, 75% 98%, 25% 98%, 0 50%);
  background: #4a2a26;
  box-shadow: inset 0 0 0 2px var(--rose);
  transition: background-color 0.2s;
}
/* Lower row sits half a stone over, like a honeycomb setting. */
.tooth:nth-child(n + 9) { transform: translateX(18%); }
.tooth.is-lit {
  background:
    conic-gradient(from calc(var(--i) * 47deg) at 50% 50%, #ffffff, #b9d8f2, #ffffff, #8fbbe0, #f4fbff, #c6e2f7, #ffffff);
}
@media (prefers-reduced-motion: no-preference) {
  .tooth.is-lit { animation: glint 2.6s ease-in-out calc(var(--i) * -0.37s) infinite; }
  @keyframes glint { 0%, 100% { filter: brightness(0.92); } 50% { filter: brightness(1.18); } }
}
.field-volume { margin-top: 26px; }
.meter-status { min-height: 3.2em; margin-top: 12px; font-size: 0.98rem; }

/* ---------- odds and proof ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); }
.plain { margin: 0 0 1.4em; padding: 0; list-style: none; max-width: var(--measure); }
.plain li { padding: 12px 0; border-top: 1px solid var(--paper-line); }
.plain-numbered { counter-reset: proof; }
.plain-numbered li { counter-increment: proof; padding-left: 2.2em; position: relative; }
.plain-numbered li::before { content: counter(proof); position: absolute; left: 0; top: 10px; font-weight: 900; font-stretch: 112%; font-size: 1.25rem; color: var(--plush); }
.formula {
  font-weight: 700; font-size: 1.02rem; line-height: 1.4;
  background: var(--ink); color: var(--ice);
  padding: 16px 18px; border-radius: 12px; overflow-wrap: anywhere;
}
.formula span { color: var(--gold); }

/* ---------- if you win: an appraisal certificate ---------- */
.certificate {
  background: var(--paper); color: var(--ink);
  padding: clamp(24px, 5vw, 64px);
  border-radius: 6px;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--velvet), 0 0 0 6px var(--gold);
}
.band-velvet .certificate h2 { color: var(--velvet); }
.rules { width: 100%; border-collapse: collapse; }
.rules th, .rules td { text-align: left; vertical-align: top; padding: 14px 0; border-top: 1px solid var(--paper-line); }
.rules thead th { border-top: 0; font-weight: 500; opacity: 0.7; padding-bottom: 8px; }
.rules tbody th { font-weight: 700; width: 40%; padding-right: 28px; }
.rules tbody tr:first-child th, .rules tbody tr:first-child td { border-top: 3px solid var(--velvet); }

/* ---------- faq ---------- */
.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--paper-line); }
.faq details:last-of-type { border-bottom: 1px solid var(--paper-line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; padding: 18px 36px 18px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font-weight: 500; font-size: 1.6rem; line-height: 1; color: var(--plush); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 8px; }

/* ---------- footer ---------- */
.footer { background: var(--velvet-deep); padding-block: 56px 72px; font-size: 0.93rem; }
.footer p { opacity: 0.8; max-width: 78ch; }
.footer .footer-mark { font-family: var(--display); font-weight: 800; font-size: 2.1rem; line-height: 1; color: var(--gold); opacity: 1; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 24px 0 0; }

/* ---------- smaller screens ---------- */
@media (max-width: 1020px) {
  .topnav { display: none; }
  .topbar .btn { margin-left: auto; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 16px 0 4px 76px; border-left: 0; min-height: 84px; }
  .steps li::before { position: absolute; left: 0; top: 14px; margin: 0; }
}
@media (max-width: 860px) {
  .grill-layout, .pot-layout, .two-col { grid-template-columns: 1fr; }
  .mascot { max-width: 440px; }
  .meter { position: static; }
  .hero-art img { object-position: 40% 30%; }
}
@media (max-width: 620px) {
  .tag > div { grid-template-columns: 1fr; gap: 2px; }
  .rules thead { display: none; }
  .rules tbody th, .rules tbody td { display: block; width: auto; padding-right: 0; }
  .rules tbody td { border-top: 0; padding-top: 0; }
  .rules tbody tr:first-child td { border-top: 0; }
  .btn { width: 100%; }
  .topbar { gap: 12px; }
  .topbar .btn { width: auto; font-size: 0.8rem; padding: 8px 12px; }
  .wordmark { font-size: 1.4rem; }
}
