/* ============================================================
   FONTS  (Lato — matches the React app)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700;900&display=swap');


/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }


/* ============================================================
   DESIGN TOKENS  (sourced from the SprinkleSmarter SCSS system)
   ============================================================ */
:root {
  /* Brand palette */
  --navy:          #0F2A4A;   /* $color-navy — "Sprinkle" text, headings, dark sections */
  --navy-light:    #1a3f6f;   /* $color-navy-light */
  --blue:          #1E6FF7;   /* $color-blue — primary CTA, interactive chrome */
  --blue-light:    #5593f9;   /* $color-blue-light — hover */
  --blue-dark:     #1558c4;   /* $color-blue-dark — pressed / callout */
  --blue-tint:     #e8f0fe;   /* $color-blue-tint — section alt bg, chips */
  --green:         #2DBA6E;   /* $color-primary — "Smarter" text, active zones */
  --green-light:   #52cc89;   /* $color-primary-light — hover */
  --green-pale:    #e8f9f1;   /* $color-primary-light2 — success bg tint */
  --teal:          #00BAAF;   /* $color-teal — accent */

  /* Surface & text */
  --text:          #0F2A4A;   /* navy — heading / primary text */
  --text-body:     #374151;   /* $color-grey-dark-3 — body copy */
  --text-muted:    #6b7280;   /* $color-grey-dark — muted labels */
  --bg:            #F2F2F7;   /* $color-grey-light-1 — page background */
  --bg-alt:        #e8f0fe;   /* $color-blue-tint — section alternate */
  --white:         #ffffff;
  --border:        #e2e2ea;   /* $color-grey-light-2 — dividers, card borders */

  /* Layout */
  --max:           1100px;
  --radius:        12px;
  --radius-pill:   10rem;     /* matches $btn border-radius in SCSS */

  /* Shadows */
  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-md:     0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg:     0 20px 50px rgba(0, 0, 0, 0.18);
}


/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.075rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}


/* ============================================================
   BUTTONS  (pill shape + uppercase — matches app .btn style)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

/* Primary — blue, matches app's .btn--green (which is actually blue #1E6FF7) */
.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-light);
  border-color: var(--blue-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(30, 111, 247, 0.3);
}
.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(30, 111, 247, 0.2);
}

/* Ghost — outlined, for dark backgrounds */
.btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }
.btn-xl { padding: 1.15rem 3rem; font-size: 1.05rem; }


/* ============================================================
   NAV
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);          /* #F2F2F7 — matches app topbar */
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s;
}
#site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo: full color on light nav — no filter needed */
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 68px;
  width: auto;
  transition: opacity 0.15s;
}
.nav-logo:hover img { opacity: 0.85; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--blue); }

.nav-cta {
  background: var(--blue) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.25rem !important;
  border-radius: var(--radius-pill) !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s !important;
}
.nav-cta:hover { background: var(--blue-light) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-right: -6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);   /* dark lines on light bg */
  border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================
   HERO  (login-page gradient — matches app's _login.scss)
   ============================================================ */
#hero {
  background: linear-gradient(135deg, #0F2A4A 0%, #1a3f6f 50%, #1558c4 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Subtle grid — blue tint lines on dark bg */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

/* Fade into the features section (--bg = #F2F2F7) */
#hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.hero-layout {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.5rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Hero logo — white-inverted, larger than nav */
.hero-wordmark {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  margin-bottom: 2rem;
}

.hero-content h1 {
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.35rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 2.25rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  justify-content: center;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.hero-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}
.hero-pill svg {
  width: 14px;
  height: 14px;
  color: var(--green);   /* green checkmarks — matches app success/active colour */
  flex-shrink: 0;
}


/* ============================================================
   HERO VISUAL
   ============================================================ */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-screenshot {
  width: 100%;
  max-width: 780px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.15),
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.35);
}


/* ============================================================
   FEATURES  (white cards on --bg gray, matches app pattern)
   ============================================================ */
#features {
  padding: 6rem 0;
  background: var(--bg);   /* #F2F2F7 — app page background */
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);   /* white cards on gray bg */
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--blue-light);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--green);   /* brand green for feature icons */
  stroke: currentColor;
  fill: none;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}


/* ============================================================
   HOW IT WORKS  (blue tint bg — matches app $color-blue-tint)
   ============================================================ */
#how-it-works {
  padding: 6rem 0;
  background: var(--bg-alt);   /* #e8f0fe — blue tint */
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative;
}

