/* Prototype hero layouts (A, B, C): the keypad simulator is the centre of the first row, the
   computer's corner crop sits on the left, the two phones on the right, and the key-style picker
   with Pause animations sits right under the simulator. Loaded after the site stylesheets, so it
   only overrides. Only the hero changes: every selector here is scoped to .hero or to html.os-win.

   Sizing chain: --nh-kp-w sets the keypad drawing's width. Its height is 1.175 x that width
   (the 1000 x 1175 pad). The computer uses the production home-page corner crops: .osc-mac and
   .osc-win are 680:530 boxes, so a width of 1.5075 K makes the crop exactly 1.175 K tall, the
   same height as the keypad. The phones are sized to that same height: the Android box is
   1534:3214 and the iPhone box 1319:2718, so their widths are 1.175 x those ratios times the
   keypad width, 0.5608 K and 0.5702 K. The devices are bottom-aligned on one baseline, so the
   pad, the corner crop and both phone frames sit level and the captions start on one line.

   Row balance: the keypad column sits on the page centre. The stage gives it its width K and two
   equal side columns of (C - 2G - K) / 2, where C is the content width and G is one column gap.
   The computer (1.5075 K wide) is flush to the right of the left column and the phone pair is
   flush to the left of the right column, so the visible gap on both sides of the pad is exactly
   G: the computer/keypad and keypad/phones gaps match at every desktop width. The row may sit
   slightly off-centre around the pad, which is fine.

   The 4.458 divisor keeps a little air; the height term scales the row down on short windows.
   At the tested sizes the width cap lands between 259 and 279 px, so the row height is stable. */
.hero .nh-row{--nh-kp-w:min(380px,26vw,calc(20vh + 99px),calc((min(1328px,100vw - 48px) - clamp(80px,6vw,112px)) / 4.458));--nh-dev-h:calc(var(--nh-kp-w) * 1.175);display:flex;flex-direction:column;align-items:stretch;gap:clamp(24px,2vw,30px);width:100%}
.hero .nh-stage{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;justify-items:center;column-gap:clamp(40px,3vw,56px);width:100%}
.hero .nh-computer{order:1;grid-column:1;justify-self:end;display:flex;flex-direction:column;align-items:center;width:calc(var(--nh-kp-w) * 1.5075);max-width:100%}
.hero .nh-keypad{order:2;grid-column:2;width:var(--nh-kp-w);max-width:100%}
.hero .nh-phones{order:3;grid-column:3;justify-self:start;display:flex;flex-direction:column;align-items:center;max-width:100%}
.hero .nh-phone-pair{display:flex;align-items:flex-end;justify-content:center;gap:clamp(8px,1.4vw,22px)}
.hero .nh-computer>.nh-dev,.hero .nh-keypad>.nh-dev,.hero .nh-phone-pair>.nh-dev{width:100%}
.hero .nh-phone-pair>.nh-dev.ph{width:calc(var(--nh-kp-w) * 0.5608)}
.hero .nh-phone-pair>.nh-dev.ip{width:calc(var(--nh-kp-w) * 0.5702)}

/* ---------- The computer: the production home-page corner crops. .osc-mac (top-right menu bar
   and popover) and .osc-win (bottom-right taskbar and flyout) keep every rule from site-v3.css:
   the 680:530 box, the bezel image, the masks and the --u sizing. Only the width is set here, on
   .nh-computer, so the two crops look exactly as they do on index.html, just sized to the hero
   row. No laptop wrapper, screen override or video object-fit rule remains. */

/* One computer: the Mac crop by default, the Windows crop only for html.os-win. The class comes
   from the tiny head script before first paint. display:none keeps the hidden crop's bezel image
   and videos from ever loading. */
.hero .nh-computer>.nh-dev.win{display:none}
.os-win .hero .nh-computer>.nh-dev.mac{display:none}
.os-win .hero .nh-computer>.nh-dev.win{display:flex}

/* Device captions: readable at a glance, not fine print. */
.hero .nh-label{margin-top:12px}
.hero .nh-label b{font-size:15px}
.hero .nh-label span{font-size:13px;line-height:1.4}

/* ---------- Directly under the row, one gap apart: the one-line note (B and C only), then the
   key-style picker and Pause animations on one line. The per-style caption that used to follow is
   gone (Diogo, 2026-11-19); the picker line is the last element of the row, so the row's own gap
   carries the spacing below it. The note is a subheading, set in the page's main ink (the same
   --fg token as the h1), not in muted grey. */
