/* #foot: levelling feet (29 Oct 2026, scene 4 of Jared's comments; it takes the storeroom's place). Theme dark, like
   the hall before it and the brochure's page 7. Words: brochure page 7, word for word.

   Static layout (reduced motion, no GSAP, no JS, windows under 340px tall and portrait windows under 520px tall): the
   label, heading, text, the four
   settings and the three steps in the left columns, the still beside them in a rounded floating frame (stacked on
   phones), then the caption. The still is the film's close-up on setting 1, with all four numbers in view.

   Film layout (#foot.foot--film, added by js/sections/foot.js): .foot__pin is one screen, pinned for 2.6 screens (2.2 on
   phones). The film fills a frame inset 12px with a 24px radius, from under the nav to 12px off the bottom, as the hall's
   frame does, so the two scenes read as one. foot.js sets data-foot-layout:
   - side (frames at least 1.4:1, not phones): the words sit over the film's left third, which the render keeps clear
     (nothing in any frame comes nearer the left edge than 0.338 of the frame width), bottom left, as the hall's heading.
     Ink type on the film's light floor and wall (7:1 to 12:1 behind the words, 4.1:1 at worst at the wall's foot).
   - beside (frames under 440px tall and at least 1.5:1: phones held sideways, short laptop windows): the words in
     their own column on the dark band, the film to their right (until 30 Oct 2026 these windows got the still).
   - stack (phones and frames narrower than 1.4:1): the words on the dark band at the top, the film under them.
   The film is drawn on .foot__canvas (cover, aligned so the crop never cuts the desk or the words' clear area); the
   poster is its first paint. Over it, an SVG tracking box follows the turning foot, as the hero's box follows the stack,
   and .foot__read shows its setting and the skid's height, turning with the foot like a counter. */

#foot {
  --foot-inset: 12px;
  --foot-r: 0px;   /* square since 31 Oct 2026 (the website look) */
  --foot-film-bg: #c6bbae;                       /* the film's own tones, so a late poster never flashes dark */
}


/* ------------------------------------------------------------------ static layout */
#foot .foot__frame {
  width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start;
}
#foot .foot__copy { grid-column: 1 / span 5; display: grid; justify-items: start; gap: 28px; }
#foot .foot__title { max-width: 9em; }
#foot .foot__beats { display: grid; gap: 40px; width: 100%; }
#foot .foot__intro { color: var(--fg); }

/* the four settings: the brochure's yellow numbers, light, on hairlines */
#foot .foot__settings { display: grid; width: 100%; border-top: 1px solid var(--line); }
#foot .foot__setting {
  display: flex; align-items: baseline; gap: 16px; padding: 12px 0 13px;
  border-bottom: 1px solid var(--line);
}
#foot .foot__set-num {
  flex: none; min-width: .75em;
  font-family: var(--font-sans); font-weight: 300; font-size: 34px; line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; color: var(--yellow);
}
#foot .foot__set-text { font-size: var(--fs-body); color: var(--fg); }

#foot .foot__steps { display: grid; gap: 26px; }
#foot .foot__step { display: grid; gap: 8px; }
#foot .foot__step-title { font-size: clamp(24px, 2.2vw, 32px); }
#foot .foot__step-line { color: var(--muted); max-width: 40ch; }

#foot .foot__media { grid-column: 6 / span 7; margin: 0; position: sticky; top: calc(var(--nav-clear) + 24px); }
#foot .foot__screen {
  position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 16 / 9;
  border-radius: var(--r-media); background: var(--media-bg); box-shadow: var(--shadow-float);
}
#foot .foot__zoom { position: absolute; inset: 0; }
#foot .foot__still {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
#foot .foot__poster, #foot .foot__canvas, #foot .foot__svg, #foot .foot__read { display: none; }
#foot .foot__caption { margin-top: 14px; }

