/* ==========================================================================
   Covly — shared design system
   Sky/cloud aesthetic + phone mockups. Used by index.html and the static pages.
   Fonts: Poppins (headings) + IBM Plex Sans (body) — matching the mobile app.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --navy: #24265c;          /* deep indigo header, matches the app app-bar */
  --navy-2: #2f3183;
  --brand: #4f46e5;         /* indigo accent / primary */
  --brand-600: #4338ca;
  --brand-soft: #eef1ff;

  /* Sky */
  --sky-1: #eaf3ff;
  --sky-2: #dbe9ff;
  --sky-3: #cfe0fb;

  /* Ink */
  --ink: #1a1d2b;
  --ink-2: #3a3f52;
  --muted: #6b7180;
  --faint: #9aa0b0;

  /* Surface */
  --white: #ffffff;
  --surface: #f6f8fc;
  --border: #e7ebf3;

  /* Status */
  --success: #16a34a;
  --success-soft: #e7f7ee;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 45, .05);
  --shadow: 0 12px 34px rgba(36, 38, 92, .10);
  --shadow-lg: 0 30px 70px rgba(36, 38, 92, .18);

  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink-2);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 .5em;
  font-weight: 600;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }

.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 40px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 12px 0 0; }

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, .25); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: #d3d9e6; color: var(--ink); }
.btn-lg { padding: 15px 28px; font-size: 16px; }

/* App-store style buttons */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 14px; min-width: 168px;
}
.store-btn:hover { background: var(--navy-2); color: #fff; }
.store-btn i { font-size: 26px; }
.store-btn span { display: block; font-size: 10px; opacity: .8; line-height: 1.1; }
.store-btn strong { display: block; font-size: 15px; font-weight: 600; font-family: 'Poppins', sans-serif; }

/* -------- Nav -------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 20px; color: var(--ink); }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--navy));
  display: grid; place-items: center; color: #fff; font-size: 15px;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--brand); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--ink); cursor: pointer; }

/* -------- Sky backdrop -------- */
.sky {
  background:
    radial-gradient(1200px 420px at 80% -10%, #ffffff 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 45%, #ffffff 100%);
}
.sky-soft { background: linear-gradient(180deg, #ffffff 0%, var(--sky-1) 100%); }

/* -------- Phone mockup -------- */
.phone {
  position: relative;
  width: 288px;
  border-radius: 44px;
  background: #0b1020;
  padding: 12px;
  box-shadow: var(--shadow-lg);
}
.phone::before {
  content: ""; position: absolute; top: 19px; left: 50%; transform: translateX(-50%);
  width: 82px; height: 22px; background: #0b1020; border-radius: 999px; z-index: 5;
}
.phone img { border-radius: 34px; width: 100%; display: block; }
.phone-tilt { transform: rotate(-3deg); }

/* Screenshot placeholder (shown until real PNG is added) */
.shot-fallback {
  aspect-ratio: 9 / 19.5; border-radius: 34px;
  background: linear-gradient(180deg, var(--sky-2), #fff);
  display: grid; place-items: center; text-align: center; color: var(--muted);
  font-size: 13px; padding: 20px;
}

/* -------- Cards / feature tiles -------- */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 20px; margin-bottom: 16px;
}
.feature h3 { font-size: 18px; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }

/* Split (text + mockup) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .checklist { list-style: none; margin: 22px 0 0; padding: 0; }
.split .checklist li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; color: var(--ink-2); }
.split .checklist i { color: var(--success); background: var(--success-soft); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; font-size: 12px; margin-top: 2px; }

/* -------- Pricing -------- */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 760px; margin: 0 auto; }
.plan { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); position: relative; }
.plan.featured { border-color: var(--brand); box-shadow: var(--shadow); }
.plan .tag { position: absolute; top: -12px; right: 24px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-pill); }
.plan h3 { font-size: 20px; }
.plan .amt { font-family: 'Poppins', sans-serif; font-size: 40px; font-weight: 700; color: var(--ink); }
.plan .amt small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; margin: 20px 0 24px; padding: 0; }
.plan ul li { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; color: var(--ink-2); font-size: 15px; }
.plan ul li i { color: var(--success); font-size: 13px; }

/* Compact plan tiers (many plans, kept simple) — auto-flow so any count stays a clean row */
.plans-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 16px; max-width: 1000px; margin: 0 auto; }
.tier { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 18px; text-align: center; position: relative; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); }
.tier.featured { border-color: var(--brand); box-shadow: var(--shadow); }
.tier .tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 4px 12px; border-radius: var(--radius-pill); white-space: nowrap; }
.tier-term { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tier-price { font-family: 'Poppins', sans-serif; font-size: 32px; font-weight: 700; color: var(--ink); line-height: 1.05; }
.tier-price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.tier-cards { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tier .btn { margin-top: 8px; width: 100%; padding: 11px 14px; font-size: 14px; }
.plans-includes { max-width: 1000px; margin: 26px auto 0; text-align: center; }
.plans-includes > span { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.plans-includes ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; padding: 0; margin: 0; }
.plans-includes li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.plans-includes li i { color: var(--success); font-size: 12px; }
/* Loading skeletons for the plans while the API responds */
.tier.skeleton { pointer-events: none; gap: 12px; align-items: center; }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--border) 25%, var(--surface) 37%, var(--border) 63%); background-size: 400% 100%; animation: skl 1.4s ease infinite; }
.sk-term { width: 56%; height: 12px; }
.sk-price { width: 44%; height: 30px; }
.sk-cards { width: 66%; height: 14px; }
.sk-btn { width: 100%; height: 40px; margin-top: 8px; border-radius: 12px; }
@keyframes skl { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* -------- Testimonials -------- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.quote p { color: var(--ink-2); font-size: 15px; }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.quote .who .av { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 600; }
.quote .who b { display: block; color: var(--ink); font-size: 14px; }
.quote .who span { color: var(--muted); font-size: 13px; }

/* -------- CTA band -------- */
.cta-band { background: linear-gradient(135deg, var(--navy), var(--brand)); color: #fff; border-radius: var(--radius-lg); padding: 56px; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(24px, 3vw, 36px); }
.cta-band p { color: rgba(255,255,255,.85); font-size: 17px; max-width: 520px; margin: 12px auto 28px; }

/* -------- Footer -------- */
.footer { background: var(--navy); color: #c8ccdf; padding: 64px 0 28px; }
.footer a { color: #c8ccdf; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 10px; font-size: 14px; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer .brand .mark { background: rgba(255,255,255,.14); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #9aa0bf; }

/* -------- Legal / content pages -------- */
.page-hero { padding: 56px 0 40px; text-align: center; }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); }
.page-hero p { color: var(--muted); }
.prose { max-width: 820px; margin: 0 auto; padding: 8px 0 72px; }
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose h3 { font-size: 18px; margin-top: 24px; }
.prose p, .prose li { color: var(--ink-2); font-size: 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose a { text-decoration: underline; }

/* -------- Responsive -------- */
@media (max-width: 900px) {
  .feature-grid, .quote-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--border); padding: 16px 20px; gap: 16px; }
  .section { padding: 60px 0; }
  .feature-grid, .quote-grid, .price-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
