/* ============================================================
   xtend.ai — editorial-minimal design system
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@1,400;1,500;1,600&display=swap');

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

:root {
  /* Surfaces */
  --bg:           #F7F7F2;
  --bg-tint:      #EFEFE8;
  --bg-deep:      #E5E5DD;
  --surface:      #FFFFFF;
  --surface-2:    #FAFAF6;

  /* Ink */
  --ink:          #0E1026;
  --ink-2:        #2A2D4A;
  --ink-3:        #5A5D7A;
  --muted:        #8A8DA8;
  --hairline:     rgba(14,16,38,0.08);
  --hairline-2:   rgba(14,16,38,0.16);

  /* Accent — cyan→blue */
  --cyan:         #0FD2ED;
  --blue:         #008DF3;
  --blue-deep:    #0057C7;
  --grad:         linear-gradient(135deg, #0FD2ED 0%, #008DF3 100%);
  --accent-bg:    rgba(0,141,243,0.08);
  --accent-line:  rgba(0,141,243,0.30);

  --success:      #15A872;
  --error:        #D6435A;

  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  --display:      'Fraunces', 'Outfit', serif;
  --display-2:    'Outfit', system-ui, sans-serif;
  --body:         'Inter', system-ui, sans-serif;
  --mono:         'JetBrains Mono', monospace;

  /* Italic accent font — used for all decorative italic text */
  --ital-font:    'Plus Jakarta Sans', sans-serif;

  /* Dark panel background — stays dark in both light & dark themes */
  --ink-bg:       #0E1026;

  --shadow-sm:    0 1px 2px rgba(14,16,38,0.05);
  --shadow:       0 1px 3px rgba(14,16,38,0.06), 0 12px 32px -12px rgba(14,16,38,0.10);
  --shadow-lg:    0 4px 12px rgba(14,16,38,0.06), 0 28px 70px -20px rgba(14,16,38,0.18);
  --shadow-cyan:  0 14px 40px -14px rgba(0,141,243,0.50);
}

/* Global italic accent rules — apply --ital-font to all decorative italic elements */
.ital,
h1 em, h2 em, h3 em {
  font-family: var(--ital-font) !important;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5%;
  background: rgba(247,247,242,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
}
.nav-logo img.logo-img {
  height: 56px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-3);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color .18s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 12px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--grad); color: white; box-shadow: var(--shadow-cyan); }
.btn-primary:hover { box-shadow: 0 18px 50px -14px rgba(0,141,243,0.65); }

.btn-ink { background: var(--ink-bg); color: white; }
.btn-ink:hover { background: #1a1d3a; }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--hairline-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-link { background: transparent; color: var(--ink); padding-left: 0; padding-right: 0; }
.btn-link:hover { color: var(--blue); }

.btn-lg { padding: 15px 28px; font-size: 1rem; border-radius: 12px; }

/* ---------- COMMON ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--hairline);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(15,210,237,0.18);
}

.kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.h-display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.0;
  color: var(--ink);
  font-style: italic;
}

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

.section { padding: 120px 5%; max-width: 1320px; margin: 0 auto; position: relative; }
.section-tight { padding: 80px 5%; max-width: 1320px; margin: 0 auto; position: relative; }

/* ---------- FOOTER ---------- */
footer.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--ink-bg);
  color: rgba(255,255,255,0.7);
  padding: 80px 5% 36px;
  margin-top: 80px;
}
footer.site-footer .nav-logo img.logo-img {
  height: 56px;
  filter: brightness(1.05);
}
.footer-row {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-row h4 {
  font-family: var(--display-2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
}
.footer-row ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-row a {
  color: rgba(255,255,255,0.75);
  font-size: 0.94rem;
  transition: color .15s;
}
.footer-row a:hover { color: var(--cyan); }
.footer-tag {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  max-width: 360px;
  margin-top: 20px;
  line-height: 1.6;
}
.footer-bottom {
  max-width: 1320px;
  margin: 56px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- STICKY CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 140%);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 22px;
  background: var(--ink-bg);
  color: white;
  border-radius: 999px;
  box-shadow: 0 24px 60px -18px rgba(14,16,38,0.5);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  font-size: 0.93rem;
}
.sticky-cta.show { transform: translate(-50%, 0); }
.sticky-cta .sticky-dim { color: rgba(255,255,255,0.55); }
.sticky-cta a.btn {
  background: var(--grad);
  color: white;
  padding: 9px 18px;
  font-size: 0.88rem;
  box-shadow: none;
}

/* ============================================================
   DARK THEME — activated via <html data-theme="dark">
   ============================================================ */
[data-theme="dark"] {
  --bg:           #07091C;
  --bg-tint:      #0C1028;
  --bg-deep:      #111730;
  --surface:      #0F1329;
  --surface-2:    #141A36;

  --ink:          #E6E9F4;
  --ink-2:        #BCC1DA;
  --ink-3:        #7880A2;
  --muted:        #505674;
  --hairline:     rgba(255,255,255,0.07);
  --hairline-2:   rgba(255,255,255,0.13);

  --cyan:         #00E0FF;
  --blue:         #2AACFF;
  --blue-deep:    #60C4FF;
  --grad:         linear-gradient(135deg, #00E0FF 0%, #2AACFF 100%);
  --accent-bg:    rgba(42,172,255,0.12);
  --accent-line:  rgba(42,172,255,0.32);

  --success:      #1FC98A;
  --error:        #FF6B7A;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow:       0 2px 4px rgba(0,0,0,0.35), 0 14px 36px -12px rgba(0,0,0,0.55);
  --shadow-lg:    0 6px 14px rgba(0,0,0,0.4), 0 30px 80px -20px rgba(0,0,0,0.7);
  --shadow-cyan:  0 14px 40px -14px rgba(0,224,255,0.45);

  /* Dark panels stay deep even in dark mode — slightly deeper for contrast */
  --ink-bg:       #060818;
}

/* Interactive elements that use --ink-bg as bg but sit on light surfaces:
   in dark mode use a translucent white so they read as "selected" */
[data-theme="dark"] .toggle-wrap button.active,
[data-theme="dark"] .period-pick button.on {
  background: rgba(255,255,255,0.14);
  color: white;
}
[data-theme="dark"] .faq-item.open .faq-q .icn {
  background: rgba(255,255,255,0.14);
  color: white;
  border-color: rgba(255,255,255,0.2);
}
[data-theme="dark"] .popular-badge,
[data-theme="dark"] .pop-badge {
  background: var(--grad);
  color: white;
}

[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
}

/* Dot grid — lighter in dark mode */
[data-theme="dark"] body::before {
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, black, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, black, transparent 90%);
}

[data-theme="dark"] .nav {
  background: rgba(7,9,28,0.90);
  border-bottom-color: rgba(255,255,255,0.07);
}

[data-theme="dark"] .btn-ghost {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: var(--ink);
}
[data-theme="dark"] .btn-ghost:hover { border-color: rgba(255,255,255,0.35); }

[data-theme="dark"] .btn-ink { background: var(--surface-2); color: var(--ink); }

[data-theme="dark"] footer.site-footer {
  background: #050714;
  border-top-color: rgba(255,255,255,0.07);
}
[data-theme="dark"] .footer-bottom { border-top-color: rgba(255,255,255,0.07); }

/* ---------- THEME TOGGLE BUTTON ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--hairline-2);
  background: var(--surface);
  color: var(--ink-3);
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .footer-row { grid-template-columns: 1fr 1fr; }
  .nav-logo img.logo-img { height: 44px; }
  footer.site-footer .nav-logo img.logo-img { height: 48px; }
}
