/* ==========================================================================
   You Got In! Now What? — shared styles
   All styling lives here, driven by tokens in :root.
   One mobile @media block sits at the bottom.
   ========================================================================== */

:root {
  /* Brand palette — lifted from the book cover */
  --paper:      #ffffff;
  --paper-warm: #fffdf6;   /* alternating section wash */
  --ink:        #141414;
  --ink-soft:   #3d3d3d;
  --ink-faint:  #6b6b6b;
  --red:        #e72727;   /* the old site's accent red — hsla(0,80%,53%) */
  --red-deep:   #b81c1c;   /* darker red for hover / depth */
  --yellow:     #fef200;   /* the hand-brushed underline — sampled from the book cover */
  --line:       #ececec;

  /* Type */
  --font-display: "Quicksand", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    Georgia, "Iowan Old Style", "Times New Roman", serif;

  /* Layout */
  --maxw:  1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 14px;

  /* Hand-brushed yellow underline (the signature element) */
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M4 13C100 12 200 12 250 13C270 14 285 16 296 18' fill='none' stroke='%23fef200' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.8em 1.3em;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

a:focus-visible, .btn:focus-visible, .skip-link:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Display type
   -------------------------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.02;
  color: var(--ink);
  margin: 0;
}

/* Signature brushed underline on section headings */
.brushed {
  position: relative;
  display: inline;
  white-space: nowrap;
  padding-bottom: 0.18em;
}
.brushed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.42em;
  background-image: var(--brush);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 10px 24px -8px rgba(231, 39, 39, 0.6); }
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(231, 39, 39, 0.7); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--red);
  border-bottom: 1px solid rgba(0,0,0,0.12);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img { height: 56px; width: auto; display: block; }

/* Order button inverts to white on the red header */
.site-header .btn-primary { background: #fff; color: var(--red); border-color: #fff; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.4); }
.site-header .btn-primary:hover { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 14px 26px -8px rgba(0, 0, 0, 0.45); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.06;
  color: var(--red);
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: var(--ink-soft);
  margin: 1.3rem 0 2rem;
  max-width: 34ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero-cover { justify-self: center; position: relative; }
.hero-cover img {
  width: min(420px, 78vw);
  border-radius: 6px;
  box-shadow: 0 30px 60px -24px rgba(20,20,20,0.4), 0 8px 20px -12px rgba(20,20,20,0.25);
  transform: rotate(-2.5deg);
}

/* --------------------------------------------------------------------------
   Generic section
   -------------------------------------------------------------------------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section-warm { background: var(--paper-warm); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--red); }
.prose-p { color: var(--ink-soft); margin: clamp(2rem, 4vw, 3rem) 0 0; }

/* The big premise statement (matches the old site's standalone line) */
.section-head .statement {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.14;
  max-width: 22ch;
  margin-inline: auto;
  color: var(--ink);
}

.prose { max-width: 68ch; margin-inline: auto; }
.prose p { margin: 0 0 1.15em; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }

/* Premise statement section: red (matches the old site) */
#book { background: var(--red); }
#book .section-head, #insights .section-head { max-width: none; }
#book .statement { color: #fff; max-width: 46ch; }
#book .prose p { color: rgba(255, 255, 255, 0.92); }

/* Insights heading: same big statement typography as the Book heading */
#insights .statement { max-width: 46ch; }

/* Categories grid */
.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 2.4rem;
}
.cat {
  background: var(--paper);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem;
  position: relative;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.cat h3 { font-size: 1.28rem; text-transform: uppercase; letter-spacing: -0.01em; margin: 0; }

.lessons-art { max-width: 300px; margin: 2.6rem auto 0; transform: rotate(2deg); }

/* Scrolling ticker of lesson snippets */
.ticker {
  max-width: var(--maxw);
  margin-inline: auto;
  overflow: hidden;
  margin-top: 1.2rem;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 38s linear infinite;
}
.ticker-item {
  flex: none;
  padding-inline: 1.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-faint);
  white-space: nowrap;
  border-right: 1px solid var(--line);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* Praise / testimonials */
#praise .section-head h2 { color: var(--ink); }
.praise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 12px;
}
.praise-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quote {
  margin: 0;
  padding: 1.3rem 1.2rem;
  background: var(--red);
  border-radius: var(--radius);
}
.quote p { margin: 0 0 1.1rem; font-size: 1.02rem; line-height: 1.44; color: rgba(255, 255, 255, 0.94); }
.quote cite {
  font-style: normal;
  display: block;
  padding-top: 1.1rem;
  border-top: 2px solid rgba(254, 242, 0, 0.55);
}
.quote .who {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 0.1em;
}
.quote .role { display: block; font-size: 0.9rem; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.quote .highlight {
  display: inline;
  background-image: var(--brush);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.32em;
  padding-bottom: 0.1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* People (author + illustrator) */
#author { background: var(--red); }
.person {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 336px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  text-align: left;
}
.person + .person { margin-top: clamp(3rem, 6vw, 5rem); }
.person img {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 28px;
}
.person > div { grid-column: 1; grid-row: 1; }
.person .kicker {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 0.5rem;
}
.person h2 {
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  line-height: 1.05;
  margin-bottom: 1rem;
  color: #fff;
}
.person p { color: rgba(255, 255, 255, 0.92); }
.person a { color: #fff; text-decoration: underline; text-underline-offset: 0.15em; }

/* Buy strip — white, streamlined (matches the old site) */
.buy {
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  padding: clamp(24px, 4vw, 40px) 0;
}
.buy .wrap { display: grid; place-items: center; gap: 0.9rem; }
.buy-art { width: min(260px, 55vw); }
.buy-cover {
  width: min(150px, 32vw);
  border-radius: 4px;
  box-shadow: 0 14px 28px -14px rgba(20, 20, 20, 0.35);
  transform: rotate(-2deg);
  margin-top: 0.6rem;
}

/* Decorative line-art motif */
.motif { max-width: 340px; margin: 2.6rem auto 0; opacity: 0.9; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 0 0 clamp(28px, 5vw, 48px);
  font-size: 0.92rem;
  color: var(--ink-faint);
  text-align: center;
}

/* 404 */
.notfound { text-align: center; padding: clamp(70px, 12vw, 140px) 0; }
.notfound h1 { font-size: clamp(4rem, 14vw, 9rem); color: var(--red); }
.notfound p { font-size: 1.2rem; color: var(--ink-soft); margin: 1rem 0 1.5rem; }
.notfound-map { max-width: 360px; margin: 1.5rem auto 0; }

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  body { font-size: 17px; }

  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-cover { order: -1; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .lessons-art { max-width: 260px; margin: 0.5rem auto 0; }
  .person { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .person img { grid-column: 1; grid-row: 1; width: min(240px, 60vw); }
  .person > div { grid-column: 1; grid-row: 2; }
}

@media (max-width: 640px) {
  .praise-grid { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .cats { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand img { height: 40px; }
  .site-header .btn { padding: 0.6em 1.1em; font-size: 0.82rem; }
}

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