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

:root {
  --bg:       #0a0b0e;
  --surface:  #111318;
  --card:     #161a22;
  --accent:   #00aaff;
  --accent2:  #0077cc;
  --text:     #e8eaf0;
  --muted:    #7a8090;
  --border:   #1e2430;
  --ff-head:  'Bebas Neue', sans-serif;
  --ff-body:  'DM Sans', sans-serif;
  --nav-h:    64px;
  --radius:   10px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Navigation ───────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: rgba(10, 11, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-logo {
  font-family: var(--ff-head);
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: var(--accent);
  text-decoration: none;
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* ── Hamburger ────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* Animate to × when open */
nav.open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
nav.open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 11, 14, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
    list-style: none;
  }

  nav.open .nav-links { display: flex; }

  .nav-links a {
    display: block;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
  }
}

/* ── Page header (for subpages) ───────────────────────────────── */
.page-header {
  padding: calc(var(--nav-h) + 4rem) 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Sections ─────────────────────────────────────────────────── */
section {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  scroll-margin-top: var(--nav-h);
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--ff-head);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 2.5rem;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero ─────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 55vh;
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-h);
  background:
    radial-gradient(ellipse at 20% 60%, rgba(0, 100, 200, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(0, 60, 140, 0.12) 0%, transparent 55%),
    linear-gradient(170deg, #0d1220 0%, #0a0b0e 50%, #080c14 100%);
}

/* When a hero photo is uploaded — overrides the gradient */
#hero.has-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Dark overlay so text stays readable over any photo */
#hero.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  z-index: 0;
}

/* Hide the CSS star field when a real photo is shown */
#hero.has-photo .hero-stars { display: none; }
#hero.has-photo .hero-glow  { display: none; }

.hero-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15%  20%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 45%  10%, rgba(255,255,255,0.4)  0%, transparent 100%),
    radial-gradient(1px 1px at 75%  35%, rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(1px 1px at 60%  70%, rgba(255,255,255,0.3)  0%, transparent 100%),
    radial-gradient(1px 1px at 85%  80%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 30%  88%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 90%  15%, rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(1px 1px at 5%   55%, rgba(255,255,255,0.4)  0%, transparent 100%),
    radial-gradient(1px 1px at 50%  50%, rgba(0,170,255,0.3)    0%, transparent 100%),
    radial-gradient(2px 2px at 70%  20%, rgba(0,170,255,0.25)   0%, transparent 100%),
    radial-gradient(1px 1px at 25%  40%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 95%  60%, rgba(255,255,255,0.3)  0%, transparent 100%);
  animation: drift 60s linear infinite;
}

@keyframes drift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(6px, -4px); }
  50%  { transform: translate(0, -8px); }
  75%  { transform: translate(-6px, -4px); }
  100% { transform: translate(0, 0); }
}

