@font-face {
  font-family: "Oswald";
  src: url("./fonts/oswald.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
}

@font-face {
  font-family: "Lora";
  src: url("./fonts/lora-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Lora";
  src: url("./fonts/lora-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #111316;
  --paper: #f5f0e6;
  --paper-deep: #e8dfcf;
  --white: #fffdf8;
  --acid: #d6f335;
  --orange: #ff5b2e;
  --sky: #69c5d2;
  --muted: #63605a;
  --rule: rgba(17, 19, 22, 0.18);
  --shadow: 0 28px 60px rgba(8, 9, 11, 0.22);
  --page: min(1180px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Lora", Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(17, 19, 22, 0.075) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  content: "";
  pointer-events: none;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--rule);
  background: rgba(245, 240, 230, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: var(--page);
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--acid);
  font-family: "Oswald", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  transform: rotate(-2deg);
}

.brand-name {
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  position: relative;
  font-family: "Oswald", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 3px;
  background: var(--orange);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 700 0.85rem/1 "Oswald", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: "Oswald", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 4px;
  background: var(--orange);
  content: "";
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Oswald", Impact, sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(3.8rem, 9.2vw, 8.3rem);
}

h2 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

h3 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.display-accent {
  color: var(--orange);
}

.lead {
  max-width: 680px;
  margin: 26px 0 0;
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  background: var(--acid);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  font-family: "Oswald", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(3px, 3px);
}

.button--dark {
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--orange);
  color: var(--white);
}

.button--plain {
  background: transparent;
  box-shadow: none;
}

.button--plain:hover {
  box-shadow: none;
  transform: none;
}

.arrow {
  font-size: 1.25em;
  line-height: 0;
}

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 690px;
  border-bottom: 2px solid var(--ink);
  background-color: #292d31;
  background-image: linear-gradient(rgba(17, 19, 22, 0.12), rgba(17, 19, 22, 0.12)), url("./images/home-circuit-background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: var(--page);
  min-height: 690px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.78fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
  padding: 72px 0 84px;
}

.hero-copy {
  max-width: 710px;
}

.hero-copy .button--plain {
  color: var(--white);
  border-color: rgba(255, 253, 248, 0.65);
}

.hero-copy .eyebrow::before {
  background: var(--acid);
}

.hero-copy h1 {
  max-width: 790px;
}

.hero-copy .lead {
  color: rgba(255, 253, 248, 0.78);
}

.cover-stage {
  position: relative;
  height: 520px;
}

.cover-stage img {
  position: absolute;
  width: min(250px, 55%);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.cover-stage img:nth-child(1) {
  top: 12%;
  left: 0;
  transform: rotate(-8deg);
}

.cover-stage img:nth-child(2) {
  top: 0;
  right: 4%;
  z-index: 3;
  transform: rotate(3deg);
}

.cover-stage img:nth-child(3) {
  right: 13%;
  bottom: 0;
  z-index: 2;
  transform: rotate(10deg);
}

.section {
  padding: clamp(78px, 10vw, 132px) 0;
}

.section-inner {
  width: var(--page);
  margin: 0 auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(50px, 10vw, 140px);
  align-items: start;
}

.intro-copy {
  max-width: 730px;
  font-size: clamp(1.16rem, 2vw, 1.55rem);
  line-height: 1.55;
}

.intro-copy p:first-child {
  margin-top: 0;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.featured-author {
  background: var(--orange);
  color: var(--ink);
}

.author-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(48px, 8vw, 108px);
  align-items: center;
}

.portrait-wrap {
  position: relative;
  padding: 0 28px 28px 0;
}

.portrait-wrap::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  border: 3px solid var(--ink);
  background: var(--acid);
  content: "";
}

.portrait-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06);
}

.author-copy p {
  max-width: 680px;
  font-size: 1.08rem;
}

.author-copy .eyebrow::before {
  background: var(--ink);
}

.latest {
  background: var(--paper-deep);
}

.latest-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
}

.latest-cover {
  width: min(100%, 390px);
  margin: 0 auto;
  border: 2px solid var(--ink);
  box-shadow: 18px 18px 0 var(--orange);
  transform: rotate(-2deg);
}

