/* ==========================================================================
   CalDesk AI — marketing site design system
   Fresh & vibrant: logo green -> blue gradient, scan-bracket motif.
   Shared by index.html, pricing.html, about.html.
   Legal/support pages are intentionally self-contained (see build.mjs).
   ========================================================================== */

:root {
  /* Brand palette pulled from the app icon */
  --green: #15b96f;
  --green-bright: #2dd47f;
  --blue: #0a84ff;
  --blue-deep: #0050d8;
  --orange: #ff9f0a;

  /* Ink + surfaces */
  --ink: #0e1726;
  --ink-soft: #28323f;
  --muted: #5b6573;
  --line: #e6ebf1;
  --bg: #ffffff;
  --surface: #f5f9f7;
  --surface-blue: #eef5ff;

  --gradient: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);
  --gradient-soft: linear-gradient(135deg, #e7f9ef 0%, #e6f1ff 100%);

  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, 0.06), 0 4px 16px rgba(14, 23, 38, 0.05);
  --shadow-md: 0 8px 30px rgba(14, 23, 38, 0.09);
  --shadow-lg: 0 24px 60px rgba(10, 60, 120, 0.16);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  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 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.shell {
  width: min(var(--maxw), calc(100% - 40px));
  margin-inline: auto;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(21, 185, 111, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(10, 132, 255, 0.32); }
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: #cdd6e0; }
.btn-light {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-light:hover { background: rgba(255, 255, 255, 0.26); }

/* App Store badge */
.appstore-badge { display: inline-flex; transition: transform 0.15s ease; }
.appstore-badge:hover { transform: translateY(-2px); }
.appstore-badge svg { height: 54px; width: auto; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 0.96rem; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.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: 84px 0 72px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(45, 212, 127, 0.22), transparent 60%),
    radial-gradient(55% 60% at 92% 18%, rgba(10, 132, 255, 0.18), transparent 60%);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--green);
  background: #e7f9ef;
  border: 1px solid #c7eed7;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; }
.hero-copy { font-size: 1.18rem; color: var(--muted); margin: 22px 0 30px; max-width: 32ch; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-sub { margin-top: 18px; font-size: 0.9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-sub .stars { color: var(--orange); letter-spacing: 2px; }

/* ---------- Phone mockup ---------- */
.phone-wrap { display: flex; justify-content: center; position: relative; }
.phone {
  position: relative;
  width: 300px;
  background: #0e1726;
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  background: #fff;
  border-radius: 33px;
  overflow: hidden;
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 26px;
  background: #0e1726;
  border-radius: 0 0 16px 16px;
  z-index: 4;
}
.scan-photo {
  height: 210px;
  background: linear-gradient(135deg, #2dd47f 0%, #0a84ff 100%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.scan-photo .plate {
  width: 132px; height: 132px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 4px 18px rgba(0,0,0,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.4rem;
}
/* scan brackets */
.scan-bracket { position: absolute; width: 30px; height: 30px; border: 3px solid #fff; }
.scan-bracket.tl { top: 22px; left: 22px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scan-bracket.tr { top: 22px; right: 22px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.scan-bracket.bl { bottom: 22px; left: 22px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.scan-bracket.br { bottom: 22px; right: 22px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.scan-line {
  position: absolute; left: 22px; right: 22px; height: 2px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 12px 2px rgba(255,255,255,0.6);
  animation: scan 2.6s ease-in-out infinite;
}
@keyframes scan { 0%,100% { top: 30px; } 50% { top: 178px; } }
.scan-tag {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(14,23,38,0.7); color: #fff; font-size: 0.72rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(4px);
}
.scan-result { padding: 16px 16px 22px; }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.result-head h4 { font-size: 0.98rem; margin: 0 0 2px; }
.result-head span { font-size: 0.78rem; color: var(--muted); }
.kcal-ring { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.kcal-ring .ring { flex: none; }
.kcal-ring .ring-label { font-size: 0.75rem; color: var(--muted); }
.kcal-ring .ring-label strong { display: block; font-size: 1.25rem; color: var(--ink); }
.macro-rows { display: grid; gap: 9px; }
.macro-row { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; gap: 8px; font-size: 0.76rem; }
.macro-row .track { height: 7px; border-radius: 4px; background: #e8edf3; overflow: hidden; }
.macro-row .fill { height: 100%; border-radius: 4px; }
.macro-row .fill.p { width: 80%; background: var(--green); }
.macro-row .fill.c { width: 58%; background: var(--blue); }
.macro-row .fill.f { width: 44%; background: var(--orange); }
.macro-row .val { text-align: right; color: var(--muted); font-weight: 600; }

.float-card {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 11px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 600;
}
.float-card .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 1rem; }
.float-card.one { top: 40px; left: -28px; }
.float-card.two { bottom: 60px; right: -34px; }
.float-card small { display: block; font-weight: 500; color: var(--muted); font-size: 0.72rem; }

/* ---------- Logos / stats band ---------- */
.stats {
  background: var(--ink);
  color: #fff;
  padding: 40px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat strong { display: block; font-size: 2rem; font-weight: 800; }
.stat strong .gradient-text { background: linear-gradient(135deg, var(--green-bright), #6bb8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: #aeb8c4; font-size: 0.9rem; }

/* ---------- Sections ---------- */
section.block { padding: 88px 0; }
.section-head { max-width: 640px; margin: 0 auto 54px; text-align: center; }
.section-head .kicker { color: var(--blue); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; margin: 12px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px 28px; box-shadow: var(--shadow-sm); }
.step-num { width: 46px; height: 46px; border-radius: 14px; background: var(--gradient-soft); color: var(--green); display: grid; place-items: center; font-weight: 800; margin-bottom: 18px; font-size: 1.1rem; }
.step h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--muted); }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform 0.18s ease, box-shadow 0.2s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature .ficon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 16px; background: var(--gradient-soft); }
.feature h3 { font-size: 1.18rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.96rem; }

/* Split / showcase */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: -1; }
.split h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; margin-bottom: 18px; }
.split p { color: var(--muted); font-size: 1.08rem; margin-bottom: 18px; }
.checklist { display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; list-style: none; }
.checklist { padding: 0; margin: 0; }
.checklist .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #e7f9ef; color: var(--green); display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; }
.checklist strong { display: block; }
.checklist span { color: var(--muted); font-size: 0.94rem; }
.media-card { background: var(--gradient-soft); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 28px; justify-content: center; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 32px; position: relative; }
.plan.featured { border: 0; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); }
.plan.featured .plan-price small, .plan.featured .plan-name { color: #cdd6e0; }
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gradient); color: #fff; font-size: 0.74rem; font-weight: 700; padding: 6px 16px; border-radius: 999px; letter-spacing: 0.03em; }
.plan-name { font-size: 0.95rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.plan-price { font-size: 3rem; font-weight: 800; margin: 14px 0 6px; }
.plan-price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan-desc { color: var(--muted); margin-bottom: 22px; font-size: 0.96rem; }
.plan.featured .plan-desc { color: #aeb8c4; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.plan ul li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.96rem; }
.plan ul li::before { content: "✓"; color: var(--green); font-weight: 800; }
.plan.featured ul li::before { color: var(--green-bright); }
.plan .btn { width: 100%; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 4px 22px; margin-bottom: 14px; background: #fff; transition: box-shadow 0.2s ease; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--blue); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* CTA band + waitlist */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
}
.cta::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 80% at 80% 0%, rgba(255,255,255,0.18), transparent 60%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; margin-bottom: 12px; }
.cta p { font-size: 1.12rem; opacity: 0.95; margin-bottom: 30px; }
.waitlist {
  display: flex; gap: 10px; max-width: 460px; margin: 0 auto;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px; padding: 6px;
}
.waitlist input {
  flex: 1; border: 0; background: transparent; color: #fff;
  padding: 12px 18px; font-size: 1rem; outline: none; font-family: inherit;
}
.waitlist input::placeholder { color: rgba(255,255,255,0.8); }
.waitlist button { flex: none; }
.waitlist-msg { margin-top: 16px; font-size: 0.95rem; min-height: 1.2em; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aeb8c4; padding: 64px 0 36px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 30ch; font-size: 0.92rem; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-col a { display: block; color: #aeb8c4; font-size: 0.92rem; margin-bottom: 11px; transition: color 0.15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse .split-media { order: 0; }
  .hero { padding: 56px 0 48px; }
  .hero-copy { max-width: none; }
  .steps, .features { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: minmax(0, 420px); }
  .phone-wrap { order: -1; }
}
@media (max-width: 620px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 70px; left: 0; right: 0; background: #fff; padding: 18px 20px;
    border-bottom: 1px solid var(--line); gap: 16px; box-shadow: var(--shadow-md);
  }
  .steps, .features, .stats-grid { grid-template-columns: 1fr; }
  section.block { padding: 60px 0; }
  .cta { padding: 48px 22px; }
  .waitlist { flex-direction: column; background: transparent; border: 0; padding: 0; gap: 12px; }
  .waitlist input { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; text-align: center; }
  .footer-top { grid-template-columns: 1fr; }
}
