/* thrunter.org - site-wide styles for the root pages.
   The colour tokens and header/footer match aptZoo's static/aptzoo.css; keep the two in step. */

:root {
  --bg: #eef1f5;
  --panel: #ffffff;
  --text: #1c2430;
  --muted: #5d6877;
  --border: #d9dee6;
  --accent: #1f63d6;
  --accent-hover: #174ea8;
  --accent-soft: #e7effc;
  --chip-bg: #f0f3f7;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 16px rgba(16, 24, 40, 0.06);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --panel: #18202a;
    --text: #e4e9f0;
    --muted: #9aa6b5;
    --border: #2e3a4a;
    --accent: #6ea8ff;
    --accent-hover: #9cc3ff;
    --accent-soft: #1b2a40;
    --chip-bg: #222c39;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

/* ---------- header / footer (same as aptZoo) ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.brand { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.site-nav a { padding: 0.35rem 0.7rem; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--text); background: var(--chip-bg); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--panel);
  border-top: 1px solid var(--border);
}

.container { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem) 3rem; }

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

.btn-primary, .btn-ghost {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.6); background: rgba(0, 0, 0, 0.25); }
.btn-ghost:hover { color: #fff; background: rgba(0, 0, 0, 0.45); border-color: #fff; }

/* ---------- hero with the slideshow ---------- */

.hero {
  position: relative;
  min-height: clamp(420px, 70vh, 720px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0b0f14;
  color: #fff;
  text-align: center;
}
/* Each slide is two layers of the same picture (set by home.js as --img): a blurred copy that
   fills the band, and the whole picture fitted inside it so nothing gets cropped. */
.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 10s ease-in-out;
  transform: scale(1.05);
  transform-origin: center center;
}
.hero-bg::before, .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-position: center;
  background-repeat: no-repeat;
}
.hero-bg::before {
  inset: -40px;                       /* hide the blur's soft edge */
  background-size: cover;
  filter: blur(22px) brightness(0.55);
}
.hero-bg::after { background-size: contain; }
.hero-bg.visible { opacity: 1; }
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(5, 8, 12, 0.35), rgba(5, 8, 12, 0.7));
}
.hero-content {
  position: relative;
  padding: clamp(2rem, 6vw, 4rem) 1.25rem;
  max-width: 44rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.hero-kicker {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  margin: 0.1em 0 0.3em;
}
.hero-lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); margin: 0 auto 1.5rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .hero-bg { transition: opacity 0.5s ease-in-out; transform: none !important; }
}

/* ---------- tool cards ---------- */

.tools { margin-top: 2.5rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.tool-card {
  display: flex;
  gap: 1.1rem;
  padding: 1.4rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
}
a.tool-card:hover { border-color: var(--accent); color: var(--text); }
a.tool-card:hover .tool-link { color: var(--accent-hover); text-decoration: underline; }
.tool-card p { color: var(--muted); margin-bottom: 0.75rem; }
.tool-logo { width: 72px; height: 72px; flex-shrink: 0; border-radius: 10px; }
.tool-logo-teaser {
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--chip-bg);
  border: 2px dashed var(--border);
}
.tool-link { font-weight: 600; color: var(--accent); }
.tool-card-teaser { border-style: dashed; box-shadow: none; }
.pill {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}
.pill-live { background: #dff5e7; color: #0d5c3f; }
.pill-soon { background: var(--chip-bg); color: var(--muted); border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { .pill-live { background: #163b2c; color: #6fd3a5; } }

.about-strip { max-width: 62ch; margin-top: 3rem; }

/* ---------- error page ---------- */

.error-page { text-align: center; padding: 4rem 1rem; }
.error-page h1 { font-size: 3rem; }

@media (max-width: 600px) {
  .tool-card { flex-direction: column; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { width: 100%; }
}
