/* ─────────────────────────────────────────────────────────────────
   Base — reset, scroll container, snap sections, design primitives
   (themes, decor, dots, eyebrows, tags, points, buttons, pills,
    section headings, split layout)
   ─────────────────────────────────────────────────────────────── */

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ─── Snap container ─────────────────────────────────────────── */
#scrollContainer {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#scrollContainer::-webkit-scrollbar { display: none; }

/* ─── Section base ────────────────────────────────────────────── */
.snap-section {
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.theme-light { background: var(--bg-paper); }
.theme-gray  { background: var(--bg-body); }
.theme-dark  { background: var(--dark-paper); }
.theme-deep  { background: var(--dark-body); }

/* Content section frame: horizontal padding + max-width container.
   Used on every section that hosts a .split-layout. */
.section-frame { padding: 0 80px; }

/* ─── Hero / CTA banner (full-bleed dark, centered) ──────────── */
.banner {
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 0 48px;
}

.banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── Decor (grid + glow circles), used inside .banner ──────── */
.decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.decor-grid {
  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: 60px 60px;
}

.decor-circle {
  position: absolute;
  border-radius: 50%;
}
.decor-circle--tr {
  width: 700px; height: 700px;
  top: -280px; right: -180px;
  background: radial-gradient(circle, rgba(0,150,136,0.13) 0%, transparent 65%);
}
.decor-circle--bl {
  width: 500px; height: 500px;
  bottom: -180px; left: -120px;
  background: radial-gradient(circle, rgba(0,150,136,0.09) 0%, transparent 65%);
}

/* ─── Scroll dots (right-side rail) ──────────────────────────── */
#scrollDots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.s-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}
.s-dot.active                 { background: #fff; transform: scale(1.4); }
.s-dot.on-light               { background: rgba(76,78,100,0.25); }
.s-dot.on-light.active        { background: var(--primary); }

/* ─── Eyebrow (small uppercase label) ────────────────────────── */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 24px;
}

/* ─── Tag (rounded chip with primary accent) ─────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-a8);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.theme-dark .tag { background: rgba(0,150,136,0.15); }

/* ─── Section headings & body copy ───────────────────────────── */
.banner-h1 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1.06;
  max-width: 820px;
  margin-bottom: 24px;
  overflow-wrap: break-word;
}
.banner-h1 em {
  color: var(--primary);
  font-style: normal;
  display: block;
}

.banner-h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
  max-width: 640px;
  margin: 0 auto 20px;
  overflow-wrap: break-word;
}

.banner-sub {
  font-size: 18px;
  color: var(--text-on-dark-muted);
  max-width: 540px;
  margin: 0 auto 44px;
  line-height: 1.65;
}

.section-h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  overflow-wrap: break-word;
}
.theme-light .section-h2,
.theme-gray  .section-h2 { color: var(--text-primary); }
.theme-dark  .section-h2 { color: var(--text-on-dark); }

.section-desc {
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 28px;
}
.theme-light .section-desc,
.theme-gray  .section-desc { color: var(--text-secondary); }
.theme-dark  .section-desc { color: rgba(255,255,255,0.52); }

/* ─── Points (icon-bullet list) ──────────────────────────────── */
.points {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.point {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}
.theme-light .point,
.theme-gray  .point { color: var(--text-primary); }
.theme-dark  .point { color: var(--text-on-dark-soft); }

.point-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary-a16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.theme-dark .point-icon { background: rgba(0,150,136,0.20); }
.point-icon iconify-icon { color: var(--primary); font-size: 12px; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  padding: 15px 36px;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.2px;
  box-shadow: var(--shadow-cta);
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ─── Pills (decorative or clickable chips) ─────────────────── */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 7px 16px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pill iconify-icon { font-size: 15px; }

a.pill { cursor: pointer; }
a.pill:hover,
.pill.active {
  background: rgba(0,150,136,0.15);
  border-color: rgba(0,150,136,0.40);
  color: var(--primary-light);
}

/* ─── Split layout (2-col grid that stacks on mobile) ───────── */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}
.split-layout--reverse { direction: rtl; }
.split-layout--reverse > * { direction: ltr; }


/* ───────────────────────────────────────────────────────────────
   FOOTER
   ─────────────────────────────────────────────────────────── */

.site-footer {
  font-size: 12px;
  letter-spacing: 0.01em;
}

/* Overlay mode: pinned to the bottom of the last snap section. */
.site-footer--overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 16px 32px;
}

/* Block mode: normal flow at the bottom of a regular-scroll page. */
.site-footer--block {
  padding: 28px 40px;
  border-top: 1px solid rgba(76, 78, 100, 0.08);
  background: var(--bg-paper);
}

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

