/* =====================================================================
   Stripe Replica — CSS
   ===================================================================== */

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }

/* ----- Font stack (Söhne is proprietary, fall back to system + SF Pro) ----- */
:root {
  --font-sans: "Söhne", "SF Pro Display", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Stripe design tokens (sampled) */
  --c-text:        #061b31;   /* near-black headings */
  --c-text-body:   #425466;   /* subdued body */
  --c-text-mute:   #64748d;   /* very subdued */
  --c-link:        #533afd;   /* accent purple */
  --c-link-hover:  #2e2b8c;   /* darker purple */
  --c-bg:          #ffffff;
  --c-bg-quiet:    #f6f9fb;
  --c-bg-card:     #f8fafd;
  --c-border:      #e3e8ee;
  --c-border-soft: rgba(0,0,0,0.06);
  --c-divider:     #d4dde6;
  --c-on-primary:  #ffffff;

  /* radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* spacing */
  --nav-h: 76px;
  --container-px: 87px;       /* x of section start at desktop 1440 */
  --container-max: 1266px;
}

html { font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--c-text);
  background: var(--c-bg);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.navigation {
  position: relative;
  z-index: 2;
  width: 100%;
  background: var(--c-bg);
}
.navigation__inner {
  position: relative;
  max-width: 1298px;         /* matches Stripe 1298px */
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 18px;           /* matches Stripe 18px */
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navigation__left {
  display: flex;
  align-items: center;
  gap: 0;
  padding-left: 16px;        /* pushes logo from 89 -> 105 */
}
.navigation__logo {
  display: inline-flex;
  align-items: center;
  margin-right: 28px;        /* 105 + 60 + 28 = 193 (start of Products) */
  width: 60px; height: 25px;
}
.navigation__logo svg { width: 100%; height: 100%; display: block; }

.navigation__primary {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Trigger buttons (Products, Solutions, ...) */
.nav-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 0;
  font-size: 14px;
  line-height: 14px;
  font-weight: 400;
  color: var(--c-text);
  border-radius: var(--r-sm);
  transition: color 120ms ease;
  margin-right: 24px;
}
.nav-trigger:last-of-type { margin-right: 24px; }
.nav-trigger .chevron {
  width: 16px; height: 16px;
  color: currentColor;
  transition: transform 200ms ease;
}
.nav-trigger:hover,
.nav-trigger[aria-expanded="true"] {
  color: var(--c-link);
}
.nav-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* Simple Pricing link */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  line-height: 14px;
  font-weight: 400;
  color: var(--c-text);
  border-radius: var(--r-sm);
  transition: color 120ms ease;
  margin-right: 24px;
}
.nav-link:hover { color: var(--c-link); }

/* Pricing has a wider gap (40px) and a vertical separator on the right */
.nav-link--pricing {
  margin-right: 40px;
  position: relative;
}
.nav-link--pricing::after {
  content: "";
  position: absolute;
  right: -20px;             /* centered in the 40px gap */
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: var(--c-border);
  border-radius: 1px;
}

/* Guide me (with sparkle icon) — slightly larger font like Stripe */
.nav-link--guide {
  font-size: 16px;
  font-weight: 400;
  color: #000;
  padding: 12px 0;
  gap: 4px;
}
.nav-link--guide .nav-link__icon {
  width: 16px; height: 16px;
  color: var(--c-text);
  flex: 0 0 auto;
  margin-bottom: 1px;
}
.nav-link--guide:hover { color: var(--c-link); }
.nav-link--guide:hover .nav-link__icon { color: var(--c-link); }

