/* Jabber Mill Publishing / The Exiled
   Palette follows the Book 1 cover brief: emerald is the only saturated
   color; everything else is desaturated grey, rust, dust, and dark sky. */

:root {
  --sky: #1c2124;        /* page background: dark, cool, slightly blue */
  --sky-2: #242a2e;      /* raised surfaces */
  --sky-3: #2e353a;      /* borders, rules */
  --dust: #d3c9b3;       /* primary text */
  --dust-2: #9c9484;     /* secondary text */
  --grey: #6f7a80;       /* muted labels */
  --rust: #9a6242;       /* secondary accent, never saturated */
  --emerald: #12b823;    /* the one saturated color #2ecc86*/
  --emerald-dim: rgba(46, 204, 134, 0.16);

  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-system: "IBM Plex Mono", "Courier New", monospace;

  --measure: 62ch;
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sky);
  color: var(--dust);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
}

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

a {
  color: var(--dust);
  text-decoration: underline;
  text-decoration-color: var(--rust);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--emerald); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 0.4em;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(44px, 7vw, 84px); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: clamp(22px, 2.6vw, 28px); }

p { margin: 0 0 1em; max-width: var(--measure); }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* Header ------------------------------------------------------------ */

.site-header {
  padding: 22px 0;
  border-bottom: 1px solid var(--sky-3);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-decoration: none;
  color: var(--dust);
}
.brand img { height: 44px; width: auto; }
.brand span { color: var(--grey); font-weight: 400; margin-left: -6px; }

.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a {
  text-decoration: none;
  color: var(--dust-2);
  font-size: 17px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--dust); }
.nav a[aria-current="page"] {
  border-bottom: 2px solid var(--emerald);
  padding-bottom: 2px;
}

/* Hero -------------------------------------------------------------- */

.hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(32px, 5vw, 64px);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.hero-copy { max-width: 640px; }
.kicker {
  font-family: var(--font-system);
  font-size: 15px;
  color: var(--emerald);
  margin: 0 0 14px;
}
.hero h1 { margin-bottom: 0.15em; }
.byline {
  font-size: 20px;
  color: var(--dust-2);
  margin-bottom: 1.4em;
}
.lede { font-size: 21px; line-height: 1.5; }

/* Cover ------------------------------------------------------------- */

.cover {
  aspect-ratio: 2 / 3;
  width: 100%;
  background: var(--sky-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-small { max-width: 220px; }

/* Buttons ----------------------------------------------------------- */

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 1.4em 0 0;
}
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 12px 22px;
  text-decoration: none;
  border: 1px solid var(--dust-2);
  color: var(--dust);
  background: transparent;
  cursor: pointer;
}
.btn:hover { border-color: var(--dust); }
.btn-primary {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #10231a;
}
.btn-primary:hover { background: #3ad893; border-color: #3ad893; }

/* Horizon line: the corruption sits low and spreads sideways. ------- */

.horizon {
  height: 2px;
  margin: clamp(24px, 4vw, 48px) 0;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--emerald) 18%,
    var(--emerald) 55%,
    transparent 100%);
  box-shadow: 0 0 24px 2px rgba(46, 204, 134, 0.45),
              0 0 80px 8px rgba(46, 204, 134, 0.18);
}

/* System notification block ----------------------------------------- */

.system {
  font-family: var(--font-system);
  font-size: 15px;
  line-height: 1.7;
  color: var(--dust-2);
  background: var(--sky-2);
  border-left: 2px solid var(--emerald);
  padding: 16px 20px;
  margin: 0;
  max-width: 520px;
  white-space: pre-line;
}
.system .redacted {
  color: var(--emerald);
}

/* Sections ---------------------------------------------------------- */

.section { padding: clamp(32px, 5vw, 64px) 0; }
.section + .section { border-top: 1px solid var(--sky-3); }
.section-head { margin-bottom: 1.2em; }
.section-head p { color: var(--dust-2); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

/* Book row ---------------------------------------------------------- */

.book-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.book-row h3 { margin-bottom: 0.2em; }
.book-meta {
  color: var(--dust-2);
  font-size: 16px;
  margin-bottom: 1em;
}
.book-row.upcoming .cover {
  display: grid;
  place-items: center;
  color: var(--grey);
  font-family: var(--font-system);
  font-size: 14px;
  border: 1px dashed var(--sky-3);
}

/* Newsletter -------------------------------------------------------- */

.newsletter {
  background: var(--sky-2);
  padding: clamp(28px, 4vw, 48px);
}
.newsletter h2 { margin-bottom: 0.3em; }
.newsletter p { color: var(--dust-2); }
.newsletter-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.2em;
}
.newsletter-form input[type="email"] {
  flex: 1 1 260px;
  font-family: var(--font-body);
  font-size: 18px;
  padding: 12px 14px;
  background: var(--sky);
  border: 1px solid var(--sky-3);
  color: var(--dust);
}
.newsletter-form input::placeholder { color: var(--grey); }
.fine { font-size: 15px; color: var(--grey); margin-top: 0.8em; }

