/* MakerMods landing page — page-level glue. Loads after tokens.css and bundle.css.
   Components live in design-system/components/bundle.css (hr-); this file only holds
   what belongs to this page (mm-) and the start states for the GSAP motion (js-). */

html { scroll-behavior: smooth; scroll-padding-top: var(--space-9); }
body { overflow-x: clip; }
a.hr-ticker { text-decoration: none; }
figure { margin: 0; }

/* ---------- Section rhythm ---------- */
.mm-section { margin-top: var(--space-10); }
.mm-demo-gap { margin-top: var(--space-9); }

/* ---------- Sticky nav ---------- */
/* Community is also in the footer; it gives way so the pill fits between 720 and 820px. */

/* ---------- Hero ----------
   Generic hero (product pages such as maker-arm-station.html): centred copy, the frame inside
   the page column, as VideoHero describes. */
.mm-hero-cta { margin-top: var(--space-6); }
.mm-hero .hr-media { margin-top: var(--space-7); }
.mm-hero .hr-media-caption { text-align: left; }

/* Home hero (.mm-hero-ask): a two-line sentence (two Rollers inside it), the quoted ask and
   the CTA on one row, then the frame. With JS the frame is laid out edge to edge and clipped
   back to the column, so it can open to a full-bleed hero as the page scrolls. */
.mm-hero-ask { padding-top: var(--space-6); text-align: left; }
.mm-hero-title { font-size: clamp(48px, 6.4vw, 96px); line-height: 1.04; }
.mm-line { display: block; overflow: clip; overflow-clip-margin: 0.04em; padding-bottom: 0.14em; margin-bottom: -0.14em; white-space: nowrap; }
.js-hero-line { display: inline-block; }
.mm-line-sub { font-size: 0.6em; letter-spacing: -0.02em; }
/* Title on the left, the buttons level with it on the right, their row lined up with the title's last line. */
.mm-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); }
.mm-hero-head { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-6); }
.mm-hero-ask .mm-hero-cta { flex: none; margin-top: 0; text-align: right; }
.mm-hero-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.mm-hero-actions .hr-btn-link { padding-right: 0; }
.mm-hero-ask .mm-figure { margin-top: var(--space-5); }
.mm-hero-ask .hr-media { margin: 0 var(--gutter); }
/* Past the container the frame keeps to the column: hr-page is container + 2 gutters wide. */
@media (min-width: 1488px) { .mm-hero-ask .hr-media { margin: 0 calc(50% - var(--container) / 2); } }
.mm-hero-ask .mm-hero-frame.is-bleed { margin: 0; border-radius: 0; }
.mm-hero-frame.is-bleed .hr-chip-bl { left: calc(var(--mm-bleed, 0px) + var(--space-4)); }

/* ---------- Dark band ---------- */
/* The steps scene brings its own vertical room. */
.hr-band:has(.mm-steps-track) { padding: 0; }

/* ---------- Ask: three steps ----------
   With JS and motion allowed, the scene sticks for a tall track and site.js scrubs from step
   to step with the scroll (or the slider). Otherwise the three steps simply stack. */
