/* Walkthrough — one morning across the portals, then the whole register. */

* { box-sizing: border-box; }
html { background: rgb(var(--paper)); }
body {
  margin: 0;
  background: rgb(var(--paper));
  color: rgb(var(--ink));
  font-family: 'Geist', 'Geist Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.t-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 28px;
}
.t-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.t-brand img { width: 28px; height: 28px; }
.t-back { font-size: 13px; color: rgb(var(--ink-3)); }
.t-back:hover { color: rgb(var(--ink)); }

.t-intro {
  display: grid; grid-template-columns: 7fr 5fr; gap: 24px 48px;
  align-items: end; padding: 32px 28px 56px;
  max-width: 1440px; margin: 0 auto;
}
.t-intro h1 {
  font-family: Fraunces, Georgia, serif; font-weight: 600;
  font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.5rem);
  line-height: .98; letter-spacing: -.035em; margin: 0; max-width: 16ch;
}
.t-intro__side { padding-bottom: 6px; }
.t-intro__side .t-meta { margin-top: 14px; }
.t-lede { margin: 0; font-size: clamp(1.0625rem, 1rem + .35vw, 1.3rem); line-height: 1.5; color: rgb(var(--ink-2)); max-width: 58ch; }
.t-meta { margin: 20px 0 0; font-size: 13px; color: rgb(var(--ink-3)); }

.t-rail { position: relative; }
.t-pin {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 4vw, 64px);
  align-items: center; padding: 0 28px 96px;
  max-width: 1440px; margin: 0 auto;
}
/* with the script on, the stage holds still while the five moments pass */
.t-rail.is-live { height: 300svh; }
.t-rail.is-live .t-pin { position: sticky; top: 0; height: 100svh; padding-block: 24px; }

/* the five moments that carry the story */
.t-story { display: flex; flex-direction: column; }
.t-screen { padding: 14px 0 16px; opacity: .34; transition: opacity .35s ease; }
.t-screen h3 {
  margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -.015em; line-height: 1.15;
}
.t-screen p { margin: 0; font-size: 15px; line-height: 1.45; color: rgb(var(--ink-2)); max-width: 40ch; }
.t-screen a {
  display: inline-block; margin-top: 8px; font-size: 13px;
  color: rgb(var(--ink-blue)); opacity: 0; transition: opacity .35s ease;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.t-screen.is-on { opacity: 1; }
.t-rail:not(.is-live) .t-screen { opacity: 1; }
.t-screen.is-on a { opacity: 1; }

/* the live page */
.t-device { align-self: center; }
.t-frame {
  background: rgb(var(--paper-hi)); border-radius: 10px; overflow: hidden;
  box-shadow: 0 26px 60px rgba(28, 26, 22, .16);
}
.t-chrome { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: rgb(var(--paper-hi)); }
.t-url { font-size: 12px; color: rgb(var(--ink-3)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-stage { position: relative; overflow: hidden; background: #fff; }
.t-stage iframe {
  position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0;
  opacity: 0; transition: opacity .4s ease;
}
.t-stage iframe.is-on { opacity: 1; }
.t-note { margin: 12px 2px 0; font-size: 12.5px; color: rgb(var(--ink-3)); }

/* every screen, compact */
.t-index {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 24px; padding: 0 28px 120px; max-width: 1440px; margin: 0 auto;
}
/* the admin register is the long one: give it two of the six tracks and split it */
.t-index > .t-col:first-of-type { grid-column: span 2; }
.t-index > .t-col:first-of-type ul { columns: 2; column-gap: 20px; }
.t-index-title {
  grid-column: 1/-1; margin: 0 0 4px;
  font-family: Fraunces, Georgia, serif; font-weight: 600;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem); letter-spacing: -.025em;
  display: flex; align-items: baseline; gap: 10px;
}
.t-index-title span {
  font-family: 'Geist', system-ui, sans-serif; font-size: 13px; font-weight: 400;
  color: rgb(var(--ink-3)); letter-spacing: 0;
}
.t-index h2 {
  margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 600;
  font-size: 18px; letter-spacing: -.01em;
}
.t-index ul { list-style: none; margin: 10px 0 0; padding: 0; }
.t-index a {
  display: inline-flex; align-items: center; min-height: 34px;
  font-size: 14px; color: rgb(var(--ink-2));
}
.t-index a:hover { color: rgb(var(--ink)); }

@media (max-width: 1000px) {
  .t-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-index > .t-col:first-of-type { grid-column: auto; }
  .t-index > .t-col:first-of-type ul { columns: 1; }
}

@media (max-width: 900px) {
  .t-intro { grid-template-columns: 1fr; gap: 16px; padding: 28px 20px 40px; }
  .t-rail, .t-rail.is-live { height: auto; }
  .t-pin { grid-template-columns: 1fr; gap: 0; padding: 0 20px 64px; }
  .t-rail.is-live .t-pin { position: static; height: auto; padding-block: 0; }
  /* the live frame is a desk affordance: on a phone it only crops pages mid-row */
  .t-device { display: none; }
  .t-screen, .t-rail.is-live .t-screen { padding: 16px 0 18px; opacity: 1; }
  .t-screen a { opacity: 1; }
  .t-index { padding: 0 20px 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .t-screen, .t-screen a, .t-stage iframe { transition: none; }
}
