/* Scott Morgan Books — original static storefront. Not a WordPress theme. */

:root {
  --bg: #09090b;
  --bg-raise: #121216;
  --bg-panel: #17171c;
  --bg-soft: #1e1e25;
  --ink: #f3eee6;
  --ink-dim: #c8c0b4;
  --muted: #8f877c;
  --line: rgba(243, 238, 230, 0.1);
  --line-strong: rgba(201, 164, 108, 0.35);
  --brass: #c9a46c;
  --brass-bright: #e4c48a;
  --ember: #d4784a;
  --ice: #8aa4b8;
  --danger: #b23b3b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --header-h: 76px;
  --max: 1120px;
  --max-wide: 1240px;
  --font-ui: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(201, 164, 108, 0.08), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(138, 164, 184, 0.06), transparent 45%),
    var(--bg);
}

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

a {
  color: var(--brass-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.7rem;
  background: var(--brass);
  color: #1a140c;
  padding: 0.4rem 0.8rem;
  z-index: 80;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.wrap-wide {
  width: min(100% - 2.5rem, var(--max-wide));
  margin-inline: auto;
}

.kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.55rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.wordmark {
  text-decoration: none;
  color: inherit;
  display: grid;
  line-height: 1;
  gap: 0.22rem;
  flex-shrink: 0;
}

.wordmark:hover {
  color: inherit;
}

.wordmark-name {
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.18em;
  font-size: 0.92rem;
}

.wordmark-name span {
  color: #8a8680;
  font-weight: 400;
}

.wordmark-sub {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  color: var(--brass);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--brass);
  color: var(--ink);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  position: relative;
  border-radius: 1px;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.35rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav .has-sub:hover > a {
  color: var(--ink);
}

.site-nav a.is-active {
  color: var(--brass-bright);
}

.has-sub {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
}

.subnav {
  display: none;
  position: absolute;
  top: 100%;
  left: -1rem;
  min-width: 16.5rem;
  background: #16161b;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0;
  box-shadow: var(--shadow);
  z-index: 50;
}

.subnav::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 1.25rem;
}

.has-sub:hover .subnav,
.has-sub:focus-within .subnav {
  display: block;
}

.subnav a {
  display: block;
  padding: 0.5rem 1rem;
  letter-spacing: 0.08em;
}

.nav-wip {
  color: var(--brass) !important;
  border: 1px solid var(--line-strong);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.16em;
}

.nav-wip:hover {
  background: rgba(201, 164, 108, 0.12);
}

/* Hero */

.hero {
  position: relative;
  min-height: min(72vh, 640px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 11, 0.18) 0%, rgba(9, 9, 11, 0.55) 48%, rgba(9, 9, 11, 0.96) 100%),
    linear-gradient(90deg, rgba(9, 9, 11, 0.45), transparent 40%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max-wide));
  margin: 0 auto;
  padding: 7rem 0 3.2rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  max-width: 14ch;
  margin-bottom: 0.4rem;
}

.hero .lede {
  font-family: var(--font-ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin: 0;
}

/* Book feature */

.section {
  padding: 4.5rem 0;
}

.section-split {
  border-top: 1px solid var(--line);
}

.book-feature {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 3rem;
  align-items: start;
}

.cover-frame {
  position: relative;
}

.cover-frame img,
img.cover {
  width: 100%;
  border-radius: 4px 10px 10px 4px;
  box-shadow: var(--shadow);
  background: #111;
}

a.cover-link {
  display: block;
  text-decoration: none;
}

a.cover-link:hover img {
  transform: translateY(-4px);
  transition: transform 0.25s ease;
}

.cover-frame img,
a.cover-link img {
  transition: transform 0.25s ease;
}

.book-copy h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 0.35rem;
}

.tagline {
  font-style: italic;
  color: var(--brass-bright);
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.4rem 0 0.6rem;
  align-items: center;
}

.btn {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--brass);
  color: #1a140c;
  background: var(--brass);
  display: inline-block;
}

.btn:hover {
  background: var(--brass-bright);
  color: #1a140c;
}

.btn-ghost {
  background: transparent;
  color: var(--brass-bright);
}

.btn-ghost:hover {
  background: rgba(201, 164, 108, 0.12);
  color: var(--ink);
}

.btn-off {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
  pointer-events: none;
}

.note {
  font-size: 0.92rem;
  color: var(--muted);
  font-style: italic;
}

.status-pill {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--brass);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* Cover shelf */

.shelf {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
}

.shelf-card {
  text-decoration: none;
  color: inherit;
}

.shelf-card img {
  width: 100%;
  border-radius: 4px 8px 8px 4px;
  box-shadow: var(--shadow);
  margin-bottom: 0.7rem;
}

