/* Caloriesbook website
   Layout: dark "plate" page — one neon ring as the signature, cards only where they hold real food data. */
:root {
  --bg: #08090a;
  --surface: #121416;
  --surface-2: #1a1d20;
  --line: #262a2e;
  --fg: #f2f4f2;
  --muted: #9aa39c;
  --brand: #0dff43;          /* logo flame green */
  --brand-ink: #04210c;      /* text on brand green */
  --brand-soft: rgba(13, 255, 67, 0.12);
  --protein: #4f8cff;
  --carbs: #ffb020;
  --fat: #ff5c8a;
  --display: "Unbounded", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f7f4; --surface: #ffffff; --surface-2: #eef1ed; --line: #dde3dc;
    --fg: #101411; --muted: #5d685f; --brand: #0a9c2c; --brand-ink: #ffffff;
    --brand-soft: rgba(10, 156, 44, 0.10); --protein: #2f6fe0; --carbs: #c97f00; --fat: #d93a6a;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f7f4; --surface: #ffffff; --surface-2: #eef1ed; --line: #dde3dc;
  --fg: #101411; --muted: #5d685f; --brand: #0a9c2c; --brand-ink: #ffffff;
  --brand-soft: rgba(10, 156, 44, 0.10); --protein: #2f6fe0; --carbs: #c97f00; --fat: #d93a6a;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* Header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--fg); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } .nav { gap: 14px; } }

/* Hero */
.hero { padding-block: 64px 48px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-block: 36px 24px; } }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin: 0 0 18px; }
h1 {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(36px, 6vw, 64px); line-height: 1.04; margin: 0 0 20px; text-wrap: balance;
}
h1 em { font-style: normal; color: var(--brand); }
.lede { font-size: 19px; color: var(--muted); max-width: 34ch; margin: 0 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill-soon {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--fg); color: var(--bg); border-radius: 14px; padding: 12px 18px; font-weight: 600;
}
.pill-soon svg { width: 20px; height: 20px; }
.ghost { color: var(--fg); text-decoration: none; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); }
.ghost:hover { border-color: var(--brand); }

