/* Caloy marketing site — minimal vanilla CSS, no frameworks */

:root {
  --green: #2EB872;
  --green-dark: #1f9b5a;
  --green-light: #d8f5e6;
  --ink: #0e1f17;
  --ink-soft: #475a52;
  --bg: #f6f9f7;
  --card: #ffffff;
  --border: #e3ece7;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(14, 31, 23, 0.06);
  --max: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 12px; color: var(--ink-soft); }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 249, 247, 0.85);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: var(--max); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); font-size: 1.2rem; }
.brand-mark { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  border: 0; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 20px rgba(46,184,114,0.35); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: #fff; }

.app-badges { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.app-badges img { height: 48px; }

/* Hero */
.hero { padding: 80px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 24px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-light); color: var(--green-dark);
  padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 700;
  margin-bottom: 18px;
}
.hero p.lead { font-size: 1.3rem; max-width: 580px; line-height: 1.5; margin: 8px 0 0; color: var(--ink-soft); }
.hero-cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 24px; margin-top: 28px; color: var(--ink-soft); font-size: 0.95rem; }
.hero-stats strong { color: var(--ink); display: block; font-size: 1.2rem; }
.hero-visual {
  background: linear-gradient(160deg, var(--green-light), #fff);
  border-radius: 28px; padding: 32px; aspect-ratio: 1; display: flex;
  align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.hero-visual .placeholder {
  width: 100%; height: 100%; border-radius: 24px;
  background: repeating-linear-gradient(45deg, #fff, #fff 14px, var(--green-light) 14px, var(--green-light) 28px);
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-weight: 600;
}

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--card); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head p { font-size: 1.1rem; }

/* Feature grid */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 880px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: #fff;
  border: 1px solid rgba(20, 60, 30, 0.06);
  border-radius: 22px;
  padding: 28px 26px;
  box-shadow: 0 18px 36px rgba(20, 60, 30, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(20, 60, 30, 0.12);
}
.feature .icon {
  width: 56px; height: 56px; border-radius: 18px;
  background: #E6F5E9;
  color: #1F7A3A;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(20, 60, 30, 0.06);
}
.feature h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.2;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.55;
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }
.step { text-align: center; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 12px;
}

/* Testimonials */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .testimonials { grid-template-columns: 1fr; } }
.testimonial {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.testimonial .stars { color: #f5b400; font-size: 1.1rem; margin-bottom: 8px; }
.testimonial blockquote { margin: 0 0 14px; font-size: 1rem; color: var(--ink); }
.testimonial cite { color: var(--ink-soft); font-style: normal; font-size: 0.9rem; font-weight: 600; }

/* FAQ */
.faq details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--green-dark); font-weight: 800; }
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { margin-bottom: 12px; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; padding: 56px 32px; border-radius: 28px;
  text-align: center; box-shadow: var(--shadow);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.92); font-size: 1.1rem; }
.cta-banner .btn-primary { background: #fff; color: var(--green-dark); }
.cta-banner .btn-primary:hover { background: #f0f0f0; }

/* Legal pages */
.legal-page { max-width: 820px; margin: 0 auto; padding: 60px 24px; }
.legal-page h1 { font-size: 2.2rem; margin-bottom: 8px; }
.legal-page .effective { color: var(--ink-soft); margin-bottom: 32px; font-size: 0.95rem; }
.legal-page h2 { font-size: 1.4rem; margin-top: 36px; margin-bottom: 12px; }
.legal-page h3 { font-size: 1.1rem; margin-top: 24px; }
.legal-page p, .legal-page li { color: #2c3a33; }
.legal-page ul { padding-left: 24px; }
.legal-page a { color: var(--green-dark); }

/* Footer */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.85);
  padding: 56px 0 32px; margin-top: 80px;
}
.site-footer h4 { color: #fff; margin: 0 0 16px; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 0.9rem; color: rgba(255,255,255,0.55);
}
@media (max-width: 600px) { .footer-bottom { flex-direction: column; gap: 12px; } }
.footer-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; margin-bottom: 12px; }

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }

/* ============================================================
   Image assets added 2026-05-11 — hero screenshot, 3-phone
   showcase row, real Caloy logo in header.
   ============================================================ */

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.hero-screenshot {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 28px;
  filter: drop-shadow(0 30px 50px rgba(20, 60, 30, 0.18));
}

/* Override the placeholder padding/aspect-ratio so the screenshot
   fills its column naturally. */
.hero-visual {
  background: transparent;
  padding: 0;
  aspect-ratio: auto;
  box-shadow: none;
}

