/* The Liminal Road, look "Road" (option B, the scrolling road map). Sand look from views/sand/style.css. Written Sat 31 Oct 2026 by Claude (course designer). */
:root {
  --night: #100d14; --cream: #efe3cc; --cream-2: rgba(239, 227, 204, .74); --cream-3: rgba(239, 227, 204, .52); --line: rgba(239, 227, 204, .16);
  --sans: system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --gutter: clamp(18px, 4.4vw, 64px);
  --top: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; background: var(--night); color: var(--cream); font: 400 16px/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: #111; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid #7fb4ff; outline-offset: 3px; }

#sand { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; display: none; }
.engine-on #sand { display: block; }


main { position: relative; z-index: 1; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; opacity: .85; }
.grain-dot { width: 9px; height: 9px; border-radius: 50%; background: conic-gradient(#E8B04B, #C8402F, #6FA8A6, #3B3F8C, #E07A2E, #E8B04B); flex: none; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 650; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.btn.primary { background: var(--acc, var(--cream)); color: var(--acc-ink, #15110f); }
.btn.quiet { background: transparent; padding: 0 6px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.btn.primary:hover { transform: translateY(-1px); }
.fine { font-size: 13px; color: var(--cream-3); }

/* ---------- hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; padding: calc(var(--top) + 110px) var(--gutter) 56px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-rows: 1fr auto; column-gap: clamp(28px, 5vw, 80px); align-items: center; position: relative; }
.hero-copy { max-width: 760px; }
#headline { margin: 0 0 26px; font-size: clamp(3.1rem, 7.6vw, 7.6rem); line-height: .94; letter-spacing: -.045em; font-weight: 820; }
#headline .h-a { font-family: var(--sans); }
#headline .h-b { display: block; font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -.02em; margin-top: .06em; background: linear-gradient(90deg, #E8B04B, #C8402F, #C8643C, #D88A8A, #6FA8A6, #6B8F5A, #3B3F8C, #E07A2E, #C9A227); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sand-on #headline .h-a, .sand-on #headline .h-b { color: transparent; -webkit-text-fill-color: transparent; background: none; }
.lede { font-size: clamp(1.02rem, 1.25vw, 1.2rem); max-width: 36em; color: var(--cream-2); margin: 0 0 30px; }
.lede em { font-family: var(--serif); color: var(--cream); font-size: 1.08em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.hero-status { margin: 22px 0 0; font-size: 13px; color: var(--cream-3); max-width: 36em; }
.hint { grid-column: 1 / -1; margin: 30px 0 0; font-size: 13px; opacity: .6; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.hint::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hint .h-wind { display: none; }
.wind-on .hint .h-wind { display: inline; }

/* the legend: the twelve places as a column of lamps */
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; align-self: center; }
.legend a { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 7px 10px; border-radius: 12px; font-size: 14px; color: var(--cream-2); }
.legend a:hover { background: rgba(255, 255, 255, .06); color: var(--cream); }
.legend i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 70%, transparent); flex: none; }
.legend b { font-weight: 650; color: var(--cream); }
.legend span { opacity: .7; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- the stops ---------- */
.stop { position: relative; height: 190vh; color: var(--cream); background: var(--bg); }
.sand-on .stop { background: transparent; }
.stop-in { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 64px); padding: 84px var(--gutter) 40px; }
.card { max-width: 600px; }
.tag { font-size: 12px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; color: var(--acc); margin: 0 0 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tag i { font-style: normal; color: var(--cream-3); }
.tag .draft { font-style: normal; font-weight: 600; letter-spacing: .08em; font-size: 11px; color: var(--cream-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.stop h2 { font-size: clamp(2.2rem, 4.2vw, 3.9rem); line-height: .98; letter-spacing: -.04em; margin: 0 0 16px; font-weight: 800; }
.stop h2 small { display: block; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: .52em; letter-spacing: -.01em; color: var(--acc); margin-top: .2em; }
.meaning { font-family: var(--serif); font-size: clamp(1.08rem, 1.35vw, 1.3rem); line-height: 1.45; margin: 0 0 14px; color: var(--cream); max-width: 32em; }
.psych { font-size: clamp(.95rem, 1.05vw, 1.02rem); margin: 0 0 14px; color: var(--cream-2); max-width: 36em; }
.psych b { color: var(--cream); font-weight: 650; }
.and { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--acc); font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--cream); background: rgba(255, 255, 255, .04); border-radius: 0 12px 12px 0; }
.and b { font-style: normal; font-weight: 750; color: var(--acc); letter-spacing: .04em; }
.covers { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.covers li { border: 1px solid color-mix(in srgb, var(--cream) 24%, transparent); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--cream-2); }
.levels { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; border-top: 1px solid var(--line); }
.levels li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; font-size: 13px; color: var(--cream-2); padding: 6px 0; border-bottom: 1px solid var(--line); }
.levels b { color: var(--acc); font-weight: 750; letter-spacing: .06em; font-size: 12px; text-transform: uppercase; padding-top: 1px; }
.levels em { font-style: normal; color: var(--cream-3); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13px; color: var(--cream-3); margin: 0; }
.meta .practice b { color: var(--cream-2); font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); flex: none; }
.art { appearance: none; border: 0; background: transparent; padding: 0; width: 100%; height: 100%; max-height: calc(100svh - 140px); position: relative; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; border-radius: 24px; display: block; }
.scooping .art { cursor: grabbing; }
.art .still { position: absolute; inset: 0; margin: auto; width: min(100%, calc(100svh - 150px)); height: auto; aspect-ratio: 1; }
.still { display: block; object-fit: contain; }
.sand-on .still { visibility: hidden; }

