/* Crimpwell: what every page shares beyond the kit (the condensed headings, the close on the brand band)
   and the inner pages' sections. The homepage keeps its own sections' rules in its <style>. */

/* the condensed cut of the display face (the user's direction: condensed sport type) */
h1, h2, h3, .t-card, .nav__logo { font-stretch: 75%; }

/* a head row's words start on the split line (the 7th column), on every page and every width a row holds two */
@media (min-width: 1024px) { .section-head--row > p { flex: 0 0 calc(50% - 12px); max-width: none !important; } }
/* a phone hero keeps room under its button, so the step to the next section reads as one (section-gaps) */
@media (max-width: 639px) { .hero--place { --hpadb: 72px; } }

/* the focus ring in the ink: the hold pink is 2.95:1 on the chalk ground, the ink 16:1 (chalk on the berry band) */
:focus-visible { outline-color: var(--p-ink); }
footer.closing.ground-brand :focus-visible { outline-color: #f1f1ef; }
/* the block buttons' secondary is a text link: no inner padding, so its words start on the column's line */
html[data-buttons="block"] .btn--secondary { padding-inline: 0; }
/* ...and it stays a text link under the pointer: the motion layer's secondary hover fill (motion.css, the same
   weight as system.css's block rule and later) drew a grey box with a border tight round the words. Its
   underline darkens (system.css) and a press scales it .985 (motion.css), nothing else */
html[data-buttons="block"]:not([data-motion="off"]) .btn--secondary:is(:hover, :active) { background: none; border-color: transparent; }
/* a phone: a head row's text link takes its own line on the container's edges */
@media (max-width: 639px) { .section-head--row > p { width: 100%; } .section-head--row > p > a.link { display: flex; width: 100%; margin-top: 8px; } }
/* a text link's line runs under its words, never its arrow (motion.md, Link): motion.css's `.link` sizes say so,
   but its shared link rule outweighs them (0,3,1) and drew both lines the full width. The sizes stay the
   shared rule's (0% / 100% 1px: the line draws from the left and leaves to the right); the two line images
   themselves end 1em + 8px short, under the words only */
html:not([data-motion="off"]) a.link.link {
  background-image: linear-gradient(to right, currentColor calc(100% - 1em - var(--s-2)), transparent 0),
                    linear-gradient(to right, var(--m-rest, var(--line-strong)) calc(100% - 1em - var(--s-2)), transparent 0);
}
/* a phone's full-width head-row link is a row: its arrow at the row's end, so the line under it reads as one */
@media (max-width: 639px) { .section-head--row > p > a.link { justify-content: space-between; } }

/* ---------------------------------------------------------------- the credits page */
/* one section of the system: the h1 in the head row, the 26 credits in two columns under it (one on a phone),
   the halves of the grid, so the list fills its screen; each line whole in its column; links rest on the faint
   line (m-link) */
.credits-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--gutter); }
.credits-list li { break-inside: avoid; padding-block: 8px; font-size: 16px; line-height: 1.5; border-top: 1px solid var(--line); }
/* a short laptop screen (under 880px tall: 1024x768, 1280x800): three columns, so the list stays on its screen */
@media (min-width: 1024px) and (max-height: 879px) { .credits-list { columns: 3; } }
/* a phone: one column, 24px under the head row (the gap the other pages' groups give their head rows); each link
   a 45px tap area (a transparent ::before 12px above and below its words, the underline where it was) on rows
   46px apart, so a thumb never lands on the neighbour (they were 21px tall, 8px apart) */
@media (max-width: 639px) {
  .credits-list { columns: 1; } .credits-page .head-row { margin-bottom: 24px; }
  .credits-list li { padding-block: 12px; }
  .credits-list a { position: relative; }
  .credits-list a::before { content: ""; position: absolute; top: -12px; bottom: -12px; left: 0; right: 0; }
}

/* ---------------------------------------------------------------- the top bar, every page */
/* the page you are on: the inner pages live in the Prices menu, so its card carries aria-current="page"
   and the Prices word keeps the kit's still 2px bar (the geometry of system.css's aria-current bar) */
.nav__item:has(.menu-card[aria-current="page"]) > .nav__link::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: -2px; height: 2px; border-radius: 2px; background: currentColor;
}
@media (min-width: 1024px) and (max-width: 1279px) { .nav__item:has(.menu-card[aria-current="page"]) > .nav__link::after { left: var(--s-2); right: var(--s-2); } }
@media (max-width: 1023px) { .nav.is-open .nav__item:has(.menu-card[aria-current="page"]) > .nav__link::after { left: 0; right: auto; width: 24px; bottom: 10px; } }
/* a menu card's name underlines as its photograph zooms (the kit's picture-card rule), so a hover still shows
   under reduced motion, where the zoom stays off; the page you are on keeps a 2px line at rest */
