/* Science Comics: Computers — site styles
   Typeface: Libre Caslon Text (Google Fonts)
   Notes: No inline styles in HTML; all presentation lives here. Responsive and
   lightweight.
*/

:root {
  --brand: #ff9f1c; /* accent pulled from cover yellows/oranges */
  --brand-ink: #1b1b1b;
  --nav-bg: #0e1a2a; /* deep blue header */
  --nav-ink: #ffffff;
  --ink: #121212;
  --muted: #5b5f6a;
  --paper: #fffdf8;
  --maxw: 1120px;
  --radius: 14px;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Libre Caslon Text", serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 18px;
}

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

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

/* Wrapper */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem;
}
.wrap.narrow {
  max-width: 800px;
}

/* Header / Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--nav-bg);
  color: var(--nav-ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.nav-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--nav-ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1rem;
}
.nav {
  margin-left: auto;
}
.nav-home {
  display: none;
}
.nav a {
  color: var(--nav-ink);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
}
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--nav-ink);
  border-radius: 8px;
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
}

/* Mobile nav */
@media (max-width: 880px) {
  .nav-container {
    justify-content: flex-start;
    position: relative;
  }
  .nav {
    margin-left: 0;
    position: static;
    flex: 1 1 auto;
  }
  .nav-home {
    display: block;
  }
  .nav ul {
    display: none;
  }
  .nav.open ul {
    display: flex;
  }
  .nav ul {
    position: absolute;
    right: 0;
    left: 0;
    top: calc(100% + 0.5rem);
    flex-direction: column;
    background: var(--nav-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.5rem;
    gap: 0.25rem;
    z-index: 999;
  }
  .hamburger {
    display: inline-flex;
    order: -1;
  }
  .brand {
    margin-left: 0.5rem;
  }
}

/* Hero */
.hero {
  background: linear-gradient(180deg, #fffdf8, #f6f7fb);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0;
}
.hero-copy {
  padding-left: 1.5rem;
}
.hero-copy h1 {
  margin: 0 0 0.25rem 0;
  font-size: clamp(2rem, 2.8vw + 1rem, 3.2rem);
  line-height: 1.1;
}
.hero-copy .subtitle {
  margin: 0 0 1rem 0;
  font-weight: 700;
  color: var(--muted);
}
.hero-copy .tagline {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}
.hero-art img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: var(--brand-ink);
  transition:
    transform 0.06s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.btn.primary {
  background: var(--brand);
  border-color: #e88f05;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.soon {
  opacity: 0.8;
  font-style: italic;
}

/* Sections */
.blurb {
  padding: 2rem 0 1rem;
}
.features {
  padding: 2rem 0 3rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card,
.credit-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card h3,
.credit-card h3 {
  margin-top: 0.25rem;
}
a.arrow {
  text-decoration: none;
}
.card > p:last-of-type {
  margin-top: auto;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-art {
    grid-row: 1;
  }
  .hero-copy {
    padding-left: 1rem;
    padding-right: 1rem;
    grid-row: 2;
    margin-top: 1.5rem;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Buy page */
.formats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1rem;
}
.format {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}
.format h2 {
  margin-top: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.format .price {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 700;
}
.retailers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem 0.75rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.retailers li a {
  display: block;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafafa;
}
.retailers li a:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}
.note {
  color: var(--muted);
  margin-top: 1rem;
}

/* Learn page */
.learn-section,
.teach-section {
  margin: 2rem 0;
}
.checklist {
  padding-left: 1.1rem;
}
.checklist li {
  margin: 0.3rem 0;
}

/* News */
.news-intro {
  color: var(--muted);
}
.news-list {
  margin: 1.5rem 0 3rem;
  display: grid;
  gap: 1.5rem;
}
.news-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}
.news-card h2 a {
  color: #0645ad;
  text-decoration: none;
}
.news-card h2 a:hover {
  text-decoration: underline;
}
.news-card .meta {
  color: var(--muted);
  margin-top: -0.4rem;
  font-size: 0.9rem;
}
.news-post {
  margin: 2rem 0 4rem;
}
.news-post .news-meta {
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 1rem;
}
.news-feed {
  margin: -1rem 0 0;
}
.news-feed a {
  color: #0645ad;
  text-decoration: none;
  font-weight: 600;
}
.news-feed a:hover {
  text-decoration: underline;
}
.news-empty {
  color: var(--muted);
  margin-top: 2rem;
}

/* About */
.creator-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 1.5rem 0 2rem;
}
.creator {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.creator-photo {
  flex: none;
}
.creator-photo img {
  width: 220px;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.creator-copy h3 {
  margin: 0;
}
.creator-role {
  margin: 0.2rem 0 1rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}
.creator-copy p {
  margin: 0 0 1rem;
}
.creator-copy p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .creator {
    flex-direction: column;
    text-align: left;
  }
  .creator-photo img {
    width: 100%;
    max-width: 240px;
  }
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  background: #0f1323;
  color: #cfd3d8;
  padding: 1.5rem 0;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
}

/* Dark mode preference intentionally disabled to keep consistent palette. */
