@font-face {
  font-family: "League Spartan";
  src: url("../fonts/LeagueSpartan-Medium.woff2") format("woff2"),
       url("../fonts/LeagueSpartan-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "League Spartan";
  src: url("../fonts/LeagueSpartan-Bold.woff2") format("woff2"),
       url("../fonts/LeagueSpartan-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Book Serif";
  src: url("../fonts/BookSerifLF-Regular.woff2") format("woff2"),
       url("../fonts/BookSerifLF-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Brand palette. See the brand book: the mark is only ever ink, paper or
   navy, and orange never touches it. Navy carries emphasis on light grounds
   because orange on paper is 3.77:1 and fails AA for anything but large text. */
:root {
  --ink: #14181D;
  --navy: #032643;
  --orange: #E05808;
  --paper: #ffffff;
  --mist: #F2F4F6;
  --slate: #5C6672;

  /* Interaction states, derived: not brand colours in their own right. */
  --orange-light: #FF9A75;   /* small text on navy — 7.44:1 */
  --navy-line: #1C4463;      /* hairlines inside the navy band */
  --paper-dim: #C3CFD9;      /* secondary text on navy */

  --muted: var(--slate);
  --line: #D9DDE1;
  --accent: var(--navy);     /* emphasis on light grounds */
  --sans: "League Spartan", Arial, sans-serif;
  --serif: "Book Serif", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.55;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-200%);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 38px;
}

/* The lockup carries the name, so the text beside it would be a duplicate.
   It stays in the DOM for assistive tech and for a failed image load. */
.brand span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

nav {
  display: flex;
  gap: clamp(18px, 3vw, 44px);
}

nav a {
  font-size: 0.92rem;
  text-decoration: none;
}

nav a:hover,
.text-link:hover,
.book-card a:hover {
  color: var(--accent);
}

.external-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
  align-items: center;
  min-height: 630px;
  gap: 48px;
  padding-block: 54px 92px;
}

.eyebrow,
.proof-number,
.book-tier {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

h1 {
  max-width: 700px;
  margin-bottom: 28px;
  font-size: clamp(3.25rem, 6.7vw, 6.15rem);
}

h2 {
  margin-bottom: 24px;
  font-size: clamp(2.4rem, 4vw, 4rem);
}

h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero-intro {
  max-width: 510px;
  margin-bottom: 32px;
  color: var(--slate);
  font-size: clamp(1.08rem, 1.6vw, 1.32rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

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

.button-primary:hover {
  background: var(--navy);
  border-color: var(--navy);
}

.button-secondary:hover {
  background: var(--mist);
}

.hero-art {
  width: 100%;
}

.hero-product {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.proof article {
  min-height: 228px;
  padding: 32px 32px 30px 0;
}

.proof article + article {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.proof h2 {
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.proof p:not(.proof-number) {
  max-width: 290px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.how {
  padding-block: 130px;
}

.how-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
}

.how p,
.how li {
  font-size: 1.08rem;
}

.how ol {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.how li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding-block: 17px;
  border-top: 1px solid var(--line);
  counter-increment: steps;
}

.how li::before {
  color: var(--accent);
  content: "0" counter(steps);
  font-weight: 700;
}

.books {
  padding-bottom: 130px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.text-link {
  font-size: 0.9rem;
  font-weight: 700;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
}

.book-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
}

.book-card picture {
  display: block;
}

.book-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center;
  background: var(--mist);
}

.book-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-height: 230px;
  padding: 24px;
}

.book-card p:not(.book-tier) {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.book-card a {
  margin-top: auto;
  font-size: 0.87rem;
  font-weight: 700;
}

/* The one place the site goes dark, so it uses the brand ground. */
.samples {
  padding-block: 92px;
  background: var(--navy);
  color: var(--paper);
}

.samples .eyebrow {
  color: var(--orange-light);
}

.sample-intro {
  max-width: 34rem;
  margin-bottom: 50px;
}

.sample-intro h2 {
  margin-bottom: 12px;
  font-size: clamp(2.3rem, 4vw, 4rem);
}

.sample-intro > p:last-child {
  margin-bottom: 0;
  color: var(--paper-dim);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--navy-line);
  border-left: 1px solid var(--navy-line);
}

.sample-grid a {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-right: 1px solid var(--navy-line);
  border-bottom: 1px solid var(--navy-line);
  color: white;
  text-decoration: none;
}

.sample-grid a:hover {
  background: var(--ink);
}

.sample-label {
  font-family: var(--serif);
  font-size: 1.6rem;
}

.sample-grid a > span:last-child {
  font-size: 0.86rem;
  font-weight: 700;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 28px;
  min-height: 150px;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer .brand {
  color: var(--ink);
  font-size: 1rem;
}

.site-footer .brand img {
  width: auto;
  height: 30px;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer > a:not(.brand) {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero,
  .how-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 26px;
  }

  .how-layout {
    gap: 20px;
  }

  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 32px, 1180px);
  }

  .site-header {
    align-items: flex-start;
    min-height: 92px;
    padding-top: 20px;
  }

  .site-header {
    flex-wrap: wrap;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  nav a {
    font-size: 0.78rem;
  }

  .hero {
    gap: 26px;
    padding-bottom: 70px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.4rem);
  }

  .proof,
  .sample-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .proof article,
  .proof article + article {
    min-height: auto;
    padding: 26px 0;
    border-left: 0;
  }

  .proof article + article {
    border-top: 1px solid var(--line);
  }

  .how,
  .books {
    padding-bottom: 88px;
  }

  .how {
    padding-top: 88px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .samples {
    padding-block: 72px;
  }

  .site-footer {
    align-items: start;
    padding-block: 34px;
  }
}

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