.hero-glow {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background: linear-gradient(to top, rgba(0, 100, 200, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

.hero-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanline 4s ease-in-out infinite;
}

@keyframes scanline {
  0%, 100% { opacity: 0.3; transform: scaleX(0.3); }
  50%       { opacity: 0.8; transform: scaleX(1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  animation: fadeUp 1s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-name {
  font-family: var(--ff-head);
  font-size: clamp(4rem, 12vw, 10rem);
  letter-spacing: 0.06em;
  line-height: 0.95;
  color: #fff;
  text-shadow: 0 0 60px rgba(0, 170, 255, 0.25);
}

.hero-title {
  font-family: var(--ff-head);
  font-size: clamp(1.2rem, 3vw, 2rem);
  letter-spacing: 0.25em;
  color: var(--accent);
  margin: 0.75rem 0 1.5rem;
}

.hero-tagline {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: #fff;
  white-space: nowrap;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

@media (max-width: 768px) {
  .hero-tagline { white-space: normal; }
}

.hero-cta {
  display: inline-block;
  padding: 0.75rem 2.2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── My Story ─────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
}

.about-bio p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  font-weight: 300;
}

.about-bio p strong { color: var(--text); font-weight: 500; }

.photo-placeholder {
  aspect-ratio: 3/4;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem;
}

.photo-placeholder svg { opacity: 0.3; }

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .photo-placeholder { aspect-ratio: 1/1; max-width: 280px; }
}

/* ── Flight Hours ─────────────────────────────────────────────── */
#hours { background: var(--surface); max-width: 100%; padding: 6rem 2rem; scroll-margin-top: var(--nav-h); }
#hours > .inner { max-width: 1100px; margin: 0 auto; }

.stats-spinner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.stats-error {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.stats-aggregate {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
  border-color: var(--accent2);
  transform: translateY(-2px);
}

.stat-card .stat-value {
  font-family: var(--ff-head);
  font-size: 2.4rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.stats-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.stats-table thead th {
  background: var(--card);
  color: var(--muted);
  text-align: right;
  padding: 0.75rem 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

table.stats-table thead th:first-child { text-align: left; }

table.stats-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

table.stats-table tbody tr:last-child { border-bottom: none; }
table.stats-table tbody tr:hover { background: var(--card); }

table.stats-table td {
  padding: 0.85rem 1rem;
  text-align: right;
  color: var(--muted);
}

table.stats-table td:first-child {
  text-align: left;
  color: var(--text);
  font-weight: 500;
}

table.stats-table td.nonzero { color: var(--text); }

/* ── Ratings ──────────────────────────────────────────────────── */
.ratings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.rating-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.rating-card:hover {
  border-color: var(--accent2);
  transform: translateY(-2px);
}

.rating-cert {
  font-family: var(--ff-head);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.rating-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.rating-detail {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 300;
}

.rating-placeholder {
  border-style: dashed;
  opacity: 0.55;
}

/* ── Gallery ──────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  aspect-ratio: 4/3;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.gallery-item:hover { border-color: var(--accent2); }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

/* ── Lightbox ─────────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}
#lightbox.open {
  display: flex;
}
#lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
#lightbox-close,
#lightbox-prev,
#lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s;
  line-height: 1;
  user-select: none;
}
#lightbox-close:hover,
#lightbox-prev:hover,
#lightbox-next:hover { opacity: 1; }

#lightbox-close {
  top: 1rem;
  right: 1.25rem;
  font-size: 2.2rem;
}
#lightbox-prev,
#lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  padding: 0 1rem;
}
#lightbox-prev { left: 0; }
#lightbox-next { right: 0; }

/* ── Story Sections ───────────────────────────────────────────── */
.story-sections { padding: 0 2rem 4rem; max-width: 1100px; margin: 0 auto; }

/* Split: photo + text side by side */
.story-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 5rem;
}

.story-split.reverse { direction: rtl; }
.story-split.reverse > * { direction: ltr; }

.story-split-photo img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.story-split-text h3 {
  font-family: var(--ff-head);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 1rem;
}

.story-split-text p {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* Banner: full-width photo + text below */
.story-banner { margin-bottom: 5rem; }

.story-banner-img {
  width: 100%;
  height: 420px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  border-radius: var(--radius);
  position: relative;
}

.story-banner-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius);
}

.story-banner-text { padding: 2rem 0 0; }

.story-banner-text h3 {
  font-family: var(--ff-head);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 1rem;
}

.story-banner-text p {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 1rem;
  max-width: 800px;
}

@media (max-width: 768px) {
  .story-split { grid-template-columns: 1fr; direction: ltr; }
  .story-split.reverse { direction: ltr; }
  .story-split-photo img { height: 260px; }
  .story-banner-img { height: 260px; background-attachment: scroll; }
}

/* ── Contact ──────────────────────────────────────────────────── */
#contact { text-align: center; }

.contact-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.contact-btn.primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}

.contact-btn.primary:hover { background: var(--accent2); border-color: var(--accent2); }

.contact-btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.contact-btn.secondary:hover { background: rgba(0,170,255,0.08); }

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2.5rem 2rem 8rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ── Utility ──────────────────────────────────────────────────── */
.accent { color: var(--accent); }