.site-footer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-footer-sep { opacity: 0.5; }

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-footer-links a {
  text-decoration: none;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.site-footer-links a:hover { opacity: 0.7; }

.site-footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Light theme (used when last section is light, or block mode) */
.site-footer--light,
.site-footer--block {
  color: var(--text-secondary);
}
.site-footer--light .site-footer-links a,
.site-footer--block .site-footer-links a {
  color: var(--text-secondary);
}
.site-footer--light .site-footer-icon iconify-icon,
.site-footer--block .site-footer-icon iconify-icon {
  color: var(--text-secondary);
}

/* Dark theme (used when last section is dark) */
.site-footer--dark {
  color: var(--text-on-dark-muted);
}
.site-footer--dark .site-footer-links a {
  color: var(--text-on-dark-muted);
}
.site-footer--dark .site-footer-icon iconify-icon {
  color: var(--text-on-dark-muted);
}

@media (max-width: 900px) {
  /* On mobile the snap layout is disabled and sections become auto-height,
     so the absolutely-positioned overlay would sit on top of the section's
     content. Drop it back into normal flow below the banner content. */
  .site-footer--overlay {
    position: static;
    width: 100%;
    margin-top: 40px;
  }
}

@media (max-width: 720px) {
  .site-footer { font-size: 11.5px; }
  .site-footer--overlay { padding: 12px 18px; }
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }
}

/* ───────────────────────────────────────────────────────────────
   PAGE-DOC: long-form pages (privacy policy, etc.) override the
   snap-scroll architecture so the body scrolls normally.
   Apply class on the <html> element: <html class="page-doc">.
   ─────────────────────────────────────────────────────────── */

html.page-doc,
html.page-doc body { height: auto; overflow: auto; }

html.page-doc body {
  background: var(--bg-body);
  color: var(--text-primary);
}

.doc-content {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 56px) 24px 80px;
  line-height: 1.7;
}
.doc-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.doc-content .doc-meta {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 40px;
}
.doc-content h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 36px 0 12px;
  color: var(--text-primary);
}
.doc-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text-primary);
}
.doc-content p { margin-bottom: 14px; color: var(--text-primary); }
.doc-content ul {
  margin: 8px 0 16px 0;
  padding-left: 22px;
}
.doc-content li { margin-bottom: 6px; }
.doc-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc-content a:hover { color: var(--primary-dark); }


/* ───────────────────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .section-frame { padding: 0 40px; }
  .banner        { padding-left: 32px; padding-right: 32px; }
  .split-layout  { gap: 48px; }
}

@media (max-width: 900px) {
  html, body { height: auto; overflow: auto; }

  #scrollContainer {
    height: auto;
    overflow-y: visible;
    scroll-snap-type: none;
  }

  .snap-section {
    height: auto;
    min-height: 0;
    scroll-snap-align: none;
    padding-top: 104px;
    padding-bottom: 72px;
  }

  /* Class-level rule wins over .snap-section because it's later AND
     has matching specificity; section IDs in page CSS use the same
     longhand to avoid the ID-vs-class specificity trap. */
  .section-frame { padding-left: 20px; padding-right: 20px; }
  .banner        { padding: 104px 20px 72px; }

  #scrollDots { display: none; }

  .split-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .split-layout--reverse { direction: ltr; }

  .banner-h1 {
    font-size: clamp(1.8rem, 7.5vw, 2.6rem);
    letter-spacing: -1px;
    margin-bottom: 18px;
  }
  .banner-h2 {
    font-size: clamp(1.7rem, 6.5vw, 2.4rem);
    margin-bottom: 18px;
  }
  .banner-sub {
    font-size: 16px;
    margin-bottom: 28px;
  }

  .section-h2 {
    font-size: clamp(1.4rem, 5.5vw, 1.7rem);
  }
  .section-h2 br { display: none; }
  .section-desc {
    font-size: 14.5px;
    line-height: 1.65;
  }

  .pill-row { gap: 8px; }
  .pill     { padding: 7px 14px; font-size: 12px; }

  .btn-primary { padding: 13px 28px; font-size: 15px; }

  /* Decor circles shrink so they don't dominate small viewports */
  .decor-circle--tr {
    width: 380px; height: 380px;
    top: -160px; right: -120px;
  }
  .decor-circle--bl {
    width: 300px; height: 300px;
    bottom: -120px; left: -100px;
  }
  .decor-grid { background-size: 40px 40px; }
}

@media (max-width: 420px) {
  .snap-section  { padding-top: 96px; padding-bottom: 56px; }
  .section-frame { padding-left: 16px; padding-right: 16px; }
  .banner        { padding: 96px 16px 56px; }

  .banner-h1  { font-size: 1.7rem; }
  .section-h2 { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  #scrollContainer { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