@media (max-width: 767.98px) {
  #foot .foot__frame { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
  #foot .foot__copy, #foot .foot__media { grid-column: 1 / -1; }
  #foot .foot__media { position: static; }
  #foot .foot__set-num { font-size: 30px; }
  /* phones: the still comes straight after the text it shows, before the settings and the steps */
  #foot:not(.foot--film) .foot__frame { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
  #foot:not(.foot--film) .foot__copy, #foot:not(.foot--film) .foot__beats { display: contents; }
  #foot:not(.foot--film) .foot__eyebrow { order: 1; margin-bottom: -8px; }
  #foot:not(.foot--film) .foot__title { order: 2; }
  #foot:not(.foot--film) .foot__intro { order: 3; }
  #foot:not(.foot--film) .foot__media { order: 4; margin-block: 8px; }
  #foot:not(.foot--film) .foot__settings { order: 5; }
  #foot:not(.foot--film) .foot__steps { order: 6; margin-top: 12px; }
}


/* ------------------------------------------------------------------ film layout: shared */
#foot.foot--film {
  /* the air above the frame (the hall's own air below its frame comes first) and below it (the rooms follow) */
  padding-block: clamp(24px, 4vh, 48px) clamp(40px, 7vh, 88px);
}
#foot.foot--film .foot__pin {
  height: 100vh; height: 100svh;
  padding: var(--nav-clear) var(--foot-inset) var(--foot-inset);
}
#foot.foot--film .foot__frame {
  position: relative; height: 100%; max-width: none; margin: 0; padding: 0;
  display: block; container-type: size;
  /* the words' left edge: the page's gutter line, as the hall's heading (never closer than 4% of the frame) */
  --foot-pad-x: max(calc(var(--gutter) - var(--foot-inset)), 4cqw);
  --foot-pad-y: clamp(24px, 5.4vh, 56px);
}
#foot.foot--film .foot__media { position: absolute; inset: 0; margin: 0; }
#foot.foot--film .foot__screen {
  position: absolute; inset: 0; aspect-ratio: auto;
  border-radius: var(--foot-r); background: var(--foot-film-bg); box-shadow: none;
  clip-path: inset(0 round var(--foot-r));          /* keeps the corners round over the scaled film in Safari */
}
#foot.foot--film .foot__zoom { transform-origin: 50% 62%; }
#foot.foot--film .foot__zoom.is-live { will-change: transform; }
#foot.foot--film .foot__still { display: none; }
#foot.foot--film .foot__poster,
#foot.foot--film .foot__canvas {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: var(--foot-pos, 0% 90%);   /* foot.js keeps this the canvas's own alignment */
}

/* the tracking box: 1px ink brackets and yellow corner squares, as the hero's */
#foot.foot--film .foot__svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#foot.foot--film .foot__brackets { fill: none; stroke: var(--ink); stroke-width: 1; stroke-linecap: square; }
#foot.foot--film .foot__squares rect { fill: var(--yellow); stroke: var(--ink); stroke-width: 1; }

/* the readout over the box's top-left corner: the setting (light figures) and the skid's height (mono), each on a
   drum that turns with the foot (foot.js moves each drum by its data-row: 1em rows for the setting, 1.2em for the
   height) */
#foot.foot--film .foot__read {
  display: flex; align-items: flex-end; gap: 12px;
  position: absolute; left: 0; top: 0; margin: 0; white-space: nowrap; color: var(--ink);
  opacity: 0; visibility: hidden; will-change: transform;
}
#foot .foot__drum-mask { display: inline-block; vertical-align: top; height: 1.2em; overflow: clip; }
#foot .foot__drum { display: block; }
#foot .foot__drum > span { display: block; height: 1.2em; line-height: 1.2em; }
/* the setting: one 1em row per figure (the figures have no descenders, so nothing is clipped at rest) */
#foot.foot--film .foot__read-num {
  font-family: var(--font-sans); font-weight: 300; font-size: 46px; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; line-height: 1em; height: 1em;
}
#foot.foot--film .foot__read-num .foot__drum > span { height: 1em; line-height: 1em; }
/* the words and the height drum are flex items of one height, so the drum's figures sit on the words' baseline */
#foot.foot--film .foot__read-text {
  display: flex; align-items: flex-start; column-gap: .6em;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; line-height: 1.2em;
  font-variant-numeric: tabular-nums;
  margin-bottom: .32em;                                   /* its baseline on the setting's */
}
#foot.foot--film .foot__read-text > span { display: block; height: 1.2em; }