.book-number {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 10px;
  background: var(--ink);
  color: var(--white);
  font-family: "Oswald", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.latest-copy p {
  max-width: 680px;
  font-size: 1.06rem;
}

.quote-band {
  background: var(--ink);
  color: var(--white);
}

.quote-band blockquote {
  max-width: 980px;
  margin: 0 auto;
  font-family: "Lora", serif;
  font-size: clamp(1.4rem, 3.2vw, 2.5rem);
  font-style: italic;
  line-height: 1.38;
  text-align: center;
}

.quote-band cite {
  display: block;
  margin-top: 24px;
  color: var(--acid);
  font-family: "Oswald", sans-serif;
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.author-hero {
  border-bottom: 2px solid var(--ink);
  background: var(--sky);
}

.author-hero-inner {
  width: var(--page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: clamp(46px, 9vw, 124px);
  align-items: center;
  padding: clamp(72px, 9vw, 120px) 0;
}

.author-hero h1 {
  font-size: clamp(4.7rem, 10vw, 9rem);
}

.author-hero .portrait-wrap {
  padding: 0 24px 24px 0;
}

.book-list {
  display: grid;
  gap: clamp(80px, 12vw, 150px);
  margin-top: 70px;
}

.book-feature {
  display: grid;
  grid-template-columns: minmax(220px, 0.58fr) minmax(0, 1.42fr);
  gap: clamp(42px, 8vw, 100px);
  align-items: start;
}

.book-feature:nth-child(even) {
  grid-template-columns: minmax(0, 1.42fr) minmax(220px, 0.58fr);
}

.book-feature:nth-child(even) .book-cover-wrap {
  order: 2;
}

.book-cover-wrap {
  position: sticky;
  top: 28px;
}

.book-cover-wrap img {
  width: min(100%, 330px);
  margin: 0 auto;
  border: 2px solid var(--ink);
  box-shadow: 14px 14px 0 var(--acid);
}

.book-feature:nth-child(2) .book-cover-wrap img {
  box-shadow: 14px 14px 0 var(--acid);
}

.book-feature:nth-child(3) .book-cover-wrap img {
  box-shadow: 14px 14px 0 var(--orange);
}

.book-copy h3 {
  margin-bottom: 16px;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.book-tagline {
  margin: 0 0 26px;
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  font-style: italic;
}

.book-copy p:not(.book-tagline) {
  max-width: 730px;
}

.reviews {
  background: var(--ink);
  color: var(--white);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.review-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.045);
}

.review-card p {
  margin: 0;
  font-size: 1.05rem;
  font-style: italic;
}

.review-card cite {
  margin-top: 24px;
  color: var(--acid);
  font-family: "Oswald", sans-serif;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--paper);
}

.footer-inner {
  width: var(--page);
  min-height: 132px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner a {
  font-family: "Oswald", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  :root {
    --page: min(100% - 36px, 760px);
  }

  .hero-inner,
  .author-hero-inner {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-copy {
    max-width: 760px;
  }

  .cover-stage {
    width: min(100%, 620px);
    height: 470px;
    margin: -14px auto 0;
  }

  .cover-stage img {
    width: min(235px, 43%);
  }

  .intro-grid,
  .author-grid,
  .latest-grid {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    gap: 30px;
  }

  .portrait-wrap {
    width: min(100%, 560px);
  }

  .latest-cover {
    width: min(72vw, 360px);
  }

  .author-hero .portrait-wrap {
    width: min(100%, 480px);
  }

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

  .review-card {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .home-hero {
    /* Keep the right-hand circuit branches visible in a tall portrait crop. */
    background-position: 78% center;
    background-image: linear-gradient(rgba(17, 19, 22, 0.32), rgba(17, 19, 22, 0.18)), url("./images/home-circuit-background.png");
  }

  :root {
    --page: calc(100% - 32px);
  }

  .header-inner {
    min-height: 74px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 24px max(16px, calc((100% - var(--page)) / 2));
    border-bottom: 2px solid var(--ink);
    background: var(--paper);
    box-shadow: 0 18px 30px rgba(17, 19, 22, 0.14);
  }

  .site-nav[data-open="true"] {
    display: grid;
  }

  .site-nav a {
    padding: 10px 0;
  }

  .site-nav a::after {
    display: none;
  }

  .hero-inner {
    padding: 58px 0 68px;
  }

  h1 {
    font-size: clamp(3.25rem, 19vw, 5.2rem);
  }

  .cover-stage {
    height: 355px;
  }

  .cover-stage img {
    width: min(180px, 48%);
  }

  .section {
    padding: 72px 0;
  }

  .author-grid {
    gap: 48px;
  }

  .book-feature,
  .book-feature:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .book-feature:nth-child(even) .book-cover-wrap {
    order: 0;
  }

  .book-cover-wrap {
    position: static;
  }

  .book-cover-wrap img {
    width: min(72vw, 300px);
  }

  .footer-inner {
    min-height: 150px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
