/* KcalScan site — Verdant.
   Shared by the landing (home.html, home-pt.html), the legal pages and the guides.
   Tokens mirror styles.css / tailwind.config.js in the app: warm stone neutrals,
   emerald brand-600 for everything interactive, evergreen for Platinum, Inter. */

:root {
  --v-canvas: #fafaf9;
  --v-surface: #ffffff;
  --v-sunken: #f5f5f4;
  --v-border: #e7e5e4;
  --v-border-strong: #d6d3d1;
  --v-ink: #1c1917;
  --v-ink-2: #44403c;
  --v-muted: #78716c;
  --v-brand-50: #ecfdf5;
  --v-brand-100: #d1fae5;
  --v-brand-500: #10b981;
  --v-brand-600: #059669;
  --v-brand-700: #047857;
  --v-evergreen: #064e3b;
  --v-gold: #b45309;
  --v-gold-tint: #fffbeb;
  --shadow-card: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-float: 0 12px 32px rgba(28, 25, 23, 0.14);
  --shadow-cta: 0 8px 20px rgba(5, 150, 105, 0.25);
  --r-card: 16px;
  --r-control: 12px;
  --maxw: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ---------- Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  background: var(--v-canvas);
  color: var(--v-ink-2);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
h4 {
  color: var(--v-ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(26px, 3.2vw, 32px);
  font-weight: 700;
}
h3 {
  font-size: 18px;
  font-weight: 600;
}
.muted {
  color: var(--v-muted);
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.eyebrow {
  display: inline-block;
  color: var(--v-brand-600);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
:focus-visible {
  outline: 2px solid var(--v-brand-500);
  outline-offset: 3px;
  border-radius: 4px;
}
.tnum {
  font-variant-numeric: tabular-nums;
}

/* Inline lucide icons — 1.5px stroke, 20px inline, 24px in tiles */
.ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ic-tile {
  width: 40px;
  height: 40px;
  border-radius: var(--r-control);
  background: var(--v-brand-50);
  color: var(--v-brand-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.ic-tile .ic {
  width: 22px;
  height: 22px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-control);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.2s ease-out,
    border-color 0.2s ease-out,
    transform 0.2s ease-out,
    box-shadow 0.2s ease-out;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--v-brand-600);
  color: #fff;
}
.btn-primary:hover {
  background: var(--v-brand-700);
}
.btn-primary.btn-hero {
  box-shadow: var(--shadow-cta);
}
.btn-secondary {
  background: var(--v-surface);
  color: var(--v-ink);
  border-color: var(--v-border-strong);
}
.btn-secondary:hover {
  border-color: var(--v-muted);
}
.btn-ghost {
  color: var(--v-brand-600);
  padding: 0 12px;
}
.btn-ghost:hover {
  background: var(--v-brand-50);
}
.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.btn-on-dark {
  background: #fff;
  color: var(--v-evergreen);
}
.btn-on-dark:hover {
  background: var(--v-brand-50);
}

/* ---------- Cards ---------- */
.card {
  background: var(--v-surface);
  border: 1px solid var(--v-border);
  border-radius: var(--r-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.card h3 {
  margin-bottom: 6px;
}
.card p {
  font-size: 15px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 249, 0.92);
  border-bottom: 1px solid var(--v-border);
}
@supports (backdrop-filter: blur(1px)) {
  .nav {
    backdrop-filter: saturate(1.2) blur(10px);
  }
}
.nav-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--v-ink);
  font-size: 17px;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--v-ink-2);
}
.nav-links a {
  padding: 6px 0;
}
.nav-links a:hover {
  color: var(--v-brand-600);
}
.nav-cta {
  margin-left: 0;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--v-ink);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-control);
  cursor: pointer;
}
.nav-toggle .ic {
  width: 24px;
  height: 24px;
}
.nav-toggle .ic-x {
  display: none;
}
.nav-toggle[aria-expanded='true'] .ic-menu {
  display: none;
}
.nav-toggle[aria-expanded='true'] .ic-x {
  display: block;
}

