/* ============================================================
   Nobody Dreams of Owning a Driving School — companion site
   Design tokens pulled directly from the book cover.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --ink: #0d0d0f;
  --ink-soft: #16161a;
  --amber: #f5b120;
  --amber-deep: #d6900f;
  --cream: #f3eee3;
  --white: #ffffff;
  --line: rgba(243, 238, 227, 0.14);

  --font-display: 'Lora', serif;
  --font-body: 'Poppins', sans-serif;

  --max-w: 1120px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink) url('assets/asphalt-texture.jpg');
  background-size: 900px 900px;
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Hazard stripe signature element ---------- */
.hazard {
  height: 22px;
  width: 100%;
  background: repeating-linear-gradient(
    115deg,
    var(--amber) 0px,
    var(--amber) 26px,
    var(--ink) 26px,
    var(--ink) 52px
  );
}

/* ---------- Nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 13, 15, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand span { color: var(--amber); }

nav.links {
  display: flex;
  gap: 30px;
  font-size: 0.92rem;
}
nav.links a {
  text-decoration: none;
  color: var(--cream);
  opacity: 0.85;
  transition: opacity 0.15s, color 0.15s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
nav.links a:hover, nav.links a.active {
  opacity: 1;
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.nav-cta {
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--white); }

/* ---------- Mobile navigation ---------- */
.nav-toggle { display: none; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  margin: -8px -8px -8px 0;
  background: none;
  border: none;
}
.hamburger span { width: 24px; height: 2px; background: var(--cream); border-radius: 2px; transition: .2s; }
.nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 820px) {
  .hamburger { display: flex; }
  nav.links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 13, 15, 0.98);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 26px rgba(0,0,0,.45);
    padding: 6px 28px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
  }
  .nav-toggle:checked ~ nav.links { max-height: 420px; }
  nav.links a { padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 1rem; opacity: 1; }
  nav.links a.nav-cta { margin-top: 14px; text-align: center; color: var(--ink); border-bottom: none; }
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.4em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--amber);
  margin-bottom: 14px;
  display: block;
}

p { margin: 0 0 1em; color: var(--cream); }
.lede {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--cream);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: #ffc94a; }
.btn-outline { border-color: var(--cream); color: var(--cream); background: transparent; }
.btn-outline:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero-cover {
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.7);
  border: 1px solid var(--line);
}
.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-cover { max-width: 340px; margin: 0 auto; }
}

/* ---------- Cards ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 780px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: rgba(243, 238, 227, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

/* ---------- Praise quotes ---------- */
.quote-card {
  border-left: 2px solid var(--amber);
  padding-left: 22px;
}
.quote-card p.quote-text {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.quote-attr {
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
}
.quote-attr span { color: var(--cream); font-weight: 400; font-style: italic; }

/* ---------- Framework badge (Demand / Discontent / Doable) ---------- */
.framework {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 12px;
}
.framework .f-item {
  text-align: center;
  padding: 26px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.framework .f-item .f-word {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--amber);
  font-size: 1.3rem;
  display: block;
  margin-bottom: 6px;
}
.framework .f-item p { font-size: 0.9rem; margin: 0; color: var(--cream); opacity: 0.85; }
@media (max-width: 780px) { .framework { grid-template-columns: 1fr; } }

/* ---------- Buy section ---------- */
.buy-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.buy-cover {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.7);
  border: 1px solid var(--line);
}
@media (max-width: 720px) {
  .buy-grid { grid-template-columns: 1fr; gap: 30px; }
  .buy-cover { max-width: 280px; margin: 0 auto; }
}
.buy-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.buy-meta span {
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 14px;
  color: var(--cream);
  opacity: 0.85;
}
.who-list { margin: 0; padding: 0; list-style: none; }
.who-list li {
  font-size: 0.92rem;
  color: var(--cream);
  opacity: 0.85;
  padding-left: 22px;
  position: relative;
  margin-bottom: 9px;
}
.who-list li::before { content: "\2192"; position: absolute; left: 0; color: var(--amber); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 36px;
  margin-top: 40px;
}
footer .foot-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.88rem;
}
footer a { text-decoration: none; opacity: 0.8; }
footer a:hover { opacity: 1; color: var(--amber); }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-fine { opacity: 0.55; margin-top: 28px; font-size: 0.8rem; }

/* ---------- Workbook page ---------- */
.workbook-part {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.workbook-part:last-child { border-bottom: none; }
.q-block { margin-bottom: 30px; }
.q-block .q-text {
  color: var(--white);
  font-size: 1.02rem;
  margin-bottom: 12px;
}
.q-block textarea {
  width: 100%;
  min-height: 96px;
  background: rgba(243, 238, 227, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 14px;
  resize: vertical;
  transition: border-color 0.15s;
}
.q-block textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.save-indicator {
  font-size: 0.78rem;
  color: var(--amber);
  opacity: 0;
  transition: opacity 0.3s;
  margin-top: 6px;
  display: inline-block;
}
.save-indicator.show { opacity: 0.85; }

.tool-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}

.chapter-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 30px;
  margin-top: 8px;
}
@media (max-width: 700px) { .chapter-list { grid-template-columns: 1fr; } }
.chapter-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 6px 0;
}
.chapter-list input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--amber);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.chapter-list input[type="checkbox"]:checked + span {
  color: var(--amber);
  text-decoration: line-through;
  opacity: 0.7;
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.opacity-70 { opacity: 0.7; }
.small { font-size: 0.85rem; }

/* ---------- Email capture (shared by workbook + checker) ---------- */
.email-capture {
  margin-top: 30px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(243, 238, 227, 0.03);
}
.email-capture h3 { margin-bottom: 6px; }
.email-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.email-row input[type="email"] {
  flex: 1;
  min-width: 220px;
  background: rgba(243,238,227,0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
}
.email-note { font-size: 0.78rem; opacity: 0.55; margin-top: 10px; }
.email-success { color: #7CCB6E; font-size: 0.9rem; margin-top: 12px; display: none; }
.email-success.show { display: block; }

/* ---------- Small card link button (external site links) ---------- */
.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 16px;
  border: 1px solid var(--amber);
  color: var(--amber);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.card-btn:hover { background: var(--amber); color: var(--ink); }
