/* =========================================================
   01) FONTS
   ---------------------------------------------------------
   Custom font faces. 'font-display: swap' avoids FOIT by
   showing fallback fonts until custom ones load.
========================================================= */
@font-face {
  font-family: 'BM Hanna Pro';
  src: url('fonts/BMHannaPro.ttf') format('truetype');
  font-display: swap;
}

/* =========================================================
   02) THEME VARIABLES / ROOT
   ---------------------------------------------------------
   Centralized design tokens: fonts, colors, shadows, widths.
   Dark color-scheme hints to UA for form controls, etc.
========================================================= */
:root {
  --font-body: 'BM Hanna Pro', 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Slackey', 'BM Hanna Pro', 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;

  --color-bg: #0d0221;
  --color-bg-alt: #13062b;
  --color-surface: rgba(19, 6, 43, 0.8);
  --color-accent: #ff4fd8;
  --color-accent-2: #3de7ff;
  --color-text: #f7f4ff;
  --color-text-muted: rgba(247, 244, 255, 0.7);

  --shadow-elevated: 0 24px 64px rgba(0, 0, 0, 0.45);
  --max-width: 1100px;

  color-scheme: dark;
}

/* =========================================================
   03) BASE / RESET
   ---------------------------------------------------------
   Consistent box model, smooth scrolling, global body styles.
========================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.32rem;
  line-height: 1.7;
  color: var(--color-text);
  background:
    radial-gradient(circle at top, rgba(61, 231, 255, 0.12), transparent 55%),
    radial-gradient(circle at 30% 20%, rgba(255, 79, 216, 0.18), transparent 65%),
    var(--color-bg);
  min-height: 100vh;
}

/* =========================================================
   04) TYPOGRAPHY & LINKS
   ---------------------------------------------------------
   Global link treatment; specific heading styles appear
   in component sections (hero, section titles, etc.).
========================================================= */
a {
  color: var(--color-accent-2);
  text-decoration: none;
}
a:hover,
a:focus-visible { text-decoration: underline; }

/* =========================================================
   05) LAYOUT CONTAINERS
   ---------------------------------------------------------
   Reusable width constraints and centered layouts.
========================================================= */
.container {
  width: min(100% - 3rem, var(--max-width));
  margin-inline: auto;
}
.container.narrow {
  width: min(100% - 3rem, 720px);
}

/* =========================================================
   06) HEADER & NAVIGATION
   ---------------------------------------------------------
   Sticky header with blurred backdrop and simple nav.
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 2, 33, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(247, 244, 255, 0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.75rem;
}

/* Optional brand lockup (currently commented out in HTML) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
}
.brand__logo {
  width: 48px;
  aspect-ratio: 1;
  border-radius: 12px;
  background: conic-gradient(from 180deg at 50% 50%, #ff4fd8 0deg, #3de7ff 120deg, #ffd84f 240deg, #ff4fd8 360deg);
  box-shadow: 0 12px 32px rgba(255, 79, 216, 0.35);
}

/* Primary nav */
.primary-nav ul {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--color-text); }

/* =========================================================
   07) HERO / PARALLAX STACK
   ---------------------------------------------------------
   Scroll-pinned hero with layered parallax background and
   centered splash (logo + tagline). Z-index order matters.
========================================================= */

/* Tall scrollytelling container controlling pin duration */
.hero-pin {
  height: var(--pin-height, 220vh);
  position: relative;
}

/* Sticky hero: holds at top while scrolling through .hero-pin */
.hero {
  position: sticky;
  top: 0;
  height: 100vh;       /* lock viewport height while pinned */
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 12rem 0 6rem;
  overflow: hidden;
  z-index: 0;
}