/* Right cluster */
.navigation__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  border-radius: var(--r-sm);
  padding: 13.5px 20px 14.5px;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
  white-space: nowrap;
  user-select: none;
}
.btn--ghost {
  color: #ff5b79;
  background: #ffffff;
  border: 1px solid #ffffff;
  padding: 10.5px 20px 13.5px;
  /* Approximate Stripe's "cutout" effect: warm gradient text on white pill */
  background-image: linear-gradient(90deg, #ff7a59 0%, #ff5b79 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  box-shadow: 0 1px 2px rgba(13, 23, 56, 0.04);
  transition: background 150ms ease, color 150ms ease;
}
.btn--ghost:hover {
  background: #ffffff;
  background-image: none;
  -webkit-text-fill-color: var(--c-link);
  color: var(--c-link);
}
.btn--primary {
  color: var(--c-on-primary);
  background: var(--c-link);
  padding: 12.5px 20px 13.5px;     /* matches Stripe primary "Contact sales" */
}
.btn--primary:hover { background: var(--c-link-hover); }
.btn--primary .btn__arrow {
  width: 10px; height: 10px;
  color: currentColor;
  flex: 0 0 auto;
  margin-left: 4px;
  margin-bottom: 1px;
}

/* =====================================================================
   MEGA MENU
   ===================================================================== */
.nav-overlay {
  position: fixed;
  inset: 76px 0 0 0;
  background: rgba(0,0,0,0.5);
  z-index: 1;
  animation: fadeIn 180ms ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--c-bg);
  border-top: 1px solid var(--c-border-soft);
  box-shadow: 0 24px 36px -8px rgba(13, 23, 56, 0.08), 0 2px 4px rgba(13, 23, 56, 0.04);
  z-index: 3;
  padding: 40px 0 56px;
  animation: slideDown 220ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mega-menu[hidden] { display: none; }
.nav-overlay[hidden] { display: none; }

.mega-menu__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: start;
}

/* For menus without promo (3/2 cols) */
.mega-menu:has(.mega-menu__cols--3) .mega-menu__inner,
.mega-menu:has(.mega-menu__cols--2) .mega-menu__inner {
  grid-template-columns: 1fr;
}

.mega-menu__cols {
  display: grid;
  gap: 32px;
}
.mega-menu__cols {
  grid-template-columns: repeat(5, 1fr);
}
.mega-menu__cols--3 { grid-template-columns: repeat(3, 1fr); }
.mega-menu__cols--2 { grid-template-columns: repeat(2, 1fr); }

.mega-col__title {
  margin: 0 0 16px;
  padding: 0 0 8px;
  font-size: 16px;
  font-weight: 400;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border);
}
.mega-col__list li { margin-bottom: 14px; }
.mega-col__list li:last-child { margin-bottom: 0; }
.mega-col__list a {
  display: block;
  padding: 2px 0;
  border-radius: var(--r-sm);
  transition: color 120ms ease;
  cursor: pointer;
}
.mega-col__list a:hover .mega-item__title { color: var(--c-link); }
.mega-item__title {
  display: block;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--c-link);
  margin-bottom: 2px;
}
.mega-item__sub {
  display: block;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--c-text-mute);
}

/* Promo card (Stripe Sessions) */
.mega-menu__promo {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
}
.mega-promo__img {
  width: 100%;
  aspect-ratio: 16/10;
  background:
    radial-gradient(120% 60% at 50% 30%, #f0c4ff 0%, #d6b3ff 35%, #b3a0ff 60%, #6f5bdb 100%),
    linear-gradient(180deg, #5a3f9c 0%, #2c1e5c 100%);
  background-blend-mode: screen, normal;
  position: relative;
}
.mega-promo__img::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 25% at 30% 50%, rgba(255, 200, 100, 0.6), transparent 70%),
    radial-gradient(40% 30% at 70% 60%, rgba(255, 120, 80, 0.5), transparent 70%);
  mix-blend-mode: screen;
}
.mega-promo__body { padding: 16px 18px 20px; }
.mega-promo__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 400;
  color: var(--c-text);
}
.mega-promo__text {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--c-text-mute);
}
.mega-promo__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 400;
  color: var(--c-link);
  transition: color 120ms ease;
}
.mega-promo__cta:hover { color: var(--c-link-hover); }
.mega-promo__cta svg { width: 10px; height: 10px; }

/* =====================================================================
   Future sections placeholder
   ===================================================================== */
main { min-height: 60vh; }