.menu-card .t-card { text-decoration: underline 1px transparent; text-underline-offset: 6px; transition: text-decoration-color var(--m-out) var(--m-ease); }
.menu-card:is(:hover, :focus-visible) .t-card { text-decoration-color: currentColor; transition-duration: var(--m-in); }
.menu-card[aria-current="page"] .t-card { text-decoration: underline 2px currentColor; }
/* the Prices chevron flips, never turns (a place: motion.md, Nav), and in step with the panel: at once when
   the panel starts to show after its 150ms of intent, at once back when it goes */
@media (min-width: 1024px) {
  html:not([data-motion="off"]) .nav__link .chev { transition: none; }
  html:not([data-motion="off"]) .nav__item:is(:hover, :focus-within) > .nav__link .chev { transition: transform 0s linear 150ms; }
}
/* the phone sheet's Prices chevron flips at once too: its links appear at once (display), so the arrow
   never trails them by a turn */
@media (max-width: 1023px) { html:not([data-motion="off"]) .nav__expand svg { transition: none; } }
/* reduced motion: the panel still fades (motion.md: "menus fade"), opacity only, no drop; system.css stops
   every transition under reduced motion, so this one is said again with !important */
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  html:not([data-motion="off"]) .nav__menu { transition: opacity var(--m-close) var(--m-ease), visibility 0s linear var(--m-close) !important; }
  html:not([data-motion="off"]) .nav__item:is(:hover, :focus-within) > .nav__menu { transition: opacity var(--m-panel) var(--m-ease) 150ms, visibility 0s linear 150ms !important; }
}
/* the phone sheet the same way: it fades in, without its 8px slide */
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  html:not([data-motion="off"]) .nav.is-open .nav__links { transition: opacity var(--m-panel) var(--m-ease) !important; }
}

/* ---------------------------------------------------------------- the close and the footer, every page */
/* the footer's links (m-link m-link--bare): the 1px line draws on hover and focus; the page you are on keeps
   its line, 2px, still (the top bar's current-page language) */
html:not([data-motion="off"]) footer.closing a.m-link[aria-current="page"] { background-size: 100% 2px, 0% 1px; background-position: left 0 bottom 0, 0 100%; }
/* the close on the brand band: the hold pink deepened to berry so every word on it holds 7:1 (chalk on
   #960e48 is 7.6:1); the muted words on it are chalk too, the button inverted (chalk with berry words) */
