/* Barrowridge — "How an engagement works"
   Restrained, typographic, no dependencies. Light and dark.
   Shares tokens with styles.css but kept as its own file since this
   page's layout (scroll rail, phase cards, doc frames) doesn't overlap
   with the balloon-survey homepage. */

:root {
  --paper:      #f7f5f1;
  --ink:        #17181a;
  --ink-soft:   #4a4c50;
  --ink-faint:  #8a8880;
  --rule:       #ddd8ce;
  --accent:     #6b5f4c;
  --card:       #ffffff;
  --measure:    38rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #131414;
    --ink:       #e9e6e0;
    --ink-soft:  #b0aca4;
    --ink-faint: #7c786f;
    --rule:      #2c2d2c;
    --accent:    #c2b394;
    --card:      #1b1c1c;
  }
}
:root[data-theme="dark"] {
  --paper:     #131414;
  --ink:       #e9e6e0;
  --ink-soft:  #b0aca4;
  --ink-faint: #7c786f;
  --rule:      #2c2d2c;
  --accent:    #c2b394;
  --card:      #1b1c1c;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.serif { font-family: ui-serif, Georgia, "Times New Roman", serif; }

.masthead {
  max-width: 46rem; margin: 0 auto; padding: 2.75rem 1.5rem 0;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.wordmark .mark { width: 1.35rem; height: 1.35rem; color: var(--ink); }
.wordmark span { font-family: ui-serif, Georgia, serif; font-size: 0.95rem; letter-spacing: 0.06em; font-weight: 600; }
.wordmark-suffix { color: var(--ink-faint); font-weight: 500; }
.masthead a.back { font-size: 0.85rem; color: var(--ink-faint); text-decoration: none; border-bottom: 1px solid transparent; }
.masthead a.back:hover { border-bottom-color: var(--ink-faint); }

.hero {
  max-width: 46rem; margin: 0 auto; padding: 5rem 1.5rem 4rem;
}
.eyebrow {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 1rem;
}
.hero h1 {
  font-family: ui-serif, Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 2.75rem); line-height: 1.22; margin: 0 0 1.25rem;
  max-width: 22ch;
}
.hero .lede {
  font-size: 1.1rem; line-height: 1.65; color: var(--ink-soft); max-width: var(--measure); margin: 0;
}
.read-time {
  margin-top: 1.75rem; font-size: 0.8rem; color: var(--ink-faint);
  display: flex; align-items: center; gap: 0.5rem;
}
.read-time .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-faint); }

/* ---------- scroll rail ---------- */
.rail-wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.5rem; position: relative; }
.phase {
  display: grid; grid-template-columns: 2.25rem 1fr; gap: 0 1.75rem;
  padding: 0 0 5.5rem; position: relative;
}
.phase:last-child { padding-bottom: 2rem; }
.rail-col { position: relative; display: flex; justify-content: center; }
.rail-line {
  position: absolute; top: 0.35rem; bottom: -5.5rem; left: 50%; width: 1px;
  background: var(--rule); transform: translateX(-50%);
}
.phase:last-child .rail-line { display: none; }
.rail-dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--paper);
  border: 1.5px solid var(--ink-faint); margin-top: 0.3rem; position: relative; z-index: 1;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}
.phase.is-active .rail-dot { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.rail-num {
  position: absolute; top: -1.6rem; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; color: var(--ink-faint); font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em; white-space: nowrap;
}

.phase-body { max-width: 34rem; opacity: 0.55; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.5s ease; }
.phase.is-active .phase-body { opacity: 1; transform: translateY(0); }

.phase-tag { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.6rem; font-weight: 600; }
.phase h2 {
  font-family: ui-serif, Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: 1.55rem; line-height: 1.3; margin: 0 0 0.9rem; color: var(--ink);
}
.phase p { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); margin: 0 0 0.9rem; }
.phase p:last-of-type { margin-bottom: 0; }
.phase strong { color: var(--ink); font-weight: 600; }
.phase p.sub { font-size: 0.92rem; }
.phase p.mt-1 { margin-top: 1rem; }
.phase p.mt-16 { margin-top: 1.6rem; }

/* ---------- illustrations ---------- */
figure { margin: 1.6rem 0 0.6rem; }
figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
.doc-frame {
  background: var(--card); border: 1px solid var(--rule); border-radius: 8px;
  padding: 1.1rem 1.2rem 1.3rem; box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
@media (prefers-color-scheme: dark) { .doc-frame { box-shadow: 0 10px 30px rgba(0,0,0,0.35); } }
.doc-frame img {
  -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
}
figcaption { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.7rem; line-height: 1.5; }
figcaption b { color: var(--ink-soft); font-weight: 600; }

/* tier diagram */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.6rem 0 0.4rem; }
.tiers.tiers-2 { grid-template-columns: 1fr 1fr; }
.tier { border: 1px solid var(--rule); border-radius: 8px; padding: 0.95rem 1rem; }
.tier .t-name { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; color: var(--ink); margin-bottom: 0.3rem; }
.tier .t-desc { font-size: 0.78rem; color: var(--ink-faint); line-height: 1.5; }
@media (max-width: 640px) { .tiers { grid-template-columns: 1fr; } }

hr.rule { border: none; border-top: 1px solid var(--rule); margin: 0; }
.close hr.rule { margin-bottom: 3rem; }

.close {
  max-width: 46rem; margin: 0 auto; padding: 2rem 1.5rem 7rem; text-align: center;
}
.close h2 {
  font-family: ui-serif, Georgia, serif; font-weight: 400; font-size: 1.6rem; margin: 0 0 0.9rem;
}
.close p { color: var(--ink-soft); font-size: 1rem; line-height: 1.65; margin: 0 0 1.6rem; max-width: 30rem; margin-left: auto; margin-right: auto; }
.close a.cta {
  display: inline-block; font-family: ui-serif, Georgia, serif; font-size: 0.95rem;
  color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; text-decoration: none;
}
footer { max-width: 46rem; margin: 0 auto; padding: 0 1.5rem 3rem; }
footer p { font-size: 0.78rem; color: var(--ink-faint); }

@media (max-width: 640px) {
  .phase { grid-template-columns: 1.5rem 1fr; gap: 0 1rem; padding-bottom: 4rem; }
  .rail-line { bottom: -4rem; }
  .phase h2 { font-size: 1.3rem; }
}
