/* Public site styles: landing page, legal pages, shared-dish pages.
   Concept: a menu card on a butcher-paper table, marked up with a red crayon.
   Two typefaces, both self-hosted (SIL OFL): Fraunces for anything a menu would
   print, Instrument Sans for everything the app or we say. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-opsz-normal.069cb90e11a3.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-italic.701ae03b5183.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght-normal.fa41c43a3d8e.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --kraft: #e3d2b5;        /* butcher-paper table */
  --kraft-deep: #d3bd98;
  --sheet: #fffcf4;        /* menu card */
  --ink: #2b1e16;          /* espresso */
  --ink-soft: #5e4b3c;
  --crayon: #c5311b;       /* red wax crayon: the pick, and the one call to action */
  --crayon-press: #a12512;
  --butter: #f0c543;       /* highlighter for alternatives */
  --rule: rgb(43 30 22 / 18%);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* Classic scale: 16 18 21 24 28 36 48 */
  --step--1: 1rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --step-2: 1.5rem;
  --step-3: 1.75rem;
  --step-4: 2.25rem;
  --step-5: 3rem;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(4rem, 10vw, 7.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--kraft);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--sheet);
  border-radius: 0 0 8px 8px;
}
.skip-link:focus {
  top: 0;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 10px;
  background: var(--crayon);
  color: #fff;
  font: 600 var(--step-0) / 1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.button:hover {
  background: var(--crayon-press);
}
.button:active {
  transform: translateY(1px);
}
.button--plain {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.button--plain:hover {
  background: var(--ink);
  color: var(--sheet);
}
.button--small {
  min-height: 2.75rem;
  padding: 0 1.1rem;
  font-size: var(--step--1);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 620;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(2rem, 6vw, 4.5rem) var(--section);
}
.hero__title {
  font-size: clamp(3.25rem, 8.4vw, 6.25rem);
  font-weight: 540;
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.hero__lead span {
  display: block;
}
.hero__lead {
  margin-top: 1.75rem;
  font-size: clamp(var(--step-1), 2.4vw, var(--step-2));
  line-height: 1.35;
  color: var(--ink-soft);
}

/* Waitlist form ---------------------------------------------------------- */

.join {
  margin-top: 2.5rem;
  max-width: 30rem;
  scroll-margin-top: 6rem;
}
.join__label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: var(--step--1);
}
.join__row {
  display: flex;
  gap: 0.6rem;
}
.join__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0 1rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--sheet);
  color: var(--ink);
  font: 500 var(--step-0) / 1.2 var(--sans);
}
.join__input::placeholder {
  color: #8a7868;
}
.join__input[aria-invalid="true"] {
  border-color: var(--crayon);
}
.join__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.join__note {
  margin-top: 0.85rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.join__error {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--crayon-press);
}
.joined {
  margin-top: 2.5rem;
  max-width: 30rem;
  padding: 1.25rem 1.4rem;
  background: var(--sheet);
  border-left: 5px solid var(--crayon);
  border-radius: 4px;
  scroll-margin-top: 6rem;
}
.joined__title {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.15;
}
.joined p + p {
  margin-top: 0.4rem;
  color: var(--ink-soft);
}

/* The menu card ---------------------------------------------------------- */

.menu-figure {
  margin: 0;
}
.menu {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 3rem);
  background: var(--sheet);
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgb(72 45 20 / 25%),
    0 18px 36px -14px rgb(72 45 20 / 45%);
  transform: rotate(-1.1deg);
}
.menu__title {
  font-family: var(--serif);
  font-size: var(--step-3);
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.01em;
}
.menu__sub {
  margin-top: 0.25rem;
  text-align: center;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.menu__section {
  margin: 1.75rem 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-1);
}
.menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dish {
  padding-block: 0.6rem;
}
.dish__line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.dish__name {
  position: relative;
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 520;
  line-height: 1.25;
}
.dish__leader {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 2px dotted rgb(43 30 22 / 35%);
  transform: translateY(-0.28em);
}
.dish__price {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-variant-numeric: lining-nums tabular-nums;
}
.dish__desc {
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.dish__note {
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step--1);
  color: var(--crayon-press);
}
.dish--alt .dish__name {
  background: linear-gradient(transparent 58%, var(--butter) 58%, var(--butter) 92%, transparent 92%);
}
.dish--skip .dish__name,
.dish--skip .dish__price {
  color: #8a7868;
  text-decoration: line-through;
  text-decoration-color: var(--crayon);
  text-decoration-thickness: 2px;
}
.dish--skip .dish__note {
  color: var(--ink-soft);
}

