/* Layout v2 — base resets + header/footer for redesigned pages */

/* ========== RESETS ========== */
*, *::before, *::after { box-sizing: border-box; }
body, html { margin: 0; padding: 0; min-width: 320px; }
html { scroll-behavior: smooth; background: var(--surface-page, #ffffff); }
body {
  font-family: var(--font-body, "Inter", system-ui, -apple-system, sans-serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary, #333135);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
ul, ol { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { vertical-align: top; max-width: 100%; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: inherit; font-size: inherit; }
p { margin: 0; }
button { cursor: pointer; font: inherit; color: inherit; background: none; border: none; }

/* ========== ACCESSIBILITY: keyboard focus (WCAG 2.4.7) ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.btn-cta:focus-visible,
.btn-login:focus-visible,
.btn-signup:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--accent, #7f54ee);
  outline-offset: 2px;
  border-radius: var(--radius-sm, 4px);
}
/* Light ring on filled-purple / on-dark controls for contrast */
.btn-cta--primary:focus-visible,
.btn-cta--hero:focus-visible,
.btn-signup:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 4px rgba(127, 84, 238, 0.55);
}

/* ========== reCAPTCHA v3 badge ==========
   Badge hidden to stop it overlapping page content; required branding
   text is in the footer: "This site is protected by reCAPTCHA."
   @see https://cloud.google.com/recaptcha-enterprise/docs/faq
        ("I'd like to hide the reCAPTCHA badge. What is allowed?") */
.grecaptcha-badge { visibility: hidden; }

/* Sticky footer: on short pages (e.g. empty /privacy) keep the dark footer
   pinned to the viewport bottom so the white page background never shows
   below it. */
.wrapper { overflow: hidden; display: flex; flex-direction: column; min-height: 100vh; }
.wrapper > .footer-v2 { margin-top: auto; }

/* Full-width sections own the background / tinted bands; content is centered
   and width-capped via inline padding (container pattern, no wrapper markup).
   This mirrors the existing .footer-v2 approach: content caps at ~1200px
   (1360 − 2×80) and never sits closer than 80px to the edge on desktop. */
:root {
  --pad-x: max(80px, calc((100% - 1360px) / 2 + 80px));
}

.s-section,
.ts-section,
.feature-section,
.security-cta,
.platform-hero,
.pricing-hero {
  background: transparent;
}
/* Simpler pages keep the classic centered-column model */
.legal-section,
.contact-section {
  background: transparent;
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ========== HEADER ========== */
.header {
  padding: 0;
  background: var(--surface-tint, #f5f4fb);
  border-bottom: 1px solid var(--border-hairline, rgba(26,22,38,0.08));
}

.header .navbar {
  display: flex;
  align-items: center;
  padding: 16px 80px;
  max-width: 1360px;
  margin: 0 auto;
  min-height: 83px;
}

.header .navbar-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.header .navbar-brand .logo-full { width: 140px; height: auto; }
.header .navbar-brand .logo-icon { display: none; }

.header .navbar-toggler { display: none; }

.nav-actions-desktop {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: center;
}

.nav-actions-desktop .nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 0;
}
.nav-actions-desktop .nav-menu .nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary, #5a575e);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.nav-actions-desktop .nav-menu .nav-link:hover {
  color: var(--text-primary, #333135);
  background-color: rgba(127, 84, 238, 0.06);
}
.nav-actions-desktop .nav-menu .nav-item.active .nav-link {
  color: var(--accent, #7f54ee);
}

.nav-actions-desktop .form-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-login {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary, #333135);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium, #d1cdd6);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.btn-login:hover {
  border-color: var(--text-secondary, #5a575e);
  background-color: rgba(0, 0, 0, 0.03);
}
.btn-signup {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background-color: var(--accent, #7f54ee);
  border: 1px solid var(--accent, #7f54ee);
  transition: background-color 0.2s;
}
.btn-signup:hover {
  background-color: var(--accent-hover, #6b3fd9);
  border-color: var(--accent-hover, #6b3fd9);
}

/* Mobile menu — hidden by default */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  padding: 20px 24px;
  overflow-y: auto;
}
.mobile-menu.show { display: flex; }
body.menu-open { overflow: hidden; }

.mobile-menu__header {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  margin-bottom: 48px;
}
.mobile-menu__close {
  position: absolute;
  left: 0;
  padding: 4px;
  background: rgba(0,0,0,0.05);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu__logo {
  margin: 0 auto;
}
.mobile-menu__logo svg { width: 26px; height: auto; }

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.mobile-menu__nav li a {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary, #5a575e);
  padding: 12px 12px;
  display: flex;
  align-items: center;
  min-height: 44px;
  border-radius: var(--radius-full);
  transition: color 0.2s, background-color 0.2s;
}
.mobile-menu__nav li a:hover {
  color: var(--text-primary, #333135);
  background-color: rgba(127, 84, 238, 0.06);
}

/* ========== MOBILE HEADER ========== */
@media (max-width: 991px) {
  .header .navbar {
    padding: 12px 20px;
    min-height: 64px;
  }
  .header .navbar-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1;
    padding: 8px;
  }
  .header .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .header .navbar-brand .logo-full { display: none; }
  .header .navbar-brand .logo-icon { display: block; width: 26px; height: auto; }
  .nav-actions-desktop { display: none; }
}

/* ========== SECTION SURFACES (Phase 2) ==========
   Blobs retired. Full-width sections carry solid surfaces; alternating
   tinted bands create vertical rhythm so headers no longer "float".
   Sections are full-bleed, so the band is just a background — no hacks. */
.section-band--tint { background: var(--surface-tint, #f5f4fb); }
.section-band--ink { background: var(--surface-ink, #1a1626); color: #fff; }

/* ========== SCROLL REVEAL (Phase 2) ==========
   Progressive enhancement: elements only start hidden once JS adds
   `.js-anim` to <html> (and never for reduced-motion). If JS is off or
   fails, content is always visible — no regression risk. */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur, 250ms) var(--ease-out), transform var(--dur, 250ms) var(--ease-out);
  will-change: opacity, transform;
}
.js-anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
}
