/* ==========================================================================
   ishangupta.dev
   A single-column itinerary on warm paper.
   ========================================================================== */

:root {
  --paper:       #faf5f5;
  --paper-warm:  #f4eeee;
  --ink:         #17160f;
  --ink-strong:  #060606;
  --body:        #434445;
  --muted:       #9b9b9b;
  --faint:       #c2c0c0;
  --hair:        #e2dcdc;
  --accent:      #3a53ed;
  --paper-rgb:   250, 245, 245;
  --trace:       rgba(58, 83, 237, .5);
  --wash:        rgba(58, 83, 237, .085);

  /* how much shade stays stowed at the top of the glass when it is open */
  --shade-open:  30px;

  --sans: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* itinerary geometry */
  --gutter: 74px;
  --column: 620px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

/* Shade down = cabin at night = the whole page goes dark. */
html[data-shade="closed"] {
  --paper:       #131210;
  --paper-warm:  #1b1917;
  --paper-rgb:   19, 18, 16;
  --ink:         #f0ece7;
  --ink-strong:  #fbf9f6;
  --body:        #a5a09a;
  --muted:       #756f6a;
  --faint:       #676159;
  --hair:        #2a2724;
  --accent:      #8b9bff;
  --trace:       rgba(139, 155, 255, .55);
  --wash:        rgba(139, 155, 255, .15);
}

/* Colour cross-fade, armed only while a theme flip is in flight so it never
   competes with the hover and reveal transitions. */
html.theming *,
html.theming *::before,
html.theming *::after {
  transition-property: background-color, background-image, color, border-color, box-shadow, filter, opacity;
  transition-duration: .65s;
  transition-timing-function: ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* faint paper grain, keeps the flat background from looking digital */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-shade="closed"] body::before { opacity: .05; filter: invert(1); }

main { position: relative; z-index: 1; }

p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
a { color: inherit; }
abbr { text-decoration: none; }

/* --------------------------------------------------------------------------
   Corner meta block
   -------------------------------------------------------------------------- */

.meta {
  position: absolute;
  top: 70px;
  left: 72px;
  z-index: 3;
  padding-left: 26px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: .154em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta__rule {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  border-left: 1px dashed var(--faint);
}

.meta__name { color: var(--ink); }

#clock { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Departures board — mirrors the name block, costs no vertical space
   -------------------------------------------------------------------------- */

.board {
  position: absolute;
  top: 70px;
  right: 72px;
  z-index: 3;
  padding-right: 26px;
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: .154em;
  text-transform: uppercase;
  color: var(--muted);
}

.board__rule {
  position: absolute;
  right: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  border-right: 1px dashed var(--faint);
}

.board ul { list-style: none; margin: 0; padding: 0; }

.board a {
  text-decoration: none;
  transition: color .22s ease;
}

.board__title a { color: var(--ink); }

.board__title a::after {
  content: "\2192";
  margin-left: .5em;
  color: var(--faint);
  transition: color .22s ease, transform .3s var(--ease);
  display: inline-block;
}

.board li a::after {
  content: "\2197";
  margin-left: .45em;
  font-size: .82em;
  color: var(--faint);
  transition: color .22s ease;
  display: inline-block;
}

.board a:hover,
.board a:focus-visible { color: var(--ink); }
.board a:hover::after { color: var(--accent); }
.board__title a:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Hero — the window
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 74px 24px 0;
}

.window {
  --w: 180px;
  --h: 268px;
  width: var(--w);
  height: var(--h);
  border-radius: 60px;
  padding: 12px;
  background:
    linear-gradient(168deg, #f8f2ee 0%, #ece4df 42%, #cfc5be 100%);
  box-shadow:
    0 42px 70px -28px rgba(60, 44, 40, .34),
    0 8px 18px -6px rgba(60, 44, 40, .14),
    inset 0 2px 2px rgba(255, 255, 255, .95),
    inset 0 -2px 3px rgba(120, 100, 95, .16);
}

/* inner shroud ring — the second moulding you see on a real cabin window */
.window__shroud {
  height: 100%;
  border-radius: 49px;
  padding: 13px;
  background: linear-gradient(168deg, #fffefd 0%, #f3ece7 50%, #ded4cd 100%);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .95),
    inset 0 -1px 2px rgba(120, 100, 95, .22),
    0 -1px 3px rgba(120, 100, 95, .16);
}

.window__glass {
  position: relative;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: #cfe6f6;
  box-shadow:
    inset 0 3px 8px rgba(28, 46, 66, .28),
    inset 0 -2px 6px rgba(28, 46, 66, .14),
    0 0 0 1px rgba(120, 100, 95, .22),
    0 2px 3px -1px rgba(255, 255, 255, .95);
}

/* sky ------------------------------------------------------------------- */

.sky {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      #79bcdf 0%,
      #9ed2ec 26%,
      #c8e6f7 52%,
      #e8f5fc 74%,
      #ffffff 100%);
}

/* the cloud bank you are flying above, sitting on the bottom of the pane */
.horizon {
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: -14%;
  height: 46%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #ffffff 62%, rgba(255, 255, 255, 0) 100%);
}

.cloud {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 34% 62%, rgba(255,255,255,1), rgba(255,255,255,0) 66%),
    radial-gradient(closest-side at 62% 46%, rgba(255,255,255,1), rgba(255,255,255,0) 60%),
    radial-gradient(closest-side, rgba(255,255,255,.92), rgba(255,255,255,0) 74%);
  filter: blur(1.5px);
  will-change: transform;
}

.cloud--a { width: 120px; height: 46px; top: 22%;  left: -70%; animation: drift 30s linear infinite; opacity: .85; }
.cloud--b { width: 170px; height: 58px; top: 44%;  left: -95%; animation: drift 46s linear infinite -9s; opacity: .8; }
.cloud--c { width: 92px;  height: 36px; top: 62%;  left: -60%; animation: drift 38s linear infinite -19s; opacity: .7; }
.cloud--d { width: 200px; height: 68px; top: 6%;   left: -110%; animation: drift 62s linear infinite -31s; opacity: .45; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(300px); }
}

/* glass reflection ------------------------------------------------------ */

.glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg,
    rgba(255,255,255,0)   36%,
    rgba(255,255,255,.13) 43%,
    rgba(255,255,255,.03) 49%,
    rgba(255,255,255,0)   56%);
}