/* The crayon ring around the top pick. One drawn-on moment at load. */
.crayon-ring {
  position: absolute;
  inset: -0.45em -0.8em -0.5em -0.7em;
  width: calc(100% + 1.5em);
  height: calc(100% + 0.95em);
  overflow: visible;
  pointer-events: none;
}
.crayon-ring path {
  fill: none;
  stroke: var(--crayon);
  stroke-width: 3.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .crayon-ring path {
    animation: draw-ring 0.95s cubic-bezier(0.55, 0.1, 0.25, 1) 0.45s backwards;
  }
  @keyframes draw-ring {
    from {
      stroke-dashoffset: 1;
    }
  }
}
.figure-caption {
  margin-top: 1.5rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Sections --------------------------------------------------------------- */

.section {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}
.section__title {
  font-size: clamp(var(--step-4), 5vw, var(--step-5));
  max-width: 18ch;
}
.section__intro {
  margin-top: 1.25rem;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.45;
}

/* How it works: a real sequence, so it is numbered. */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  margin: 3.5rem 0 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--serif);
  font-size: 4.5rem;
  font-weight: 480;
  line-height: 0.9;
  color: var(--crayon);
}
.steps h3 {
  font-size: var(--step-3);
}
.steps p {
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

/* Two-column text sections */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

/* App preview (illustrative) */
.preview {
  max-width: 26rem;
  margin-inline: auto;
  padding: 1.25rem;
  background: var(--sheet);
  border-radius: 28px;
  box-shadow: 0 24px 48px -24px rgb(72 45 20 / 55%);
}
.preview__context {
  padding: 0.25rem 0.5rem 0.9rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.pick {
  padding: 1.1rem 1.15rem 1.2rem;
  border: 2px solid var(--ink);
  border-radius: 18px;
}
.pick__kicker {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--crayon-press);
}
.pick__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 560;
  line-height: 1.15;
}
.pick__reason {
  margin-top: 0.55rem;
  font-size: var(--step--1);
}
.pick__basis {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.pick__action {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--sheet);
  font-weight: 600;
  font-size: var(--step--1);
}
.alt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
}
.alt strong {
  font-family: var(--serif);
  font-size: var(--step-0);
  font-weight: 540;
}
.alt span {
  color: var(--ink-soft);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.chip {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--kraft);
  font-size: var(--step--1);
  font-weight: 500;
}
.composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border: 2px solid var(--rule);
  border-radius: 999px;
  color: #8a7868;
  font-size: var(--step--1);
}
.composer__send {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--crayon);
}

/* Benefits */
.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
}
.benefits li {
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
}
.benefits li:first-child {
  padding-top: 0;
  border-top: 0;
}
.benefits h3 {
  font-size: var(--step-3);
}
.benefits p {
  margin-top: 0.6rem;
  max-width: 46ch;
  color: var(--ink-soft);
}

/* FAQ */
.faq {
  margin-top: 2.5rem;
  max-width: 46rem;
}
.faq details {
  border-top: 1px solid var(--rule);
}
.faq details:last-child {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 540;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1;
  color: var(--crayon);
}
.faq details[open] summary::after {
  content: "\2212";
}
.faq details p {
  padding-bottom: 1.5rem;
  max-width: 60ch;
  color: var(--ink-soft);
}

/* Closing call to action */
.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}
.closing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  padding-block: 2.5rem 6.5rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.site-footer a {
  display: inline-block;
  padding-block: 0.35rem;
}

/* Sticky call to action on small screens, shown once the form scrolls away */
.sticky-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: none;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--sheet);
  border-top: 1px solid var(--rule);
  box-shadow: 0 -10px 24px -18px rgb(72 45 20 / 60%);
}
.sticky-cta .button {
  width: 100%;
}

/* Sheets: legal pages, shared dishes, notices ------------------------------ */

.sheet {
  max-width: 46rem;
  margin: 1rem auto var(--section);
  padding: clamp(1.75rem, 6vw, 4rem);
  background: var(--sheet);
  border-radius: 3px;
  box-shadow: 0 18px 36px -18px rgb(72 45 20 / 45%);
}
.sheet h1 {
  font-size: clamp(var(--step-4), 6vw, var(--step-5));
}
.sheet h2 {
  margin-top: 2.5rem;
  font-size: var(--step-3);
}
.sheet h3 {
  margin-top: 1.75rem;
  font-size: var(--step-1);
}
.sheet p,
.sheet ul,
.sheet ol {
  margin-top: 0.9rem;
  max-width: 62ch;
}
.sheet ul,
.sheet ol {
  padding-left: 1.2rem;
}
.sheet li + li {
  margin-top: 0.4rem;
}
.sheet__meta {
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.notice {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: #fbf0c9;
  border-left: 5px solid var(--butter);
  border-radius: 4px;
  font-size: var(--step--1);
}

/* Shared dish page */
.shared {
  text-align: left;
}
.shared__verdict {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sheet);
  font-weight: 600;
  font-size: var(--step--1);
}
.shared__verdict--loved {
  background: var(--crayon);
  color: #fff;
}
.shared__dish {
  margin-top: 1rem;
}
.shared__where {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}
.shared__attribution {
  font-family: Roboto, Arial, sans-serif;
  font-size: 0.875rem;
  color: #5e5e5e;
}
.shared__photo {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1.75rem;
  border-radius: 6px;
  background: var(--kraft);
}
.shared__text {
  margin: 1.75rem 0 0;
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.shared__foot {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Small forms on sheets (report a page) */
.field {
  margin-top: 1.25rem;
}
.field label,
.field legend {
  font-weight: 600;
}
.field textarea {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: inherit;
}
.field ul {
  list-style: none;
  padding: 0;
}
.field li label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-weight: 400;
}
.field input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--crayon);
}
fieldset.field {
  border: 0;
  padding: 0;
  margin-inline: 0;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 56rem) {
  .hero,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-top: 1rem;
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
  .steps li {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    column-gap: 1rem;
  }
  .steps li::before {
    grid-row: span 2;
    font-size: 3.75rem;
  }
  .menu {
    transform: rotate(-0.6deg);
  }
}

@media (max-width: 30rem) {
  .join__row {
    flex-direction: column;
  }
  .site-header .button {
    display: none;
  }
  .dish__name,
  .dish__price {
    font-size: var(--step-0);
  }
}

@media (max-width: 56rem) {
  .sticky-cta.is-visible {
    display: block;
  }
}

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

@media print {
  .sticky-cta,
  .site-header .button {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
