/* =========================================================================
   Allison — a site for her 55th
   Design system: "the long walk"
   - paper + deep spruce, Camino-waymark yellow accent
   - signature: a ridgeline that is also an elevation profile and a music line
   - the white "blaze" waymark (Appalachian Trail trail-marking) as nav motif
   ========================================================================= */

:root {
  /* color */
  --paper:      #EAECE3;  /* cool map paper, page base */
  --bone:       #F5F4ED;  /* lighter panel */
  --ink:        #1C2A23;  /* deep spruce, near-black green — primary text */
  --ink-soft:   #46544C;  /* secondary text */
  --moss:       #5C7060;  /* muted green */
  --blaze:      #E4B33C;  /* Camino waymark yellow — the accent */
  --blaze-deep: #C18A24;
  --contour:    #BCAE93;  /* faint topographic line */
  --white:      #FBFAF5;  /* the AT white blaze */

  /* type */
  --display: "Fraunces", Georgia, serif;
  --body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  /* scale */
  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.86rem);
  --step-0:  clamp(1.02rem, 0.97rem + 0.25vw, 1.15rem);
  --step-1:  clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2:  clamp(1.7rem, 1.5rem + 1vw, 2.4rem);
  --step-3:  clamp(2.3rem, 1.9rem + 2vw, 3.6rem);
  --step-4:  clamp(3rem, 2.2rem + 4vw, 6.5rem);
  --step-5:  clamp(3.6rem, 2.4rem + 6vw, 9rem);

  /* space */
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3rem);
  --bandpad: clamp(4rem, 2.5rem + 7vw, 9rem);
  --maxw: 1280px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.band { padding-block: var(--bandpad); }
.band--bone { background: var(--bone); }
.lede { max-width: 46ch; }

/* eyebrow / waymark label */
.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0 0 1.4rem;
}
/* the white blaze: a 2x6 painted trail marker, here a small upright bar */
.eyebrow::before {
  content: "";
  width: 9px; height: 22px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 1px;
  flex: none;
}

/* ---------- type ---------- */
.display {
  font-family: var(--display);
  font-weight: 500;
  font-optical-sizing: auto;
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.h-xl { font-size: var(--step-5); }
.h-lg { font-size: var(--step-4); }
.h-md { font-size: var(--step-3); }
.h-sm { font-size: var(--step-2); }
.serif-em { font-style: italic; font-weight: 400; color: var(--moss); }

p.body-lg { font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); }
p + p { margin-top: 1.1em; }
.muted { color: var(--ink-soft); }

/* link with waymark underline */
.link {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--blaze);
  padding-bottom: 3px;
  transition: color .25s ease, border-color .25s ease;
}
.link:hover { color: var(--blaze-deep); border-color: var(--ink); }
.link::after { content: " \2192"; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.nav__row {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 0.9rem;
}
.nav__brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.nav__brand span { color: var(--blaze-deep); }
.nav__links { display: flex; gap: clamp(0.8rem, 2vw, 1.9rem); list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); border-color: var(--blaze); }

