/* ============================================================
   SRHS Aerospace Robotics Club — flight-deck design system
   ============================================================ */

:root {
  --navy: #0B1220;
  --navy-deep: #070B14;
  --panel: #131B2C;
  --panel-line: #26324A;
  --cyan: #5EEAD4;
  --cyan-dim: #3AA69A;
  --amber: #F5A623;
  --ink: #E7ECF3;
  --muted: #8A95AB;
  --danger: #E8604C;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max-width: 1120px;
  --pad-inline: clamp(16px, 5vw, 24px);
  --section-pad: clamp(40px, 8vw, 72px);
  --card-pad: clamp(18px, 4vw, 26px);
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }

[hidden] { display: none !important; }

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

@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; }
}

body {
  margin: 0;
  background: var(--navy);
  background-image:
    linear-gradient(rgba(94,234,212,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,234,212,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1, h2, h3, p, blockquote, .lede {
  overflow-wrap: break-word;
  word-break: break-word;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }

p { color: var(--muted); margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-inline);
  width: 100%;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- Waypoint eyebrow (signature label device) ---------- */
.waypoint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.waypoint::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--cyan);
  border-radius: 50%;
  flex-shrink: 0;
}
.waypoint .code { color: var(--amber); }
.waypoint .rule {
  flex: 1;
  height: 0;
  border-top: 1px dashed var(--panel-line);
  min-width: 24px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-line);
}
.site-nav .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px var(--pad-inline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 3vw, 20px);
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.9rem, 2.6vw, 1.05rem);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.brand img { width: 32px; height: 32px; border-radius: 6px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand .tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  display: block;
  overflow-wrap: anywhere;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.nav-links a {
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
  border-bottom-color: var(--cyan);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  color: var(--ink);
  padding: 8px 10px;
  font-family: var(--font-mono);
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navy-deep);
    border-bottom: 1px solid var(--panel-line);
    padding: 16px var(--pad-inline) 20px;
    gap: 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(46px, 10vw, 90px) 0 clamp(36px, 7vw, 70px);
  border-bottom: 1px solid var(--panel-line);
}
.hero .container { position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero p.lede {
  max-width: 640px;
  font-size: 1.08rem;
  color: var(--muted);
}
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.flight-path {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Hero two-column layout (text + cover photo) ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(24px, 5vw, 44px);
  align-items: center;
}
.hero-grid > .cover-figure {
  max-width: 420px;
  width: 100%;
  justify-self: center;
}

/* ---------- Cover figure + in-image caption ---------- */
.cover-figure {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  background: var(--panel);
}
.cover-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-figure.contain img { object-fit: contain; padding: 22px; }
.cover-figure.ratio-portrait { aspect-ratio: 3 / 4; }
.cover-figure.ratio-wide { aspect-ratio: 16 / 9; }
.cover-figure.ratio-square { aspect-ratio: 1 / 1; }

.cover-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 16px 12px;
  background: linear-gradient(to top, rgba(4,7,13,0.92) 0%, rgba(4,7,13,0.55) 65%, transparent 100%);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.card .cover-figure { margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) 18px; border-radius: 8px 8px 0 0; border: none; border-bottom: 1px solid var(--panel-line); }
.card .cover-figure.ratio-wide { aspect-ratio: 16 / 10; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 12px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--cyan);
  color: var(--navy-deep);
  font-weight: 600;
}
.btn-primary:hover { background: #7ff2df; }
.btn-ghost {
  border-color: var(--panel-line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; border-bottom: 1px solid var(--panel-line); }
.section:last-of-type { border-bottom: none; }
.section-head { max-width: 640px; margin-bottom: 40px; }

.grid {
  display: grid;
  gap: clamp(16px, 3vw, 22px);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }

/* ---------- Card ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: var(--card-pad);
}
.card h3 { color: var(--ink); }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 30px;
  height: 22px;
  border: 1px solid var(--panel-line);
  border-left: 2px solid var(--cyan);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.card-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Stats band ---------- */
.stats-band {
  border-top: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
  padding: clamp(30px, 6vw, 46px) 0;
}
.stats-band .grid { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--cyan);
  font-weight: 600;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---------- Quote ---------- */
.quote-block {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: var(--card-pad);
}
.quote-block img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--panel-line);
}
.quote-block img.face-top { object-position: 50% 10%; }
.quote-block > div { flex: 1 1 240px; min-width: 0; }
.quote-block blockquote {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--ink);
  font-style: normal;
}
.quote-block cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.05em;
}
.quote-grid .quote-block {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  height: 100%;
}
.quote-grid .quote-block img { width: 64px; height: 64px; }
.quote-grid .quote-block blockquote { font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  padding: clamp(44px, 9vw, 70px) 0;
  background: radial-gradient(ellipse at top, rgba(94,234,212,0.08), transparent 60%);
}
.cta-band p { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Roster ---------- */
.roster-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}
.roster-card img { width: 100%; height: 190px; object-fit: cover; object-position: 50% 22%; }
.roster-card img.face-top { object-position: 50% 12%; }
.roster-card .body { padding: 16px 18px 20px; }
.roster-card .name { font-family: var(--font-display); color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.roster-card .role { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cyan); letter-spacing: 0.04em; }

