/* ==========================================================================
   GROVE MARKETING — SHARED DESIGN SYSTEM
   Derived from the actual app tokens in grove/lib/features/theme/
   ========================================================================== */

:root {
  /* App-accurate dark palette (from GroveColors.dark) */
  --c-base:       #121214;   /* desk / ground plane */
  --c-mantle:     #0E0E10;   /* low-emphasis panel */
  --c-crust:      #0A0A0C;   /* deepest layer */
  --c-surface-0:  #1A1A1C;   /* card bg */
  --c-surface-1:  #222224;   /* card header / inset */
  --c-surface-2:  #2A2A2D;   /* elevated element */

  /* Borders & overlays */
  --c-border:     #3A3A3D;   /* overlay0 — border-strong */
  --c-border-sub: #2A2A2D;   /* surface2 — subtle border */

  /* Functional accent: blue — the only color (from GroveColors.dark.mauve) */
  --c-accent:       #5B9AE8;
  --c-accent-hover: #74ADF0;
  --c-accent-dim:   #3D7CC9;
  --c-accent-glow:  rgba(91, 154, 232, 0.08);
  --c-accent-wash:  rgba(91, 154, 232, 0.04);

  /* Text (from GroveColors.dark) */
  --c-text:       #EBEBEA;   /* ink-primary / text-main */
  --c-text-sub:   #C0C0BC;   /* subtext1 */
  --c-text-muted: #A0A09C;   /* subtext0 / ink-secondary */
  --c-text-faint: #6A6A66;   /* overlay1 / text-disabled */

  /* Paper — for content areas that evoke drafting paper */
  --c-paper:      #F4F4F2;   /* light base — used for card previews */
  --c-paper-ink:  #1C1C1A;   /* light text */

  /* Semantic deck colors from the Memory system */
  --c-blueprint:  #5B9AE8;
  --c-evergreen:  #4CAF7C;
  --c-cardinal:   #E05252;
  --c-violet:     #9B72CF;
  --c-amber:      #D4A039;

  /* Radii — International Style: sharp (from GroveRadius) */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  /* Spacing (from GroveSpacing) */
  --sp-1:  2px;
  --sp-2:  4px;
  --sp-3:  6px;
  --sp-4:  8px;
  --sp-6:  12px;
  --sp-8:  16px;
  --sp-10: 20px;
  --sp-12: 24px;
  --sp-16: 32px;
  --sp-20: 40px;
  --sp-24: 48px;
  --sp-32: 64px;
  --sp-48: 96px;

  /* Type — matching the app's font stack */
  --f-ui:   'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', 'SF Mono', monospace;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --t-fast: 120ms var(--ease);
  --t-base: 200ms var(--ease);
}

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--f-ui);
  background: var(--c-base);
  color: var(--c-text-muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--c-accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-accent-hover); }

/* ==========================================================================
   DRAFTING TABLE TEXTURE — dot grid like the app's canvas
   ========================================================================== */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, rgba(58, 58, 61, 0.35) 0.75px, transparent 0.75px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.wrap {
  max-width: 1040px; margin: 0 auto;
  padding: 0 var(--sp-16);
  position: relative; z-index: 1;
}

.sect { padding: var(--sp-48) 0; position: relative; }
.sect--surface { background: var(--c-surface-0); }
.sect--mantle { background: var(--c-mantle); }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(18, 18, 20, 0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border-sub);
}

.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
}

.nav__logo {
  font-family: var(--f-mono); font-size: 0.9375rem; font-weight: 700;
  color: var(--c-text); letter-spacing: -0.02em;
}
.nav__logo span { color: var(--c-accent); }

.nav__links { display: flex; gap: var(--sp-10); list-style: none; }
.nav__links a {
  color: var(--c-text-faint); font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.01em;
}
.nav__links a:hover { color: var(--c-text); }

.nav__dl {
  padding: 6px 16px; background: var(--c-accent); color: #fff;
  font-size: 0.8125rem; font-weight: 600;
  border: none; border-radius: var(--r-sm);
  cursor: pointer; transition: background var(--t-fast);
}
.nav__dl:hover { background: var(--c-accent-hover); color: #fff; }

/* Mobile hamburger */
.nav__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: var(--sp-4);
}
.nav__burger span {
  display: block; width: 20px; height: 2px;
  background: var(--c-text);
  transition: transform var(--t-base), opacity var(--t-base);
}
.nav__burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.active span:nth-child(2) { opacity: 0; }
.nav__burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none; position: fixed; top: 52px; left: 0; right: 0; bottom: 0;
  background: rgba(18, 18, 20, 0.97); backdrop-filter: blur(16px);
  z-index: 999; padding: var(--sp-16);
}
.nav__mobile.open { display: flex; flex-direction: column; gap: var(--sp-4); }
.nav__mobile a {
  display: block; padding: var(--sp-8) 0;
  color: var(--c-text); font-size: 1rem; font-weight: 500;
  border-bottom: 1px solid var(--c-border-sub);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
.t-label {
  font-family: var(--f-mono); font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-accent);
  margin-bottom: var(--sp-4);
}

.t-heading {
  font-size: clamp(1.5rem, 3vw, 2.125rem); font-weight: 800;
  color: var(--c-text); letter-spacing: -0.03em; line-height: 1.15;
  margin-bottom: var(--sp-6);
}

.t-subheading {
  font-size: 0.9375rem; color: var(--c-text-muted); max-width: 540px; line-height: 1.7;
}

