/* The rooms on the house floor (2026-10-01). Layout and wardrobe only: every motion value here is
   the kit's (tokens.css), and the floor (base.css, components.css) is untouched. The three
   grounds are the acts: act one on the deeper cream, act two on the kit's off-white, act three on
   card white; the Log wears the off-white, the Work the cream. */
:root {
  --gutter: max(20px, 4rem);
  --cream: #F1F0EA;
  --dim: #8E9AA3;
}
body { font-weight: 300; }
h1, h2, h3 { line-height: 1.02; }
a { text-decoration: none; }
p { max-width: 36em; }

@keyframes lift { from { transform: translateY(110%); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(var(--rise, var(--rise-lg))); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- the first scene: a line and a number on midnight, then the panel lifts away ---------- */
.preloader { background: var(--color-ink); color: var(--color-bg); padding: 0 var(--gutter) max(28px, 4rem); }
.js .preloader { justify-content: flex-end; }
.preloader__wordmark { position: absolute; top: 16px; left: var(--gutter); font-size: 15px; font-weight: 500; animation: fade var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--lead) + 2 * var(--stagger)); }
.preloader__footer { display: block; }
.preloader__text { display: block; overflow: hidden; font-size: 15px; color: #9DB0C0; margin-bottom: 10px; }
.preloader__text span { display: block; animation: lift var(--dur-slow) var(--ease-out) both; animation-delay: var(--lead); }
.preloader__number { display: block; overflow: hidden; font: 500 clamp(64px, 16vw, 160px) / .9 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; animation: lift var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--lead) + var(--stagger)); }
.preloader__track { margin-top: 18px; height: 1px; background: rgba(248, 249, 247, .25); }
.preloader__line { height: 100%; background: var(--color-bg); transform: scaleX(0); transform-origin: left; }

/* ---------- the nav: a few plain words, the wordmark in the middle, one ember when the hero's has gone ---------- */
.navigation { position: fixed; inset: 0 0 auto 0; z-index: var(--z-navigation); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px var(--gutter); border: 0; font-weight: 400; font-size: 15px; color: var(--color-body); transition: opacity var(--dur-base) var(--ease-out) calc(var(--lead) + 7 * var(--stagger)); }
html.is-loading .navigation { opacity: 0; transition: none; }
.navigation__links { gap: 22px; }
.navigation__link { transition: color var(--dur-fast) var(--ease-out); }
.navigation__link:hover { color: var(--color-ink); }
.navigation__link::after { bottom: -3px; height: 1.5px; transition: transform var(--dur-base) var(--ease-scroll); transform-origin: right; }
.navigation__link:hover::after, .navigation__link[aria-current]::after { transform-origin: left; transition: transform var(--dur-base) var(--ease-out); }
.wordmark { display: inline-flex; align-items: center; justify-content: center; font-weight: 500; color: var(--color-ink); white-space: nowrap; letter-spacing: -.01em; text-align: center; }
.wordmark__mark { display: none; width: 22px; height: 22px; }
.navigation__right { position: relative; display: flex; justify-content: flex-end; align-items: center; min-height: 36px; }
.navigation__word { transition: opacity var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.navigation__word:hover { color: var(--color-ink); }
.navigation__btn { position: absolute; right: 0; top: 50%; translate: 0 -50%; opacity: 0; transform: translateY(var(--rise-sm)); pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-overshoot), background var(--dur-fast) var(--ease-out); }
html[data-ember="nav"] .navigation__word { opacity: 0; pointer-events: none; }
html[data-ember="nav"] .navigation__btn { opacity: 1; transform: none; pointer-events: auto; }
html[data-ember="nav"] .navigation__btn:hover { transform: scale(1.04); transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
@media (min-width: 768px) { .navigation { font-size: 16px; grid-template-columns: 1fr auto 1fr; } }
@media (max-width: 767px) {
  .sec .bone { position: relative; left: auto; top: auto; width: auto; margin: -8vh 0 28px; }
  /* On a phone the words scroll under the nav at close range; a frosted strip takes whatever ground the act is wearing. */
  .navigation { padding: 14px var(--gutter); font-size: 14px; grid-template-columns: auto 1fr auto; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .wordmark { order: -1; }
  .wordmark__text { display: none; }
  .wordmark__mark { display: block; }
  .navigation__links { gap: 14px; justify-content: center; }
  .navigation__word { display: none; }
  .navigation__btn { position: static; translate: none; font-size: 13px; padding: 9px 12px; }
}

/* ---------- the one ember object: a state change, the personality in the transition ---------- */
.btn { display: inline-flex; align-items: center; background: var(--color-accent); color: var(--color-on-accent); font-family: var(--font-display); font-weight: 500; font-size: 15px; padding: 13px 18px; border-radius: var(--radius-pill); white-space: nowrap; transition: background var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-overshoot); }
.btn:hover { background: var(--color-accent-strong); transform: scale(1.04); transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.btn:active { transform: scale(.98); transition-duration: var(--dur-fast); }
.btn--small { font-size: 14px; padding: 10px 14px; }

/* an underline that grows from the left, never moves */
.u { position: relative; padding-bottom: 2px; }
.u::after, .u::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--color-line); }
.u::before { background: var(--color-ink); transform: scaleX(0); transform-origin: right; transition: transform var(--dur-base) var(--ease-scroll); }
.u:hover::before { transform: scaleX(1); transform-origin: left; transition: transform var(--dur-base) var(--ease-out); }
.link { display: inline-block; margin-top: 34px; font-weight: 400; font-size: max(17px, 1.8rem); color: var(--color-ink); }
.link + .link { margin-left: 28px; }