/* ---------- Landing sections ---------- */
section {
  padding: 72px 0;
}
.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 36px;
}
.section-head p {
  margin-top: 10px;
  font-size: 16px;
}
.hero {
  padding: 56px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  margin-bottom: 16px;
}
.lede {
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.5;
  max-width: 40ch;
  color: var(--v-ink-2);
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 28px 0 14px;
}
.trust {
  font-size: 13px;
  color: var(--v-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.trust .ic {
  width: 16px;
  height: 16px;
  color: var(--v-brand-600);
}

/* Phone frame — a real device edge on a light ground: white bezel, strong hairline, float shadow */
.device {
  background: var(--v-surface);
  border: 1px solid var(--v-border-strong);
  border-radius: 44px;
  padding: 10px;
  margin: 0 auto;
  max-width: 300px;
  box-shadow: var(--shadow-float);
}
.device img {
  width: 100%;
  height: auto;
  border-radius: 34px;
}

.what {
  padding: 0 0 8px;
}
.what .card {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 28px;
  background: var(--v-sunken);
  border: 0;
  box-shadow: none;
}
.what h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

/* Numbered steps: a real sequence, so the numerals carry information */
.step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  background: var(--v-brand-600);
  color: #fff;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}

.spot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 28px 0;
}
.spot + .spot {
  border-top: 1px solid var(--v-border);
}
.spot.reverse .spot-txt {
  order: 2;
}
.spot .device {
  max-width: 270px;
}
.spot h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}
.spot p {
  font-size: 16px;
  max-width: 46ch;
}

.goals .card strong {
  display: block;
  color: var(--v-ink);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.disclaimer {
  font-size: 13px;
  max-width: 72ch;
  margin: 32px auto 0;
  text-align: center;
  color: var(--v-muted);
}

.testimonials blockquote {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.testimonials blockquote p {
  font-size: 16px;
  color: var(--v-ink-2);
}
.testimonials cite {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--v-ink);
  margin-top: auto;
}

/* Official Google Play badge (hotlinked per Google's badge guidelines) */
.play-badge {
  display: inline-block;
}
.play-badge img {
  height: 56px;
  width: auto;
}
/* App Store badge: the markup sits in the IOS-LAUNCH comment blocks of
   home*.html until the listing is live. Everything it needs is already here, so
   uncommenting it takes no CSS: the base rule and image height below, the
   sticky-bar height in the max-width 820px block, and the placement in the
   "Device-aware CTA order" section (desktop last, hidden on Android, first on
   iOS). All of it is inert while the markup stays commented out. */
.store-badge {
  display: inline-block;
}
.store-badge img {
  height: 48px;
  width: auto;
}

/* ---------- Device-aware CTA order ----------
   The inline <head> script in home*.html puts one of these classes on <html>.
   Without JS none applies and the markup order stands (web app, Play badge).
   The hero and the evergreen band share the .hero-cta row class, so one
   selector pins both. .store-badge is pre-staged for the IOS-LAUNCH markup. */
/* Desktop: today's order, pinned, App Store badge appended last. */
.ua-desktop .hero-cta .btn {
  order: 0;
}
.ua-desktop .hero-cta .play-badge {
  order: 1;
}
.ua-desktop .hero-cta .store-badge {
  order: 2;
}
/* Android: the Play badge leads; the web app is the secondary path. An Android
   phone cannot install from the App Store, so that badge goes away entirely. */
.ua-android .hero-cta .play-badge {
  order: 0;
}
.ua-android .hero-cta .btn {
  order: 1;
}
.ua-android .hero-cta .store-badge,
.ua-android .sticky-cta .store-badge {
  display: none;
}
.ua-android .hero-cta .btn-primary,
.ua-android .sticky-cta .btn-primary {
  background: var(--v-surface);
  color: var(--v-ink);
  border-color: var(--v-border-strong);
  box-shadow: none;
}
.ua-android .hero-cta .btn-primary:hover,
.ua-android .sticky-cta .btn-primary:hover {
  background: var(--v-surface);
  border-color: var(--v-muted);
}
.ua-android .final-cta .btn-on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.ua-android .final-cta .btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.1);
}
/* iOS: no Play install path, so the web app is the only CTA until the
   App Store badge ships (IOS-LAUNCH blocks), and that badge then leads. */
