/* Neptune Vibes. Palette: Roles/Art Director/brands/neptune/STYLE.md.
   The sunset (#ff9a3c -> #ff5fa2) is decoration only, never a text colour (Art Director). */

:root {
  --navy: #101f4d;
  --ice: #d8e6ff;
  --sunset: linear-gradient(90deg, #ff9a3c, #ff5fa2);

  --bg: #f6f8ff;
  --bg-alt: #e9eeff;
  --card: #ffffff;
  --text: #141a33;
  --muted: #475072;
  --accent: #3552c9;
  --border: #cfd8f5;
  --on-accent: #ffffff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1230;
    --bg-alt: #0f1840;
    --card: #16204f;
    --text: #e8edff;
    --muted: #b3bde3;
    --accent: #8198ff;
    --border: #2b3a7a;
    --on-accent: #0b1230;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1230;
  --bg-alt: #0f1840;
  --card: #16204f;
  --text: #e8edff;
  --muted: #b3bde3;
  --accent: #8198ff;
  --border: #2b3a7a;
  --on-accent: #0b1230;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.2; text-wrap: balance; }

a { color: var(--accent); text-underline-offset: 0.18em; }

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

.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.narrow { max-width: 40rem; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--ice); color: var(--navy);
  padding: 0.5rem 0.9rem; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 0.75rem; }

/* On navy the accent ring is too dim; the sunset orange measures 7.5:1 there. */
.site-header :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: #ff9a3c; }

/* Header and hero stay navy in both themes: the wordmark is drawn light. */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy);
  border-bottom: 3px solid transparent;
  border-image: var(--sunset) 1;
}
.header-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.25rem 1.5rem;
  padding-block: 0.6rem;
}
.brand { display: block; flex: none; }
.brand img { width: auto; height: 3.25rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.15rem 0.35rem; }
.nav a {
  display: block; padding: 0.4rem 0.7rem; border-radius: 999px;
  color: var(--ice); font-weight: 600; text-decoration: none;
}
.nav a:hover { background: rgb(255 255 255 / 0.14); }

.hero {
  background: radial-gradient(60rem 30rem at 85% 10%, #26399a 0%, var(--navy) 60%);
  color: #ffffff;
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}
.hero-grid {
  display: grid; align-items: center; gap: 2rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); font-weight: 800; letter-spacing: -0.02em; }
.hero h1::after {
  content: ""; display: block; width: 5rem; height: 0.4rem;
  margin-top: 1rem; border-radius: 999px; background: var(--sunset);
}
.lead { margin-top: 1.25rem; font-size: 1.2rem; color: var(--ice); max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.btn {
  display: inline-block; padding: 0.7rem 1.25rem; border-radius: 999px;
  border: 2px solid var(--ice); color: #ffffff;
  font-weight: 700; text-decoration: none;
}
.btn:hover { background: rgb(255 255 255 / 0.12); }
.btn-primary { background: var(--ice); color: var(--navy); }
.btn-primary:hover { background: #ffffff; }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { position: relative; width: min(100%, 26rem); }
.orbit {
  position: absolute; width: 92%; aspect-ratio: 1;
  border: 2px dashed rgb(129 152 255 / 0.45); border-radius: 50%;
  animation: spin 80s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
section.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.alt { background: var(--bg-alt); }

h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.01em; }
h2::after {
  content: ""; display: block; width: 3rem; height: 0.3rem;
  margin-top: 0.6rem; border-radius: 999px; background: var(--sunset);
}
.sub { margin-top: 0.9rem; font-size: 1.15rem; font-weight: 600; }
.intro { margin-top: 0.9rem; max-width: 46rem; color: var(--muted); }
.mini { margin-top: 2.5rem; font-size: 1.25rem; }

.grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.crew { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.how { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); counter-reset: how; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.25rem;
}
.card h3 { font-size: 1.25rem; }
.card h4 { font-size: 1.05rem; }
.card p { margin-top: 0.5rem; color: var(--muted); }
.card p.tag { color: var(--text); font-weight: 600; }

.crew-card { display: flex; gap: 1rem; align-items: flex-start; }
.crew-card img { flex: none; width: 4rem; height: 4rem; }
.crew-card p { margin-top: 0.3rem; }

.how li { counter-increment: how; }
.how h4 { display: flex; align-items: center; }
.how h4::before {
  content: counter(how); display: inline-grid; place-items: center;
  flex: none; width: 1.7rem; height: 1.7rem; margin-right: 0.5rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: 0.95rem;
}

.proof {
  margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: 12px;
  border-left: 0.35rem solid var(--accent); background: var(--bg-alt); font-weight: 600;
}

.link-card { display: flex; flex-direction: column; }
.logo { width: 4.5rem; height: 4.5rem; margin-bottom: 0.9rem; border-radius: 14px; }
.more { margin-top: auto; padding-top: 1rem; font-weight: 700; }
.more::after { content: " \2192"; }
.links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-top: auto; }
.links .more { margin-top: 0; }
.crew-card h3 a { color: var(--text); text-decoration: none; }
.crew-card h3 a:hover { color: var(--accent); text-decoration: underline; }

.tool-card { overflow: hidden; }
/* One frame for every tool picture: the art is fitted whole, never cropped. */
.shot {
  position: relative; margin: -1.25rem -1.25rem 1rem;
  aspect-ratio: 16 / 9; background: var(--navy);
}
.shot img {
  position: absolute; inset: 1.25rem;
  width: calc(100% - 2.5rem); height: calc(100% - 2.5rem); object-fit: contain;
}
/* The Art Director's 16:9 pieces carry their own 6% margin, so they fill the frame. */
.shot img.fit { inset: 0; width: 100%; height: 100%; }
.tool-head { display: flex; align-items: center; gap: 0.75rem; }
.tool-head img { width: 2.75rem; height: 2.75rem; }
.card p.guard {
  margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px dashed var(--border);
  color: var(--text); font-weight: 600;
}

.notice {
  margin-top: 1.25rem; padding: 1.25rem; border-radius: 16px;
  border: 2px dashed var(--border); background: var(--card);
  color: var(--muted); font-weight: 600; text-align: center;
}

.site-footer { background: var(--navy); color: var(--ice); padding-block: 1.5rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.footer-row img { width: 2.25rem; height: 2.25rem; }
.version { margin-left: 0.5rem; font-size: 0.85rem; opacity: 0.85; }

@media (max-width: 46rem) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; }
  .hero-art img { width: min(70%, 16rem); }
  .orbit { width: min(66%, 15rem); }
  .brand img { height: 2.75rem; }
  .nav a { padding: 0.3rem 0.55rem; font-size: 0.95rem; }
  html { scroll-padding-top: 8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit { animation: none; }
}

/* ---------- Devlog (pages written by scripts/build_devlog.py) ---------- */
.devlog { padding-block: clamp(1.5rem, 4vw, 3rem) 3rem; }
.devlog h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; letter-spacing: -0.01em; }
.nav a[aria-current="page"] { background: rgb(255 255 255 / 0.14); }
.crumbs { margin-bottom: 1rem; font-weight: 600; }

