/* Ownplate website styles (the sales page, the Mealime switch guide and the privacy page).
   Plain CSS, no framework, no web fonts. Colors match the app (app/styles.css) and are tokens on
   :root; dark mode follows the system setting. Phone first: one column, big text, buttons at least
   48px tall. Wider screens (760px and up) get more columns. */

/* ---------- colour tokens ---------- */
:root {
  --bg: #fbf5ea;
  --surface: #fffaf2;
  --surface-2: #f3e8d4;
  --ink: #2b2118;
  --muted: #5f4f40;
  --line: #e0cfb4;
  --tomato: #b53a22;
  --tomato-ink: #9b2e1a;
  --on-accent: #ffffff;
  --herb: #3f6e3a;
  --herb-soft: #e3eedc;
  --on-herb: #ffffff;
  --focus: #1f5aa6;
  --band: #2b2118;
  --on-band: #fbf5ea;
  --on-band-muted: #d9c9b2;
  --shadow: 0 10px 30px rgba(60, 35, 10, 0.16);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1814;
    --surface: #26201a;
    --surface-2: #322a21;
    --ink: #f6ecdd;
    --muted: #c9b9a2;
    --line: #4a4036;
    --tomato: #ef7458;
    --tomato-ink: #ffb09f;
    --on-accent: #1c1814;
    --herb: #9ccf8f;
    --herb-soft: #26331f;
    --on-herb: #1c1814;
    --focus: #8ab8ff;
    --band: #322a21;
    --on-band: #f6ecdd;
    --on-band-muted: #c9b9a2;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(38px, 10vw, 66px); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 7vw, 40px); font-weight: 800; }
h3 { font-size: 22px; font-weight: 750; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 14px; padding-left: 1.3em; }
li { margin: 6px 0; }
img { display: block; max-width: 100%; }

a { color: var(--tomato-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink); color: var(--bg);
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.narrow { max-width: 760px; }
.measure > * { max-width: 760px; }

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

.muted { color: var(--muted); }
.small { font-size: 16px; }
.lede { font-size: clamp(20px, 5vw, 24px); line-height: 1.45; }
.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  font-weight: 750;
  color: var(--herb);
}

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img { width: 40px; height: 40px; }
.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
}
.header-link:hover { border-color: var(--tomato); }

/* ---------- buttons ---------- */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 2px solid transparent;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.btn-primary {
  background: var(--tomato);
  color: var(--on-accent);
  box-shadow: var(--shadow);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--surface-2); }

/* ---------- sections ---------- */
section { padding: 56px 0; }
section:not(.band) + section:not(.band) { padding-top: 0; }
.section-head { margin-bottom: 28px; }
.section-head p { margin-top: 12px; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 36px; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { max-width: 34em; }
.hero-mark { width: 84px; height: 84px; margin-bottom: 22px; }
.platforms { color: var(--muted); font-size: 16px; }

/* ---------- screenshot strip ---------- */
.shots {
  padding: 8px 0 48px;
}
.shot-row {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 8px 20px 18px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shot-row li {
  flex: 0 0 68%;
  max-width: 280px;
  margin: 0;
  scroll-snap-align: center;
}
.phone {
  position: relative;
  margin: 0;
  padding: 10px;
  border-radius: 38px;
  background: var(--ink);
  box-shadow: var(--shadow);
}
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 390 / 844;
  /* Neutral placeholder shown until the real screenshot file is added. */
  background:
    url("img/icon.svg") center 42% / 34% no-repeat,
    linear-gradient(180deg, var(--surface-2), var(--line));
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent; /* hides the broken-image alt text if the file is missing */
}
.phone-screen img.missing { visibility: hidden; }
.shot-row figure { margin: 0; }
.shot-row figcaption {
  margin-top: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  margin: 0;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); }
.card-icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--herb-soft);
  color: var(--herb);
}
.card-icon svg {
  width: 30px; height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Mealime band ---------- */
.band {
  background: var(--band);
  color: var(--on-band);
}
.band h2 { color: var(--on-band); }
.band p { max-width: 40em; }
.band .band-lede { margin-top: 16px; }
.band .eyebrow { color: var(--on-band-muted); }
.band .fine { color: var(--on-band-muted); font-size: 15px; margin-top: 22px; }
.band a.btn-secondary {
  color: var(--on-band);
  border-color: var(--on-band);
}
.band a.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}
caption {
  padding: 18px 18px 6px;
  text-align: left;
  font-weight: 700;
}
th, td {
  padding: 14px 14px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}
thead th {
  border-top: 0;
  font-size: 16px;
  background: var(--surface-2);
}
tbody th { font-weight: 600; }
.plans th[scope="col"]:not(:first-child),
.plans td { text-align: center; width: 30%; }
.yes { color: var(--herb); font-weight: 800; }
.no { color: var(--muted); }
.price-row th, .price-row td { font-size: 19px; font-weight: 800; }
.price-row td { color: var(--ink); }
.note {
  margin-top: 18px;
  padding: 16px 20px;
  border-left: 5px solid var(--herb);
  background: var(--herb-soft);
  border-radius: 0 14px 14px 0;
  font-weight: 600;
}

/* Comparison table on the switch guide: rows turn into stacked cards on phones. */
.compare td, .compare th { font-size: 16px; }
.after-table { margin-top: 14px; }
.compare tr.ours { background: var(--herb-soft); }
@media (max-width: 759px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { padding: 14px 18px; border-top: 1px solid var(--line); }
  .compare tbody tr:first-child { border-top: 0; }
  .compare th, .compare td { border: 0; padding: 4px 0; }
  .compare tbody th { font-size: 20px; padding-bottom: 6px; }
  .compare td::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 20px;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 24px;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 20px 20px; color: var(--muted); }

/* ---------- steps (switch guide) ---------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 20px 20px 20px 78px;
  min-height: 84px;
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px; top: 18px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--tomato);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 20px;
}
.steps strong { display: block; font-size: 19px; margin-bottom: 4px; }
.steps span { color: var(--muted); }

/* ---------- article pages ---------- */
.breadcrumb { padding-top: 18px; font-size: 16px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "\203A"; margin-right: 6px; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 48px; }
.breadcrumb [aria-current] { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); }

.article h1 { font-size: clamp(36px, 9vw, 56px); margin-bottom: 16px; }
.article h2 { margin: 44px 0 16px; font-size: clamp(26px, 6.5vw, 34px); }
.article h3 { margin: 26px 0 8px; }
.article .updated { color: var(--muted); font-size: 16px; }
.article section { padding: 0; }
.callout {
  margin: 22px 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.callout > :first-child { margin-top: 0; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.site-footer li { margin: 0; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
}

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
  .actions { flex-direction: row; flex-wrap: wrap; }
}

@media (min-width: 760px) {
  .wrap { padding: 0 32px; }
  section { padding: 80px 0; }
  .hero { padding: 72px 0 56px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .shot-row {
    justify-content: center;
    gap: 36px;
    overflow: visible;
    padding: 8px 32px 18px;
  }
  .shot-row li { flex: 0 1 236px; }
  .shot-row li:nth-child(2) { transform: translateY(-18px); }
  th, td { padding: 16px 20px; }
}
