/* =========================
   HERO / SCIENCE / COLLAGE PAGE CSS
   ========================= */

:root {
  --color-primary-blue: #5aa4ec;
  --color-dark-navy: #0c142a;
  --color-black: #000000;
  --color-white: #ffffff;

  --fs-h1: 80px;
  --fs-subheading: 32px;
  --fs-body: 16px;
  --fs-link: 18px;
  --fs-small: 14px;

  --lh-tight: 1;
  --lh-body: 1.2;

  --ls-tight: -0.03em;

  --radius-md: 12px;
  --radius-xl-section: 120px;

  --header-height: 96px;

  --transition-fast: 150ms ease-out;
  --transition-medium: 250ms ease-out;
}

/* ====== GENERAL LAYOUT HELPERS ====== */

.page-main {
  padding-top: var(--header-height);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  border: none;
  font-size: var(--fs-link);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    opacity var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-primary-blue);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #75b5f1;
}

.btn-primary:active {
  background-color: #3c8bdb;
}

.btn-link {
  background: none;
  padding: 0;
  color: var(--color-dark-navy);
}

.btn-link:hover {
  color: #243055;
}

.btn-link:active {
  color: #060a17;
}

.apple-icon {
  font-family: "Font Awesome 6 Brands";
}

/* =========================
   HEADER
   ========================= */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition:
    background-color var(--transition-medium),
    backdrop-filter var(--transition-medium),
    transform 200ms ease-out;
  background-color: transparent;
}

.site-header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(64px);
  -webkit-backdrop-filter: blur(64px);
}

/* Slide header out of view when scrolling down */
.site-header.header-hidden {
  transform: translateY(-100%);
}

/* When mobile menu is open, header becomes a quiet, transparent shell.
   No transitions = no flicker while the blur overlay animates. */
body.menu-open .site-header {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: none; /* kill the smooth transition while menu is open */
}

/* Disable header background animation while menu is closing */
body.menu-closing .site-header,
body.menu-closing .site-header.header-scrolled {
  transition: none;
}

body.menu-open .site-header.header-scrolled {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: none;
}

.header-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 160px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.brand-logo {
  height: 32px;
}

/* Desktop nav */

.main-nav {
  margin-left: auto;
  margin-right: 32px;
}

.nav-list {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  font-size: var(--fs-body);
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  color: var(--color-dark-navy);
}

.nav-list a:hover {
  color: #243055;
}

.btn-header-cta {
  background-color: var(--color-dark-navy);
  color: var(--color-white);
}

.btn-header-cta:hover {
  background-color: #222f57;
}

.btn-header-cta:active {
  background-color: #060a17;
}

/* Hamburger */

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background-color: rgba(255, 255, 255, 0.95);
  justify-content: center;
  align-items: center;
  padding: 0;
  margin-left: 12px;
  cursor: pointer;
}

.hamburger-icon {
  width: 20px;
  height: 20px;
}

/* =========================
   MOBILE MENU OVERLAY
   ========================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  z-index: 2000;
  display: none;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-inner {
  width: 100%;
  max-height: 100vh;
  min-height: 100vh;
  padding: 0 24px 200px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  margin-top: -16px;
}

.mobile-menu-close {
  border: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  color: var(--color-dark-navy);
}

.mobile-nav {
  margin-top: auto;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-nav-list a {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  color: var(--color-dark-navy);
}

/* Force navy CTA inside menu */

.mobile-menu-cta,
.mobile-menu .btn-primary {
  width: 100%;
  align-self: center;
  margin-top: 48px;
  background-color: var(--color-dark-navy) !important;
  color: var(--color-white) !important;
}

.mobile-menu-cta:hover,
.mobile-menu .btn-primary:hover {
  background-color: #222f57 !important;
}

.mobile-menu-cta:active,
.mobile-menu .btn-primary:active {
  background-color: #060a17 !important;
}

/* When mobile menu is open, hide the header bar but keep menu visible */
body.menu-open .header-inner {
  visibility: hidden;
  pointer-events: none;
}

