/* ==========================================================================
   CalDesk AI — marketing site (homepage)
   Clean, modern, conversion-focused. Light surface, on-brand emerald + amber.
   Honest visuals only: a real food photo in a scan viewfinder, plus text/icon
   feature cards. No fabricated app UI. Homepage only; legal/SEO subpages
   continue to use styles.css.
   ========================================================================== */

:root {
  --ink: #0b1220;
  --body-ink: #1c2534;
  --muted: #5a6577;
  --line: #e7ebf2;
  --smoke: #f5f8f6;
  --paper: #ffffff;

  --emerald: #10b981;
  --emerald-light: #34d399;
  --emerald-deep: #059669;
  --amber: #f59e0b;
  --amber-deep: #d97706;

  --grad-brand: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --grad-amber: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --grad-hero: linear-gradient(135deg, #10b981 0%, #0b8f63 55%, #075e42 100%);

  --shadow-sm: 0 2px 8px rgba(9, 38, 27, 0.06);
  --shadow-md: 0 18px 44px rgba(9, 38, 27, 0.12);
  --shadow-lg: 0 40px 90px rgba(9, 38, 27, 0.22);

  --display: "Bricolage Grotesque", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1180px;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--body-ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.03; margin: 0; color: var(--ink); }
p { margin: 0; }

.shell { width: min(var(--maxw), calc(100% - 44px)); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--emerald-deep);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-family: var(--body);
  font-weight: 700; font-size: 1rem; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 10px 24px rgba(16, 185, 129, 0.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(16, 185, 129, 0.42); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-2px); border-color: #cfe3d7; }

.appstore-badge { display: inline-flex; transition: transform 0.14s ease; }
.appstore-badge:hover { transform: translateY(-2px); }
.appstore-badge svg { height: 54px; width: auto; display: block; border-radius: 10px; box-shadow: var(--shadow-sm); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display);
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; color: var(--ink); }
.brand .glyph { width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: url("caldesk-logo.png") center / cover no-repeat; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 0.93rem; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta .btn { padding: 10px 22px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: 0.2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 78px 0 90px;
  background:
    radial-gradient(120% 80% at 85% -10%, rgba(16, 185, 129, 0.12), transparent 60%),
    radial-gradient(90% 70% at 0% 10%, rgba(245, 158, 11, 0.10), transparent 55%),
    var(--paper);
}
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); margin: 22px 0 0; }
.hero h1 .hl { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { font-size: 1.16rem; color: var(--muted); margin: 22px 0 30px; max-width: 46ch; }
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 26px; display: flex; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); }
.hero-trust b { color: var(--ink); font-weight: 700; }

/* Hero visual — a REAL food photo inside an on-brand scan viewfinder.
   No fabricated app UI: just a photo, corner brackets, an animated scan line,
   and a small label that echoes the "snap your food" action. */
.hero-media { position: relative; display: grid; place-items: center; }
.hero-media .glow { position: absolute; width: 76%; aspect-ratio: 1; border-radius: 50%; top: 50%; left: 50%;
  transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(16, 185, 129, 0.28), transparent 62%); filter: blur(16px); z-index: 0; }
.scan { position: relative; z-index: 2; width: min(420px, 90%); margin: 0; border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow-lg); }
.scan-photo { width: 100%; height: auto; display: block; aspect-ratio: 4 / 5; object-fit: cover; }
.scan-frame { position: absolute; inset: 16px; border-radius: 16px; pointer-events: none;
  --c: #6ee7b7; --l: 30px; --t: 3px;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.55));
  background:
    linear-gradient(var(--c), var(--c)) top left,
    linear-gradient(var(--c), var(--c)) top left,
    linear-gradient(var(--c), var(--c)) top right,
    linear-gradient(var(--c), var(--c)) top right,
    linear-gradient(var(--c), var(--c)) bottom left,
    linear-gradient(var(--c), var(--c)) bottom left,
    linear-gradient(var(--c), var(--c)) bottom right,
    linear-gradient(var(--c), var(--c)) bottom right;
  background-repeat: no-repeat;
  background-size:
    var(--l) var(--t), var(--t) var(--l),
    var(--l) var(--t), var(--t) var(--l),
    var(--l) var(--t), var(--t) var(--l),
    var(--l) var(--t), var(--t) var(--l);
}
.scan-line { position: absolute; left: 16px; right: 16px; height: 2px; top: 18px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #34d399, transparent);
  box-shadow: 0 0 14px 2px rgba(52, 211, 153, 0.6);
  animation: scan 3.4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes scan { 0% { top: 18px; } 50% { top: calc(100% - 18px); } 100% { top: 18px; } }
.scan-tag { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(6, 20, 14, 0.6); backdrop-filter: blur(6px); color: #eafff5;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 13px; border-radius: 999px; }
.scan-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.25); }

