/* ============================================================
   PILOTREF.COM — Main Stylesheet
   Shared navigation, footer, and home page styles
   ============================================================ */

:root {
  --navy:    #1c2b3a;
  --navy-mid:#243447;
  --sky:     #4a90c4;
  --cream:   #f5f0e8;
  --ink:     #1a1a1a;
  --paper:   #f5f0e8;
  --rule:    #c8b89a;
  --accent:  #b8320a;
  --accent2: #1a4f7a;
  --stamp:   #8b1a1a;
  --muted:   #888;
  --header-h: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Barlow', 'Barlow Condensed', sans-serif;
  color: var(--ink);
  background: #f0ece0;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Site Header ─────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--sky);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.site-logo__icon {
  width: 36px;
  height: 36px;
  color: var(--sky);
  flex-shrink: 0;
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.site-logo__name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 3px;
  color: white;
}

.site-logo__tagline {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: white;
  background: rgba(74,144,196,0.2);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  padding: 4px;
}

/* ── Site Footer ─────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer__text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
}

.site-footer__text a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.site-footer__text a:hover {
  color: rgba(255,255,255,0.8);
}

/* ── Home Page Hero ──────────────────────────────────────── */
.home-hero {
  background: linear-gradient(160deg, var(--navy) 0%, #1e3550 60%, #243447 100%);
  padding: 88px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,144,196,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,144,196,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Radial glow */
.home-hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(74,144,196,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.home-hero__eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.home-hero__eyebrow::before,
.home-hero__eyebrow::after {
  content: '';
  height: 1px;
  width: 48px;
  background: rgba(74,144,196,0.4);
}

.home-hero__logo-icon {
  width: 80px;
  height: 80px;
  color: var(--sky);
  margin: 0 auto 24px;
  display: block;
  opacity: 0.9;
}

.home-hero__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 9vw, 6rem);
  letter-spacing: 8px;
  color: white;
  line-height: 0.92;
  margin-bottom: 6px;
}

.home-hero__title-dot {
  color: var(--sky);
}

.home-hero__subtitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
  margin-bottom: 36px;
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.home-hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.home-hero__meta-item {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 8px 16px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.home-hero__meta-item:last-child {
  border-right: none;
}

/* ── Reference Section ───────────────────────────────────── */
.ref-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 64px;
  flex: 1;
}

.ref-section__header {
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.ref-section__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 2.5px;
  color: var(--ink);
}

.ref-section__count {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Reference Card ──────────────────────────────────────── */
.ref-card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.ref-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.ref-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  border-color: rgba(26,79,122,0.3);
}

.ref-card:hover::after {
  transform: scaleX(1);
}

.ref-card__icon {
  width: 52px;
  height: 52px;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
}

.ref-card__icon svg {
  width: 28px;
  height: 28px;
}

.ref-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ref-card__category {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.63rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.ref-card__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: var(--ink);
  line-height: 1;
}

.ref-card__desc {
  font-family: 'Barlow', sans-serif;
  font-size: 0.87rem;
  color: #5a5a5a;
  line-height: 1.65;
  flex: 1;
}

.ref-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ref-card__tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--cream);
  color: var(--accent2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 3px 8px;
}

.ref-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  margin-top: 2px;
}

.ref-card__cta-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent2);
}

.ref-card__arrow {
  width: 20px;
  height: 20px;
  color: var(--accent2);
  transition: transform 0.2s;
}

.ref-card:hover .ref-card__arrow {
  transform: translateX(5px);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .home-hero {
    padding: 64px 20px 56px;
  }

  .home-hero__meta {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    text-align: center;
  }

  .home-hero__meta-item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .home-hero__meta-item:last-child {
    border-bottom: none;
  }

  .ref-section {
    padding: 40px 20px 48px;
  }

  .site-logo__tagline {
    display: none;
  }
}

@media (max-width: 540px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .home-hero__logo-icon {
    width: 60px;
    height: 60px;
  }
}
