/* Le Tracé · hero styles (Lu Beauty Brows), with hero.js. DOM contract in README.md.
   Static by default: no JS, reduced motion or a second visit in the session show the after photo (the poster).
   html.lt-run, set by the head snippet, shows the before photo from the first frame so the ritual can start.
   While it plays, the engine's layers sit over the photos: .lt-wipe (the after photo wiping in from the axis),
   svg.lt-svg (the center line and the strings), .lt-marks (pins and tags). */
.lt {
  --lt-paper: #F3ECE3; --lt-paper-2: #E9DFD2; --lt-ink: #2A211B; --lt-ink-2: #5B544D;
  --lt-brown: #5C483A; --lt-olive: #55624B; --lt-thread: #A4472F; --lt-rule: rgba(92, 72, 58, .3);
  --lt-display: "Playfair H1", "Playfair Fallback", Georgia, serif;
  --lt-serif: "Playfair Text", "Playfair Text Fallback", Georgia, serif;
  --lt-text: "Libre Franklin", "Libre Franklin Fallback", system-ui, sans-serif;
  --lt-nav: 72px;
  --lt-gut: clamp(16px, 4.4vw, 64px);
  --lt-gap: clamp(40px, 4.2vw, 64px);
  --lt-ar: 2.4096;
  --lt-h1: clamp(44px, 4.25vw, 64px);
  --lt-reserve: calc(var(--lt-nav) + var(--lt-h1) * 1.04 + 270px);
  --lt-pw: min(1120px, 100vw - 2 * var(--lt-gut), (100vh - var(--lt-reserve)) * var(--lt-ar));
  --lt-win: wide;
  --lt-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 9'%3E%3Cpath d='M0 4.5h21M16.5.5l4.5 4-4.5 4' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3C/svg%3E");
  position: relative; display: grid; justify-items: center; padding: 22px var(--lt-gut) 18px;
  color: var(--lt-ink); background: var(--lt-paper); font: 400 15px/1.55 var(--lt-text);
}
@supports (height: 1svh) { .lt { --lt-pw: min(1120px, 100vw - 2 * var(--lt-gut), (100svh - var(--lt-reserve)) * var(--lt-ar)); } }
.lt-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; width: max(var(--lt-pw), min(100%, 820px)); min-height: 70px; }
.lt-eyebrow, .lt-cap, .lt-door span { font: 500 12px/1.3 var(--lt-text); letter-spacing: .12em; text-transform: uppercase; }
.lt-eyebrow { margin: 0; white-space: nowrap; }
.lt-eyebrow i { font-style: normal; color: var(--lt-thread); padding: 0 .25em; }
.lt-sub { margin: 0; max-width: 450px; color: var(--lt-brown); }

/* the plate: after photo (poster), before photo, then the engine's layers */
.lt-plate { width: var(--lt-pw); margin: 30px 0 0; }
.lt-view { position: relative; aspect-ratio: var(--lt-ar); background: var(--lt-paper-2); touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lt-view:focus-visible, .lt-replay:focus-visible, .lt-door:focus-visible { outline: 1px solid var(--lt-thread); outline-offset: 5px; }
.lt-ph, .lt-ph img, .lt-wipe, .lt-wipe img, .lt-svg, .lt-marks { position: absolute; inset: 0; width: 100%; height: 100%; }
.lt-ph img, .lt-wipe img { display: block; max-width: none; object-fit: cover; -webkit-user-drag: none; }
.lt-before, .lt-wipe, .lt-svg, .lt-marks { visibility: hidden; }
.lt-run .lt-before, .lt-play .lt-wipe, .lt-play .lt-svg, .lt-play .lt-marks, .lt-peek .lt-before { visibility: visible; }
.lt-wipe img, .lt-before img { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.lt-svg, .lt-marks { overflow: hidden; pointer-events: none; }
.lt-svg line, .lt-svg path { fill: none; stroke: var(--lt-thread); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.lt-pin, .lt-tag { position: absolute; left: 0; top: 0; opacity: 0; }
.lt-pin { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border: 1px solid var(--lt-thread); border-radius: 50%; background: var(--lt-paper); }
.lt-tag { padding: 2px 7px 3px; background: rgba(243, 236, 227, .94); font: 400 15px/1.1 var(--lt-serif); font-variant-caps: all-small-caps; letter-spacing: .09em; white-space: nowrap; }
/* graduated ruler: 48 steps, a long tick every 4, the axis falls on the middle one */
.lt-view::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 9px; opacity: .7;
  background: repeating-linear-gradient(90deg, var(--lt-brown) 0 1px, transparent 1px calc(100% / 48)) left bottom / calc(100% + 1px) 4px no-repeat,
    repeating-linear-gradient(90deg, var(--lt-brown) 0 1px, transparent 1px calc(100% / 12)) left bottom / calc(100% + 1px) 9px no-repeat; }

/* caption: stages on the left half, hint and replay on the right half, the axis between them */
.lt-cap { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--lt-gap); align-items: center; height: 40px; color: var(--lt-ink-2); letter-spacing: .1em; }
/* a static rule (no progress bar); the current stage is marked only by its word in ink and its numeral in sanguine */
.lt-cap::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--lt-rule); }
.lt-stages { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.lt-stages li { transition: color .4s ease; }
.lt-stages b { margin-right: 7px; font: 400 13px/1 var(--lt-serif); letter-spacing: .06em; color: var(--lt-ink-2); opacity: .7; transition: color .4s ease, opacity .4s ease; }
.lt-stages li[aria-current], html.lt-run:not(.lt-live) .lt-stages li:first-child { color: var(--lt-ink); }
.lt-stages li[aria-current] b, html.lt-run:not(.lt-live) .lt-stages li:first-child b { color: var(--lt-thread); opacity: 1; }
html.lt-run:not(.lt-live) .lt-stages li[aria-current] { color: inherit; }
html.lt-run:not(.lt-live) .lt-stages li[aria-current] b { color: var(--lt-ink-2); opacity: .7; }
.lt-act { display: flex; justify-content: flex-end; align-items: center; gap: 22px; white-space: nowrap; }
.lt-hint { margin: 0; }
.lt-replay { padding: 4px 0 3px; border: 0; border-bottom: 1px solid var(--lt-rule); background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--lt-brown); cursor: pointer; }
.lt-replay:hover { color: var(--lt-ink); border-color: var(--lt-thread); }
.lt-hint, .lt-replay { opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s .6s; }
.lt-done .lt-hint, .lt-done .lt-replay { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.lt-still .lt-replay { display: none; }

/* the title split around the face's axis, the two equal doors under its halves, the axis between them */
.lt-base { position: relative; display: grid; justify-items: center; width: 100%; }
.lt-base::before { content: ""; position: absolute; left: 50%; top: -40px; bottom: 4px; width: 1px; background: var(--lt-thread); opacity: .55; transform-origin: 50% 0; transform: scaleY(var(--lt-drop, 1)); }
.lt-run .lt-base::before { transform: scaleY(var(--lt-drop, 0)); }
.lt-h1, .lt-doors { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--lt-gap); width: min(100%, 1180px); }
.lt-h1 { margin: 16px 0 0; font: 340 var(--lt-h1)/1.04 var(--lt-display); letter-spacing: -.012em; white-space: nowrap; }
.lt-h1 > * { display: block; }
.lt-h1a { text-align: right; color: var(--lt-brown); }
.lt-h1b { color: var(--lt-olive); font-style: italic; }
.lt-doors { margin: 14px 0 0; }
.lt-door { display: flex; flex-direction: column; gap: 6px; padding: 12px 0 4px; color: var(--lt-ink); text-decoration: none; }
.lt-door:first-child { align-items: flex-end; text-align: right; }
.lt-door span { color: var(--lt-thread); }
.lt-door strong { font: 400 24px/1.15 var(--lt-serif); }
.lt-door strong::after { content: ""; display: inline-block; width: 22px; height: 9px; margin-left: 12px; vertical-align: .12em; background: var(--lt-thread); -webkit-mask: var(--lt-arrow) 0 0 / 100% 100%; mask: var(--lt-arrow) 0 0 / 100% 100%; transition: transform .3s ease; }
.lt-door:hover strong::after { transform: translateX(4px); }