.hero .nh-ctrlline{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 18px;margin-inline:auto;max-width:100%;padding-inline:8px}
.hero .nh-ctrlline .kpsim-hero-styles{position:static;left:auto;bottom:auto;transform:none;z-index:auto;max-width:100%}
.hero .nh-ctrlline .nh-motion{margin-top:0;font-size:14px}
.hero .nh-note{margin:0 auto;max-width:36em;text-align:center;font-size:clamp(20px,1.6vw,26px);line-height:1.3;font-weight:600;color:var(--fg)}

/* ---------- Start over: it takes no layout space at all. It sits absolutely in the pad's
   bottom-right slot — the empty area right of the two nav keys — inset from the › key and from the
   pad edge by the same 34.78 units the drawn keys leave between each other (3.478 cqw). The pad
   holds 1000 units across, the › key ends at x 618.28 and the pad's inner face at 987, so the
   button runs from 61.828 + 3.478 = 65.306 cqw to 100 - ((100 - 98.7) + 3.478) = 95.222 cqw,
   keeping its vertical centre at 98.15 cqw between the nav keys' 90.8 and 105.5. The cqw units
   follow the keypad box, so the inset holds at every width; the 11 to 14 px font and 6 x 8 padding
   keep "Start over" on one line inside that slot at the smallest desktop keypad.
   Readability (Diogo, 2026-11-19): the text and its outline are the ring's gold, --kpsim-ring
   (#f0c46a), on a dark well wash over the pad: 11.48:1 on --ot-well (#14110e), over 4.5:1 even if
   the pad under it were as light as #4a4a4e. The hidden attribute still arrives from keypad-sim.js;
   the .hero override keeps the button rendered, out of flow, so showing or hiding it moves nothing. */
.hero .nh-dev.kp{position:relative;container-type:inline-size}
.hero .kp .kpsim-controls{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0;margin-top:0;min-height:0}
.hero .kp .kpsim-caption{flex:0 0 auto;min-height:0;max-width:100%;font-size:15px;line-height:1.45;text-align:center}
.hero .kp .kpsim-reset{position:absolute;left:65.306cqw;right:4.778cqw;top:98.15cqw;transform:translateY(-50%);z-index:3;display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:32px;height:auto;margin:0;padding:6px 8px;border-radius:var(--ot-r-sm);background:color-mix(in srgb,var(--ot-well) 90%,transparent);color:var(--kpsim-ring);box-shadow:inset 0 0 0 1px var(--kpsim-ring);font-size:clamp(11px,4.1cqw,14px);line-height:1;opacity:1;visibility:visible;pointer-events:auto;transition:opacity .2s linear,visibility 0s linear}
.hero .kp .kpsim-reset:hover{background:color-mix(in srgb,var(--ot-well) 80%,transparent)}
.hero .kp .kpsim-reset[hidden]{display:inline-flex !important;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s linear,visibility .2s linear}

/* ---------- "Try it here": a hand-drawn gold pointer to A's live key (Diogo, 2026-11-19: curved,
   swoopier, in the ring's yellow, ending on the grey pad beside the key). The label sits fully on
   the page background above the keypad's top edge, 6 px clear of it, at a readable 14 px; its top
   edge is therefore 6 + 14 = 20 px above the keypad's top edge, so the device row must start at
   least 20 + 8 = 28 px below the CTA row for the label to clear the buttons by 8 px. The CTA row
   keeps the site's 32 px bottom margin at every width (a desktop override used to cut it to 12,
   which left the label overlapping the buttons by 8 px); that leaves 12 px of clearance. The arrow
   is an overlay on the whole keypad column; hero-try.js targets A's breathing ring (from the key's
   name on the ring, so the graph decides where A is), leaves the label sideways and sweeps down
   through the pad's top bezel into the grey gap beside the key, ending outside its gold ring.
   Neither text nor stroke crosses a tile. Both are absolutely positioned inside .nh-dev.kp, and are
   hidden with visibility/opacity rather than display:none, so no box changes when they disappear.
   No drawing animation is added (nothing to disable under Reduce Motion), and the callout is
   aria-hidden because the keypad's own hint line instructs screen readers. */
