/* ============================================================
   MERIDIAN — COMPONENTS: grid overlay, header/nav, hero
   ============================================================ */

/* ---- Fixed meridian grid overlay ---- */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.grid-overlay .v-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.grid-overlay .v-line[data-col="1"] { left: var(--gutter); }
.grid-overlay .v-line[data-col="2"] { left: 50%; display: none; }
.grid-overlay .v-line[data-col="3"] { right: var(--gutter); }
@media (min-width: 900px) {
  .grid-overlay .v-line[data-col="2"] { display: block; }
}

.north-mark {
  position: fixed;
  top: calc(var(--header-h) + 20px);
  right: var(--gutter);
  z-index: 5;
  width: 34px;
  height: 34px;
  color: var(--concrete);
  opacity: 0.7;
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color var(--dur-mid) var(--ease-architectural),
              border-color var(--dur-mid) var(--ease-architectural);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.14em;
}
.logo-mark { width: 22px; height: 22px; color: var(--accent); }

.nav-list {
  display: none;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.nav-list a {
  font-size: var(--fs-sm);
  color: var(--charcoal);
  position: relative;
  padding-bottom: 4px;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-fast) var(--ease-architectural);
}
.nav-list a:hover::after,
.nav-list a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
  border: 1px solid var(--charcoal);
  padding: 0.55rem 1.2rem;
  font-size: var(--fs-sm);
  transition: background var(--dur-fast) var(--ease-architectural),
              color var(--dur-fast) var(--ease-architectural);
}
.nav-cta:hover { background: var(--charcoal); color: var(--ivory); }

@media (min-width: 900px) {
  .nav-list { display: flex; }
  .nav-toggle { display: none; }
}

.nav-toggle {
  width: 34px; height: 22px;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--charcoal);
  transition: transform var(--dur-fast) var(--ease-architectural), opacity var(--dur-fast);
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

/* ---- Mobile menu ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ivory);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: var(--gutter);
  transform: translateY(-100%);
  transition: transform var(--dur-mid) var(--ease-architectural);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu ul { display: flex; flex-direction: column; gap: 0.4rem; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 480;
  padding-block: 0.35rem;
  border-bottom: 1px solid var(--line);
  display: block;
}
@media (min-width: 900px) { .mobile-menu { display: none; } }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-h);
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.hero-title {
  font-size: var(--fs-hero);
  color: var(--ink);
}

.hero-sub {
  margin-top: 1.75rem;
  max-width: 34ch;
  color: var(--concrete);
  font-size: var(--fs-md);
  line-height: 1.5;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--ivory);
  padding: 0.9rem 1.75rem;
  font-size: var(--fs-sm);
  transition: background var(--dur-fast) var(--ease-architectural);
}
.btn-primary:hover { background: var(--accent-dim); }

.btn-secondary {
  border-bottom: 1px solid var(--charcoal);
  padding-bottom: 2px;
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  justify-self: center;
}
.hero-visual svg { width: 100%; height: 100%; overflow: visible; }
.hero-visual .draw-line {
  fill: none;
  stroke: var(--charcoal);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-visual .draw-line.accent { stroke: var(--accent); }
.hero-visual .fill-plane { fill: var(--paper); stroke: none; }
.hero-visual .annot {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.04em;
  fill: var(--concrete);
}

.hero-meta {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  flex-wrap: wrap;
  color: var(--concrete);
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
}
.hero-meta span { white-space: nowrap; }

.scroll-cue {
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--concrete);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
}
.scroll-cue .line {
  width: 1px; height: 34px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: "";
  position: absolute;
  top: -100%; left: 0; right: 0; height: 100%;
  background: var(--accent);
  animation: cueDrop 2.6s var(--ease-architectural) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue .line::after { animation: none; top: 0; }
}