body.menu-open #mobile-menu,
body.menu-open .mobile-menu-inner {
  visibility: visible;
  pointer-events: auto;
}

/* When menu is open, blur page content and hide header behind overlay */

body.menu-open .page-main,
body.menu-open .site-footer {
  filter: blur(18px);
}

/* =========================
   HERO
   ========================= */

.hero {
  padding: 50px 0 136px;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 160px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  align-items: flex-start;
  gap: 64px;
  box-sizing: border-box;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 470px;
  z-index: 1;
}

.hero-mascot-wrapper {
  width: 144px;
  height: 144px;
}

.hero-mascot {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: mascotFloat 4s ease-in-out infinite;
}

.hero-title {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  color: var(--color-black);
}

.hero-subtitle {
  margin-top: 24px;
  font-size: var(--fs-subheading);
  line-height: var(--lh-body);
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  color: rgba(0, 0, 0, 0.33);
}

.hero-cta-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-right {
  display: flex;
  justify-content: center;
}

.hero-phone-frame {
  position: relative;
  width: 280px;
  max-width: 100%;
}

/* GLOW: visible and using correct asset path */
.hero-phone-glow {
  position: absolute;
  inset: -8%;
  background-image: url("../assets/hero-phone-glow.png");
  background-size: cover;
  background-position: center;
  filter: blur(30px);
  opacity: 0.3;
  transform: scale(1);
  z-index: 0;
  animation: glowPulse 4s ease-in-out infinite alternate;
}

.hero-phone {
  position: relative;
  width: 100%;
  border-radius: 40px;
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.0);
  z-index: 1;
}

.hero-badge {
  position: absolute;
  bottom: -24px;
  left: 16px;
  width: 88px;
  z-index: 2;
}

/* Initial hero states (for JS) */

.hero-mascot,
.hero-title,
.hero-subtitle,
.hero-cta-row,
.hero-right,
.hero-partners {
  opacity: 0;
  transform: translateY(12px);
}

.hero-animate-mascot,
.hero-animate-title,
.hero-animate-subtitle,
.hero-animate-ctas,
.hero-animate-phone,
.hero-animate-partners {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

/* =========================
   SCIENCE SECTION
   ========================= */

.science-section {
  padding: 200px 0 80px;
}

.science-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 160px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 64px;
  box-sizing: border-box;
}

.science-logos {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 470px;
}

.science-logos img {
  height: 72px;
}

.science-text {
  text-align: left;
}

.science-heading {
  font-size: var(--fs-subheading);
  font-weight: 500;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-tight);
  color: var(--color-black);
}

.science-body {
  margin-top: 8px;
  font-size: var(--fs-body);
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  color: rgba(0, 0, 0, 0.7);
}

.science-cta {
  margin-top: 16px;
}

/* =========================
   DATA PRIVACY
   ========================= */

.data-section {
  padding: 100px 0 240px;
}

.data-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 160px;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.data-icon {
  width: 80px;
  height: 80px;
}

.data-heading {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
}

/* =========================
   "WE GUT YOU" + FEATURES
   ========================= */

.we-gut-you {
  background-color: var(--color-primary-blue);
  border-radius: var(--radius-xl-section) var(--radius-xl-section) 0 0;
  padding: 180px 0 80px;
  color: var(--color-white);
}

.features-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 160px;
  box-sizing: border-box;
  text-align: center;
}

.features-heading {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
}

/* Bento box layout */
.features-bento {
  margin-top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.bento-row {
  display: flex;
  gap: 24px;
}

.bento-row .bento-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 460px;
}

.bento-card {
  background-color: var(--color-dark-navy);
  border-radius: 20px;
  padding: 48px 24px 0 24px;
  text-align: left;
  overflow: hidden;
}

/* Top bento card: horizontal layout on desktop/tablet */
.features-bento > .bento-card:first-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.features-bento > .bento-card:first-child .bento-title {
  margin-bottom: 0;
}

