/* Progress kcal — website. Colours and type follow the app (Theme.swift, DesignScale.swift). */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --text: #121212;
  --muted: #6E6E6B;
  --soft: #F4F4F2;
  --soft-muted: #5A5A57;
  --border: #E1E1DD;
  --card: #111111;
  --card-raised: #1C1C1C;
  --card-muted: #8E8E8A;
  --card-rail: #2C2C2C;
  --accent: #2B5BFF;
  --accent-on-card: #5C81FF;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1104px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); color: #fff; padding: 8px 14px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 16px; }

/* Wordmark: "kcal." with the dot from the app icon */
.wordmark { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.04em; text-decoration: none; color: var(--text); line-height: 1; }
.wordmark span { color: var(--accent); }

/* Header */
.site-header { position: relative; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav > a { text-decoration: none; }
.nav > a:hover { color: var(--muted); }
.lang { display: inline-flex; gap: 2px; padding: 3px; background: var(--soft); border-radius: 999px; font-size: 12px; font-weight: 600; }
.lang a { text-decoration: none; padding: 3px 9px; border-radius: 999px; color: var(--muted); }
.lang a[aria-current] { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn-pill { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--card); color: #fff !important; text-decoration: none; font-weight: 600; font-size: 13px; }
.btn-pill:hover { background: #2a2a2a; }

.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; margin-right: -10px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after { display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px; position: relative; content: ""; }
.menu summary span::before { position: absolute; top: -6px; }
.menu summary span::after { position: absolute; top: 6px; }
.menu[open] summary span { background: transparent; }
.menu[open] summary span::before { top: 0; transform: rotate(45deg); }
.menu[open] summary span::after { top: 0; transform: rotate(-45deg); }
.menu-panel { position: absolute; right: -6px; top: 48px; width: 220px; background: var(--bg); border-radius: 16px; padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.04); display: grid; gap: 2px; }
.menu-panel > a { text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 500; font-size: 15px; }
.menu-panel > a:hover { background: var(--soft); }
.menu-panel .lang { margin: 6px 10px 6px; justify-self: start; }

/* Store badge (Apple artwork, unmodified) */
.store { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.store img { height: 44px; width: auto; }
.store-note { font-size: 13px; color: var(--muted); }
.store-note b { color: var(--text); font-weight: 600; }

.eyebrow-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 600; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: 40px; padding-top: 40px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(44px, 6.2vw, 72px); margin: 22px 0 22px; letter-spacing: -0.035em; line-height: 0.98; }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 440px; margin-bottom: 32px; }

.phones { position: relative; height: 600px; }
.phone { position: absolute; width: var(--w); aspect-ratio: 402 / 874; border-radius: calc(var(--w) * 0.155); background: #0b0b0b; padding: calc(var(--w) * 0.034); box-shadow: 0 40px 80px -24px rgba(0,0,0,.35), 0 12px 24px -12px rgba(0,0,0,.25), inset 0 0 0 1.5px #2a2a2a; }
.screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--w) * 0.125); overflow: hidden; background: #fff; }
.screen img { width: 100%; height: 100%; object-fit: cover; }
.island { position: absolute; left: 50%; top: 1.6%; transform: translateX(-50%); width: 29%; height: 3.7%; background: #000; border-radius: 999px; }
.phone-front { --w: 290px; right: 0; top: 0; z-index: 2; }
.phone-back { --w: 250px; left: -4%; top: 64px; transform: rotate(-9deg); z-index: 1; }

/* Section heads */
.section { padding-top: 64px; padding-bottom: 64px; }
.section-head { font-size: clamp(32px, 4.2vw, 44px); margin-bottom: 36px; }
.section-head span { color: #A3A39E; display: block; }

/* Feature grid */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tile { grid-column: span 2; position: relative; display: flex; flex-direction: column; min-height: 360px; padding: 28px 28px 0; border-radius: 28px; background: var(--soft); overflow: hidden; }
.tile.wide { grid-column: span 3; min-height: 340px; }
.tile h3 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 8px; }
.tile p { font-size: 14px; color: var(--soft-muted); max-width: 300px; }
.tile .art { margin-top: auto; display: flex; justify-content: center; align-items: flex-end; padding-top: 28px; }
.tile.dark { background: var(--card); color: #fff; }
.tile.dark p { color: var(--card-muted); }

/* Scan illustration */
.barcode-card { width: 190px; background: #fff; border-radius: 22px 22px 0 0; padding: 26px 22px 18px; box-shadow: 0 -1px 0 rgba(0,0,0,.02); }
.barcode-card svg { width: 100%; height: 64px; }
.barcode-card .digits { font-family: var(--body); font-size: 10.5px; letter-spacing: 0.18em; text-align: center; margin-top: 6px; color: var(--text); }

/* Photo illustration */
.found { width: 100%; max-width: 280px; background: var(--card-raised); border-radius: 18px 18px 0 0; padding: 16px 18px 14px; }
.found .label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--card-muted); margin-bottom: 10px; }
.found .row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid #2a2a2a; }
.found .row:first-of-type { border-top: 0; }
.found .row b { display: block; font-size: 13px; font-weight: 600; }
.found .row small { display: block; font-size: 11px; color: var(--card-muted); }
.found .row .kcal { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Plan illustration */
.plan-card { width: 100%; max-width: 270px; background: var(--card); color: #fff; border-radius: 22px 22px 0 0; padding: 18px 20px 20px; }
.plan-card .label { font-size: 12px; color: var(--card-muted); }
.plan-card .big { font-family: var(--display); font-weight: 700; font-size: 46px; letter-spacing: -0.04em; line-height: 1.05; margin: 2px 0 12px; }
.plan-card .big small { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--card-muted); letter-spacing: 0; margin-left: 4px; }
.macros { display: flex; gap: 18px; }
.macros div { font-size: 10px; letter-spacing: 0.06em; color: var(--card-muted); font-weight: 600; }
.macros b { display: block; font-family: var(--display); color: #fff; font-size: 17px; letter-spacing: -0.02em; margin-top: 2px; }
.macros b small { font-family: var(--body); font-size: 11px; color: var(--card-muted); font-weight: 400; margin-left: 2px; letter-spacing: 0; }

/* Calendar illustration */
.cal { width: 260px; background: #fff; border-radius: 22px 22px 0 0; padding: 18px 18px 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 8px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 13px; }
.cal-grid span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cal-grid span::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.cal-grid .hit::after { background: var(--text); }
.cal-grid .today { position: relative; }
.cal-grid .today::before { content: ""; position: absolute; width: 28px; height: 28px; top: -6px; border: 1.5px solid var(--text); border-radius: 50%; }
.cal-grid .later { color: #B7B7B2; }
.cal-foot { margin-top: 12px; font-size: 11px; display: flex; align-items: center; gap: 6px; }
.cal-foot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text); }

/* Widget illustration */
.widgets { display: flex; gap: 18px; padding-bottom: 36px; }
.widget { width: 132px; height: 132px; border-radius: 30px; padding: 14px 15px; display: flex; flex-direction: column; box-shadow: 0 10px 24px -10px rgba(0,0,0,.25); }
.widget small { font-size: 10px; font-weight: 600; }
.widget-dark { background: #000; color: #fff; }
.widget-dark small { color: var(--card-muted); }
.ring { position: relative; width: 78px; height: 78px; margin: 8px auto 0; }
.ring svg { width: 78px; height: 78px; transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 16px; letter-spacing: -0.03em; }
.widget-light { background: #fff; }
.widget-light small { color: var(--muted); }
.widget-light .streak { font-family: var(--display); font-weight: 700; font-size: 36px; letter-spacing: -0.04em; line-height: 1; margin-top: 8px; }
.widget-light .streak small { font-family: var(--body); font-size: 11px; font-weight: 500; letter-spacing: 0; margin-left: 3px; }
.dots { display: flex; gap: 5px; margin-top: auto; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #1E1E1E; }
.dots i.off { background: transparent; border: 1.5px solid #C9C9C4; }
.dots i.now { background: transparent; border: 1.5px dashed var(--text); }

/* Premium */
.premium { background: var(--card); color: #fff; border-radius: 32px; padding: 56px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.premium .tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; background: #262626; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; }
.premium h2 { font-size: clamp(34px, 4.4vw, 48px); margin: 18px 0 14px; }
.premium .sub { color: var(--card-muted); font-size: 15px; max-width: 420px; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; font-size: 14px; font-weight: 500; }
.checks li { display: flex; align-items: flex-start; gap: 10px; }
.checks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.2 9.3l2.4 2.4 5.2-5.4' fill='none' stroke='%23111111' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { border-radius: 20px; padding: 18px 18px 16px; border: 1.5px solid #333; }
.plan.selected { background: #fff; color: var(--text); border-color: #fff; }
.plan .head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; gap: 8px; }
.plan .save { background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.plan .price { font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -0.03em; margin: 10px 0 4px; white-space: nowrap; }
.plan .per { font-size: 12px; color: var(--card-muted); }
.plan.selected .per { color: var(--muted); }
.plans-note { grid-column: 1 / -1; font-size: 12px; color: var(--card-muted); margin-top: 4px; }

/* Data */
.data { background: var(--soft); border-radius: 32px; padding: 52px 52px 56px; }
.data h2 { font-size: clamp(30px, 3.8vw, 40px); margin-bottom: 30px; }
.data-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.data-card { background: #fff; border-radius: 18px; padding: 20px 20px 22px; }
.data-card h3 { font-family: var(--body); font-weight: 600; font-size: 15px; letter-spacing: 0; margin-bottom: 6px; line-height: 1.3; }
.data-card p { font-size: 13.5px; color: var(--soft-muted); }
.data .more { margin-top: 22px; font-size: 14px; }
.data .more a { font-weight: 600; text-decoration: none; color: var(--accent); }

/* CTA */
.cta { text-align: center; padding-top: 88px; padding-bottom: 96px; }
.cta h2 { font-size: clamp(36px, 5vw, 52px); }
.cta p { color: var(--muted); margin: 14px 0 28px; }
.cta .store { justify-content: center; flex-direction: column; gap: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 28px; padding-bottom: 36px; font-size: 13px; color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--text); }

/* Legal pages */
.legal { display: grid; grid-template-columns: 220px minmax(0, 680px); gap: 72px; padding-top: 48px; padding-bottom: 96px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 13px; }
.toc .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.toc nav { display: grid; gap: 7px; margin-bottom: 26px; }
.toc nav a { text-decoration: none; color: var(--muted); line-height: 1.35; }
.toc nav a:hover { color: var(--text); }
.toc .lang { font-size: 12px; }
.doc .stand { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 28px; }
.doc h2 { font-size: 21px; letter-spacing: -0.015em; margin: 40px 0 12px; line-height: 1.2; }
.doc h3 { font-family: var(--body); font-weight: 600; font-size: 15px; letter-spacing: 0; margin: 22px 0 6px; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.65; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; margin: 12px 0; display: grid; gap: 8px; }
.doc a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.doc a:hover { text-decoration: underline; }
.doc .note { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.summary { background: var(--soft); border-radius: 20px; padding: 20px 24px 22px; }
.summary .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }
.summary ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.summary li { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; }
.summary li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.2 9.3l2.4 2.4 5.2-5.4' fill='none' stroke='%23ffffff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.address { font-style: normal; line-height: 1.65; font-size: 15.5px; }
.contact-box { background: var(--soft); border-radius: 20px; padding: 20px 24px; margin-bottom: 8px; }
.contact-box p { font-size: 15px; }
.contact-box a { font-weight: 600; }

.notfound { padding-top: 120px; padding-bottom: 140px; text-align: center; }
.notfound h1 { font-size: 48px; margin-bottom: 14px; }
.notfound p { color: var(--muted); margin-bottom: 8px; }
.notfound a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* Tablet */
@media (max-width: 980px) {
  .nav > a:not(.btn-pill) { display: none; }
  .nav .lang { display: none; }
  .nav .btn-pill { display: none; }
  .menu { display: block; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 24px; padding-bottom: 0; gap: 36px; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .store { justify-content: center; }
  /* Both iPhones as on the desktop, sized from the column's width (--box): the
     scanner behind on the left, tilted, the diary in front on the right and a
     little lower. They overlap by about 6 % of the box, right of the bowl. */
  .phones { --box: min(calc(100vw - 2 * var(--gutter)), 460px); width: var(--box); max-width: none;
            height: calc(var(--box) * 0.56 * 874 / 402 + var(--box) * 0.1); margin: 0 auto; }
  .phone-back { --w: calc(var(--box) * 0.46); left: calc(var(--box) * 0.04); top: 0; transform: rotate(-6deg); }
  .phone-front { --w: calc(var(--box) * 0.56); left: auto; right: 0; top: calc(var(--box) * 0.1); transform: none; }
  .premium { grid-template-columns: 1fr; padding: 40px; }
  .legal { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .toc { position: static; }
  .toc nav, .toc .eyebrow { display: none; }
}

/* Phone */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .bar { height: 60px; }
  .hero h1 { margin-top: 16px; }
  .hero .lede { font-size: 16px; margin-bottom: 24px; }
  .section { padding-top: 48px; padding-bottom: 48px; }
  .section-head { margin-bottom: 24px; }
  .bento { grid-template-columns: 1fr; gap: 10px; }
  .tile, .tile.wide { grid-column: auto; min-height: 0; padding: 22px 22px 0; }
  .tile .art { padding-top: 22px; }
  .premium { padding: 28px 20px 24px; border-radius: 24px; gap: 26px; }
  .plans { grid-template-columns: 1fr; }
  .data { padding: 30px 20px 26px; border-radius: 24px; }
  .data-cards { grid-template-columns: 1fr; }
  .cta { padding-top: 64px; padding-bottom: 72px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  .doc h2 { margin-top: 32px; }
  .summary { padding: 18px 18px 20px; }
}
