/*
 * FoodLore landing page. Tokens mirror src/theme/tokens.ts and DESIGN.md §1–§4;
 * change them there first. Light only, like the app (DESIGN.md §1).
 * One deliberate difference: the display face is Literata, not the app's
 * Fraunces, whose leaning "f" Martin did not want in the large headlines.
 * Fonts are self-hosted (SIL OFL, see assets/fonts/OFL-*.txt): no third-party requests.
 */

@font-face {
  font-family: "Literata";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/literata-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Karla";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/karla-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Karla";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/karla-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Karla";
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/karla-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Caveat";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/caveat-latin-400-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --cream: #F6EEDD;
  --cream-deep: #EFE1C6;
  --parchment: #FBF6EA;
  --clay: #B25A3E;
  --clay-deep: #8E432C;
  --saffron: #DE9436;
  --olive: #7C7A50;
  --ink: #3A2C21;

  --surface-card: rgb(251 246 234 / .75);
  --surface-strong: rgb(251 246 234 / .80);
  --surface-chrome: rgb(251 246 234 / .70);
  --hairline: rgb(58 44 33 / .06);
  --ghost-border: rgb(178 90 62 / .25);
  --text-secondary: rgb(58 44 33 / .75);
  --text-meta: #555437;
  --on-clay: #FFFDF8;

  --display: "Literata", Georgia, "Times New Roman", serif;
  --body: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --r-pill: 999px;
  --r-card: 22px;
  --r-card-lg: 26px;
  --r-thumb: 14px;

  --gutter: 20px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  overflow-wrap: break-word;
  /* The tilted hero cards poke a pixel or two past the edge on narrow phones. */
  overflow-x: clip;
  background-color: var(--cream);
  /* DESIGN.md §2: saffron glow top-centre, olive glow bottom-right, cream to creamDeep. */
  /* Glows are sized to a screen, not the whole page, so they stay put as the page grows. */
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgb(222 148 54 / .30), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgb(124 122 80 / .22), transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  background-size: 100% 1000px, 100% 1000px, 100% 100%;
  background-position: top, bottom, top;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

/* DESIGN.md §2: block-print dot texture, 1px ink @ .10 on a 14px grid at 40%. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .4;
  background-image: radial-gradient(rgb(58 44 33 / .10) 1px, transparent 1.2px);
  background-size: 14px 14px;
}

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

a {
  color: var(--clay-deep);
}

a:active,
.pill:active {
  opacity: .85;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--parchment);
  border-radius: var(--r-pill);
}

/* Type roles (DESIGN.md §3) */

.accent {
  color: var(--clay-deep);
}

.hand {
  font-family: var(--hand);
  font-size: 1.45rem;
  line-height: 1.2;
}
.hand--small {
  font-size: 1.2rem;
}
.hand--kicker {
  font-size: 1.6rem;
  color: var(--olive);
}

.label {
  display: block;
  font: 600 .72rem/1.3 var(--body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-meta);
}
.label--center {
  text-align: center;
}

.meta {
  font-size: .9rem;
  color: var(--text-secondary);
}

/* Pills and links */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  font: 600 1rem/1.25 var(--body);
  text-decoration: none;
}
.pill--clay {
  background: var(--clay);
  color: var(--on-clay);
}
.pill--ghost {
  border: 1px solid var(--ghost-border);
  background: var(--surface-chrome);
  color: var(--clay-deep);
  min-height: 40px;
  padding: 8px 18px;
  font-size: .9rem;
}
/* Not a link until the store listing is public. */
.pill--soon {
  cursor: default;
}

.textlink {
  font-weight: 600;
  text-underline-offset: 4px;
}

/* Header */

.top {
  padding: 18px 0 0;
}
.top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand img {
  width: 124px;
  height: auto;
}
.top__nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.top__nav a:not(.pill) {
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}
.top__nav a:not(.pill):hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 72px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 10px 0 22px;
}
.lede {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 34rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin: 30px 0 14px;
}

.hero__art {
  position: relative;
  max-width: 430px;
  justify-self: center;
  width: 100%;
}

/* Cards (DESIGN.md §5 ParchmentCard) */

.card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 20px;
}

.rail {
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 6px;
  border-radius: 0 6px 6px 0;
  background: var(--saffron);
}

