/* Orion Rising — shared styles
   Layout concept: a night-sky instrument. Business up top (quiet, precise links in the
   corners like eyepiece labels), whimsy below (a pinned scroll stage that descends from
   Orion to a summit observatory and into the lab). Single deliberate dark theme. */
:root {
  --night: #060914;      /* deepest sky, page ground */
  --ink: #0b1222;        /* panels */
  --panel: #101a30;      /* raised panels, cards */
  --line: #24314f;       /* hairlines */
  --star: #eef2ff;       /* primary text, star white */
  --dim: #8f9bbb;        /* secondary text */
  --faint: #56618a;      /* tertiary */
  --rigel: #93b6ff;      /* cool accent (Rigel, blue-white) */
  --betel: #ff9b66;      /* warm accent (Betelgeuse), used sparingly for CTAs */
  --signal: #4dff9a;     /* hover telemetry text */

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: clamp(0.78rem, 0.75rem + 0.1vw, 0.85rem);
  --step-0: clamp(0.98rem, 0.94rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.6rem, 1.3rem + 1vw, 2.2rem);
  --step-3: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem);
  --step-4: clamp(2.8rem, 1.6rem + 5vw, 6.4rem);

  --gutter: clamp(16px, 3vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0;
  background: var(--night);
  color: var(--star);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 500; }
p { margin: 0; }
:focus-visible { outline: 1px solid var(--star); outline-offset: 3px; }
.mono { font-family: var(--f-mono); }
.eyebrow {
  font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
}
.wordmark {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 300;
  letter-spacing: 0.32em; text-transform: uppercase;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--panel); padding: 8px 12px; }

/* ---------- Quick links (corners) ---------- */
.quick {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) 0;
  pointer-events: none;
  transition: opacity .5s ease;
}
.quick nav { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.quick ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(12px, 1.6vw, 26px); }
.quick a {
  font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: #cdd5ee;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px;
  position: relative;
}
.quick a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px;
  background: var(--star); transition: right .25s ease;
}
.quick a:hover, .quick a:focus-visible { color: #fff; }
.quick a:hover::after, .quick a:focus-visible::after { right: 0; }
.quick a.cta { color: var(--betel); }
.quick a.cta::after { background: var(--betel); }
.quick .mini-orion { width: 30px; height: 44px; flex: none; }
.quick a .glyph { width: 13px; height: 13px; flex: none; opacity: .8; }
.quick li { opacity: 0; transform: translateY(-4px); animation: linkIn .5s ease forwards; }
@keyframes linkIn { to { opacity: 1; transform: none; } }
.quick.dim { opacity: .35; }
.quick.dim:hover, .quick.dim:focus-within { opacity: 1; }

/* ---------- Mini Orion glyph ---------- */
.mini-orion circle { fill: var(--star); }
.mini-orion .b { fill: #ffb08a; }
.mini-orion .r { fill: #b9d0ff; }
.mini-orion line { stroke: var(--rigel); stroke-width: .6; opacity: .55; }

/* ---------- Generic page frame (business + station pages) ---------- */
.page { padding: calc(110px + env(safe-area-inset-top, 0px)) var(--gutter) 120px; max-width: 1180px; margin: 0 auto; }
.page-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.page-head h1 { font-family: var(--f-display); font-stretch: 112%; font-weight: 300; font-size: var(--step-3); line-height: 1.05; letter-spacing: -0.01em; }
.page-head p { color: var(--dim); font-size: var(--step-1); max-width: 62ch; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card {
  background: var(--ink); border: 1px solid var(--line); padding: 22px; display: grid; gap: 10px; align-content: start; min-width: 0;
}
.card h3 { font-family: var(--f-display); font-stretch: 110%; font-weight: 500; font-size: var(--step-1); }
.card p { color: var(--dim); }
.card .tag { font-family: var(--f-mono); font-size: var(--step--1); color: var(--rigel); letter-spacing: .08em; }
.card a.more { font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--star); }
.card a.more:hover { color: var(--signal); }
.card.slot { border-style: dashed; background: transparent; }
.card.slot h3 { color: var(--dim); }
.section { display: grid; gap: 20px; margin-top: clamp(48px, 7vw, 88px); }
.section > h2 { font-family: var(--f-display); font-stretch: 112%; font-weight: 400; font-size: var(--step-2); }
.lede-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.lede-list li { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.lede-list li > span:first-child { font-family: var(--f-mono); font-size: var(--step--1); color: var(--rigel); letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.lede-list li > span:last-child { color: #cfd6ec; min-width: 0; }
@media (max-width: 600px) { .lede-list li { grid-template-columns: 1fr; gap: 4px; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase;
  padding: 14px 20px; border: 1px solid var(--star); color: var(--star); background: transparent; cursor: pointer;
}
.btn:hover { background: var(--star); color: var(--night); }
.btn.warm { border-color: var(--betel); color: var(--betel); }
.btn.warm:hover { background: var(--betel); color: var(--night); }
.draft-note { font-family: var(--f-mono); font-size: var(--step--1); color: var(--betel); border: 1px dashed #6b4a3a; padding: 8px 12px; display: inline-block; }

.site-foot {
  border-top: 1px solid var(--line); padding: 40px var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; color: var(--dim);
  font-size: var(--step--1); position: relative; z-index: 5; background: var(--night);
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-foot a { text-decoration: none; font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.site-foot a:hover { color: var(--star); }

/* forms */
.form { display: grid; gap: 18px; max-width: 720px; }
.form .row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.form label { display: grid; gap: 6px; font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.form input, .form select, .form textarea {
  font: inherit; font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-size: var(--step-0);
  background: var(--ink); color: var(--star); border: 1px solid var(--line); padding: 12px 14px; border-radius: 0; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 1px solid var(--rigel); border-color: var(--rigel); }
.form textarea { min-height: 160px; resize: vertical; }
.form .status { color: var(--signal); font-family: var(--f-mono); font-size: var(--step--1); min-height: 1.4em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* quick links on small screens */
@media (max-width: 820px) {
  .quick { flex-direction: column; gap: 6px; }
  .quick nav { width: 100%; justify-content: space-between; }
  .quick nav:last-child { flex-direction: row; }
  .quick ul { gap: 14px; flex-wrap: wrap; }
  .quick .mini-orion { width: 22px; height: 32px; }
}
