/* Sections: what every part of the page after Previous Designs shares. The section rhythm and the centred
   section head (badge, headline, lead) of Previous Designs; the soft Light gray 5 card; the black band card,
   which is the hero card's flat Black and grain inset from the page edges, used for two sections only;
   the round arrow buttons; and the one scroll reveal. Colours come from tokens.css only. */
.section { padding: clamp(80px, 10vw, 128px) 0; }

.section-head { text-align: center; padding: 0 var(--gutter); }
.section-head h2 {
  margin-top: 20px;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: var(--t-headline);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--fg);
  text-wrap: balance;
}
.section-head > :first-child { margin-top: 0; }
.section-lead {
  max-width: 560px;
  margin: 20px auto 0;
  font-size: var(--t-lead);
  font-weight: 400;
  line-height: 1.5;
  color: var(--fg-soft);
  text-wrap: balance;
}

/* the section headline when it sits on the left of its row, beside a drawing or a list */
.headline {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: var(--t-headline);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--fg);
  text-wrap: balance;
}

/* keeps a phrase on one line (a headline never breaks inside it) */
.nowrap { white-space: nowrap; }

/* a headline that sits in a row with something else: left-aligned, same face and tracking */
.split-title {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: var(--t-title);
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* card: Light gray 5, radius 24, padding 32, no shadow; the hairline turns Turquoise 3 on hover */
.card {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid transparent;
  transition: border-color var(--hover) ease;
}
.card:hover { border-color: var(--accent); }
.card :where(h3) {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-wrap: balance;
}
.card :where(h3 + p) { margin-top: 12px; }
.card :where(p) { color: var(--fg-soft); text-wrap: pretty; }

/* a card's icon: one of the kit's small isometric drawings (uploads/art/icons/), top left, never stretched */
.card-icon { display: block; flex: none; width: 72px; height: 72px; }
.card-icon + h3, .card-top + h3 { margin-top: 24px; }

/* the brand drawings placed through the page: whole, calm, never over words. Two are written inline by
   tools/make-art.mjs so their emails can ride the dashed track like the hero's: ink on white, white on the
   black bands, the traced part in teal. Under reduced motion each email waits where the drawing puts it. */
.art { display: block; width: 100%; height: auto; }
.art-svg { display: block; width: 100%; height: auto; overflow: visible; color: var(--fg); }
.art-svg .art-line, .art-svg .art-rider:not(.is-traced) path { opacity: 0.26; }
.art-svg .art-trace, .art-svg .art-rider.is-traced { color: var(--accent); }
.band .art-svg { color: var(--on-sky); }
.band .art-svg .art-line, .band .art-svg .art-rider:not(.is-traced) path { opacity: 0.28; }
.band .art-svg .art-trace, .band .art-svg .art-rider.is-traced { color: var(--illo-trace); }
.art-rider { animation: art-ride var(--ride, 12s) linear infinite; animation-delay: calc(var(--p) * var(--ride, 12s) * -1); }
@keyframes art-ride {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .art-rider { animation: none; transform: translate(calc(var(--dx) * var(--p)), calc(var(--dy) * var(--p))); }
}

/* an image in a card: white, radius 16, a hairline round it */
.frame { display: block; overflow: hidden; border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--line); }
.frame img { width: 100%; height: auto; }

/* band card: the hero card's ground (Black with the film grain below), 12px in from the page edges */
.band {
  position: relative;
  margin: 12px;
  padding: clamp(64px, 8vw, 112px) 0;
  border-radius: var(--radius-xl);
  background: var(--hero-ground);
  color: var(--on-sky);
  overflow: hidden;
  isolation: isolate;
}
/* grain: the black cards' ground is film grain, made the way https://righthookdigital.com/ makes theirs (owner,
   06.11): a small looping noise image tiled over the Black, 250 pixels square shown at 100px, so the specks are
   finer than a pixel; three frames, ten a second. The image is ours (tools/make-grain.mjs): black and faint
   light specks, a third of it clear, so the ground stays the Black token. The browser only plays it while the
   card is on screen. Under reduced motion it is the first frame, standing still. */
.hero-card, .band {
  background-image: url("../uploads/art/grain.png");
  background-size: 100px 100px;
}
@media (prefers-reduced-motion: reduce) { .hero-card, .band { background-image: url("../uploads/art/grain-still.png"); } }
.band > * { position: relative; z-index: 1; }
/* on a band the button is Turquoise 4 with black words, as in the hero */
.band .btn { background: var(--hero-press); color: var(--on-hero-press); }
.band .btn:hover { background: var(--hero-press-hover); }

/* round arrow button, the Previous Designs arrows' look */
.arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--fg);
  transition: background-color var(--hover) ease, color var(--hover) ease;
}
.arrow-btn svg { width: 18px; height: 18px; }
.arrow-btn:hover { background: var(--press); color: var(--on-press); }
.arrow-btn:disabled { color: var(--line); background: var(--surface); cursor: default; }

/* Scroll reveal (js/reveal.js): marked elements fade up once, 24px, as they enter the screen. Only while
   html.has-motion is set. If the script never starts, a 4s safety shows everything anyway. The hover
   colour changes keep their own timing. While the view curtain lifts (js/router.js) --sd holds the new
   view's fade-ups back until the page is in sight. */
.has-motion [data-reveal] { opacity: 0; transform: translateY(24px); animation: reveal-safety 1ms 4s forwards; }
.has-motion.has-reveal [data-reveal] { animation: none; }
.has-motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--rise) var(--ease-out) calc(var(--d, 0ms) + var(--sd, 0ms)), transform var(--rise) var(--ease-out) calc(var(--d, 0ms) + var(--sd, 0ms)),
    border-color var(--hover) ease, background-color var(--hover) ease, color var(--hover) ease;
}
@keyframes reveal-safety { to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .band { margin: 8px; border-radius: 22px; }
  .card { padding: 24px; }
}
