/* ============================================================
   Reputito — Global styles
   Reset, design tokens, layout, typography, header, footer
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #FAFAFA;
  color: #1A1A2F;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

img, svg { display: block; max-width: 100%; }

/* Image placeholder fallback. While the file at the src path is missing,
   the alt text renders on a #EEF2FF surface. Drop the real image into the
   corresponding /images/ subfolder and the slot fills automatically. */
.img-slot {
  background: #EEF2FF;
  color: var(--c-text-light);
  font-size: 12px;
  display: block;
  object-fit: cover;
}
.img-slot--cover { width: 100%; height: 100%; }
.img-slot--avatar { border-radius: 50%; }
button { font: inherit; }
a { color: inherit; }
ul { list-style: none; }

:root {
  --c-primary: #4F46E5;
  --c-primary-dark: #4338CA;
  --c-purple: #9333EA;
  --c-purple-dark: #7E22CE;
  --c-bg: #FAFAFA;
  --c-bg-alt: #F4F4F6;
  --c-bg-light: #EEF2FF;
  --c-bg-dark: #1A1A2F;
  --c-text: #1A1A2F;
  --c-text-muted: #64748B;
  --c-text-light: #9CA3AF;
  --c-border: #E2E8F0;
  --c-border-light: #E0E7FF;
  --c-success: #22C55E;
  --c-success-bg: #DCFCE7;
  --c-danger: #EF4444;
  --c-danger-bg: #FEE2E2;
  --c-indigo-100: #E0E7FF;
  --c-indigo-300: #A5B4FC;

  --grad-primary: linear-gradient(90deg, #4F46E5, #9333EA);
  --grad-primary-hover: linear-gradient(90deg, #4338CA, #7E22CE);
  --grad-primary-diag: linear-gradient(135deg, #4F46E5, #9333EA);

  --radius-btn: 6px;
  --radius-card: 12px;
  --radius-sm: 8px;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 32px rgba(79, 70, 229, 0.10);

  --header-height: 72px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.container-narrow { max-width: 1100px; margin: 0 auto; }
.container-thin { max-width: 900px; margin: 0 auto; }

.section { padding: 96px 40px; }
.section-sm { padding: 80px 40px; }
.section-lg { padding: 120px 40px; }

.bg-white { background: #fff; }
.bg-alt { background: var(--c-bg-alt); }
.bg-app { background: var(--c-bg); }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading { text-align: center; margin-bottom: 56px; }
.section-heading h2 {
  font-size: 44px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
  margin: 0 0 14px;
}
.section-heading p {
  font-size: 17px;
  color: var(--c-text-muted);
  margin: 0;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  padding: 10px 22px;
  font-size: 15px;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
}
.btn--gradient:focus-visible {
  outline: 2px solid #A5B4FC;
  outline-offset: 3px;
}
.btn--lg { padding: 13px 28px; font-size: 16px; }
.btn--sm { padding: 8px 18px; }
.btn--xl { padding: 16px 32px; font-size: 16px; font-weight: 700; }

.btn--gradient {
  color: white;
  background: var(--grad-primary);
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn--gradient:hover {
  background: var(--grad-primary-hover);
  opacity: 0.95;
}

.btn--outline {
  color: var(--c-primary);
  background: transparent;
  border: 1.5px solid var(--c-primary);
}
.btn--outline:hover { background: var(--c-bg-light); }

.btn--white {
  color: var(--c-primary);
  background: white;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
}
.btn--white:hover { background: rgba(255, 255, 255, 0.92); }

.btn--ghost-white {
  color: white;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.btn--ghost-white:hover { background: rgba(255, 255, 255, 0.10); }

.btn--hero-light {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: white;
  color: var(--c-text);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 16px 48px rgba(255, 255, 255, 0.2),
              0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn--hero-ghost {
  display: inline-flex;
  align-items: center;
  padding: 16px 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 16px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--hero-ghost:hover { background: rgba(255, 255, 255, 0.10); }

.btn--block { width: 100%; text-align: center; display: block; }

/* ---- Header — transparent → white on scroll ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-height);              /* 72px */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;

  /* Initial: frosted dark tint over hero */
  background: rgba(10, 10, 30, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);

  transition: background 0.35s ease-in-out,
              border-color 0.35s ease-in-out,
              box-shadow 0.35s ease-in-out;
}

/* Scrolled: white / frosted */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: #E2E8F0;
  box-shadow: 0 1px 0 0 #E2E8F0,
              0 4px 24px rgba(15, 15, 30, 0.05);
}

/* Logo — JS swaps src between logo footer.svg ↔ logo.svg */
.site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-header__logo img {
  height: 30px;
  width: auto;
  display: block;
  transition: opacity 0.25s ease-in-out;
}
.site-header__logo img:hover { opacity: 0.85; }

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;                                  /* slightly more breathing room */
  position: relative;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.25s ease-in-out, opacity 0.25s ease-in-out;
}
.nav-link:hover                     { color: white; }
.nav-link.is-active                 { color: white; font-weight: 600; }
.nav-link[aria-expanded="true"]     { color: white; }
.nav-link:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.8);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Nav in scrolled state */
.site-header.is-scrolled .nav-link               { color: #64748B; }
.site-header.is-scrolled .nav-link:hover         { color: #1A1A2F; }
.site-header.is-scrolled .nav-link.is-active     { color: var(--c-primary); font-weight: 600; }
.site-header.is-scrolled .nav-link[aria-expanded="true"] { color: var(--c-primary); }

.nav-link__chevron {
  width: 11px; height: 11px;
  opacity: 0.7;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-link:hover .nav-link__chevron,
.nav-link[aria-expanded="true"] .nav-link__chevron { opacity: 1; }
.nav-link[aria-expanded="true"] .nav-link__chevron { transform: rotate(180deg); }

/* Actions row */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Login — ghost, no border */
.site-header__login {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  transition: color 0.25s ease-in-out, background 0.2s;
}
.site-header__login:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}
.site-header__login:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.8);
  outline-offset: 3px;
  border-radius: var(--radius-btn);
}
.site-header.is-scrolled .site-header__login       { color: #1A1A2F; }
.site-header.is-scrolled .site-header__login:hover { background: var(--c-bg-alt); }

/* "Get Started" — refined size when inside header */
.site-header__actions .btn--gradient {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.35);
  transition: box-shadow 0.25s, opacity 0.2s, background 0.2s;
}
.site-header__actions .btn--gradient:hover {
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.5);
  opacity: 0.95;
}

.nav-dropdown-wrap { position: relative; }

/* Mobile hamburger */
.mobile-toggle {
  display: none;
  width: 38px; height: 38px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-btn);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease-in-out;
}
.site-header.is-scrolled .mobile-toggle { border-color: var(--c-border); }

/* Middle bar */
.mobile-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: white;
  position: relative;
  transition: background 0.2s ease-in-out;
}

/* Top and bottom bars — explicit white, not inherited */
.mobile-toggle span::before,
.mobile-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 1.5px;
  background: white;
  transition: transform 0.2s ease-in-out, background 0.2s ease-in-out;
}
.mobile-toggle span::before { top: -6px; }
.mobile-toggle span::after  { top:  6px; }

/* Scrolled: all 3 bars dark — spec (0,3,1) / (0,3,2) */
.site-header.is-scrolled .mobile-toggle span,
.site-header.is-scrolled .mobile-toggle span::before,
.site-header.is-scrolled .mobile-toggle span::after { background: #1A1A2F; }

/* ── Open (X) state ──────────────────────────────────────── */
/*
  Anchored to .site-header to reach spec (0,3,1)/(0,3,2) and
  beat the scrolled rules above on the transparent header,
  then a more-specific scrolled+expanded rule handles the white bg.
*/

/* Hide middle bar on both header states */
.site-header .mobile-toggle[aria-expanded="true"] span { background: transparent; }

/* Rotate top+bottom into X */
.site-header .mobile-toggle[aria-expanded="true"] span::before { transform: translateY(6px)  rotate(45deg); }
.site-header .mobile-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* X arms: white on transparent header — spec (0,3,2) */
.site-header .mobile-toggle[aria-expanded="true"] span::before,
.site-header .mobile-toggle[aria-expanded="true"] span::after { background: white; }

/* X arms: dark on scrolled white header — spec (0,4,2) beats everything */
.site-header.is-scrolled .mobile-toggle[aria-expanded="true"] span::before,
.site-header.is-scrolled .mobile-toggle[aria-expanded="true"] span::after { background: #1A1A2F; }

.site-footer {
  background: var(--c-bg-dark);
  padding: 72px 40px 0;
  color: white;
}
.site-footer__inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 80px;
  margin-bottom: 56px;
}
.footer-brand img {
  height: 32px;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin: 0 0 24px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  color: white;
  text-decoration: none;
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.14); }
.footer-social a:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.7);
  outline-offset: 2px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0 0 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: white; }