/* mobile nav: links wrap and shrink, no JS needed */
@media (max-width: 640px) {
  .nav__row { flex-wrap: wrap; gap: 0.5rem 0; }
  .nav__links { width: 100%; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(3.5rem, 2rem + 8vw, 8rem) var(--bandpad); overflow: hidden; }
.hero__kicker {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 1.5rem;
}
.hero__title { max-width: 16ch; margin-bottom: 1.8rem; }
.hero__title em { font-style: italic; color: var(--moss); }
.hero__sub { max-width: 40ch; }

/* the ridgeline: signature element */
.ridge { width: 100%; height: clamp(120px, 18vw, 240px); margin-top: clamp(2rem, 5vw, 4rem); display: block; }
.ridge path { fill: none; vector-effect: non-scaling-stroke; }
.ridge .ridge__line { stroke: var(--ink); stroke-width: 2; }
.ridge .ridge__fill { fill: color-mix(in srgb, var(--moss) 14%, transparent); stroke: none; }
.ridge .ridge__ground { stroke: var(--contour); stroke-width: 1; stroke-dasharray: 2 6; }
.ridge .blazept { fill: var(--white); stroke: var(--ink); stroke-width: 1.5; }

/* draw animation */
.ridge__line, .ridge__ground { stroke-dasharray: 2600; stroke-dashoffset: 2600; }
.is-drawn .ridge__line { animation: draw 2.6s cubic-bezier(.22,.61,.36,1) forwards; }
.is-drawn .ridge__ground { animation: draw 3s ease forwards; }
.is-drawn .ridge__fill { opacity: 0; animation: fade 1.4s ease 1.6s forwards; }
.is-drawn .blazept { opacity: 0; animation: pop .5s ease forwards; }
.is-drawn .blazept:nth-of-type(1){ animation-delay: 1.1s; }
.is-drawn .blazept:nth-of-type(2){ animation-delay: 1.6s; }
.is-drawn .blazept:nth-of-type(3){ animation-delay: 2.1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- domain bands (Rare Volume alternating panels) ---------- */
.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.panel + .panel { margin-top: var(--bandpad); }
.panel__media {
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, color-mix(in srgb, var(--contour) 30%, transparent) 22px 23px),
    color-mix(in srgb, var(--moss) 12%, var(--bone));
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.panel__media img { width: 100%; height: 100%; object-fit: cover; }
.panel__media .ph {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  padding: 1rem;
}
.panel__num {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--blaze-deep);
  letter-spacing: 0.1em;
}
.panel--flip .panel__media { order: 2; }
@media (max-width: 760px) {
  .panel { grid-template-columns: 1fr; }
  .panel--flip .panel__media { order: 0; }
}

/* ---------- "by the numbers" trail-log strip ---------- */
.tally {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}
.tally__cell { background: var(--paper); padding: clamp(1.3rem, 3vw, 2.2rem); }
.band--bone .tally__cell { background: var(--bone); }
.tally__fig {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}
.tally__lab {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- card grid (family / notes) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
}
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--blaze);
  box-shadow: 0 18px 40px -28px rgba(28,42,35,.6);
}
.card__eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blaze-deep);
  margin-bottom: 0.8rem;
}
.card__title { font-family: var(--display); font-weight: 500; font-size: var(--step-1); line-height: 1.05; margin-bottom: 0.6rem; }

/* ---------- timeline (hiking elevation list) ---------- */
.walks { border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.walk {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,2fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: baseline;
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}
.walk__name { font-family: var(--display); font-weight: 500; font-size: var(--step-2); line-height: 1.02; }
.walk__name small { display:block; font-family: var(--mono); font-size: var(--step--1); letter-spacing:.1em; text-transform:uppercase; color: var(--moss); margin-top:.6rem; font-weight:400; }
.walk__desc { color: var(--ink-soft); }
.walk__fig { font-family: var(--mono); font-size: var(--step-1); white-space: nowrap; text-align: right; color: var(--ink); }
.walk__fig small { display:block; font-size: var(--step--1); color: var(--ink-soft); letter-spacing:.08em; }
@media (max-width: 760px) {
  .walk { grid-template-columns: 1fr; gap: 0.7rem; }
  .walk__fig { text-align: left; }
}

/* status pill */
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blaze);
  color: var(--ink);
}
.pill--done { background: color-mix(in srgb, var(--moss) 30%, var(--bone)); color: var(--ink); }

/* ---------- prose ---------- */
.prose { max-width: 62ch; }
.prose p { margin-bottom: 1.2em; color: var(--ink-soft); }
.prose p.body-lg:first-of-type { color: var(--ink); }
.prose h3 { font-family: var(--display); font-weight:500; font-size: var(--step-2); margin: 2em 0 .5em; color: var(--ink); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--bone); padding-block: var(--bandpad); }
.foot a { color: var(--bone); }
.foot__top { display: flex; flex-wrap: wrap; gap: 2rem 4rem; justify-content: space-between; align-items: end; }
.foot__sign { font-family: var(--display); font-weight: 500; font-size: var(--step-3); line-height: 1; max-width: 14ch; }
.foot__sign em { font-style: italic; color: var(--blaze); }
.foot__links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.foot__links a {
  font-family: var(--mono); font-size: var(--step--1); letter-spacing:.12em; text-transform: uppercase;
  text-decoration: none; color: color-mix(in srgb, var(--bone) 75%, transparent);
}
.foot__links a:hover { color: var(--blaze); }
.foot__rule { height:1px; background: color-mix(in srgb, var(--bone) 22%, transparent); margin-block: clamp(2rem,5vw,3.5rem); border:0; }
.foot__fine { font-family: var(--mono); font-size: var(--step--1); letter-spacing:.06em; color: color-mix(in srgb, var(--bone) 60%, transparent); }

/* ---------- reveal-on-scroll (only hidden when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.22,.61,.36,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .is-drawn .ridge__line, .is-drawn .ridge__ground { animation: none; stroke-dashoffset: 0; }
  .is-drawn .ridge__fill, .is-drawn .blazept { animation: none; opacity: 1; }
  .ridge__line, .ridge__ground { stroke-dashoffset: 0; }
  .card:hover { transform: none; }
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blaze-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
