:root {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #1c1a17;
  background: #f3eddf;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --paper: #f3eddf;
  --paper-strong: #fffaf0;
  --ink: #1c1a17;
  --muted: #655f56;
  --red: #dd3928;
  --red-dark: #bc2c20;
  --yellow: #efc43f;
  --green: #2f6b45;
  --line: rgba(28, 26, 23, 0.17);
  --shadow: 0 20px 60px rgba(99, 48, 29, 0.14);
  --radius-card: 16px;
  --radius-control: 999px;
  --page-gutter: clamp(1rem, 4vw, 4rem);
  --section-space: clamp(5rem, 10vw, 9.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    color: #f5efe2;
    background: #1f1e1b;
    --paper: #1f1e1b;
    --paper-strong: #292824;
    --ink: #f5efe2;
    --muted: #c8c0b2;
    --red: #e74a36;
    --red-dark: #d83d2d;
    --yellow: #dfb832;
    --green: #83bc93;
    --line: rgba(245, 239, 226, 0.18);
    --shadow: 0 20px 60px rgba(8, 8, 7, 0.28);
  }
}

:root[data-theme="light"] {
  color: #1c1a17;
  background: #f3eddf;
  --paper: #f3eddf;
  --paper-strong: #fffaf0;
  --ink: #1c1a17;
  --muted: #655f56;
  --red: #dd3928;
  --red-dark: #bc2c20;
  --yellow: #efc43f;
  --green: #2f6b45;
  --line: rgba(28, 26, 23, 0.17);
  --shadow: 0 20px 60px rgba(99, 48, 29, 0.14);
}

:root[data-theme="dark"] {
  color: #f5efe2;
  background: #1f1e1b;
  --paper: #1f1e1b;
  --paper-strong: #292824;
  --ink: #f5efe2;
  --muted: #c8c0b2;
  --red: #e74a36;
  --red-dark: #d83d2d;
  --yellow: #dfb832;
  --green: #83bc93;
  --line: rgba(245, 239, 226, 0.18);
  --shadow: 0 20px 60px rgba(8, 8, 7, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.055;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, currentColor 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, currentColor 5px 6px);
  background-size: 5px 7px, 9px 5px;
  mix-blend-mode: multiply;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4,
.wordmark,
.button,
.rank-number,
.compact-rank,
.score-seal strong {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(2.9rem, 6.4vw, 6.7rem);
  line-height: 0.9;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-shell {
  width: min(100%, 1480px);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  height: 76px;
}

.nav-shell {
  width: min(100%, 1560px);
  height: 76px;
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.wordmark {
  position: relative;
  width: max-content;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1;
}

.wordmark__spark {
  position: absolute;
  top: -0.08em;
  right: -0.48em;
  color: var(--green);
  font-family: Arial, sans-serif;
  font-size: 0.4em;
  letter-spacing: 0;
}

.wordmark--inverse {
  color: #fff3e7;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3.5rem);
  font-weight: 700;
}

.desktop-nav a,
footer nav a {
  position: relative;
}

.desktop-nav a::after,
footer nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.3rem;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.desktop-nav a:hover::after,
footer nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.desktop-cta {
  justify-self: end;
}

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--paper-strong) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}

.theme-button:hover {
  transform: rotate(10deg);
  background: var(--yellow);
  color: #211c14;
}

.button {
  min-height: 52px;
  padding: 0.9rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: var(--red);
  color: #fff8ed;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background 220ms ease, box-shadow 220ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--red-dark);
  box-shadow: 0 10px 24px rgba(174, 51, 34, 0.22);
}

.button:active {
  transform: translateY(1px) scale(0.98);
}

.button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.button--small {
  min-height: 44px;
  padding-inline: 1.2rem;
}

.button--outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.button--outline:hover {
  background: var(--ink);
  color: var(--paper-strong);
}

.button--wide {
  width: 100%;
}

.menu-button,
.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  min-height: 100dvh;
  padding: 7rem var(--page-gutter) 3rem;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(460px, 1.05fr);
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  background: var(--paper);
}

.hero__copy {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  justify-self: end;
  animation: hero-enter 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(4rem, 7.1vw, 8rem);
  line-height: 0.86;
}

.accent-period {
  color: var(--red);
}

.hero__copy > p {
  margin-top: clamp(1.5rem, 3vw, 2.4rem);
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 4px;
  text-underline-offset: 0.38rem;
}

.search-box {
  width: min(760px, 100%);
  min-height: 72px;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  align-items: center;
  gap: 0.4rem;
  background: color-mix(in srgb, var(--paper-strong) 93%, transparent);
  box-shadow: var(--shadow);
}