/* Three-phone product showcase */
.showcase {
  padding: 64px 0;
  background: linear-gradient(180deg, #fff 0%, var(--green-light) 100%);
}
.phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 48px;
  margin-top: 32px;
  flex-wrap: wrap;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.phone {
  margin: 0;
  text-align: center;
  transition: transform 0.4s ease;
  flex: 0 0 250px;
  max-width: 250px;
}
.phone img {
  width: 100%;
  max-width: 250px;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 28px rgba(20, 60, 30, 0.14));
  border-radius: 22px;
}
.phone-left  { transform: rotate(-4deg) translateY(20px); }
.phone-mid   { transform: rotate(0deg)  translateY(-8px); z-index: 2; }
.phone-right { transform: rotate(4deg)  translateY(20px); }
.phone:hover { transform: scale(1.03) rotate(0deg) translateY(0); }
.phone figcaption {
  margin-top: 18px;
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
@media (max-width: 680px) {
  .phones { gap: 40px; }
  .phone-left, .phone-mid, .phone-right { transform: none; }
  .phone, .phone img { max-width: 220px; }
}

.footer-logo {
  height: 38px;
  width: auto;
  display: block;
  margin-bottom: 4px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Weekly plan / recipes section */
.meal-plan {
  padding: 96px 0;
  background: linear-gradient(180deg, var(--green-light) 0%, #fff 100%);
}
.plan-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.plan-copy .eyebrow { display: inline-block; }
.plan-copy h2 { margin-top: 14px; }
.plan-points {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}
.plan-points li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.plan-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--green);
  font-weight: 800;
  font-size: 1rem;
}
.plan-points strong { color: var(--ink); }
.plan-visual {
  display: flex;
  justify-content: center;
}
.plan-visual img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 28px;
  filter: drop-shadow(0 30px 50px rgba(20, 60, 30, 0.18));
}
@media (max-width: 820px) {
  .plan-grid { grid-template-columns: 1fr; gap: 36px; }
  .plan-visual img { max-width: 260px; }
}

/* Hero — big app-name eyebrow */

/* Hero typography hierarchy — Cal-AI-style stack but our own content:
   small kicker (AI Calorie Counter) → medium tagline (Meet Caloy) →
   huge bold H1. */