.mm-steps-scene { padding: var(--space-9) 0 var(--space-8); }
.mm-steps-head { margin-bottom: var(--space-7); }
.mm-steps { display: grid; gap: var(--space-9); }
.mm-step { min-width: 0; }
.mm-step-frame { aspect-ratio: 16 / 9; }
/* In this scene the prompt sits under the clip, centred, not over it. */
.mm-steps-scene .hr-prompt { position: static; transform: none; width: min(720px, 100%); margin: var(--space-5) auto 0; }
.mm-steps-scene .hr-prompt-reply { background: var(--ground-raised); color: var(--ink); border: 1px solid var(--line); backdrop-filter: none; }
.mm-steps-scene .hr-tabs-slider { display: flex; margin: var(--space-6) auto 0; }
.mm-head-wide { max-width: 960px; }
/* A wide headline that wraps splits evenly, so no word is left alone on the last line. */
.mm-head-wide .hr-display-lg { text-wrap: balance; }
.mm-head-wide .hr-body-lg { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.mm-cols-wide { grid-template-columns: 1fr minmax(0, 880px); }
html:not(.js):not(.js-lite) .mm-js-only { display: none; }
.js-steps:not(.is-held) .hr-tabs { display: none; }
.mm-lineup-more { margin-top: var(--space-6); text-align: center; }
/* The Metal Arm still is 16:9 with the arm right of centre; keep the whole arm in the 4:3 crop. */
.mm-lineup-media-arm img { object-position: 80% 50%; }
/* Voice step: the words arrive one at a time while the waveform moves (site.js). */
.js-speak.is-armed .mm-word { opacity: 0; transition: opacity var(--duration-fast) var(--ease-out); }
.js-speak.is-armed .mm-word.is-said { opacity: 1; }
.js-speak-reply.is-armed { opacity: 0; transform: translateY(8px); transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out); }
.js-speak-reply.is-armed.is-said { opacity: 1; transform: none; }
/* Hold only when the viewport can contain a step (site.js uses the same query). */
@media (prefers-reduced-motion: no-preference) and (min-height: 700px) and (min-width: 961px) {
  /* 400vh: one held screen plus 300vh of scroll, which site.js splits into beats — the first
     step holds 100vh, the others 70vh, with a 30vh blend between each. */
  .js .mm-steps-track { height: 400vh; }
  .js .mm-steps-scene { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; min-height: 100vh; min-height: 100svh; box-sizing: border-box; padding: calc(var(--nav-height) + var(--space-6)) 0 var(--space-6); }
  .js .mm-steps-head { margin-bottom: var(--space-5); }
  /* Steps layer in one cell; scroll selects a short, complete crossfade in site.js. */
  .js .mm-steps > .mm-step { grid-area: 1 / 1; pointer-events: none; }
  .js .mm-steps > .mm-step:not(.is-active) { opacity: 0; }
  .js .mm-steps > .mm-step.is-active { pointer-events: auto; }
  /* The frame is as tall as the screen allows, never taller than 16:9 of the column. */
  .js .mm-step-frame { aspect-ratio: auto; height: var(--mm-step-height, min(calc(100svh - 500px), calc((100vw - 2 * var(--gutter)) * 9 / 16))); }
  .js .mm-steps-scene .hr-prompt { margin-top: var(--space-4); }
}
@media (min-width: 1488px) and (prefers-reduced-motion: no-preference) and (min-height: 700px) {
  .js .mm-step-frame { height: var(--mm-step-height, min(calc(100svh - 500px), calc(var(--container) * 9 / 16))); }
}

/* ---------- Split sections (Specs, FAQ): title left, rows right ---------- */
.mm-cols { display: grid; grid-template-columns: 1fr minmax(0, var(--measure)); gap: var(--space-7); align-items: start; }
.mm-cols .hr-faq { width: 100%; }
.mm-cols > header { position: sticky; top: calc(var(--nav-height) + var(--space-7)); }
.mm-newsletter-line { margin-top: var(--space-3); max-width: var(--measure-narrow); }

/* ---------- Footer logo ---------- */
.hr-footer-mark { display: flex; gap: 0.2em; font-size: clamp(64px, 8.4vw, 120px); }
.mm-mark-clip { display: block; overflow: clip; }

/* Readable copy of text that site.js splits for animation. */
.mm-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Motion start states ----------
   Only applied once the inline head script has confirmed JS (html.js). site.js removes
   .js if GSAP is missing, and skips all of this under prefers-reduced-motion. */
.js .js-media { will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  /* Opacity, not visibility, below the fold: hidden-by-visibility content cannot take keyboard focus. */
  .js .js-rise { opacity: 0; }
  .js .js-hero-fade, .js .js-hero-title, .js .js-nav, .js .js-hero-figure { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .mm-section { margin-top: var(--space-9); }
  .mm-demo-gap { margin-top: var(--space-8); }
  .mm-cols { grid-template-columns: 1fr; gap: var(--space-6); }
  .mm-cols > header { position: static; }
  .mm-hero-top { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .mm-hero-head { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .mm-hero-ask .mm-hero-cta { text-align: left; }
  .mm-hero-actions { justify-content: flex-start; }
  .mm-cols-wide { grid-template-columns: 1fr; }
  .mm-steps { gap: var(--space-8); }
  .mm-step-frame { display: block; }
  .mm-step-frame.hr-catalog-soon { display: flex; }
}
@media (max-width: 720px) {
  .mm-section { margin-top: var(--space-8); }
  .mm-demo-gap { margin-top: var(--space-7); }
  .hr-footer-mark { font-size: clamp(44px, 13vw, 64px); }
  /* On phones the second line is small enough to keep the job beside "help me". */
  .mm-hero-title { font-size: clamp(34px, 10.4vw, 56px); }
  .mm-hero-ask .hr-media { margin: 0 var(--space-4); }
  .mm-ticker-more { display: none; }
}

/* Product heroes can use the homepage's column-to-edge media reveal. */
.mm-hero-expand { padding-top: var(--space-6); }
.mm-hero-expand .mm-figure { margin-top: var(--space-6); }
.mm-hero-expand .hr-media { margin: 0 var(--gutter); }
.mm-hero-expand .mm-hero-frame.is-bleed { margin: 0; border-radius: 0; }
@media (min-width: 1488px) { .mm-hero-expand .hr-media { margin: 0 calc(50% - var(--container) / 2); } }
@media (max-width: 720px) { .mm-hero-expand .hr-media { margin: 0 var(--space-4); } }
