/* Silicon Sheep — shared stylesheet.
   Shared rules first, then per-page differences scoped by the <body> class
   (page-home, page-products, page-press, page-pgraph). */

:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background: #05070b;
  color: #e9eef7;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
p a, li a { color: #6fe7ff; text-decoration: underline; text-underline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 18px 64px; }

/* ---------- Top nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .2px;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #6fe7ff;
  box-shadow: 0 0 18px rgba(111,231,255,.7);
}
.navlinks { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  font-weight: 700;
}
.pill.primary {
  border-color: rgba(111,231,255,.35);
  background: rgba(111,231,255,.12);
  box-shadow: 0 0 0 1px rgba(111,231,255,.08) inset;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  min-height: 520px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  transform: scale(1.02);
  /* background (and filter) set per page below */
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 20% 25%, rgba(111,231,255,.18), transparent 60%),
    radial-gradient(900px 520px at 70% 60%, rgba(90,140,255,.10), transparent 55%);
  pointer-events: none;
}
.hero-inner { position: relative; padding: 44px 28px; }
.intro { max-width: 62ch; }
.kicker {
  margin: 0 0 10px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(111,231,255,.92);
}
h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: .3px;
}
h2 { margin: 0 0 6px; font-size: 1.35rem; letter-spacing: .2px; }
.lede {
  margin: 0 0 18px;
  max-width: 58ch;
  color: rgba(233,238,247,.86);
  font-size: 1.06rem;
}

/* ---------- Buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  font-weight: 800;
  letter-spacing: .2px;
  min-width: 160px;
}
.btn.primary {
  border-color: rgba(111,231,255,.4);
  background: rgba(111,231,255,.14);
  box-shadow: 0 0 24px rgba(111,231,255,.12);
}
.pill, .btn, a.card { transition: transform .15s ease, border-color .15s ease, background-color .15s ease; }
.pill:hover, .btn:hover { transform: translateY(-1px); }
.pill:active, .btn:active { transform: translateY(0); }

/* ---------- Accessibility ---------- */
/* Visible keyboard focus (mouse clicks don't trigger :focus-visible) */
:focus-visible {
  outline: 2px solid #6fe7ff;
  outline-offset: 3px;
}
.pill:focus-visible { border-radius: 999px; }
.btn:focus-visible { border-radius: 14px; }
summary:focus-visible { border-radius: 6px; }

/* "Skip to content": hidden until reached with the keyboard */
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 10px;
  background: #6fe7ff;
  color: #05070b;
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .pill:hover, .btn:hover { transform: none; }
}

/* ---------- Cards & grids ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  padding: 16px 16px 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1rem; }
.card p { margin: 0; color: rgba(233,238,247,.78); font-size: .95rem; }
.card ul { margin: 0; padding-left: 18px; color: rgba(233,238,247,.80); font-size: .95rem; }
.card li + li { margin-top: 4px; }
a.card:hover { border-color: rgba(111,231,255,.35); }
.card .more { margin-top: 10px; font-weight: 800; color: #6fe7ff; }

/* ---------- Content sections (P-Graph) ---------- */
section.block { margin-top: 34px; }
.sub { margin: 0 0 14px; color: rgba(233,238,247,.74); max-width: 72ch; }
.step { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(111,231,255,.92); margin: 0 0 6px; }
.states { font-size: .92rem; color: rgba(233,238,247,.80); letter-spacing: .06em; word-spacing: .18em; }
.note { font-size: .88rem; color: rgba(233,238,247,.64); margin-top: 10px; }

.offer { border-radius: 22px; border: 1px solid rgba(111,231,255,.30); background: rgba(111,231,255,.06); padding: 24px 22px; }
.offer h2 { margin-bottom: 8px; }
.offer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.offer h3 { margin: 0 0 6px; font-size: .98rem; }
.offer ul { margin: 0; padding-left: 18px; color: rgba(233,238,247,.84); }
.offer li + li { margin-top: 4px; }

details { border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); padding: 12px 14px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 10px 0 2px; color: rgba(233,238,247,.80); }

/* ---------- Book cover (Press) ---------- */
.cover-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  background: #0b0e14;
  box-shadow:
    0 22px 50px rgba(0,0,0,.48),
    0 0 0 1px rgba(111,231,255,.08),
    0 0 36px rgba(111,231,255,.08);
}
picture { display: block; }
.cover { display: block; width: 100%; height: auto; }

/* ---------- Footer ---------- */
footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(233,238,247,.70);
  font-size: .92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

/* ================= Per-page differences ================= */

/* Home */
.page-home .hero::before {
  background:
    linear-gradient(90deg, rgba(5,7,11,.92) 0%, rgba(5,7,11,.72) 44%, rgba(5,7,11,.18) 100%),
    url("sheep.jpg") center/cover no-repeat;
  background:
    linear-gradient(90deg, rgba(5,7,11,.92) 0%, rgba(5,7,11,.72) 44%, rgba(5,7,11,.18) 100%),
    image-set(url("sheep.webp") type("image/webp"), url("sheep.jpg") type("image/jpeg")) center/cover no-repeat;
  filter: saturate(1.05);
}
.page-home .hero { min-height: 400px; }
.page-home .hero-inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 22px;
  align-items: start;
}
.page-home .card p + p { margin-top: 10px; }
.page-home .press-kicker { color: rgba(232,184,74,.95); }

