/* Louisa Lu · top bar, progress line and the full-screen index */

/* ---------- Bar shell: full width over the hero, solid once past it, a floating pill deep in the page ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; pointer-events: none;
  transition: transform .55s var(--ease), color .35s;
}
.bar-in {
  position: relative; pointer-events: auto;
  display: flex; align-items: center; gap: clamp(10px, 1.4vw, 20px);
  max-width: 100%; margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gr) 16px var(--gl);
  transition: max-width .7s var(--ease), margin .55s var(--ease), padding .55s var(--ease), border-radius .55s var(--ease), background .35s, box-shadow .45s;
}
.bar.solid .bar-in {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px); padding-bottom: 10px;
}
.bar.pill .bar-in {
  max-width: min(1060px, calc(100% - 24px));
  margin-top: calc(env(safe-area-inset-top, 0px) + 10px);
  padding: 6px 6px 6px 22px; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent), 0 22px 44px -22px rgba(46, 50, 58, .45);
}
.bar.hide { transform: translateY(calc(-100% - 20px)); }
.bar.on-photo { color: var(--paper); }

/* ---------- Wordmark: "Louisa Lu" folds into "LL" ---------- */
.mark { flex: none; display: inline-flex; align-items: baseline; font: italic 400 28px/1 var(--display); letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.mark .r { color: var(--lacquer); transition: color .35s; }
.bar.on-photo .mark .r, .menu-open .mark .r { color: inherit; }
.mark .x { display: inline-grid; grid-template-columns: 0fr; transition: grid-template-columns .75s var(--ease-in-out); }
.mark .x > span { min-width: 0; overflow: hidden; padding-right: .04em; opacity: 0; transform: translateY(.25em); transition: opacity .45s, transform .6s var(--ease); }
.bar.full .mark .x, .mark:hover .x, .mark:focus-visible .x, .menu-open .mark .x { grid-template-columns: 1fr; }
.bar.full .mark .x > span, .mark:hover .x > span, .mark:focus-visible .x > span, .menu-open .mark .x > span { opacity: 1; transform: none; }

/* ---------- Centre slot: live status over the hero, the departure board after it ---------- */
.slot { flex: 1; min-width: 0; display: grid; justify-items: center; align-items: center; }
.slot > * { grid-area: 1 / 1; transition: opacity .4s, transform .55s var(--ease); }
.status { display: flex; align-items: center; gap: 9px; font: 400 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.status i { position: relative; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #6C9C6E; }
.status i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #6C9C6E; animation: live 2.2s infinite; }
.status time { font-variant-numeric: tabular-nums; }
.status .st-sep { opacity: .5; }
@keyframes live { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(3.3); opacity: 0; } }
.ticker { display: flex; gap: 2px; margin: 0; opacity: 0; transform: translateY(10px); pointer-events: none; }
.bar.solid .ticker.on { opacity: 1; transform: none; }
.bar.solid .slot .status { opacity: 0; transform: translateY(-10px); pointer-events: none; }
:is(.ticker, .flaps) span {
  position: relative; display: grid; place-items: center; width: 15px; height: 22px; border-radius: 3px;
  font: 500 11px/1 var(--mono); background: var(--ink); color: var(--paper); overflow: hidden;
}
:is(.ticker, .flaps) span::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(245, 241, 240, .16); }
:is(.ticker, .flaps) span.no { background: var(--lacquer); }
:is(.ticker, .flaps) span.sp { width: 6px; background: none; }
:is(.ticker, .flaps) span.sp::after { display: none; }
:is(.ticker, .flaps) span.spin { color: #F2A9B8; animation: flap .09s linear; }
:is(.ticker, .flaps) span.set { animation: flap .16s var(--ease); }
@keyframes flap { from { transform: scaleY(.15); } }

/* ---------- Links: a gliding highlight and rolling letters ---------- */
.links { position: relative; display: flex; align-items: center; flex: none; }
.links a { position: relative; z-index: 1; padding: 10px 14px; font-size: 12px; line-height: 1.25; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; transition: color .3s; }
.links a[aria-current] { color: var(--lacquer); }
.bar.on-photo .links a[aria-current] { color: inherit; }
.glide {
  position: absolute; left: 0; top: 50%; height: 34px; margin-top: -17px; border-radius: 999px; pointer-events: none;
  background: color-mix(in srgb, currentColor 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 10%, transparent);
  opacity: 0; transition: transform .6s cubic-bezier(.3, 1.35, .45, 1), width .45s var(--ease), opacity .3s;
}
.roll { display: inline-flex; overflow: hidden; vertical-align: top; }
.roll > span { position: relative; display: inline-block; white-space: pre; transition: transform .55s var(--ease) calc(var(--k) * 22ms); }
.roll > span::after { content: attr(data-c); position: absolute; left: 0; top: 100%; font-family: var(--display); font-style: italic; font-size: 1.12em; letter-spacing: .06em; line-height: 1.12; }
.links a:hover .roll > span, .links a:focus-visible .roll > span { transform: translateY(-100%); }

/* ---------- Moodboard heart ---------- */
.heart-btn {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 999px; background: none; cursor: pointer;
  transition: border-color .3s, background .3s;
}
.heart-btn:hover { border-color: currentColor; }
.heart-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: fill .3s, stroke .3s; }
.heart-btn.has svg { fill: var(--lacquer); stroke: var(--lacquer); }
.bar.on-photo .heart-btn.has svg { fill: currentColor; stroke: currentColor; }
.heart-btn .count { font: 500 12px/1 var(--mono); font-variant-numeric: tabular-nums; }
.heart-btn.bump svg { animation: heart-pop .5s var(--ease); }
.heart-btn.bump::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 1.5px solid var(--lacquer); animation: ring .7s var(--ease) forwards; pointer-events: none; }
@keyframes ring { to { transform: scale(1.5); opacity: 0; } }
.peek-stack { position: absolute; top: calc(100% + 12px); right: 4px; display: flex; pointer-events: none; opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .45s var(--ease); }
.peek-stack img { width: 46px; height: 60px; object-fit: cover; border-radius: 4px; border: 2px solid var(--paper); margin-left: -16px; box-shadow: 0 12px 24px -10px rgba(46, 50, 58, .5); }
.peek-stack img:nth-child(1) { rotate: -9deg; }
.peek-stack img:nth-child(2) { rotate: 3deg; translate: 0 -3px; }
.peek-stack img:nth-child(3) { rotate: 11deg; }
.heart-btn:hover .peek-stack:not(:empty), .heart-btn:focus-visible .peek-stack:not(:empty) { opacity: 1; transform: none; }

