/* ============================================================
   Ken Emilio — author site
   The Terror of Israel
   Hand-written CSS. No framework, no build step.
   ============================================================ */

/* ---------- Fonts (self-hosted, latin subset, variable) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-800-900-latin.woff2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-400-600-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --obsidian: #0b0b0c;
  --basalt: #17171b;
  --cinder: #2a2a2f;
  --chalk: #f1efea;
  --ash: #9a9a94;
  --brass: #b08d57;
  --brass-bright: #c9a86f;

  --shell: 1200px;
  --measure: 68ch;

  --font-display: "Archivo", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: 0.8125rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: 2.1875rem;
  --step-4: 2.75rem;
  --step-5: 3.4375rem;
  --step-hero: clamp(2.75rem, 9vw, 7.25rem);

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --focus: 2px solid var(--brass-bright);
}

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

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

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ---------- Base ---------- */
body {
  min-height: 100%;
  background-color: var(--obsidian);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: var(--step-4);
}

h3 {
  font-size: var(--step-1);
  font-weight: 800;
  line-height: 1.15;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--chalk);
  text-decoration-color: var(--brass);
  text-underline-offset: 0.18em;
}

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

strong {
  font-weight: 600;
  color: var(--chalk);
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Utilities ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--chalk);
  max-width: 54ch;
}

.prose {
  max-width: var(--measure);
}

.prose p + p {
  margin-top: var(--space-s);
}

section[id] {
  scroll-margin-top: 6.5rem;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-style: italic;
  color: var(--ash);
  margin-bottom: var(--space-s);
}

h1 + .lead {
  margin-top: var(--space-m);
}

.lead + p {
  margin-top: var(--space-l);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -100%;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--brass);
  color: var(--obsidian);
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-s);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--obsidian);
  background: color-mix(in srgb, var(--obsidian) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cinder);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: 4.25rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-1);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--chalk);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--brass-bright);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1rem, 3vw, 2.25rem);
  list-style: none;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: var(--step-0);
  text-decoration: none;
  color: var(--ash);
}

.site-nav a:hover {
  color: var(--chalk);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.65rem;
  background: transparent;
  border: 1px solid var(--cinder);
  border-radius: 2px;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--chalk);
  transition: transform 150ms ease, opacity 150ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-0);
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.btn--primary {
  background: var(--brass);
  color: var(--obsidian);
  border-color: var(--brass);
}

.btn--primary:hover {
  background: var(--brass-bright);
  border-color: var(--brass-bright);
  color: var(--obsidian);
}

.btn--primary:focus-visible {
  outline-color: var(--chalk);
}

.btn--ghost {
  background: transparent;
  color: var(--chalk);
  border-color: var(--cinder);
}

.btn--ghost:hover {
  border-color: var(--brass);
  color: var(--brass-bright);
}

.btn[aria-disabled="true"] {
  cursor: pointer;
}

/* ---------- Bands ---------- */
.band {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.band--basalt {
  background: var(--basalt);
  border-top: 1px solid var(--cinder);
  border-bottom: 1px solid var(--cinder);
}

.section-head {
  margin-bottom: var(--space-xl);
  max-width: 60ch;
}

.section-head p {
  margin-top: var(--space-s);
  color: var(--ash);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 9vw, 8rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 78% 12%, rgba(176, 141, 87, 0.16), transparent 70%),
    radial-gradient(45% 45% at 8% 90%, rgba(176, 141, 87, 0.07), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero__title {
  font-size: var(--step-hero);
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin-top: var(--space-s);
}

.hero__title .hero__title-line {
  display: block;
}

.hero__subtitle {
  margin-top: var(--space-m);
  max-width: 34ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1.25;
  color: var(--chalk);
}

.hero__epigraph {
  margin-top: var(--space-l);
  padding-left: var(--space-m);
  border-left: 2px solid var(--brass);
  max-width: 46ch;
}

.hero__epigraph p {
  font-style: italic;
  color: var(--ash);
  font-size: var(--step-0);
}

.hero__epigraph cite {
  display: block;
  margin-top: var(--space-2xs);
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--brass);
}

.hero__actions {
  margin-top: var(--space-l);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-m);
}

.hero__cover {
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
}

.hero__cover picture {
  display: block;
}

.hero__cover img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.hero__status {
  font-size: var(--step--1);
  color: var(--ash);
}

/* ---------- Book ---------- */
.book-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.book-cover {
  width: 100%;
  max-width: 22rem;
  height: auto;
  border-radius: 2px;
}