/* Gradient "Get Started" link in footer */
.footer-link--cta {
  background-image: linear-gradient(90deg, #4F46E5, #9333EA);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.footer-col a.footer-link--cta:hover {
  -webkit-text-fill-color: transparent;
  opacity: 0.75;
  color: inherit;
}
.footer-col a:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.7);
  outline-offset: 2px;
  border-radius: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.footer-bottom span { font-size: 14px; color: var(--c-text-muted); }
.footer-bottom a {
  font-size: 14px;
  color: var(--c-primary);
  text-decoration: none;
  font-weight: 500;
}

@keyframes homeMesh {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-15px, 15px); }
  100% { transform: scale(1) translate(15px, -15px); }
}

@media (max-width: 900px) {
  .section, .section-sm, .section-lg { padding-left: 20px; padding-right: 20px; }
  .container { padding: 0 20px; }
  .site-header { padding: 0 20px; }

  .site-nav,
  .site-header__actions { display: none; }
  .site-nav.is-open {
    display: flex;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    flex-direction: column;
    background: white;
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    align-items: stretch;
  }
  /* Mobile drawer always renders on white — force dark text */
  .site-nav.is-open .nav-link               { padding: 8px 0; color: var(--c-text-muted); }
  .site-nav.is-open .nav-link:hover,
  .site-nav.is-open .nav-link.is-active,
  .site-nav.is-open .nav-link[aria-expanded="true"] { color: var(--c-primary); }
  .site-nav.is-open .nav-dropdown-wrap { width: 100%; }
  .site-nav.is-open .mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
  }
  .mobile-toggle { display: inline-flex; }

  .footer-grid,
  .footer-cols { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: row; }
}

@media (max-width: 700px) {
  .section { padding-top: 64px; padding-bottom: 64px; }
  .section-heading h2 { font-size: 32px; }
}

@media (max-width: 767px) {
  /* Footer outer padding — matches all other sections */
  .site-footer { padding-left: 20px; padding-right: 20px; }

  /* Tighten gap before Legal column only */
  .footer-col:last-child { margin-top: -16px; }

  /* Bottom bar: stack vertically, centered */
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  /* "Become a Partner" — button-style on mobile */
  .footer-bottom a {
    display: inline-block;
    border: 1.5px solid var(--c-primary);
    border-radius: var(--radius-btn);
    padding: 8px 20px;
  }
}
