:root {
  color-scheme: dark;
  --roast-bg: #0b0907;
  --roast-paper: #f5ead7;
  --roast-muted: #c7b9a4;
  --roast-muted-soft: #9c8c79;
  --roast-ember: #ff7419;
  --roast-ember-deep: #d95509;
  --roast-line: rgba(238, 208, 169, 0.24);
  --roast-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Baskerville, Georgia, serif;
  --roast-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--roast-bg); }

body.roast-body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--roast-bg);
  color: var(--roast-paper);
  font-family: var(--roast-serif);
}

body.roast-body::before,
body.roast-body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

body.roast-body::before {
  background-image: url("/assets/daily_roast/mobile-186520cc.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.roast-body::after {
  background:
    linear-gradient(180deg, rgba(6, 5, 4, 0.8) 0%, rgba(7, 5, 4, 0.66) 52%, rgba(8, 6, 4, 0.16) 78%, rgba(8, 6, 4, 0.58) 100%),
    linear-gradient(90deg, rgba(4, 3, 2, 0.58), rgba(4, 3, 2, 0.28) 82%, transparent 100%);
}

.roast-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 86rem);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.roast-header {
  padding: 1.45rem 0 1.15rem;
  border-bottom: 1px solid var(--roast-line);
}

.roast-wordmark {
  color: var(--roast-paper);
  font: 700 0.86rem/1 var(--roast-serif);
  letter-spacing: 0.28em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.66);
}

.roast-shell main { flex: 1; }

.roast-hero {
  display: grid;
  min-height: clamp(34rem, 69svh, 48rem);
  align-items: start;
  padding: clamp(2.5rem, 8svh, 5rem) 0 2.25rem;
}

.roast-editorial { max-width: 46rem; }