/* short laptops: a tighter stack keeps the title and both doors above the fold */
@media (min-width: 700px) and (max-height: 800px) {
  .lt { --lt-reserve: calc(var(--lt-nav) + var(--lt-h1) * 1.04 + 246px); padding-top: 16px; }
  .lt-plate { margin-top: 26px; }
  .lt-h1 { margin-top: 12px; }
  .lt-doors { margin-top: 8px; }
  .lt-door { padding-top: 8px; }
}
@media (min-width: 700px) and (max-width: 979px) { .lt-sub { max-width: 330px; font-size: 14px; } .lt-hint { display: none; } }

/* phone: one-brow plate, the axis on the text gutter, the whole ritual in the first screen */
@media (max-width: 699px) {
  .lt { --lt-ar: 1.2640; --lt-win: narrow; --lt-gut: 16px; justify-items: stretch; padding: 14px var(--lt-gut) 28px; }
  .lt-top, .lt-base { display: contents; }
  .lt-eyebrow { order: 1; letter-spacing: .1em; }
  .lt-h1 { order: 2; display: block; width: auto; margin: 10px 0 0; font-size: clamp(36px, 10.4vw, 44px); }
  .lt-h1a { text-align: left; }
  .lt-plate { order: 3; width: auto; margin: 16px calc(-1 * var(--lt-gut)) 0; }
  .lt-view::before, .lt-base::before { display: none; }
  /* the phone plate shows one brow: only the arch and tail tags, a size smaller */
  .lt-tag { font-size: 13px; padding: 2px 6px 3px; }
  .lt-tag[data-g="-1"], .lt-tag[data-g="0"] { display: none; }
  .lt-cap { display: flex; justify-content: space-between; gap: 12px; height: 38px; padding: 0 var(--lt-gut); letter-spacing: .06em; }
  /* numerals stay put, the current stage's word fades in one fixed slot: nothing reflows */
  .lt-stages { position: relative; gap: 10px; padding-right: 8.2em; transition: opacity .5s ease; }
  .lt-stages b { margin-right: 0; }
  .lt-stages span { position: absolute; right: 0; width: 7.4em; opacity: 0; transition: opacity .4s ease; }
  .lt-stages li[aria-current] span, html.lt-run:not(.lt-live) .lt-stages li:first-child span { opacity: 1; }
  html.lt-run:not(.lt-live) .lt-stages li[aria-current] span, .lt-done .lt-stages { opacity: 0; }
  .lt-hint { position: absolute; left: var(--lt-gut); }
  .lt-doors { order: 4; width: auto; column-gap: 16px; margin: 10px 0 0; }
  .lt-door, .lt-door:first-child { align-items: flex-start; text-align: left; padding: 10px 0 2px; border-top: 1px solid var(--lt-rule); }
  .lt-door strong { font-size: 20px; }
  .lt-door span { letter-spacing: .08em; }
  .lt-sub { order: 5; margin-top: 22px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .lt *, .lt *::before, .lt *::after { transition: none !important; } }