/* ---------- act one: the opening, pinned. the figure is held for two more screens while the lines arrive ---------- */
.hero { position: relative; height: 300svh; }
.hero__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) max(28px, 4rem); }
.hero__mark { position: absolute; z-index: 0; top: 8%; right: 7%; height: 42%; width: auto; pointer-events: none; user-select: none; }
.hero__foot { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(38px, 9.6vw, 84px); max-width: 11ch; }
.hero h1 .dim { color: var(--dim); }
.hero h1 .l { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.hero h1 .l .t { display: block; transform: translateY(110%); }
.hero.is-in h1 .l:first-child .t { animation: lift var(--dur-slow) var(--ease-out) both; animation-delay: var(--lead); }
/* On the phone (no canvas) the figure settles last, behind the words. On desktop the plane fades in on the canvas instead; animating the image there would fight img[data-gl-ready]. */
@media (max-width: 767px) { .hero__mark { opacity: 0; } .hero.is-in .hero__mark { animation: rise var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--lead) + var(--dur-base)); } }
.hero__row { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.hero__cap { font-family: var(--font-mono); font-size: 11px; line-height: 1.55; letter-spacing: .04em; color: var(--color-body); opacity: 0; }
.hero__action { display: inline-block; opacity: 0; }
.hero__cap .t, .hero__action .t { display: block; }
@media (min-width: 768px) {
  .hero__mark { top: 8%; right: 13%; height: 84%; }
  .hero__foot { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .hero__row { flex-direction: column; align-items: flex-end; gap: 18px; padding-bottom: 6px; }
  .hero__cap { max-width: 250px; font-size: 11.5px; }
}

/* ---------- building from Orlando: a sticky scene with the live clock; the places arrive as the scene scrolls ---------- */
.orlando { position: relative; height: 200svh; }
.orlando__pin { position: sticky; top: 0; height: 100svh; display: grid; align-content: center; gap: 36px; padding: 0 var(--gutter); }
.orlando h2 { font-size: clamp(32px, 6.2vw, 60px); max-width: 12ch; }
.clock { display: block; margin-top: 18px; font-family: var(--font-mono); font-size: clamp(26px, 4.6vw, 52px); font-weight: 400; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--color-ink); }
.clock small { display: block; margin-top: 6px; font-family: var(--font-display); font-size: max(15px, 1.6rem); color: var(--color-body); letter-spacing: 0; }
.orlando__lead { font-size: max(18px, 1.9rem); line-height: 1.5; color: var(--color-ink); max-width: 30em; }
.places { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.places li { overflow: hidden; font-weight: 500; font-size: clamp(22px, 3.6vw, 38px); line-height: 1.12; letter-spacing: -.02em; padding-bottom: .06em; margin-bottom: -.06em; }
.places li .t { display: block; transform: translateY(110%); }
@media (min-width: 768px) { .orlando__pin { grid-template-columns: 5fr 7fr; align-items: center; gap: 48px; } }

/* ---------- the middle and the closing ---------- */
.sec { position: relative; padding: 22vh var(--gutter); }
.grid { display: grid; grid-template-columns: 1fr; gap: 28px; max-width: 1240px; }
.grid h2 { font-size: clamp(32px, 6.2vw, 60px); max-width: 14ch; }
.grid .text { font-size: max(19px, 1.9rem); line-height: 1.55; color: var(--color-ink); max-width: 36em; }
.grid .text p + p { margin-top: 1.1em; }
.grid .text .pull { font-family: var(--font-serif); font-style: italic; font-size: 1.12em; }
@media (min-width: 768px) {
  .sec { padding: 24vh var(--gutter); }
  .grid { grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
  .grid .text { font-size: max(20px, 2.1rem); }
}

/* where the log left off: the last days as a list, the first card as the picture that travels into the Log */
.log { display: grid; grid-template-columns: 1fr; gap: 6px 28px; margin: 0; }
.log dt { font-weight: 500; font-size: clamp(26px, 4.6vw, 40px); line-height: 1; letter-spacing: -.02em; padding-top: 30px; }
.log dt:first-child { padding-top: 0; }
.log dd { margin: 0; font-size: max(18px, 1.9rem); line-height: 1.45; color: var(--color-ink); max-width: 30em; }
.log dd.when { font-size: 15px; color: var(--color-body); }
@media (min-width: 768px) {
  .log { grid-template-columns: 120px 1fr; }
  .log dt { grid-column: 1; }
  .log dd { grid-column: 2; }
  .log dt + dd { padding-top: 30px; }
  .log dt:first-child + dd { padding-top: 0; }
  .log dd { font-size: max(20px, 2.1rem); }
}
.log-figure { margin-top: 40px; max-width: 320px; }
.media-link { display: block; }
.log-figure img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.log-figure figcaption { margin-top: 10px; font-size: 15px; color: var(--color-body); }
.media-link img { transition: opacity var(--dur-fast) var(--ease-out); }

/* the bones: the switch. the knob lands with the one nudge the system allows */
.switch { display: inline-flex; align-items: center; gap: 12px; margin-top: 30px; background: none; border: 0; padding: 0; font: inherit; font-weight: 400; font-size: max(17px, 1.8rem); color: var(--color-ink); cursor: pointer; }
.switch .track { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--color-line); transition: background var(--dur-base) var(--ease-out); flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 42, 68, .25); transition: transform var(--dur-base) var(--ease-overshoot); }
.switch:hover .track { background: var(--dim); }
.switch[aria-pressed="true"] .track, .switch[aria-pressed="true"]:hover .track { background: var(--color-ink); }
.switch[aria-pressed="true"] .track::after { transform: translateX(20px); }
.switch .on, .switch[aria-pressed="true"] .off { display: none; }
.switch[aria-pressed="true"] .on { display: inline; }
.map-link { display: inline-block; margin: 18px 0 0; font-size: max(15px, 1.6rem); color: var(--color-body); transition: color var(--dur-fast) var(--ease-out); }
.map-link:hover { color: var(--color-ink); }

/* bones mode: the labels arrive one step apart, the outlines after them (decoration follows content) */
[data-c] { outline: 1.5px dashed transparent; outline-offset: -10px; transition: outline-color var(--dur-base) var(--ease-scroll); }
body.bones [data-c] { outline-color: var(--color-ink); transition-delay: calc(var(--dur-base) + var(--i, 0) * var(--stagger)); }
.bone { display: none; position: absolute; width: max-content; left: var(--gutter); top: 72px; z-index: 2; font-family: var(--font-mono); font-size: 11px; line-height: 1.6; letter-spacing: .02em; color: var(--color-ink); background: var(--color-bg); padding: 8px 10px; border: 1px solid var(--color-ink); max-width: min(560px, calc(100% - 2 * var(--gutter))); }
.bone b { font-weight: 400; color: var(--color-accent); }
body.bones .bone { display: block; --rise: var(--rise-sm); animation: rise var(--dur-base) var(--ease-scroll) both; animation-delay: calc(var(--i, 0) * var(--stagger)); }
.act { display: none; position: absolute; left: var(--gutter); top: -13px; z-index: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; color: #fff; background: var(--color-ink); padding: 5px 9px; }
body.bones .act { display: block; animation: fade var(--dur-fast) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--stagger)); }
.hero .act, .orlando .act { top: 52px; }
.hero .bone, .orlando .bone { top: 88px; }

