/* RoastRush — The Roast Gallery */
:root {
  --ash: #F1F2F0;
  --linen: #E4E5E2;
  --ink: #16181C;
  --oxide: #9C3B28;
  --slate: #7A7D84;
  --link-on-light: #9C3B28;
  --text-on-accent: #F1F2F0;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Mulish", system-ui, sans-serif;
  --font-mono: "Cousine", monospace;
  --radius: 2px;
  --section-pad: clamp(64px, 10vw, 140px);
  --max-width: 1200px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ash);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: var(--link-on-light); text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.5em;
}

h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.75rem, 6vw, 5.125rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxide);
  margin: 0 0 1rem;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
}

.surface-ash { background: var(--ash); color: var(--ink); }
.surface-ink { background: var(--ink); color: var(--ash); }
.surface-linen { background: var(--linen); color: var(--ink); }
.surface-oxide { background: var(--oxide); color: var(--text-on-accent); }

.surface-ink a,
.surface-oxide a { color: var(--ash); }

.container {
  width: min(var(--max-width), 100% - 2rem);
  margin-inline: auto;
}

.section { padding-block: var(--section-pad); }

.grid-bg {
  background-image:
    linear-gradient(rgba(22, 24, 28, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 24, 28, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(22, 24, 28, 0.08);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.site-header.is-scrolled {
  background: var(--ink);
  color: var(--ash);
  border-bottom-color: rgba(241, 242, 240, 0.12);
}

.site-header.is-scrolled a { color: var(--ash); }
.site-header.is-scrolled .header-cta { color: var(--ash); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-h);
  width: min(var(--max-width), 100% - 2rem);
  margin-inline: auto;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: inherit;
}

.main-nav { justify-self: center; }

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  padding-bottom: 0.35rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-cta {
  justify-self: end;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--oxide);
}

.header-cta span { margin-left: 0.35em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.3s ease, filter 0.3s ease;
}

.btn-primary {
  background: var(--oxide);
  color: var(--text-on-accent);
  border-color: var(--oxide);
}

.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 24px rgba(156, 59, 40, 0.25);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
}

.btn-outline:hover {
  box-shadow: 0 4px 16px rgba(22, 24, 28, 0.08);
  text-decoration: none;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Hero — THE DROP */
.hero-drop {
  min-height: 92vh;
  padding-block: 2rem 4rem;
  display: flex;
  flex-direction: column;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink);
  position: relative;
  margin-bottom: 2.5rem;
}

.hero-top-row::before,
.hero-top-row::after {
  content: "";
  position: absolute;
  bottom: -3px;
  width: 8px;
  height: 8px;
  background: var(--oxide);
}

.hero-top-row::before { left: 0; }
.hero-top-row::after { right: 0; }

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.hero-drop h1 { max-width: 18ch; margin-bottom: 1.5rem; }
.hero-drop h1 em { font-style: normal; color: var(--oxide); }

.hero-standfirst {
  max-width: 560px;
  color: rgba(22, 24, 28, 0.82);
  margin-bottom: 1.5rem;
}

.trust-strip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--slate);
  margin-top: 1.5rem;
}

/* Roast curve motif */
.roast-curve {
  width: 100%;
  max-width: 640px;
  height: 80px;
  margin: 1.5rem 0 2rem;
}

.roast-curve path {
  fill: none;
  stroke: var(--oxide);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.js .roast-curve.is-drawn path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s ease; }

.roast-curve-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.5rem;
}

.roast-node {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  transition: color 0.4s ease;
}

.roast-node.is-lit { color: var(--oxide); }

/* Framed plate */
.plate {
  position: relative;
  border: 1px solid var(--ink);
  padding: 0.5rem;
  margin-top: 2rem;
  box-shadow: 0 12px 40px rgba(22, 24, 28, 0.08);
  transition: box-shadow 0.6s ease, transform 0.6s ease;
}

.plate::before,
.plate::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--oxide);
}

.plate::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.plate::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.js .plate.is-bloomed {
  box-shadow: 0 20px 56px rgba(22, 24, 28, 0.14);
  transform: translateY(-12px);
}

