/* ==========================================================================
   Blue ACE Ventures - Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  --primary-blue: #6bb6ff;
  --dark-navy: #0a1628;
  --off-white: #fafaf9;
  --light-gray: #f5f5f4;
  --mid-gray: #a0a0a0;
  --border-gray: #1f2f45;
  --card-bg: #0d1f35;
}

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

html {
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--dark-navy);
  color: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  /* Explicit 16px prevents iOS auto-zoom on inputs */
  font-size: 16px;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Touch Optimization
   -------------------------------------------------------------------------- */
/* Remove 300ms tap delay on all interactive elements */
a, button, [role="button"], .philosophy-card, .pillar-item {
  touch-action: manipulation;
}

/* --------------------------------------------------------------------------
   Loading Screen
   -------------------------------------------------------------------------- */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* 100dvh with vh fallback for mobile browser chrome */
  height: 100vh;
  height: 100dvh;
  background: var(--dark-navy);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out,
    visibility 0.4s ease-out;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}

#loading-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skip-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  opacity: 0;
  animation: fadeInHint 0.3s ease 0.5s forwards;
}

@keyframes fadeInHint {
  to {
    opacity: 1;
  }
}

body.loading #main-content {
  opacity: 0;
  transform: translateY(10px);
}

#main-content {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-gray);
  /* Safe area: respect top inset for notch/Dynamic Island */
  padding-top: env(safe-area-inset-top, 0);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Sora", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--off-white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 1.75em;
  height: 1.75em;
}

.logo span {
  color: var(--primary-blue);
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  color: var(--off-white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.3s ease;
  letter-spacing: -0.01em;
}

.nav-cta {
  background: var(--primary-blue);
  color: var(--dark-navy);
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding: 12rem 4rem 8rem;
  /* Safe area: add top inset for notch/Dynamic Island */
  padding-top: calc(12rem + env(safe-area-inset-top, 0px));
  /* Landscape: respect left/right safe areas */
  padding-left: max(4rem, env(safe-area-inset-left));
  padding-right: max(4rem, env(safe-area-inset-right));
  max-width: 1440px;
  margin: 0 auto;
}

.hero-content {
  max-width: 900px;
}

.hero-label {
  display: inline-block;
  background: rgba(107, 182, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-blue);
  margin-bottom: 2rem;
  border: 1px solid rgba(107, 182, 255, 0.3);
}

.hero h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
}

.hero-description {
  font-size: 1.375rem;
  line-height: 1.7;
  color: var(--mid-gray);
  margin-bottom: 3rem;
  max-width: 700px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-blue);
  color: var(--dark-navy);
  padding: 1.25rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Section Base
   -------------------------------------------------------------------------- */
section {
  padding: 6rem 4rem;
  /* Landscape: respect left/right safe areas */
  padding-left: max(4rem, env(safe-area-inset-left));
  padding-right: max(4rem, env(safe-area-inset-right));
  max-width: 1440px;
  margin: 0 auto;
}

.section-header {
  max-width: 800px;
  margin-bottom: 5rem;
}