footer.closing.ground-brand { --p-accent: #960e48; --p-accent-ink: #f1f1ef; --muted: #f1f1ef; }
footer.closing.ground-brand a:not(.btn) { color: inherit; }
/* the name across the .wrap (the dealt name moment): the face at its full width, sized from the column so
   the nine letters run line to line; its p keeps its descender inside the box */
footer.closing .closing__cta { container-type: inline-size; gap: var(--s-5); }
footer.closing .closing__cta h2 { max-width: none; }
footer.closing .close__word { font-stretch: 100%; font-size: calc(100cqw / 3.8); line-height: .8; padding-bottom: .14em; overflow: visible; }
footer.closing > .wrap { row-gap: var(--s-6); }
footer.closing .footer__nav { margin-top: var(--s-5); padding-top: var(--s-4); }
@media (min-width: 640px) { footer.closing .footer__legal .credits { flex-basis: auto; } }
/* the walk is in the visit section beside the map link; the footer keeps the address and the hours */
@media (min-width: 640px) { footer.closing .footer__way { display: none; } }
footer.closing .closing__links .grid { align-items: start; }
.hours { margin: 0; }   /* a <dl> keeps no browser margin: the hours start level with the address */
/* a phone: the close and its links on one screen; the nav row is the menu's, the walk the visit section's */
@media (max-width: 639px) { footer.closing .footer__nav, footer.closing .footer__way { display: none; } }

/* ---------------------------------------------------------------- inner pages */
/* a head row: the h2 at the left line, one line of words at the right, starting on the page's split line (k=6) */
.head-row { margin-bottom: 40px; }
.head-row > p { font-size: 16px; line-height: 1.6; max-width: 46ch; margin: 0; }
.wrap.grid > * > .head-row, .wrap.grid > .head-row { grid-column: 1 / -1; margin-bottom: 16px; }
@media (max-width: 639px) { .head-row, .wrap.grid > * > .head-row { margin-bottom: 0; } }

/* a .group that is a grid too (the photographs under the steps, the strip under the passes): the kit makes a
   .group a flex column, which leaves photographs sized by their container at no width */
.wrap > .group.grid { display: grid; align-content: start; }
/* a phone: a group's head row and what follows it keep the system's 24px apart */
@media (max-width: 639px) { .wrap > .group:not(.grid) { gap: 24px; } }

/* two groups that are one grid above a phone and one phone screen each below it (.g2m) */
:is(.twin__one, .twin__two, .join__one, .join__two) { display: contents; }
@media (max-width: 639px) {
  :is(.twin__one, .twin__two, .join__one, .join__two) { display: flex; flex-direction: column; gap: 24px; grid-column: 1 / -1; min-width: 0; }
}

/* numbered steps: the number in the display face, the step's first words in ink, the rest muted */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { counter-increment: step; min-width: 0; }
.steps > li::before { content: counter(step, decimal-leading-zero); display: block; font: var(--display-weight) 44px/1 var(--font-display); font-stretch: 75%; letter-spacing: var(--display-tracking); color: var(--p-ink); }
.steps .steps__t { margin: 16px 0 6px; font: 600 18px/1.3 var(--font-text); color: var(--p-ink); }
.steps p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--p-ink); }
.steps--list > li { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.steps--list > li:first-child { padding-top: 0; }
.steps--list > li::before { grid-row: 1 / span 2; font-size: 36px; }
.steps--list .steps__t { margin-top: 0; }
.steps__n { display: none; }   /* the number as text in the title, shown on a phone where the step stands in one column */

/* the booking panel: the form on the concrete surface, its fields on the chalk ground */
.form-panel { background: var(--p-surface); padding: var(--s-7); border-radius: var(--r-lg); min-width: 0; }
@media (max-width: 1023px) { .form-panel { padding: var(--s-6); } .form-panel .form { grid-template-columns: minmax(0, 1fr); } }
/* a phone: the form on the page ground, its labels on the container's line */
@media (max-width: 639px) { .form-panel { background: none; padding: 0; border-radius: 0; } .form-panel .form { gap: 24px; } }
/* the field's focus ring in the ink (the kit's is the action colour, the hold pink: 2.4:1 on the concrete) */
html:not([data-motion="off"]) .field :is(input, select, textarea):focus { border-color: var(--p-ink); box-shadow: 0 0 0 1px var(--p-ink), 0 0 0 4px color-mix(in oklab, var(--p-ink) 16%, transparent); }
/* a field still to fix keeps its error border while focused (the ink ring round it), so the one you are fixing
   never looks right before it is */
html:not([data-motion="off"]) .field :is(input, select, textarea)[aria-invalid="true"]:focus { border-color: var(--error); }
/* while a form sends (system.js disables its button and sets aria-busy, once the form has an endpoint): the
   button rests a step fainter with the progress pointer; the "Sending" line follows after 300ms */
.form .btn[aria-busy="true"] { opacity: .64; cursor: progress; }
/* the first field to fix gets the focus after a send (system.js): on a phone it was scrolled to the top edge,
   under the fixed bar with its label off screen. It now lands clear of the bar, its label in view */
.field :is(input, select, textarea) { scroll-margin-top: calc(var(--nav) + 48px); scroll-margin-bottom: 120px; }
/* a field's label and box keep to its top: when the field beside it grows an error line, the row grows and a
   stretched field spread its own rows, so its box dropped ~24px out of line with its neighbour's */
.form .field { align-content: start; }
/* an error line arrives as the answer to the press: a 160ms fade with a 4px drop, transform and opacity only.
   It takes its room at once (nothing animates height); reduced motion shows it at once */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .field__error:not([hidden]) { transition: opacity 160ms var(--m-ease), transform 160ms var(--m-ease); }
  @starting-style { html:not([data-motion="off"]) .field__error:not([hidden]) { opacity: 0; transform: translateY(-4px); } }
}