.plate img { width: 100%; }

/* Metrics */
.metric-trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.metric-trio dt {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--oxide);
}

.metric-trio dd {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--slate);
}

/* Stages */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.stage-card {
  padding: 1.5rem;
  border: 1px solid rgba(22, 24, 28, 0.1);
  border-radius: var(--radius);
}

.stage-card .stage-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--oxide);
  letter-spacing: 0.1em;
}

/* Offer rail */
.offer-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--oxide);
  border: 1px solid var(--oxide);
}

.offer-card {
  padding: 1.75rem;
  background: var(--ash);
}

.surface-ink .offer-card {
  color: var(--ink);
}

.offer-card .offer-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--oxide);
  margin-bottom: 0.75rem;
}

.surface-ink .offer-card .offer-code {
  color: var(--ink);
}

/* Content layouts */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.split-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.25em; }
.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.25em; }

.lead { font-size: 1.125rem; line-height: 1.7; }

.hairline {
  border: 0;
  border-top: 1px solid rgba(22, 24, 28, 0.12);
  margin: 2rem 0;
}

/* FAQ */
.faq-list { list-style: none; padding: 0; margin: 0; }

.faq-item {
  border-bottom: 1px solid rgba(22, 24, 28, 0.1);
  padding: 1.5rem 0;
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p { margin: 1rem 0 0; color: rgba(22, 24, 28, 0.85); }

/* Forms */
.form-grid {
  display: grid;
  gap: 1.25rem;
  max-width: 560px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid rgba(22, 24, 28, 0.2);
  border-radius: var(--radius);
  background: var(--ash);
  color: var(--ink);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.checkbox-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.875rem;
}

.checkbox-group input { width: auto; margin-top: 0.25rem; }

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(241, 242, 240, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid a { color: inherit; }

.footer-disclaimer {
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(241, 242, 240, 0.75);
  border-top: 1px solid rgba(241, 242, 240, 0.12);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(241, 242, 240, 0.55);
  margin-top: 1rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding-block: 4rem 2rem;
}

.page-hero h1 { margin-bottom: 0.75rem; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.25rem;
  border-top: 1px solid rgba(22, 24, 28, 0.12);
  box-shadow: 0 -8px 32px rgba(22, 24, 28, 0.1);
}

.cookie-banner[hidden] { display: none; }

.cookie-inner {
  width: min(var(--max-width), 100% - 2rem);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-text { flex: 1; min-width: 240px; font-size: 0.875rem; }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.cookie-actions button {
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.cookie-actions .cookie-accept {
  background: var(--oxide);
  color: var(--text-on-accent);
  border-color: var(--oxide);
}

/* Cookie customise panel */
.cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(22, 24, 28, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-panel[hidden] { display: none; }

.cookie-panel-inner {
  background: var(--ash);
  color: var(--ink);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(22, 24, 28, 0.12);
}

.cookie-panel-inner label {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
  font-size: 0.875rem;
}

/* Reveal animation */
.js .reveal {
  transform: translateY(16px);
  transition: transform 0.6s ease;
}

.js .reveal.is-visible { transform: translateY(0); }

/* Legal tables */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1.5rem 0;
}

.legal-table th,
.legal-table td {
  border: 1px solid rgba(22, 24, 28, 0.12);
  padding: 0.75rem;
  text-align: left;
}

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}

/* Thanks */
.thanks-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 1rem;
}

.menu-discipline {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(22, 24, 28, 0.1);
}

.menu-discipline:last-child { border-bottom: 0; }

.price-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
  margin-top: 0.75rem;
}

.craft-story {
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(22, 24, 28, 0.1);
}

.story-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--oxide);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .wordmark { grid-column: 1; }
  .header-cta { grid-column: 2; grid-row: 1; }
  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    overflow-x: auto;
  }

  .two-col,
  .split-media { grid-template-columns: 1fr; }

  .hero-drop { min-height: 80vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal { transform: none; }
  .roast-curve path { stroke-dashoffset: 0; }
  .js .plate.is-bloomed { transform: none; }
}
