/* ParseNutrition site stylesheet — "warm data-lab" system.
   Rules: no shadows anywhere, 1px sepia hairlines instead of elevation,
   sharp 4-6px corners, one saturated accent (rust), monospace numerals. */

:root {
  color-scheme: light;
  --accent: #b24a33;
  --accent-text: #b24a33;
  --accent-strong: #a04530;
  --accent-ink: #ffffff;
  --bg: #faf5ec;
  --surface: #fffdf7;
  --surface-soft: #f3ecdd;
  --surface-warm: #f8f1e4;
  --ink: #3d2e1f;
  --muted: #7d6b55;
  --rule: #e8dbc7;
  --dark: #1e1813;
  --dark-2: #2a2219;
  --cream: #f4ebdb;
  --sand: #c9a46f;
  --taupe: #8a7358;
  --max: 1120px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --accent: #d06b50;
    --accent-text: #d06b50;
    --accent-strong: #b24a33;
    --bg: #1e1813;
    --surface: #2a2219;
    --surface-soft: #271f17;
    --surface-warm: #3a2620;
    --ink: #f4ebdb;
    --muted: #a89683;
    --rule: #3a2e24;
    --dark: #17120e;
    --dark-2: #2a2219;
    --cream: #f4ebdb;
    --sand: #e0c7a8;
    --taupe: #a89683;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.num {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 12px clamp(18px, 4vw, 40px);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.brand .brand-accent {
  color: var(--accent-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.current {
  color: var(--accent-text);
}

.nav-cta {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--rule) 60%, var(--ink));
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--surface-soft);
  border-color: var(--ink);
}

.hero .button.secondary {
  background: transparent;
  color: var(--cream);
  border-color: color-mix(in srgb, var(--cream) 42%, transparent);
}

.hero .button.secondary:hover,
.hero .button.secondary:focus-visible {
  background: color-mix(in srgb, var(--cream) 10%, transparent);
  border-color: color-mix(in srgb, var(--cream) 62%, transparent);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 76px clamp(20px, 5vw, 40px) 96px;
  background: #1e1813;
  color: #f4ebdb;
  overflow: hidden;
  border-bottom: 1px solid #3a2e24;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, color-mix(in srgb, #d06b50 7%, transparent) 0%, transparent 46%),
    radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, #2a2219 80%, transparent) 0%, transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  width: 100%;
  max-width: var(--max);
  min-width: 0;
  margin: 0 auto;
}

.hero-content {
  width: 100%;
  max-width: 640px;
  min-width: 0;
}

.hero-mark {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid #3a2e24;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #d06b50;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--accent-text);
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}

