/* ==========================================================================
 * Homepage only (loaded by index.html after styles.css).
 *
 * Four full-screen panels — hero, one design, exclusivity, founder — followed by the
 * shared site footer. home.js drives the panel-to-panel transitions and the
 * delayed text reveals; without it (or with reduced motion) the panels are
 * ordinary full-height sections and every word is visible immediately.
 * The shared header, footer, dialogs and cart drawer are not restyled here.
 * ========================================================================== */

/* Inter's @font-face rules are in inter.css (shared with the information
 * pages). */

/* स्त्री in the hero headline: Noto Serif Devanagari, self-hosted
 * (assets/fonts/noto-serif-devanagari/README.txt). Devanagari subset only.
 * It has no italic face; the browser slants it for font-style: italic. */
/* devanagari */
@font-face {
  font-family: 'Noto Serif Devanagari';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/noto-serif-devanagari/noto-serif-devanagari-600-devanagari.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

:root {
  /* Height of the homepage header (home.js measures the real value). */
  --home-header-h: 65px;
  /* One panel = the visible viewport (home.js pins it to window.innerHeight
   * so the mobile address bar never resizes a panel mid-sequence). */
  --home-panel-h: 100vh;
  --home-panel-h: 100svh;
  --home-gutter: clamp(20px, 2.6vw, 56px);
  --home-font: "Inter", system-ui, sans-serif;
  --home-backdrop: #76301d;
  --home-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 980px) {
  :root {
    --home-header-h: 61px;
  }
}

@media (max-width: 680px) {
  :root {
    --home-header-h: 57px;
  }
}

/* While the sequence runs, home.js animates the scroll position itself. */
html.home-sequence {
  scroll-behavior: auto;
}

/* ---------- Header over the footer (homepage only) ----------
 * The header itself, its menu and the cart drawer are in site-header.css.
 *
 * Over the footer the same glass turns black with white contents. home.js
 * sets --home-footer-cover to how far the footer has come into view
 * (0 to 1), so the glass darkens step by step as the footer slides in and
 * lightens as it slides out. Halfway (html.home-header-dark) the logo, links
 * and icons switch to white and, in the same frame, the glass steps past the
 * mid-greys that neither dark nor white contents read clearly against: the
 * light half stops at grey 186 and the dark half starts at grey 110, which
 * keeps both above 4.5:1 over the founder photo behind the header. */
.home-js .site-header,
.home-js .site-header.is-compact {
  --home-glass: calc(255 - 138 * var(--home-footer-cover, 0));
  background: rgb(var(--home-glass) var(--home-glass) var(--home-glass) / calc(60% + 28% * var(--home-footer-cover, 0)));
}

.home-header-dark .site-header,
.home-header-dark .site-header.is-compact {
  --home-glass: calc(220 - 220 * var(--home-footer-cover, 0));
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .home-js .site-header,
  .home-js .site-header.is-compact {
    background: rgb(var(--home-glass) var(--home-glass) var(--home-glass) / 94%);
  }
}

.home-header-dark .site-header {
  color: #ffffff;
}

/* The links switch colour at once like the logo and icons (the shared fade
 * would pass through grey against the grey glass). */
.home-js .site-header .desktop-nav a {
  transition: opacity 160ms ease;
}

.home-header-dark .site-header .brand-logo {
  filter: brightness(0) invert(1);
}

.home-header-dark .site-header .cart-dot {
  background: #ffffff;
  color: #111111;
}

.home-header-dark .site-header :focus-visible {
  outline-color: #ffffff;
}

/* ---------- Panels ----------
 * Each panel is one full viewport and runs behind the translucent header, so
 * the photography shows softly through it. Adjacent panels meet edge to edge
 * with nothing between them. */

.home-panel {
  position: relative;
  height: var(--home-panel-h);
  overflow: hidden;
  background: var(--surface);
}

/* Each panel sticks to the top while the next one slides up over it. */
.home-sequence .home-panel {
  position: sticky;
  top: 0;
}

.home-panel:focus {
  outline: none;
}

.home-panel-inner {
  position: absolute;
  inset: 0;
}

/* ---------- 1. Hero ---------- */

.home-hero {
  color: #ffffff;
}

.home-hero .home-panel-inner {
  background: var(--home-backdrop);
}

.home-hero-media {
  position: absolute;
  inset: 0;
  display: flex;
}

.home-hero-photo {
  display: none;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
}

.home-hero-photo--center {
  display: block;
}

.home-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

/* Legibility: a soft shade under the text, kept to the lower part of the image. */
.home-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgb(0 0 0 / 50%) 0%, rgb(0 0 0 / 22%) 32%, rgb(0 0 0 / 0%) 58%);
}