/* the four settings stay in the page for screen readers; the readout shows them on the film */
#foot.foot--film .foot__settings {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* the words: the heading stays; the text and the three steps take turns in one place under it (foot.js) */
#foot.foot--film .foot__copy { display: block; z-index: 3; }
#foot.foot--film .foot__eyebrow { margin-bottom: 18px; }
#foot.foot--film .foot__title { max-width: none; }
#foot.foot--film .foot__beats { display: grid; gap: 0; margin-top: clamp(18px, 2.8vh, 30px); }
#foot.foot--film .foot__intro, #foot.foot--film .foot__steps { grid-area: 1 / 1; }
#foot.foot--film .foot__steps { display: grid; gap: 0; }
#foot.foot--film .foot__step { grid-area: 1 / 1; align-content: start; gap: 10px; }
#foot.foot--film .foot__step-title { font-size: var(--fs-m); }
#foot.foot--film .foot__step-line { max-width: none; }
#foot.foot--film .foot__intro, #foot.foot--film .foot__step-line { max-width: 34ch; }
/* masked lines (SplitText, from foot.js): each line moves inside its own padded mask (.ss-line-mask, base.css) */
#foot .foot__line { display: block; position: relative; }
/* until foot.js has split them into masked lines, the words wait */
#foot.foot--film .foot__copy:not([data-split]) :is(.foot__title, .foot__beat) { visibility: hidden; }
#foot.foot--film .foot__copy:not([data-split]) .foot__eyebrow { opacity: 0; }

/* ink at .80, not the page's .66: over the graded film's warm floor (assets/foot-b, 30 Oct 2026) .66 averaged 4.5:1
   with its darkest tenth near 4.0:1; .80 keeps it at 5:1 or better on the darkest floor tone (the recheck, 30 Oct) */
#foot.foot--film .foot__caption {
  position: absolute; z-index: 3; right: var(--foot-pad-x); bottom: var(--foot-pad-y); margin: 0;
  color: rgba(11, 11, 13, .8);
}


/* ------------------------------------------------------------------ film layout: side (words over the film's left third) */
/* On short, wide windows (laptops at 1366x657 or 1536x730) the frame stops at 2.08:1 and is centred: wider than that,
   the film's crop would cut the desk's top or its front feet in the wide shots (the desk and its shadow span 0.155 to
   0.966 of the frame's height; foot.js aligns the crop at 0.9, so the top gives way first and both ends keep a margin). */
#foot.foot--film[data-foot-layout="side"] .foot__frame {
  max-width: calc((100vh - var(--nav-clear) - var(--foot-inset)) * 2.08);
  max-width: calc((100svh - var(--nav-clear) - var(--foot-inset)) * 2.08);
  margin-inline: auto;
}
#foot.foot--film[data-foot-layout="side"] .foot__copy {
  position: absolute; left: var(--foot-pad-x); bottom: var(--foot-pad-y);
  /* the clear third: 0.30 of the drawn frame's width (cover: the frame is 100cqw wide, or 177.8cqh when the screen
     is narrower than 16:9 and the film is cropped on the right) */
  width: min(calc(max(30cqw, 53.33cqh) - var(--foot-pad-x)), 520px);
  /* ink on the film; the step lines at 74% (4.5:1 or better on the floor behind them) */
  color: var(--ink); --fg: var(--ink); --muted: rgba(11, 11, 13, .74);
}
/* sized so "any floor." keeps to one line of the column */
#foot.foot--film[data-foot-layout="side"] .foot__title {
  font-size: min(var(--fs-l), calc(min(calc(max(30cqw, 53.33cqh) - var(--foot-pad-x)), 520px) * .205));
}
#foot.foot--film[data-foot-layout="side"] .foot__step-title {
  font-size: min(var(--fs-m), calc(min(calc(max(30cqw, 53.33cqh) - var(--foot-pad-x)), 520px) * .108));
}


/* ------------------------------------------------------------------ film layout: stack (words on the band, film below) */
#foot.foot--film[data-foot-layout="stack"] .foot__frame { display: flex; flex-direction: column; align-items: stretch; }
#foot.foot--film[data-foot-layout="stack"] .foot__copy {
  position: relative; flex: none; width: 100%; max-width: 680px;
  padding: 14px calc(var(--gutter) - var(--foot-inset)) 20px;
}
#foot.foot--film[data-foot-layout="stack"] .foot__title { font-size: min(var(--fs-l), 8.6vw); }
#foot.foot--film[data-foot-layout="stack"] .foot__media { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; }
/* the shorter beats sit on the film, so each step reads with the picture it explains (the slot keeps the text's height,
   so the film never moves) */
