/* Intensified Studios — site styles. No external fonts, images or scripts: nothing loads from third parties. */

/* Palette "P5 Victor final" (2026-09-27): P2 sky + glow, P4 text + buttons.
   Every text/background pair was checked by code against WCAG contrast rules: all pass. */
:root {
  --bg: #0a0e14;           /* deep space */
  --bg-raised: #141b24;    /* panels and cards */
  --line: #6b6b6b;         /* gray trim */
  --text: #c0c0c0;         /* body text (silver) */
  --heading: #ffffff;      /* white, used less than green */
  --muted: #9a9a9a;
  --accent: #4ade80;       /* main green: brand, highlights, links */
  --accent-fill: #15803d;  /* button green (white label = 5.01:1) */
  --on-accent: #ffffff;
  --glow: #8fe3b8;         /* soft glow in the sky */
  --focus: #ffd166;
  --radius: 14px;
  --max: 1080px;
  --edge: clamp(16px, 4vw, 64px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  /* The stars and galaxy live in the .sky layer (see "The sky" below), made from our own images. */
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--focus); color: #000; padding: .5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header / nav */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; flex-wrap: wrap; }
/* Header and footer span the full width on every page (brand far left, links far right). */
.site-header .wrap, .site-footer .wrap { max-width: none; padding-left: var(--edge); padding-right: var(--edge); }
.brand { font-weight: 800; letter-spacing: .02em; text-decoration: none; font-size: 1.05rem; color: var(--heading); }
.brand span { color: var(--accent); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav a { display: inline-block; padding: .4rem .75rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--bg-raised); }
.nav a[aria-current="page"] { color: var(--text); background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--line); }

main { flex: 1; }

/* Hero */
.hero { padding: clamp(3.5rem, 12vw, 8rem) 0 clamp(2.5rem, 8vw, 5rem); }
.eyebrow { color: var(--muted); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; margin: 0 0 .75rem; }
h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  font-weight: 800;
  color: var(--heading);
  overflow-wrap: anywhere;
}
h1 .glow { color: var(--accent); }
.lede { font-size: clamp(1.05rem, 2.4vw, 1.2rem); color: var(--text); max-width: 42rem; margin: 0 0 2rem; }

.btn {
  display: inline-block; padding: .75rem 1.3rem; border-radius: 10px; font-weight: 700; text-decoration: none;
  background: var(--accent-fill); color: var(--on-accent); border: 2px solid var(--accent-fill);
}
.btn:hover { background: #166534; border-color: #166534; color: var(--on-accent); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--muted); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn:focus-visible { border-radius: 10px; }

/* Content */
.section { padding: 2.5rem 0; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; margin: 0 0 .75rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 .4rem; }
p { margin: 0 0 1rem; }
.prose { max-width: 46rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .35rem 0; }
.prose a { overflow-wrap: anywhere; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.card { background: color-mix(in srgb, var(--bg-raised) 92%, transparent); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.25rem .5rem; }
.card h3 { margin-top: 0; }
.card h2 { font-size: 1.15rem; line-height: inherit; margin: 0 0 .4rem; color: var(--accent); }
.card p { color: var(--text); }

.status {
  display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border: 1px solid var(--line); margin-bottom: 1rem;
}
.note { color: var(--muted); font-size: .95rem; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .95em; background: var(--bg-raised); padding: .1rem .35rem; border-radius: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; color: var(--muted); font-size: .9rem; background: var(--bg); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.25rem; padding-bottom: 1.5rem; }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
}

/* ---------- Text pages (Support, Privacy): long text sits on a dark, readable panel over the stars ---------- */
.section .wrap.prose {
  width: min(46rem, 100% - 32px);
  background: color-mix(in srgb, var(--bg-raised) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2.25rem);
}

/* Headline panel (Home and 404) */
.hero-panel {
  background: color-mix(in srgb, var(--bg-raised) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  max-width: 34rem;
}
.hero-panel .lede { margin-bottom: 1.5rem; }
.teaser { color: var(--glow); font-size: 1rem; letter-spacing: .01em; margin: 0 0 1.25rem; }  /* "in development" line */

/* ---------- Home layout: headline panel top-left, three cards bottom-left, the galaxy in the clear ---------- */
.home .wrap { max-width: none; margin: 0; padding-left: var(--edge); padding-right: var(--edge); }
.home main { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 2.5rem 0 2rem; }
.home .hero, .home .section { padding: 0; }
.home .cards { grid-template-columns: repeat(3, minmax(0, 250px)); justify-content: start; gap: .9rem; }
.home .card { padding: 1.1rem 1.1rem .4rem; font-size: .95rem; }
.home .site-footer { margin-top: 0; }
/* Phones/narrow screens: cards stack, and the galaxy sits in the open space under the headline panel
   (visible the moment the page loads; the cards scroll up over it). */
@media (max-width: 860px) {
  .home .cards { grid-template-columns: minmax(0, 1fr); }
  .home main { gap: 44vh; }
  .sky .disk, .sky .galaxy-core { left: 50%; top: 77%; }
  .sky .disk { --size: min(125vw, 720px); }
}

/* ---------- The sky: decorative, behind everything, no scripts ----------
   Stars are our own images (img/). The galaxy (Home only) is "Artist's impression of the Milky Way",
   NASA/JPL-Caltech/ESO/R. Hurt, CC BY 4.0 (eso.org/public/images/eso1339g), color adjusted; credited in the Home footer. */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); pointer-events: none; }
