/* mealmotor.com: one stylesheet, no build step. Follows the visitor's light/dark
   setting, like the app. Dark is the default; colours are sampled from the app:
   dark mode is black cards on #1C1C1E with the #6BAE90 green, light mode is white
   cards on #F0F0F5 with the #236046 green. The engine-block mark comes from
   the app icon. Archivo is the only typeface. The home hero shows a real screenshot
   of the Home tab in a phone frame, with feature cards floating on a soft green blob. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --green: #6bae90;
  --green-deep: #2e6b4f;
  --green-soft: #173327;
  --green-wash: #0d1a14;

  --bg: #000000;
  --text: #f5f5f7;
  --muted: #9a9aa0;
  --rule: #2c2c2e;
  --link: var(--green);
  --card: #1c1c1e;
  --card-shadow: 0 0 0 1px #2c2c2e, 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  --accent-text: var(--green);
  --pill: #14261d;
  --measure: 42rem;
  --page: 72rem;
  --on-green: #000000;
  --phone-glow: rgba(107, 174, 144, 0.28);
}

@media (prefers-color-scheme: light) {
  :root {
    --green: #236046;
    --green-soft: #d7e8de;
    --green-wash: #e9f2ec;

    --bg: #f0f0f5;
    --text: #1c1c1e;
    --muted: #6c6c70;
    --rule: #dcdce1;
    --card: #ffffff;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 14px 34px -14px rgba(0, 0, 0, 0.18);
    --pill: #dcebe2;
    --on-green: #ffffff;
    --phone-glow: rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: var(--page); margin: 0 auto; padding: 0 1.25rem; }

/* The mark is a CSS mask over the app icon's outline, so it takes any colour. */
.mark {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("/mark.svg") center / contain no-repeat;
  mask: url("/mark.svg") center / contain no-repeat;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header */
.site-header .wrap-wide {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 1.2rem; letter-spacing: -0.015em;
}
.brand .mark { width: 2rem; height: 2rem; color: var(--accent-text); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 0.25rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--link); }

main { flex: 1; }
main.wrap { width: 100%; padding-top: clamp(2rem, 5vw, 3rem); padding-bottom: 4rem; }

h1, h2, h3 { letter-spacing: -0.02em; }
h1 { font-weight: 750; font-size: clamp(2rem, 5.5vw, 2.75rem); line-height: 1.08; margin: 0 0 0.9rem; }
h2 { font-weight: 700; font-size: 1.3rem; line-height: 1.25; margin: 2.75rem 0 0.6rem; }
h3 { font-weight: 700; font-size: 1.02rem; margin: 1.6rem 0 0.35rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }
li::marker { color: var(--muted); }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.95rem; }

/* ---------- Home ---------- */

body.home-page {
  background-color: var(--bg);
  background-image:
    radial-gradient(40rem 30rem at 85% 10%, var(--green-wash), transparent 70%),
    radial-gradient(30rem 24rem at 0% 70%, var(--green-wash), transparent 70%);
  background-repeat: no-repeat;
}

.hero .wrap-wide {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  align-items: center; gap: 2.5rem;
  padding-top: clamp(1.5rem, 5vw, 3.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.tagline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 0 0 1.4rem; padding: 0.4rem 0.9rem 0.4rem 0.7rem; border-radius: 999px;
  background: var(--pill); color: var(--accent-text); font-size: 0.9rem; font-weight: 600;
}
.tagline::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }

.hero h1 {
  font-size: clamp(2.7rem, 6.6vw, 4.9rem); font-weight: 750; line-height: 1.0;
  letter-spacing: -0.035em; margin-bottom: 1.3rem;
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--accent-text); }
.hero .lede { max-width: 30rem; margin-bottom: 2rem; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.soon {
  display: inline-flex; align-items: center; gap: 0.6rem; margin: 0;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  background: var(--green); color: var(--on-green); font-weight: 650; font-size: 0.98rem;
}
.soon .icon { width: 1.15rem; height: 1.15rem; }
.see-more { color: var(--text); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.see-more:hover { color: var(--link); }

/* Stage: blob, phone, floating cards. */
.stage { position: relative; min-height: 38rem; display: grid; place-items: center start; padding-left: 12%; }
.blob {
  position: absolute; inset: 6% 2% 4% 12%;
  border-radius: 58% 42% 52% 48% / 46% 54% 46% 54%;
  background: linear-gradient(150deg, var(--green-soft), var(--green-wash));
  overflow: hidden;
}
.blob .mark { position: absolute; width: 70%; aspect-ratio: 1; right: -12%; bottom: -14%; color: var(--green); opacity: 0.08; }

.phone {
  position: relative; z-index: 1;
  width: 18rem; aspect-ratio: 1206 / 2622; padding: 0.55rem; box-sizing: content-box;
  border-radius: 2.9rem; background: #0a0a0a;
  box-shadow: 0 0 0 1px #3a3a3c inset, 0 0 0 1px #000, 0 50px 90px -30px var(--phone-glow);
}
.phone picture { display: block; height: 100%; }
.screen { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2.35rem; background: #1c1c1e; }

.float {
  position: absolute; z-index: 2; width: 14rem;
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.85rem 1rem; border-radius: 1rem;
  background: var(--card); box-shadow: var(--card-shadow);
  font-size: 0.85rem; line-height: 1.4;
}
.float b { display: block; font-size: 0.95rem; margin-bottom: 0.1rem; }
.float span { color: var(--muted); }
.float .badge { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; background: var(--pill); color: var(--accent-text); flex: none; }
.float-1 { top: 12%; right: -2%; }
.float-2 { top: 45%; right: -6%; }
.float-3 { bottom: 7%; right: 4%; }

/* Feature row under the hero. */
.features { padding: 0.5rem 0 4rem; }
.features ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
}
.features li { margin: 0; padding: 0.25rem 2rem 0.25rem 0; }
.features li + li { border-left: 1px solid var(--rule); padding-left: 2rem; }
.features .badge { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 0.8rem; background: var(--card); box-shadow: var(--card-shadow); color: var(--accent-text); margin-bottom: 0.9rem; }
.features b { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }
.features p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* ---------- Legal and support pages ---------- */
.callout { padding: 1rem 1.2rem; border-left: 4px solid var(--green); background: var(--green-wash); border-radius: 0 0.6rem 0.6rem 0; }
.owner-note { padding: 0.9rem 1.1rem; border: 2px dashed #e0a93a; border-radius: 0.6rem; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.6rem 0.6rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 700; }
.table-scroll { overflow-x: auto; }

details { background: var(--card); border-radius: 0.9rem; box-shadow: var(--card-shadow); margin-bottom: 0.75rem; }
summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1rem 3rem 1rem 1.2rem; font-weight: 700;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 0.85rem;
  font-size: 1.35rem; line-height: 1; font-weight: 400; color: var(--muted);
}
details[open] summary::after { content: "\2212"; }
details > :not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; }
details[open] { padding-bottom: 0.4rem; }

.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap-wide {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; align-items: center;
  padding-top: 1.4rem; padding-bottom: 2.25rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-footer a { color: var(--muted); }

@media (max-width: 60rem) {
  .hero .wrap-wide { grid-template-columns: 1fr; }
  .stage { min-height: 0; padding: 2rem 0 0; place-items: center; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
  .blob { inset: 0 0 45% 0; }
  .phone { margin-bottom: 1rem; }
  .float { position: static; width: 100%; max-width: 24rem; }
  .features ul { grid-template-columns: 1fr; gap: 1.5rem; }
  .features li, .features li + li { border: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