.hero-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}
.hero-tagline {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero h1 {
  font-size: 3.6rem;
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 900;
  margin: 0 0 22px;
}
@media (max-width: 820px) {
  .hero-tagline { font-size: 1.6rem; }
  .hero h1 { font-size: 2.4rem; }
}

/* Hero title — single big "Caloy: AI Calorie Counter" line (replaces
   kicker + Meet Caloy). Tagline below acts as the sub-headline. */
.hero-app-name {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 2rem;
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 900;
  margin: 0 0 12px;
  color: #79CC49 !important;
  white-space: nowrap;
}
.hero .hero-tagline {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
@media (max-width: 820px) {
  .hero-app-name {
    font-size: 2.2rem;
    line-height: 1.0;
    letter-spacing: -0.035em;
    font-weight: 900;
    margin: 0 0 12px;
    color: #79CC49 !important;
    white-space: normal;
    text-align: center;
  }
  .hero .hero-tagline { font-size: 1.6rem !important; text-align: center; }
}
@media (max-width: 480px) {
  .hero-app-name { font-size: 1.9rem; }
}
@media (max-width: 360px) {
  .hero-app-name { font-size: 1.6rem; }
}

/* Hero tagline — sized for hierarchy below the H1, brand lime green. */
.hero .hero-tagline {
  font-size: 2rem !important;
  font-weight: 800 !important;
  color: #79CC49 !important;
  line-height: 1.2;
  margin: 0 0 22px !important;
}
@media (max-width: 820px) {
  .hero .hero-tagline { font-size: 1.6rem !important; }
}
@media (max-width: 480px) {
  .hero .hero-tagline { font-size: 1.1rem !important; }
}

/* App Store badge — replaces the old text buttons + 3-stat row. */
.appstore-badge {
  display: inline-block;
  transition: transform 0.2s ease;
}
.appstore-badge:hover { transform: translateY(-2px); }
.appstore-badge img {
  height: 56px;
  width: auto;
  display: block;
}
@media (max-width: 820px) {
  .appstore-badge img { height: 48px; }
}

/* Why-choose-Caloy — horizontal-row cards (icon left, copy right).
   Distinct from Cal AI's icon-on-top vertical cards: each card is a
   wide row with an oversized colored icon disc on the left and copy
   stacked to the right. Cards float on a soft gradient panel with
   subtle left-accent border that picks up the Caloy green. */
.why {
  padding: 96px 0;
  background: linear-gradient(180deg, #fff 0%, var(--green-light) 100%);
}
.why-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.why-card {
  background: #fff;
  border-radius: 22px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  box-shadow: 0 14px 30px rgba(20, 60, 30, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(20, 60, 30, 0.12);
}
.why-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(20, 60, 30, 0.06);
  color: #1F2937;
}
.why-icon-snap     { background: #EEF2FF; color: #3B4499; }
.why-icon-plan     { background: #FCE7E7; color: #9B2C3F; }
.why-icon-progress { background: #E6F5E9; color: #1F7A3A; }
.why-card-body { flex: 1; min-width: 0; }
.why-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 4px 0 8px;
  color: var(--ink);
  line-height: 1.25;
}
.why-card p {
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
  font-size: 0.92rem;
}
@media (max-width: 980px) {
  .why-cards { grid-template-columns: 1fr; gap: 16px; }
  .why-card { padding: 22px; }
}

/* ============================================================
   Mobile-first optimization layer (added 2026-05-11)
   Tightens spacing, typography, and image sizing on phones.
   Desktop styles above are unchanged; everything here scopes
   behind max-width media queries so it only kicks in on phones.
   ============================================================ */

/* Safe-area insets for iPhones with notch / Dynamic Island */
@supports (padding: env(safe-area-inset-top)) {
  .site-header .nav {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  .site-footer { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
}

@media (max-width: 768px) {
  /* Tighter container padding on phones — recovers ~16px of horizontal space */
  .container { padding: 0 16px; }

  /* Section breathing room — desktop 72px → mobile 48px */
  section { padding: 48px 0; }
  .hero { padding: 32px 0 24px; }
  .meal-plan { padding: 56px 0; }
  .why { padding: 56px 0; }
  .showcase { padding: 40px 0; }

  /* Section heads — center, smaller bottom margin on mobile */
  .section-head { margin-bottom: 28px; }
  .section-head p { font-size: 1rem; }

  /* Hero lead paragraph slightly smaller for compact stacks; auto-centered
     since the column is full-width on phones and we want it visually balanced. */
  .hero p.lead {
    font-size: 1.05rem;
    line-height: 1.5;
    text-align: center;
    margin: 6px auto 0;
    max-width: 500px;
    padding: 0 8px;
  }
  .hero-grid > div:first-child { text-align: center; }

  /* Hero screenshot — narrower max-width so it sits comfortably */
  .hero-screenshot { max-width: 240px; }

  /* Three-phone showcase — cleaner stack on phones */
  .phones {
    gap: 32px;
    flex-direction: column;
    align-items: center;
  }
  .phone, .phone img { max-width: 240px; flex-basis: auto; }
  .phone figcaption { margin-top: 12px; font-size: 0.95rem; }

  /* Weekly plan visual — tighter */
  .plan-visual img { max-width: 240px; }
  .plan-grid { gap: 28px; }
  .plan-copy h2 { text-align: center; }
  .plan-copy > .lead { text-align: center; }
  .plan-points { margin-top: 16px; }

  /* Feature grid — keep single column on phones, tighter padding */
  .features { gap: 14px; }
  .feature { padding: 22px 20px; }
  .feature .icon { width: 48px; height: 48px; border-radius: 14px; }
  .feature .icon svg { width: 24px; height: 24px; }
  .feature h3 { font-size: 1.1rem; }

  /* Why-card — tighter padding so it doesn't dwarf the content */
  .why-card { padding: 20px 18px; gap: 14px; }
  .why-icon { width: 52px; height: 52px; border-radius: 14px; }
  .why-icon svg { width: 26px; height: 26px; }

  /* Site header — sticky compact mode on phones */
  .site-header .nav { padding-top: 10px; padding-bottom: 10px; }
  .brand-logo { height: 34px; }

  /* Footer grid — single column at narrow widths so columns don't squeeze */
  .footer-grid { gap: 28px; }
  .footer-bottom { font-size: 0.85rem; }

  /* Legal pages — looser side margin */
  .legal-page { padding: 32px 16px 48px; }
  .legal-page h1 { font-size: 1.8rem; }
  .legal-page h2 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  /* Sub-iPhone-SE territory — single-column footer, even tighter */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-screenshot { max-width: 200px; }
  .phone, .phone img { max-width: 220px; }
  .plan-visual img { max-width: 220px; }
}