.search-box__query {
  min-width: 0;
  padding-left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-box__query input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1.02rem;
}

.search-box__query input::placeholder,
.email-form input::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  opacity: 1;
}

.location-control {
  min-height: 52px;
  padding: 0 1rem;
  border: 0;
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.location-control svg {
  color: var(--green);
}

.search-submit {
  height: 58px;
  padding-inline: 1.65rem;
}

.hero__visual {
  position: relative;
  align-self: stretch;
  margin-right: calc(var(--page-gutter) * -1);
  animation: hero-image-enter 1.1s 120ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__visual::before {
  content: "";
  position: absolute;
  inset: 52% -5% -18% 8%;
  z-index: 0;
  background: var(--red);
  transform: rotate(-7deg);
}

.hero__visual img {
  position: absolute;
  inset: 7% 0 0;
  z-index: 1;
  width: 112%;
  height: 93%;
  object-fit: cover;
  object-position: 62% center;
  clip-path: polygon(6% 2%, 100% 0, 100% 100%, 0 100%);
}

.cravings {
  padding-block: var(--section-space) 0;
  overflow: hidden;
  background: var(--red);
  color: #fff5e9;
}

.cravings__header {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
}

.cravings__header h2 {
  max-width: 11ch;
}

.cravings__header p {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 750;
}

.cravings__photo {
  width: min(1480px, calc(100% - var(--page-gutter) * 2));
  aspect-ratio: 16 / 7.2;
  margin: clamp(2.5rem, 5vw, 4.5rem) auto 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  overflow: hidden;
  box-shadow: 0 -10px 60px rgba(92, 18, 10, 0.16);
}

.cravings__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cravings__rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  overflow-x: auto;
  background: var(--paper-strong);
  color: var(--ink);
  scrollbar-width: thin;
}

.craving-link {
  min-height: 94px;
  padding: 1.15rem 1.35rem;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 0.45rem;
  transition: color 180ms ease, background 180ms ease;
}

.craving-link strong {
  font-size: 1.05rem;
}

.craving-link span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.craving-link svg {
  color: var(--green);
}

.craving-link:hover {
  background: var(--yellow);
  color: #201b12;
}

.results {
  padding-block: var(--section-space);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 64px 64px;
}

.results__grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.68fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.results__statement h2 {
  font-size: clamp(3.25rem, 5vw, 4.7rem);
}

.results__statement h2 span {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 6px;
  text-underline-offset: 0.08em;
}

.results__statement > p {
  max-width: 32ch;
  margin-top: 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.5;
}

.statement-note {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--red);
  font-size: 1rem;
  font-weight: 800;
  transform: rotate(-2deg);
}

.ranking-preview {
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--paper-strong) 95%, transparent);
  box-shadow: var(--shadow);
}

.ranking-preview__heading {
  padding: 0.5rem 0.35rem 1.4rem;
}

.ranking-preview__heading span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.ranking-preview__heading h3 {
  font-size: clamp(1.65rem, 3vw, 2.8rem);
  line-height: 1;
}

.top-result {
  display: grid;
  grid-template-columns: auto minmax(190px, 0.8fr) minmax(270px, 1.2fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper-strong);
}

.rank-number {
  align-self: start;
  color: var(--red);
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

.top-result > img {
  width: 100%;
  height: 100%;
  min-height: 268px;
  border-radius: 12px;
  object-fit: cover;
}

.top-result__content {
  display: flex;
  flex-direction: column;
  padding: 0.35rem 0.25rem;
}

.top-result__title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.top-result h4 {
  font-size: clamp(1.3rem, 2.2vw, 2.1rem);
  line-height: 1;
}

.top-result__title p {
  margin-top: 0.45rem;
  color: var(--muted);
}

.price {
  flex: none;
  text-align: right;
  line-height: 1.5;
}

.score-line {
  margin-top: 1.3rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--green);
}

.score-line strong {
  font-size: 3.2rem;
  line-height: 0.9;
}

.score-line span {
  font-weight: 750;
}

.summary {
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.45;
}

.result-actions {
  margin-top: auto;
  padding-top: 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.compact-results {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.65rem;
}

.compact-result {
  width: 100%;
  min-height: 82px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  background: var(--paper-strong);
  text-align: left;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease;
}

.compact-result:hover {
  transform: translateX(4px);
  border-color: var(--red);
}

.compact-rank {
  font-size: 1.8rem;
}

.compact-name {
  display: grid;
  gap: 0.22rem;
}

.compact-name small,
.compact-meta {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 500;
}

.compact-score {
  color: var(--green);
  font-size: 1.35rem;
}

.compact-meta {
  text-align: right;
}

.score-section {
  padding-block: var(--section-space);
  background: var(--yellow);
  color: #211c14;
}

.score-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}