/* how I work: three lines at scale, the same move as the hero */
.creed { font-weight: 500; font-size: clamp(30px, 5.6vw, 54px); line-height: 1.08; letter-spacing: -.02em; max-width: 12ch; }

/* the studying section: one line per subject, the shelf under it */
.studying .text .shelf { font-size: .9em; color: var(--color-body); }

/* act three: the door */
.close .grid h2 { font-size: clamp(36px, 7.4vw, 72px); max-width: 12ch; }
.door { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 30px; }
.door .addr { font-size: max(16px, 1.7rem); color: var(--color-body); }
.door .addr a { transition: color var(--dur-fast) var(--ease-out); }
.door .addr a:hover { color: var(--color-ink); }
.roads { list-style: none; margin: 72px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.roads a { display: block; font-weight: 500; font-size: clamp(24px, 4.6vw, 36px); line-height: 1.1; letter-spacing: -.02em; color: var(--color-ink); transition: color var(--dur-fast) var(--ease-out); }
.roads a small { display: block; margin-top: 4px; font-weight: 300; font-size: max(15px, 1.6rem); line-height: 1.4; letter-spacing: 0; color: var(--color-body); max-width: 30em; transition: color var(--dur-fast) var(--ease-out); }
.roads a:hover { color: var(--color-primary-strong); }
.roads a:hover small { color: var(--color-ink); }
.roads .films a { display: inline-block; font-size: 15px; font-weight: 400; background: var(--color-primary-strong); color: var(--color-bg); padding: 9px 14px; border-radius: 999px; margin-top: 10px; transition: background var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-overshoot); }
.roads .films a:hover { background: #000; color: #fff; transform: scale(1.04); transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }

footer { padding: 40px var(--gutter) 48px; color: var(--color-body); font-size: 15px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--color-line); }
footer p { max-width: 40em; }
@media (min-width: 768px) { footer { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 40px; } }