/* Layered parallax background; images assigned per layer */
.parallax {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.layer {
  position: absolute;
  inset: -12vh -12vw;
  transform: translateZ(0);
  opacity: 1;
  will-change: transform, opacity;
}

/* Layer image defaults */
.layer__image {
  width: 100%;
  height: 100%;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: contain;
}

/* Layer stacking order (back -> front) */
.layer--7 { z-index: 1; }
.layer--6 { z-index: 2; }
.layer--5 { z-index: 3; }
.layer--4 { z-index: 4; }
.layer--3 { z-index: 5; }
.layer--2 { z-index: 6; }
.layer--1 { z-index: 7; }
.layer--0 { z-index: 8; }

/* Layer imagery (swap these to change backgrounds) */
.layer--7 .layer__image { background-image: url('hero_7.png'); background-size: cover; }
.layer--6 .layer__image { background-image: url('hero_6.png'); }
.layer--5 .layer__image { background-image: url('hero_5.png'); }
.layer--4 .layer__image { background-image: url('hero_4.png'); }
.layer--3 .layer__image { background-image: url('hero_3.png'); }
.layer--2 .layer__image { background-image: url('hero_2.png'); }
.layer--1 .layer__image { background-image: url('hero_1_full.png'); }
.layer--0 .layer__image { background-image: url('hero_0.png'); }

/* Foreground content (title, subtitle, CTA) */
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 3rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.hero__subtitle {
  max-width: 40ch;
  margin-inline: auto;
  color: var(--color-text-muted);
}

/* Logo splash (centered logo + tagline above parallax + hero content) */
.logo-splash {
  position: absolute;
  inset: 0;
  display: flex;              /* final behavior (replaces earlier grid) */
  flex-direction: column;
  justify-content: center;    /* vertical center */
  align-items: center;        /* horizontal center */
  gap: clamp(0.25rem, 1vw, 0.75rem);
  z-index: 3;                 /* above layers and hero__content */
  pointer-events: none;       /* decorative only */
}
.logo-splash img {
  width: min(60vw, 520px);
  height: auto;
  transform: scale(1.2);
  transform-origin: center top;
}
.logo-splash__tagline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  letter-spacing: 0.12em;
  color: var(--color-text);
  text-align: center;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  margin-top: 0; /* spacing handled by .logo-splash gap */
}

/* =========================================================
   08) BUTTONS / CTAs
   ---------------------------------------------------------
   Primary pill CTA and secondary outline variant.
========================================================= */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: #090016;
  box-shadow: 0 18px 42px rgba(61, 231, 255, 0.35);
  border: none;
}
.cta-button--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(247, 244, 255, 0.35);
  box-shadow: none;
}

/* =========================================================
   09) SECTIONS (GENERIC)
   ---------------------------------------------------------
   Shared spacing for sections and section headings.
========================================================= */
.section { padding: clamp(4rem, 7vw, 7rem) 0; }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1rem;
}

/* =========================================================
   10) ABOUT SECTION
   ---------------------------------------------------------
   Centered layout and mantra treatment for the About block.
========================================================= */
.about.section { text-align: center; }
.about.section .container.narrow {
  max-width: 700px;  /* keeps lines readable */
  margin: 0 auto;
}
.about.section p {
  margin-left: auto;
  margin-right: auto;
}

/* Reduce top padding of the about section */
.about.section {
  padding-top: clamp(1rem, 2vw, 2rem); /* previously 4–7rem */
}

.about p { margin-bottom: 1.25rem; }
.about__mantra {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  letter-spacing: 0.25em;
  text-align: center;
  margin: 2rem 0;
}

/* =========================================================
   11) NEWSLETTER / EMBED
   ---------------------------------------------------------
   Centered layout with a contained glow inside the signup pill.
   - No section-wide ::before/::after glows
   - Card is width-limited and centered
   - Heading/intro centered
   - Inputs + submit keep your existing look
========================================================= */

.newsletter {
  position: relative;
  isolation: isolate;
  background: transparent;                 /* no full-width wash */
}

/* Center the whole section's contents */
#newsletter.section {
  display: grid;
  place-items: center;                      /* horizontal + vertical centering */
  padding-block: clamp(3rem, 6vw, 6rem);
}

/* Keep the inner container centered */
#newsletter .container.narrow {
  margin-inline: auto;
}

/* Remove any old section-wide glow artifacts (if present) */
#newsletter::before,
#newsletter::after { display: none; }

/* Center the heading + intro copy */
#newsletter .newsletter__heading {
  text-align: center;
}
#newsletter .newsletter__heading h2 {
  margin-block: 0 0.5rem;
}
#newsletter .newsletter__heading p {
  margin-block: 0 1.25rem;
  opacity: 0.9;
}

