/* ============================================================
   STACKD LOCAL - "Inside the Assessment" OPEN CONCEPT
   Self-contained stylesheet (no dependency on /shared/styles.css)
   Concept: a scroll-driven walkthrough of one customer's path,
   with the customer's story on the left and the Assessment's
   checks on the right, joined by a filling route line.
   ============================================================ */

/* ---------- Tokens (from DESIGN.md) ---------- */
:root {
  --cream: #FBF8F3;
  --warm: #FFFAF2;
  --ink: #252018;
  --ink-soft: #5F5548;
  --muted: #817465;
  --green: #4A763B;
  --green-deep: #37592C;
  --green-hover: #5C8A3F;
  --green-soft: #E9F2E2;
  --green-band: #F1F5EE;
  --forest: #183F2C;
  --hairline: #E4D8C7;
  --white: #FFFFFF;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-ui: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--green); color: var(--white); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 240;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--forest);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}

/* ---------- Typography helpers ---------- */
.h-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.h-display em {
  font-style: italic;
  font-weight: 300;
  color: var(--green-deep);
}
.lede {
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: pretty;
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 12px;
  padding: 16px 30px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease-out), background 0.25s ease,
              color 0.25s ease, border-color 0.25s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn .arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary {
  background: var(--green-deep);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--green-deep);
  text-decoration: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.25s ease;
}
.tlink:hover { color: var(--green); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 110;
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--cream);
  border-bottom-color: var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; }
.nav-links a {
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1.5px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--green-deep); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-cta { padding: 11px 22px; font-size: 14px; border-radius: 10px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px; height: 44px;
  position: relative;
  z-index: 120;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin: 5px auto;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 105;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a:not(.btn) {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  transition: color 0.25s ease, padding-left 0.35s var(--ease-out);
}
.mobile-menu a:not(.btn):hover { color: var(--green-deep); padding-left: 10px; }
.mobile-menu a.active { color: var(--green-deep); }
.mobile-menu .btn { margin-top: 28px; align-self: flex-start; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}
.breadcrumb a {
  color: var(--green-deep);
  text-decoration: none;
  transition: color 0.25s ease;
}
.breadcrumb a:hover { color: var(--green); }

/* ============================================================
   THE CONCEPT - journey section
   ============================================================ */
.journey {
  position: relative;
  padding: 158px 0 130px;
  overflow: clip;
}
.journey > .wrap { position: relative; z-index: 2; }

.journey-head { max-width: 780px; margin-bottom: 64px; }
.journey-head h1 {
  font-size: clamp(38px, 4.8vw, 58px);
  margin: 0 0 24px;
}
.journey-head .lede { font-size: 18.5px; }
.journey-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
}


