/* caloriecat.app — the app's own language (design/caloriecat-duolingo3/shared.css):
   an #F2F2F7 page, white cards on a barely-there shadow, black ink and iOS
   greys, black pill buttons, the system font. Colour is for data only. */

:root {
  color-scheme: light;
  --page: #F2F2F7;
  --card: #FFFFFF;
  --ink: #000000;
  --ink-2: #8E8E93;
  --ink-3: #AEAEB2;
  --hair: #E5E5EA;
  --go: #34C759;
  --pro: #FF5F52;
  --car: #FFB400;
  --fat: #00C8DC;
  --water: #6EB2F7;
  --flame: #FF9F0A;
  --link: #007AFF;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, system-ui, sans-serif;
  --r-xl: 36px;
  --r: 28px;
  --shadow: 0 4px 10px rgba(0,0,0,.05);
  --wrap: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--page);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
b, strong { font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ───────── nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(242,242,247,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav .wrap { height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

/* ───────── buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { opacity: .86; }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

.store {
  display: inline-flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 26px 0 22px; border-radius: 999px;
  background: var(--ink); color: #fff;
  transition: transform .15s ease, opacity .15s ease;
}
.store:hover { opacity: .86; }
.store:active { transform: scale(.97); }
.store svg { width: 26px; height: 26px; fill: currentColor; margin-top: -3px; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 11px; font-weight: 500; opacity: .8; }
.store b { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

/* ───────── hero ───────── */
.hero { padding-top: 24px; }
.hero-card {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch;
  min-height: 640px;
}
.hero-copy { padding: 72px 56px 64px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 16px; }
h1 { font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 22px; }
.lede { font-size: 20px; color: var(--ink-2); max-width: 30ch; margin-bottom: 36px; }
.hero-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rating { display: flex; flex-direction: column; font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.rating .stars { color: var(--ink); font-size: 15px; letter-spacing: 1px; }
.rating b { color: var(--ink); }

.hero-art {
  position: relative;
  background: url(img/meadow.jpg) center 30% / cover;
  display: flex; align-items: flex-end; justify-content: center;
  padding-top: 56px;
}
.hero-art .phone { width: 300px; margin-bottom: -150px; }

/* ───────── phone frame around a real screenshot ───────── */
.phone {
  position: relative;
  aspect-ratio: 1206 / 2622;
  border-radius: 15% / 7%;
  padding: 3.4%;
  background: #1A1A1A;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 30px 60px -20px rgba(0,0,0,.35);
  flex-shrink: 0;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 12.4% / 5.7%; background: var(--page); }
/* ───────── sections ───────── */
section { padding: 120px 0 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
h2 { font-size: 44px; line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.section-head p { font-size: 19px; color: var(--ink-2); }

/* a feature: copy on one side, the screen on the other, all on one card */
.feature {
  background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px;
  padding: 64px 72px 0; overflow: hidden;
}
.feature + .feature { margin-top: 24px; }
.feature.flip .feature-copy { order: 2; }
.feature-copy { padding-bottom: 64px; }
.feature h3 { font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 14px; }
.feature p { font-size: 18px; color: var(--ink-2); max-width: 40ch; }
.feature .phone { width: 280px; margin: 0 auto -180px; align-self: end; }
.feature-art { align-self: end; padding-bottom: 0; height: 100%; display: flex; align-items: flex-end; min-height: 420px; }

.points { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.points li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--ink); }
.points .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }

/* the three ways in */
.ways { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.way {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--page); font-size: 15px; font-weight: 600;
}
.way svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.say {
  margin-top: 24px; display: inline-block;
  background: var(--page); border-radius: 20px 20px 6px 20px;
  padding: 12px 16px; font-size: 16px; font-weight: 500;
}

/* trends: three screens side by side */
.trio { display: flex; justify-content: center; gap: 32px; padding: 0 24px; }
.trio figure { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.trio .phone { width: 250px; }
.trio figcaption { font-size: 15px; color: var(--ink-2); text-align: center; max-width: 24ch; }
.trio figcaption b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }

/* ───────── small cards grid ───────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px; }
.tile .ico {
  width: 44px; height: 44px; border-radius: 50%; background: var(--page);
  display: grid; place-items: center; margin-bottom: 18px;
}
.tile .ico svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile .ico img { width: 26px; height: 26px; object-fit: contain; }
.tile h4 { font-size: 18px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.tile p { font-size: 15px; color: var(--ink-2); }

/* ───────── premium ───────── */
.premium {
  background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow);
  padding: 64px 72px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center;
}
.premium h2 { font-size: 40px; }
.premium .sub { font-size: 18px; color: var(--ink-2); max-width: 34ch; }
.perks { display: flex; flex-direction: column; gap: 22px; }
.perk { display: flex; gap: 16px; align-items: flex-start; }
.perk svg { width: 18px; height: 18px; stroke: var(--go); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 3px; flex-shrink: 0; }
.perk b { display: block; font-size: 17px; margin-bottom: 2px; }
.perk span { font-size: 15px; color: var(--ink-2); }

/* ───────── closing call ───────── */
.closer {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background: url(img/meadow.jpg) center 35% / cover;
  padding: 96px 24px; text-align: center;
}
.closer-card {
  background: var(--card); border-radius: var(--r-xl); box-shadow: 0 20px 40px -16px rgba(0,0,0,.25);
  max-width: 520px; margin: 0 auto; padding: 48px 40px 44px;
  display: flex; flex-direction: column; align-items: center;
}
.closer-card img { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 22px; }
.closer-card h2 { font-size: 36px; margin-bottom: 10px; }
.closer-card p { color: var(--ink-2); margin-bottom: 28px; text-wrap: balance; }

/* ───────── footer ───────── */
footer { padding: 64px 0 56px; font-size: 14px; color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer nav a:hover { color: var(--ink); }
footer .copy { margin-left: auto; }

/* ───────── text pages (privacy, support) ───────── */
.doc { max-width: 720px; margin: 32px auto 0; background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 56px 56px 48px; }
.doc h1 { font-size: 40px; margin-bottom: 8px; }
.doc .meta { color: var(--ink-2); font-size: 15px; margin-bottom: 32px; }
.doc h2 { font-size: 22px; letter-spacing: -0.01em; margin: 32px 0 10px; }
.doc p, .doc li { font-size: 17px; }
.doc ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc hr { border: 0; border-top: 1px solid var(--hair); margin: 36px 0 20px; }
.doc .note { color: var(--ink-2); font-size: 15px; }
.doc a.inline { color: var(--link); }

/* ───────── motion ───────── */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}

/* ───────── narrower screens ───────── */
@media (max-width: 960px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  .hero-card { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 48px 32px 40px; }
  .hero-art { min-height: 460px; }
  .hero-art .phone { width: 250px; margin-bottom: -170px; }
  .feature, .feature.flip { grid-template-columns: 1fr; padding: 48px 32px 0; gap: 8px; }
  .feature.flip .feature-copy { order: 0; }
  .feature-copy { padding-bottom: 32px; }
  .feature-art { min-height: 380px; }
  .feature .phone { width: 240px; margin-bottom: -150px; }
  .trio { gap: 16px; overflow-x: auto; justify-content: flex-start; padding-bottom: 8px; scroll-snap-type: x mandatory; }
  .trio figure { scroll-snap-align: center; }
  .trio .phone { width: 220px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .premium { grid-template-columns: 1fr; padding: 48px 32px; gap: 32px; }
  section { padding-top: 88px; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  h1 { font-size: 40px; }
  .lede { font-size: 18px; }
  .grid { grid-template-columns: 1fr; }
  .premium h2 { font-size: 32px; }
  .doc { padding: 40px 24px 32px; border-radius: var(--r); }
  .closer { padding: 56px 16px; }
  .closer-card { padding: 40px 24px 36px; }
  footer .copy { margin-left: 0; }
}