.ua-ios .hero-cta .play-badge,
.ua-ios .sticky-cta .play-badge {
  display: none;
}
.ua-ios .hero-cta .store-badge {
  order: 0;
}
.ua-ios .hero-cta .btn {
  order: 1;
}
.ua-ios .sticky-cta .btn {
  flex: 1;
}

/* ---------- Pricing ---------- */
.price {
  display: flex;
  flex-direction: column;
}
.price h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--v-muted);
  letter-spacing: 0.02em;
}
.price .amount {
  font-size: 40px;
  font-weight: 700;
  color: var(--v-ink);
  margin: 6px 0 0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.price .amount span {
  font-size: 15px;
  font-weight: 500;
  color: var(--v-muted);
  letter-spacing: 0;
  margin-left: 2px;
}
.price .amount-sub {
  font-size: 13px;
  color: var(--v-muted);
  margin-top: 6px;
}
.price .badge {
  align-self: flex-start;
  display: inline-block;
  background: var(--v-brand-50);
  color: var(--v-brand-700);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 10px 0 2px;
}
.price .intro {
  font-size: 13px;
  color: var(--v-brand-700);
  font-weight: 600;
  margin-top: 8px;
}
.price ul {
  list-style: none;
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.price li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--v-ink-2);
}
.price li .ic {
  width: 18px;
  height: 18px;
  color: var(--v-brand-600);
  margin-top: 2px;
}
.price .btn {
  margin-top: auto;
  width: 100%;
}
.price.gold .badge {
  background: var(--v-gold-tint);
  color: var(--v-gold);
}
.price.gold h3 {
  color: var(--v-gold);
}
/* Platinum = evergreen surface, white text: the app's Platinum identity */
.price.featured {
  background: var(--v-evergreen);
  border-color: var(--v-evergreen);
  color: rgba(255, 255, 255, 0.86);
}
.price.featured h3,
.price.featured .amount,
.price.featured li {
  color: #fff;
}
.price.featured .amount span,
.price.featured .amount-sub {
  color: rgba(255, 255, 255, 0.72);
}
.price.featured .badge {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.price.featured .intro {
  color: var(--v-brand-100);
}
.price.featured li .ic {
  color: var(--v-brand-500);
}
.note {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--v-muted);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 820px;
  margin: 0 auto;
}
details.card {
  padding: 0;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--v-ink);
  list-style: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary .ic {
  color: var(--v-muted);
  transition: transform 0.2s ease-out;
}
details[open] summary .ic {
  transform: rotate(180deg);
}
details[open] summary {
  color: var(--v-brand-700);
}
details .answer {
  padding: 0 22px 20px;
}
details .answer a {
  color: var(--v-brand-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Final CTA: the one evergreen moment on the page ---------- */
.final-cta {
  padding: 0 0 72px;
}
.final-cta .band {
  background: var(--v-evergreen);
  border-radius: 24px;
  padding: 56px 24px;
  text-align: center;
}
.final-cta h2 {
  color: #fff;
  margin-bottom: 8px;
}
.final-cta .band > p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
}
.final-cta .hero-cta {
  justify-content: center;
  margin-bottom: 0;
}

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  display: none;
}
@media (max-width: 820px) {
  .sticky-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--v-surface);
    border-top: 1px solid var(--v-border);
    box-shadow: 0 -8px 24px rgba(28, 25, 23, 0.08);
  }
  .sticky-cta .play-badge img {
    height: 44px;
  }
  /* Same 56:48 ratio as the hero pairing (the Play PNG carries its own padding). */
  .sticky-cta .store-badge img {
    height: 38px;
  }
  .sticky-cta .btn {
    min-height: 44px;
  }
  body {
    padding-bottom: 84px;
  }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--v-border);
  padding: 36px 0;
  text-align: center;
  font-size: 13px;
  color: var(--v-muted);
}
.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--v-ink-2);
}
.footer-links a:hover {
  color: var(--v-brand-600);
}
.footer .legal {
  margin-top: 6px;
}
.footer .legal a {
  color: var(--v-muted);
  margin: 0 6px;
}