.card--featured {
  background: var(--surface-strong);
  border-radius: var(--r-card-lg);
  padding: 22px 24px 24px 28px;
  transform: rotate(-1.2deg);
}
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.card__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-thumb);
  border: 1px solid var(--hairline);
  margin-bottom: 16px;
}
.card__title {
  font-size: 1.85rem;
  line-height: 1.15;
  margin-bottom: 4px;
}
.card__title--small {
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 2px 0 4px;
}
.card__story {
  font-size: .92rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.quote {
  margin: 14px 0 0;
  padding: 2px 0 2px 16px;
  border-left: 4px solid var(--saffron);
}
.quote .hand {
  font-size: 1.6rem;
  margin-bottom: 2px;
}

.card--row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: 86%;
  margin: 14px 0 0 auto;
  transform: rotate(1.4deg);
  background: var(--surface-strong);
}
.thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--r-thumb);
  border: 1px solid var(--hairline);
}

/* DESIGN.md §7 cardIn: fade + small rise, once, no decoration beyond that. */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: card-in .5s ease both;
  }
  .rise--2 {
    animation-delay: .1s;
  }
  @keyframes card-in {
    from {
      opacity: 0;
      translate: 0 10px;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Sections */

.section {
  padding-top: 72px;
  padding-bottom: 72px;
}
.section__title {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  text-align: center;
  margin: 10px auto 40px;
  max-width: 40rem;
}
.section__title--left {
  text-align: left;
  margin: 10px 0 18px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.step {
  padding: 24px;
}
.step h3,
.feature h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 6px 0 10px;
}
.step p,
.feature p:not(.hand) {
  color: var(--text-secondary);
  font-size: 1rem;
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--clay);
  color: var(--clay-deep);
  font-size: 1.5rem;
  line-height: 1;
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: center;
}
.showcase__copy > p:not(.label) {
  color: var(--text-secondary);
  font-size: 1.08rem;
  max-width: 34rem;
}
.phone {
  margin: 0 auto;
  max-width: 300px;
  padding: 10px;
  border-radius: 40px;
  background: var(--ink);
  box-shadow: 0 18px 40px rgb(58 44 33 / .18);
}
.phone img {
  border-radius: 31px;
  aspect-ratio: 540 / 1108;
  object-fit: cover;
  object-position: top;
  max-height: 560px;
  width: 100%;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--clay);
}
/* The check glyph, drawn in parchment like the app's CheckBox. */
.ticks li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(.35em + 3px);
  width: 5px;
  height: 9px;
  border: solid var(--parchment);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.feature {
  padding: 24px;
}
.fineprint {
  text-align: center;
  margin-top: 28px;
  color: var(--text-secondary);
  font-size: .95rem;
}

/* Quote band */

.band {
  padding: 40px 0;
  background: rgb(222 148 54 / .14);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.band__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.band__photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  transform: rotate(-2deg);
  flex: none;
}
.band__quote {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  color: var(--clay-deep);
  margin-bottom: 6px;
}

/* Closing call to action */

.card--cta {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 32px;
  background: var(--surface-strong);
  border-radius: var(--r-card-lg);
}
.card--cta .section__title {
  margin: 4px auto 16px;
}
.card--cta p:not(.hand) {
  color: var(--text-secondary);
  margin: 0 auto 26px;
  max-width: 32rem;
}

/* Footer */

.foot {
  padding: 32px 0 44px;
  border-top: 1px solid var(--hairline);
}
.foot__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.foot img {
  width: 96px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.foot a {
  color: var(--text-secondary);
  font-size: .92rem;
  text-underline-offset: 3px;
}

/* Small screens: a phone column, like the app (DESIGN.md §4). */

@media (max-width: 900px) {
  .hero,
  .showcase {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }
  .hero {
    padding-top: 40px;
  }
  .steps,
  .grid3 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
  .showcase .phone {
    order: 2;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .top__nav a:not(.pill) {
    display: none;
  }
  .section {
    padding-top: 52px;
    padding-bottom: 52px;
  }
  .card--featured {
    padding: 18px 18px 20px 22px;
  }
  .card__title {
    font-size: 1.55rem;
  }
  .band__inner {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }
  .card--cta {
    padding: 32px 20px;
  }
}