/* Host element around the MailerLite form */
.newsletter__embed {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding: 0;                               /* pill provides its own padding */
  background: transparent;                  /* no outer box */
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* The pill/card itself: width, padding, contained glow */
.newsletter .ml-form-embedWrapper.embedForm {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;                         /* adjust to taste */
  margin-inline: auto;
  padding: 2.5rem 2rem;
  border-radius: 24px;

  /* Contained, soft internal glow (no edge bias) */
  background: radial-gradient(
      circle at 50% 50%,
      rgba(255, 79, 216, 0.22),
      rgba(61, 231, 255, 0.14) 46%,
      rgba(13, 2, 33, 0.78) 80%
  );
  border: 1px solid rgba(247, 244, 255, 0.10);
  box-shadow:
    0 0 60px rgba(61, 231, 255, 0.10),
    0 0 120px rgba(255, 79, 216, 0.08);
}

/* Inputs & submit (uses your existing tokens) */
.ml-form-embedContainer { width: 100%; }
.ml-form-embedWrapper   { width: 100%; }
.ml-form-embedBody input[type="email"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border, rgba(255,255,255,0.2));
  background: var(--color-surface, rgba(19, 6, 43, 0.8));
  color: var(--color-text, #fff);
  font-family: var(--font-body);
}

/* Center the submit button row */
#newsletter .ml-form-embedSubmit {
  display: flex;
  justify-content: center;
}
.ml-form-embedSubmit .button {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Tiny loader dot spinner */
.ml-form-embedSubmitLoad {
  display: inline-block; width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid currentColor;
  border-right-color: transparent;
  animation: ml-spin 0.8s linear infinite;
}
@keyframes ml-spin { to { transform: rotate(360deg); } }


/* =========================================================
   12) FEATURES GRID & CARDS
   ---------------------------------------------------------
   Auto-fit responsive grid with glassy feature cards.
========================================================= */
.features .container {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.feature-card {
  background: rgba(19, 6, 43, 0.85);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(247, 244, 255, 0.12);
  display: grid;
  gap: 0;
  min-height: 100%;
}
.feature-card__media {
  position: relative;
  background: linear-gradient(135deg, rgba(61, 231, 255, 0.35), rgba(255, 79, 216, 0.35));
  min-height: 200px;
  display: grid;
  place-items: center;
}
.placeholder-image {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(9, 0, 22, 0.85);
  background: rgba(247, 244, 255, 0.8);
  padding: 0.75rem 1rem;
  border-radius: 999px;
}
.feature-card__content { padding: 2rem; }
.feature-card__content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}
.feature-card__content p { color: var(--color-text-muted); }

/* =========================================================
   13) CTA SECTION
   ---------------------------------------------------------
   Centered action rows that wrap on small screens.
========================================================= */
.cta { text-align: center; }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* =========================================================
   14) FOOTER
   ---------------------------------------------------------
   Simple site footer + small-print brand disclaimer.
========================================================= */
.site-footer {
  background: rgba(9, 0, 22, 0.85);
  border-top: 1px solid rgba(247, 244, 255, 0.08);
  padding: 1.5rem 0;
  font-size: 0.85rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.company-disclaimer {
  flex: 1 1 100%;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: rgba(247, 244, 255, 0.45);
  line-height: 1.4;
}
.company-disclaimer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: rgba(247, 244, 255, 0.55);
}
.company-disclaimer__logo {
  width: 60px;
  height: 60px;
  display: block;
  filter: brightness(1.1);
  opacity: 0.8;
}

/* =========================================================
   15) LEGAL PAGES
   ---------------------------------------------------------
   Dedicated header + content styles for legal docs.
========================================================= */
.legal { background: var(--color-bg); }
.legal__header {
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  background: var(--color-bg-alt);
  border-bottom: 1px solid rgba(247, 244, 255, 0.08);
  text-align: center;
}
.legal__header h1 {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.legal__header .brand {
  font-family: var(--font-body);
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.legal__content { padding: clamp(3rem, 6vw, 6rem) 0; }
.legal__content h2 {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1rem;
  margin-top: 2.5rem;
}
.legal__footer {
  padding: 3rem 0 5rem;
  text-align: center;
}

/* =========================================================
   16) UTILITIES & ACCESSIBILITY
   ---------------------------------------------------------
   Glyph fallback, screen-reader-only helper.
========================================================= */
.glyph-fallback {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}
/* Visually hidden (still accessible) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================
   17) RESPONSIVE & REDUCED MOTION
   ---------------------------------------------------------
   Mobile tweaks and accessibility: respect prefers-reduced-motion.
========================================================= */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 0.75rem;
  }
  .primary-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero { padding: 10rem 0 4rem; }
  .layer__image { width: min(600px, 120vw); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .parallax,
  .layer,
  .layer__image {
    animation: none;
    transform: none !important;
  }
}