.feed-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin-top: 1rem; }
.feed-card {
  display: flex; align-items: center; gap: 0.8rem; height: 100%;
  padding: 0.8rem 1rem; color: var(--text); text-decoration: none;
}
a.feed-card:hover { border-color: var(--accent); }
.feed-card img { width: 3rem; height: 3rem; flex: none; }
.feed-card strong { display: block; }
.count { display: block; color: var(--muted); font-size: 0.9rem; }
.is-soon { opacity: 0.7; }

.day { margin-top: 2rem; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.timeline { margin-top: 0.5rem; border-left: 2px solid var(--border); padding-left: 1rem; }
.timeline li { display: flex; gap: 0.75rem; align-items: flex-start; padding-block: 0.6rem; }
.timeline img { width: 2rem; height: 2rem; flex: none; }
.timeline a { font-weight: 700; }
.timeline .who { margin-left: 0.5rem; color: var(--muted); font-size: 0.9rem; }
.timeline p { margin-top: 0.15rem; color: var(--muted); font-size: 0.95rem; }

.feed-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.feed-head img { width: 4rem; height: 4rem; flex: none; }
.feed-head .sub { margin-top: 0.3rem; }

.post { margin-top: 1rem; }
.post h1, .post h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-top: 0.4rem; }
.post h2 a { color: var(--text); text-decoration: none; }
.post h2 a:hover { color: var(--accent); text-decoration: underline; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: center; color: var(--muted); font-size: 0.9rem; }
.feed-badge {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.6rem 0.15rem 0.2rem;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text);
  font-weight: 700; font-size: 0.85rem; text-decoration: none;
}
.feed-badge:hover { border-color: var(--accent); }
.feed-badge img { width: 1.5rem; height: 1.5rem; }
.post-body { margin-top: 0.6rem; }
.post-body p, .post-body li { color: var(--text); overflow-wrap: anywhere; }
.post-body p + p, .post-body ul { margin-top: 0.6rem; }
.post-body ul { list-style: disc; padding-left: 1.25rem; }
.post-body li + li { margin-top: 0.3rem; }
.post-body ul ul { list-style: circle; margin-top: 0.3rem; }
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.88em;
  padding: 0.05em 0.3em; border-radius: 5px; background: var(--bg-alt);
}
.post-media { display: grid; gap: 0.75rem; margin: 1rem 0 0; }
.post-media img { border-radius: 10px; border: 1px solid var(--border); background: var(--bg-alt); }
.card p.also { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; color: var(--muted); }
.narrow-post { max-width: 52rem; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; font-weight: 600; }