.t-center { text-align: center; }
.t-center .t-subheading { margin: 0 auto; }

.sh { margin-bottom: var(--sp-24); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-4);
  padding: 12px 24px; font-size: 0.875rem; font-weight: 600;
  border: none; border-radius: var(--r-sm); cursor: pointer;
  transition: all var(--t-fast); text-decoration: none; font-family: var(--f-ui);
}
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover { background: var(--c-accent-hover); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--c-text-sub); border: 1px solid var(--c-border); }
.btn--ghost:hover { border-color: var(--c-accent); color: var(--c-accent); transform: translateY(-1px); }
.btn--lg { padding: 14px 32px; font-size: 0.9375rem; }

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
  padding: var(--sp-12); background: var(--c-surface-0);
  border: 1px solid var(--c-border-sub); border-radius: var(--r-md);
  transition: border-color var(--t-base), transform var(--t-base);
}
.card:hover { border-color: var(--c-border); transform: translateY(-2px); }

.card--accent {
  border-top: 2px solid var(--c-accent);
}
.card--accent:hover {
  border-top-color: var(--c-accent-hover);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.card__title {
  font-size: 0.9375rem; font-weight: 700; color: var(--c-text);
  margin-bottom: var(--sp-3);
}
.card__hook {
  font-family: var(--f-mono); font-size: 0.75rem; font-weight: 600;
  color: var(--c-accent); margin-bottom: var(--sp-4);
}
.card__desc {
  font-size: 0.8125rem; color: var(--c-text-muted); line-height: 1.6;
}

/* Small feature cards */
.card--sm { padding: var(--sp-8); }
.card--sm .card__title { font-size: 0.8125rem; margin-bottom: var(--sp-1); }
.card--sm .card__desc { font-size: 0.75rem; }

/* ==========================================================================
   ICON CONTAINER
   ========================================================================== */
.ico {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent-glow); border-radius: var(--r-sm);
  margin-bottom: var(--sp-6);
}
.ico svg {
  width: 18px; height: 18px; stroke: var(--c-accent);
  fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.ico--sm { width: 28px; height: 28px; margin-bottom: var(--sp-4); }
.ico--sm svg { width: 14px; height: 14px; }

/* ==========================================================================
   PRICING TOGGLE
   ========================================================================== */
.pricing-toggle {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-4);
  margin-bottom: var(--sp-12);
}
.pricing-toggle__label {
  font-size: 0.875rem; font-weight: 600; color: var(--c-text-muted);
  cursor: pointer; transition: color var(--t-fast);
}
.pricing-toggle__label.active { color: var(--c-text); }

.toggle-switch {
  position: relative; width: 44px; height: 24px;
  background: var(--c-surface-2); border-radius: 12px;
  cursor: pointer; border: 1px solid var(--c-border);
  transition: border-color var(--t-fast);
}
.toggle-switch:hover { border-color: var(--c-accent); }
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: var(--c-text);
  border-radius: 50%; transition: transform var(--t-base);
}
.toggle-switch.is-annual::after { transform: translateX(20px); background: var(--c-accent); }

.pricing-card__price-amount { transition: opacity var(--t-fast); }
.pricing-card__price-amount.fade-out { opacity: 0; }

.pricing-badge-save {
  display: inline-block; padding: 2px 6px; background: var(--c-evergreen);
  color: var(--c-base); font-size: 0.625rem; font-weight: 700;
  border-radius: var(--r-sm); margin-left: var(--sp-2); text-transform: uppercase;
  letter-spacing: 0.05em; vertical-align: middle;
}

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
.rv {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.rv.vis { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.foot { padding: var(--sp-24) 0 var(--sp-12); margin-top: auto; border-top: 1px solid var(--c-border-sub); }
.foot__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-12);
  margin-bottom: var(--sp-16);
}
.foot__brand-col { max-width: 240px; }
.foot__brand {
  font-family: var(--f-mono); font-size: 1.125rem; font-weight: 700; color: var(--c-text);
  margin-bottom: var(--sp-3);
}
.foot__brand span { color: var(--c-accent); }
.foot__tagline { font-size: 0.8125rem; color: var(--c-text-muted); line-height: 1.5; }

.foot__nav-col { display: flex; flex-direction: column; }
.foot__nav-title {
  font-family: var(--f-mono); font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-text-faint);
  margin-bottom: var(--sp-4);
}
.foot__links { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.foot__links a { color: var(--c-text-muted); font-size: 0.875rem; transition: color var(--t-fast); }
.foot__links a:hover { color: var(--c-accent); }

.foot__copy {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--sp-8); border-top: 1px solid var(--c-border-sub);
  font-size: 0.75rem; color: var(--c-text-faint); font-family: var(--f-mono);
}

/* ==========================================================================
   RESPONSIVE — TABLET
   ========================================================================== */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .hero__layout { grid-template-columns: 1fr !important; }
  .foot__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   RESPONSIVE — MOBILE
   ========================================================================== */
@media (max-width: 640px) {
  .wrap { padding: 0 var(--sp-8); }
  .sect { padding: var(--sp-32) 0; }
  .nav__links, .nav__dl-wrap { display: none; }
  .nav__burger { display: flex; }
  .grid-4 { grid-template-columns: 1fr !important; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { justify-content: center; }
  .foot__grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .foot__copy { flex-direction: column; gap: var(--sp-4); text-align: center; }
}