.score-seal {
  position: relative;
  width: min(100%, 570px);
  aspect-ratio: 1;
  margin-inline: auto;
  border: clamp(9px, 1.2vw, 16px) double #211c14;
  border-radius: 50%;
  display: grid;
  place-content: center;
  justify-items: center;
  background: #f5c943;
  box-shadow: 20px 22px 0 rgba(175, 64, 34, 0.18);
  transform: rotate(-2deg);
}

.score-seal::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 2px solid #211c14;
  border-radius: 50%;
}

.score-seal strong {
  position: relative;
  z-index: 1;
  font-size: clamp(7rem, 14vw, 13rem);
  line-height: 0.8;
}

.score-seal span {
  position: relative;
  z-index: 1;
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 3px solid currentColor;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 900;
}

.score-copy h2 {
  max-width: 11ch;
}

.evidence-list {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2.5rem;
}

.evidence-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}

.evidence-item svg {
  padding: 0.45rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-sizing: content-box;
  color: var(--red-dark);
}

.evidence-item div {
  display: grid;
  gap: 0.32rem;
}

.evidence-item strong {
  font-size: 1.05rem;
}

.evidence-item span {
  color: #55492f;
  line-height: 1.4;
}

.confidence-note {
  margin-top: 2.5rem;
  font-style: italic;
  font-weight: 650;
}

.local-section {
  padding-block: var(--section-space);
  background: color-mix(in srgb, var(--yellow) 36%, var(--paper));
}

.local-section__header h2 {
  max-width: 12ch;
}

.local-section__header p {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.local-layout {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.55fr);
  gap: 1.2rem;
  align-items: stretch;
}

.map-canvas {
  position: relative;
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: var(--paper-strong);
  background-image:
    linear-gradient(27deg, transparent 47%, color-mix(in srgb, var(--ink) 13%, transparent) 48% 49%, transparent 50%),
    linear-gradient(93deg, transparent 47%, color-mix(in srgb, var(--ink) 10%, transparent) 48% 49%, transparent 50%);
  background-size: 92px 74px, 67px 86px;
}

.map-canvas::after {
  content: "";
  position: absolute;
  inset: 70% auto auto -5%;
  width: 58%;
  height: 34%;
  background: color-mix(in srgb, var(--green) 23%, transparent);
  border-radius: 70% 50% 0 0;
  transform: rotate(6deg);
}

.map-switch {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  display: flex;
  gap: 0.25rem;
  background: var(--paper-strong);
  box-shadow: 0 8px 22px rgba(92, 53, 28, 0.13);
}

