/* ============================================================= */
/*  Aerodromic — main stylesheet                                  */
/*  Dark, cinematic. Full-screen runway photo hero, then a        */
/*  vertical-scroll narrative: introduction → applications.       */
/*  Pure CSS, no dependencies.                                    */
/* ============================================================= */

/* ---- Design tokens ------------------------------------------- */
:root {
  /* Surfaces */
  --bg:            #06080c;
  --bg-elevated:   #0b0f16;
  --surface:       rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text:        #f4f6fa;
  --text-muted:  #9aa6b6;
  --text-dim:    #67727f;

  /* Amber runway accent */
  --amber:       #ff9e2c;
  --amber-soft:  #ffb958;
  --amber-deep:  #ff7a18;
  --amber-glow:  rgba(255, 138, 30, 0.45);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* vertical scroll only */
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- Helpers ------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--amber);
  color: #1a0f00;
  padding: 0.6rem 1rem;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--amber-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================= */
/*  Wordmark                                                      */
/* ============================================================= */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 1.05rem;
  color: var(--text);
}
.wordmark-mark {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px 1px var(--amber-glow);
  flex: none;
}
.wordmark-sm { font-size: 0.95rem; letter-spacing: 0.18em; }

/* ============================================================= */
/*  Header                                                        */
/* ============================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
              backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-nav { display: flex; align-items: center; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}
.nav-links a {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-github {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}
.nav-github:hover {
  border-color: var(--amber);
  color: var(--amber-soft) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 12, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ============================================================= */
/*  Hero — full-screen runway photo                              */
/* ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;        /* overlay text sits low */
  overflow: hidden;
  isolation: isolate;
  /* Fallback gradient shows instantly and if the image is missing. */
  background-color: #0a0d13;
  background-image:
    linear-gradient(180deg, rgba(6,8,12,0) 55%, rgba(6,8,12,0.85) 100%),
    image-set(url("/assets/img/hero/hero.jpg") 1x);
  background-image:
    linear-gradient(180deg, rgba(6,8,12,0) 55%, rgba(6,8,12,0.85) 100%),
    url("/assets/img/hero/hero.jpg");
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  animation: hero-fade 1.1s var(--ease) both;
}
@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Bottom scrim so overlay text stays readable over the photo */
.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(4rem, 12vh, 9rem);
  padding-top: 8rem;
  background: linear-gradient(to top,
              rgba(6, 8, 12, 0.78) 0%,
              rgba(6, 8, 12, 0.35) 45%,
              transparent 100%);
}
.hero-content {
  text-align: center;
  animation: hero-rise 1s 0.2s var(--ease) both;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.hero-tagline {
  font-size: clamp(1.3rem, 3.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.9rem;
}
.hero-support {
  max-width: 46ch;
  margin-inline: auto;
  color: #d7deea;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.55);
  margin-bottom: 2.2rem;
}
.hero-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease);
}
.btn-primary {
  background: linear-gradient(180deg, var(--amber-soft), var(--amber-deep));
  color: #1d1000;
  box-shadow: 0 8px 30px -8px var(--amber-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px var(--amber-glow);
}
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
  background: rgba(6, 8, 12, 0.25);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber-soft);
  transform: translateY(-2px);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  z-index: 3;
}
.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--amber-soft);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0%   { opacity: 0; transform: translateY(-4px); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ============================================================= */
/*  Sections                                                      */
/* ============================================================= */
.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  position: relative;
}
.section-head { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--amber-soft);
  margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.section-title-lg {
  font-size: clamp(1.55rem, 3.6vw, 2.5rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.section-lead {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---- Introduction -------------------------------------------- */
.section-intro {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255,138,30,0.06), transparent 60%),
    var(--bg);
}
.intro-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.intro-body {
  color: var(--text-muted);
  font-size: 1.12rem;
}
.intro-body + .intro-body { margin-top: 1.1rem; }
.intro-body strong { color: var(--text); font-weight: 600; }

.founder-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}
.founder-card::after {
  content: "";
  position: absolute;
  top: 1.75rem;
  right: 1.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px 2px var(--amber-glow);
}
.founder-role {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}
.founder-name { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.5rem; }
.founder-desc { color: var(--text-muted); font-size: 0.96rem; }

/* ---- Principles ---------------------------------------------- */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--border);
  padding-top: clamp(2rem, 4vw, 3rem);
}
.principle { padding-top: 0.2rem; }
.principle-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber-soft);
  letter-spacing: 0.1em;
}
.principle-title {
  font-size: 1.12rem;
  font-weight: 650;
  margin: 0.6rem 0 0.45rem;
}
.principle-desc { color: var(--text-muted); font-size: 0.94rem; }

/* ---- Applications -------------------------------------------- */
.section-apps { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem 1.9rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
              background 0.35s var(--ease);
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.project-card:hover {
  transform: translateY(-5px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}
.project-card:hover::before { opacity: 1; }

/* Reserved space for an app icon (shows a monogram until you add one) */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.app-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  font-style: italic;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.35s var(--ease);
}
.app-icon img { width: 100%; height: 100%; object-fit: contain; }
.project-card:hover .app-icon { border-color: var(--border-strong); }

.project-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}
.project-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
}
.project-lede {
  color: var(--amber-soft);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.project-desc {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* ---- Contact ------------------------------------------------- */
.section-contact { text-align: center; }
.contact-inner { max-width: 640px; margin-inline: auto; }
.contact-lead { margin-top: 1rem; color: var(--text-muted); font-size: 1.05rem; }
.contact-email {
  display: inline-block;
  margin-top: 1.4rem;
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-email:hover { color: var(--amber-soft); border-color: var(--amber); }
.contact-github { margin-top: 1.5rem; color: var(--text-muted); }
.contact-github a {
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-github a:hover { color: var(--amber-soft); border-color: var(--amber); }

/* ============================================================= */
/*  Footer                                                        */
/* ============================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy { color: var(--text-dim); font-size: 0.85rem; }

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

/* ============================================================= */
/*  Responsive                                                    */
/* ============================================================= */

/* Use the lighter mobile image on small screens */
@media (max-width: 699px) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(6,8,12,0) 50%, rgba(6,8,12,0.9) 100%),
      url("/assets/img/hero/hero-mobile.jpg");
  }
}

/* Portrait / tall screens: show the whole photo (with its wordmark)
   instead of cropping it, and let the scrim fill the space below. */
@media (max-aspect-ratio: 13/12) {
  .hero {
    background-size: 130% auto;
    background-position: center 28%;
    align-items: flex-end;
  }
}
@media (max-aspect-ratio: 4/5) {
  .hero { background-size: 175% auto; }
}

@media (max-width: 880px) {
  .intro-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(6, 8, 12, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--gutter) 1.25rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
                visibility 0.3s var(--ease);
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-github { border: none; padding: 0.85rem 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-actions { width: 100%; }
  .btn { flex: 1; }
}

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