.book-info h2 {
  margin-bottom: var(--space-s);
}

.book-info .book-subtitle {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  color: var(--brass);
  margin-bottom: var(--space-m);
  line-height: 1.25;
}

.book-info .btn {
  margin-top: var(--space-m);
}

.themes {
  margin-top: var(--space-l);
}

.themes ul {
  list-style: none;
  padding: 0;
}

.themes h3 {
  margin-bottom: var(--space-m);
}

.themes li {
  position: relative;
  padding-left: var(--space-m);
  margin-bottom: var(--space-m);
}

.themes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--brass);
  transform: rotate(45deg);
}

.themes li strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  margin-bottom: 0.15rem;
}

.themes li span {
  color: var(--ash);
}

.pullquote {
  margin-top: var(--space-2xl);
  padding: clamp(1.75rem, 5vw, 3rem) clamp(1.5rem, 5vw, 3.5rem);
  background: var(--obsidian);
  border-left: 3px solid var(--brass);
}

.pullquote blockquote {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.pullquote cite {
  display: block;
  margin-top: var(--space-m);
  font-style: normal;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ash);
}

/* ---------- Authors ---------- */
.authors-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.author-portrait {
  width: 100%;
  max-width: 24rem;
  height: auto;
  border: 1px solid var(--cinder);
  border-radius: 2px;
}

.author-block + .author-block {
  margin-top: var(--space-xl);
}

.author-block h3 {
  font-size: var(--step-2);
  margin-bottom: var(--space-2xs);
}

.author-role {
  font-style: italic;
  color: var(--brass);
  margin-bottom: var(--space-s);
}

/* ---------- Works list ---------- */
.works-heading {
  margin-top: var(--space-2xl);
  font-size: var(--step-2);
}

.works {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: var(--space-l);
  border-top: 1px solid var(--cinder);
}

.works li {
  border-bottom: 1px solid var(--cinder);
}

.works a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
  padding-block: var(--space-m);
  text-decoration: none;
}

.works .work-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  color: var(--chalk);
}

.works a:hover .work-title {
  color: var(--brass-bright);
}

.works .work-meta {
  font-size: var(--step--1);
  color: var(--ash);
}

/* ---------- Reviews ---------- */
.reviews {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl) var(--space-2xl);
}

.review {
  position: relative;
  padding-top: var(--space-l);
}

.review::before {
  content: "\201C";
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.25rem;
  line-height: 0.55;
  color: var(--brass);
  margin-bottom: var(--space-2xs);
}

.review__quote {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.review__attribution {
  margin-top: var(--space-m);
  display: grid;
  gap: 0.15rem;
  font-size: var(--step-0);
  color: var(--ash);
}

.review__attribution strong {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--chalk);
}

.review__attribution .ph {
  justify-self: start;
  margin-top: var(--space-2xs);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
}

.contact-block h3 {
  font-size: var(--step-2);
  margin-bottom: var(--space-s);
}

.contact-block p {
  color: var(--ash);
  max-width: 44ch;
}

.contact-block .btn {
  margin-top: var(--space-m);
}

.contact-block .ph-note {
  margin-top: var(--space-s);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--basalt);
  border-top: 1px solid var(--cinder);
  padding-block: var(--space-xl);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-m);
}

.site-footer a {
  color: var(--chalk);
  text-decoration-color: var(--brass);
}

.site-footer p {
  color: var(--ash);
  font-size: var(--step--1);
  max-width: 52ch;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  align-items: center;
}

/* ---------- Placeholder marker ---------- */
.ph {
  display: inline-block;
  padding: 0.15em 0.5em;
  border: 1px dashed var(--cinder);
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
  vertical-align: middle;
}

.ph-note {
  font-size: var(--step--1);
  color: var(--ash);
  margin-top: var(--space-2xs);
}

/* ---------- Small screens: burger nav ---------- */
@media (max-width: 47.99rem) {
  .site-header__inner {
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-m);
    padding-block: var(--space-s);
    min-height: 0;
  }

  .brand {
    margin-right: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
  }

  .site-nav li {
    border-top: 1px solid var(--cinder);
  }

  .site-nav a {
    display: block;
    padding-block: var(--space-s);
    font-size: var(--step-1);
  }
}

/* Mobile: lead the hero with the cover, above the title and text */
@media (max-width: 47.99rem) {
  .hero__cover {
    order: -1;
  }
}

/* ---------- Larger screens ---------- */
@media (min-width: 48rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .book-grid {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  }

  .authors-grid {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  }

  .reviews {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}