/* story-flow-20261110.css
   One additive layer: connective motion, softer section seams and the
   "path" between offerings. Loaded last. Nothing here hides content unless
   story-flow JS has confirmed motion is welcome (html.fl-motion). */

:root {
  --fl-ease: cubic-bezier(.19, 1, .22, 1);
  --fl-ease-soft: cubic-bezier(.22, .61, .36, 1);
  --fl-panel-radius: clamp(22px, 2.8vw, 44px);
  --fl-panel-inset: clamp(8px, 1.4vw, 22px);
}

/* ---------- 1. Reading-progress thread under the header ---------- */
.fl-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--moss, #6e8b5a), var(--marigold, #e0a23a) 55%, var(--terracotta, #b4532f));
  transform: scaleX(var(--fl-progress, 0));
  transform-origin: 0 50%;
  opacity: .9;
}
.site-header { transition: box-shadow .35s ease, background-color .35s ease; }
.site-header.tn-scrolled { box-shadow: 0 10px 30px -18px rgba(36, 57, 44, .35); }

/* ---------- 2. Coloured chapters become inset, rounded panels ---------- */
main > section.section:is(.bg-olive, .bg-forest, .bg-sand, .bg-sage) {
  margin-inline: var(--fl-panel-inset);
  border-radius: var(--fl-panel-radius);
  position: relative;
  overflow: clip;
}
main > section.section:is(.bg-olive, .bg-forest) {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(110, 139, 90, .30), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(224, 162, 58, .10), transparent 55%),
    var(--olive-dark, #24392c);
}
main > section.section.bg-forest { background-color: var(--forest, #1f3226); }
main > section.section.bg-sage {
  background:
    radial-gradient(100% 90% at 100% 0%, rgba(255, 253, 249, .65), transparent 60%),
    var(--sage-soft, #e4eadc);
}
main > section.section.bg-sand {
  background:
    radial-gradient(100% 90% at 0% 0%, rgba(255, 253, 249, .6), transparent 60%),
    var(--sand, #f1e8d8);
}
/* Breathing room so a panel never touches the section before/after it. */
main > section.section:is(.bg-olive, .bg-forest, .bg-sand, .bg-sage) + section.section:is(.bg-olive, .bg-forest, .bg-sand, .bg-sage) {
  margin-top: var(--fl-panel-inset);
}

/* ---------- 3. Micro-interactions ---------- */
.btn svg { transition: transform .35s var(--fl-ease); }
.btn:hover svg:last-child, .btn:focus-visible svg:last-child { transform: translateX(4px); }
.text-link { position: relative; }
.text-link svg { transition: transform .35s var(--fl-ease); }
.text-link:hover svg { transform: translateX(5px); }
.card h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--fl-ease); }
.card:hover h3 a, .card h3 a:focus-visible { background-size: 100% 1px; }
.icon-row li .icon-circle { transition: transform .5s var(--fl-ease), background-color .3s ease, box-shadow .3s ease; }
.icon-row li:hover .icon-circle { transform: translateY(-4px) scale(1.06); box-shadow: 0 12px 24px -12px rgba(62, 90, 63, .5); }
.trust li { transition: transform .4s var(--fl-ease); }
.trust li:hover { transform: translateY(-2px); }

/* Photo frames get a soft inner edge so images sit "in" the page. */
.split-media, .card-media, .collage figure, .photo-pair > div { position: relative; isolation: isolate; }

/* ---------- 4. Motion (only when welcome) ---------- */
html.fl-motion .fl-img { clip-path: inset(0 0 100% 0 round var(--fl-r, 28px)); transition: clip-path 1.25s var(--fl-ease) var(--fl-d, 0ms); }
html.fl-motion .fl-img.fl-in { clip-path: inset(0 0 0 0 round var(--fl-r, 28px)); }
html.fl-motion .fl-img.fl-done { clip-path: none; transition: none; }
html.fl-motion .fl-img > picture,
html.fl-motion .fl-img > a > picture { display: block; scale: 1.2; transition: scale 1.7s var(--fl-ease) var(--fl-d, 0ms); transform-origin: 50% 50%; }
html.fl-motion .fl-img.fl-in > picture,
html.fl-motion .fl-img.fl-in > a > picture { scale: var(--fl-rest, 1); }

/* Headlines rise word by word from behind a baseline. */
.fl-w { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .06em .16em; margin: -.08em -.06em -.16em; }
.fl-w > span { display: inline-block; will-change: transform; }
html.fl-motion .fl-split .fl-w > span { transform: translateY(112%) rotate(2.5deg); transform-origin: 0 100%; transition: transform 1s var(--fl-ease) calc(var(--fl-i, 0) * 42ms); }
html.fl-motion .fl-split.fl-in .fl-w > span { transform: none; }
html:not(.fl-motion) .fl-w > span { transform: none !important; }

/* Supporting copy follows the headline in a short cascade. */
html.fl-motion .fl-rise { opacity: 0; transform: translateY(18px); transition: opacity .9s ease var(--fl-d, 0ms), transform 1.1s var(--fl-ease) var(--fl-d, 0ms); }
html.fl-motion .fl-rise.fl-in { opacity: 1; transform: none; }

/* Eyebrow dash draws itself. */
html.fl-motion .fl-eyebrow::before { transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s var(--fl-ease) .1s; }
html.fl-motion .fl-eyebrow.fl-in::before { transform: scaleX(1); }

/* Scroll-linked depth, compositor-only, where the browser supports it. */
@supports (animation-timeline: view()) {
  @media (min-width: 760px) {
    html.fl-motion .fl-par { --fl-rest: 1.09; }
    html.fl-motion .fl-par > picture {
      animation: fl-drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    html.fl-motion main > section.section:is(.bg-olive, .bg-forest, .bg-sand, .bg-sage) {
      animation: fl-panel linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    html.fl-motion .hero-home .tn-header-scene {
      animation: fl-scene linear both;
      animation-timeline: scroll(root);
      animation-range: 0 90vh;
    }
  }
}
@keyframes fl-drift { from { translate: 0 -3.6%; } to { translate: 0 3.6%; } }
@keyframes fl-panel { from { scale: .955; border-radius: calc(var(--fl-panel-radius) * 1.8); } to { scale: 1; } }
@keyframes fl-scene { to { translate: 0 -28px; opacity: .35; } }

/* ---------- 5. The day as a line you travel ---------- */
.timeline { --fl-day: 0; }
.fl-timeline::before {
  background-image: linear-gradient(var(--marigold, #e0a23a), var(--terracotta, #b4532f));
  background-size: 100% calc(var(--fl-day) * 100%);
  background-repeat: no-repeat;
  border-radius: 2px;
  transition: background-size .25s linear;
}
.fl-timeline li::before { transition: background-color .5s ease, transform .6s var(--fl-ease), box-shadow .5s ease; }
.fl-timeline li.fl-past::before { background: var(--terracotta, #b4532f); }
.fl-timeline li.fl-now::before { background: var(--marigold, #e0a23a); transform: scale(1.45); box-shadow: 0 0 0 4px var(--paper, #fffdf9), 0 0 0 9px rgba(224, 162, 58, .22); }
.fl-timeline li > div, .fl-timeline li > time { transition: opacity .5s ease, transform .6s var(--fl-ease); }
html.fl-motion .fl-timeline li:not(.fl-past):not(.fl-now) > div,
html.fl-motion .fl-timeline li:not(.fl-past):not(.fl-now) > time { opacity: .62; }
html.fl-motion .fl-timeline li.fl-now > div { transform: translateX(6px); }

/* Numbers that count keep their width while they do. */
.kicker-stats strong { font-variant-numeric: tabular-nums; }
.fl-count { position: relative; color: transparent !important; }
.fl-count::after { counter-reset: fln var(--fl-n, 0); content: counter(fln); position: absolute; left: 0; top: 0; color: var(--fl-c, currentColor); }

/* ---------- 6. Chapter rail (long pages, wide screens) ---------- */
.fl-rail { display: none; }
@media (min-width: 1280px) and (min-height: 620px) {
  .fl-rail {
    position: fixed;
    right: clamp(14px, 1.6vw, 28px);
    top: 50%;
    z-index: 30;
    display: block;
    transform: translateY(-50%);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease;
  }
  .fl-rail.fl-show, .fl-rail:focus-within { visibility: visible; opacity: 1; pointer-events: auto; }
  .fl-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; justify-items: end; }
  .fl-rail a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    height: 20px;
    text-decoration: none;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--olive-dark, #24392c);
  }
  .fl-rail a span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 253, 249, .94);
    box-shadow: 0 6px 18px -8px rgba(36, 57, 44, .45);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .3s ease, transform .45s var(--fl-ease);
    white-space: nowrap;
    pointer-events: none;
  }
  .fl-rail a::after {
    content: "";
    flex: none;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--olive, #3e5a3f);
    box-shadow: 0 0 0 1.5px rgba(255, 253, 249, .8);
    opacity: .38;
    transition: width .45s var(--fl-ease), opacity .3s ease, background-color .3s ease;
  }
  .fl-rail a:hover span, .fl-rail a:focus-visible span { opacity: 1; transform: none; }
  .fl-rail a:hover::after, .fl-rail a:focus-visible::after { opacity: .9; width: 22px; }
  .fl-rail a[aria-current="true"]::after { width: 30px; opacity: 1; background: var(--terracotta, #b4532f); }
  body.nav-open .fl-rail, body:has(dialog[open]) .fl-rail, body:has(.lightbox.open) .fl-rail { visibility: hidden; opacity: 0; pointer-events: none; }
}

/* ---------- 7. "Your path" — the thread between offerings ---------- */
.fl-path {
  padding: clamp(44px, 6vw, 84px) 0 clamp(48px, 6vw, 88px);
  background:
    radial-gradient(70% 120% at 50% 120%, rgba(169, 184, 154, .28), transparent 70%),
    var(--cream, #fbf7ef);
  border-top: 1px solid var(--line, #e6dccb);
}
.fl-path-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 32px; margin-bottom: clamp(26px, 3vw, 42px); }
.fl-path-head .eyebrow { margin-bottom: .5em; }
.fl-path-title { font-family: var(--serif); font-weight: 500; color: var(--charcoal); font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; margin: 0; }
.fl-path-title em { font-style: italic; color: var(--terracotta-dark, #933f21); }
.fl-path ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: flstep; position: relative; }
.fl-path li { counter-increment: flstep; position: relative; }
.fl-path li a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line, #e6dccb);
  background: rgba(255, 253, 249, .7);
  color: var(--charcoal);
  text-decoration: none;
  transition: transform .5s var(--fl-ease), box-shadow .4s ease, border-color .3s ease, background-color .3s ease;
}
.fl-path li a::before {
  content: counter(flstep);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--sage, #a9b89a);
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--olive-dark, #24392c);
  background: var(--paper, #fffdf9);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .5s var(--fl-ease);
}
.fl-path li strong { display: block; font-size: 1rem; line-height: 1.25; font-weight: 600; }
.fl-path li small { display: block; margin-top: 2px; font-size: .84rem; line-height: 1.35; color: var(--muted, #5f665f); }
.fl-path li svg { width: 18px; height: 18px; color: var(--terracotta-dark, #933f21); opacity: 0; transform: translateX(-6px); transition: opacity .3s ease, transform .5s var(--fl-ease); }
.fl-path li a:hover, .fl-path li a:focus-visible { transform: translateY(-3px); border-color: var(--sage, #a9b89a); background: var(--paper, #fffdf9); box-shadow: 0 18px 36px -22px rgba(36, 57, 44, .45); }
.fl-path li a:hover svg, .fl-path li a:focus-visible svg, .fl-path li.fl-next svg { opacity: 1; transform: none; }
.fl-path li a:hover::before { transform: scale(1.06); }
.fl-path li.fl-seen a::before { background: var(--sage-soft, #e4eadc); border-color: var(--sage-soft, #e4eadc); }
.fl-path li.fl-here a { border-color: var(--olive, #3e5a3f); background: var(--paper, #fffdf9); }
.fl-path li.fl-here a::before { background: var(--olive, #3e5a3f); border-color: var(--olive, #3e5a3f); color: #fff; }
.fl-path li.fl-next a { border-color: rgba(180, 83, 47, .45); background: var(--terracotta-soft, #f6e3d8); }
.fl-path li.fl-next a::before { border-color: var(--terracotta, #b4532f); color: var(--terracotta-dark, #933f21); }
.fl-path .fl-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; vertical-align: 2px; }
.fl-path li.fl-here .fl-tag { background: var(--sage-soft, #e4eadc); color: var(--olive-dark, #24392c); }
.fl-path li.fl-next .fl-tag { background: var(--terracotta, #b4532f); color: #fff; }
.fl-path-alt { margin: 22px 0 0; font-size: .92rem; color: var(--muted, #5f665f); }
.fl-path-alt a { color: var(--terracotta-dark, #933f21); font-weight: 600; }

@media (min-width: 900px) {
  .fl-path ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
  /* The connecting thread. */
  .fl-path ol::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 19px;
    height: 1.5px;
    background: linear-gradient(90deg, var(--sage, #a9b89a) var(--fl-path-done, 0%), var(--line, #e6dccb) var(--fl-path-done, 0%));
    transform-origin: 0 50%;
  }
  html.fl-motion .fl-path ol::before { transform: scaleX(0); transition: transform 1.6s var(--fl-ease) .15s; }
  html.fl-motion .fl-path.fl-in ol::before { transform: none; }
  .fl-path li a {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
    padding: 0 10px 14px;
    border: 0;
    border-radius: 18px;
    background: none;
  }
  .fl-path li a:hover, .fl-path li a:focus-visible, .fl-path li.fl-here a, .fl-path li.fl-next a { background: none; box-shadow: none; border: 0; }
  .fl-path li a:hover, .fl-path li a:focus-visible { transform: translateY(-4px); }
  .fl-path li a::before { position: relative; z-index: 1; box-shadow: 0 0 0 8px var(--cream, #fbf7ef); }
  .fl-path li svg { display: none; }
  .fl-path li.fl-next a::before { background: var(--terracotta, #b4532f); color: #fff; box-shadow: 0 0 0 8px var(--cream, #fbf7ef), 0 0 0 9.5px rgba(180, 83, 47, .35); }
  .fl-path li strong { font-size: 1.02rem; }
  .fl-path .fl-tag { display: block; width: max-content; margin: 6px auto 0; }
  html.fl-motion .fl-path li { opacity: 0; transform: translateY(14px); transition: opacity .8s ease calc(var(--fl-i, 0) * 110ms + .2s), transform 1s var(--fl-ease) calc(var(--fl-i, 0) * 110ms + .2s); }
  html.fl-motion .fl-path.fl-in li { opacity: 1; transform: none; }
}

/* ---------- 8. Phones: card rows become swipeable shelves on the homepage ---------- */
@media (max-width: 759px) {
  main:has(> .hero-home) .stay-lengths,
  main:has(> .hero-home) .grid.grid-3:has(> .card) {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter, 20px);
    margin-inline: calc(var(--gutter, 20px) * -1);
    padding: 6px var(--gutter, 20px) 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  main:has(> .hero-home) .stay-lengths::-webkit-scrollbar,
  main:has(> .hero-home) .grid.grid-3:has(> .card)::-webkit-scrollbar { display: none; }
  main:has(> .hero-home) .stay-lengths > *,
  main:has(> .hero-home) .grid.grid-3:has(> .card) > * {
    flex: 0 0 82%;
    scroll-snap-align: start;
    margin: 0;
  }
  .fl-dots { display: flex; justify-content: center; gap: 7px; margin: 2px 0 6px; }
  .fl-dots i { width: 6px; height: 6px; border-radius: 6px; background: var(--sand-deep, #e3d5bc); transition: width .45s var(--fl-ease), background-color .3s ease; }
  .fl-dots i.fl-on { width: 20px; background: var(--terracotta, #b4532f); }
}
@media (min-width: 760px) { .fl-dots { display: none; } }

/* ---------- 9. Fluid page-to-page transitions (desktop, motion welcome) ---------- */
@media (min-width: 1080px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: fl-header; }
  ::view-transition-old(root) { animation: fl-away .22s ease both; }
  ::view-transition-new(root) { animation: fl-arrive .55s var(--fl-ease-soft) both; }
  ::view-transition-group(fl-header) { animation-duration: .01s; }
  html.tn-reduce-motion::view-transition-old(root),
  html.tn-reduce-motion::view-transition-new(root) { animation: none; }
}
@keyframes fl-away { to { opacity: 0; transform: translateY(-8px); } }
@keyframes fl-arrive { from { opacity: 0; transform: translateY(14px); } }

/* ---------- 10. Always-safe fallbacks ---------- */
@media (prefers-reduced-motion: reduce) {
  .fl-progress, .fl-timeline::before, .fl-timeline li::before { transition: none; }
  .btn svg, .text-link svg, .fl-path li a, .fl-path li a::before, .icon-row li .icon-circle, .trust li { transition: none !important; transform: none !important; }
}
html.tn-reduce-motion .fl-timeline::before, html.tn-reduce-motion .fl-timeline li::before { transition: none; }
html.tn-reduce-motion .fl-path li a, html.tn-reduce-motion .icon-row li .icon-circle, html.tn-reduce-motion .trust li { transition: none !important; transform: none !important; }
@media print {
  .fl-rail, .fl-progress, .fl-dots { display: none !important; }
  main > section.section { margin-inline: 0 !important; border-radius: 0 !important; }
}
