/* === DESIGN TOKENS === */
:root {
  --navy:        #1B2033;
  --navy-soft:   #232840;
  --navy-light:  #2D3350;
  --orange:      #E85D26;
  --orange-dark: #C94E1F;
  --orange-pale: #FFF1EB;
  --blue:        #2898CC;
  --teal:        #1A857A;
  --warm-white:  #FAF8F5;
  --gray-100:    #F2EFEC;
  --gray-200:    #E4E0DC;
  --gray-300:    #D4CFC9;
  --gray-400:    #B8B1AA;
  --gray-500:    #9B9490;
  --gray-600:    #7A7370;
  --gray-700:    #5C5652;
  --gray-800:    #3D3835;
  --gray-900:    #2E2A27;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --shadow-sm: 0 1px 2px rgba(27,32,51,0.04), 0 4px 8px rgba(27,32,51,0.04);
  --shadow-md: 0 2px 4px rgba(27,32,51,0.04), 0 8px 24px rgba(27,32,51,0.06);
  --shadow-lg: 0 4px 8px rgba(27,32,51,0.04), 0 16px 48px rgba(27,32,51,0.08);
  --shadow-xl: 0 8px 16px rgba(27,32,51,0.06), 0 32px 64px rgba(27,32,51,0.12);
  --nav-height:  64px;
  --toc-width:   300px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--warm-white);
  overflow: hidden;
  height: 100vh;
}

/* === TOP NAV === */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topnav-logo { text-decoration: none; cursor: pointer; }
.topnav-logo img { height: 28px; display: block; }

.toc-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 18px;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s;
}
.toc-toggle:hover { background: rgba(255,255,255,0.14); }
.toc-toggle svg { width: 16px; height: 16px; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-toggle:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* === TOC OVERLAY === */
.toc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27,32,51,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.toc-overlay.open { opacity: 1; pointer-events: all; }

/* === TOC PANEL === */
.toc-panel {
  position: fixed;
  top: 0; left: 0;
  width: var(--toc-width);
  height: 100vh;
  background: linear-gradient(160deg, #1e2440 0%, #1B2033 50%, #191d2e 100%);
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.32, 0, 0.67, 0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.toc-panel.open {
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.toc-header img { height: 24px; }

.toc-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: background 0.15s, color 0.15s;
}
.toc-close:hover { background: rgba(255,255,255,0.14); color: white; }

.toc-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0 32px;
}
.toc-nav::-webkit-scrollbar { width: 4px; }
.toc-nav::-webkit-scrollbar-track { background: transparent; }
.toc-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.toc-section-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 16px 24px 6px;
}
.toc-section-label:not(:first-child) { margin-top: 8px; }

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 24px;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.toc-link:hover { color: white; background: rgba(255,255,255,0.04); }
.toc-link.active { color: white; border-left-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.06); }
.toc-link.sub { padding-left: 40px; font-size: 13px; }
.toc-link-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}

/* === MAIN SCROLL CONTAINER === */
.main {
  margin-top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: scroll;
  scroll-behavior: smooth;
}

/* === SECTIONS === */
section {
  min-height: calc(100vh - var(--nav-height));
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.section-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 80px 112px;
}

/* === SECTION LABEL === */
.section-label { display: none; }
.section-label-dot { display: none; }

