/* View into Space — viewintospace.com
   Single stylesheet. No frameworks, no external requests. */

:root {
  --bg:        #0a0b0d;
  --bg-raised: #131519;
  --bg-sunken: #060709;
  --line:      #24272e;
  --line-soft: #1a1d22;

  --text:      #e9eaed;
  --text-dim:  #9ba1ab;
  --text-faint:#6b717b;

  --accent:      #ffe81f;   /* channel yellow */
  --accent-ink:  #0a0b0d;   /* text on accent */
  --accent-soft: #fff27a;

  --measure: 34rem;
  --wide: 76rem;
  --gutter: 1.25rem;
  --radius: 10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* Per-page accent override, e.g. <body class="theme-solar"> */
.theme-solar {
  --accent: #ffb04d;
  --accent-soft: #ffd39e;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.125rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1.1em; }
p, li { max-width: var(--measure); }
.wide-text p, .wide-text li { max-width: none; }

small, .small { font-size: .9375rem; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: 46rem; }

section { padding-block: clamp(3rem, 8vw, 5.5rem); }
section + section { border-top: 1px solid var(--line-soft); }

.eyebrow {
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 .75rem;
}

.lede { font-size: 1.25rem; color: var(--text-dim); max-width: 38rem; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px;
}
.brand { flex: 0 0 auto; display: block; padding: .5rem 0; }
.brand img { width: 132px; }

.nav-toggle {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: .25rem; flex-wrap: wrap;
}
.site-nav a {
  display: block; padding: .5rem .75rem;
  color: var(--text-dim); text-decoration: none;
  font-size: 1rem; border-radius: 8px;
}
.site-nav a:hover { color: var(--text); background: var(--bg-raised); }
.site-nav a[aria-current="page"] { color: var(--accent); }

@media (max-width: 47.99em) {
  .site-nav {
    display: none;
    position: absolute; inset: 64px 0 auto 0;
    background: var(--bg-sunken);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: .75rem .5rem; font-size: 1.0625rem; }
}
@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .site-nav { margin-left: auto; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.15rem;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-soft); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-faint); background: var(--bg-raised); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- hero ---------- */

.hero { position: relative; border-bottom: 1px solid var(--line-soft); }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 30%, transparent) 0%,
      color-mix(in srgb, var(--bg) 20%, transparent) 30%,
      color-mix(in srgb, var(--bg) 82%, transparent) 78%,
      var(--bg) 100%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--bg) 82%, transparent) 0%,
      color-mix(in srgb, var(--bg) 55%, transparent) 42%,
      transparent 72%);
}
.hero-body {
  position: relative;
  padding-block: clamp(3.5rem, 11vw, 6.5rem);
}
.hero h1 { max-width: 16ch; text-wrap: balance; }
.hero .lede { font-size: clamp(1.125rem, 2.6vw, 1.375rem); color: var(--text); }

/* ---------- cards & grids ---------- */

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-body { padding: 1.1rem 1.25rem 1.35rem; }
.card-body h3 { margin-bottom: .35rem; }
.card-body p { margin-bottom: 0; color: var(--text-dim); font-size: 1rem; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--line); background: #171a1f; }

.thumb { aspect-ratio: 16 / 9; background: var(--bg-sunken); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- gallery ---------- */

.gallery {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
}
.gallery figure { margin: 0; background: var(--bg-raised); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); }
.gallery img { width: 100%; }
.gallery figcaption { padding: .8rem 1rem 1rem; font-size: .9375rem; color: var(--text-dim); }
.gallery figcaption strong { display: block; color: var(--text); font-size: 1.0625rem; font-weight: 600; margin-bottom: .15rem; }

/* ---------- app page ---------- */

.shots {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.shots img {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}
.shot-caption { font-size: .9375rem; color: var(--text-dim); margin: .6rem 0 0; }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.feature-list h3 { margin-bottom: .2rem; font-size: 1.0625rem; }
.feature-list p { margin: 0; color: var(--text-dim); font-size: 1rem; }

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.callout :last-child { margin-bottom: 0; }

/* ---------- forms ---------- */

.form { display: grid; gap: 1.1rem; max-width: 34rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .9375rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7rem .8rem;
  min-height: 44px;
  width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.hp { position: absolute; left: -9999px; }

.notice { border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.5rem; border: 1px solid var(--line); }
.notice-ok  { border-left: 3px solid #4ade80; }
.notice-bad { border-left: 3px solid #f87171; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-sunken);
  padding-block: 3rem 2.5rem;
  font-size: .9375rem;
  color: var(--text-dim);
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.site-footer h4 { font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-base { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft); color: var(--text-faint); }
.footer-base p { max-width: none; margin: 0 0 .4rem; }

/* ---------- utility ---------- */

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

.stack > * + * { margin-top: 1.5rem; }
.mt-0 { margin-top: 0; }
.center { text-align: center; }
