/* ===================================================================
   Maurois Film Pack 01 — lab.andremaurois.com
   Static, no frameworks, no build step. Phone-first: designed at 390px,
   checked at 360px and 430px. Traffic arrives from Instagram, so the
   vertical layout is the design, not an adaptation of a desktop one.
   =================================================================== */

:root {
  /* The whole palette. Three values plus the text colour that sits on green. */
  --bg: #FFFFFF;
  --ink: #121212;
  --accent: #0F4430;
  --on-accent: #FFFFFF;

  /* Derived only as alpha of --ink. Nothing else is allowed on this page. */
  --muted: rgba(18, 18, 18, .62);
  --hair: rgba(18, 18, 18, .14);

  --gutter: 20px;
  --content-max: 720px;

  --font-display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --font-label: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Manrope', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* Room for the sticky CTA so it never covers the last line of the footer. */
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
}

/* ---------- micro rails (header / footer) ---------- */

.rail-block {
  padding: 12px var(--gutter);
}

.rail,
.rail--bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin: 0;
}

.rail {
  border-bottom: 1px solid var(--hair);
  padding-bottom: 10px;
}

.rail--bottom {
  border-top: 1px solid var(--hair);
  padding-top: 14px;
}

.micro {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.35;
}

.reg {
  color: var(--accent);
  font-size: .8em;
  vertical-align: .32em;
  letter-spacing: 0;
}

/* ---------- sections ---------- */

.section {
  padding: 48px var(--gutter);
}

.section + .section {
  border-top: 1px solid var(--hair);
}

/* A green plate meets white directly — no hairline on either side of it. */
.band + .section,
.section + .band {
  border-top: 0;
}

.hero {
  padding-top: 22px;
  padding-bottom: 36px;
}

/* Full-bleed green plates. */
.band {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- display type ---------- */

.display-heading {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  /*
   * line-height is tied to the painted glyph, not the line box. On Anton
   * capitals the ink occupies about 0.875em of the em square, so 1.0 keeps
   * poster density without the paint of two lines ever touching.
   */
  line-height: 1.0;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 14px 0;
  font-size: clamp(2.1rem, 9vw, 3.6rem);
}

.display-heading--on-accent {
  color: var(--on-accent);
}

.hero-title {
  font-size: clamp(2.75rem, 13.5vw, 6.5rem);
  letter-spacing: -.02em;
  margin-left: -.022em;  /* optical compensation for Anton's left bearing */
  margin-bottom: 16px;
}

.eyebrow {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.35;
  margin: 0 0 12px 0;
}

.eyebrow--on-accent {
  color: var(--on-accent);
}

/* ---------- body copy ---------- */

.subhead {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  max-width: 36ch;
  margin: 0 0 20px 0;
}

.body-text {
  font-size: 1rem;
  line-height: 1.65;
  max-width: 38ch;
  margin: 0 0 18px 0;
}

.body-text:last-child {
  margin-bottom: 0;
}

.disclaimer {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 40ch;
  margin: 24px 0 0 0;
}

.caption {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 0 0;
}

.caption--on-accent {
  color: var(--on-accent);
  opacity: .72;
}

.cta-note {
  font-size: .86rem;
  color: var(--muted);
  margin: 10px 0 0 0;
}

/* ---------- button ---------- */

.cta-row {
  margin: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  text-decoration: none;
  padding: 16px 24px;
  border: 1px solid var(--accent);
  border-radius: 2px;
}

/* Inverted so the button still reads as a plate when it sits on green. */
.btn-primary--on-accent {
  background: var(--on-accent);
  color: var(--accent);
  border-color: var(--on-accent);
}

/* ---------- hero video ---------- */

/*
 * Edge-to-edge at every width via negative gutters rather than 100vw —
 * 100vw includes the scrollbar on desktop and would create a horizontal
 * scroll of exactly the scrollbar's width.
 */
.hero-media {
  margin: 0 calc(var(--gutter) * -1) 20px;
}

.hero-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--ink);
}

/* ---------- before / after sliders ---------- */

.ba-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px calc(var(--gutter) * -1) 0;
}

.ba {
  --grab: 44px;
  /* Shared by the clip and the handle so the white line sits exactly on the
     thumb's centre at every value, including both ends of the travel. */
  --reveal: calc(var(--grab) / 2 + (100% - var(--grab)) * var(--pos) / 100);
  margin: 0;
}

.ba-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
  touch-action: pan-y;  /* vertical page scroll still works over the slider */
}

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-img--before {
  z-index: 1;
}

/* The graded frame is revealed from the left, matching the hero wipe. */
.ba-img--after {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--reveal)) 0 0);
}

.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--reveal);
  width: 2px;
  margin-left: -1px;
  background: var(--on-accent);
  z-index: 3;
  pointer-events: none;
}

.ba-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--on-accent);
  box-shadow: 0 0 0 1px var(--hair);
}

.ba-grip::before,
.ba-grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translateY(-50%);
}

.ba-grip::before {
  left: 9px;
  border-right: 6px solid var(--accent);
}

.ba-grip::after {
  right: 9px;
  border-left: 6px solid var(--accent);
}

/*
 * The range is the actual control: invisible, covering the whole frame.
 * Touch drag, mouse drag and arrow keys all come from the native element,
 * and it stays in the tab order with a real accessible name.
 */
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  background: transparent;
  border: 0;
  z-index: 4;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}

.ba-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--grab);
  height: 900px;  /* taller than any stage, clipped by the stage's overflow */
  border: 0;
}

.ba-range::-moz-range-thumb {
  width: var(--grab);
  height: 900px;
  border: 0;
  border-radius: 0;
}

.ba-stage:has(.ba-range:focus-visible) .ba-grip {
  box-shadow: 0 0 0 3px var(--accent);
}

/* ---------- what's inside ---------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.card {
  border: 1px solid var(--hair);
  padding: 22px 20px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0 0 8px 0;
}

.card-format {
  color: var(--muted);
  margin: 0 0 12px 0;
}

.card-text {
  font-size: .98rem;
  line-height: 1.6;
  margin: 0;
  max-width: 34ch;
}

/* ---------- install tabs ---------- */

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.tab {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 2px;
  padding: 11px 13px;
  cursor: pointer;
  line-height: 1;
}

.tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.panel {
  padding-top: 18px;
}

.panel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.steps {
  margin: 0;
  padding-left: 1.2em;
  max-width: 44ch;
}

.steps li {
  font-size: .98rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.steps li:last-child {
  margin-bottom: 0;
}

/* ---------- closing plate ---------- */

.closing .display-heading {
  margin-bottom: 22px;
}

/* ---------- sticky CTA ---------- */

/*
 * Instagram's in-app browser ends the viewport above its own toolbar, so the
 * safe-area inset plus 14px is what keeps the button clear of it.
 */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--bg);
  border-top: 1px solid var(--hair);
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.sticky-cta.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.sticky-cta .btn-primary {
  width: 100%;
}

/* ---------- tablet / desktop ---------- */

@media (min-width: 768px) {
  :root {
    --gutter: 40px;
  }

  .section {
    padding: 80px var(--gutter);
  }

  .hero {
    padding-top: 32px;
    padding-bottom: 56px;
  }

  .rail-block {
    padding: 16px var(--gutter);
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  /* The sliders get gutters back and stop growing past a readable width. */
  .ba-list {
    margin: 32px 0 0;
    max-width: var(--content-max);
    gap: 18px;
  }

  .sticky-cta .btn-primary {
    width: auto;
  }

  .sticky-cta {
    display: flex;
    justify-content: flex-end;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