/* ---------- the Log room: the archive, newest first, one entry per screen ---------- */
.room-head { padding: calc(80px + 10vh) var(--gutter) 6vh; }
.room-head h1 { font-size: clamp(40px, 8vw, 92px); max-width: 10ch; }
.room-head p { margin-top: 24px; font-size: max(18px, 1.9rem); line-height: 1.5; color: var(--color-ink); max-width: 32em; }
.entry { position: relative; padding: 14vh var(--gutter); scroll-margin-top: 72px; border-top: 1px solid var(--color-line); }
.entry__grid { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 1240px; }
.entry__day { font-weight: 500; font-size: clamp(30px, 5.6vw, 54px); line-height: 1; letter-spacing: -.02em; }
.entry__meta { font-size: 15px; color: var(--color-body); line-height: 1.5; margin-top: 10px; }
.entry h2 { font-size: clamp(26px, 4.4vw, 44px); max-width: 16ch; }
.entry__what { margin-top: 20px; font-size: max(18px, 1.9rem); line-height: 1.55; color: var(--color-ink); max-width: 34em; }
.entry__figure { margin-top: 30px; max-width: 420px; }
.entry__figure img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.entry__figure figcaption { margin-top: 10px; font-size: 15px; color: var(--color-body); }
.room-foot { padding: 10vh var(--gutter) 16vh; }
@media (min-width: 768px) {
  .entry { padding: 16vh var(--gutter); }
  .entry__grid { grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
}

/* ---------- the Work room: the portfolio brought home, four shelves of cards ---------- */
.shelf { position: relative; padding: 10vh var(--gutter) 6vh; max-width: 1400px; }
.shelf h2 { font-size: clamp(28px, 5vw, 48px); max-width: 14ch; margin-bottom: 36px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 26px 24px 22px; display: flex; flex-direction: column; gap: 12px; transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-overshoot); }
.card:hover { border-color: var(--color-ink); transform: translateY(-2px); transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.card h3 { font-size: max(21px, 2.3rem); font-weight: 500; letter-spacing: -.02em; }
.card p { font-size: max(16px, 1.7rem); line-height: 1.5; color: var(--color-ink); }
.card__meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--color-body); }
.card__meta .status { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
.card__link { display: inline-block; margin-top: 2px; font-size: 15px; color: var(--color-ink); }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- nothing moves for someone who asked it not to ---------- */
.reduced-motion .hero .t, .reduced-motion [data-scrub], .reduced-motion [data-scrub] .t, .reduced-motion .places li .t, .reduced-motion .hero__mark, .reduced-motion .hero__cap, .reduced-motion .hero__action,
.boot-failed .hero .t, .boot-failed [data-scrub], .boot-failed [data-scrub] .t, .boot-failed .places li .t, .boot-failed .hero__mark, .boot-failed .hero__cap, .boot-failed .hero__action { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
.reduced-motion .navigation, .boot-failed .navigation { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) {
  .hero .t, [data-scrub], [data-scrub] .t, .places li .t, .hero__mark, .hero__cap, .hero__action, .navigation { opacity: 1 !important; transform: none !important; }
  .bone, .act { animation: none !important; }
}