/* Footer ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--sky-3);
  padding: 32px 0 48px;
  color: var(--grey);
  font-size: 15px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--dust-2); }

/* Responsive -------------------------------------------------------- */

@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .cover { max-width: 260px; }
  .two-col { grid-template-columns: 1fr; }
  .book-row { grid-template-columns: 1fr; }
  .book-row .cover { max-width: 200px; }
}

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

/* ===== Home-page hero, full-bleed (v2) ============================= */

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(28, 33, 36, 0.92); backdrop-filter: blur(6px); }
.nav-right { display: flex; align-items: center; gap: 22px; }
.social { display: flex; gap: 14px; padding-left: 22px; border-left: 1px solid var(--sky-3); }
.social a { color: var(--dust-2); display: inline-flex; }
.social a:hover { color: var(--dust); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

.hero-full {
  position: relative;
  min-height: min(92vh, 900px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(40px, 6vw, 80px) 0;
}
.hero-full .hero-bg {
  position: absolute; inset: 0; z-index: 0;
  /* Replace with a wide landscape crop of the cover art or commissioned key art:
     images/hero-bg.jpg, ~2400 x 1350 px. Until then the cover is blurred as a backdrop. */
  background: url("/images/cover-placeholder.svg") center 35% / cover no-repeat;
  filter: blur(18px) saturate(0.6) brightness(0.55);
  transform: scale(1.12);
}
.hero-full .hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28,33,36,0.35) 0%, rgba(28,33,36,0.15) 50%, rgba(28,33,36,0.95) 100%),
    radial-gradient(60% 40% at 50% 100%, rgba(46,204,134,0.18), transparent 70%);
}
.hero-full .wrap {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
}
.hero-full .kicker { color: var(--dust-2); font-family: var(--font-body); font-size: 17px; letter-spacing: 0.04em; }
.hero-full h1 { font-size: clamp(52px, 8vw, 104px); }
.tagline { font-size: 20px; color: var(--dust-2); margin-bottom: 1.6em; }

.cover-3d {
  perspective: 1400px;
}
.cover-3d .cover {
  transform: rotateY(-14deg) rotateX(2deg);
  transform-origin: center;
  box-shadow:
    -30px 40px 80px -20px rgba(0,0,0,0.85),
    0 0 0 1px rgba(255,255,255,0.04);
}
.cover-3d .cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(255,255,255,0.10) 0%, transparent 35%, rgba(0,0,0,0.25) 100%);
  pointer-events: none;
}
.cover { position: relative; }

/* Book detail block, like the scroll-down section */
.book-detail {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}
.book-detail .status { color: var(--emerald); font-family: var(--font-system); font-size: 14px; margin: 0 0 8px; }
.book-detail .series-line { color: var(--dust-2); margin: 0 0 6px; }
.book-detail h2 { font-size: clamp(40px, 5vw, 64px); margin-bottom: 0.3em; }
.book-detail .rule { width: 72px; height: 1px; background: var(--rust); margin: 0 0 1.4em; }
.book-detail .hook { font-size: 21px; font-weight: 500; color: var(--dust); }
.book-detail .pull { font-family: var(--font-system); font-size: 15px; color: var(--dust-2); margin: 1.4em 0 0; }

@media (max-width: 760px) {
  .hero-full .wrap { grid-template-columns: 1fr; }
  .hero-full .cover-3d { order: -1; max-width: 240px; margin: 0 auto; }
  .cover-3d .cover { transform: none; }
  .book-detail { grid-template-columns: 1fr; }
  .book-detail .cover { max-width: 220px; }
  .social { padding-left: 0; border: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .cover-3d .cover { transition: transform 0.5s ease; }
  .cover-3d:hover .cover { transform: rotateY(-6deg) rotateX(1deg); }
}