.roast-kicker {
  margin: 0;
  color: var(--roast-ember);
  font: 750 0.73rem/1.4 var(--roast-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.roast-copy {
  max-width: 18ch;
  margin: 1.2rem 0 1.65rem;
  color: var(--roast-paper);
  font-size: clamp(2.4rem, 10.5vw, 4.35rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 0.99;
  text-wrap: balance;
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.92), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.roast-copy--quiet { color: var(--roast-muted); }

.roast-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.roast-action,
.roast-button,
.roast-form button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(255, 116, 25, 0.9);
  border-radius: 999px;
  background: rgba(10, 8, 6, 0.64);
  color: var(--roast-paper);
  cursor: pointer;
  font: 700 0.78rem/1 var(--roast-sans);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.roast-action svg,
.roast-form button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.roast-action:hover,
.roast-action:focus-visible,
.roast-button:hover,
.roast-button:focus-visible {
  border-color: #ff9a55;
  background: rgba(255, 116, 25, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.roast-action--primary,
.roast-form button {
  border-color: var(--roast-ember);
  background: linear-gradient(180deg, #ff842f 0%, var(--roast-ember) 100%);
  color: #1b0d05;
  box-shadow: 0 9px 26px rgba(191, 65, 4, 0.2);
}

.roast-action--primary:hover,
.roast-action--primary:focus-visible,
.roast-form button:hover,
.roast-form button:focus-visible {
  background: linear-gradient(180deg, #ff9852 0%, #ff7b24 100%);
  outline: none;
}

.roast-copy-status {
  min-height: 1.2rem;
  margin: 0.65rem 0 0;
  color: #ffad78;
  font: 0.75rem/1.4 var(--roast-sans);
}

.roast-promise,
.roast-signup p,
.roast-legal p,
.roast-message-card p {
  color: var(--roast-muted);
  font: 0.92rem/1.65 var(--roast-sans);
}

.roast-promise {
  margin: 0.35rem 0 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

.roast-signup {
  position: relative;
  display: grid;
  gap: 1.35rem;
  margin: 0 0 clamp(4rem, 11vw, 7rem);
  padding: clamp(1.55rem, 5vw, 2.4rem);
  overflow: hidden;
  border: 1px solid rgba(255, 128, 43, 0.62);
  border-radius: 1.5rem;
  background: rgba(12, 8, 5, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.46), 0 0 20px rgba(196, 67, 5, 0.11);
}

.roast-signup__intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.roast-signup__icon {
  width: 2rem;
  height: 2rem;
  margin-top: 0.15rem;
  fill: none;
  stroke: var(--roast-ember);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.roast-signup h2,
.roast-message-card h1,
.roast-legal h1 {
  margin: 0;
  color: var(--roast-paper);
  font-size: clamp(1.85rem, 7vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.roast-signup__intro p { margin: 0.7rem 0 0; }

.roast-form label {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--roast-paper);
  font: 700 0.75rem/1 var(--roast-sans);
}

.roast-form-row {
  display: grid;
  gap: 0.75rem;
}

.roast-form input[type=email] {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid rgba(209, 181, 149, 0.34);
  border-radius: 999px;
  outline: none;
  background: rgba(9, 7, 5, 0.78);
  color: var(--roast-paper);
  font: 1rem/1 var(--roast-serif);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.roast-form input[type=email]::placeholder { color: #8f8172; }

.roast-form input[type=email]:focus {
  border-color: rgba(255, 132, 50, 0.85);
  box-shadow: 0 0 0 4px rgba(255, 116, 25, 0.11);
}

.roast-form button { width: 100%; min-height: 3rem; }
.roast-consent { margin: 0.85rem 0 0; font-size: 0.72rem !important; line-height: 1.55 !important; }
.roast-honeypot { position: absolute; left: -9999px; }
.roast-field-error, .roast-alert { color: #ffc0aa; font: 0.85rem/1.5 var(--roast-sans); }
.roast-notice {
  position: fixed;
  z-index: 10;
  top: 1rem;
  right: 1rem;
  width: min(24rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 116, 25, 0.62);
  border-left: 3px solid var(--roast-ember);
  border-radius: 0.75rem;
  background: rgba(10, 7, 5, 0.94);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.42);
  color: var(--roast-paper);
  font: 0.85rem/1.5 var(--roast-sans);
}

.roast-share-menu-wrap { position: relative; }

.roast-share-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.65rem);
  left: 0;
  display: grid;
  width: min(18rem, calc(100vw - 2rem));
  padding: 0.55rem;
  border: 1px solid rgba(255, 128, 43, 0.58);
  border-radius: 1rem;
  background: rgba(13, 9, 7, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.62), 0 0 18px rgba(196, 67, 5, 0.08);
  backdrop-filter: blur(14px);
}

.roast-share-menu[hidden] { display: none; }

.roast-share-menu__heading {
  margin: 0;
  padding: 0.55rem 0.7rem 0.45rem;
  color: var(--roast-ember);
  font: 750 0.66rem/1.3 var(--roast-sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.roast-share-menu__item {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.68rem 0.75rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--roast-paper);
  cursor: pointer;
  font: 650 0.82rem/1.25 var(--roast-sans);
  text-align: left;
  text-decoration: none;
}

.roast-share-menu__item:hover,
.roast-share-menu__item:focus-visible {
  outline: none;
  background: rgba(255, 116, 25, 0.12);
  color: #fff4e4;
}

.roast-share-menu__divider {
  height: 1px;
  margin: 0.35rem 0.55rem;
  background: var(--roast-line);
}

.roast-share-menu__status {
  min-height: 1.1rem;
  margin: 0;
  padding: 0.4rem 0.7rem 0.3rem;
  color: #ffad78;
  font: 0.72rem/1.4 var(--roast-sans);
}

.roast-message-card, .roast-legal { max-width: 48rem; margin: 5rem auto; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--roast-line); border-radius: 1.5rem; background: rgba(10, 7, 5, 0.86); backdrop-filter: blur(14px); }
.roast-footer { padding: 1.6rem 0 2rem; border-top: 1px solid var(--roast-line); display: flex; flex-wrap: wrap; gap: 1.25rem; font: 0.75rem/1.5 var(--roast-sans); }
.roast-footer a, .roast-legal a { color: var(--roast-muted); text-underline-offset: 0.2em; }
.roast-footer a:hover, .roast-legal a:hover { color: var(--roast-paper); }

@media (min-width: 42rem) {
  .roast-shell { width: min(100% - 4rem, 86rem); }
  .roast-header { padding-top: 1.8rem; }
  .roast-wordmark { font-size: 0.95rem; }
  .roast-action { padding-inline: 1.15rem; }
  .roast-form-row { grid-template-columns: minmax(0, 1fr) auto; }
  .roast-form button { width: auto; padding-inline: 1.45rem; }
}

@media (min-width: 64rem) {
  body.roast-body::before {
    background-image: url("/assets/daily_roast/desktop-176ddf4c.png");
    background-position: center top;
  }

  body.roast-body::after {
    background:
      linear-gradient(90deg, rgba(5, 4, 3, 0.72) 0%, rgba(5, 4, 3, 0.42) 38%, rgba(5, 4, 3, 0.05) 72%),
      linear-gradient(180deg, rgba(5, 4, 3, 0.22) 0%, rgba(5, 4, 3, 0.08) 65%, rgba(5, 4, 3, 0.55) 100%);
  }

  .roast-hero {
    min-height: clamp(36rem, 69vh, 45rem);
    align-items: center;
    padding: 3.2rem 0 2.5rem;
  }

  .roast-editorial { width: min(48vw, 44rem); }
  .roast-copy { max-width: 17ch; font-size: clamp(3.15rem, 3.65vw, 4.6rem); line-height: 1; }
  .roast-signup { grid-template-columns: minmax(0, 1.05fr) minmax(26rem, 0.95fr); align-items: center; gap: 3rem; padding: 2rem 2.7rem; }
  .roast-form { padding-left: 2rem; border-left: 1px solid rgba(229, 197, 159, 0.2); }
}

@media (prefers-reduced-motion: reduce) {
  .roast-action, .roast-button, .roast-form button { transition: none; }
}
