/* Shared stylesheet for every page on www.mytablerecipes.com.
   Palette lifted from the app's design tokens (frontend-react/src/index.css)
   so the landing page and the app read as one product.

   The wordmark SVGs carry an opaque plate in the --paper colour (see
   README.md), so the wordmark must only ever sit on a --paper surface. */
/* Self-hosted fonts — the same families the app bundles via @fontsource
   (frontend-react/src/main.tsx), latin subset only. Served from our own
   origin: no third-party round trip (it cost ~2 s of render-blocking on mobile)
   and no visitor IPs sent to Google (GDPR). Licences in /fonts/. */
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/fonts/crimson-pro-latin-wght-normal.woff2) format("woff2");
}

@font-face {
  font-family: "Crimson Pro";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url(/fonts/crimson-pro-latin-wght-italic.woff2) format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
}

:root {
  --plaster: #ede5d2;
  --plaster-deep: #e5d9c4;
  --paper: #f9f5eb;
  --ink: #1b1816;
  --ink-soft: #3a312a;
  --mute: #6b5f55;
  --line: #d9cfbf;
  --primary: #5f6b3f;
  --primary-d: #4a5430;
  --accent: #b5553a;
  --on-primary: #f9f5eb;
  --measure: 720px;
  --wide: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --plaster: #16130f;
    --plaster-deep: #100e0b;
    --paper: #211c17;
    --ink: #f1ebdf;
    --ink-soft: #d8cfc0;
    --mute: #a2968a;
    --line: #38302a;
    --primary: #aebc7e;
    --primary-d: #c2cf96;
    --accent: #d97e60;
    --on-primary: #1b1816;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
}

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

.narrow {
  max-width: var(--measure);
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  display: block;
  width: 112px;
  height: auto;
  aspect-ratio: 783 / 266;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.nav a:not(.btn) {
  text-decoration: none;
  color: var(--ink-soft);
}

.nav a:not(.btn):hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .nav a:not(.btn) {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--primary-d);
}

.btn.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14.5px;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost:hover {
  background: var(--plaster);
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  font-family: "Crimson Pro", Georgia, serif;
  font-weight: 600;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6.4vw, 60px);
  line-height: 1.02;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.2vw, 38px);
  line-height: 1.1;
}

h3 {
  margin: 0 0 6px;
  font-size: 23px;
  line-height: 1.2;
}

p {
  margin: 0 0 14px;
  text-wrap: pretty;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary);
}

.lede {
  font-size: 19px;
  font-weight: 400;
  color: var(--ink-soft);
}

.muted {
  color: var(--mute);
}

/* ---------- Sections ---------- */
section {
  padding: 72px 0;
}

section+section {
  border-top: 1px solid var(--line);
}

.band {
  background: var(--plaster);
}

.hero {
  padding: 80px 0 64px;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 28px;
}

.stores {
  font-size: 14.5px;
  color: var(--mute);
}

.stores .dot {
  color: var(--accent);
}

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  color: var(--mute);
}

.proof li::before {
  content: "✓ ";
  color: var(--primary);
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 30px;
}

.tile {
  padding: 24px 24px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.tile p {
  color: var(--ink-soft);
  font-size: 16px;
}

.tile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
}

.steps {
  counter-reset: step;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 52px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- Product screenshots ---------- */
.hero-split {
  display: grid;
  gap: 64px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.phone {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  /* The bezel is a ring drawn *outside* the screenshot (box-shadow), so the
     app's own margins stay intact — a border would eat into the image and let
     the rounded corners clip the header. The dark ring stays dark in both
     themes, like a real phone. */
  border-radius: 30px;
  box-shadow:
    0 0 0 9px #1b1816,
    0 2px 4px 9px rgba(27, 24, 22, .06),
    0 30px 60px -18px rgba(27, 24, 22, .5);
  background: var(--plaster);
}

.hero-shot {
  justify-self: center;
  width: 100%;
  max-width: 290px;
  margin: 12px;
}

@media (max-width: 820px) {
  .hero-split {
    grid-template-columns: 1fr;
  }

  .hero-shot {
    max-width: 260px;
  }
}

/* Spotlights: magazine-style spreads — copy on one side, the app on the other,
   alternating sides down the page. */
.spotlight {
  display: grid;
  gap: 64px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 260px;
}

.spotlight.flip {
  grid-template-columns: 260px minmax(0, 1fr);
}

.spotlight.flip .spot-img {
  order: -1;
}

.spot-img {
  justify-self: center;
  width: 100%;
  max-width: 250px;
  margin: 12px;
}

.spotlight ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.spotlight li+li {
  margin-top: 6px;
}

.pull {
  margin: 22px 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  font-family: "Crimson Pro", Georgia, serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink);
}

@media (max-width: 820px) {

  .spotlight,
  .spotlight.flip {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  /* Stacked: headline and copy first, then the screenshot, on every spread. */
  .spotlight.flip .spot-img {
    order: 1;
  }

  .spot-img {
    max-width: 230px;
  }
}

h1 em,
h2 em {
  font-style: italic;
  font-weight: 500;
}

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 30px;
}

.plan {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.plan.featured {
  border-color: var(--primary);
}

.price {
  margin: 4px 0 6px;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
}

.price small {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--mute);
}

.plan ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 16px;
}

.plan li+li {
  margin-top: 6px;
}

/* ---------- Tables ---------- */
.table-scroll {
  overflow-x: auto;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

thead th {
  background: var(--plaster);
  font-weight: 600;
}

/* ---------- FAQ ---------- */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 17.5px;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--mute);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

/* ---------- Article pages ---------- */
.article {
  padding: 56px 0 72px;
}

.article h2 {
  margin-top: 40px;
  font-size: clamp(26px, 3.6vw, 32px);
}

.article ul,
.article ol {
  padding-left: 22px;
}

.article li+li {
  margin-top: 6px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--mute);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: var(--mute);
}

.callout {
  margin: 34px 0 0;
  padding: 26px;
  border-radius: 16px;
  background: var(--plaster);
  border: 1px solid var(--line);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ---------- Notice (the move from www → app) ---------- */
.notice {
  font-size: 14.5px;
  color: var(--ink-soft);
  background: var(--plaster-deep);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.notice p {
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
  font-size: 14.5px;
  color: var(--mute);
}

.site-footer .cols {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.site-footer .foot-h {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li+li {
  margin-top: 6px;
}

.site-footer a {
  text-decoration-color: var(--line);
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer .legal {
  margin-top: 28px;
}

@media (max-width: 480px) {
  section {
    padding: 56px 0;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .hero .actions .btn {
    width: 100%;
  }
}