/* the little bleed hole at the bottom of every cabin window */
.bleed {
  position: absolute;
  left: 50%;
  bottom: 13px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: rgba(30, 46, 62, .5);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255,255,255,.5);
}

/* shade ------------------------------------------------------------------ */

.shade {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--shade-open);
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  background:
    repeating-linear-gradient(180deg,
      rgba(255,255,255,.28) 0 1px,
      rgba(0,0,0,0) 1px 9px),
    linear-gradient(180deg, #f7f2ee 0%, #ece4df 78%, #ddd3cc 100%);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 6px 14px -4px rgba(50, 38, 34, .42);
  transition: height .78s var(--ease);
}

/* invisible grab margin below the stowed lip, so the open shade is still an
   easy target on touch */
.shade::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -24px;
  height: 24px;
}

.shade.is-dragging {
  cursor: grabbing;
  transition: none;
}

.shade__grip {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 3px;
  background: #cfc4bd;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

html[data-shade="closed"] .shade { height: 100%; }

.shade:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

/* night cabin: hardware dims, sky behind the shade goes to dusk ------------ */

html[data-shade="closed"] .window {
  background: linear-gradient(168deg, #3b3733 0%, #2b2724 38%, #1d1b19 100%);
  box-shadow:
    0 42px 70px -28px rgba(0, 0, 0, .62),
    0 8px 18px -6px rgba(0, 0, 0, .42),
    inset 0 2px 2px rgba(255, 255, 255, .10),
    inset 0 -2px 3px rgba(0, 0, 0, .5);
}

html[data-shade="closed"] .window__shroud {
  background: linear-gradient(168deg, #35312d 0%, #272320 55%, #1a1816 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .08),
    inset 0 -1px 2px rgba(0, 0, 0, .5),
    0 1px 0 rgba(255, 255, 255, .05);
}

html[data-shade="closed"] .sky { filter: brightness(.34) saturate(.65); }

/* shade down means you are looking at opaque plastic, not glass — the
   specular reflection belongs to the pane now hidden behind it */
html[data-shade="closed"] .glare {
  background: linear-gradient(112deg,
    rgba(255, 255, 255, 0)    36%,
    rgba(255, 255, 255, .022) 43%,
    rgba(255, 255, 255, .008) 48%,
    rgba(255, 255, 255, 0)    55%);
}

html[data-shade="closed"] .shade {
  background:
    repeating-linear-gradient(180deg,
      rgba(255, 255, 255, .04) 0 1px,
      rgba(0, 0, 0, 0) 1px 9px),
    linear-gradient(180deg, #35312d 0%, #2a2623 78%, #1c1a18 100%);
  box-shadow: 0 5px 12px -3px rgba(0, 0, 0, .5);
}

html[data-shade="closed"] .shade__grip {
  background: #4b4541;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

html[data-shade="closed"] .fan > i,
html[data-shade="closed"] .fan > img,
html[data-shade="closed"] .memories img { border-color: #26221f; }

/* --------------------------------------------------------------------------
   Intro
   -------------------------------------------------------------------------- */

.intro {
  max-width: 480px;
  margin: 54px auto 0;
  padding: 0 24px;
  text-align: center;
}

.intro h1 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
}

.intro p {
  margin-top: 10px;
  color: var(--body);
  font-size: 16px;
  letter-spacing: -0.0075em;
}

/* --------------------------------------------------------------------------
   Itinerary
   -------------------------------------------------------------------------- */

.itinerary {
  position: relative;
  width: calc(var(--gutter) + var(--column));
  max-width: 100%;
  margin: 38px auto 0;
  padding-bottom: 40px;
}

.spine,
.trace {
  position: absolute;
  left: var(--gutter);
  top: 0;
  bottom: 0;
  width: 0;
}

.spine  { border-left: 1px dashed var(--faint); }
.trace  { border-left: 1px solid var(--trace); bottom: auto; height: 0; }

/* leader — the icon that rides the trace ---------------------------------- */

.leader {
  position: relative;
  padding-left: var(--gutter);
  min-height: 40px;
  margin-bottom: 34px;
}

.leader__icon {
  position: absolute;
  left: var(--gutter);
  top: 18px;
  transform: translate(-50%, 0);
  display: block;
  z-index: 2;
  color: var(--accent);
  background: var(--paper);
  padding: 6px 5px;
}

.leader__label {
  position: absolute;
  left: var(--gutter);
  top: 0;
  transform: translateX(-50%);
  padding: 0 5px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* chapter dividers -------------------------------------------------------- */

.chapter {
  position: relative;
  padding-left: var(--gutter);
  margin: 44px 0 26px;
}

.chapter span {
  display: inline-block;
  margin-left: 22px;
  padding: 0 2px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: #86847f;
}

.chapter::before {
  content: "";
  position: absolute;
  left: var(--gutter);
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--faint);
  transition: border-color .3s var(--ease-out);
}

.chapter::after {
  left: var(--gutter);
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  --pulse-to: 2.8;
}

.chapter.is-lit::before { border-color: var(--accent); }
.chapter.is-lit::after { animation: dotPulse .72s var(--ease-out); }

/* a stop ------------------------------------------------------------------ */

.stop {
  position: relative;
  padding: 0 0 54px var(--gutter);
}

.stop__when {
  position: absolute;
  left: 0;
  top: 30px;
  width: calc(var(--gutter) - 18px);
  text-align: right;
  font-family: var(--mono);
  text-transform: uppercase;
  line-height: 1.25;
}

.stop__route {
  display: block;
  font-size: 8px;
  letter-spacing: .13em;
  color: var(--faint);
}

.stop__year {
  display: block;
  font-size: 12px;
  letter-spacing: .09em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stop__node {
  position: absolute;
  left: var(--gutter);
  top: 34px;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--muted);
  transition: border-color .3s var(--ease-out);
}

.stop__node::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: var(--muted);
  transition: background-color .3s var(--ease-out);
}

/* the ring that expands out of a checkpoint as the trail reaches it */
.stop__node::before,
.leg::after,
.chapter::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

.stop__node::before {
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
}

.stop__node.is-lit { border-color: var(--accent); }
.stop__node.is-lit::after { background: var(--accent); }
.stop__node.is-lit::before { animation: dotPulse .72s var(--ease-out); }

@keyframes dotPulse {
  0%   { opacity: .45; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(var(--pulse-to, 2.4)); }
}

.stop__body { padding-left: 22px; }

/* crest — fanned company discs -------------------------------------------- */

.crest {
  display: flex;
  margin-bottom: 12px;
}

.crest > i,
.crest > img {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--disc, #333);
  color: #fff;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  line-height: 27px;
  text-align: center;
  box-shadow: 0 0 0 2.5px var(--paper), 0 2px 5px rgba(50,38,34,.25);
  transition: transform .4s var(--ease);
}

.crest > img { display: block; object-fit: contain; background: #fff; }

.crest > * + * { margin-left: -9px; }
.stop:hover .crest > * + * { transform: translateX(5px); }

.stop__org {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink-strong);
}

/* company / product links: quiet until hovered, with a small departure arrow */
.stop__org a,
.leg__name a { text-decoration: none; }

.stop__org a::after,
.leg__name a::after {
  content: "\2197";
  display: inline-block;
  margin-left: .28em;
  font-size: .68em;
  color: var(--faint);
  transform: translateY(-.1em);
  transition: color .25s ease, transform .32s var(--ease);
}

/* Anything clickable gets a soft box on hover. Padding is cancelled by an
   equal negative margin so nothing shifts, and box-decoration-break keeps the
   box intact if a link ever wraps. */
.stop__org a,
.leg__name a,
.dock a,
.board a {
  margin: 0 -7px;
  padding: 2px 7px;
  border-radius: 5px;
  background-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color .2s ease, color .22s ease;
}

.stop__org a:hover,
.stop__org a:focus-visible,
.leg__name a:focus-visible,
.dock a:hover,
.dock a:focus-visible,
.board a:hover,
.board a:focus-visible { background-color: var(--wash); }

/* and the whole sub-row lights up, so the target reads as the row */
.leg {
  border-radius: 4px;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.leg:has(a):hover {
  background-color: var(--wash);
  box-shadow: 0 0 0 9px var(--wash);
}

.leg:hover .leg__name a { background-color: transparent; }

/* Stretch the link over its whole row so the entire item is clickable, not
   just the words. .leg is the positioned ancestor, so inset:0 covers the row
   including its thumbnail. */
.leg__name a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;   /* above the fanned thumbnails, one of which sits at 2 */
}

/* internal project pages go forward, external sites depart */
.stop__org a:not([target])::after,
.leg__name a:not([target])::after { content: "\2192"; }

.stop__org a:not([target]):hover::after,
.leg__name a:not([target]):hover::after { transform: translate(.2em, 0); }

.stop__org a:hover::after,
.leg__name a:hover::after {
  color: var(--accent);
  transform: translate(.12em, -.28em);
}

.tag {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: 2px;
}

.stop__role {
  margin-top: 1px;
  font-size: 15.5px;
  color: var(--ink-strong);
  letter-spacing: -0.012em;
}

.span {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  vertical-align: 1px;
}

.stop__note {
  margin-top: 7px;
  max-width: 545px;
  color: var(--body);
  letter-spacing: -0.0075em;
}

/* legs — nested project rows ---------------------------------------------- */

.legs {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.leg {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 9px 0;
}

/* small tick back onto the spine */
.leg::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--faint);
  transition: background-color .3s var(--ease-out);
}

.leg::after {
  left: -22px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  --pulse-to: 3.6;
}

.leg.is-lit::before { background: var(--accent); }
.leg.is-lit::after { animation: dotPulse .72s var(--ease-out); }

.fan {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 48px;
}

.fan > i,
.fan > img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 35px;
  margin: -17.5px 0 0 -13px;
  border-radius: 3.5px;
  border: 1.5px solid #fdfbfa;
  box-shadow: 0 2px 7px rgba(50, 38, 34, .32);
  transition: transform .42s var(--ease);
}

.fan > i { background: linear-gradient(155deg, var(--a, #333), var(--b, #777)); }

/* real screenshots, cropped to the top where the app is recognisable */
.fan > img {
  display: block;
  object-fit: cover;
  object-position: top center;
  background: var(--paper-warm);
}

/* each card sits a shade apart from its neighbours so the stack reads as three */
.fan > :nth-child(1) { transform: translateX(-15px) rotate(-14deg) scale(.87); }
.fan > :nth-child(2) { transform: translateY(-1px)  rotate(0deg)   scale(1.06); z-index: 2; }
.fan > :nth-child(3) { transform: translateX(15px)  rotate(14deg)  scale(.91); }

/* gradient cards need the tonal nudge to separate; photographs do not */
.fan > i:nth-child(1) { filter: brightness(.78); }
.fan > i:nth-child(3) { filter: brightness(1.2); }

.leg:hover .fan > :nth-child(1) { transform: translateX(-22px) rotate(-21deg) scale(.87); }
.leg:hover .fan > :nth-child(3) { transform: translateX(22px)  rotate(21deg)  scale(.91); }

.leg__name {
  font-size: 14.5px;
  color: var(--ink-strong);
  letter-spacing: -0.012em;
}

.leg__note {
  font-size: 13.5px;
  color: var(--body);
  letter-spacing: -0.005em;
}

/* the end ----------------------------------------------------------------- */

.stop--end { padding-bottom: 20px; }

.stop__node--end {
  top: 12px;
  border-style: dashed;
  border-color: var(--faint);
}
.stop__node--end::after { background: var(--faint); }
.stop--end .stop__org { font-size: 16px; }
.stop--end .stop__note { margin-top: 3px; }

.memories {
  display: block;
  position: relative;
  height: 86px;
  margin-top: 24px;
  padding-left: 46px;
}

.memories img {
  position: absolute;
  top: 0;
  width: 61px;
  height: 80px;
  border-radius: 3px;
  border: 2px solid #fff;
  object-fit: cover;
  box-shadow: 0 3px 9px rgba(50,38,34,.26);
  transition: transform .45s var(--ease);
}

.memories img:nth-child(1) { left: 0;   transform: rotate(-13deg); }
.memories img:nth-child(2) { left: 35px; transform: rotate(-6deg); }
.memories img:nth-child(3) { left: 70px; transform: rotate(1deg); }
.memories img:nth-child(4) { left: 105px; transform: rotate(8deg); }
.memories img:nth-child(5) { left: 140px; transform: rotate(15deg); }

.stop--end:hover .memories img:nth-child(1) { transform: rotate(-19deg) translate(-12px, -3px); }
.stop--end:hover .memories img:nth-child(2) { transform: rotate(-9deg)  translate(-5px, -2px); }
.stop--end:hover .memories img:nth-child(4) { transform: rotate(11deg)  translate(5px, -2px); }
.stop--end:hover .memories img:nth-child(5) { transform: rotate(21deg)  translate(12px, -3px); }

/* --------------------------------------------------------------------------
   Colophon + dock
   -------------------------------------------------------------------------- */

main { padding-bottom: 130px; }

.dock {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 42px;
  padding: 34px 24px 28px;
}

/* the band itself: paper fading up over the page, blurred behind, so text
   passes under it instead of being hidden by a solid pill */
.dock::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(var(--paper-rgb), 0) 0%,
    rgba(var(--paper-rgb), .88) 44%,
    var(--paper) 100%);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 46%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 46%);
}

.dock a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .22s ease;
}

.dock a:hover,
.dock a:focus-visible { color: var(--ink); }

/* --------------------------------------------------------------------------
   Reveal
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.js .reveal.is-in { opacity: 1; transform: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  /* relative, not static: .meta__rule is absolute and must stay contained */
  .meta { position: relative; top: auto; left: auto; padding: 46px 0 0 26px; margin: 0 24px; }
  .meta__rule { left: 0; top: 50px; bottom: 4px; }

  .board {
    position: relative;
    top: auto;
    right: auto;
    margin: 26px 24px 0;
    padding: 0 0 0 26px;
    text-align: left;
  }
  .board__rule { right: auto; left: 0; }
  .hero { padding-top: 54px; }
}

@media (max-width: 700px) {
  :root { --gutter: 54px; }

  .meta { font-size: 11px; letter-spacing: .13em; }

  .window { --w: 158px; --h: 236px; border-radius: 53px; }
  .window__shroud { border-radius: 43px; }
  .window__glass  { border-radius: 33px; }

  .intro { margin-top: 44px; }
  .itinerary { margin-top: 56px; padding-right: 22px; }

  .stop__body { padding-left: 17px; }
  .stop__when { top: 28px; width: calc(var(--gutter) - 14px); }
  .stop__route { font-size: 7.5px; }

  .leader__label {
    left: var(--gutter);
    top: -16px;
    transform: translateX(-50%);
  }

  /* dates get their own line rather than wrapping mid-phrase */
  .span { display: block; margin-left: 0; margin-top: 3px; }

  .fan { width: 52px; height: 42px; }
  .memories { padding-left: 20px; }
  .dock { gap: 20px; padding: 30px 18px 22px; }
  .dock a { font-size: 10px; letter-spacing: .13em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .shade { transition-duration: .01ms; }
}