/* Phone with the neon calorie ring */
.phone {
  width: 100%; max-width: 300px; margin-inline: auto; aspect-ratio: 9 / 18.5;
  background: #050607; border: 10px solid #1f2326; border-radius: 44px; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 12px; color: #f2f4f2;
  box-shadow: 0 30px 80px -30px rgba(13, 255, 67, 0.35);
}
.phone h3 { font-family: var(--display); font-size: 17px; margin: 4px 4px 2px; font-weight: 600; }
.ring-card { background: #15171a; border-radius: 20px; padding: 14px; display: flex; align-items: center; gap: 14px; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .num b { font-family: var(--mono); font-size: 22px; font-weight: 600; }
.ring .num span { font-size: 10px; color: #9aa39c; }
.arc { stroke-dasharray: 251; stroke-dashoffset: 251; animation: fill 1.6s 0.3s cubic-bezier(.3,.7,.2,1) forwards; }
.glint { stroke-dasharray: 14 400; animation: glint 2.8s 2s ease-in-out infinite; opacity: 0; }
@keyframes fill { to { stroke-dashoffset: 82; } }
@keyframes glint { 0% { stroke-dashoffset: 0; opacity: 0 } 15% { opacity: 1 } 85% { opacity: 1 } 100% { stroke-dashoffset: -169; opacity: 0 } }
.eaten small { display: block; font-size: 11px; color: #9aa39c; }
.eaten b { font-family: var(--mono); font-size: 16px; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.macro { border-radius: 12px; padding: 8px 4px; text-align: center; font-size: 10px; color: #9aa39c; }
.macro b { display: block; font-family: var(--mono); font-size: 13px; color: #f2f4f2; }
.macro i { display: block; height: 3px; border-radius: 2px; margin: 6px 6px 0; background: currentColor; }
.m-p { background: rgba(79,140,255,.14); } .m-p i { color: #4f8cff; }
.m-c { background: rgba(255,176,32,.14); } .m-c i { color: #ffb020; }
.m-f { background: rgba(255,92,138,.14); } .m-f i { color: #ff5c8a; }
.row-card { background: #15171a; border-radius: 14px; padding: 10px 12px; display: flex; justify-content: space-between; font-size: 12px; }
.row-card span:last-child { font-family: var(--mono); color: #9aa39c; }

/* Sections */
section { padding-block: 56px; }
.section-head { max-width: 640px; margin-bottom: 32px; }
h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.1; margin: 0 0 12px; text-wrap: balance; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

/* "Describe your meal" demo */
.describe { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 820px) { .describe { grid-template-columns: 1fr; } }
.describe-copy p { color: var(--muted); max-width: 52ch; }
.units { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.units li { font-family: var(--mono); font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; min-width: 0; }
.demo-input { font-family: var(--mono); font-size: 15px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; overflow-wrap: anywhere; }
.demo-input .caret { display: inline-block; width: 2px; height: 1em; background: var(--brand); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.food { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.food:last-of-type { border-bottom: 0; }
.food strong { display: block; font-weight: 600; }
.food small { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.food .kcal { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.log-btn { margin-top: 12px; width: 100%; border: 0; border-radius: 12px; padding: 12px; background: var(--brand); color: var(--brand-ink); font: 600 15px var(--body); font-variant-numeric: tabular-nums; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--bg); padding: 24px; min-width: 0; }
.feature svg { width: 26px; height: 26px; color: var(--brand); margin-bottom: 14px; }
.feature h3 { font-size: 17px; margin: 0 0 6px; font-weight: 600; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Privacy band */
.privacy-band { background: var(--surface); border-block: 1px solid var(--line); }
.privacy-band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 820px) { .privacy-band .wrap { grid-template-columns: 1fr; } }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5' fill='none' stroke='%230dff43' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); min-width: 0; }
.plan.best { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan h3 { font-family: var(--display); font-size: 20px; margin: 0; font-weight: 600; }
.price { font-family: var(--mono); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan .note { color: var(--brand); font-size: 14px; font-weight: 600; margin-top: -8px; }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; font-size: 15px; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--brand); color: var(--brand-ink); padding: 3px 10px; border-radius: 999px; }
.fine { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 760px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--brand); font-family: var(--mono); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 16px; color: var(--muted); }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 32px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* Text pages (privacy, support) */
.doc { max-width: 720px; padding-block: 48px 64px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); }
.doc h2 { font-size: 21px; margin-top: 36px; }
.doc p, .doc li { color: var(--muted); }
.doc .updated { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.contact { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-top: 24px; }
.contact code { font-family: var(--mono); font-size: 16px; color: var(--fg); user-select: all; }

@media (prefers-reduced-motion: reduce) {
  .arc { animation: none; stroke-dashoffset: 82; }
  .glint, .demo-input .caret { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Added: 4 plans, recipes, current page ---------- */
.nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }
.plans-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .plans-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .plans-4 { grid-template-columns: 1fr; } }

.recipes-band { background: var(--surface); border-block: 1px solid var(--line); }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.rcard { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; color: var(--fg); text-decoration: none; transition: transform .15s ease, border-color .15s ease; min-width: 0; }
.recipes-band .rcard { background: var(--bg); }
.rcard:hover { transform: translateY(-2px); border-color: var(--brand); }
.rimg, .rhero { display: grid; place-items: center; background:
  radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--tint) 45%, transparent), transparent 60%),
  color-mix(in srgb, var(--tint) 16%, var(--surface)); }
.rimg { height: 130px; }
.rimg span { font-size: 56px; }
.rbody { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rbody h3 { margin: 0; font-size: 18px; font-weight: 700; }
.rbody p { margin: 0; color: var(--muted); font-size: 14px; }
.rmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.rmeta span { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); }
.rmeta .mp { color: var(--protein); } .rmeta .mc { color: var(--carbs); } .rmeta .mf { color: var(--fat); }

.recipe .crumb { margin: 0 0 16px; font-size: 14px; }
.recipe .crumb a { text-decoration: none; }
.rhero { height: 190px; border-radius: 24px; border: 1px solid var(--line); margin-bottom: 22px; }
.rhero span { font-size: 92px; }
.recipe .lead2 { font-size: 18px; color: var(--muted); margin: 0 0 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tags span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.macrobar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.macrobar div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; }
.macrobar b { display: block; font-family: var(--mono); font-size: 18px; color: var(--fg); }
.macrobar small { color: var(--muted); font-size: 12px; }
.macrobar .mp b { color: var(--protein); } .macrobar .mc b { color: var(--carbs); } .macrobar .mf b { color: var(--fat); }
.ing { display: grid; gap: 6px; padding-left: 20px; }
.steps { display: grid; gap: 10px; padding-left: 22px; }
.steps li::marker { color: var(--brand); font-family: var(--mono); font-weight: 600; }
.logit { border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 480px) { .macrobar { grid-template-columns: 1fr 1fr; } .rhero span { font-size: 72px; } }
.soon { text-align: center; background: var(--bg); border: 1px dashed var(--line); border-radius: 22px; padding: 40px 20px; }
.soon-emoji { font-size: 40px; letter-spacing: 8px; margin-bottom: 10px; }
.soon h3 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0 0 8px; }
.soon p { color: var(--muted); margin: 0 auto; max-width: 46ch; }
.wrap > .soon { background: var(--surface); }

[hidden] { display: none !important; }

/* Phone picture that matches the current app (Dark, Emerald, Bold Today) */
.phone.app { gap: 8px; padding: 18px 12px 14px; box-shadow: 0 30px 80px -30px rgba(52, 211, 153, 0.35); font-family: -apple-system, "SF Pro Text", Inter, system-ui, sans-serif; }
.a-top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.a-top b { font-size: 15px; font-weight: 800; margin-right: 6px; }
.a-top small { font-size: 10px; color: #9aa39c; }
.a-fast { font-size: 10px; font-weight: 700; color: #a78bfa; background: rgba(124,58,237,.18); padding: 3px 8px; border-radius: 99px; }
.a-ring { background: #1c1c1e; border-radius: 18px; padding: 12px; display: flex; align-items: center; gap: 12px; }
.a-ring .ring { width: 92px; height: 92px; }
.a-ring .ring .num b { font-family: inherit; font-size: 19px; font-weight: 800; }
.a-ring .ring .num span { font-size: 9px; }
.phone.app .arc { stroke-dasharray: 251; stroke-dashoffset: 251; animation: fillapp 1.6s 0.3s cubic-bezier(.3,.7,.2,1) forwards; }
@keyframes fillapp { to { stroke-dashoffset: 95; } }
.a-macros { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.a-macros p { margin: 0 0 3px; font-size: 9.5px; color: #c9cdc9; white-space: nowrap; }
.a-macros p b { font-size: 13px; color: #fff; font-weight: 800; }
.a-macros i { display: block; height: 4px; border-radius: 3px; background: #33363a; overflow: hidden; }
.a-macros em { display: block; height: 100%; border-radius: 3px; }
.a-whey { background: #1c1c1e; border-radius: 16px; padding: 9px 10px; display: flex; align-items: center; gap: 9px; }
.a-scoop { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(160deg,#3b82f6,#1d4ed8); display: grid; place-items: center; flex: none; }
.a-scoop svg { width: 20px; height: 20px; }
.a-wtext { flex: 1; min-width: 0; }
.a-wtext b { display: block; font-size: 13px; color: #6ee7b7; font-weight: 800; }
.a-wtext small { font-size: 9.5px; color: #c9cdc9; }
.a-step { display: flex; align-items: center; gap: 7px; background: #2a2d31; border-radius: 99px; padding: 3px; }
.a-step span { width: 20px; height: 20px; border-radius: 50%; background: #3a3d42; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.a-step span.plus { background: #34d399; color: #04130c; }
.a-step b { font-size: 12px; color: #6ee7b7; }
.a-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.a-tile { background: #1c1c1e; border-radius: 14px; padding: 9px; display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; }
.a-ic { grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.a-tile b { font-size: 11px; color: #6ee7b7; font-weight: 800; }
.a-tile small { grid-column: 2; font-size: 9px; color: #c9cdc9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-tile em { grid-column: 3; grid-row: 1 / 3; font-style: normal; font-weight: 800; font-size: 12px; text-align: right; line-height: 1.05; }
.a-tile em i { display: block; font-style: normal; font-weight: 600; font-size: 8px; color: #9aa39c; }
.a-log { margin-top: auto; align-self: center; width: 78%; text-align: center; background: #34d399; color: #04130c; font-weight: 900; font-size: 15px; padding: 10px 0; border-radius: 99px; box-shadow: 0 6px 18px rgba(52,211,153,.35); }
.a-tabs { display: flex; justify-content: space-around; background: #232427; border-radius: 99px; padding: 6px 8px; font-size: 13px; color: #c9cdc9; }
.a-tabs span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.a-tabs small { font-size: 8.5px; font-weight: 700; }
.a-tabs .on { color: #34d399; }
@media (prefers-reduced-motion: reduce) { .phone.app .arc { animation: none; stroke-dashoffset: 95; } }
