/* ==========================================================================
   HANGAR — design tokens
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --void:        #000308;
  --panel:       #060a12;
  --panel-raised:#0b1220;
  --line:        rgba(106, 184, 255, 0.14);
  --line-strong: rgba(106, 184, 255, 0.32);
  --cyan:        #6ab8ff;
  --cyan-dim:    #1a5a98;
  --cyan-bright: #d6edff;
  --amber:       #2f99e1;
  --red:         #ff5f57;
  --text:        #e2ecfb;
  --text-dim:    #7f93b5;
  --text-faint:  #4a5675;

  /* Reserved earth tones — paired with the blue for the Fortress homepage */
  --stone:       #12100c;
  --stone-panel: #17140d;
  --sand:        #c9a26a;
  --sand-dim:    #8a7048;
  --bronze:      #a9713f;
  --clay:        #6f4a2f;
  --parchment:   #e8ddc7;
  --earth-line:  rgba(201, 162, 106, 0.18);
  --earth-line-strong: rgba(201, 162, 106, 0.4);

  --font-brand:   'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --radius: 2px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(106,184,255,0.10), transparent 55%),
    radial-gradient(ellipse at 90% 110%, rgba(47,153,225,0.06), transparent 50%);
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--cyan); color: var(--void); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ==========================================================================
   Background grid + scanline atmosphere
   ========================================================================== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 75%);
}

.bg-scan {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(106,184,255,0.06) 50%, transparent 100%);
  height: 240px;
  animation: scan-sweep 9s linear infinite;
}

@keyframes scan-sweep {
  0%   { transform: translateY(-240px); }
  100% { transform: translateY(110vh); }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-mark {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cyan);
  border: 1px solid var(--line-strong);
  padding: 3px 7px;
  border-radius: var(--radius);
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-name .dim { color: var(--text-dim); font-weight: 400; }

.header-readout {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  display: flex;
  gap: 18px;
}

.header-readout span b { color: var(--text-dim); font-weight: 500; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.hangar-intro {
  position: relative;
  z-index: 2;
  padding: clamp(36px, 6vw, 72px) clamp(20px, 4vw, 56px) 28px;
  max-width: 900px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.hangar-intro h1 {
  font-family: var(--font-brand);
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.2;
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

/* --- boot terminal ------------------------------------------------------- */
.boot-terminal {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.5vw, 16px);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  min-height: calc(3 * 1.5em);
}

.boot-line {
  display: block;
  white-space: pre;
}

.boot-line .prompt {
  color: var(--cyan-dim);
  margin-right: 0.55ch;
}

.boot-line .ok {
  color: #39ff14;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.55);
}

.boot-cursor {
  display: inline-block;
  width: 0.6ch;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: boot-blink 1s steps(1) infinite;
}

.boot-cursor.done { display: none; }

@keyframes boot-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.hangar-intro p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
  max-width: 620px;
  margin: 0;
}

.gallery-grid {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  padding: 16px clamp(20px, 4vw, 56px) 80px;
}

.bay-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

/* cards start hidden and fade in once bay access is granted */
.bay-card.booting {
  opacity: 0;
  transform: translateY(14px);
}

.bay-card.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.25s ease;
}

.bay-card:hover,
.bay-card:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.bay-card:hover .corner,
.bay-card:focus-visible .corner { border-color: var(--cyan); }

.bay-viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(106,184,255,0.10), transparent 60%),
    var(--void);
  overflow: hidden;
}

.bay-viewport canvas { display: block; width: 100%; height: 100%; }

.bay-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  background: rgba(2,5,12,0.72);
  border: 1px solid var(--line);
  padding: 3px 6px;
  z-index: 3;
}

.bay-status {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  z-index: 3;
}

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-strong);
  transition: border-color 0.25s ease;
  z-index: 3;
  pointer-events: none;
}
.corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.bay-info {
  padding: 14px 16px 16px;
}