/* ---------- Document pages (terms, privacy, guides) ---------- */
article {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 20px 72px;
}
article a {
  color: var(--v-brand-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}
article a:hover {
  color: var(--v-brand-700);
}
.crumbs {
  font-size: 13px;
  color: var(--v-muted);
  margin-bottom: 18px;
}
.crumbs a {
  color: var(--v-muted);
  text-decoration: none;
}
article h1 {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 8px;
}
.byline {
  font-size: 13px;
  color: var(--v-muted);
  margin-bottom: 32px;
}
article h2 {
  font-size: clamp(19px, 2.4vw, 22px);
  font-weight: 600;
  margin: 36px 0 10px;
}
article h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}
article p,
article li {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--v-ink-2);
}
article p + p {
  margin-top: 12px;
}
article ul,
article ol {
  margin: 12px 0 12px 22px;
}
article li {
  margin: 6px 0;
}
article strong {
  color: var(--v-ink);
  font-weight: 600;
}
article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--v-sunken);
  padding: 1px 6px;
  border-radius: 6px;
}
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14.5px;
}
article th,
article td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--v-border);
  vertical-align: top;
}
article th {
  font-weight: 600;
  color: var(--v-ink);
  font-size: 13px;
}
.table-scroll {
  overflow-x: auto;
}
.callout {
  background: var(--v-brand-50);
  border: 1px solid var(--v-brand-100);
  border-radius: var(--r-control);
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 14.5px;
  color: var(--v-ink-2);
}
.callout.warn {
  background: var(--v-gold-tint);
  border-color: #fde68a;
}
.contact-card {
  background: var(--v-surface);
  border: 1px solid var(--v-border);
  border-radius: var(--r-card);
  padding: 22px;
  margin-top: 40px;
  box-shadow: var(--shadow-card);
}
.contact-card h2 {
  margin-top: 0;
}
.doc-footer {
  border-top: 1px solid var(--v-border);
  padding: 32px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--v-muted);
}
.doc-footer a {
  color: var(--v-muted);
  margin: 0 10px;
  text-decoration: none;
}
.doc-footer a:hover {
  color: var(--v-brand-600);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  section {
    padding: 56px 0;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    gap: 4px;
    background: var(--v-surface);
    padding: 10px;
    border: 1px solid var(--v-border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-float);
  }
  .nav-links a {
    padding: 12px 14px;
    border-radius: var(--r-control);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-links a:hover {
    background: var(--v-sunken);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .nav-cta {
    display: none;
  }
  .hero {
    padding-top: 36px;
  }
  .hero-grid,
  .spot {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .spot.reverse .spot-txt {
    order: 0;
  }
  .device {
    max-width: 250px;
  }
  .final-cta .band {
    padding: 44px 20px;
    border-radius: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  details summary .ic {
    transition: none;
  }
}
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  max-width: 860px;
  margin: 0 auto;
}
/* Guide pages */
.cta-card {
  background: var(--v-brand-50);
  border: 1px solid var(--v-brand-100);
  border-radius: var(--r-card);
  padding: 24px;
  margin: 36px 0 20px;
  text-align: center;
}
.cta-card h2,
.cta-card h3 {
  margin-top: 0;
}
.cta-card p {
  margin-bottom: 14px;
}
.cta-card .btn {
  background: var(--v-brand-600);
  color: #fff;
}
.cta-card .btn:hover {
  background: var(--v-brand-700);
}
.fineprint {
  font-size: 12px;
  color: var(--v-muted);
}
