:root {
  --bg: #0b0e13;
  --bg-deep: #090c11;
  --panel: #111822;
  --panel-2: #0f151e;
  --ink: #eef3fb;
  --muted: #a9b4c6;
  --accent: #66f3da;
  --accent-dim: rgba(102, 243, 218, 0.18);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius-sm: 10px;
  --radius-md: 16px;

  --space-1: clamp(0.5rem, 0.8vw, 0.75rem);
  --space-2: clamp(0.8rem, 1.1vw, 1rem);
  --space-3: clamp(1.1rem, 1.8vw, 1.5rem);
  --space-4: clamp(1.6rem, 2.4vw, 2.2rem);
  --space-5: clamp(2.4rem, 3.4vw, 3.4rem);

  --max-width: 1100px;

  --serif: "Newsreader", "Iowan Old Style", "Georgia", serif;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100%;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: -10%;
  background-image:
    linear-gradient(120deg, rgba(102, 243, 218, 0.08), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: cover, 180px 180px, 180px 180px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

main,
header,
footer,
section {
  position: relative;
  z-index: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

li {
  margin-bottom: 0.4rem;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--accent);
  color: #06110f;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  z-index: 20;
}

.skip-link:focus {
  left: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
}

.section:first-of-type {
  border-top: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0 0 0.8rem;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
}

h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
}

.subhead {
  font-size: 1rem;
  max-width: 36rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #071015;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  color: var(--accent);
  box-shadow: none;
}

.link {
  color: var(--accent);
  font-weight: 600;
  position: relative;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.6);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.link:hover::after {
  transform: scaleX(1);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 14, 19, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  position: relative;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand__label {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.brand__sub {
  font-size: 0.95rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.95rem;
}

.nav a {
  position: relative;
  padding: 0.2rem 0;
  color: var(--muted);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

.nav a:hover::after {
  transform: scaleX(1);
}

.menu-btn {
  display: none;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-covers {
  display: flex;
  justify-content: center;
}

.cover-stack {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 2 / 3;
}

.cover {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--panel);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover--one {
  transform: translate(-16%, -8%) rotate(-6deg);
  z-index: 1;
}

.cover--two {
  transform: translate(0, 0) rotate(0deg);
  z-index: 2;
}

.cover--three {
  transform: translate(16%, 10%) rotate(6deg);
  z-index: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.book-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.book-card {
  display: grid;
  grid-template-columns: minmax(120px, 150px) 1fr;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(17, 24, 34, 0.9), rgba(12, 16, 22, 0.95));
}

.book-card__media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 2 / 3;
  background: var(--panel);
}

.book-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card__body p {
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.book-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4);
  align-items: start;
}

.about-side {
  display: grid;
  gap: var(--space-2);
}

.about-photo {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--panel);
  aspect-ratio: 3 / 4;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-panel {
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  padding: var(--space-2);
  background: rgba(17, 24, 34, 0.6);
}

.reviews .container {
  display: grid;
  gap: var(--space-3);
  max-width: 780px;
}

.quote {
  padding: var(--space-2);
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(102, 243, 218, 0.08), transparent 70%);
}

.quote__line {
  height: 1px;
  width: 3rem;
  background: var(--border-strong);
  margin-bottom: 0.7rem;
}

.quote blockquote {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.quote span {
  font-size: 0.85rem;
  color: var(--muted);
}

.newsletter-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-3);
  align-items: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-3);
  align-items: start;
}

.form {
  display: grid;
  gap: var(--space-2);
}

.newsletter .form {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.newsletter .form .status {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: rgba(169, 180, 198, 0.75);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.status {
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-3) 0 var(--space-4);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--muted);
}

.footer strong {
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-2) var(--space-3);
    background: rgba(11, 14, 19, 0.96);
    border-bottom: 1px solid var(--border);
    display: none;
  }

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

  .menu-btn {
    display: inline-flex;
  }

  .hero-grid,
  .about-grid,
  .newsletter-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .book-card__media {
    max-width: 240px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: var(--space-4) 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn,
  .menu-btn {
    width: 100%;
    justify-content: center;
  }

  .newsletter .form {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  body::before,
  body::after {
    opacity: 0.03;
  }
}