h1 {
  max-width: 16ch;
  margin-bottom: 14px;
  font-size: clamp(40px, 3.4vw + 22px, 72px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero-copy {
  max-width: 560px;
  margin-bottom: 24px;
  color: #a89683;
  font-size: 20px;
  overflow-wrap: break-word;
}

.hero-copy strong {
  color: #f4ebdb;
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-footnote {
  max-width: 620px;
  margin: 18px 0 0;
  color: #a89683;
  font-size: 15px;
  overflow-wrap: break-word;
}

.hero-footnote a {
  color: #d06b50;
}

/* ---------------------------------------------------------------------------
   CSS-drawn phone mockups (no screenshots exist yet). Each .phone draws a
   dark-theme app screen with pure HTML/CSS: hairline panels, mono numerals.
   --------------------------------------------------------------------------- */

.mock-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 34px);
  justify-items: center;
  max-width: var(--max);
  margin: 0 auto;
}

.mock-figure {
  margin: 0;
  min-width: 0;
  width: 100%;
  max-width: 300px;
}

.mock-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.phone {
  --p-bg: #1e1813;
  --p-surface: #2a2219;
  --p-rule: #3a2e24;
  --p-ink: #f4ebdb;
  --p-muted: #a89683;
  --p-accent: #d06b50;
  --p-sand: #e0c7a8;
  --p-taupe: #a89683;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 26px;
  background: #17120e;
}

.hero .phone,
.showcase .phone {
  border-color: #3a2e24;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 480px;
  padding: 14px 12px 12px;
  border: 1px solid var(--p-rule);
  border-radius: 18px;
  background: var(--p-bg);
  color: var(--p-ink);
  font-size: 12px;
  line-height: 1.35;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  color: var(--p-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.appbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.appbar .title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.appbar .date {
  color: var(--p-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel {
  padding: 10px;
  border: 1px solid var(--p-rule);
  border-radius: 6px;
  background: var(--p-surface);
}

.budget-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: baseline;
  color: var(--p-muted);
  font-family: var(--mono);
  font-size: 10.5px;
}

.budget-line .plus {
  color: var(--p-accent);
}

.kcal-left {
  margin: 6px 0 2px;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.kcal-left small {
  color: var(--p-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.rings {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 6px;
}

.ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--p-bg);
}

.ring.protein { background: conic-gradient(var(--p-accent) 61%, var(--p-rule) 0); }
.ring.carbs   { background: conic-gradient(var(--p-sand) 46%, var(--p-rule) 0); }
.ring.fat     { background: conic-gradient(var(--p-taupe) 48%, var(--p-rule) 0); }

.ring b {
  position: relative;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
}

.ring-label {
  display: block;
  margin-top: 4px;
  color: var(--p-muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.meal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 2px;
  border-top: 1px solid var(--p-rule);
}

.meal-row:first-child {
  border-top: 0;
}

.meal-row .meal-name {
  font-weight: 650;
}

.meal-row .meal-kcal {
  color: var(--p-muted);
  font-family: var(--mono);
  font-size: 11px;
}

.meal-row .meal-kcal.logged {
  color: var(--p-ink);
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--p-rule);
  border-radius: 4px;
  color: var(--p-ink);
  font-size: 12px;
}

.searchbox .caret {
  color: var(--p-accent);
}

.segments {
  display: flex;
  gap: 14px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid var(--p-rule);
  color: var(--p-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.segments .on {
  position: relative;
  color: var(--p-accent);
  font-weight: 800;
}

.segments .on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  background: var(--p-accent);
}

.food-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 2px;
  border-top: 1px solid var(--p-rule);
}

.food-row:first-of-type {
  border-top: 0;
}

.food-row .food-main {
  min-width: 0;
}

.food-row .food-name {
  display: block;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.food-row .food-sub {
  display: block;
  color: var(--p-muted);
  font-size: 10px;
}

.food-row .food-kcal {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
}

.food-row .food-kcal small {
  color: var(--p-muted);
  font-size: 9px;
}

.tag {
  display: inline-block;
  margin-right: 5px;
  padding: 0 4px;
  border: 1px solid var(--p-rule);
  border-radius: 2px;
  color: var(--p-muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.tag.store {
  border-color: color-mix(in srgb, var(--p-accent) 50%, var(--p-rule));
  color: var(--p-accent);
}

.fast-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: 14px auto 6px;
  border-radius: 50%;
  background: conic-gradient(var(--p-accent) 79%, var(--p-rule) 0);
}

.fast-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--p-bg);
}

.fast-center {
  position: relative;
  text-align: center;
}

.fast-center .fast-time {
  display: block;
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.fast-center .fast-sub {
  display: block;
  color: var(--p-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fast-meta {
  display: flex;
  justify-content: space-between;
  color: var(--p-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.fast-meta b {
  color: var(--p-ink);
  font-weight: 600;
}

.mock-button {
  margin-top: auto;
  padding: 9px 0;
  border: 1px solid var(--p-rule);
  border-radius: 4px;
  color: var(--p-ink);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

.mock-button.filled {
  border-color: var(--p-accent);
  background: var(--p-accent);
  color: #ffffff;
}

.exercise-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid var(--p-rule);
  border-radius: 4px;
  color: var(--p-muted);
  font-size: 10.5px;
}

.exercise-chip b {
  color: var(--p-accent);
  font-family: var(--mono);
  font-weight: 600;
}

/* --------------------------------------------------------------------------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px clamp(20px, 5vw, 40px);
  scroll-margin-top: 80px;
}

.section-heading {
  max-width: 730px;
  margin-bottom: 32px;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 2.2vw + 16px, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.section-heading p {
  color: var(--muted);
  font-size: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.showcase {
  background: var(--dark);
  color: var(--cream);
  border-top: 1px solid #3a2e24;
  border-bottom: 1px solid #3a2e24;
  scroll-margin-top: 80px;
}

.showcase .section-heading p {
  color: #a89683;
}

.showcase .eyebrow {
  color: #d06b50;
}

.showcase .mock-figure figcaption {
  color: #a89683;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}

.pro-card {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
  background: var(--surface-warm);
}

.plan-label {
  margin: 0 0 10px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan-card h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.2;
}

.plan-price {
  margin: -4px 0 14px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
}

.plan-price small {
  color: var(--muted);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
}

.plan-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

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

.subscription-note {
  max-width: 768px;
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface-soft);
}

.subscription-note h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.subscription-note p {
  margin-bottom: 0;
  color: var(--muted);
}

.subscription-note p + p {
  margin-top: 10px;
}

.safety {
  border-top: 1px solid var(--rule);
}

.download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
  border-top: 1px solid var(--rule);
}

.download .hero-footnote {
  color: var(--muted);
}

.download .hero-footnote a {
  color: var(--accent-text);
}

.launch-panel {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
}

.launch-panel .app-icon-large {
  width: 96px;
  height: 96px;
  border-radius: 18px;
}

.launch-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.legal-shell {
  max-width: 690px;
  margin: 0 auto;
  padding: 56px clamp(20px, 5vw, 32px) 88px;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 42px;
}

.legal-tabs a {
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.legal-tabs a.active {
  border-color: var(--accent);
  color: var(--accent-text);
}

.doc h1 {
  max-width: none;
  margin-bottom: 6px;
  font-size: 44px;
}

.effective {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.legal-shell h2 {
  margin: 30px 0 8px;
  font-size: 20px;
}

.body {
  color: var(--ink);
}

.body + .body {
  margin-top: 10px;
}

.body a {
  color: var(--accent-text);
}

table.body {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.body th,
table.body td {
  padding: 8px 10px;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

table.body th {
  background: var(--surface-soft);
  font-size: 13px;
}

.attribution-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 24px clamp(20px, 5vw, 40px);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent-text);
}

@media (max-width: 980px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-phone {
    display: none;
  }

  .mock-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mock-strip .mock-figure:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .hero {
    padding: 64px 20px 72px;
  }

  .hero-copy {
    font-size: 18px;
    max-width: 36ch;
    overflow-wrap: anywhere;
  }

  .section {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .doc h1 {
    font-size: 34px;
  }

  .feature-grid,
  .download {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }

  .launch-panel {
    width: min(100%, 280px);
  }
}

@media (max-width: 640px) {
  .mock-strip {
    grid-template-columns: 1fr;
  }

  .mock-strip .mock-figure:last-child {
    grid-column: auto;
  }

  .doc h1 {
    font-size: 30px;
  }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 12px;
  outline: 3px solid color-mix(in srgb, var(--accent) 40%, #ffffff);
  outline-offset: 2px;
}

.tm {
  font-size: 0.55em;
  font-weight: 600;
  vertical-align: super;
  margin-left: 1px;
}

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

  .button,
  .skip-link {
    transition: none;
  }
}