.map-switch button {
  min-height: 40px;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.map-switch button.active {
  background: var(--red);
  color: #fff8ed;
}

.city {
  position: absolute;
  z-index: 2;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(1rem, 2vw, 1.7rem);
  text-transform: uppercase;
}

.city--sj { top: 34%; left: 55%; }
.city--sc { top: 28%; left: 15%; }
.city--campbell { top: 70%; left: 28%; }

.road {
  position: absolute;
  z-index: 1;
  height: 8px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  opacity: 0.68;
}

.road--one { width: 85%; left: -8%; top: 52%; transform: rotate(11deg); }
.road--two { width: 72%; left: 22%; top: 63%; transform: rotate(-18deg); }
.road--three { width: 56%; left: 40%; top: 39%; transform: rotate(76deg); }

.map-pin {
  position: absolute;
  z-index: 3;
  border: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  color: var(--red);
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease;
}

.map-pin:hover { transform: translateY(-4px) scale(1.06); }
.map-pin span { padding: 0.3rem 0.55rem; border-radius: var(--radius-control); background: var(--paper-strong); color: var(--ink); box-shadow: 0 4px 13px rgba(60, 38, 23, 0.15); }
.map-pin--one { top: 46%; left: 63%; }
.map-pin--two { top: 54%; left: 26%; }
.map-pin--three { top: 23%; left: 47%; }

.map-list {
  position: absolute;
  inset: 5.5rem 1.25rem 1.25rem;
  z-index: 3;
  display: grid;
  align-content: start;
  gap: 0.8rem;
}

.map-list button {
  min-height: 92px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  background: var(--paper-strong);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.map-list button span,
.map-list button em {
  color: var(--red);
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 900;
}

.map-detail {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.map-detail img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.map-detail h3 {
  margin-top: 1.4rem;
  font-size: clamp(1.7rem, 2.8vw, 2.7rem);
  line-height: 0.95;
}

.map-detail__place {
  margin-top: 0.7rem;
  color: var(--red);
  font-size: 1.1rem;
  font-weight: 850;
}

.map-detail__score {
  margin-top: 1.2rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.map-detail__score strong {
  font-size: 2.6rem;
}

.map-detail__score span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--green);
  font-weight: 800;
}

.map-detail > p:not(.map-detail__place) {
  margin-block: 1.2rem;
  color: var(--muted);
  line-height: 1.45;
}

.map-detail .button {
  margin-top: auto;
}

.final-cta {
  background: var(--paper);
}

.final-cta__content {
  min-height: 780px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
}

.final-cta__copy {
  position: relative;
  z-index: 2;
  padding: var(--section-space) clamp(2rem, 6vw, 7rem) 5rem var(--page-gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.final-cta__copy::after {
  content: "";
  position: absolute;
  inset: 0 -4rem 0 auto;
  z-index: -1;
  width: 7rem;
  background: var(--paper);
  clip-path: polygon(0 0, 68% 5%, 42% 12%, 76% 19%, 45% 26%, 75% 34%, 38% 42%, 75% 50%, 43% 58%, 79% 65%, 47% 73%, 72% 81%, 44% 89%, 76% 96%, 0 100%);
}

.final-cta__copy h2 {
  max-width: 9ch;
}

.final-cta__copy > p {
  max-width: 49ch;
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.5;
}

.email-form {
  width: min(620px, 100%);
  margin-top: 2.2rem;
  display: grid;
  gap: 0.65rem;
}

.email-form label {
  font-size: 0.9rem;
  font-weight: 800;
}

.email-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

.email-form input {
  min-width: 0;
  min-height: 58px;
  padding: 0.9rem 1.15rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--paper-strong);
  color: var(--ink);
}

.form-message {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.83rem;
}

.form-message--error {
  color: var(--red-dark);
  font-weight: 800;
}

.success-message {
  margin-top: 2.2rem;
  padding: 1rem 1.3rem;
  border: 2px solid var(--green);
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--green);
  font-weight: 900;
}

.launch-seal {
  margin-top: 2rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--yellow);
  color: #211c14;
  font-weight: 900;
  transform: rotate(-2deg);
}

.final-cta__image {
  min-height: 660px;
  overflow: hidden;
}

.final-cta__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 61% center;
}

footer {
  min-height: 145px;
  padding: 2.3rem var(--page-gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 3rem;
  background: var(--red);
  color: #fff3e7;
}

footer nav {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 3rem);
  font-weight: 750;
}

footer p {
  font-weight: 800;
  white-space: nowrap;
}