/* ---------- Tabs (Past Years) ---------- */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--panel-line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; height: 0; }
.tab {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  background: none;
  border: none;
  color: var(--muted);
  padding: 12px 4px;
  margin-right: 22px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transform: translateY(1px);
  white-space: nowrap;
  flex-shrink: 0;
}
.tab[aria-selected="true"] {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
.tab-panel[hidden] { display: none; }

.award-note {
  border-left: 2px solid var(--amber);
  padding: 4px 0 4px 16px;
  color: var(--ink);
  margin: 24px 0 34px;
}

/* ---------- Placeholder note (highlighted "fill this in" box) ---------- */
.placeholder-note {
  background: rgba(245,166,35,0.09);
  border: 1px dashed var(--amber);
  border-left: 3px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 18px;
  border-radius: 4px;
  margin: 0 0 34px;
}
.placeholder-note.compact {
  font-size: 0.68rem;
  padding: 10px 12px;
  margin: 0 0 10px;
}

/* ---------- CAD model viewer ---------- */
.model-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  overflow: hidden;
}
.model-frame model-viewer {
  width: 100%;
  height: 100%;
  display: block;
  --poster-color: transparent;
  --progress-bar-color: var(--cyan);
}
.model-caption { padding: 16px 2px 0; }
.model-caption h3 { color: var(--ink); margin-bottom: 4px; }
.model-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- Live color-recognition camera demo ---------- */
.camera-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  background: var(--panel);
}
.camera-frame video,
.camera-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-frame video.mirrored,
.camera-frame canvas.mirrored {
  transform: scaleX(-1);
}
.camera-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(16px, 4vw, 28px);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  background: rgba(7,11,20,0.85);
}
.camera-msg[hidden] { display: none; }
.camera-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.color-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.color-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -1px;
}

/* ---------- ARC Photo Gallery (self-scrolling) ---------- */
.gallery-viewport {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.gallery-track {
  display: flex;
  gap: clamp(10px, 2vw, 16px);
  width: max-content;
  animation: gallery-scroll 55s linear infinite;
}
.gallery-viewport:hover .gallery-track { animation-play-state: paused; }
.gallery-item {
  flex: 0 0 auto;
  width: clamp(150px, 20vw, 230px);
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  background: var(--panel);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Info list (Overview page) ---------- */
.info-row {
  display: grid;
  grid-template-columns: clamp(70px, 22vw, 220px) minmax(0, 1fr);
  gap: clamp(14px, 3vw, 30px);
  padding: clamp(22px, 4vw, 32px) 0;
  border-top: 1px solid var(--panel-line);
}
.info-row:first-of-type { border-top: none; }
.info-row h3 { color: var(--ink); }

/* ---------- Update cards ---------- */
.update-card { display: flex; gap: 14px; align-items: flex-start; }
.update-card img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--panel-line);
  flex-shrink: 0;
}
.update-card h3 { margin-bottom: 4px; font-size: 1rem; }
.update-card p { margin: 0; font-size: 0.92rem; }

/* ---------- Footer ---------- */
footer {
  padding: clamp(34px, 7vw, 50px) 0 clamp(22px, 4vw, 34px);
  border-top: 1px solid var(--panel-line);
  background: var(--navy-deep);
}
footer .foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 30px;
  margin-bottom: 30px;
}
footer .brand { margin-bottom: 10px; }
footer .contact-line { font-size: 0.92rem; color: var(--muted); margin: 4px 0; }
footer .contact-line strong { color: var(--ink); font-weight: 500; }
footer nav ul { list-style: none; padding: 0; margin: 0; font-family: var(--font-mono); font-size: 0.82rem; }
footer nav ul li { margin-bottom: 10px; }
footer nav a { color: var(--muted); }
footer nav a:hover { color: var(--cyan); }
.copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--panel-line);
  padding-top: 20px;
}