/* Connecting line between step numbers */
.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% / 3 + 28px);
  right: calc(50% / 3 + 28px);
  height: 2px;
  background: linear-gradient(90deg, var(--blue-light), var(--blue));
  opacity: 0.25;
  pointer-events: none;
}

.step { text-align: center; padding: 2rem 1.25rem; }

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 0 8px var(--bg-alt),          /* ring uses same blue-tint bg */
    0 0 0 10px rgba(30, 111, 247, 0.2);
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.step p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.7;
}


/* ============================================================
   SPECS
   ============================================================ */
#specs {
  padding: 6rem 0;
  background: var(--white);
}

.specs-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.specs-table { border-collapse: collapse; width: 100%; }

.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }

.specs-table td {
  padding: 1rem 0;
  font-size: 0.925rem;
  vertical-align: top;
}
.specs-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
  width: 46%;
  padding-right: 1rem;
}
.specs-table td:last-child {
  color: var(--navy);
  font-weight: 700;
}

/* "None — ever" badge — green success, matches app .info-chip--green */
.specs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--green-pale);
  color: #1e9356;           /* $color-primary-dark */
  border: 1px solid rgba(45, 186, 110, 0.3);
}

/* Callout card — dark navy gradient, matches app login panel feel */
.specs-callout {
  background: linear-gradient(145deg, var(--navy), var(--navy-light));
  border-radius: 16px;
  padding: 2.5rem;
  color: var(--white);
  border: 1px solid rgba(30, 111, 247, 0.2);
  position: sticky;
  top: 96px;
  box-shadow: var(--shadow-lg);
}

.specs-callout-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(45, 186, 110, 0.12);
  color: var(--green-light);
  border: 1px solid rgba(45, 186, 110, 0.25);
  margin-bottom: 1.25rem;
}

.specs-callout h3 {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.875rem;
  color: var(--white);
}

.specs-callout p {
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  font-size: 0.925rem;
  margin-bottom: 1.75rem;
}

.specs-callout-list { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }

.specs-callout-list li {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.specs-callout-list li::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232DBA6E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


/* ============================================================
   BUY  (same dark gradient as hero — visual bookend)
   ============================================================ */
#buy {
  padding: 7rem 0;
  background: linear-gradient(135deg, #0F2A4A 0%, #1a3f6f 50%, #1558c4 100%);
  position: relative;
  overflow: hidden;
}

/* Grid pattern */
#buy::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

/* Fade from specs section (white) into buy */
#buy::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, var(--white), transparent);
  pointer-events: none;
}

.buy-card {
  background: rgba(15, 42, 74, 0.7);
  border: 1px solid rgba(30, 111, 247, 0.25);
  border-radius: 20px;
  padding: 3.5rem;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 80px rgba(30, 111, 247, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Small logo inside buy card */
.buy-logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.75;
  margin: 0 auto 2rem;
}

.buy-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.375rem;
  margin-bottom: 0.4rem;
}

.buy-price {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.05em;
  line-height: 1;
}

.buy-price-currency {
  font-size: 1.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  align-self: flex-start;
  margin-top: 1rem;
}

.buy-price-note {
  font-size: 0.875rem;
  color: var(--green-light);
  font-weight: 700;
  margin-bottom: 2.25rem;
}

.buy-includes {
  text-align: left;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.buy-includes-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.875rem;
}

.buy-includes-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}

.buy-includes-list li {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.buy-includes-list li::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232DBA6E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.buy-cta-btn {
  width: 100%;
  font-size: 1.05rem;
  padding: 1.15rem 2rem;
  margin-bottom: 1.5rem;
}

.buy-meta {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.buy-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}
.buy-meta-item svg {
  width: 14px;
  height: 14px;
  color: rgba(82, 204, 137, 0.6);
  flex-shrink: 0;
}


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy { font-size: 0.85rem; color: rgba(255, 255, 255, 0.28); }

.footer-links { display: flex; gap: 1.75rem; }
.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--blue-light); }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .specs-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .specs-callout { position: static; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    color: var(--text-muted);
  }
  .nav-cta {
    margin: 0.5rem 1.5rem 0 !important;
    padding: 0.75rem 1.5rem !important;
    text-align: center;
    border-radius: var(--radius-pill) !important;
  }

  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }

  .buy-card { padding: 2.25rem 1.5rem; }
  .buy-includes-list { grid-template-columns: 1fr; }
  .buy-meta { gap: 1rem; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 580px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-pills { flex-direction: column; gap: 0.75rem; }
  #hero { padding: 4rem 1.25rem 3rem; }
  #features, #how-it-works, #specs { padding: 4rem 0; }
  #buy { padding: 5rem 0; }
}