/* === HEADINGS === */
h1 { font-family: var(--font-heading); font-size: 52px; font-weight: 700; line-height: 1.14; letter-spacing: -0.015em; color: var(--navy); }
h2 { font-family: var(--font-heading); font-size: 38px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--navy); margin-bottom: 16px; }
h3 { font-family: var(--font-heading); font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.display { font-family: var(--font-heading); font-size: 64px; font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.display-xl { font-family: var(--font-heading); font-size: 76px; font-weight: 800; line-height: 1.0; letter-spacing: -0.025em; }

/* === BODY TEXT === */
p { font-family: var(--font-body); font-size: 18px; font-weight: 400; line-height: 1.6; color: var(--gray-600); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.15s;
}
.btn-primary { background: #ffffff; color: var(--navy); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.btn-primary:hover { background: var(--gray-100); transform: translateY(-1px); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.25); }
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
.btn-navy { background: var(--navy); color: white; box-shadow: 0 4px 16px rgba(27,32,51,0.25); }
.btn-navy:hover { background: var(--navy-soft); transform: translateY(-1px); }

/* === CARDS === */
.card { background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 20px; padding: 28px; }
.card-white { background: #ffffff; border-radius: 20px; box-shadow: var(--shadow-md); padding: 28px; }
.card-dark { background: var(--navy-soft); border: 1px solid rgba(255,255,255,0.06); border-radius: 20px; padding: 28px; }

/* === GRIDS === */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 20px; }
.grid-wide { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 72px; align-items: center; }

/* === SCREENSHOT PLACEHOLDER === */
.screenshot-placeholder {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: 20px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}
.screenshot-placeholder span { font-family: var(--font-heading); font-size: 13px; font-weight: 500; color: var(--gray-400); letter-spacing: 0.04em; }
.screenshot-placeholder svg { width: 28px; height: 28px; color: var(--gray-300); }

/* === BROWSER FRAME === */
.browser-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: #fff;
}
.browser-chrome {
  background: #1a1a1a;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.traffic-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.traffic-dot-red    { background: #FF5F57; }
.traffic-dot-yellow { background: #FEBC2E; }
.traffic-dot-green  { background: #28C840; }
.browser-url-bar {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  height: 24px;
  margin: 0 12px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-family: monospace;
  overflow: hidden;
  white-space: nowrap;
}
.browser-viewport {
  height: 480px;
  overflow: hidden;
  position: relative;
  background: #fff;
}
.browser-screenshot {
  width: 100%;
  display: block;
}
.browser-screenshot.scrolling {
  animation: autoscroll 22s ease-in-out infinite;
}
@keyframes autoscroll {
  0%,  8% { transform: translateY(0); }
  78%, 86% { transform: translateY(var(--scroll-dist, -45%)); }
  95%, 100% { transform: translateY(0); }
}

/* === DECORATIVE CIRCLES === */
.deco-circle { position: absolute; border-radius: 50%; pointer-events: none; }

/* === SECTION BACKGROUNDS === */
.bg-navy        { background: linear-gradient(160deg, #1e2440 0%, #1B2033 50%, #191d2e 100%); }
.bg-orange      { background: linear-gradient(135deg, #E85D26 0%, #D04E1E 60%, #C44A1C 100%); }
.bg-warm-white  { background: var(--warm-white); border-top: 1px solid var(--gray-200); }
.bg-white       { background: #ffffff; border-top: 1px solid var(--gray-200); }

/* === BOTTOM SLIDE NAV === */
.slide-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: rgba(27,32,51,0.92);
  backdrop-filter: blur(12px);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.slide-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 100px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.slide-nav-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.slide-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.slide-nav-btn:disabled:hover { background: transparent; }
.slide-nav-counter {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  padding: 0 6px;
  min-width: 48px;
  text-align: center;
}

/* === ICON BOX === */
.icon-box {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.icon-box svg { width: 22px; height: 22px; color: var(--navy); }

/* === PILLS === */
.pill { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 100px; font-family: var(--font-heading); font-size: 13px; font-weight: 600; }
.pill-navy { background: rgba(27,32,51,0.07); color: var(--navy); }
.pill-glow { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); backdrop-filter: blur(8px); }

/* === ACCENT LINE === */
.accent-line { display: none; }
.accent-line-light { display: none; }

/* === STAT BLOCK === */
.stat-number { font-family: var(--font-heading); font-size: 56px; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); line-height: 1.0; }
.stat-label { font-family: var(--font-heading); font-size: 16px; font-weight: 600; color: var(--gray-800); margin-top: 4px; }
.stat-desc { font-family: var(--font-body); font-size: 14px; color: var(--gray-500); margin-top: 6px; line-height: 1.5; }

/* === CHECK LIST === */
.checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 16px; color: var(--gray-700); }
.checklist li svg { flex-shrink: 0; }

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(27,32,51,0.92);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  display: block;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.expandable { cursor: zoom-in; transition: opacity 0.15s; }
.expandable:hover { opacity: 0.88; }

/* === UTILITY === */
.text-white    { color: white; }
.text-white-80 { color: rgba(255,255,255,0.8); }
.text-white-60 { color: rgba(255,255,255,0.6); }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mb-48 { margin-bottom: 48px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* Module gallery */
.module-gallery { display:flex; gap:16px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; -ms-overflow-style:none; padding-bottom:4px; }
.module-gallery::-webkit-scrollbar { display:none; }
.module-card { min-width:220px; scroll-snap-align:start; flex-shrink:0; }
.module-card-img { border-radius:12px; overflow:hidden; height:190px; margin-bottom:10px; box-shadow:var(--shadow-md); }
.module-card-img img { width:100%; height:100%; object-fit:cover; display:block; }
.module-card-placeholder { border-radius:12px; background:#F2EFEC; border:2px dashed #D4CFC9; height:190px; margin-bottom:10px; display:flex; align-items:center; justify-content:center; }
.module-card-label { font-family:var(--font-heading); font-size:14px; font-weight:600; color:var(--navy); }

/* Lightbox */
img.expandable { cursor: zoom-in; }
.lightbox-overlay { display:none; position:fixed; inset:0; z-index:9999; background:rgba(27,32,51,0.93); backdrop-filter:blur(8px); align-items:center; justify-content:center; flex-direction:column; }
.lightbox-overlay.open { display:flex; }
.lightbox-img-wrap img { max-width:88vw; max-height:76vh; object-fit:contain; border-radius:14px; box-shadow:0 32px 80px rgba(0,0,0,0.5); display:block; }
.lightbox-caption { margin-top:18px; font-family:var(--font-heading); font-size:16px; font-weight:600; color:rgba(255,255,255,0.88); text-align:center; }
.lightbox-counter { font-family:var(--font-body); font-size:13px; color:rgba(255,255,255,0.38); margin-top:6px; }
.lightbox-close { position:fixed; top:24px; right:32px; background:rgba(255,255,255,0.1); border:none; border-radius:50%; width:44px; height:44px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background 0.2s; }
.lightbox-close:hover { background:rgba(255,255,255,0.2); }
.lightbox-nav { position:fixed; top:50%; transform:translateY(-50%); background:rgba(255,255,255,0.12); border:none; border-radius:50%; width:52px; height:52px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background 0.2s; }
.lightbox-nav:hover { background:rgba(255,255,255,0.24); }
.lightbox-nav.prev { left:24px; }
.lightbox-nav.next { right:24px; }

/* Animations */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(40px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Cover entrance — runs on page load, no JS needed */
#cover .pill-glow      { animation: fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) both; animation-delay:0ms; }
#cover h1              { animation: fadeUp 0.75s cubic-bezier(0.22,1,0.36,1) both; animation-delay:140ms; }
#cover .text-white-60  { animation: fadeUp 0.75s cubic-bezier(0.22,1,0.36,1) both; animation-delay:280ms; }
#cover .flex           { animation: fadeUp 0.75s cubic-bezier(0.22,1,0.36,1) both; animation-delay:420ms; }

/* Scroll-triggered elements */
[data-anim] {
  opacity:0;
  transform:translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
  transition-delay: var(--anim-delay, 80ms);
}
[data-anim].anim-in {
  opacity:1;
  transform:translateY(0);
}

/* FAQ Accordion */
.faq-accordion { display:flex; flex-direction:column; max-width:800px; }
.faq-item { border-bottom:1px solid var(--gray-200); }
.faq-item:first-child { border-top:1px solid var(--gray-200); }
.faq-question { width:100%; background:none; border:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:22px 0; text-align:left; }
.faq-question-text { font-family:var(--font-heading); font-size:17px; font-weight:700; color:var(--navy); line-height:1.4; }
.faq-chevron { flex-shrink:0; color:var(--gray-400); transition:transform 0.25s ease; }
.faq-item.open .faq-chevron { transform:rotate(180deg); }
.faq-answer { overflow:hidden; max-height:0; transition:max-height 0.3s ease; }
.faq-answer-inner { padding-bottom:22px; font-family:var(--font-body); font-size:15px; line-height:1.65; color:var(--gray-600); }
.faq-answer-inner p + p { margin-top:10px; }
.faq-answer-inner ul { margin:12px 0 0 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; }
.faq-answer-inner li { display:flex; align-items:flex-start; gap:10px; }
.faq-answer-inner li::before { content:''; display:block; width:6px; height:6px; border-radius:50%; background:var(--orange); flex-shrink:0; margin-top:8px; }

/* === MOBILE === */
@media (max-width: 768px) {
  /* Nav */
  .topnav { padding: 0 16px; }
  .topnav-logo img { height: 20px; }
  .toc-toggle { padding: 8px 12px; gap: 0; }
  .toc-toggle-label { display: none; }
  .lang-toggle { padding: 8px 12px; }

  /* Section padding */
  .section-inner { padding: 48px 20px; }

  /* Fonts */
  .display-xl { font-size: 36px; }
  .display    { font-size: 30px; }
  h1          { font-size: 30px; }
  h2          { font-size: 26px; }
  h3          { font-size: 20px; }
  p           { font-size: 16px; }

  /* Class-based grids → single column */
  .grid-2, .grid-3, .grid-4, .grid-wide { grid-template-columns: 1fr !important; }

  /* Inline grids → single column */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* Column items with border-right dividers: normalize padding, switch to border-bottom */
  [style*="border-right:1px solid"] {
    padding: 20px 0 !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(200,200,200,0.25);
  }
  [style*="grid-template-columns"] > *:last-child { border-bottom: none !important; }

  /* Onboarding steps → horizontal scroll */
  .onboarding-steps { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .onboarding-steps > [style*="flex:1"] { min-width: 200px; flex: 0 0 200px; }
}