.reveal-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-section[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-image-enter {
  from { opacity: 0; transform: translateX(40px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
  }

  .hero h1 {
    font-size: clamp(3.5rem, 7vw, 6rem);
  }

  .search-box {
    grid-template-columns: 1fr auto;
    border-radius: var(--radius-card);
  }

  .location-control {
    display: none;
  }

  .top-result {
    grid-template-columns: auto minmax(160px, 0.8fr) minmax(230px, 1.2fr);
  }

  .evidence-list {
    grid-template-columns: 1fr;
  }

  footer {
    grid-template-columns: auto 1fr;
  }

  footer p {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .nav-actions {
    gap: 0.45rem;
  }

  .desktop-nav,
  .desktop-cta {
    display: none;
  }

  .menu-button {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--paper-strong);
    cursor: pointer;
  }

  .mobile-nav {
    position: absolute;
    top: 68px;
    left: var(--page-gutter);
    right: var(--page-gutter);
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    display: grid;
    gap: 0.4rem;
    background: var(--paper-strong);
    box-shadow: var(--shadow);
  }

  .mobile-nav > a:not(.button) {
    padding: 0.85rem 0.75rem;
    font-size: 1.1rem;
    font-weight: 800;
  }

  .hero {
    min-height: 100dvh;
    padding-top: 6.5rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(280px, 42vh);
    align-content: center;
    gap: 1.4rem;
  }

  .hero__copy {
    justify-self: start;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(3.6rem, 10.5vw, 6rem);
  }

  .hero__visual {
    width: calc(100% + var(--page-gutter) * 2);
    margin-inline: calc(var(--page-gutter) * -1);
  }

  .hero__visual img {
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: 62% center;
    clip-path: none;
  }

  .hero__visual::before {
    display: none;
  }

  .results__grid,
  .score-grid,
  .local-layout,
  .final-cta__content {
    grid-template-columns: 1fr;
  }

  .results__statement h2,
  .score-copy h2,
  .local-section__header h2,
  .final-cta__copy h2 {
    max-width: 11ch;
  }

  .score-seal {
    width: min(500px, 82vw);
  }

  .evidence-list {
    grid-template-columns: 1fr 1fr;
  }

  .map-canvas {
    min-height: 520px;
  }

  .final-cta__content {
    min-height: 0;
  }

  .final-cta__copy {
    padding: var(--section-space) var(--page-gutter) 4rem;
  }

  .final-cta__copy::after {
    display: none;
  }

  .final-cta__image {
    min-height: 480px;
  }

  footer {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 1.8rem;
  }

  footer nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  :root {
    --section-space: 4.8rem;
  }

  h2 {
    font-size: clamp(2.7rem, 13vw, 4.4rem);
  }

  .site-header,
  .nav-shell {
    height: 68px;
  }

  .wordmark {
    font-size: 2rem;
  }

  .hero {
    min-height: 100dvh;
    padding-top: 5.5rem;
    padding-bottom: 0;
    grid-template-rows: auto minmax(260px, 38vh);
  }

  .hero h1 {
    font-size: clamp(3.4rem, 15.4vw, 5rem);
    line-height: 0.88;
  }

  .hero__copy > p {
    margin-top: 1.2rem;
    font-size: 1rem;
  }

  .search-box {
    min-height: 0;
    margin-top: 1.7rem;
    padding: 0;
    border: 0;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    background: transparent;
    box-shadow: none;
  }

  .search-box__query {
    min-height: 56px;
    padding: 0.7rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--paper-strong);
    box-shadow: var(--shadow);
  }

  .search-submit {
    width: 100%;
  }

  .cravings__header h2 {
    max-width: 10ch;
  }

  .cravings__photo {
    width: calc(100% - 2rem);
    aspect-ratio: 4 / 3;
  }

  .cravings__photo img {
    object-position: center;
  }

  .cravings__rail {
    grid-template-columns: repeat(6, 190px);
    scroll-snap-type: x mandatory;
  }

  .craving-link {
    scroll-snap-align: start;
  }

  .ranking-preview {
    padding: 0.7rem;
  }

  .top-result {
    grid-template-columns: auto 1fr;
  }

  .top-result > img {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 230px;
  }

  .rank-number {
    grid-row: 2;
  }

  .top-result__content {
    grid-column: 2;
    grid-row: 2;
  }

  .top-result__title {
    display: grid;
  }

  .price {
    text-align: left;
    color: var(--muted);
    font-size: 0.9rem;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .compact-result {
    grid-template-columns: auto 1fr auto;
  }

  .compact-score {
    grid-column: 3;
    grid-row: 1;
  }

  .compact-meta,
  .compact-result > svg {
    display: none;
  }

  .score-grid {
    gap: 3rem;
  }

  .score-seal {
    width: min(420px, 88vw);
  }

  .evidence-list {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    min-height: 420px;
  }

  .city--sc {
    left: 7%;
  }

  .map-pin--one { left: 55%; }
  .map-pin--two { left: 13%; }

  .email-form__row {
    grid-template-columns: 1fr;
  }

  .email-form__row .button {
    width: 100%;
  }

  .final-cta__image {
    min-height: 360px;
  }

  .final-cta__image img {
    object-position: 66% center;
  }

  footer nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
  }
}

@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;
  }

  .reveal-section {
    opacity: 1;
    transform: none;
  }
}

/* ─────────────────────────────────────────────────────────────────────
   Static-markup states.

   The React source mounted and unmounted these nodes; in the server-rendered
   page they are always present and JS flips an attribute or class instead, so
   each one needs an explicit hidden state here.
   ───────────────────────────────────────────────────────────────────── */

.mobile-nav[hidden] {
  display: none !important;
}

.theme-button .i-moon,
.theme-button .i-sun,
.menu-button .i-x {
  display: none;
}

:root[data-theme="light"] .theme-button .i-moon,
:root:not([data-theme]) .theme-button .i-moon,
:root[data-theme="dark"] .theme-button .i-sun {
  display: block;
}

.menu-button[aria-expanded="true"] .i-list {
  display: none;
}

.menu-button[aria-expanded="true"] .i-x {
  display: block;
}

.map-canvas .map-list {
  display: none;
}

.map-canvas--list .map-list {
  display: grid;
}

.map-canvas--list .city,
.map-canvas--list .road,
.map-canvas--list .map-pin {
  display: none;
}

/* htmx marks the in-flight form; mirror the React "Joining..." affordance. */
.email-form.htmx-request button[type="submit"] {
  opacity: 0.6;
  cursor: progress;
}

/* No JS: never leave a section stuck at opacity 0. */
.no-js .reveal-section {
  opacity: 1;
  transform: none;
}