.bento-title {
  font-size: var(--fs-subheading);
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  color: var(--color-white);
  margin-bottom: 48px;
}

.bento-image {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* =========================
   COLLAGE SECTION
   ========================= */

.collage-section {
  margin-top: 200px;
  margin-bottom: -200px;
  position: relative;
  z-index: 1;
}

.collage-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.collage-tilt {
  transform: scale(0.85) rotate(-40deg);
  transform-origin: center;
}

.collage-grid {
  display: flex;
  gap: 32px;
}

.collage-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.collage-card img {
  display: block;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.we-gut-you {
  position: relative;
}

.collage-section,
.collage-inner,
.collage-tilt {
  position: relative;
  z-index: 2;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
  position: relative;        /* NEW */
  z-index: 3;                /* NEW – above collage */
  background-color: var(--color-dark-navy);
  color: var(--color-white);
  padding: 120px 0;
}


.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 160px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 128px;
}

.footer-top,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo {
  filter: brightness(0) invert(1);
}

.footer-tagline {
  margin-top: 16px;
  font-size: var(--fs-subheading);
  font-weight: 500;
  letter-spacing: var(--ls-tight);
}

.footer-copy {
  font-size: var(--fs-small);
  letter-spacing: var(--ls-tight);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
}

.footer-links a {
  position: relative;
  color: var(--color-white);
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

.footer-links a:hover {
  color: #d7deff;
}

.footer-links a:active {
  color: #757da8;
}

.footer-mascot {
  width: 144px;
  height: auto;
  animation: mascotFloat 4s ease-in-out infinite;
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes mascotFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0% {
    filter: blur(30px);
    opacity: 0.3;
    transform: scale(0.9);
  }
  100% {
    filter: blur(60px);
    opacity: 0.4;
    transform: scale(1.2);
  }
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1024px) {
  .header-inner,
  .hero-inner,
  .science-inner,
  .data-inner,
  .features-inner,
  .footer-inner {
    padding: 0 40px;
  }

  .hero-inner {
    gap: 40px;
  }

  .science-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    justify-items: center;
    text-align: center;
  }

  .science-logos {
    justify-content: center;
  }

  .science-text {
    text-align: center;
  }

  .collage-section {
  margin-top: 100px;
  }
}

@media (max-width: 768px) {
  .site-header {
    background-color: rgba(255, 255, 255, 0.9);
  }

  .main-nav,
  .btn-header-cta {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }

  .header-inner,
  .hero-inner,
  .science-inner,
  .data-inner,
  .features-inner,
  .footer-inner {
    padding: 0 24px;
  }

  .mobile-menu-inner {
    padding-top: 16px; /* match visual top offset with header */
  }

  .hero {
    padding-top: 16px;
    padding-bottom: 104px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  /* Center hero content on mobile */
  .hero-left {
    align-items: center;
    text-align: center;
  }

  .hero-cta-row {
    justify-content: center;
  }

  .science-section {
    padding: 120px 0 64px;
  }

  .data-section {
    padding: 88px 0 200px;
  }

  .we-gut-you {
    border-radius: 60px 60px 0 0;
    padding-top: 120px;
    padding-bottom: 80px;
  }

  /* Bento stacks vertically on mobile */
  .bento-row {
    flex-direction: column;
  }

  /* Top bento card also stacks vertically on mobile */
  .features-bento > .bento-card:first-child {
    flex-direction: column;
    padding-top: 32px;
  }

  .features-bento > .bento-card:first-child .bento-title {
    margin-bottom: 16px;
  }

  .collage-tilt {
    transform: scale(1) rotate(-40deg);
  }

  .collage-section {
  margin-top: 120px;
  }

  .footer-inner {
    gap: 64px;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

  .footer-links {
    margin-top: 8px;
  }
}

/* Cap collage size at 1440px viewport */
@media (min-width: 1440px) {
  .collage-tilt {
    transform: scale(0.85) rotate(-40deg);
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
  }

  .hero-mascot,
  .footer-mascot,
  .hero-phone-glow {
    animation: none !important;
  }
}