.shelf-card h3 {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.shelf-card p {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.shelf-card:hover img {
  transform: translateY(-5px);
}

/* Series cards */

.series-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.series-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.series-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.series-card .pad {
  padding: 1.2rem 1.2rem 1.4rem;
}

.series-card h2 {
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
}

.series-card p {
  color: var(--ink-dim);
  font-size: 0.98rem;
}

.series-card:hover {
  border-color: var(--line-strong);
}

/* Book rows on series pages */

.book-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.2rem;
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.book-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.page-hero {
  padding: 3.2rem 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.prose {
  max-width: 68ch;
}

.prose.wide {
  max-width: 78ch;
}

.prose h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
}

.prose ul {
  padding-left: 1.1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0 1.6rem;
  font-size: 0.95rem;
}

.legal th,
.legal td {
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  vertical-align: top;
  text-align: left;
}

.legal th {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  background: var(--bg-raise);
}

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.6rem;
  align-items: start;
}

.portrait {
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
}

.cta-band {
  background: linear-gradient(180deg, rgba(201, 164, 108, 0.08), transparent 70%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 4rem 0;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.cta-band p {
  max-width: 46ch;
  margin: 0.4rem auto 1.4rem;
  color: var(--ink-dim);
}

.ml-box {
  max-width: 640px;
  margin: 1.5rem auto 0;
  background: #f4efe6;
  color: #1a140c;
  border-radius: 12px;
  padding: 1rem;
}

.banner-art {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.2rem 0 1.6rem;
  box-shadow: var(--shadow);
}

/* Resume */

.resume {
  background: #f7f4ee;
  color: #222;
  border-radius: 12px;
  padding: 2rem 1.4rem 2.2rem;
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
}

.resume h1,
.resume h2 {
  color: #2a3d66;
  text-align: center;
  letter-spacing: 0.18em;
  font-family: var(--font-ui);
  font-weight: 500;
  text-transform: uppercase;
}

.resume h1 {
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: #2a3d66;
}

.resume h2 {
  font-size: 0.82rem;
  border-top: 1px solid #c9c4bb;
  border-bottom: 1px solid #c9c4bb;
  padding: 0.35rem 0;
  margin: 1.4rem 0 0.9rem;
}

.resume p,
.resume li {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  line-height: 1.45;
  color: #2b2b2b;
}

.resume .job {
  margin-bottom: 0.95rem;
}

.resume .job strong {
  color: #2a3d66;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.resume .meta {
  text-align: center;
  font-size: 0.82rem;
  color: #444;
  margin-top: 1.4rem;
}

.resume a {
  color: #2a3d66;
}

.resume-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 0 0 1.4rem;
}

.resume-scan {
  margin-top: 2rem;
  background: var(--bg-panel);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.resume-scan img {
  width: 100%;
  background: #fff;
}

/* Journal */

.journal-list {
  display: grid;
  gap: 1.2rem;
}

.journal-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.2rem;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.journal-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 140px;
}

.journal-card .pad {
  padding: 1.1rem 1.1rem 1.2rem 0;
}

.journal-figure {
  margin: 1.4rem 0;
}

.journal-figure img {
  width: 100%;
  border-radius: 8px;
}

.byline {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 2.6rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-inner {
  width: min(100% - 2.5rem, var(--max-wide));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--ink-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brass-bright);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

/* Storm section tint */

.tint-storm {
  background:
    radial-gradient(900px 400px at 80% 10%, rgba(138, 164, 184, 0.12), transparent 55%),
    var(--bg);
}

.tint-drift {
  background:
    radial-gradient(900px 420px at 12% 20%, rgba(212, 120, 74, 0.12), transparent 55%),
    var(--bg);
}

/* Mobile */

@media (max-width: 900px) {
  .book-feature,
  .book-row,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .book-feature .cover-frame,
  .book-row .cover-frame {
    max-width: 280px;
  }

  .shelf {
    grid-template-columns: repeat(3, 1fr);
  }

  .series-grid {
    grid-template-columns: 1fr;
  }

  .journal-card {
    grid-template-columns: 1fr;
  }

  .journal-card .pad {
    padding: 0 1.1rem 1.2rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #101014;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 1.1rem 1.1rem;
    gap: 0;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav > a,
  .has-sub > a {
    padding: 0.75rem 0.2rem;
    border-bottom: 1px solid var(--line);
  }

  .subnav::before {
    display: none;
  }

  .subnav {
    position: static;
    display: block;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 0.4rem 0.8rem;
    min-width: 0;
  }

  .nav-wip {
    margin-top: 0.8rem;
    align-self: flex-start;
  }

  /* Phone / tablet: show the full triple-genre banner, like the signup page.
     Desktop keeps the tall cropped hero. */
  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-media {
    position: relative;
    inset: auto;
  }

  .hero-media img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .hero::after {
    display: none;
  }

  .hero-copy {
    padding: 1.5rem 0 2rem;
  }
}

@media (max-width: 760px) {
  .shelf {
    grid-template-columns: repeat(2, 1fr);
  }

  .wrap,
  .wrap-wide,
  .hero-copy,
  .header-inner,
  .footer-inner {
    width: min(100% - 1.5rem, var(--max-wide));
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .shelf {
    grid-template-columns: 1fr 1fr;
  }

  .formats .btn,
  .formats .btn-off {
    width: 100%;
    text-align: center;
  }
}
