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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 90, 170, 0.35) #040c1a;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #04101e;
  color: #c8dff0;
  overflow-x: hidden;
}

/* ---- Canvas background ---- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- Stacking ---- */
nav, main, section { position: relative; z-index: 1; }

/* ---- Sections: full-screen scroll snap ---- */
section {
  position: relative;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 60px; /* top clears nav, bottom clears footer on last section */
  text-align: center;
}

/* ---- Nav ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 60px;
  background: rgba(4, 12, 28, 0.5);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(40, 120, 200, 0.12);
}

.nav-logo {
  font-size: 0.9em;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(130, 200, 240, 0.85);
  text-transform: uppercase;
}

.nav-links { display: flex; gap: 36px; }

.nav-links a {
  font-size: 0.75em;
  letter-spacing: 0.14em;
  color: rgba(130, 190, 230, 0.55);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: rgba(130, 200, 240, 0.9); }

.nav-links a:focus-visible {
  outline: 2px solid rgba(80, 180, 240, 0.8);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Skip link (hidden until focused) ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: #0a2060;
  color: #80c8f0;
  border-radius: 4px;
  font-size: 0.8em;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #040c1a; }
::-webkit-scrollbar-thumb { background: rgba(30, 90, 170, 0.35); border-radius: 3px; }

/* ---- Hero ---- */
.hero-wordmark {
  font-size: clamp(3.2em, 9vw, 6.5em);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: linear-gradient(160deg, #c8e8ff 0%, #70b8f8 35%, #28d8f0 75%, #80c8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 40px;
  filter: drop-shadow(0 0 60px rgba(30, 120, 230, 0.5));
}

.hero-tagline-main {
  font-size: clamp(1.45em, 3.2vw, 1.9em);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(200, 235, 255, 0.88);
  line-height: 1.35;
  margin-bottom: 14px;
}

.hero-rule {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(50, 160, 220, 0.55), transparent);
  margin: 0 auto 14px;
}

.hero-tagline-sub {
  font-size: 1em;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: rgba(130, 195, 235, 0.72);
  text-transform: uppercase;
  margin-bottom: 52px;
}

.hero-cta {
  display: inline-block;
  padding: 13px 44px;
  background: rgba(20, 80, 180, 0.28);
  border: 1px solid rgba(50, 150, 220, 0.35);
  border-radius: 50px;
  color: rgba(120, 200, 240, 0.9);
  font-size: 0.78em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  touch-action: manipulation;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(20, 90, 200, 0.25), inset 0 1px 0 rgba(100, 180, 255, 0.1);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.hero-cta:hover {
  border-color: rgba(60, 170, 240, 0.55);
  box-shadow: 0 4px 36px rgba(20, 120, 220, 0.4), inset 0 1px 0 rgba(120, 200, 255, 0.15);
}

.hero-cta:focus-visible {
  outline: 2px solid rgba(80, 180, 240, 0.8);
  outline-offset: 4px;
}

/* ---- About ---- */
#about {
  justify-content: center;
  gap: 0;
}

.section-label {
  font-size: 0.95em;
  letter-spacing: 0.32em;
  color: rgba(80, 190, 235, 0.75);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.6em, 4vw, 2.3em);
  font-weight: 700;
  letter-spacing: 0.07em;
  background: linear-gradient(120deg, #b0d8ff 0%, #60c8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 44px;
}

.about-glass {
  background: rgba(8, 28, 72, 0.28);
  border: 1px solid rgba(40, 120, 200, 0.16);
  backdrop-filter: blur(36px) saturate(1.5);
  -webkit-backdrop-filter: blur(36px) saturate(1.5);
  border-radius: 24px;
  padding: 52px 60px;
  max-width: 760px;
  box-shadow:
    0 12px 60px rgba(6, 28, 100, 0.4),
    inset 0 1px 0 rgba(80, 160, 240, 0.1),
    inset 0 -1px 0 rgba(20, 60, 160, 0.08);
}

.about-text {
  font-size: 1.02em;
  line-height: 1.9;
  color: rgba(165, 210, 245, 0.78);
  font-weight: 300;
}

.about-text--meta {
  font-size: 0.82em;
  letter-spacing: 0.08em;
  color: rgba(100, 160, 210, 0.5);
}

.about-rule {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(50, 160, 220, 0.4), transparent);
  margin: 36px auto;
}

/* ---- Footer bar (absolute at bottom of last section) ---- */
.footer-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  border-top: 1px solid rgba(30, 70, 120, 0.18);
  background: rgba(4, 10, 24, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.footer-sep {
  color: rgba(80, 130, 170, 0.4);
  margin: 0 14px;
  font-size: 0.75em;
}

.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82em;
  letter-spacing: 0.1em;
  color: rgba(140, 180, 215, 0.82);
  padding: 0;
  transition: color 0.2s;
}

.footer-link:hover { color: rgba(100, 200, 245, 1); }

.footer-link:focus-visible {
  outline: 2px solid rgba(80, 180, 240, 0.7);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Modals ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 20, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  position: relative;
  background: rgba(6, 18, 52, 0.88);
  border: 1px solid rgba(40, 120, 200, 0.2);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border-radius: 20px;
  padding: 48px 52px;
  max-width: 460px;
  width: 90%;
  box-shadow:
    0 20px 80px rgba(4, 16, 70, 0.65),
    inset 0 1px 0 rgba(80, 160, 240, 0.1);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4em;
  color: rgba(100, 160, 210, 0.45);
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s;
}

.modal-close:hover { color: rgba(120, 200, 245, 0.9); }

.modal-title {
  font-size: 1.1em;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(120deg, #b0d8ff 0%, #60c8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.modal-body {
  font-size: 0.92em;
  line-height: 1.8;
  color: rgba(165, 210, 245, 0.75);
  font-weight: 300;
}

.modal-email {
  display: inline-block;
  margin-top: 24px;
  font-size: 0.95em;
  letter-spacing: 0.06em;
  color: rgba(100, 200, 245, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(60, 170, 230, 0.3);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.modal-email:hover {
  color: rgba(140, 220, 255, 1);
  border-color: rgba(80, 200, 245, 0.6);
}

.footer-copy {
  font-size: 0.82em;
  letter-spacing: 0.1em;
  color: rgba(140, 180, 215, 0.82);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skip-link, .hero-cta, .nav-links a { transition: none; }
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
  section {
    padding: 68px 20px 48px;
  }

  .section-label {
    font-size: 0.78em;
    margin-bottom: 10px;
  }

  .section-title {
    margin-bottom: 22px;
  }

  .about-glass {
    padding: 28px 22px;
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
  }

  .about-text {
    font-size: 0.88em;
    line-height: 1.7;
  }

  .about-rule {
    margin: 22px auto;
  }

  .footer-bar {
    padding: 9px 20px;
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .footer-copy,
  .footer-link {
    font-size: 0.68em;
    letter-spacing: 0.06em;
  }

  .footer-sep {
    margin: 0 8px;
  }
}