/* first session: the hour (steps across; the week's intro times beside the shoes) and the booking (photograph and form) */
#hour .group + .group { margin-top: 40px; }
.hour__times { align-items: start; }
.times { min-width: 0; }
.times > .t-label { margin: 0 0 12px; }
@media (max-width: 1023px) { .steps--row > li { grid-column: span 6; } }
@media (max-width: 1023px) { .hour__times .rows > li { padding-block: 12px; } }
@media (min-width: 640px) and (max-width: 1023px) { .hour__times { --times-r: 1.05; } #hour .group + .group { margin-top: 24px; } }
@media (max-width: 639px) {
  .steps--row > li { grid-column: 1 / -1; }
  .steps--row > li::before { font-size: 32px; }
  .steps--row .steps__t { margin-top: 8px; }
  #hour .group + .group { margin-top: 0; }
  .hour__times { --times-r: 1.65; }
  .hour__times > * { grid-column: 1 / -1; }
}

/* classes: two classes side by side, each a photograph then its words; the booking photograph beside the form */
.klass { display: flex; flex-direction: column; min-width: 0; }
.klass > .pl-photo { margin-bottom: 20px; }
.klass__when { margin: 0 0 8px; }
.klass__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.klass__head h3 { margin: 0; font: var(--display-weight) 32px/1.1 var(--font-display); font-stretch: 75%; letter-spacing: var(--display-tracking); }
.klass__price { margin: 0; font: 500 18px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.klass__text { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: var(--p-ink); max-width: 52ch; }
@media (max-width: 639px) { .klass > .pl-photo { margin-bottom: 16px; } }

/* memberships: four passes as open columns (the one action under them), four details under them; joining beside its photograph */
#passes .group + .group { margin-top: 40px; }
.passes { list-style: none; margin: 0; padding: 0; }
.pass { display: flex; flex-direction: column; min-width: 0; }
.pass h3 { margin: 0; font: 600 16px/1.3 var(--font-text); font-stretch: 100%; letter-spacing: 0; }
.pass__price { margin: 16px 0 0; font: var(--display-weight) 36px/1 var(--font-display); font-stretch: 75%; letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; }
.pass__unit { margin-left: 6px; font: 500 16px/1 var(--font-text); font-stretch: 100%; letter-spacing: 0; color: var(--p-ink); }
.pass__text { margin: 12px 0 0; font-size: 16px; line-height: 1.5; color: var(--p-ink); }
.strip { align-items: start; --strip-r: 3 / 2; }
.passes__cta { margin-top: 24px; }
.strip__photo { margin: 0; min-width: 0; overflow: hidden; border-radius: var(--r-lg); }
.strip__photo > img { display: block; width: 100%; height: auto; aspect-ratio: var(--strip-r, 1); object-fit: cover; object-position: var(--pos, 50% 50%); }
/* a tablet: the four passes stay one row, the details two by two at 16:9 */
@media (min-width: 640px) and (max-width: 1023px) { .passes > .pass { grid-column: span 3; } .strip > * { grid-column: span 6; } .strip { --strip-r: 2 / 1; } }
@media (max-width: 639px) {
  #passes .group + .group { margin-top: 0; }
  .passes > .pass { grid-column: span 6; }
  .pass__price { margin-top: 12px; font-size: 28px; }
  .pass__unit { display: block; margin: 4px 0 0; }
  .pass__text { font-size: 15px; }
  .strip > * { grid-column: span 6; }
  .strip { --strip-r: 4 / 5; }
}
.join__steps { grid-column: 7 / span 6; grid-row: 2; }
.join__photo { grid-column: 1 / span 6; grid-row: 2 / span 2; align-self: start; width: 100%; }
.join__faq { grid-column: 7 / span 6; grid-row: 3; margin-top: 8px; min-width: 0; }
.join__faq > h3 { margin: 0 0 12px; font: 600 18px/1.3 var(--font-text); font-stretch: 100%; letter-spacing: 0; }
.faq { margin: 0; }
.faq dt { margin-top: 14px; font-weight: 600; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 4px 0 0; color: var(--p-ink); line-height: 1.5; }
@media (max-width: 639px) {
  .join__steps, .join__photo, .join__faq { grid-column: auto; grid-row: auto; }
  .join__faq { margin-top: 0; }
  /* the number runs in the step's first line, so every line of text starts on the container's edge */
  .steps--list > li { display: block; padding-block: 14px; }
  .steps--list > li::before { display: none; }
  .steps--list .steps__n { display: inline; margin-right: 10px; font: var(--display-weight) 22px/1 var(--font-display); font-stretch: 75%; letter-spacing: var(--display-tracking); }
  .steps--list .steps__t { margin-bottom: 4px; }
  .join { --join-r: 1.6; }
}

/* a tablet: the kit's span classes start at 1024, so the inner pages' pairs say their halves here */
@media (min-width: 640px) and (max-width: 1023px) {
  .hour__times > *, .klass, .twin__one > .pl-photo, .twin__two > .form-panel { grid-column: span 6; }
  .klass { --klass-r: .8; }
}

/* a short laptop screen (1024x768): the close keeps its name line to line with tighter gaps */
@media (min-width: 1024px) and (max-height: 820px) {
  footer.closing > .wrap { row-gap: var(--s-5); }
  footer.closing .closing__cta { gap: var(--s-4); }
  footer.closing .footer__nav { margin-top: var(--s-4); }
}
/* a small laptop (1024 to 1279): the strip's details at 3:2, the joining column wider than the photograph */
@media (min-width: 1024px) and (max-width: 1279px) {
  .strip { --strip-r: 3 / 2; }
  .join__photo { grid-column: 1 / span 5; }
  .join__steps, .join__faq { grid-column: 6 / -1; }
  .steps--list > li { padding-block: 12px; }
  .faq dt { margin-top: 10px; }
}