.bay-info .designation {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.bay-info h3 {
  font-family: var(--font-brand);
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bay-info .class {
  color: var(--text-dim);
  font-size: 12.5px;
  margin-bottom: 10px;
}

.bay-stats {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  letter-spacing: 0.04em;
}

.bay-stats b { color: var(--text-dim); font-weight: 500; }

.empty-state {
  position: relative;
  z-index: 2;
  margin: 0 clamp(20px, 4vw, 56px) 80px;
  border: 1px dashed var(--line-strong);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 18px clamp(20px, 4vw, 56px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Viewer page
   ========================================================================== */
.viewer-shell {
  position: relative;
  z-index: 2;
  height: calc(100vh - 73px);
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr;
}

.viewer-stage {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, rgba(106,184,255,0.09), transparent 60%), var(--void);
}

.viewer-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.frame-corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--line-strong);
  z-index: 4;
  pointer-events: none;
}
.frame-corner.tl { top: 18px; left: 18px; border-right: none; border-bottom: none; }
.frame-corner.tr { top: 18px; right: 18px; border-left: none; border-bottom: none; }
.frame-corner.bl { bottom: 18px; left: 18px; border-right: none; border-top: none; }
.frame-corner.br { bottom: 18px; right: 18px; border-left: none; border-top: none; }

.hud-panel {
  position: absolute;
  z-index: 5;
  font-family: var(--font-mono);
  pointer-events: none;
}

.hud-panel a, .hud-panel button { pointer-events: auto; }

.hud-top-left {
  top: 34px;
  left: 34px;
  max-width: 320px;
}

.hud-top-left .designation {
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

.hud-top-left h1 {
  font-family: var(--font-brand);
  font-size: clamp(20px, 2.6vw, 27px);
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hud-top-left .class {
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.hud-top-right {
  top: 34px;
  right: 34px;
  max-width: 300px;
  text-align: left;
  font-size: 10.5px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  line-height: 1.9;
}

.hud-top-right .profile-label {
  color: var(--cyan);
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.hud-top-right .profile-text {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

.hud-top-right .spec-sheet {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.hud-top-right .spec-sheet[hidden] { display: none; }

.hud-top-right .spec-label {
  color: var(--cyan);
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.hud-top-right .spec-list {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 5px;
  font-size: 10.5px;
  line-height: 1.5;
}

.hud-top-right .spec-list dt {
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hud-top-right .spec-list dd {
  margin: 0;
  color: var(--text);
  letter-spacing: 0.01em;
}

.hud-bottom-left {
  bottom: 34px;
  left: 34px;
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  line-height: 1.8;
}

.hud-bottom-left kbd {
  font-family: var(--font-mono);
  background: var(--panel-raised);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 1px 5px;
  color: var(--text-dim);
  font-size: 10px;
}

.hud-controls {
  bottom: 34px;
  right: 34px;
  display: flex;
  gap: 8px;
}

.hud-btn {
  background: rgba(8,14,26,0.85);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.hud-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.hud-btn.active { color: var(--void); background: var(--cyan); border-color: var(--cyan); }

.back-link {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 7px 14px;
  background: rgba(8,14,26,0.85);
  backdrop-filter: blur(4px);
  pointer-events: auto;
  display: none;
}

.back-link:hover { color: var(--cyan); border-color: var(--cyan); }

@media (max-width: 640px) {
  .hud-top-right, .hud-bottom-left { display: none; }
  .hud-top-left { max-width: calc(100% - 68px); }

  .hud-controls {
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hud-btn {
    padding: 10px 8px;
    font-size: 10px;
    text-align: center;
  }

  .frame-corner { width: 22px; height: 22px; }
  .frame-corner.tl, .frame-corner.tr { top: 12px; }
  .frame-corner.bl, .frame-corner.br { bottom: 12px; }
  .frame-corner.tl, .frame-corner.bl { left: 12px; }
  .frame-corner.tr, .frame-corner.br { right: 12px; }

  .hud-top-left { top: 20px; left: 20px; }
}

/* ==========================================================================
   Loader
   ========================================================================== */
.loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background: var(--void);
  transition: opacity 0.5s ease;
}

.loader.hidden { opacity: 0; pointer-events: none; }

.loader-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

.loader-bar {
  width: 220px;
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.loader-bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition: width 0.2s ease;
}

.error-box {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background: var(--void);
}

.error-box .code { font-family: var(--font-mono); color: var(--red); font-size: 12px; letter-spacing: 0.1em; }
.error-box p { color: var(--text-dim); max-width: 420px; font-size: 13.5px; }

.hidden { display: none !important; }

/* ==========================================================================
   Fortress Interactive — homepage
   Reserved earth tones (stone / sand / bronze) grounded by the fleet blue.
   Solid, chunky, minimalist — no wireframe linework.
   ========================================================================== */
body.home {
  /* Homepage type system — distinct from the Hangar Bay fonts. */
  --home-display: 'Bricolage Grotesque', 'Space Grotesk', system-ui, sans-serif;
  --home-body:    'Hanken Grotesk', system-ui, sans-serif;
  background: var(--stone);
  background-image:
    radial-gradient(ellipse at 82% -12%, rgba(169, 113, 63, 0.16), transparent 50%),
    radial-gradient(ellipse at 4% 112%, rgba(106, 184, 255, 0.08), transparent 52%),
    linear-gradient(180deg, #14110b 0%, #0d0b08 58%, #0a0c10 100%);
  color: var(--parchment);
  font-family: var(--home-body);
  overflow-x: hidden;
}

/* --- atmospheric background layers (solid gradient wash + fine grain) ----- */
.home-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.home-bg-glow {
  background:
    radial-gradient(circle 660px at 78% 12%, rgba(169, 113, 63, 0.20), transparent 68%),
    radial-gradient(circle 540px at 12% 82%, rgba(106, 184, 255, 0.09), transparent 70%);
  animation: home-breathe 16s ease-in-out infinite alternate;
}

@keyframes home-breathe {
  0%   { opacity: 0.75; transform: scale(1); }
  100% { opacity: 1;    transform: scale(1.06); }
}

/* Translucent fortress emblem, centred and fixed behind the content. */
.home-bg-emblem {
  background-image: url("../assets/fortress-emblem.png");
  background-repeat: no-repeat;
  background-position: 76% 58%;
  background-size: min(69vw, 805px) auto;
  opacity: 0.75;
}

/* Fine grain overlay via fractal-noise SVG, fixed so it never scrolls. */
.home-bg-grain {
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- header -------------------------------------------------------------- */
.home-header {
  border-bottom: none;
}

/* Chunky solid monogram badge instead of the outlined mark. */
.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(150deg, var(--sand) 0%, var(--bronze) 100%);
  color: var(--stone);
  font-family: var(--home-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  border-radius: 10px;
  box-shadow: 0 8px 20px -12px rgba(201, 162, 106, 0.7);
}

.home-header .brand-name {
  color: var(--parchment);
  font-family: var(--home-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.home-nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  font-family: var(--home-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-nav a {
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.home-nav a:hover { color: var(--parchment); background: rgba(201, 162, 106, 0.12); }

/* --- layout -------------------------------------------------------------- */
.home-main {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

/* --- hero ---------------------------------------------------------------- */
.home-hero {
  display: block;
  max-width: 940px;
  padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 8vw, 100px);
}

.home-hero-copy > * {
  opacity: 0;
  transform: translateY(16px);
  animation: home-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.home-hero-copy .eyebrow      { animation-delay: 0.05s; }
.home-hero-copy .home-title   { animation-delay: 0.14s; }
.home-hero-copy .home-lede    { animation-delay: 0.24s; }
.home-hero-copy .home-cta-row { animation-delay: 0.34s; }

@keyframes home-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Solid chunky eyebrow tag. */
.home-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--home-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  background: rgba(201, 162, 106, 0.12);
  padding: 8px 15px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.home-hero .eyebrow::before { display: none; }

.home-title {
  font-family: var(--home-display);
  font-weight: 800;
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 0.92;
  margin: 0 0 26px;
  font-size: clamp(46px, 9vw, 112px);
}

.home-title-line { display: block; }

.home-title-accent {
  color: transparent;
  background: linear-gradient(92deg, var(--sand) 0%, var(--bronze) 58%, var(--cyan) 130%);
  -webkit-background-clip: text;
  background-clip: text;
}

.home-lede {
  color: var(--text-dim);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 0 40px;
}

/* --- solid chunky CTA button --------------------------------------------- */
.home-cta-row { margin: 0; }

.home-cta {
  display: inline-flex;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
  padding: 18px 20px 18px 28px;
  background: linear-gradient(135deg, var(--sand) 0%, var(--bronze) 100%);
  color: var(--stone);
  border-radius: 14px;
  box-shadow: 0 16px 38px -20px rgba(201, 162, 106, 0.65);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-cta:hover,
.home-cta:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px -22px rgba(201, 162, 106, 0.8);
}

.home-cta-text { display: flex; flex-direction: column; gap: 4px; }

.home-cta-kicker {
  font-family: var(--home-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(18, 16, 12, 0.6);
}

.home-cta-title {
  font-family: var(--home-display);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--stone);
}

.home-cta-arrow {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: var(--stone);
  color: var(--sand);
  border-radius: 11px;
  transition: transform 0.22s ease;
}

.home-cta:hover .home-cta-arrow { transform: translateX(4px); }

/* Homepage footer picks up the warm line so it belongs to this page. */
body.home .site-footer {
  border-top: none;
  color: var(--text-faint);
  font-family: var(--home-body);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 560px) {
  .home-cta { width: 100%; justify-content: space-between; padding-left: 22px; }
}

/* Active nav link on the homepage palette. */
.home-nav a[aria-current="page"] { color: var(--parchment); background: rgba(201, 162, 106, 0.16); }

/* ==========================================================================
   Contact page — form on the Fortress Interactive (earth-tone) palette
   ========================================================================== */
.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px);
}

.contact-intro > * {
  opacity: 0;
  transform: translateY(16px);
  animation: home-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.contact-intro .eyebrow    { animation-delay: 0.05s; }
.contact-intro .home-title { animation-delay: 0.14s; }
.contact-intro .home-lede  { animation-delay: 0.24s; margin-bottom: 0; }

.contact-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--home-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  background: rgba(201, 162, 106, 0.12);
  padding: 8px 15px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.contact-hero .eyebrow::before { display: none; }
.contact-hero .home-title { font-size: clamp(40px, 6vw, 78px); }

/* Panel wrapping the form. */
.contact-panel {
  opacity: 0;
  transform: translateY(16px);
  animation: home-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s forwards;
  background: linear-gradient(180deg, rgba(23, 20, 13, 0.85), rgba(13, 11, 8, 0.85));
  border: 1px solid var(--earth-line);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}

#contact-form { display: flex; flex-direction: column; gap: 18px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field label,
.field-label-row label {
  font-family: var(--home-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.field .req { color: var(--sand); }

.char-count {
  font-family: var(--home-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.char-count-max { color: var(--sand); }

#contact-form input,
#contact-form textarea {
  width: 100%;
  font-family: var(--home-body);
  font-size: 15px;
  color: var(--parchment);
  background: rgba(10, 9, 6, 0.72);
  border: 1px solid var(--earth-line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#contact-form textarea { resize: vertical; min-height: 150px; line-height: 1.6; }

#contact-form input::placeholder,
#contact-form textarea::placeholder { color: var(--text-faint); }

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--sand-dim);
  background: rgba(10, 9, 6, 0.9);
  box-shadow: 0 0 0 3px rgba(201, 162, 106, 0.14);
}

/* Honeypot — hidden from people. */
.hp-field { position: absolute; left: -5000px; height: 0; overflow: hidden; margin: 0; }

.form-actions { margin-top: 4px; }

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 24px;
  background: linear-gradient(135deg, var(--sand) 0%, var(--bronze) 100%);
  color: var(--stone);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 16px 38px -22px rgba(201, 162, 106, 0.65);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.contact-submit:hover:not(:disabled),
.contact-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px -24px rgba(201, 162, 106, 0.8);
}
.contact-submit:disabled { opacity: 0.6; cursor: default; }

.contact-submit-text {
  font-family: var(--home-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.contact-submit-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--stone);
  color: var(--sand);
  border-radius: 9px;
}

.form-status {
  margin: 4px 0 0;
  font-family: var(--home-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
}
.form-status-ok  { color: var(--sand); }
.form-status-err { color: var(--red); }

@media (max-width: 860px) {
  .contact-hero { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