/* ---------- Book Louisa: magnetic, fills with lacquer from the pointer ---------- */
.cta {
  position: relative; isolation: isolate; overflow: hidden; flex: none;
  display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid currentColor;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: transform .4s var(--ease), color .3s, border-color .3s, background .3s;
}
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lacquer);
  clip-path: circle(0 at var(--fx, 50%) var(--fy, 50%)); transition: clip-path .6s var(--ease);
}
.cta:hover, .cta:focus-visible { color: var(--paper); border-color: var(--lacquer); }
.cta:hover::before, .cta:focus-visible::before { clip-path: circle(150% at var(--fx, 50%) var(--fy, 50%)); }
.bar.solid .cta { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Index button ---------- */
.menu-btn {
  flex: none; display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 6px 0 8px; margin-right: -6px;
  background: none; border: 0; cursor: pointer; font: 400 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
}
.menu-btn .bars i { display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), width .4s var(--ease); }
.menu-btn .bars i + i { margin-top: 6px; width: 14px; margin-left: auto; }
.menu-btn:hover .bars i + i { width: 22px; }
.menu-open .menu-btn .bars i:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-open .menu-btn .bars i + i { width: 22px; transform: translateY(-3.75px) rotate(-45deg); }

.menu-open .bar { color: var(--paper); }
.menu-open .bar .bar-in { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .bar :is(.links, .heart-btn, .cta) { opacity: 0; pointer-events: none; }
.bar :is(.links, .heart-btn, .cta) { transition: opacity .3s, transform .4s var(--ease), color .3s, border-color .3s, background .3s; }

/* ---------- Progress line with a stop for every section ---------- */
.prog { position: fixed; left: 0; right: 0; top: var(--bar-h, 58px); z-index: 61; height: 2px; pointer-events: none; opacity: 0; transition: top .55s var(--ease), opacity .4s; }
.prog.on { opacity: 1; }
.prog.top { top: 0; }
.prog .fill { position: absolute; inset: 0; background: var(--lacquer); transform-origin: left; transform: scaleX(var(--prog, 0)); }
.ticks { position: absolute; inset: 0; }
.tick { position: absolute; top: -7px; width: 16px; height: 16px; margin-left: -8px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.prog:not(.on) .tick { pointer-events: none; }
.prog.top .tick { top: -3px; }
.tick::before { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px var(--muted); transition: transform .3s var(--ease), background .3s, box-shadow .3s; }
.tick.past::before { background: var(--lacquer); box-shadow: 0 0 0 1px var(--lacquer); }
.tick:hover::before { transform: scale(1.9); }
.tip {
  position: absolute; top: 20px; left: 50%; width: max-content; display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px; border-radius: 8px;
  background: var(--ink); color: var(--paper); white-space: nowrap; pointer-events: none; text-align: left;
  font: 400 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; transform: translate(calc(var(--t, .5) * -100%), -6px); transition: opacity .25s, transform .4s var(--ease);
  box-shadow: 0 18px 36px -14px rgba(46, 50, 58, .55);
}
.tip img { width: 40px; height: 50px; object-fit: cover; border-radius: 4px; }
.tip b { display: block; color: #F2A9B8; font-weight: 500; margin-bottom: 4px; }
.tick:hover .tip { opacity: 1; transform: translate(calc(var(--t, .5) * -100%), 0); }

/* ---------- The index ---------- */
.menu {
  position: fixed; inset: 0; z-index: 55; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-rows: 1fr auto; gap: 28px;
  padding: 110px var(--gr) calc(env(safe-area-inset-bottom, 0px) + 32px) var(--gl);
  background: var(--lacquer-deep); color: var(--paper);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .8s var(--ease-in-out), visibility 0s .8s;
}
.menu-open .menu { clip-path: inset(0); visibility: visible; transition: clip-path .8s var(--ease-in-out); }
.ix {
  position: relative; z-index: 1; align-self: end; width: 100%; max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: 6vw;
}
.ix a {
  --dl: 0s;
  display: flex; align-items: baseline; gap: 18px; padding: .14em 0; border-bottom: 1px solid rgba(245, 241, 240, .12);
  font: italic 400 clamp(32px, 4.1vw, 60px)/1.08 var(--display); letter-spacing: -.02em; text-decoration: none;
  opacity: 0; transform: translateY(36px);
  transition: opacity .6s var(--ease) var(--dl), transform .9s var(--ease) var(--dl), color .3s;
}
.menu-open .ix a { --dl: calc(.28s + var(--i) * 35ms); opacity: 1; transform: none; }
.ix a span { min-width: 2.4em; font: 400 11px/1 var(--mono); letter-spacing: .14em; color: var(--blush); font-style: normal; }
.ix a b { font-weight: 400; transition: transform .55s var(--ease); }
.ix a:hover b, .ix a:focus-visible b { transform: translateX(14px); }
.ix:hover a:not(:hover) { color: rgba(245, 241, 240, .32); }
.ix a.here::after { content: ""; align-self: center; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(214, 227, 210, .3); }
.ix-foot {
  position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px;
  padding-top: 22px; border-top: 1px solid rgba(245, 241, 240, .16);
  font: 400 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark);
  opacity: 0; transition: opacity .6s .5s;
}
.menu-open .ix-foot { opacity: 1; }
.ix-foot a { text-decoration: none; }
.ix-foot a:hover { color: var(--paper); }

.ix-peek { position: fixed; left: 0; top: 0; z-index: 0; pointer-events: none; opacity: 0; scale: .6; transition: opacity .35s, scale .55s var(--ease); }
.ix-peek.on { opacity: 1; scale: 1; }
.ix-peek > div {
  position: absolute; width: clamp(200px, 19vw, 290px); aspect-ratio: 4 / 5; translate: -50% -50%;
  border-radius: 4px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.ix-peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: peek-in .7s var(--ease) both; }
@keyframes peek-in { from { clip-path: inset(100% 0 0 0); transform: scale(1.3); } to { clip-path: inset(0); transform: none; } }

/* ---------- Smaller screens ---------- */
@media (max-width: 1120px) {
  .links { display: none; }
}
@media (max-width: 860px) {
  .ix { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .ix a { font-size: clamp(28px, 7.4vw, 44px); gap: 14px; }
  .bar.pill .bar-in { padding-left: 16px; }
  .ticks { display: none; }
}
@media (max-width: 640px) {
  .cta, .menu-btn .lbl, .bar .status .st-sep, .bar .status .st-text { display: none; }
  .mark { font-size: 26px; }
  .bar-in { gap: 10px; }
  .heart-btn { height: 36px; padding: 0 11px; }
  :is(.ticker, .flaps) span { width: 13px; height: 20px; font-size: 10px; }
}
@media (hover: none), (pointer: coarse) { .ix-peek { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .bar, .bar-in, .mark .x, .mark .x > span, .ix a, .glide, .roll > span { transition: none; }
  .status i::after, :is(.ticker, .flaps) span, .heart-btn.bump svg, .heart-btn.bump::after, .ix-peek img { animation: none; }
}
@media print { .prog { display: none !important; } }
