/* ============================================================
   THE APP — International Typographic Style (Swiss)
   ------------------------------------------------------------
   Same grid, gutter and type scale as the rest of the site.

   The old file was mostly dead: `.promo-section`, `.check-the-
   new-app`, `.video-wrapper`, `.promo-video`, `.overlay` and the
   `.btn-*` set all belonged to a promo video that now lives in
   PromoVideo.module.css and renders on the homepage. It also set
   a page-specific photograph on `.video-background-container`,
   a class shared with four other pages.
   ============================================================ */

/* Preflight is off in this project, so border-box is not the default. */
.app-hero,
.app-hero *,
.app-body,
.app-body * {
  box-sizing: border-box;
}

.app-hero,
.app-body {
  --ap-ink: #000;
  --ap-paper: #fff;
  --ap-accent: #ff820d;
  --ap-muted: #5c5c5c;
  --ap-rule: #d8d8d8;
  --ap-rule-strong: #000;

  --ap-gutter: clamp(1.25rem, 5vw, 6rem);
  --ap-max: 1440px;

  font-family: 'Sofia Pro', sans-serif;
}

/* ============================================================
   Hero
   ============================================================ */
.app-hero {
  position: relative;
  width: 100%;
  min-height: min(82svh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: #1b1b1b;
}

.app-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  /* Top-anchored like every other hero: a centred crop takes the tops of
     heads off a photograph of people. */
  background-position: center top;
  background-repeat: no-repeat;
}

.app-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.86) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    rgba(0, 0, 0, 0.28) 100%
  );
}

.app-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--ap-max);
  margin: 0 auto;
  padding: 0 var(--ap-gutter) clamp(3rem, 8vh, 6rem);
}

.app-hero__overline {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 clamp(1rem, 2vw, 1.75rem);
  color: var(--ap-accent);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.app-hero__overline::before {
  content: "";
  width: clamp(2.5rem, 6vw, 5rem);
  height: 2px;
  background: var(--ap-accent);
  flex: none;
}

.app-hero__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

/* The old lead was centred at 4vh. Flush left on a measure, with a rule
   above it, matches the hero on every other page. */
.app-hero__lead {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  font-weight: 300;
  line-height: 1.5;
  max-width: 46ch;
}

.app-hero__cta {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding: 1rem 2.25rem;

  background: var(--ap-accent);
  border: 0;
  border-radius: 0;
  color: #000;

  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter .15s ease;
}

.app-hero__cta:hover {
  filter: brightness(1.06);
}

.app-hero__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ============================================================
   Body — what the app does, beside the thing that installs it

   The page used to be a title, one sentence, and a bare download
   widget floating on 20vh of air. It never said what the app was
   for.
   ============================================================ */
.app-body {
  width: 100%;                      /* was 100vw */
  background: var(--ap-paper);
  color: var(--ap-ink);
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3.5rem, 7vw, 6rem);
  scroll-margin-top: clamp(5rem, 12vh, 7rem);
}

.app-body__grid {
  max-width: var(--ap-max);
  margin: 0 auto;
  padding-inline: var(--ap-gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

.app-body__features {
  grid-column: 1 / span 6;
  min-width: 0;
}

.app-body__download {
  grid-column: 8 / span 5;
  min-width: 0;

  /* Stays beside the list while it scrolls past. */
  position: sticky;
  top: clamp(6rem, 14vh, 8rem);
}

.app-body__features,
.app-body__download {
  border-top: 2px solid var(--ap-rule-strong);
  padding-top: clamp(0.9rem, 1.6vw, 1.25rem);
}

.app-body__label {
  margin: 0 0 clamp(1.25rem, 2.5vw, 2rem);
  color: var(--ap-muted);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.app-body__title {
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.app-body__download-title {
  margin: 0 0 clamp(1.25rem, 2.5vw, 1.75rem);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------
   Numbered list, like the Plan Your Visit notes
   ------------------------------------------------------------ */
.app-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-feature {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 2vw, 1.75rem);
  padding: clamp(1rem, 2vw, 1.4rem) 0;
  border-top: 1px solid var(--ap-rule);
}

.app-feature:last-child {
  border-bottom: 1px solid var(--ap-rule);
}

.app-feature__num {
  flex: none;
  color: var(--ap-accent);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

.app-feature__body {
  display: block;
  min-width: 0;
}

.app-feature__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.app-feature__text {
  display: block;
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ap-ink);
  max-width: 46ch;
}

/* Subsplash owns what is inside; this only frames it and stops it forcing
   the page wider than the viewport. */
.app-body__frame {
  border: 1px solid var(--ap-rule);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.app-body__frame > div {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

/* ============================================================
   Responsive
   ============================================================ */
@media screen and (max-width: 1024px) {

  .app-body__features,
  .app-body__download {
    grid-column: 1 / -1;
  }

  /* Sticky is for a column standing beside something. */
  .app-body__download {
    position: static;
  }
}

@media screen and (max-width: 620px) {

  /* Sized to its label, not stretched across the screen: the hero's
     overline, title and lead all begin on the gutter, and a button
     spanning the full measure is the only thing that would not. */
  .app-hero__cta {
    width: auto;
    align-self: flex-start;
  }

  .app-hero__lead,
  .app-feature__text {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-hero__cta {
    transition: none;
  }
}
