/*
  Pathfinder Pocket Guide styles

  This file is organized from broadest to most specific:
  1. Color and spacing tokens
  2. Page-wide defaults
  3. Title page / hero
  4. Navigation
  5. Content sections
  6. Reusable cards, tags, lists, and photos
  7. Responsive layout rules
  8. Print cleanup
*/

/* 1. Color and spacing tokens
   Edit these first if you want to change the overall mood of the page. */
:root {
  color-scheme: light;

  /* Main text and page surfaces */
  --ink: #172027;
  --muted: #5c6670;
  --paper: #fffdfa;
  --wash: #f4f7f4;
  --line: #d9ded8;

  /* Accent colors used by tags, cards, and callouts */
  --charcoal: #25313a;
  --green: #3e6d5a;
  --rose: #b85b56;
  --gold: #c2933e;
  --blue: #486f8f;

  /* Soft card backgrounds */
  --mint: #eaf3ec;
  --blush: #faeeee;
  --cream: #fff7e2;
  --sky: #edf5fa;

  /* Page container shadow on desktop */
  --shadow: 0 18px 48px rgba(23, 32, 39, 0.13);
}

/* 2. Page-wide defaults
   These rules make sizing predictable and set the base type style. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

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

figure {
  margin: 0;
}

/* The white page area that sits on top of the pale background. */
.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

/* 3. Title page / hero
   The title page uses the exterior photo as a full-screen background. */
.hero {
  min-height: 92svh;
  display: grid;
  align-items: end;
  position: relative;
  overflow: clip;
  background: var(--charcoal);
  color: white;
}

/* Dark overlay so the title remains readable over the vehicle photo. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(19, 26, 31, 0.08), rgba(19, 26, 31, 0.86)),
    linear-gradient(90deg, rgba(19, 26, 31, 0.58), rgba(19, 26, 31, 0.1));
}

.hero img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 28px 20px 30px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #ffd98a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 7.6em;
  margin-bottom: 14px;
  font-size: clamp(2.7rem, 14vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p {
  max-width: 45rem;
  margin-bottom: 0;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
}

.hero-actions,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.button {
  padding: 0 18px;
  background: #ffd98a;
  color: #20262b;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.chip {
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 0.83rem;
}

/* The dark note directly below the title page. */
.notice {
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--charcoal);
  color: #f5f7f3;
}

.notice strong {
  color: #ffd98a;
}

/* 4. Navigation
   Sticky horizontal table of contents. It scrolls sideways on phones. */
.toc {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.94);
  backdrop-filter: blur(14px);
}

.toc-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  scrollbar-width: none;
}

.toc-inner::-webkit-scrollbar {
  display: none;
}

.toc a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--charcoal);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

/* 5. Content sections
   These control the major chunks below the table of contents. */
main {
  padding: 20px 16px 44px;
}

section {
  scroll-margin-top: 78px;
}

.section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-label {
  margin-bottom: 7px;
  color: var(--rose);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.9rem, 9vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.lead {
  max-width: 52rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

/* 6. Reusable layout helpers, cards, tags, lists, and photos */
.grid {
  display: grid;
  gap: 14px;
}

.split {
  display: grid;
  gap: 14px;
}

/* Adds top spacing when a new row follows another block. */
.stack-top {
  margin-top: 14px;
}

.card,
.photo-card,
.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.card {
  padding: 17px;
}

/* Optional card background colors. Add these classes in HTML as needed. */
.card.accent-green {
  border-color: #cbdccc;
  background: var(--mint);
}

.card.accent-rose {
  border-color: #ebcfcc;
  background: var(--blush);
}

.card.accent-gold {
  border-color: #ecdba8;
  background: var(--cream);
}

.card.accent-blue {
  border-color: #c9dbea;
  background: var(--sky);
}

.card p:last-child,
.callout p:last-child,
.photo-card p:last-child {
  margin-bottom: 0;
}

/* Small pill labels like "Do first" and "Camera". */
.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--charcoal);
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag.green {
  background: var(--green);
}

.tag.rose {
  background: var(--rose);
}

.tag.gold {
  background: var(--gold);
  color: #231d10;
}

.tag.blue {
  background: var(--blue);
}

/* Numbered step lists with dark circular numbers. */
.steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--charcoal);
  color: white;
  font-weight: 900;
}

.plain-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
}

.plain-list li::marker {
  color: var(--rose);
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-list strong {
  display: block;
  margin-bottom: 3px;
}

/* Image cards keep photos consistently cropped and captioned. */
.photo-card {
  overflow: hidden;
}

.photo-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-card img.square {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.wide-photo img {
  aspect-ratio: 16 / 10;
}

.photo-card figcaption {
  padding: 12px 13px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Callouts are the highlighted notes and warnings. */
.callout {
  padding: 15px 16px;
  border-left: 6px solid var(--gold);
  background: #fbf3dd;
}

.callout.danger {
  border-left-color: var(--rose);
  background: #fbebea;
}

.callout.calm {
  border-left-color: var(--blue);
  background: #edf5fa;
}

.mini-title {
  margin-bottom: 4px;
  font-weight: 900;
}

.footer-note {
  padding: 22px 16px 34px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* 7. Responsive layout rules
   The base design is phone-first. These rules add columns on wider screens. */
@media (min-width: 680px) {
  .hero-content {
    padding: 48px 44px 48px;
  }

  main {
    padding: 34px 34px 64px;
  }

  .notice {
    padding: 18px 34px;
  }

  .section {
    padding: 42px 0;
  }

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

  .grid.three,
  .feature-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    align-items: start;
  }
}

@media (min-width: 980px) {
  .hero {
    min-height: 760px;
  }

  .section-head {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
    align-items: end;
  }

  .toc-inner {
    justify-content: center;
  }
}

/* 8. Print cleanup
   Print is secondary, but this removes the sticky nav and heavy hero image. */
@media print {
  body,
  .shell {
    background: white;
    box-shadow: none;
  }

  .hero {
    min-height: auto;
    background: white;
    color: var(--ink);
  }

  .hero img,
  .hero::after,
  .toc {
    display: none;
  }

  .hero-content,
  main,
  .notice,
  .footer-note {
    padding-inline: 0;
  }

  .section {
    break-inside: avoid;
  }
}