.sky > div { position: absolute; will-change: transform; }

/* Stars: each drift moves exactly one image tile, so the loop is seamless; the big margin hides the edges. */
.stars-far, .glimmer-a, .glimmer-b, .glimmer-c, .stars-bright { inset: -1600px; background-repeat: repeat; }
.stars-far    { background-image: url("img/stars-far.png"); background-size: 1024px; opacity: .9; animation: pan-1024 700s linear infinite; }
/* three sets of stars, each glimmering on its own slow rhythm */
.glimmer-a    { background-image: url("img/stars-glimmer-a.png"); background-size: 1024px; animation: glimmer 4.7s ease-in-out infinite alternate, pan-1024 450s linear infinite; }
.glimmer-b    { background-image: url("img/stars-glimmer-b.png"); background-size: 1024px; background-position: 311px 173px; animation: glimmer 6.3s ease-in-out -2s infinite alternate, pan-1024 450s linear infinite; }
.glimmer-c    { background-image: url("img/stars-glimmer-c.png"); background-size: 1024px; background-position: 587px 421px; animation: glimmer 8.1s ease-in-out -5s infinite alternate, pan-1024 450s linear infinite; }
/* a few bright stars with soft light rays */
.stars-bright { background-image: url("img/stars-bright.png"); background-size: 1536px; animation: glimmer-soft 9s ease-in-out infinite alternate, pan-1536 360s linear infinite; }
@keyframes pan-1024 { to { transform: translate3d(-1024px, -1024px, 0); } }
@keyframes pan-1536 { to { transform: translate3d(-1536px, -1536px, 0); } }
@keyframes glimmer { from { opacity: .15; } to { opacity: 1; } }
@keyframes glimmer-soft { from { opacity: .55; } to { opacity: 1; } }

/* The Milky Way seen from outside: tilted, turning clockwise like the real one seen from "above".
   Every galaxy layer shares size, tilt and spin (class "disk"), so they turn together. */
.disk {
  --size: min(118vmin, 1300px);
  width: var(--size); height: var(--size);
  left: 66%; top: 50%;
  margin-left: calc(var(--size) / -2); margin-top: calc(var(--size) / -2);
  background-position: center; background-size: contain; background-repeat: no-repeat;
  mix-blend-mode: screen;
  transform: perspective(1600px) rotateX(64deg) rotateZ(0deg);
  animation: spin 300s linear infinite;
}
@keyframes spin { to { transform: perspective(1600px) rotateX(64deg) rotateZ(360deg); } }
.galaxy-disk { background-image: url("img/milky-way-eso1339g.jpg"); filter: saturate(1.3) contrast(1.12); }
.galaxy-glow { background-image: url("img/milky-way-eso1339g.jpg"); filter: blur(22px) brightness(1.6) saturate(1.5); opacity: .5; }
.disk-sparkles-a { background-image: url("img/galaxy-sparkles-a.png"); animation: spin 300s linear infinite, glimmer 3.9s ease-in-out infinite alternate; }
.disk-sparkles-b { background-image: url("img/galaxy-sparkles-b.png"); animation: spin 300s linear infinite, glimmer 5.3s ease-in-out -2.5s infinite alternate; }
.galaxy-core {
  width: 34vmin; height: 34vmin;
  left: 66%; top: 50%; margin-left: -17vmin; margin-top: -17vmin;
  background: radial-gradient(closest-side, rgba(255, 238, 205, .6), rgba(255, 222, 170, .18) 50%, transparent 72%);
  transform: scaleY(.6);
  mix-blend-mode: screen;
  animation: breathe 7s ease-in-out infinite alternate;
}
@keyframes breathe {
  from { opacity: .7; transform: scale(.94) scaleY(.6); }
  to   { opacity: 1;  transform: scale(1.06) scaleY(.6); }
}
/* soft brand glow + darker bottom edge */
.tint {
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 35%, color-mix(in srgb, var(--glow) 9%, transparent), transparent 60%),
    linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
}

/* "Pause sky" switch in the footer (accessibility: moving backgrounds must be pausable),
   and devices set to "reduce motion" get a still sky automatically. */
body:has(#sky-pause:checked) .sky > div { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .sky > div { animation: none; } }
.sky-toggle { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.sky-toggle input { accent-color: var(--accent); width: 1rem; height: 1rem; margin: 0; }
.credit { font-size: .8rem; }