#foot.foot--film[data-foot-layout="stack"] :is(.foot__intro, .foot__steps, .foot__step) { align-self: end; }
#foot.foot--film[data-foot-layout="stack"] .foot__caption { right: 16px; bottom: 14px; }

/* ------------------------------------------------------------------ film layout: beside (words in a column, film beside) */
/* A phone held sideways (844x390: a 820x294 frame) or a short laptop window: the text and the steps in a column about
   two fifths of the frame wide on the dark band, the film in the other three fifths, rounded as everywhere else. The
   type steps down so the brochure's text keeps to the frame's height. */
#foot.foot--film[data-foot-layout="beside"] .foot__frame {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: 14px; align-items: center;
}
#foot.foot--film[data-foot-layout="beside"] .foot__copy {
  grid-column: 1; grid-row: 1;
  position: relative; padding-left: max(0px, calc(var(--gutter) - var(--foot-inset)));
}
#foot.foot--film[data-foot-layout="beside"] .foot__media {
  grid-column: 2; grid-row: 1; align-self: stretch;
  position: relative; inset: auto; height: 100%; min-height: 0;
}
#foot.foot--film[data-foot-layout="beside"] .foot__eyebrow { margin-bottom: 12px; }
#foot.foot--film[data-foot-layout="beside"] .foot__title { font-size: clamp(24px, 8vh, 32px); }
#foot.foot--film[data-foot-layout="beside"] .foot__beats { margin-top: 12px; }
#foot.foot--film[data-foot-layout="beside"] .foot__step { gap: 6px; }
#foot.foot--film[data-foot-layout="beside"] .foot__step-title { font-size: 20px; }
#foot.foot--film[data-foot-layout="beside"] :is(.foot__intro, .foot__step-line) { font-size: 14px; line-height: 1.45; max-width: none; }
#foot.foot--film[data-foot-layout="beside"] .foot__caption { right: 12px; bottom: 10px; font-size: 12px; }
#foot.foot--film[data-foot-layout="beside"] .foot__read { gap: 9px; }
#foot.foot--film[data-foot-layout="beside"] .foot__read-num { font-size: 34px; }
#foot.foot--film[data-foot-layout="beside"] .foot__read-text { font-size: 11px; }

@media (max-width: 767.98px) {
  #foot.foot--film .foot__pin { padding-inline: var(--foot-inset); }
  #foot.foot--film[data-foot-layout="stack"] .foot__copy { padding: 12px calc(var(--gutter) - var(--foot-inset)) 16px; }
  #foot.foot--film .foot__eyebrow { margin-bottom: 14px; }
  #foot.foot--film[data-foot-layout="stack"] .foot__title { font-size: clamp(30px, 8.6vw, 40px); }
  #foot.foot--film .foot__beats { margin-top: 14px; }
  #foot.foot--film .foot__step { gap: 6px; }
  #foot.foot--film .foot__step-title { font-size: 24px; }
  #foot.foot--film .foot__intro, #foot.foot--film .foot__step-line { font-size: 16px; line-height: 1.5; max-width: none; }
  #foot.foot--film .foot__read { gap: 9px; }
  #foot.foot--film .foot__read-num { font-size: 34px; }
  #foot.foot--film .foot__read-text { font-size: 11px; }
  #foot.foot--film .foot__caption { font-size: 12px; }
}

/* a figure and its unit stay on one line (SplitText reads the no-break space as a space) */
#foot .foot__nb { white-space: nowrap; }

/* patent-pending badge beside the eyebrow (9 Nov 2026; SA provisional application 2026/10750, the levelling foot) */
#foot .foot__patent { display: inline-block; margin-left: 12px; padding: 3px 9px 2px; border: 1px solid currentColor; border-radius: 999px;
  font-size: .82em; letter-spacing: .14em; text-transform: uppercase; line-height: 1.4; vertical-align: middle; opacity: .9; }