/* ---------- levels and contact ---------- */
.levels-all { padding: 18vh var(--gutter) 10vh; }
.levels-in, .contact-in { max-width: 1180px; margin: 0 auto; }
.levels-all h2, .contact h2 { font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1; letter-spacing: -.04em; margin: 0 0 40px; font-weight: 800; max-width: 15em; }
.levels-all h2 em, .contact h2 em { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; color: #ffd27a; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
.three article { border-top: 1px solid var(--line); padding: 22px 0 0; }
.three span { font-size: 12px; letter-spacing: .14em; opacity: .55; text-transform: uppercase; }
.three h3 { font-size: 1.3rem; margin: 10px 0 8px; letter-spacing: -.01em; }
.three p { margin: 0; color: var(--cream-2); }
.contact { padding: 12vh var(--gutter) 0; }
.contact-in { padding-bottom: 34vh; }
.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0 0 60px; }
.contact-list div { border-top: 1px solid var(--line); padding-top: 16px; }
.contact-list dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .55; margin-bottom: 6px; }
.contact-list dd { margin: 0; font-size: 1.15rem; font-weight: 600; }
.contact-foot { display: flex; flex-wrap: wrap; gap: 10px 32px; align-items: center; font-size: 14px; color: var(--cream-2); }
.contact-foot p { margin: 0; }
.contact-foot .fine { flex-basis: 100%; }
.levels-all, .contact { background: #15110f; }
.sand-on .levels-all, .sand-on .contact { background: transparent; }
.contact { background-image: linear-gradient(to top, #E8B04B 0 2vh, #C8402F 2vh 4vh, #C8643C 4vh 5.5vh, #D88A8A 5.5vh 7vh, #6FA8A6 7vh 8.5vh, #A0522D 8.5vh 9.5vh, #6B8F5A 9.5vh 11vh, #3B3F8C 11vh 12vh, #E07A2E 12vh 13vh, #C9A227 13vh 14vh, #15110f 14vh); background-repeat: no-repeat; }
.sand-on .contact { background-image: none; }

/* ---------- the rail: where you are ---------- */
.rail { position: fixed; right: max(14px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); z-index: 30; display: flex; flex-direction: column; gap: 9px; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.rail.show { opacity: 1; pointer-events: auto; }
.rail a { width: 10px; height: 10px; border-radius: 50%; background: var(--c); opacity: .35; display: block; position: relative; transition: transform .2s ease, opacity .2s ease; }
.rail a[aria-current="true"] { opacity: 1; transform: scale(1.5); box-shadow: 0 0 14px var(--c); }
.rail a::after { content: attr(data-name); position: absolute; right: 20px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; color: var(--cream); background: rgba(16, 13, 20, .9); padding: 4px 9px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.rail a:hover::after, .rail a:focus-visible::after { opacity: 1; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .hero { display: block; padding: calc(var(--top) + 72px) var(--gutter) 44px; min-height: 0; }
  #headline { font-size: clamp(2.9rem, 13.6vw, 4.2rem); margin-bottom: 18px; }
  .lede { font-size: 1rem; margin-bottom: 22px; }
  .eyebrow .long { display: none; }
  .legend { margin-top: 30px; grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .legend a { padding: 6px 8px; }
  .hint { margin-top: 20px; }
  .stop { height: auto; }
  .stop-in { position: static; height: auto; display: flex; flex-direction: column; padding: 0 0 36px; }
  /* phone: each section is a transparent band (a window onto the sand, where its symbol sits) and an opaque card below it */
  .art { order: -1; flex: none; position: relative; height: 40svh; max-height: none; width: 100%; touch-action: pan-y; padding-top: 48px; cursor: default; }
  .art .still { width: calc(40svh - 48px); height: calc(40svh - 48px); inset: 48px 0 0; }
  .card { position: relative; z-index: 1; max-width: none; background: var(--bg); border-radius: 26px 26px 0 0; padding: 22px var(--gutter) 10px; }
  .stop h2 { font-size: clamp(1.9rem, 9vw, 2.5rem); margin-bottom: 12px; }
  .meaning { font-size: 1.05rem; }
  .psych { font-size: .95rem; }
  .levels li { grid-template-columns: 56px 1fr; }
  .three, .contact-list { grid-template-columns: minmax(0, 1fr); }
  .levels-all { padding-top: 12vh; }
  .rail { display: none; }
}
@media (prefers-reduced-motion: reduce) { .btn, .rail a { transition: none; } }

/* the leaving card fades as the sand pours out from under it (Chrome scroll timelines) */
@supports (animation-timeline: view()) {
  @media (min-width: 761px) {
    .sand-on .card { animation: card-out linear both; animation-timeline: view(); animation-range: exit 0% exit 55%; }
  }
  @keyframes card-out { to { opacity: 0; transform: translateY(-24px); } }
}