/* Raised by the height the old subline took (0.45em margin + 1.2 line, at its
 * font size), so the headline keeps its place and EXPLORE sits right under it. */
.home-hero-copy {
  position: absolute;
  z-index: 1;
  right: var(--home-gutter);
  bottom: calc(max(28px, 6%) + 1.65 * clamp(18px, 5.4vw, 34px));
  left: var(--home-gutter);
}

/* Portrait: no larger than lets "Where streetwear" (about 7.2em wide) fit on
 * one line between the gutters, so the headline is always two lines. */
.home-hero-title {
  margin: 0;
  font-family: var(--home-font);
  font-size: clamp(32px, min(13vw, (100vw - 2 * var(--home-gutter)) / 7.45), 96px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* Sized and dropped (as in the approved mockup) so the top bar sits just under
 * Inter's ascenders, the ी curl rises above them and the word dips slightly
 * below the baseline; in 600 to match Inter's stroke weight; pulled left so
 * the gap after "with" is an ordinary word space. line-height 0: the
 * Devanagari font's taller line metrics would otherwise deepen its line and
 * lift it off the Inter line beside it on wide screens. */
.home-hero-stri {
  margin-left: -0.12em;
  font-family: "Noto Serif Devanagari", serif;
  font-size: 1.1em;
  font-style: italic;
  font-weight: 600;
  line-height: 0;
  vertical-align: -0.1em;
}

/* Room inside the line's mask for the ी's top curl and italic overhang
 * (offset by negative margins, so the line doesn't move). */
.home-hero-title .home-line-stri {
  padding-top: 0.25em;
  margin-top: -0.25em;
  padding-right: 0.15em;
  margin-right: -0.15em;
}

.home-hero-sub {
  max-width: 22em;
  margin: 0.45em 0 0;
  font-family: var(--home-font);
  font-size: clamp(18px, 5.4vw, 34px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.home-hero-sub em {
  font-style: italic;
}

.home-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 48px;
  margin-top: clamp(20px, 3.4vh, 40px);
  padding: 0.85em 1.7em;
  border-radius: 999px;
  background: #f4f4f4;
  color: #000000;
  font-family: var(--home-font);
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 24px rgb(0 0 0 / 18%);
  transition: background 180ms ease, transform 180ms ease;
}

.home-hero-cta:hover {
  background: #ffffff;
}

.home-hero-cta:active {
  transform: scale(0.97);
}

.home-hero-cta:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

/* Portrait screens: the three photos take turns, full-bleed in the same frame
 * (home.js adds .home-hero-carousel; without it only the centre photo shows).
 * The incoming photo fades in on top of the outgoing one, which stays fully
 * visible underneath until the fade has finished, so the picture never dims. */
@media not all and (min-aspect-ratio: 4/3) {
  .home-hero-carousel {
    z-index: 0;
  }

  .home-hero-carousel .home-hero-photo {
    display: block;
    position: absolute;
    inset: 0;
    opacity: 0;
  }

  .home-hero-carousel .home-hero-photo.is-previous {
    z-index: 1;
    opacity: 1;
  }

  .home-hero-carousel .home-hero-photo.is-current {
    z-index: 2;
    opacity: 1;
  }

  .home-hero-carousel::after {
    z-index: 3;
  }
}

@media (prefers-reduced-motion: no-preference) and (max-aspect-ratio: 4/3) {
  .home-hero-carousel .home-hero-photo.is-current {
    transition: opacity 700ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Landscape screens (4:3 and wider): the approved three-photo composition. */
@media (min-aspect-ratio: 4/3) {
  .home-hero-photo {
    display: block;
  }

  .home-hero-photo img {
    object-position: 50% 18%;
  }

  .home-hero-media::after {
    background: linear-gradient(to top, rgb(0 0 0 / 34%) 0%, rgb(0 0 0 / 12%) 30%, rgb(0 0 0 / 0%) 52%);
  }

  .home-hero-copy {
    bottom: calc(max(32px, 9%) + 1.65 * clamp(20px, min(3vw, 5.8vh), 68px));
  }

  .home-hero-title {
    font-size: clamp(44px, min(6.8vw, 13vh), 168px);
  }

  .home-hero-sub {
    max-width: none;
    font-size: clamp(20px, min(3vw, 5.8vh), 68px);
  }

  .home-hero-cta {
    font-size: clamp(15px, min(1.25vw, 2.4vh), 26px);
  }
}

/* ---------- 2. One design ----------
 * Copy bottom-left in white, with the same sizes as the exclusivity text,
 * over the same kind of shade. The photograph (tall on portrait screens,
 * wide on landscape screens) is sized to the space below the header and
 * anchored to the bottom, so she is always seen whole. Where a screen is wider
 * than the photograph, a mirrored copy of it continues the wall beside its
 * edge (the mirror meets the photograph's own edge, so the newsprint runs on
 * without a seam, and only the plain wall at that edge is ever shown). The
 * band behind the header, above the photograph, shows plain newsprint from
 * the left of the wide photograph (no part of her), and the photograph's top
 * edge fades into it, so the wall carries on while the panel slides in. Back
 * to front: the newsprint band, the mirrored wall, the photograph, the shade,
 * the copy. */

.home-one-design {
  --home-one-design-gradient: linear-gradient(
    to top,
    rgb(0 0 0 / 55%) 0%,
    rgb(0 0 0 / 55%) 52%,
    rgb(0 0 0 / 44%) 58%,
    rgb(0 0 0 / 24%) 64%,
    rgb(0 0 0 / 9%) 69%,
    rgb(0 0 0 / 0%) 73%
  );
  color: #ffffff;
}

.home-one-design .home-panel-inner {
  --home-one-design-photo: image-set(url(assets/optimized/home/home-one-design-newspaper-736.webp) type("image/webp"), url(assets/optimized/home/home-one-design-newspaper-736.jpg) type("image/jpeg"));
  --home-one-design-ratio: 0.5631;
  --home-one-design-photo-h: calc(var(--home-panel-h) - var(--home-header-h));
  --home-one-design-photo-w: calc(var(--home-one-design-photo-h) * var(--home-one-design-ratio));
  --home-one-design-top-fade: linear-gradient(to bottom, transparent 0, #000000 24px);
  background-color: rgb(187 147 145);
  background-image: image-set(url(assets/optimized/home/home-one-design-newspaper-wide-1672.webp) type("image/webp"), url(assets/optimized/home/home-one-design-newspaper-wide-1672.jpg) type("image/jpeg"));
  background-position: 0 0;
  background-size: auto var(--home-one-design-photo-h);
  background-repeat: repeat-x;
}

/* Mirrored wall: ::before continues it to the left of the photograph and
 * ::after to the right. */
.home-one-design .home-panel-inner::before,
.home-one-design .home-panel-inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: var(--home-one-design-photo-h);
  aspect-ratio: var(--home-one-design-ratio);
  background-image: var(--home-one-design-photo);
  background-size: cover;
  background-repeat: no-repeat;
  transform: scaleX(-1);
  -webkit-mask-image: var(--home-one-design-top-fade);
  mask-image: var(--home-one-design-top-fade);
}

.home-one-design .home-panel-inner::before {
  right: calc(50% + var(--home-one-design-photo-w) / 2);
}

.home-one-design .home-panel-inner::after {
  left: calc(50% + var(--home-one-design-photo-w) / 2);
}

.home-one-design-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  height: var(--home-one-design-photo-h);
  aspect-ratio: var(--home-one-design-ratio);
  transform: translateX(-50%);
  background-image: var(--home-one-design-photo);
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-mask-image: var(--home-one-design-top-fade);
  mask-image: var(--home-one-design-top-fade);
}

/* The shade sits on the panel itself, over everything in it but the copy. */
.home-one-design::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--home-one-design-gradient);
  pointer-events: none;
}

.home-one-design-copy {
  z-index: 1;
  position: absolute;
  right: var(--home-gutter);
  bottom: calc(max(28px, 6%) - 0.18 * clamp(32px, 10.4vw, 96px));
  left: var(--home-gutter);
}

/* Roomier than the exclusivity panel: the headline stands well clear of the
 * copy, and each line of copy and the button get their own space. */
.home-one-design .home-statement {
  margin-bottom: 0.8em;
}

/* Balanced lines keep a single word ("new?") from sitting alone. */
.home-one-design-text p {
  text-wrap: balance;
}

/* Portrait screens: the headline keeps its two lines ("Wondering why
 * there’s" / "only one design?"), sized down just enough for the longer line
 * to fit the width (it is 9.1 x the font size wide). */
@media not all and (min-aspect-ratio: 4/3) {
  .home-one-design .home-statement {
    font-size: min(clamp(32px, 10.4vw, 96px), (100vw - 2 * var(--home-gutter)) / 9.25);
  }

  .home-one-design .home-statement .home-line {
    white-space: nowrap;
  }
}

.home-one-design-text {
  max-width: 30ch;
  margin: 0 0 2.4em;
  color: rgb(255 248 247 / 82%);
  font-family: var(--home-font);
  font-size: clamp(16px, 4.3vw, 21px);
  font-weight: 300;
  line-height: 1.45;
}

.home-one-design-text p {
  margin: 0;
}

.home-one-design-text p + p {
  margin-top: 1.1em;
}

/* "Moodlogue feels the same today." sits directly under the first line. */
.home-one-design-text p + .home-one-design-joined {
  margin-top: 0;
}

/* The last line breaks after "idea," on portrait screens and after "and" on
 * landscape screens. */
.home-one-design-br-landscape {
  display: none;
}

.home-one-design-copy .home-hero-cta {
  margin-top: 0;
}

/* Landscape screens: the wide photograph, with her on the right, and a second
 * shade from the left edge behind the copy. */
@media (min-aspect-ratio: 4/3) {
  .home-one-design .home-panel-inner {
    --home-one-design-photo: image-set(url(assets/optimized/home/home-one-design-newspaper-wide-1672.webp) type("image/webp"), url(assets/optimized/home/home-one-design-newspaper-wide-1672.jpg) type("image/jpeg"));
    --home-one-design-ratio: 1.7768;
    background-color: rgb(169 127 117);
    /* The newsprint band is scaled so only the empty wall (the left 62% of
     * the wide photograph) spans the screen, never her. */
    background-size: max(100% / 0.62, var(--home-one-design-photo-w)) auto;
    background-repeat: no-repeat;
  }

  /* Anchored right, so she stays in view, with the mirrored wall only to its
   * left. */
  .home-one-design-photo {
    right: 0;
    left: auto;
    transform: none;
  }

  .home-one-design .home-panel-inner::before {
    right: var(--home-one-design-photo-w);
  }

  .home-one-design .home-panel-inner::after {
    display: none;
  }

  .home-one-design::after {
    background-image:
      linear-gradient(
        to right,
        rgb(0 0 0 / 38%) 0%,
        rgb(0 0 0 / 38%) 28%,
        rgb(0 0 0 / 22%) 40%,
        rgb(0 0 0 / 8%) 50%,
        rgb(0 0 0 / 0%) 58%
      ),
      var(--home-one-design-gradient);
  }

  .home-one-design-copy {
    bottom: calc(max(32px, 9%) - 0.15 * clamp(44px, min(5.4vw, 10.8vh), 168px));
    max-width: calc(9.4 * clamp(44px, min(6.8vw, 13vh), 168px));
  }

  .home-one-design .home-statement {
    margin-bottom: 0.5em;
  }

  /* Each line of copy runs at full length; only the marked break splits the
   * last one into two lines. */
  .home-one-design-text {
    max-width: none;
    margin-bottom: 2.2em;
    font-size: clamp(16px, min(1.5vw, 2.85vh), 28px);
  }

  .home-one-design-text p {
    text-wrap: wrap;
  }

  .home-one-design-text p + p {
    margin-top: 0.8em;
  }

  .home-one-design-text p + .home-one-design-joined {
    margin-top: 0;
  }

  .home-one-design-br-portrait {
    display: none;
  }

  .home-one-design-br-landscape {
    display: inline;
  }
}

/* ---------- 2. Exclusivity ---------- */

.home-exclusivity {
  color: var(--surface);
}

/* Background photograph. A shade rises from the bottom behind the text
 * (headline at least 3:1, supporting copy at least 4.5:1 over the white
 * dress) and eases out below the woman's face, so it has no visible edge.
 * Portrait screens put the copy over the dress, so their shade is a little
 * deeper. --home-exclusivity-shade-full / -end: where the full shade stops
 * and where it has faded out, measured from the bottom of the panel. */
.home-exclusivity .home-panel-inner {
  --home-exclusivity-shade: 0.5;
  --home-exclusivity-shade-full: 44%;
  --home-exclusivity-shade-end: 62%;
  --home-exclusivity-gradient: linear-gradient(
    to top,
    rgb(0 0 0 / var(--home-exclusivity-shade)) 0%,
    rgb(0 0 0 / var(--home-exclusivity-shade)) var(--home-exclusivity-shade-full),
    rgb(0 0 0 / calc(var(--home-exclusivity-shade) * 0.8)) calc(var(--home-exclusivity-shade-full) + (var(--home-exclusivity-shade-end) - var(--home-exclusivity-shade-full)) * 0.33),
    rgb(0 0 0 / calc(var(--home-exclusivity-shade) * 0.44)) calc(var(--home-exclusivity-shade-full) + (var(--home-exclusivity-shade-end) - var(--home-exclusivity-shade-full)) * 0.61),
    rgb(0 0 0 / calc(var(--home-exclusivity-shade) * 0.16)) calc(var(--home-exclusivity-shade-full) + (var(--home-exclusivity-shade-end) - var(--home-exclusivity-shade-full)) * 0.83),
    rgb(0 0 0 / 0) var(--home-exclusivity-shade-end)
  );
  background-color: #000000;
  background-image:
    var(--home-exclusivity-gradient),
    url(assets/optimized/home/home-exclusivity-2160.jpg);
  background-image:
    var(--home-exclusivity-gradient),
    image-set(url(assets/optimized/home/home-exclusivity-2160.webp) type("image/webp"), url(assets/optimized/home/home-exclusivity-2160.jpg) type("image/jpeg"));
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  padding: 0 var(--home-gutter);
}

/* Text block placed like the hero's: bottom-left, below the woman's face. The
 * bottom offset is reduced by the extra headline-to-copy space (0.18em of the
 * headline) so the headline itself keeps its position. */
.home-exclusivity-copy {
  position: absolute;
  right: var(--home-gutter);
  bottom: calc(max(28px, 6%) - 0.18 * clamp(32px, 10.4vw, 96px));
  left: var(--home-gutter);
}

/* Spacing follows the hero's rhythm, opened slightly so the headline and copy
 * read as separate elements: headline baseline to copy cap height = 0.49 x
 * headline size (0.62 on landscape screens), and the button sits below the
 * copy at the hero's share of the text block's height. */
.home-statement {
  margin: 0 0 0.22em;
  font-family: var(--home-font);
  font-size: clamp(32px, 10.4vw, 96px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

/* Optical alignment: "f" has almost no left side-bearing, so the line it
 * starts sat further left than the round "O" and "a" lines around it. */
.home-statement .home-line + .home-line .home-line-inner {
  text-indent: 0.036em;
}

.home-exclusivity-text {
  max-width: 30ch;
  margin: 0 0 1.9em;
  color: rgb(255 248 247 / 78%);
  font-family: var(--home-font);
  font-size: clamp(18px, 4.8vw, 24px);
  font-weight: 300;
  line-height: 1.45;
}

.home-exclusivity-copy .home-hero-cta {
  margin-top: 0;
}

@media (min-aspect-ratio: 4/3) {
  .home-exclusivity .home-panel-inner {
    --home-exclusivity-shade: 0.4;
  }

  /* Same bottom offset and maximum width as the hero text: its headline
   * ("Not made for everyone.") is 9.4em wide at the hero headline size. */
  .home-exclusivity-copy {
    bottom: calc(max(32px, 9%) - 0.15 * clamp(44px, min(5.4vw, 10.8vh), 168px));
    max-width: calc(9.4 * clamp(44px, min(6.8vw, 13vh), 168px));
  }

  /* Sized so the three-line headline sits clear of the woman's face. */
  .home-statement {
    margin-bottom: 0.42em;
    font-size: clamp(44px, min(5.4vw, 10.8vh), 168px);
  }

  .home-statement .home-line {
    text-wrap: balance;
  }

  .home-exclusivity-text {
    max-width: 34ch;
    margin-bottom: 2.67em;
    font-size: clamp(18px, min(1.7vw, 3.2vh), 32px);
  }
}

/* ---------- 3. Founder ---------- */

/* Full-bleed studio photograph like the other panels, with the quote in white
 * over it. Portrait screens fill the photo by height, centred on her face, and
 * put the quote bottom-left like the hero and exclusivity text, over a shade
 * that eases out below her face (the jeans behind the text are too light for
 * white text on their own). Landscape screens put the quote in a column over
 * the grey wall on the right, with a light shade from the right edge. The
 * photo is visible as the panel slides in; only the text reveals after. */
.home-founder {
  color: #ffffff;
}

.home-founder .home-panel-inner {
  --home-founder-shade: 0.55;
  --home-founder-shade-full: 30%;
  --home-founder-shade-end: 56%;
  /* The wall's grey, shown until the photo has loaded. */
  background: #5e5e5e;
}

.home-founder-photo {
  position: absolute;
  inset: 0;
  margin: 0;
}

.home-founder-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgb(0 0 0 / var(--home-founder-shade)) 0%,
    rgb(0 0 0 / var(--home-founder-shade)) var(--home-founder-shade-full),
    rgb(0 0 0 / calc(var(--home-founder-shade) * 0.8)) calc(var(--home-founder-shade-full) + (var(--home-founder-shade-end) - var(--home-founder-shade-full)) * 0.33),
    rgb(0 0 0 / calc(var(--home-founder-shade) * 0.44)) calc(var(--home-founder-shade-full) + (var(--home-founder-shade-end) - var(--home-founder-shade-full)) * 0.61),
    rgb(0 0 0 / calc(var(--home-founder-shade) * 0.16)) calc(var(--home-founder-shade-full) + (var(--home-founder-shade-end) - var(--home-founder-shade-full)) * 0.83),
    rgb(0 0 0 / 0) var(--home-founder-shade-end)
  );
}

.home-founder-photo picture,
.home-founder-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Portrait screens show only a slice of the landscape photo (it fills the
 * panel's height, so it is 2295/1502 panel-heights wide). The point 46% across
 * the photo (her body's centre, between her raised knee and her right arm) is
 * kept on the screen's centre line at every portrait size. */
.home-founder-photo img {
  object-fit: cover;
  object-position: calc(50% + var(--home-panel-h) * 0.0611) 50%;
}

.home-founder-copy {
  position: absolute;
  right: var(--home-gutter);
  bottom: max(28px, 6%);
  left: var(--home-gutter);
}

.home-founder-quote {
  margin: 0;
}

.home-founder-quote p {
  max-width: 24ch;
  margin: 0;
  font-family: var(--home-font);
  font-size: clamp(19px, 5.4vw, 30px);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.home-founder-name {
  margin: clamp(14px, 2.4vh, 28px) 0 0;
  color: rgb(255 255 255 / 78%);
  font-family: var(--home-font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* On portrait screens the name sits over her white sneaker, and the sneaker
 * fills the space between the quote and the screen's bottom edge, so the name
 * can't move clear of it. A faint extra shade behind the name only, feathered
 * at every edge, keeps it above 4.5:1 there. */
.home-founder-name {
  position: relative;
  z-index: 0;
  width: fit-content;
}

.home-founder-name::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -12px -32px -12px calc(-1 * var(--home-gutter));
  background: linear-gradient(to right, rgb(0 0 0 / 0.16) calc(100% - 64px), rgb(0 0 0 / 0));
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}

@media (min-aspect-ratio: 4/3) {
  /* Wide screens fill the photo by width and keep her head in frame; screens
   * nearer 4:3 fill it by height and keep the whole wall on the right. */
  .home-founder-photo img {
    object-position: 100% 25%;
  }

  .home-founder-photo::after {
    background: linear-gradient(
      to left,
      rgb(0 0 0 / 0.3) 0%,
      rgb(0 0 0 / 0.24) 15%,
      rgb(0 0 0 / 0.13) 29%,
      rgb(0 0 0 / 0.05) 40%,
      rgb(0 0 0 / 0) 50%
    );
  }

  /* A column over the wall, clear of her raised arm; centred in the area
   * below the header. */
  .home-founder-copy {
    top: var(--home-header-h);
    bottom: 0;
    left: auto;
    width: 30vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .home-founder-quote p {
    max-width: none;
    font-size: clamp(20px, min(2.2vw, 4.2vh), 46px);
  }

  .home-founder-name {
    font-size: clamp(12px, 0.9vw, 15px);
  }

  .home-founder-name {
    position: static;
    z-index: auto;
    width: auto;
  }

  .home-founder-name::before {
    content: none;
  }
}

/* ---------- Footer in the panel sequence (homepage only) ----------
 * The footer itself is styled in site-footer.css (shared with the product
 * page). In the sequence the founder panel stays stuck while
 * the footer slides up over it like the other panels: a spacer after the last
 * panel extends how long it sticks, and the footer is pulled up by the same
 * amount and is one panel tall, so it ends filling the screen with nothing
 * else showing. Its content is kept clear of the header. */

.home-sequence .home-main::after {
  content: "";
  display: block;
  height: var(--home-panel-h);
}

.home-sequence .site-footer {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: var(--home-panel-h);
  margin-top: calc(-1 * var(--home-panel-h));
  padding-top: calc(var(--home-header-h) + clamp(28px, calc(var(--home-panel-h) * 0.05), 64px));
}

/* The link strip, wordmark and fine print sit together at the foot of the
 * screen and the contact section stays near the top. White space left over
 * on taller screens mostly goes below the icons: a third of it may go above
 * the heading, but never more than 8% of the screen's height. */
.home-sequence .footer-contact {
  flex: 1 0 auto;
}

.home-sequence .footer-contact::before,
.home-sequence .footer-contact::after {
  content: "";
}

.home-sequence .footer-contact::before {
  flex: 1 0 0;
  max-height: calc(var(--home-panel-h) * 0.08);
}

.home-sequence .footer-contact::after {
  flex: 2 0 0;
}

@media (max-width: 680px) {
  /* Phones: the link strip, wordmark and fine print keep their own heights at
   * the foot of the screen, and the white contact section above them takes
   * the rest, its heading and icons centred in it as one group: the same
   * space above and below them, never less than 24px. */
  .home-sequence .site-footer {
    padding-top: var(--home-header-h);
  }

  .home-sequence .footer-contact {
    margin-bottom: 0;
  }

  .home-sequence .footer-contact::before,
  .home-sequence .footer-contact::after {
    flex: 1 0 0;
    min-height: 24px;
    max-height: none;
  }
}

/* A panel photo still loading (home.js): hidden over the panel's background. */
.home-js .home-image-pending {
  opacity: 0;
}

/* ---------- Reveals ----------
 * Text is static: it shows with its panel, never animated. Only the hero
 * photography fades in, once home.js has started (html.home-js) and only when
 * motion is allowed. */

.home-line {
  display: block;
  overflow: hidden;
  /* Room for descenders inside the mask. */
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.home-line-inner {
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  .home-js [data-reveal-media] {
    opacity: 0;
    transition: opacity 700ms ease;
  }

  .home-js [data-reveal-media].is-revealed {
    opacity: 1;
  }

  .home-js [data-reveal-media].is-instant {
    transition: none;
  }

  .home-js .home-image-arrive {
    transition: opacity 600ms ease;
  }
}