/* ---------- Body layout: rail + route ---------- */
.journey-body {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

/* ---------- Sticky rail (route map) ---------- */
.rail {
  position: sticky;
  top: 118px;
  padding-top: 8px;
}
.rail-title {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.rail-list { list-style: none; display: grid; gap: 2px; }
.rail-list a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  margin-left: -10px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.rail-list a:hover { color: var(--green-deep); background: rgba(233,242,226,.55); }
.rail-list a.active {
  color: var(--green-deep);
  border-left-color: var(--green);
  background: var(--green-soft);
}
.rail-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--green);
  flex: none;
  width: 20px;
}
.rail-label {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.rail-report .rail-num { font-style: normal; font-family: var(--font-ui); }

/* ---------- The route ---------- */
.route {
  --route-progress: 0%;
  position: relative;
  list-style: none;
}
.route-line {
  position: absolute;
  top: 84px;
  bottom: 96px;
  left: 50%;
  width: 2px;
  transform: translateX(-1px);
  background: var(--hairline);
}
.route-line-fill {
  position: absolute;
  inset: 0;
  background: var(--green);
  clip-path: inset(0 0 calc(100% - var(--route-progress)) 0);
  transition: clip-path 0.15s linear;
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
  column-gap: 30px;
  align-items: start;
  padding: 32px 0 38px;
}
.stop:first-child { padding-top: 8px; }
.stop:last-of-type { padding-bottom: 52px; }

.stop-node {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-top: 24px;
  border: 1.5px solid var(--hairline);
  border-radius: 10px 3px;
  background: var(--cream);
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.stop-node span {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  color: var(--muted);
  transition: color 0.5s var(--ease-out);
}
.stop.is-passed .stop-node {
  background: var(--green-deep);
  border-color: var(--green-deep);
}
.stop.is-passed .stop-node span { color: var(--white); }

/* ---------- Moment (customer side) ---------- */
.moment { grid-column: 1; grid-row: 1; padding-top: 20px; }
.moment-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 18px;
}
.moment-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.moment-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 12px 4px;
  background: var(--green-soft);
  color: var(--green-deep);
}
.moment-icon svg { width: 22px; height: 22px; }
.moment-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}
.moment-story {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---------- Review (assessment side) ---------- */
.review {
  grid-column: 3;
  grid-row: 1;
  background: var(--warm);
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--green-deep);
  border-radius: 4px;
  padding: 24px 26px 22px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
@media (hover: hover) {
  .review:hover {
    background: var(--green-band);
    border-color: rgba(74,118,59,.35);
  }
}
.review-label {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 10px;
}
.review-summary {
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.review-outcome {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--green-deep);
}
.review-outcome span {
  display: block;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}

/* ---------- The report artifact ---------- */
.report {
  grid-column: 2;
  margin-top: 24px;
  background: var(--warm);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
}
.report-head {
  padding: 46px 48px 34px;
  border-bottom: 1px solid var(--hairline);
  background: var(--warm);
}
.report-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 18px;
}
.report-head h2 { font-size: clamp(28px, 3.2vw, 40px); max-width: 22ch; }
.report-sub {
  margin-top: 16px;
  max-width: 60ch;
  font-size: 16px;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.report-contents {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  padding: 26px 48px 32px;
}
.report-contents li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.report-contents .report-plan { grid-column: 1 / -1; border-bottom: none; }
.report-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 20px;
  color: var(--green);
}
.report-contents h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.report-contents p {
  margin-top: 5px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.report-plan {
  margin-top: 8px;
  padding: 22px 24px !important;
  border: 1px solid rgba(74,118,59,.35);
  border-radius: 2px;
  background: var(--green-soft);
}
.report-plan .report-num { color: var(--green-deep); }

.report-foot {
  padding: 34px 48px 42px;
  border-top: 1px solid var(--hairline);
  background: var(--white);
}
.report-note {
  max-width: 58ch;
  font-size: 15.5px;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------- Final action ---------- */
.final-cta {
  padding: 92px 0 100px;
  border-top: 1px solid var(--hairline);
  background: var(--green-band);
}
.final-cta h2 { max-width: 820px; font-size: clamp(36px, 5vw, 62px); }
.final-cta-line { display: block; }
.final-cta-copy {
  max-width: 62ch;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 17px;
}
.final-actions { display: flex; align-items: center; gap: 24px; margin-top: 30px; }
.final-trust { margin-top: 20px; color: var(--muted); font-size: 13px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .moment.reveal { transition-delay: 0.05s; }
.js .review.reveal { transition-delay: 0.16s; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--hairline);
  padding: 22px 0;
}
.site-footer > .wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}
.footer-top { display: contents; }
.footer-brand img { height: 26px; width: auto; }
.footer-brand .by { font-family: var(--font-ui); font-size: 12px; color: var(--muted); margin-top: 5px; }
.footer-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  list-style: none;
}
.footer-links a {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.25s ease;
  white-space: nowrap;
}
.footer-links a:hover { color: var(--green-deep); }
.footer-bottom {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.footer-bottom a { color: inherit; text-decoration: none; transition: color 0.25s ease; }
.footer-bottom a:hover { color: var(--green-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .journey-body { grid-template-columns: 1fr; gap: 0; }
  .rail { display: none; }
  .report { grid-column: 1; }
}

@media (max-width: 900px) {
  .route-line { left: 27px; }
  .stop {
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 22px;
    padding: 34px 0 42px;
  }
  .stop-node { grid-column: 1; grid-row: 1; width: 54px; height: 54px; margin-top: 12px; }
  .moment { grid-column: 2; grid-row: 1; padding-top: 0; }
  .moment-story { max-width: none; }
  .review { grid-column: 2; grid-row: 2; margin-top: 22px; }
  .report-head, .report-contents, .report-foot { padding-left: 34px; padding-right: 34px; }
}

@media (max-width: 860px) {
  .nav-links, .site-header .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .site-footer > .wrap { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .footer-brand { text-align: center; }
  .footer-links { flex-wrap: wrap; gap: 10px 18px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .journey { padding: 108px 0 60px; }
  .journey-head { margin-bottom: 42px; }
  .journey-head h1 { font-size: clamp(31px, 8.6vw, 38px); margin: 20px 0; }
  .journey-head .lede { font-size: 16.5px; }
  .journey-actions { align-items: stretch; gap: 16px; margin-top: 26px; }
  .journey-actions .btn { width: 100%; }
  .journey-actions .tlink { justify-content: center; }
  .stop { grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; padding: 16px 0 22px; }
  .stop-node { width: 44px; height: 44px; margin-top: 8px; }
  .stop-node span { font-size: 16px; }
  .route-line { left: 21px; top: 60px; bottom: 72px; }
  .moment-stamp { margin-bottom: 10px; font-size: 11px; }
  .moment-head { gap: 11px; margin-bottom: 10px; }
  .moment-icon { width: 38px; height: 38px; border-radius: 10px 4px; }
  .moment-icon svg { width: 19px; height: 19px; }
  .moment-story { font-size: 15.5px; line-height: 1.5; }
  .review {
    margin-top: 12px;
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--hairline);
    background: transparent;
  }
  .review-label { display: none; }
  .review-summary { font-size: 14px; line-height: 1.48; }
  .review-summary::before {
    content: "Assessment checks: ";
    color: var(--green-deep);
    font-weight: 700;
  }
  .review-outcome { margin-top: 9px; padding-top: 9px; font-size: 14.5px; line-height: 1.45; }
  .review-outcome span { display: inline; margin: 0 4px 0 0; font-size: 9.5px; }
  .report-contents { grid-template-columns: 1fr; gap: 0; }
  .report-contents li { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  .report-contents .report-plan { border-bottom: none; }
  .report-head, .report-contents, .report-foot { padding-left: 22px; padding-right: 22px; }
  .report-head { padding-top: 28px; padding-bottom: 22px; }
  .report-contents { padding-top: 12px; padding-bottom: 18px; }
  .report-plan { margin-top: 4px; padding: 16px !important; }
  .report-foot { padding-top: 24px; padding-bottom: 26px; }
  .final-cta { padding: 60px 0 64px; }
  .final-actions { flex-direction: column; align-items: stretch; }
  .final-actions .btn { width: 100%; }
  .final-actions .tlink { justify-content: center; }
  .footer-links { gap: 9px 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .route-line-fill { transition: none; }
}
