/* =========================================
   Scott Nelson Dow — Portfolio
   Clean, restrained design system
========================================= */

:root {
  --ink: #171717;
  --paper: #ffffff;
  --soft: #f6f6f4;
  --muted: #686868;
  --line: #ddddda;
  --accent: #3b5f7a;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
}

strong {
  font-weight: 600;
}

.container {
  width: min(92%, var(--max-width));
  margin: 0 auto;
}

.narrow {
  width: min(92%, 780px);
  margin-left: auto;
  margin-right: auto;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: .025em;
}


/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
}

nav a:hover {
  color: var(--ink);
}


/* Homepage hero */

.editorial-hero {
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-status,
.section-kicker,
.project-year,
.hero-facts span,
.case-meta span,
.flow-kicker {
  font-size: .72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.editorial-title {
  margin: 1.5rem 0 2.25rem;
  max-width: 850px;
  font-size: clamp(3rem, 6vw, 5.3rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 600;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 5rem;
  align-items: start;
}

.editorial-intro {
  margin: 0;
  max-width: 700px;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1.5;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.hero-facts span {
  display: block;
  margin-bottom: .5rem;
}

.hero-facts p {
  margin: 0;
  color: var(--ink);
  font-size: .88rem;
  line-height: 1.45;
}


/* Shared section structure */

.editorial-section,
.section {
  padding: 6.5rem 0;
  border-bottom: 1px solid var(--line);
}

.section-heading-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.section-kicker {
  margin: 0;
  color: var(--accent);
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.editorial-section-title,
.section h2 {
  margin: 0 0 1.5rem;
  max-width: 820px;
  font-size: clamp(2.15rem, 4vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 600;
}

.large-copy {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink) !important;
}


/* Work */

.work-section {
  background: var(--soft);
}

.project-row {
  display: grid;
  grid-template-columns: 52px 1fr 42px;
  gap: 1.5rem;
  padding: 2.75rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.project-row:last-child {
  border-bottom: 1px solid var(--line);
}

.project-number {
  padding-top: .25rem;
  color: var(--muted);
  font-size: .78rem;
}

.project-year {
  margin: 0 0 .75rem;
}

.project-row h2 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 600;
}

.project-subtitle,
.case-study-subtitle {
  margin: .6rem 0 0;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 600;
}

.project-description {
  max-width: 760px;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: .98rem;
}

.project-arrow {
  align-self: center;
  justify-self: end;
  color: var(--muted);
  font-size: 1.5rem;
}


/* About */

.editorial-split {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 5rem;
}

.about-copy {
  max-width: 720px;
}

.about-copy p {
  color: var(--muted);
}

.about-copy .large-copy {
  margin-top: 0;
}


/* Experience */

.experience-editorial {
  background: var(--soft);
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline-row h3 {
  margin: 0 0 .2rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.timeline-row p {
  margin: 0;
  color: var(--muted);
}

.timeline-row span {
  color: var(--muted);
  font-size: .7rem;
}


/* Contact */

.contact-editorial {
  padding: 7rem 0;
  background: var(--ink);
  color: #ffffff;
}

.contact-editorial .section-kicker {
  color: #b9c7d1;
}

.contact-editorial h2 {
  margin: 1.5rem 0 0;
  max-width: 820px;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 600;
}

.contact-lead {
  margin: 1.25rem 0 2.5rem;
  color: #b9b9b9;
  font-size: 1.1rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-actions a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid #777;
  padding-bottom: .2rem;
}

.contact-actions a:hover {
  border-color: #ffffff;
}


/* Footer */

.editorial-footer,
footer {
  padding: 1.6rem 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .82rem;
}

.footer-content p {
  margin: 0;
}


/* Case studies */

.case-hero {
  padding: 6.5rem 0 5rem;
  background: var(--soft);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.case-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 5rem;
  align-items: end;
}

.eyebrow,
.section-label {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.case-title {
  margin: 0;
  max-width: 900px;
  color: var(--ink);
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 1.03;
  letter-spacing: -.04em;
  font-weight: 600;
}

.case-subtitle {
  margin: .9rem 0 0;
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
}

.hero-copy {
  max-width: 760px;
  margin: 1.7rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.55;
}

.case-meta {
  padding-left: 1.75rem;
  border-left: 1px solid var(--line);
}

.case-meta div {
  margin-bottom: 1.4rem;
}

.case-meta span {
  display: block;
  margin-bottom: .25rem;
}

.case-meta strong {
  display: block;
  color: var(--ink);
  font-size: .95rem;
  line-height: 1.45;
  font-weight: 600;
}

.alt-section {
  background: var(--soft);
}

.section p {
  color: var(--muted);
}

.section p strong {
  color: var(--ink);
}

.two-column {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 5rem;
}

.flow-diagram {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr auto 1.15fr auto 1fr auto 1fr;
  gap: .9rem;
  align-items: stretch;
}

.flow-box {
  min-height: 170px;
  padding: 1.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flow-box-accent {
  border-color: var(--accent);
}

.flow-box strong {
  font-size: 1rem;
  font-weight: 600;
}

.flow-box p {
  margin-bottom: 0;
  font-size: .88rem;
}

.flow-kicker {
  margin-bottom: .45rem;
  color: var(--accent);
}

.flow-arrow {
  align-self: center;
  color: var(--muted);
  font-size: 1.4rem;
}

.case-quote {
  margin: 2.5rem 0 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.5;
}

.role-grid,
.principles-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}

.role-card,
.principles-grid > div {
  min-height: 190px;
  padding: 1.75rem 1.75rem 1.75rem 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.role-card:nth-child(odd),
.principles-grid > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.role-card:nth-child(even),
.principles-grid > div:nth-child(even) {
  padding-left: 1.75rem;
}

.role-card h3,
.principles-grid h3 {
  margin: 0 0 .75rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.logic-example {
  margin-top: 2rem;
  padding: 1.4rem;
  background: var(--soft);
  border: 1px solid var(--line);
}

.logic-example span,
.logic-example strong {
  display: block;
}

.logic-example span {
  margin-bottom: .2rem;
  color: var(--muted);
}

.logic-example strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.ops-flow {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.ops-step {
  min-height: 210px;
  padding: 1.35rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ops-step span {
  display: block;
  margin-bottom: 2rem;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: .7rem;
}

.ops-step strong {
  display: block;
  margin-bottom: .5rem;
  font-size: 1rem;
}

.ops-step p {
  margin-bottom: 0;
  font-size: .88rem;
}

.button {
  display: inline-block;
  padding: .75rem 1.05rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.button:hover {
  background: var(--ink);
  color: #ffffff;
}

.case-back {
  margin-top: 2.5rem;
}


/* Responsive */

@media (max-width: 960px) {
  .hero-bottom,
  .editorial-split,
  .case-hero-grid,
  .two-column {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .hero-facts {
    max-width: 700px;
  }

  .case-meta {
    padding-left: 0;
    padding-top: 1.75rem;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .flow-diagram {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .ops-flow {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav {
    min-height: auto;
    padding: 1rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    gap: 1rem;
    overflow-x: auto;
  }

  .editorial-hero {
    padding: 4rem 0 3.5rem;
  }

  .editorial-title {
    font-size: 3rem;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .editorial-section,
  .section {
    padding: 4.5rem 0;
  }

  .section-heading-row {
    grid-template-columns: 1fr;
    gap: .65rem;
  }

  .project-row {
    grid-template-columns: 36px 1fr;
    gap: 1rem;
    padding: 2.3rem 0;
  }

  .project-arrow {
    display: none;
  }

  .principle-row {
    grid-template-columns: 36px 1fr;
  }

  .principle-row p {
    grid-column: 2;
  }

  .role-grid,
  .principles-grid {
    grid-template-columns: 1fr;
  }

  .role-card:nth-child(odd),
  .principles-grid > div:nth-child(odd) {
    border-right: 0;
  }

  .role-card:nth-child(even),
  .principles-grid > div:nth-child(even) {
    padding-left: 0;
  }

  .ops-flow {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
  }
}


@media (max-width: 900px) {
  .principles-scroll-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .principles-sticky {
    position: relative;
    top: auto;
    padding: 4.5rem 0 2rem;
    background: var(--paper);
    z-index: 2;
  }

  .principles-sticky h2 {
    max-width: 650px;
  }

  .principles-progress {
    display: none;
  }

  .principles-sequence {
    border-left: 0;
  }

  .principle-panel {
    min-height: auto;
    padding: 3rem 0;
    opacity: 1;
    transform: none;
    border-left: 0;
  }

  .principle-panel.is-active {
    padding-left: 0;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .principle-panel {
    transition: none;
    transform: none;
  }
}


/* About me */

.about-me-section {
  background: var(--paper);
}

.about-me-layout {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 4rem;
  align-items: center;
}

.about-me-photo-wrap {
  width: 100%;
  max-width: 180px;
}

.about-me-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
  border: 1px solid var(--line);
}


.about-me-caption {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
}

.about-me-copy {
  max-width: 720px;
}

.about-me-copy .large-copy {
  margin-top: 0;
}

@media (max-width: 860px) {
  .about-me-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-me-photo-wrap {
    max-width: 420px;
    margin-inline: auto;
  }

  .about-me-photo {
    aspect-ratio: auto;
    object-fit: contain;
  }
}


/* =========================================
   Accessibility hardening
========================================= */

/* Keyboard users can bypass repeated navigation. */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: #ffffff;
  border: 2px solid #ffffff;
  text-decoration: none;
  font-weight: 600;
  transform: translateY(-180%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Clear, consistent focus indication for keyboard navigation. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

/* Make the focus ring especially clear on the dark contact area. */
.contact-editorial a:focus-visible {
  outline-color: #ffffff;
}

/* Avoid scroll animation when the user has requested reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* =========================================================
   Work Principles v3 — editorial scroll treatment
   Inspired by the structure/rhythm of Jerry Hoglen's
   principles section, adapted to Scott's visual system.
   ========================================================= */

.work-principles {
  padding: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.work-principles > .container {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
  gap: clamp(3.5rem, 7vw, 7rem);
  align-items: start;
}

.work-principles-heading {
  position: sticky;
  top: 112px;
  align-self: start;
  margin: 0;
  padding: 7rem 0;
}

.work-principles-heading h2 {
  margin: 1rem 0 1.2rem;
  max-width: 470px;
  font-size: clamp(2.25rem, 4vw, 3.8rem);
  line-height: 1.06;
  letter-spacing: -.04em;
  font-weight: 600;
}

.work-principles-intro {
  margin: 0;
  max-width: 430px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.work-principles-list {
  border-top: 0;
}

.work-principle {
  min-height: 72vh;
  padding: 16vh 0 12vh;
  border: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: .48;
  transform: translateY(16px);
  transition:
    opacity .42s ease,
    transform .42s ease;
}

.work-principle:first-child {
  border-top: 1px solid var(--line);
}

.work-principle:last-child {
  border-bottom: 0;
}

.work-principle.is-active {
  opacity: 1;
  transform: translateY(0);
}

.work-principle-index {
  display: block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: .75rem;
  transition: color .3s ease;
}

.work-principle h3 {
  margin: 0 0 1rem;
  max-width: 700px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 600;
}

.work-principle p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.68;
}

/* JS disabled: do not hide or mute essential content. */
.work-principles:not(.js-ready) .work-principle {
  opacity: 1;
  transform: none;
}

/* Mobile: same editorial feel, no sticky column and no cramped rail. */
@media (max-width: 760px) {
  .work-principles {
    padding: 0;
  }

  .work-principles > .container {
    display: block;
    width: auto;
    margin: 0;
    padding-left: 22px;
    padding-right: 22px;
  }

  .work-principles-heading {
    position: static;
    top: auto;
    padding: 4rem 0 2rem;
  }

  .work-principles-heading h2 {
    margin-top: .8rem;
    margin-bottom: 1rem;
    max-width: none;
    font-size: clamp(2rem, 9.5vw, 2.65rem);
    line-height: 1.08;
  }

  .work-principles-intro {
    max-width: none;
    font-size: .98rem;
    line-height: 1.6;
  }

  .work-principles-list {
    border-top: 1px solid var(--line);
  }

  .work-principle,
  .work-principle:first-child {
    min-height: 0;
    padding: 2rem 0 2.15rem;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .38s ease, transform .38s ease;
  }

  .work-principle.is-active,
  .work-principle.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .work-principle h3 {
    max-width: none;
    font-size: clamp(1.6rem, 7vw, 2rem);
    line-height: 1.16;
  }

  .work-principle p {
    max-width: none;
    font-size: 1rem;
    line-height: 1.62;
  }

  .work-principles:not(.js-ready) .work-principle {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-principle,
  .work-principle.is-active,
  .work-principle.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* =========================================================
   Work Principles v4 — stability refinements only
   ========================================================= */

/* Keep the sticky heading clear of the sticky site header. */
@media (min-width: 761px) {
  .work-principles-heading {
    top: 96px;
  }

  .work-principle {
    scroll-margin-top: 120px;
  }
}

/* Mobile: no sticky positioning; preserve normal page rhythm. */
@media (max-width: 760px) {
  .work-principles-heading {
    position: static;
  }

  .work-principle {
    min-height: 0;
  }
}


/* =========================================================
   Work Principles v5 — tighter spacing + top alignment
   ========================================================= */

@media (min-width: 761px) {
  .work-principles-heading {
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
  }

  .work-principle {
    min-height: 0;
    padding: 4.5rem 0;
    justify-content: flex-start;
  }

  .work-principle:first-child {
    padding-top: 5.5rem;
  }
}

@media (max-width: 760px) {
  .work-principles-heading {
    padding-top: 3.25rem;
    padding-bottom: 1.5rem;
  }

  .work-principle,
  .work-principle:first-child {
    padding-top: 1.55rem;
    padding-bottom: 1.7rem;
  }
}


/* =========================================================
   Work Principles v6 — heading spacing correction
   ========================================================= */

@media (min-width: 761px) {
  .work-principles-heading {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }

  .work-principles-heading h2 {
    margin-top: .65rem;
    margin-bottom: .75rem;
  }

  .work-principles-intro {
    line-height: 1.5;
  }

  .work-principle:first-child {
    padding-top: 3rem;
  }
}

@media (max-width: 760px) {
  .work-principles-heading {
    padding-top: 2.5rem;
    padding-bottom: 1.15rem;
  }

  .work-principles-heading h2 {
    margin-top: .55rem;
    margin-bottom: .7rem;
  }

  .work-principle,
  .work-principle:first-child {
    padding-top: 1.4rem;
    padding-bottom: 1.55rem;
  }
}


/* =========================================================
   Selected Work — tighter section spacing
   ========================================================= */
.work-section {
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
}

.work-section .section-heading-row {
  margin-bottom: 1.5rem;
}

@media (max-width: 760px) {
  .work-section {
    padding-top: 3rem;
    padding-bottom: 3.75rem;
  }

  .work-section .section-heading-row {
    margin-bottom: 1.25rem;
  }
}


/* =========================================
   Principles — pastel active backgrounds
   ========================================= */

.work-principle:nth-child(1) {
  --principle-bg: #EEF4F8; /* pale blue-gray */
}

.work-principle:nth-child(2) {
  --principle-bg: #EEF5EE; /* pale sage */
}

.work-principle:nth-child(3) {
  --principle-bg: #F7F3E8; /* pale warm cream */
}

.work-principle:nth-child(4) {
  --principle-bg: #F2F0F7; /* pale lavender-gray */
}

.work-principle {
  background-color: transparent;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  transition:
    background-color .65s ease,
    opacity .42s ease,
    transform .42s ease;
}

.work-principle.is-active {
  background-color: var(--principle-bg);
}

@media (max-width: 760px) {
  .work-principles > .container {
    padding-left: 22px;
    padding-right: 22px;
  }

  .work-principle,
  .work-principle:first-child,
  .work-principle.is-active,
  .work-principle.is-visible {
    margin-left: 0;
    margin-right: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .work-principle.is-visible {
    background-color: var(--principle-bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-principle {
    transition: none;
  }
}

/* =========================================================
   Hero — "Make the path clear."
   Ribbon path anchored to the word "path"
   Bottom-to-top reveal
   ========================================================= */

.hero-path-title {
  position: relative;
  max-width: 1000px;
  overflow: visible;
}

.path-word {
  position: relative;
  display: inline-block;
  z-index: 0;
  isolation: isolate;
  white-space: nowrap;
}

.path-art {
  position: absolute;
  left: 49%;
  top: 50%;
  width: 6.15em;
  height: 3.15em;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  overflow: visible;
}

/* Exact ribbon-style path artwork */
.path-ribbon {
  position: absolute;
  left: -84%;
  top: 17%;
  width: 214%;
  max-width: none;
  height: auto;
  display: block;
  opacity: .30;
  transform-origin: center center;

  /* Reveal vertically: foreground first, then upward toward the destination. */
  clip-path: inset(100% 0 0 0);
  animation: ribbon-reveal-up 4.2s cubic-bezier(.28,.04,.17,1) .18s forwards;
}

/*
  Destination art shares the same anchor, but is shifted to the
  upper-right so the mountains sit at the narrow end of the ribbon.
*/
.path-destination-svg {
  position: absolute;
  left: 33%;
  top: -3%;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Mountains */
.path-mountains {
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transform-origin: 625px 65px;
  animation: mountains-in 1.05s ease-out 4.08s forwards;
}

.mountain {
  stroke: none;
}

.mountain-back {
  fill: #d7dfd8;
  opacity: .36;
}

.mountain-front {
  fill: #b9c7bc;
  opacity: .40;
}

.mountain-mid {
  fill: #c8d3ca;
  opacity: .38;
}

/* Sun */
.path-sun-wrap {
  opacity: 0;
  transform: translateY(15px);
  transform-origin: 626px 24px;
  animation: sun-rise 1.3s cubic-bezier(.16,.75,.25,1) 4.9s forwards;
}

.path-sun {
  fill: #f2cf82;
  opacity: .38;
}

.sun-ray {
  stroke: #e5ba5b;
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0;
  vector-effect: non-scaling-stroke;
}

.ray-1 { animation: ray-in .34s ease-out 5.70s forwards; }
.ray-2 { animation: ray-in .34s ease-out 5.86s forwards; }
.ray-3 { animation: ray-in .34s ease-out 6.02s forwards; }
.ray-4 { animation: ray-in .34s ease-out 6.18s forwards; }
.ray-5 { animation: ray-in .34s ease-out 6.34s forwards; }

@keyframes ribbon-reveal-up {
  from {
    clip-path: inset(100% 0 0 0);
    opacity: .10;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: .30;
  }
}

@keyframes mountains-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sun-rise {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  42% {
    opacity: .5;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ray-in {
  from { opacity: 0; }
  to { opacity: .36; }
}

@media (max-width: 760px) {
  .hero-path-title {
    font-size: clamp(2.7rem, 13vw, 3.6rem);
    line-height: 1.02;
  }

  /* Keep the v26 composition intact; scale the whole artwork for iPhone. */
  .path-art {
    left: 24%;
    top: 53%;
    width: 5.15em;
    height: 2.85em;
    transform: translate(-50%, -50%) scale(.54);
  }

  .path-ribbon {
    left: -78%;
    top: 20%;
    width: 202%;
    opacity: .28;
  }

  /* Lower the destination slightly without altering the artwork itself. */
  .path-destination-svg {
    left: 31%;
    top: -3%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .path-ribbon {
    animation: none;
    clip-path: none;
    opacity: .30;
  }

  .path-mountains,
  .path-sun-wrap,
  .sun-ray {
    animation: none;
    opacity: .36;
    transform: none;
  }
}
