/* ============================================
   Anthony West Holdings — Scrollytelling CSS
   ============================================ */

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: #0a0a0a;
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Hide ElevenLabs branding */
elevenlabs-convai::part(powered-by) {
  display: none !important;
}

/* ========================================
   TOP NAVIGATION BAR
   ======================================== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  z-index: 1000;
}

.brand {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: #fff;
  text-transform: uppercase;
}
.brand a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand a:hover { opacity: 0.8; }
.brand-icon {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(1.35) drop-shadow(0 0 3px rgba(255, 255, 255, 0.1));
}

/* Hamburger */
.nav-menu {
  display: flex;
  gap: 7px;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease;
  background: none;
  border: none;
}
.nav-menu:hover { transform: scale(1.1); }
.nav-menu span {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  display: block;
}
.nav-menu:hover span { background: #fff; }

/* ========================================
   NAVIGATION OVERLAY + DRAWER
   ======================================== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 380px;
  height: 100vh;
  height: 100dvh;
  background: rgba(12, 12, 12, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 90px 48px 48px;
  overflow-y: auto;
}
.nav-drawer.open { right: 0; }

.nav-drawer-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  padding: 0;
}
.nav-drawer-close::before,
.nav-drawer-close::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  transition: background 0.3s ease;
}
.nav-drawer-close::before { transform: rotate(45deg); }
.nav-drawer-close::after  { transform: rotate(-45deg); }
.nav-drawer-close:hover::before,
.nav-drawer-close:hover::after { background: #fff; }
.nav-drawer-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-drawer-links li a,
.nav-drawer-links li button {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
  display: block;
  padding: 10px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.nav-drawer-links li a:hover,
.nav-drawer-links li button:hover {
  color: #fff;
}
.nav-drawer-links li.active a,
.nav-drawer-links li.active button {
  color: #fff;
  font-weight: 500;
}

/* ========================================
   HERO SECTION — split layout: text left, orb right
   ======================================== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 60px 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  width: 100%;
  gap: 60px;
}

.hero-left {
  flex: 1;
  max-width: 700px;
}

.hero-left h1 {
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 32px;
  text-transform: uppercase;
}

.hero-left .subhead {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 580px;
}

.hero-left .support-line {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 16px;
}

.hero-left .trust-pillars {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.hero-manifesto {
  margin-bottom: 40px;
}

.hero-manifesto p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 20px;
}

.hero-manifesto p:last-child {
  margin-bottom: 0;
}

.hero-left .glass-btn {
  margin-top: 8px;
}

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

.sphere-container {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sphere-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 60px rgba(100, 150, 255, 0.4));
  transition: filter 0.5s ease, transform 0.5s ease;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(5deg); }
}

/* Close background media */
.close-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  opacity: 0.12;
  z-index: 0;
  max-width: none;
  aspect-ratio: auto;
}
.close-bg-media .media-box__uid {
  font-size: 0.65rem;
  opacity: 0.4;
}

.close-section { overflow: hidden; }
.close-section__inner { position: relative; z-index: 1; }

/* ========================================
   GLASS BUTTON (REUSABLE)
   ======================================== */
.glass-btn {
  display: inline-block;
  padding: 16px 44px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}
.glass-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.08), inset 0 0 30px rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}
.glass-btn:active {
  transform: translateY(0);
}
.glass-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
}

.glass-btn--scroll {
  /* variant used for scroll CTAs */
}

.glass-btn--company {
  margin-top: 24px;
}

/* ========================================
   SCROLLYTELLING CONTAINER
   ======================================== */
.story {
  position: relative;
}

.chapter {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

/* LEFT — text beats column (default: text left, media right) */
.chapter__text {
  width: 45%;
  padding: 20vh 60px 20vh 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* ZIGZAG: even chapters flip — media left, text right */
.chapter--flip {
  flex-direction: row-reverse;
}
.chapter--flip .chapter__text {
  padding: 20vh 80px 20vh 60px;
  align-items: flex-end;
  text-align: right;
}
.chapter--flip .beat {
  margin-left: auto;
  margin-right: 0;
}
.chapter--flip .glass-btn--company {
  align-self: flex-end;
}

.chapter__title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 32px;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.beat {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(255, 255, 255, 0.55);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 480px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.beat--active {
  opacity: 1;
  transform: translateY(0);
  color: rgba(255, 255, 255, 0.85);
}

.chapter__title--active {
  opacity: 1;
  transform: translateY(0);
}

/* RIGHT — sticky media panel */
.chapter__media {
  width: 55%;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.media-box {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: opacity 0.5s ease;
}

.media-box__uid {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  position: absolute;
  z-index: 1;
}

.media-box img,
.media-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.media-box video {
  object-fit: cover;
}

/* ========================================
   CLOSE / CONTACT SECTION
   ======================================== */
.close-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 60px;
}

.close-section__inner {
  max-width: 600px;
}

.close-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.close-section h2.chapter__title--active {
  opacity: 1;
  transform: translateY(0);
}

.close-section .beat {
  text-align: center;
  max-width: 100%;
}

.close-section .glass-btn {
  margin-top: 36px;
}

/* ========================================
   FOOTER — fixed, mirrors header glass aesthetic
   ======================================== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  z-index: 100;
}

/* Prevent content from being hidden behind fixed footer */
body::after {
  content: '';
  display: block;
  height: 64px;
}

/* Left: Copyright + T&C link */
.footer-left {
  flex: 1;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-left a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-left a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Center: Locations */
.footer-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 80px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
}

/* Right: Reserved for AI Agent */
.footer-right {
  flex: 1;
  text-align: right;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }
  .hero-left { max-width: 100%; }
  .hero-left .subhead,
  .hero-left .support-line,
  .hero-left .trust-pillars {
    margin-left: auto;
    margin-right: auto;
  }
  .sphere-container { max-width: 360px; }

  .chapter,
  .chapter--flip {
    flex-direction: column;
    min-height: auto;
  }

  .chapter__text,
  .chapter--flip .chapter__text {
    width: 100%;
    padding: 100px 40px 40px;
    order: 1;
    align-items: flex-start;
    text-align: left;
  }
  .chapter--flip .beat {
    margin-left: 0;
  }

  .chapter__media {
    width: 100%;
    position: relative;
    height: 50vh;
    order: 2;
    padding: 20px 40px 60px;
  }

  .hero { padding: 100px 40px 80px; }
  .top-nav { padding: 0 40px; }
  .close-section { padding: 80px 40px; }
  .site-footer { padding: 16px 40px; }
}

@media (max-width: 768px) {
  .top-nav { padding: 0 24px; }
  .hero { padding: 100px 24px 80px; }
  .sphere-container { max-width: 280px; }

  .chapter__text,
  .chapter--flip .chapter__text {
    padding: 80px 24px 30px;
  }
  .chapter__media {
    padding: 16px 24px 50px;
    height: 40vh;
  }

  .nav-drawer {
    width: 300px;
    right: -300px;
    padding: 80px 32px 32px;
  }

  .close-section { padding: 60px 24px; }

  .site-footer {
    height: auto;
    padding: 14px 24px;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .footer-left,
  .footer-center,
  .footer-right {
    flex: none;
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .footer-center {
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .hero-left h1 { font-size: 2rem; }
  .glass-btn {
    padding: 14px 32px;
    font-size: 0.82rem;
  }
  .chapter__title { font-size: 1.6rem; }
  .sphere-container { max-width: 240px; }
}
