/* AIRY LAYOUT: every card a little smaller, the headings inside the gray, a
   touch more room. A local experiment kept in this one file so it's easy to
   undo: delete the <link> to airy.css in index.html (marked "AIRY") and
   everything goes back.

   - Headings: each section's heading now sits inside its gray strip.
   - Project cards: 236 x 337 (was 268 x 383), flush with the bottom of the
     strip, centered with a gap that widens with the window (never under 32px).
   - System snapshot cards: scaled to 0.7 (was 0.8); the stage keeps its size.
   - Off the screen panels: 400px tall (was 480) in the same 480px band; on
     phones the collapsed bars are 76px (was 88), the difference as margin.
   - Type: card text a notch smaller (nothing under 12px, except the small
     uppercase labels at 11px). */

/* ---- Headings inside the gray ----
   The band itself is gray, so the heading sits on the same gray as its strip.
   What used to be white space above a section is now a white margin, so the
   sections are still separated by white. */
.d-snapshots-band.d-work { background: #f0f0ee; padding-top: 40px; }
.d-snapshots-band.d-work.d-systems,
.d-snapshots-band.d-work.d-offscreen { margin-top: 56px; padding-top: 40px; }
@media (max-width: 640px) {
  .d-snapshots-band.d-work.d-offscreen { padding-top: 32px; }
}

/* ---- Project cards ---- */
:root {
  --v2-card-w: 236px;
  --v2-card-h: 337px;
  --airy-card-h-orig: 383px;
}
.v2-card-main { flex-basis: var(--v2-card-w); width: var(--v2-card-w); }
/* Open, the card is the same side panel as before. */
.v2-card.is-open .v2-card-main { flex-basis: 268px; width: 268px; }
@media (min-width: 641px) {
  /* Bottom-aligned, centered, with a gap that grows with the window and never
     drops under 32px. The first and last cards take auto margins instead of
     justify-content:center, so when the window is too narrow for every card
     the row simply scrolls from its start (nothing is cut off on the left),
     and a card opening or closing slides its neighbors smoothly. */
  .d-company .v2-card-row {
    align-items: flex-end;
    gap: clamp(32px, 5vw, 96px);
    padding-top: 4px; padding-bottom: 0;
    padding-left: var(--band-inset); padding-right: var(--band-inset);
  }
  .d-company .v2-card-row > .v2-card:first-child { margin-left: auto; }
  .d-company .v2-card-row > .v2-card:last-child { margin-right: auto; }
}
@media (max-width: 640px) {
  :root {
    --v2-card-w: min(70vw, 300px);
    --v2-card-h: calc(min(70vw, 300px) * 1.429);
    --airy-card-h-orig: calc(min(80vw, 340px) * 1.429);
  }
  .v2-card.v-accordion.is-open { width: var(--v2-card-w); }
  /* On phones the cards stay centered in the same-height row as before. */
  .d-company .v2-card-row {
    padding-top: calc(4px + (var(--airy-card-h-orig) - var(--v2-card-h)) / 2);
    padding-bottom: calc((var(--airy-card-h-orig) - var(--v2-card-h)) / 2);
  }
}

/* ---- System snapshot cards ---- */
.sys-stage { --sys-k: 0.7; }

/* ---- Off the screen ---- */
.off-panels { align-items: center; }
.off-panel { height: 400px; }
@media (max-width: 640px) {
  .off-panels { align-items: stretch; } /* stacked: full width, not centered */
  .off-panel { height: 76px; margin: 6px 0; }
  .off-panel.is-open { height: var(--open-h, 440px); margin: 0; }
}

/* ---- Type, a notch smaller ---- */
.d-company .v2-card-title { font-size: 14px; }
.v2-card-desc { font-size: 12px; }
.v2-stat-num { font-size: 28px; }
.v2-stat-label { font-size: 12px; }
.off-title { font-size: 20px; }
.off-eyebrow { font-size: 11px; }
.off-caption { font-size: 15px; }
.off-link { font-size: 13px; }
@media (max-width: 640px) {
  .off-caption { font-size: 14px; }
}

/* ---- Less gray, more white ----
   The gray bands are trimmed (tighter padding around the headings and cards,
   and the System snapshots stage fitted to its smaller cards), and what that
   frees up becomes white space between the sections. */
.d-snapshots-band.d-work { padding-top: 28px; }
.d-snapshots-band.d-work:not(.d-systems):not(.d-offscreen) { margin-top: 48px; }
.d-snapshots-band.d-work.d-systems,
.d-snapshots-band.d-work.d-offscreen { margin-top: 104px; padding-top: 64px; }
.d-snapshots-title { margin-bottom: 12px; }
.d-company .v2-scroll-wrap { padding-top: 12px; }

/* Off the screen: the strip hugs the panels (they're 400px tall). */
.off-strip { padding: 24px 24px 72px; }
.off-panels { height: 400px; }

/* System snapshots: the stage is only as tall as the smaller fanned cards
   need (card height x scale, plus 72px for the tilt and shadow), with the
   cards centered in it. */
.sys-stage {
  --sys-stage-h: calc(var(--sys-h) * var(--sys-k) + 72px);
  height: var(--sys-stage-h);
}
.sys-card { top: calc((var(--sys-stage-h) - var(--sys-h)) / 2); }
.sys-strip { padding: 12px 24px 28px; }

@media (max-width: 640px) {
  .d-snapshots-band.d-work:not(.d-systems):not(.d-offscreen) { margin-top: 32px; }
  .d-snapshots-band.d-work.d-systems,
  .d-snapshots-band.d-work.d-offscreen { margin-top: 80px; padding-top: 44px; }
  .off-panels { height: auto; }
  .off-strip { padding: 20px 16px 48px; }
  /* Phones: no dots, and the front card sits flush on the bottom edge of the gray. */
  .sys-strip { padding: 8px 16px 0; }
  .sys-dots { display: none; }
  .sys-stage { height: calc(var(--sys-h) * var(--sys-k) + 36px); }
  .sys-card { top: calc((var(--sys-h) * var(--sys-k) + 72px - var(--sys-h)) / 2); }
  .sys-float { animation: none; }
}
