/* The home page (body.h): a quiet, Apple-style page in Harmonic's purple.
 *
 * One hero, a slideshow ("Explore Harmonic"), where it began, Isaac's week as
 * a scroll story, the selling points, pricing and the way in. Light and dark
 * follow the device, or the footer's Appearance switch. Every colour pair is
 * WCAG AA. home.js adds the header's Get the app, the slideshow and the
 * scroll story; without it the page reads top to bottom, all of it visible.
 */

.h {
  --h-bg: #ffffff; --h-alt: #f5f5f7; --h-card: #ffffff; --h-ink: #1d1d1f; --h-dim: #6e6e73; --h-faint: #86868b;
  --h-accent: #6d3fd4; --h-pill: #6d3fd4; --h-line: #e5e5ea; --h-ring: #1d1d1f; --h-ctrl: #e8e8ed; --h-dot: #c7c7cc;
  --h-bar: rgba(255, 255, 255, 0.82); --h-staff: #6d3fd4; --h-slide: #f5f5f7; --h-navlink: #424245; --h-navlink-on: #6d3fd4; --h-glow: rgba(109, 63, 212, .16); --h-float: rgba(232, 232, 237, .72);
  background: var(--h-bg); color: var(--h-ink);
  /* Nothing may make the page wider than the screen (no sideways scroll or zoom-out on phones). */
  overflow-x: clip;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .h {
    --h-bg: #000000; --h-alt: #161617; --h-card: #1d1d1f; --h-ink: #f5f5f7; --h-dim: #a1a1a6; --h-faint: #86868b;
    --h-accent: #b79bff; --h-pill: #7c4ddb; --h-line: #2a2a2e; --h-ring: #2c2c2e; --h-ctrl: #2c2c2e; --h-dot: #48484a;
    --h-bar: rgba(22, 22, 23, 0.82); --h-staff: #b79bff; --h-slide: #1d1d1f; --h-navlink: #c7c7cc; --h-navlink-on: #b79bff; --h-glow: rgba(183, 155, 255, .20); --h-float: rgba(44, 44, 46, .72);
  }
}
:root[data-theme="dark"] .h {
  --h-bg: #000000; --h-alt: #161617; --h-card: #1d1d1f; --h-ink: #f5f5f7; --h-dim: #a1a1a6; --h-faint: #86868b;
  --h-accent: #b79bff; --h-pill: #7c4ddb; --h-line: #2a2a2e; --h-ring: #2c2c2e; --h-ctrl: #2c2c2e; --h-dot: #48484a;
  --h-bar: rgba(22, 22, 23, 0.82); --h-staff: #b79bff; --h-slide: #1d1d1f; --h-navlink: #c7c7cc; --h-navlink-on: #b79bff; --h-glow: rgba(183, 155, 255, .20); --h-float: rgba(44, 44, 46, .72);
}

.h a:focus-visible, .h button:focus-visible { outline: 3px solid #9b7bf0; outline-offset: 3px; border-radius: 10px; }

/* Light and dark screenshots: the dark one shows only in dark mode. */
.h img.shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .h img.shot-light:has(+ .shot-dark) { display: none; }
  :root:not([data-theme="light"]) .h img.shot-dark { display: block; }
}
:root[data-theme="dark"] .h img.shot-light:has(+ .shot-dark) { display: none; }
:root[data-theme="dark"] .h img.shot-dark { display: block; }

/* The phone-only and computer-only pieces (styles.css) win over .h-btn here. */
@media (min-width: 1080px) { .h .narrow-only { display: none; } }
@media (max-width: 1079px) { .h .wide-only { display: none; } }

