/* ==========================================================================
   Project pages — loaded after site.css, reuses its tokens.
   ========================================================================== */

.project {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Head: back link + cabin lights control
   -------------------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 118px 24px 0;
}

.back {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .22s ease;
}

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

/* same soft box as the timeline links */
.back,
.onward a,
.flight h2 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;
}

.back:hover,
.back:focus-visible,
.onward a:hover,
.onward a:focus-visible,
.flight h2 a:hover,
.flight h2 a:focus-visible { background-color: var(--wash); }

/* a board row is a target in its own right */
.flight {
  border-radius: 4px;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.flight:hover {
  background-color: var(--wash);
  box-shadow: 0 0 0 8px var(--wash);
}

/* the row is the target, so the link does not draw a second box inside it */
.flight:hover h2 a { background-color: transparent; }

/* the overhead reading light, in the same moulded plastic as the window */
.lamp {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  background: linear-gradient(168deg, #f8f2ee 0%, #ece4df 45%, #cfc5be 100%);
  box-shadow:
    0 3px 6px -2px rgba(60, 44, 40, .32),
    inset 0 1.5px 1px rgba(255, 255, 255, .95),
    inset 0 -1.5px 2px rgba(120, 100, 95, .28);
  transition: transform .12s ease, box-shadow .2s ease, background .5s ease;
}

.lamp:active {
  transform: translateY(1.5px);
  box-shadow:
    0 1px 3px -1px rgba(60, 44, 40, .34),
    inset 0 1px 3px rgba(120, 100, 95, .34);
}

.lamp__lens {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #fffaf0 0%, #f6d98d 42%, #e0ad3c 100%);
  box-shadow:
    0 0 9px 2px rgba(240, 200, 110, .8),
    inset 0 -1px 2px rgba(140, 100, 20, .45);
  transition: background .5s ease, box-shadow .5s ease;
}

/* lights out */
html[data-shade="closed"] .lamp {
  background: linear-gradient(168deg, #3b3733 0%, #2b2724 45%, #1d1b19 100%);
  box-shadow:
    0 3px 6px -2px rgba(0, 0, 0, .55),
    inset 0 1.5px 1px rgba(255, 255, 255, .09),
    inset 0 -1.5px 2px rgba(0, 0, 0, .5);
}

html[data-shade="closed"] .lamp__lens {
  background: radial-gradient(circle at 50% 38%, #4c463f 0%, #322d29 55%, #241f1c 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6), inset 0 -1px 1px rgba(255, 255, 255, .06);
}

.back::before {
  content: "\2190";
  display: inline-block;
  margin-right: .5em;
  transition: transform .3s var(--ease);
}

.back:hover::before { transform: translateX(-3px); }

/* --------------------------------------------------------------------------
   Title block
   -------------------------------------------------------------------------- */

.project__head { margin-top: 54px; }

.project__crest {
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--disc, #333);
  color: #fff;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 40px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(50, 38, 34, .28);
}

/* some products have a real icon, which beats a letter disc */
.project__crest--logo {
  background: none;
  overflow: hidden;
}

.project__crest--logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.project__title {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.026em;
  line-height: 1.15;
  color: var(--ink-strong);
}

.project__kicker {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
}

.project__lead {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.012em;
  color: var(--body);
}

.project__lead strong {
  font-weight: 500;
  color: var(--ink-strong);
}

/* --------------------------------------------------------------------------
   Shot rail — breaks out of the column, scrolls in its own container
   -------------------------------------------------------------------------- */

/* the rail lines up with the text column and scrolls inside it, rather than
   running full-bleed and losing the left edge */
.shots {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 620px;
  margin: 54px auto;
  padding: 4px 24px 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
}

.shots::-webkit-scrollbar { display: none; }
.shots.is-panning { cursor: grabbing; scroll-snap-type: none; }

.shot {
  flex: 0 0 auto;
  width: 206px;
  padding: 7px;
  border-radius: 28px;
  scroll-snap-align: center;
  background: linear-gradient(168deg, #ffffff 0%, #f6f1ef 40%, #e6dedb 100%);
  box-shadow:
    0 22px 40px -20px rgba(60, 44, 40, .34),
    0 4px 10px -4px rgba(60, 44, 40, .16),
    inset 0 1px 1px rgba(255, 255, 255, .95);
  transition: transform .45s var(--ease);
}

.shot:hover { transform: translateY(-5px); }

.shot img {
  display: block;
  width: 100%;
  border-radius: 22px;
  background: var(--paper-warm);
}

/* --------------------------------------------------------------------------
   Departures board
   -------------------------------------------------------------------------- */

.flights {
  list-style: none;
  margin: 46px 0 0;
  padding: 0;
  border-top: 1px solid var(--hair);
}

.flight {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--hair);
}

.flight__code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--faint);
  padding-top: 3px;
  white-space: nowrap;
}

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

.flight h2 a { text-decoration: none; }

/* the whole board row is the target */
.flight h2 a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.flight h2 a::after {
  content: "\2197";
  display: inline-block;
  margin-left: .3em;
  font-size: .66em;
  color: var(--faint);
  transform: translateY(-.12em);
  transition: color .25s ease, transform .32s var(--ease);
}

.flight h2 a:hover::after {
  color: var(--accent);
  transform: translate(.12em, -.3em);
}

.flight__note {
  margin-top: 6px;
  color: var(--body);
  letter-spacing: -0.0075em;
}

.flight__status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 9px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  white-space: nowrap;
}

.flight__status--free { color: var(--accent); border-color: rgba(58, 83, 237, .3); }

html[data-shade="closed"] .flight__status--free { border-color: rgba(139, 155, 255, .35); }

@media (max-width: 700px) {
  .flight {
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
  }
  .flight__code { grid-column: 1; }
  .flight__status { grid-column: 2; grid-row: 1; }
  .flight__body { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   Feature list
   -------------------------------------------------------------------------- */

/* pages with a shot rail get their breathing room from it; pages without one
   need it here, and consecutive sections need separating either way */
.project__head + section { margin-top: 52px; }
section + section { margin-top: 44px; }

.section__label {
  margin-bottom: 26px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: #86847f;
}

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

.features li {
  position: relative;
  padding: 0 0 26px 42px;
}

.features li::before {
  content: counter(step, decimal-leading-zero);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--faint);
}

.features { counter-reset: step; }

.features h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.016em;
  color: var(--ink-strong);
}

.features p {
  margin-top: 4px;
  color: var(--body);
  letter-spacing: -0.0075em;
}

/* --------------------------------------------------------------------------
   Footnote + next link
   -------------------------------------------------------------------------- */

.note {
  margin-top: 44px;
  padding: 20px 22px;
  border-radius: 4px;
  border-left: 2px solid var(--hair);
  background: var(--paper-warm);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body);
}

.note b {
  font-weight: 500;
  color: var(--ink-strong);
}

.onward {
  margin-top: 58px;
  padding-top: 30px;
  border-top: 1px solid var(--hair);
}

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

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

.onward a::after {
  content: "\2192";
  display: inline-block;
  margin-left: .55em;
  transition: transform .3s var(--ease);
}

.onward a:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Dark cabin
   -------------------------------------------------------------------------- */

html[data-shade="closed"] .shot {
  background: linear-gradient(168deg, #3b3733 0%, #2b2724 40%, #1d1b19 100%);
  box-shadow:
    0 22px 40px -20px rgba(0, 0, 0, .6),
    0 4px 10px -4px rgba(0, 0, 0, .4),
    inset 0 1px 1px rgba(255, 255, 255, .09);
}

html[data-shade="closed"] .note { background: #1b1917; }

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

@media (max-width: 700px) {
  .topbar { padding-top: 46px; }
  .project__head { margin-top: 40px; }
  .project__title { font-size: 25px; }
  .project__lead { font-size: 16px; }
  .shots { gap: 14px; margin: 42px auto; }
  .shot { width: 172px; }
  .features li { padding-left: 34px; }
}