/* Home: P-Graph feature card */
.feature {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  margin-top: 14px;
  padding: 24px 22px;
  border-color: rgba(111,231,255,.24);
  background: rgba(111,231,255,.04);
}
.feature h3 { font-size: 1.3rem; margin-bottom: 4px; }
.card .tagline { color: #e9eef7; font-weight: 700; }
.feature p { max-width: 62ch; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: start; }
.points li {
  padding-left: 14px;
  border-left: 2px solid rgba(111,231,255,.45);
  color: rgba(233,238,247,.80);
  font-size: .95rem;
}
.points strong { color: #e9eef7; }

/* Home: small book cards */
.mini-book {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: start;
}
.mini-book img {
  display: block; width: 100%; height: auto;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.45);
}
.mini-book h3 { margin-bottom: 6px; }
.mini-book .step { margin-bottom: 4px; font-size: .72rem; color: rgba(232,184,74,.95); }

/* Products */
.page-products .hero { min-height: 240px; }
.page-products .hero::before {
  background:
    linear-gradient(90deg, rgba(5,7,11,.92) 0%, rgba(5,7,11,.72) 44%, rgba(5,7,11,.28) 100%),
    url("sheep.jpg") center/cover no-repeat;
  background:
    linear-gradient(90deg, rgba(5,7,11,.92) 0%, rgba(5,7,11,.72) 44%, rgba(5,7,11,.28) 100%),
    image-set(url("sheep.webp") type("image/webp"), url("sheep.jpg") type("image/jpeg")) center/cover no-repeat;
  filter: saturate(1.05);
}
.page-products .lede { max-width: 62ch; }
.page-products .card h2 { margin: 0 0 8px; font-size: 1rem; letter-spacing: normal; }
.page-products .btn { min-width: 180px; }
.page-products .grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  margin-top: 18px;
}

/* Press */
.page-press .hero::before {
  background:
    linear-gradient(90deg, rgba(5,7,11,.88) 0%, rgba(5,7,11,.78) 48%, rgba(5,7,11,.55) 100%),
    url("press/notions.jpg") center 60%/cover no-repeat;
  background:
    linear-gradient(90deg, rgba(5,7,11,.88) 0%, rgba(5,7,11,.78) 48%, rgba(5,7,11,.55) 100%),
    image-set(url("press/notions.webp") type("image/webp"), url("press/notions.jpg") type("image/jpeg")) center 60%/cover no-repeat;
  filter: blur(14px) saturate(1.08);
  transform: scale(1.12); /* hide the blurred edges */
}
.page-press .hero::after {
  background:
    radial-gradient(900px 420px at 20% 25%, rgba(111,231,255,.16), transparent 60%),
    radial-gradient(900px 520px at 78% 70%, rgba(255,176,70,.10), transparent 55%);
}
.page-press .hero-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
}
.page-press .kicker { color: rgba(232,184,74,.95); }
.page-press .lede { max-width: 52ch; }
.page-press .btn.primary {
  border-color: rgba(111,231,255,.5);
  background: rgba(111,231,255,.2);
  box-shadow: 0 0 24px rgba(111,231,255,.16);
}
.page-press .lede.byline { margin-bottom: 10px; }
.page-press .card { padding: 18px 16px 16px; height: 100%; }
.page-press .card h2 { margin: 0 0 8px; font-size: 1rem; }
.page-press .card p { margin: 0 0 12px; }
.page-press .card p:last-child { margin-bottom: 0; }
.page-press .about-book { margin-top: 18px; }
.page-press .about-book p { max-width: 80ch; }

/* Press: a book in the series grid (cover beside text) */
.book {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: start;
}
.book .cover-frame { box-shadow: 0 12px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(111,231,255,.08); }
.book h3 { margin: 0 0 10px; font-size: 1.3rem; line-height: 1.2; }
.page-press .book .step { margin: 0 0 4px; color: rgba(232,184,74,.95); }
.book .cta-row { margin-top: 4px; }

/* P-Graph */
.page-pgraph .hero { min-height: 420px; }
.page-pgraph .hero::before {
  background:
    linear-gradient(90deg, rgba(5,7,11,.94) 0%, rgba(5,7,11,.78) 50%, rgba(5,7,11,.36) 100%),
    url("sheep.jpg") center/cover no-repeat;
  background:
    linear-gradient(90deg, rgba(5,7,11,.94) 0%, rgba(5,7,11,.78) 50%, rgba(5,7,11,.36) 100%),
    image-set(url("sheep.webp") type("image/webp"), url("sheep.jpg") type("image/jpeg")) center/cover no-repeat;
}
.page-pgraph .intro { max-width: 64ch; }
.page-pgraph h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.12; }
.page-pgraph .lede { margin: 0 0 12px; max-width: none; color: rgba(233,238,247,.88); font-size: 1.08rem; }
.page-pgraph .cta-row { margin-top: 18px; }
.page-pgraph .btn { min-width: 200px; }
.page-pgraph .card p { color: rgba(233,238,247,.80); }
.page-pgraph .card p + p { margin-top: 8px; }
.page-pgraph footer { margin-top: 34px; }

/* ================= Narrow screens ================= */
@media (max-width: 900px) {
  .grid, .grid.two, .grid.four, .offer .cols,
  .page-products .grid { grid-template-columns: 1fr; }
  .btn, .cta-row { width: 100%; }

  .page-home .hero-inner { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 18px; }

  .page-press .hero-inner { grid-template-columns: 1fr; justify-items: center; }
  .page-press .hero-inner > div:last-child { width: 100%; }
  .cover-frame { max-width: 240px; }

  .page-pgraph .hero-inner { padding: 32px 18px; }
}
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .book { grid-template-columns: 1fr; }
  .book .cover-frame { max-width: 180px; }
}

/* 404 page */
.notfound { padding: 44px 28px; }
.notfound .kicker { color: rgba(111,231,255,.92); font-size: .78rem; }
.notfound .lede { margin-bottom: 4px; }
