/* Nova Technologies — design system
   Concept: a star atlas. Light theme = a printed sky chart on cool paper, ink lines, catalogue labels.
   Dark theme = the same chart at night. Projects are the bright stars. */
:root {
  --bg: #f2f3f6;
  --bg-2: #e8eaf0;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --ink: #0b1020;
  --dim: #4b526a;
  --faint: #868ca3;
  --line: rgba(11, 16, 32, .12);
  --line-strong: rgba(11, 16, 32, .26);
  --ha: #d7324f;          /* H-alpha 656.3 nm */
  --oiii: #0e958b;        /* O III 500.7 nm */
  --sii: #c8770e;         /* S II 671.6 nm */
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(11,16,32,.05), 0 24px 60px -30px rgba(11,16,32,.28);
  --sky-star: 11, 16, 32;   /* rgb triplets for canvas */
  --sky-grid: 11, 16, 32;
  --sky-glow: 215, 50, 79;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 20px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #05060c; --bg-2: #0a0d18; --surface: #0f1324; --surface-2: #151a30;
    --ink: #eceff8; --dim: #9aa1bd; --faint: #61678a;
    --line: rgba(200, 210, 255, .11); --line-strong: rgba(200, 210, 255, .24);
    --ha: #ff5a77; --oiii: #45e3d1; --sii: #ffb24d; --on-accent: #05060c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 30px 70px -30px rgba(0,0,0,.7);
    --sky-star: 225, 230, 255; --sky-grid: 150, 165, 230; --sky-glow: 255, 90, 119;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #05060c; --bg-2: #0a0d18; --surface: #0f1324; --surface-2: #151a30;
  --ink: #eceff8; --dim: #9aa1bd; --faint: #61678a;
  --line: rgba(200, 210, 255, .11); --line-strong: rgba(200, 210, 255, .24);
  --ha: #ff5a77; --oiii: #45e3d1; --sii: #ffb24d; --on-accent: #05060c;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 30px 70px -30px rgba(0,0,0,.7);
  --sky-star: 225, 230, 255; --sky-grid: 150, 165, 230; --sky-glow: 255, 90, 119;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--ha); color: #fff; }
:focus-visible { outline: 2px solid var(--oiii); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 80px);
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
@media (min-width: 720px) { .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

/* ---------- type ---------- */
.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label .cat { color: var(--ha); }
h1, h2, h3 { font-family: var(--display); line-height: 1; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
h2 { font-size: clamp(36px, 5.2vw, 72px); font-weight: 800; font-variation-settings: "wdth" 112; }
h3 { font-size: 22px; font-weight: 700; font-variation-settings: "wdth" 106; letter-spacing: -.01em; }
.lede { font-size: clamp(18px, 1.5vw, 21px); color: var(--dim); max-width: 58ch; margin: 0; }
.mono { font-family: var(--mono); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 120; font-size: 17px; letter-spacing: .02em; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand small { display: block; font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; font-variation-settings: normal; margin-top: 2px; }
.brand .ring { stroke: var(--ha); }
.brand .star { fill: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--dim); font-size: 15px; padding: 9px 13px; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--line-strong); color: var(--ink); cursor: pointer; transition: background .2s, transform .3s var(--ease); flex: none; }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
.nav-toggle { display: none; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; }
  .nav-links { position: fixed; inset: calc(72px + env(safe-area-inset-top, 0px)) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 14px var(--gutter-r) 26px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); transform: translateY(-130%); transition: transform .4s var(--ease); box-shadow: var(--shadow); }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 22px; padding: 14px 6px; font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 112; color: var(--ink); }
  .nav-links .btn { margin-top: 10px; justify-content: center; font-family: var(--body); font-size: 16px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 15px/1 var(--body);
  padding: 15px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s, border-color .3s, color .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--ha); border-color: var(--ha); color: #fff; }
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.nav-links .btn-primary { color: var(--bg); padding: 11px 18px; margin-left: 6px; }
.nav-links .btn-primary:hover { color: #fff; background: var(--ha); }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding-block: clamp(90px, 12vw, 170px); }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(40px, 6vw, 80px); }
.section-head.split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 960px) { .section-head.split { grid-template-columns: 1.15fr .85fr; gap: 64px; } }

/* reveal: visible at rest, motion only for elements below the fold */
.js .reveal.pre { opacity: .001; transform: translateY(34px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }

/* theme transition (View Transitions API) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 36px; color: var(--dim); font-size: 15px; overflow: hidden; }
.foot-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; color: var(--dim); transition: color .2s; }
.site-footer a:hover { color: var(--ink); }
.foot-mark { font-family: var(--display); font-weight: 900; font-variation-settings: "wdth" 125; font-size: clamp(80px, 21vw, 340px); line-height: .8; letter-spacing: -.04em; margin: 56px 0 0; color: transparent; -webkit-text-stroke: 1px var(--line-strong); user-select: none; white-space: nowrap; }
.foot-base { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 13px; color: var(--faint); }

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