.section-label {
  display: inline-block;
  background: rgba(107, 182, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(107, 182, 255, 0.3);
}

.section-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.section-description {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--mid-gray);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Philosophy Section
   -------------------------------------------------------------------------- */
.philosophy {
  background: var(--dark-navy);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.philosophy-card {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-gray);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

.philosophy-card h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.philosophy-card p {
  color: var(--mid-gray);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Formula Section
   -------------------------------------------------------------------------- */
.formula-section {
  background: var(--card-bg);
  color: white;
  text-align: center;
  padding: 8rem 4rem;
}

.formula-display {
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin: 3rem 0;
  letter-spacing: -0.02em;
}

.formula-display span {
  color: var(--primary-blue);
}

/* --------------------------------------------------------------------------
   Culture Definition Section
   -------------------------------------------------------------------------- */
.culture-def {
  background: var(--dark-navy);
  padding: 8rem 4rem;
}

.quote-box {
  background: var(--card-bg);
  border-left: 4px solid var(--primary-blue);
  padding: 3rem 4rem;
  border-radius: 12px;
  max-width: 900px;
  margin: 3rem auto;
}

.quote-box p {
  font-family: "Sora", sans-serif;
  font-size: 1.75rem;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Pillars Section
   -------------------------------------------------------------------------- */
.pillars {
  background: var(--dark-navy);
}

.pillars-grid {
  display: grid;
  gap: 2rem;
}

.pillar-item {
  background: var(--card-bg);
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 3rem;
  transition: all 0.3s ease;
}

.pillar-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.pillar-number {
  font-family: "Sora", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1;
}

.pillar-title {
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pillar-description {
  font-size: 1.125rem;
  color: var(--mid-gray);
  margin-bottom: 2rem;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.pillar-examples {
  margin-bottom: 2rem;
}

.pillar-examples-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid-gray);
  margin-bottom: 1rem;
}

.example-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.example-tag {
  background: rgba(107, 182, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid rgba(107, 182, 255, 0.2);
}

.pillar-signal {
  font-size: 0.9375rem;
  color: var(--primary-blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.pillar-signal::before {
  content: "→";
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   Approach Section
   -------------------------------------------------------------------------- */
.approach {
  background: var(--dark-navy);
}

.approach-list {
  list-style: none;
  max-width: 800px;
}

.approach-list li {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-gray);
  font-size: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.approach-list li:last-child {
  border-bottom: none;
}

.approach-list li::before {
  content: "→";
  color: var(--primary-blue);
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    #4a9ee8 100%
  );
  color: var(--dark-navy);
  text-align: center;
  padding: 8rem 4rem;
}

.cta-section h2 {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.03em;
}

.cta-section p {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  opacity: 0.9;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--dark-navy);
  color: white;
  padding: 1.25rem 2.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  background: #050d18;
  color: white;
  padding: 4rem 4rem 3rem;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.footer-brand h3 span {
  color: var(--primary-blue);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.footer-section h4 {
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.footer-section a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  transition: color 0.3s ease;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.footer-bottom {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Mobile Navigation
   -------------------------------------------------------------------------- */
.mobile-nav {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: auto; /* Override inherited top: 0 from nav rule */
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-gray);
  padding: 8px 0;
  /* iOS safe area - critical for notched devices */
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
  /* Landscape: respect left/right safe areas for rotated notch */
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  /* GPU acceleration for smooth performance */
  transform: translate3d(0, 0, 0);
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 48px; /* Android minimum, exceeds iOS 44px */
  padding: 8px 4px;
  color: var(--mid-gray);
  text-decoration: none;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav a:active {
  transform: scale(0.95);
}

.mobile-nav a.active {
  color: var(--primary-blue);
}

.mobile-nav .nav-label {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Touch Feedback States (All Devices)
   -------------------------------------------------------------------------- */
/* Buttons - scale down on press for tactile feedback */
.nav-cta:active,
.hero-cta:active,
.cta-button:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Cards - subtle scale for large touch targets */
.philosophy-card:active,
.pillar-item:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Nav links - opacity feedback */
.nav-links a:active {
  opacity: 0.7;
}

/* Footer links - opacity feedback */
.footer-section a:active {
  opacity: 0.7;
}

/* Suppress default tap highlight on all interactive elements */
a, button, [role="button"], .philosophy-card, .pillar-item {
  -webkit-tap-highlight-color: transparent;
}

/* --------------------------------------------------------------------------
   Hover States (Hover-Capable Devices Only)
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    color: var(--primary-blue);
  }

  .nav-cta:hover {
    background: white;
    color: var(--dark-navy);
    transform: translateY(-2px);
  }

  .hero-cta:hover {
    background: white;
    color: var(--dark-navy);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(107, 182, 255, 0.3);
  }

  .philosophy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(107, 182, 255, 0.15);
    border-color: var(--primary-blue);
  }

  .pillar-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 30px rgba(107, 182, 255, 0.2);
  }

  .cta-button:hover {
    background: white;
    color: var(--dark-navy);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .footer-section a:hover {
    color: var(--primary-blue);
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav-container {
    padding: 1.5rem 2rem;
  }

  .hero {
    padding: 10rem 2rem 6rem;
  }

  section {
    padding: 5rem 2rem;
  }

  .nav-links {
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  .nav-links,
  .nav-cta {
    display: none !important;
  }

  /* Prevent footer content from being hidden behind mobile nav */
  footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
  }

  /* Touch target size fixes for mobile */
  .footer-section a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    padding: 6rem 2rem;
  }

  .formula-section {
    padding: 6rem 2rem;
  }

  /* Mobile typography adjustments */
  .hero {
    padding-top: calc(8rem + env(safe-area-inset-top, 0px));
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-description {
    font-size: 1.125rem;
  }

  section {
    padding: 4rem 1.5rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }

  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .section-description {
    font-size: 1rem;
  }

  .quote-box {
    padding: 2rem;
  }

  .quote-box p {
    font-size: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   Scroll Animations
   -------------------------------------------------------------------------- */
/* Sections start invisible and animate in on scroll */
.section-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .section-animate {
    opacity: 1;
    transform: none;
  }

  #loading-screen {
    transition: none;
  }

  .mobile-nav a:active,
  .nav-cta:active,
  .hero-cta:active,
  .cta-button:active,
  .philosophy-card:active,
  .pillar-item:active {
    transform: none;
  }
}