.hero .kpsim-try{position:absolute;z-index:5;pointer-events:none;color:var(--ot-gold-text);font:600 14px/1 var(--ot-font-sans);letter-spacing:-.005em;white-space:nowrap}
/* Hidden means invisible, never display:none: both parts stay out of flow and keep their boxes, so
   the first key press (and Start over, which calls refresh again) cannot move the row. The head is
   the ring's own token; the label needs 4.5:1 on the cream page (--ot-bg), where --kpsim-ring
   measures 1.46:1 and the nearest darker gold, --ot-gold-text, is 4.56:1. */
.hero .kpsim-try[hidden]{display:block;opacity:0;visibility:hidden}
.hero .kpsim-try-arrow{position:absolute;inset:0;z-index:5;pointer-events:none;color:var(--kpsim-ring);overflow:visible}
.hero .kpsim-try-arrow[hidden]{display:block;opacity:0;visibility:hidden}
.hero .kpsim-try-arrow svg{display:block;width:100%;height:100%;overflow:visible}
.hero .kpsim-try-stroke{fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
/* The line blends from the label's gold over the cream to the ring token on the pad; the band is
   placed on the pad's rim by hero-try.js. The head stays in the ring token (currentColor). */
.hero .kpsim-try-stroke[data-kpsim-try-line]{stroke:url(#kpsim-try-grad)}
.hero .kpsim-try-stop-cream{stop-color:var(--ot-gold-text)}
.hero .kpsim-try-stop-pad{stop-color:var(--kpsim-ring)}
/* Room above the device row for the label: the row must start 28 px below the CTA row (20 px of
   label height and keypad clearance + 8 px of clearance from the buttons). 32 px is the site's own
   CTA margin, kept here explicitly at every width, so no width-dependent rule cuts it. */
body.site-v3.page-home .hero .nh .ctas{margin-bottom:32px}

/* ---------- Desktop row layout (>= 1100 px). The three columns start at the same y. The corner
   crop is width-driven and exactly --nh-dev-h tall; both phones put their drawing in a fixed box
   of --nh-dev-h and bottom-align it. The pad, the crop and the phone frames therefore end on one
   baseline, and every caption starts at --nh-dev-h + 12 px, so all four share one line.
   The note and the picker line keep a 10 to 16 px gap, which holds the picker bottom above the
   fold at 1440x900 and 1280x800 with the note line present. */
@media (min-width:1100px){
  .hero .nh-row{gap:clamp(10px,1vw,16px)}
  .hero .nh-stage{align-items:start}
  /* The computer needs no fixed height: its width is 1.5075 K, so the 680:530 crop is exactly
     --nh-dev-h tall and the bezel bottom sits on the pad's baseline. Both side columns keep the
     same column-gap to the pad, so the computer/keypad and keypad/phones gaps match; the phone
     pair keeps its own fixed 24 px between the two frames. */
  .hero .nh-phone-pair{gap:24px;align-items:flex-start}
  .hero .nh-phone-pair>.nh-dev{display:grid;grid-template-rows:var(--nh-dev-h) auto;justify-items:center;align-items:end}
  .hero .nh-phone-pair>.nh-dev>.dev{align-self:end}

  /* The two callouts that used to hang left of the keypad now land on the computer screen. Hide
     the arrows and those page-margin labels; the keypad's own hint line takes over. keypad-sim.js
     marks the hint line quiet (screen-reader only) whenever it draws arrows, so the .hero rule
     undoes that here. No callout is drawn in the pad itself: Start over fills the slot the Send
     hint would use, so the hero keypad opts out (data-kpsim-inpad-hint="off") and the caption
     under the pad carries "Now hold Send (key 9) to answer." */
  .hero .kpsim-marks .kpsim-arrows,
  .hero .kpsim-marks .kpsim-label:not([data-kpsim-place="below"]){display:none}
  .hero .kp .kpsim-caption{width:100%;max-width:100%;min-height:1.35em;margin:2px 0 0;white-space:normal;font-size:13px;line-height:1.35;color:var(--dim)}
  .hero .kp .kpsim-caption.kpsim-caption-quiet{position:static;width:100%;height:auto;margin:2px 0 0;overflow:visible;clip:auto;white-space:normal}

  /* Picker and Pause on one line, both 44 px tall, so their tops match; the control line centres
     the pair as a group. The site stylesheet's 24 px top margin on the Pause is cancelled here. */
  .hero .nh-ctrlline{flex-wrap:nowrap;min-height:44px}
  body.site-v3.page-home .hero .nh-ctrlline .nh-motion{margin:0;min-height:44px;align-items:center;font-size:14px}

  /* The taller row needs a little of the air above it. The CTA row keeps its 32 px margin (set
     above, which the "Try it here" label needs); with these margins and the measured --nh-kp-w the
     picker line ends at 775 px at 1440x900 (budget 885) and 739 px at 1280x800 (budget 785); with
     the B and C note line the ends are 819 px and 779 px, still inside both budgets. The hint under
     the keypad wraps inside the keypad column, so it never reaches the phone captions, which now
     share its vertical band. */
  body.site-v3.page-home .hero .nh .nh-h1{margin-bottom:6px}
}

/* ---------- Narrow screens: keypad, the one-line note (B and C), the picker line with its
   caption, then the two phones side by side, then the computer at the full content width. The
   stage dissolves so its children can sit on either side of the picker. No horizontal overflow
   at 768, 390 and 375 px; the corner crop keeps its proportions from its width. */
@media (max-width:1099px){
  .hero .nh-row{align-items:center}
  .hero .nh-stage{display:contents}
  .hero .nh-keypad{order:1;width:min(100%,420px)}
  .hero .nh-note{order:2}
  .hero .nh-ctrlline{order:3;gap:8px 12px}
  .hero .nh-phones{order:4}
  .hero .nh-computer{order:6;width:100%;max-width:min(100%,420px)}
  .hero .nh-phone-pair>.nh-dev.ph{width:clamp(112px,39vw,170px)}
  .hero .nh-phone-pair>.nh-dev.ip{width:clamp(114px,39.6vw,174px)}
  .hero .kp .kpsim-caption{margin-top:6px}
}

@media (max-width:419px){.hero .nh-ctrlline{padding-inline:0}}

/* Device-sim wiring: each .devsim fills its existing screen box. The clip or shot under it
   stays visible until a device video plays, so a missing manifest falls back to the still. */
.hero .devsim{position:absolute;inset:0;z-index:2;overflow:hidden;pointer-events:none}

/* First paint: the markup's .devsim-prepaint layer is the device-sim base poster for the default style, so
   each hero screen shows the keypad's own session set before any script runs. The older per-style clips
   (the .loop60 videos) are hidden while the device-sim layer is expected; they only come back when
   device-sim.js reports a manifest it could not read, which puts data-devsim-fallback on <html>.
   The computers' poster is a CSS background image, not an <img src>: only one of the two computers is
   ever shown, and Chrome does not fetch a background image of a display:none element, while it does fetch
   a hidden <img src> (even loading="lazy"). The phones are both always visible and keep the <img>.
   The poster URL must live in this stylesheet, never in an inline style in the markup: Chrome's HTML
   parser preloads an inline style's image URL even when the element is display:none (measured), while a
   stylesheet background (or a script-set one) on a display:none element is never fetched. device-sim.js
   rewrites the background inline for a style change before the manifest arrives. */
.hero .osc-pop>video[data-kpsim-style-media],
.hero .osc-fly>video[data-kpsim-style-media],
.hero .dev-scr>video[data-kpsim-style-media]{display:none}
.hero .devsim-prepaint{position:absolute;inset:0;z-index:1;display:block;width:100%;height:100%;object-fit:fill;background-position:0 0;background-repeat:no-repeat;background-size:100% 100%;pointer-events:none}
.hero .osc-pop.devsim-prepaint{background-image:url("/assets/video/device-sim/mac/frosted/base-base.jpg?v=e1cf2924df")}
.hero .osc-fly.devsim-prepaint{background-image:url("/assets/video/device-sim/windows/frosted/base-base.jpg?v=411642ac2d")}
html[data-devsim-fallback] .hero .devsim-prepaint{display:none}
html[data-devsim-fallback] .hero .osc-pop>video[data-kpsim-style-media]:not([hidden]),
html[data-devsim-fallback] .hero .osc-fly>video[data-kpsim-style-media]:not([hidden]),
html[data-devsim-fallback] .hero .dev-scr>video[data-kpsim-style-media]:not([hidden]){display:block}