/* ---------------------------------------------------------------- type */
.h-eyebrow { margin: 0; font-size: 1.0625rem; font-weight: 600; color: var(--h-accent); }
.h-eyebrow--lg { font-size: 1.3125rem; }
.h-h2 { margin: .6rem 0 0; font-size: 3.5rem; line-height: 1.07; font-weight: 600; letter-spacing: -0.012em; color: var(--h-ink); }
.h-dim { color: var(--h-faint); }
.h-body { margin: 1.25rem 0 0; font-size: 1.3125rem; line-height: 1.55; color: var(--h-dim); }
.h-wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }
.h-center { text-align: center; }
.h-link { font-size: 1.0625rem; color: var(--h-accent); text-decoration: none; }
.h-link:hover { color: var(--h-accent); text-decoration: underline; }
.h-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.6rem; border-radius: 999px;
  background: var(--h-pill); color: #ffffff; font-size: 1.0625rem; font-weight: 600; text-decoration: none;
}
.h-btn:hover { color: #ffffff; filter: brightness(1.08); }
.h-btn--small { min-height: 32px; padding: 0 1rem; font-size: .875rem; }

/* ---------------------------------------------------------------- devices
 * An iPhone 17 Pro, drawn in CSS: a metal rim, a black bezel, the Dynamic
 * Island, the action and volume buttons on the left and the side button on
 * the right. --w is the phone's width; everything scales with it. The
 * simulator's screenshots leave the island out, so it is drawn on top.
 */
.h-phone {
  --w: 260px; position: relative; width: var(--w); box-sizing: border-box; padding: calc(var(--w) * .036);
  border-radius: calc(var(--w) * .168); background: #050505;
  box-shadow: inset 0 0 0 calc(var(--w) * .005) #a1a1a6, inset 0 0 0 calc(var(--w) * .014) #3a3a3c, inset 0 0 0 calc(var(--w) * .017) #1c1c1e, 0 30px 60px rgba(0, 0, 0, .22);
}
.h-phone::before, .h-phone::after, .h-land::before { content: ""; position: absolute; border-radius: 2px; }
.h-phone::before {
  left: calc(var(--w) * -.011); width: calc(var(--w) * .016); top: 19%; height: 22.5%;
  background: linear-gradient(#48484a 0 16.5%, transparent 16.5% 30%, #48484a 30% 61%, transparent 61% 69%, #48484a 69% 100%);
}
.h-phone::after { right: calc(var(--w) * -.011); width: calc(var(--w) * .016); top: 29%; height: 12%; background: #48484a; }
.h-phone__screen { position: relative; overflow: hidden; border-radius: calc(var(--w) * .132); background: #000; }
.h-phone__screen::after {
  content: ""; position: absolute; z-index: 3; left: 50%; top: calc(var(--w) * .03); width: calc(var(--w) * .285); height: calc(var(--w) * .084);
  transform: translateX(-50%); border-radius: 999px; background: #000;
}
.h-phone__screen img { display: block; width: 100%; height: auto; }
/* Turned sideways: the screenshot carries its own island; the volume buttons run along the top. */
.h-land {
  --h: 230px; position: relative; height: var(--h); box-sizing: border-box; padding: calc(var(--h) * .036);
  border-radius: calc(var(--h) * .168); background: #050505;
  box-shadow: inset 0 0 0 calc(var(--h) * .005) #a1a1a6, inset 0 0 0 calc(var(--h) * .014) #3a3a3c, inset 0 0 0 calc(var(--h) * .017) #1c1c1e, 0 30px 60px rgba(0, 0, 0, .22);
}
.h-land::before {
  top: calc(var(--h) * -.011); height: calc(var(--h) * .016); left: 19%; width: 22.5%;
  background: linear-gradient(90deg, #48484a 0 16.5%, transparent 16.5% 30%, #48484a 30% 61%, transparent 61% 69%, #48484a 69% 100%);
}
.h-land__screen { position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--h) * .132); background: #000; }
.h-land__screen img { display: block; height: 100%; width: auto; }
.h-laptop { width: 840px; }
.h-laptop__screen { padding: 12px 12px 14px; border-radius: 18px 18px 4px 4px; background: #1d1d1f; box-shadow: 0 0 0 1px var(--h-line); }
.h-laptop__screen img { display: block; width: 100%; height: auto; border-radius: 4px; }
.h-laptop__base { height: 14px; margin: 0 -48px; border-radius: 0 0 18px 18px; background: linear-gradient(180deg, #e3e3e8, #a9a9b2); }
.h-browser { width: 860px; overflow: hidden; border-radius: 12px; background: var(--h-card); box-shadow: 0 0 0 1px var(--h-line), 0 30px 60px rgba(0, 0, 0, .16); }
.h-browser__bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: var(--h-alt); border-bottom: 1px solid var(--h-line); }
.h-browser__bar span:not(.h-browser__url) { width: 10px; height: 10px; border-radius: 5px; background: #ff5f57; }
.h-browser__bar span:nth-child(2) { background: #febc2e; }
.h-browser__bar span:nth-child(3) { background: #28c840; }
.h-browser__url { margin: 0 auto; padding: 2px 50px; border-radius: 6px; background: var(--h-bg); font-size: 11px; color: var(--h-dim); }
/* The address is part of the drawing, not page text, so it is drawn here. */
.h-browser__url::before { content: "harmonic.net.au"; }
.h-browser img { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- staff */
.h-staff { display: block; width: 100%; color: var(--h-staff); }
.h-staff__lines path { fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .22; vector-effect: non-scaling-stroke; }
.h-note { fill: currentColor; opacity: .6; }
@media (prefers-reduced-motion: no-preference) {
  .h-drift { animation: h-drift 70s linear infinite; }
  @keyframes h-drift { to { transform: translateX(-1440px); } }
  .h-note { animation: h-glow 5.6s ease-in-out infinite; }
  .h-note--1 { animation-delay: 1.4s; } .h-note--2 { animation-delay: 2.8s; } .h-note--3 { animation-delay: 4.2s; }
  @keyframes h-glow { 0%, 100% { opacity: .3; } 20% { opacity: .95; } 45% { opacity: .45; } }
}

/* ---------------------------------------------------------------- header */
.h-nav { position: sticky; top: 0; z-index: 20; height: 52px; background: var(--h-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .3s; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .h-nav { background: var(--h-bg); } }
.h-nav.is-scrolled { border-bottom-color: var(--h-line); }
.h-nav__inner { position: relative; width: min(980px, 100% - 2rem); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; }
.h-nav__brand { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--h-ink); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.h-nav__brand:hover { color: var(--h-ink); }
.h-nav__brand svg { width: 17px; height: 17px; stroke: var(--h-accent); }
.h-nav__actions { display: flex; align-items: center; gap: 18px; }
/* As on apple.com: the link sits a little quieter and lights up on hover, no underline. */
.h-nav__link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; font-size: .875rem; color: var(--h-navlink); text-decoration: none; transition: color .2s; }
.h-nav__link:hover, .h-nav__link:focus-visible { color: var(--h-navlink-on); text-decoration: none; }
/* Get the app waits until the hero's own button has scrolled away. */
.js .h-nav__get { opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.js .h-nav.is-past-hero .h-nav__get { opacity: 1; visibility: visible; }
/* On a computer, Get the app opens this panel; on an iPhone it is a link. */
.h-get {
  position: absolute; right: max(1rem, calc((100% - 980px) / 2)); top: 60px; width: 320px; box-sizing: border-box; padding: 22px;
  border-radius: 22px; background: var(--h-card); box-shadow: 0 0 0 1px var(--h-line), 0 24px 60px rgba(0, 0, 0, .18); text-align: center;
}
.h-get[hidden] { display: none; }
.h-get__title { margin: 0; font-size: 1.0625rem; font-weight: 600; color: var(--h-ink); }
.h-get__qr { display: block; width: 168px; margin: 16px auto 0; padding: 10px; border-radius: 16px; background: #ffffff; box-shadow: 0 0 0 1px var(--h-line); line-height: 0; box-sizing: border-box; }
.h-get__qr svg { width: 100%; height: auto; }
.h-get__hint { margin: 12px 0 0; font-size: .9375rem; color: var(--h-dim); }
.h-get__links { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--h-line); display: flex; flex-direction: column; gap: 10px; font-size: .9375rem; }
.h-get__links a { color: var(--h-accent); text-decoration: none; }
.h-get__links a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- hero */
.h-hero { padding: 72px 0 0; text-align: center; overflow: hidden; }
.h-hero__title { margin: .75rem 1.5rem 0; font-size: 5rem; line-height: 1.04; font-weight: 600; letter-spacing: -0.016em; }
.h-hero__lede { margin: 1.4rem auto 0; max-width: 40rem; padding: 0 1.5rem; font-size: 1.3125rem; line-height: 1.45; color: var(--h-dim); }
.h-hero__cta { margin-top: 1.9rem; display: flex; justify-content: center; align-items: center; gap: 30px; }
.h-hero__stage { position: relative; height: 640px; margin-top: 56px; }
.h-hero__staff { position: absolute; left: 0; right: 0; top: 230px; height: 200px; }
.h-hero__stage .h-laptop { position: absolute; left: 50%; top: 0; transform: translateX(-57%); }
.h-hero__phone { --w: 240px; position: absolute; left: 50%; top: 110px; transform: translateX(300px); }

/* ---------------------------------------------------------------- slideshow
 * Without home.js the slides stack. With it they sit side by side on one
 * track, the current one centred and its neighbours showing at the edges, as
 * on apple.com. The controls float at the bottom of the screen while the
 * slideshow is in view, then come to rest under it.
 */
.h-explore { padding: 110px 0 120px; overflow-x: clip; }
.h-explore .h-wrap { margin-bottom: 44px; }
.h-show { --sw: min(1120px, 100vw - 160px); --gap: 24px; }
.h-show__track { display: grid; gap: var(--gap); width: var(--sw); margin-inline: auto; }
.h-slide {
  position: relative; height: 680px; box-sizing: border-box; padding: 56px 24px 0; border-radius: 32px; overflow: hidden; text-align: center;
  background: radial-gradient(90% 60% at 50% 105%, var(--h-glow), transparent 70%), var(--h-slide);
}
.h-slide__tag { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: var(--h-accent); box-shadow: inset 0 0 0 1px var(--h-line); }
.h-slide__words { position: relative; z-index: 1; margin: 0 auto; max-width: 37.5rem; font-size: 1.75rem; line-height: 1.28; font-weight: 600; color: var(--h-dim); }
.h-slide__words strong { color: var(--h-ink); font-weight: 600; }
/* The art is big on purpose and runs off the bottom of the card. */
.h-slide__art { position: relative; margin-top: 40px; display: flex; justify-content: center; align-items: flex-start; }
.h-slide__art > * { flex: none; }
.h-slide__art--turn { align-items: center; gap: 52px; }
.h-slide__art--turn .h-phone { --w: 250px; }
.h-slide__art--turn .h-land { --h: 250px; }
.h-slide__turn { font-size: 30px; color: var(--h-faint); }
.h-slide__art--browser .h-browser { width: 900px; }
/* Slide 4: the phone stands in front of the browser, as one picture. */
.h-slide__art--link { padding-top: 10px; }
.h-slide__art--link .h-browser { width: 700px; margin-left: -70px; }
.h-slide__art--link .h-phone { --w: 236px; z-index: 1; margin-top: 70px; }
/* Slide 5: Today in front, Lessons and Isaac's page tucked in behind. */
.h-phone--web { --w: 262px; z-index: 1; }
.h-slide__art--webphones .h-phone--side { --w: 226px; z-index: 0; margin-top: 64px; }
.h-slide__art--webphones .h-phone--side:first-child { margin-right: -46px; }
.h-slide__art--webphones .h-phone--side:last-child { margin-left: -46px; }
.h-slide__art--webphones .h-phone--side .h-phone__screen img { filter: brightness(.94); }
/* A magnified detail, lifted off the screenshot. */
.h-zoom {
  position: absolute; z-index: 2; border-radius: 16px; background-repeat: no-repeat; background-color: var(--h-card);
  box-shadow: 0 0 0 2px var(--h-accent), 0 24px 50px rgba(0, 0, 0, .28);
}
.h-zoom--week { width: 320px; height: 225px; right: calc(50% - 490px); top: 170px; background-image: url(/img/web-lessons.jpg); background-size: 1896px auto; background-position: -1067px -237px; }
.h-zoom--student { width: 440px; height: 78px; left: calc(50% - 500px); top: 300px; background-image: url(/img/web-students.jpg); background-size: 1531px auto; background-position: -287px -457px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .h-zoom--week { background-image: url(/img/web-lessons-dark.jpg); }
  :root:not([data-theme="light"]) .h-zoom--student { background-image: url(/img/web-students-dark.jpg); }
}
:root[data-theme="dark"] .h-zoom--week { background-image: url(/img/web-lessons-dark.jpg); }
:root[data-theme="dark"] .h-zoom--student { background-image: url(/img/web-students-dark.jpg); }
/* With home.js: one track, sliding. */
.js .h-show__track {
  position: relative; display: flex; width: auto; margin: 0; gap: var(--gap);
  padding-inline: calc((100% - var(--sw)) / 2);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.js .h-show__track::-webkit-scrollbar { display: none; }
.js .h-slide { flex: 0 0 var(--sw); scroll-snap-align: center; scroll-snap-stop: always; }
/* The track takes keyboard focus, so the arrow keys scroll it, a slide at a time. */
.js .h-show__track:focus-visible { outline: 3px solid #9b7bf0; outline-offset: -3px; border-radius: 32px; }
.js .h-slide:not(.is-on) { cursor: pointer; }
.js .h-slide:not(.is-on) > * { opacity: .55; transition: opacity .6s; }
.h-show__controls { position: sticky; bottom: 28px; z-index: 5; width: max-content; margin: 26px auto 0; display: flex; align-items: center; gap: 14px; }
.h-show__controls[hidden] { display: none; }
.h-show__dots, .h-show__play {
  background: var(--h-float); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}
.h-show__dots { display: flex; align-items: center; gap: 2px; height: 56px; padding: 0 18px; border-radius: 999px; }
.h-show__dot { width: 22px; height: 44px; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: width .4s; }
.h-show__dot span { display: block; width: 8px; height: 8px; border-radius: 4px; background: var(--h-dot); overflow: hidden; transition: width .4s; }
.h-show__dot[aria-current="true"] { width: 56px; }
.h-show__dot[aria-current="true"] span { width: 48px; }
.h-show__dot[aria-current="true"] span::before { content: ""; display: block; height: 100%; width: var(--progress, 100%); background: var(--h-ink); }
.h-show__play { width: 56px; height: 56px; border: 0; border-radius: 50%; color: var(--h-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.h-show__play svg { width: 20px; height: 20px; fill: currentColor; }
.h-show__icon-play { display: none; }
.h-show.is-paused .h-show__icon-pause { display: none; }
.h-show.is-paused .h-show__icon-play { display: inline; }

/* ---------------------------------------------------------------- where it began */
.h-began { padding: 120px 1.5rem; background: var(--h-alt); text-align: center; }
.h-began .h-h2, .h-began .h-body { max-width: 820px; margin-inline: auto; }
.h-began__staff { height: 90px; margin: 34px -1.5rem 0; width: calc(100% + 3rem); }

/* ---------------------------------------------------------------- Isaac's week */
.h-chapter { padding: 110px 0; }
.h-chapter__pin { width: min(1040px, 100% - 3rem); margin-inline: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.h-chapter__stage { display: flex; justify-content: center; }
.h-chapter__phone { --w: 300px; }
.h-banner { position: absolute; z-index: 1; left: 1.99%; top: 6.71%; width: 96.02%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .16)); }
.h-banner img { display: block; width: 100%; height: auto; }
.h-banner--2, .h-banner--3 { opacity: 0; }

/* ---------------------------------------------------------------- selling points */
.h-more { padding: 110px 0; background: var(--h-alt); }
.h-points { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.h-points li { padding: 30px 26px; border-radius: 24px; background: var(--h-card); }
.h-points svg { width: 30px; height: 30px; fill: none; stroke: var(--h-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.h-points h3 { margin: 18px 0 0; font-size: 1.1875rem; line-height: 1.25; font-weight: 600; color: var(--h-ink); }
.h-points p { margin: 6px 0 0; font-size: 1rem; line-height: 1.4; color: var(--h-dim); }

/* ---------------------------------------------------------------- pricing */
.h-pricing { padding: 120px 0; }
.h-tiers { list-style: none; width: min(1040px, 100% - 3rem); margin: 48px auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.h-tier { padding: 34px 32px 32px; border-radius: 26px; background: var(--h-card); box-shadow: 0 0 0 1px var(--h-line); }
.h-tier--pro { box-shadow: 0 0 0 2px var(--h-accent); }
.h-tier h3 { margin: 0; font-size: 1.0625rem; font-weight: 600; color: var(--h-dim); }
.h-tier--pro h3 { color: var(--h-accent); }
.h-tier p { margin: 0; }
.h-tier__price { margin-top: 16px !important; font-size: 3.25rem; line-height: 1; font-weight: 600; letter-spacing: -0.03em; color: var(--h-ink); }
.h-tier__price span { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; color: var(--h-dim); }
.h-tier__note { margin-top: 14px !important; font-size: 1.1875rem; font-weight: 600; color: var(--h-ink); }
.h-tier__more { margin-top: 6px !important; font-size: 1.0625rem; line-height: 1.45; color: var(--h-dim); }

/* ---------------------------------------------------------------- the way in */
.h-close { padding: 120px 1.5rem 130px; background: var(--h-alt); text-align: center; }
.h-close__title { font-size: 4rem; }
.h-close__ways { margin-top: 40px; display: flex; justify-content: center; align-items: stretch; gap: 22px; flex-wrap: wrap; }
.h-way { display: flex; align-items: center; gap: 18px; padding: 18px 28px 18px 18px; border-radius: 24px; background: var(--h-card); box-shadow: 0 0 0 1px var(--h-line); text-align: left; }
.h-way:not(.h-way--qr) { padding-left: 28px; }
.h-way__qr { display: block; width: 104px; padding: 8px; border-radius: 14px; background: #ffffff; line-height: 0; box-sizing: border-box; }
.h-way__qr svg { width: 100%; height: auto; }
.h-way__label { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--h-accent); }
.h-way__title { margin: 6px 0 12px; font-size: 1.1875rem; font-weight: 600; color: var(--h-ink); }
.h-way__alt { font-size: .9375rem; }

/* ---------------------------------------------------------------- footer on the home page */
.h .site-footer { background: var(--h-bg); border-top-color: var(--h-line); }

/* ---------------------------------------------------------------- phones */
@media (max-width: 1079px) {
  .h-h2 { font-size: 2.125rem; }
  .h-body { font-size: 1.0625rem; }
  .h-hero { padding-top: 34px; }
  .h-eyebrow--lg { font-size: .9375rem; }
  .h-hero__title { margin-inline: 1rem; font-size: 2.375rem; line-height: 1.08; }
  .h-hero__lede { font-size: 1.0625rem; }
  .h-hero__cta { flex-direction: column; gap: 14px; }
  .h-hero__stage { height: 460px; margin-top: 30px; }
  .h-hero__staff { top: 170px; height: 120px; }
  .h-hero__stage .h-laptop { display: none; }
  .h-hero__phone { --w: 200px; left: 50%; top: 0; transform: translateX(-50%); }
  .h-explore { padding: 80px 0 90px; }
  .h-explore .h-wrap { margin-bottom: 30px; }
  .h-show { --sw: calc(100vw - 48px); --gap: 12px; }
  .h-slide { height: 620px; padding: 26px 16px 0; border-radius: 28px; }
  .h-slide__words { font-size: 1.1875rem; }
  .h-slide__art { margin-top: 24px; }
  /* Upright above, sideways below, both big enough to read. */
  .h-slide__art--turn { flex-direction: column; gap: 10px; }
  .h-slide__art--turn .h-phone { --w: 156px; }
  .h-slide__art--turn .h-land { --h: 136px; }
  .h-slide__turn { font-size: 18px; line-height: 1; }
  /* Wide screens keep their size and run off the right edge, as on the Mac. */
  .h-slide__art--browser, .h-slide__art--link { justify-content: flex-start; }
  .h-slide__art--browser .h-browser { width: 600px; }
  .h-slide__art--link { padding-top: 0; }
  .h-slide__art--link .h-phone { --w: 150px; margin-top: 60px; }
  .h-slide__art--link .h-browser { width: 520px; margin-left: -50px; }
  .h-phone--web { --w: 176px; }
  .h-slide__art--webphones .h-phone--side { --w: 150px; margin-top: 40px; }
  .h-slide__art--webphones .h-phone--side:first-child { margin-right: -40px; }
  .h-slide__art--webphones .h-phone--side:last-child { margin-left: -40px; }
  .h-zoom { border-radius: 12px; }
  .h-zoom--week { width: 220px; height: 155px; right: -4px; left: auto; top: 150px; background-size: 1304px auto; background-position: -733px -163px; }
  .h-zoom--student { width: 290px; height: 52px; left: 6px; top: 150px; background-size: 1009px auto; background-position: -189px -301px; }
  .h-show__controls { bottom: 18px; }
  .h-show__dots { height: 48px; padding: 0 12px; }
  .h-show__play { width: 48px; height: 48px; }
  .h-browser__url { padding: 1px 20px; font-size: 9px; }
  .h-began { padding: 80px 1.5rem; }
  .h-chapter { padding: 70px 0 80px; }
  .h-chapter__pin { grid-template-columns: 1fr; gap: 28px; width: calc(100% - 2.5rem); }
  .h-chapter__phone { --w: 240px; }
  .h-more { padding: 70px 0; }
  .h-points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
  .h-points li { padding: 18px 16px; border-radius: 18px; }
  .h-points svg { width: 26px; height: 26px; }
  .h-points h3 { margin-top: 12px; font-size: .9375rem; }
  .h-points p { font-size: .8125rem; }
  .h-pricing { padding: 80px 0; }
  .h-tiers { grid-template-columns: 1fr; gap: 12px; margin-top: 26px; width: calc(100% - 2.5rem); }
  .h-tier { padding: 24px 22px; }
  .h-tier__price { font-size: 2.5rem; }
  .h-close { padding: 80px 1.5rem 90px; }
  .h-close__title { font-size: 2.25rem; }
  .h-way { width: 100%; justify-content: center; text-align: center; padding: 22px; }
  .h-way:not(.h-way--qr) { padding-left: 22px; }
  /* Both ways in look the same on a phone: a label, then a full-size button. */
  .h-way .h-btn { margin-top: 12px; }
  .h-way .h-btn--small { min-height: 48px; padding: 0 1.6rem; font-size: 1.0625rem; }
  .h-get { right: 1rem; left: 1rem; width: auto; }
}

/* ---------------------------------------------------------------- the scroll story
 * home.js marks <html class="scrolly"> and writes each chapter's progress as
 * --p (0 to 1 while pinned) and --e (0 to 1 as it comes into view). Each moving
 * part is a paused animation whose delay follows that progress between its own
 * --a and --b, so the scroll scrubs it, forwards and back.
 */
.scrolly .h-chapter { --run: 600px; height: calc(100svh + var(--run)); padding: 0; overflow: clip; }
.scrolly .h-chapter__pin { position: sticky; top: 52px; height: calc(100svh - 52px); }
.scrolly .h-chapter__words, .scrolly .h-chapter__phone, .scrolly .h-banner {
  animation-duration: 1s; animation-timing-function: linear; animation-fill-mode: both; animation-play-state: paused;
  animation-delay: calc(clamp(0, (var(--p, 0) - var(--a, 0)) / (var(--b, 1) - var(--a, 0)), 1) * -0.999s);
}
.scrolly .h-chapter__words { animation-name: h-arrive; animation-delay: calc(clamp(0, (var(--e, 1) - 0.3) / 0.6, 1) * -0.999s); }
.scrolly .h-chapter__phone { animation-name: h-rise; --a: 0; --b: .45; }
@keyframes h-arrive { from { opacity: 0; translate: 0 36px; } to { opacity: 1; translate: 0 0; } }
@keyframes h-rise { from { opacity: 0; translate: 0 90px; scale: .94; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes h-banner { 0% { opacity: 0; translate: 0 -140%; } 18% { opacity: 1; translate: 0 0; } 82% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 0 -140%; } }
@keyframes h-banner-last { 0% { opacity: 0; translate: 0 -140%; } 40% { opacity: 1; translate: 0 0; } 100% { opacity: 1; translate: 0 0; } }
.scrolly .h-banner { animation-name: h-banner; }
/* Notifications get a longer scroll: the phone settles, then each banner
   drops in, holds, and lifts away, with a beat of empty screen before the next. */
.scrolly .h-chapter--notify { --run: 1500px; }
.scrolly .h-chapter--notify .h-chapter__phone { --b: .2; }
.scrolly .h-banner--1 { --a: .24; --b: .46; }
.scrolly .h-banner--2 { --a: .52; --b: .74; }
.scrolly .h-banner--3 { animation-name: h-banner-last; --a: .80; --b: .96; }
@media (max-width: 1079px) {
  /* The phone is big, about three quarters of the screen, as on apple.com.
     While the chapter is pinned it runs off the bottom of the screen; the
     extra room under the pin (--tail) lets it rise fully into view as the
     chapter scrolls away. */
  .scrolly .h-chapter { --run: 460px; --tail: 190px; height: calc(100svh + var(--run) + var(--tail)); padding-bottom: var(--tail); }
  .scrolly .h-chapter--notify { --run: 1200px; }
  .scrolly .h-chapter__pin { align-content: start; padding-top: 1.25rem; box-sizing: border-box; gap: 1.25rem; }
  .scrolly .h-chapter__stage { align-items: flex-start; }
  .scrolly .h-chapter__phone { --w: min(310px, 76vw); }
}