/* ---------- Stat / trust strip ---------- */
.stat-strip { background: var(--ink); color: #fff; }
.stat-strip .shell { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 34px 0; text-align: center; }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: -0.03em;
  background: linear-gradient(120deg, #6ee7b0, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 0.86rem; color: #9fc2b1; }

/* ---------- Sections ---------- */
section.block { padding: 92px 0; }
section.block.smoke { background: var(--smoke); }
.section-head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 14px 0 12px; }
.section-head p { font-size: 1.1rem; color: var(--muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow-sm); }
.step .n { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--grad-brand); color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.1rem; box-shadow: 0 8px 18px rgba(16, 185, 129, 0.3); }
.step:nth-child(2) .n { background: var(--grad-amber); box-shadow: 0 8px 18px rgba(217, 119, 6, 0.3); }
.step:nth-child(3) .n { background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 8px 18px rgba(5, 150, 105, 0.3); }
.step h3 { font-size: 1.3rem; margin: 0 0 8px; }
.step p { color: var(--muted); font-size: 0.98rem; }

/* Feature grid — honest, text + icon cards (no screenshots). */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-sm); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature .fi { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--grad-brand); color: #fff; box-shadow: 0 8px 18px rgba(16, 185, 129, 0.28); }
.feature:nth-child(3n-1) .fi { background: var(--grad-amber); box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28); }
.feature .fi svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.18rem; margin: 0 0 6px; }
.feature p { color: var(--muted); font-size: 0.96rem; }

/* Feature split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split.reverse .split-media { order: -1; }
.split h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 16px; }
.split > div > p { color: var(--muted); font-size: 1.06rem; margin-bottom: 22px; }
.checklist { display: grid; gap: 16px; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; list-style: none; }
.checklist .tick { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--emerald);
  color: #fff; display: grid; place-items: center; font-size: 0.82rem; font-weight: 800; }
.checklist strong { display: block; font-family: var(--display); font-weight: 700; color: var(--ink); }
.checklist span { color: var(--muted); font-size: 0.95rem; }
.split-media { display: grid; place-items: center; position: relative; }

/* Brand panel — an on-brand illustrative card used beside feature copy.
   Icon + feature-name chips. Clearly a marketing graphic, not an app screen. */
.brand-panel { position: relative; width: min(440px, 100%); aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 44px; text-align: center; }
.brand-panel.amber { background: var(--grad-amber); }
.brand-panel::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 20% 12%, rgba(255, 255, 255, 0.22), transparent 60%); }
.brand-panel > * { position: relative; }
.bp-icon { width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.18); backdrop-filter: blur(4px); }
.bp-icon svg { width: 48px; height: 48px; color: #fff; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.bp-chips span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; padding: 7px 13px; }

/* Pricing */
.price2 { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 24px; justify-content: center; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 32px; background: var(--paper); box-shadow: var(--shadow-sm); }
.plan.hot { border: 2px solid var(--emerald); box-shadow: var(--shadow-md); position: relative; }
.plan.hot::after { content: "Most popular"; position: absolute; top: -13px; left: 32px; background: var(--emerald); color: #fff;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.plan .pn { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.plan .pp { font-family: var(--display); font-weight: 800; font-size: 2.7rem; color: var(--ink); letter-spacing: -0.04em; margin: 8px 0 4px; }
.plan .pp small { font-family: var(--mono); font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 12px; }
.plan ul li { display: flex; gap: 10px; font-size: 0.96rem; color: var(--body-ink); }
.plan ul li::before { content: "✓"; color: var(--emerald); font-weight: 800; }
.plan .btn { width: 100%; }

.link-row { text-align: center; margin-top: 34px; }
.link-row a { font-family: var(--mono); font-size: 0.86rem; color: var(--emerald-deep); border-bottom: 2px solid currentColor; padding-bottom: 2px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 4px 22px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.06rem; color: var(--ink); padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--emerald-deep); font-weight: 700; font-size: 1.4rem; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); padding: 0 0 18px; font-size: 0.98rem; }

/* Final CTA */
.cta { background: var(--grad-hero); color: #fff; border-radius: 28px; padding: 74px 40px; text-align: center; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 20% 10%, rgba(255,255,255,0.18), transparent 60%); }
.cta > * { position: relative; }
.cta .eyebrow { color: #bff3dc; justify-content: center; }
.cta h2 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin: 14px 0 12px; }
.cta p { color: #d7f4e6; font-size: 1.12rem; margin-bottom: 28px; }
.cta .appstore-badge { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9fc2b1; padding: 60px 0 34px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 38px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 34ch; font-size: 0.92rem; }
.footer-col h4 { font-family: var(--mono); color: #fff; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 15px; font-weight: 700; }
.footer-col a { display: block; color: #9fc2b1; font-size: 0.92rem; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; flex-wrap: wrap; gap: 12px; color: #7da08c; }

/* ---------- Accessibility ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 10px 16px; background: #fff; color: var(--ink); font-weight: 700; }
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 3px solid var(--emerald); outline-offset: 2px; border-radius: 4px; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-grid > div > * { animation: rise 0.6s cubic-bezier(0.2,0.7,0.2,1) both; }
.hero-media { animation: rise 0.7s cubic-bezier(0.2,0.7,0.2,1) 0.1s both; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 44px; }
  .split.reverse .split-media { order: 0; }
  .steps, .feature-grid { grid-template-columns: 1fr 1fr; }
  .stat-strip .shell { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-media { order: -1; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0;
    background: #fff; padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 15px; box-shadow: var(--shadow-md); }
}
@media (max-width: 600px) {
  .shell { width: calc(100% - 34px); }
  section.block { padding: 64px 0; }
  .feature-grid, .price2, .footer-top { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.3rem, 9vw, 3rem); }
  .cta { padding: 54px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
