/* ============================================================
   Catchup — app.spencer.st
   Built to the Oct 2026 vibe: warm paper, ink type, and one
   golden colour reserved for saying yes. Tokens live in
   colors_and_type.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s-4);
}

:focus-visible {
  outline: 2px solid var(--golden);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* Sentence-case label above a heading. */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg-3);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;        /* Regular and Medium only — never heavier. */
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

/* ── Masthead ──────────────────────────────────────────────── */

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-h3);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

/* ── Hero ──────────────────────────────────────────────────── */

/* A full-bleed photo with the masthead and headline over it (after
   AllTrails). The shade is darkest at the bottom, where the words are. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: min(92vh, 860px);
  color: var(--p-white);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  opacity: 0;
}

/* Without script the first frame is simply the hero image. */
.hero-media img:first-child { opacity: 1; }

.hero-media.is-live img {
  opacity: 0;
  transition: opacity 1200ms ease-in-out;
}

.hero-media.is-live img.is-on { opacity: 1; }

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

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Two gradients: one up from the base, one in from the left. The left one
     is what lets a bright frame — the party, the hike — carry white copy
     without washing it out. */
  background:
    linear-gradient(to right,
      rgba(12,10,12,0.78) 0%, rgba(12,10,12,0.55) 32%,
      rgba(12,10,12,0.12) 62%, rgba(12,10,12,0) 100%),
    linear-gradient(to top,
      rgba(12,10,12,0.72) 0%, rgba(12,10,12,0.34) 45%,
      rgba(12,10,12,0.16) 75%, rgba(12,10,12,0.30) 100%);
}

.hero .brand { color: var(--p-white); }

.hero-inner {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-8);
  padding-block: var(--s-10) clamp(40px, 6vw, 72px);
}

.hero h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(44px, 6.4vw, 86px);
  line-height: 0.98;
  color: var(--p-white);
}

.hero-sub {
  max-width: 38ch;
  margin: var(--s-6) 0 0;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-snug);
  color: var(--fg-on-dark-2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-8);
}

/* The one golden thing on the page: the yes. */
.cta {
  display: inline-flex;
  align-items: center;
  padding: 15px var(--s-6);
  border-radius: var(--r-pill);
  background: var(--golden);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: var(--ls-snug);
  transition: transform 160ms ease, filter 160ms ease;
}

.cta:hover { filter: brightness(1.04); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }

/* Two routes to the same yes. Golden marks the primary one; a second gold
   button would spend the colour twice and flatten the hierarchy. */
.cta-alt {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(28,28,28,0.28);
}

.cta-alt:hover { filter: none; background: rgba(28,28,28,0.04); }

.hero .cta-alt { color: var(--p-white); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6); }
.hero .cta-alt:hover { background: rgba(255,255,255,0.12); }

.cta-meta {
  margin: var(--s-4) 0 0;
  font-family: var(--font-body);
  font-size: var(--t-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.hero .cta-meta { color: rgba(255,255,255,0.7); }

/* Scan to install — desktop only (hidden below 861px). */
/* Sits at the end of the CTA row, behind a hairline, so it reads as part of
   the same band rather than floating. Paper rather than #fff: pure white was
   the brightest thing on the page and out-shouted the button. */
.qr {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  max-width: 230px;
  margin-left: var(--s-3);
  padding-left: var(--s-5);
  border-left: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.78);
  font-size: var(--t-body-sm);
  line-height: var(--lh-snug);
}

.qr img {
  padding: 6px;
  border-radius: var(--r-sm);
  background: var(--paper);
}

.qr img { width: 76px; height: 76px; }

/* ── Features ──────────────────────────────────────────────── */

/* One row per screen: a few words, then the phone; sides alternate. */
.features { padding-block: clamp(56px, 8vw, 112px) clamp(24px, 4vw, 48px); }

.features-h {
  margin: var(--s-4) 0 clamp(24px, 4vw, 40px);
  max-width: 20ch;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.06;
}

.feature {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(28px, 4vw, 56px);
  border-top: 1px solid rgba(28,28,28,0.12);
}

/* No rule under the hero: "Anyone keen?" flows straight into "Float an idea". */
.feature:first-of-type { border-top: 0; }

.feature:nth-of-type(even) .feature-copy { order: 2; }

.feature h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.feature p {
  max-width: 34ch;
  margin: var(--s-4) 0 0;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-snug);
  color: var(--fg-2);
}

.feature .phone { justify-self: center; width: min(100%, 300px); }

/* Device mockups on transparency: the frame comes from the image. */
.phone { margin: 0; }

/* The ratio is the image's, so the box holds its place before it loads. */
.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 2198;
}

/* ── Is / isn't ────────────────────────────────────────────── */

.isnt { padding-bottom: clamp(48px, 7vw, 88px); }

.isnt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}

.card {
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-xl);
}

.card ul { margin: var(--s-4) 0 0; padding: 0; list-style: none; }

.card li {
  position: relative;
  padding: 7px 0 7px var(--s-6);
  font-size: 16px;
  line-height: var(--lh-snug);
}

.card li::before {
  position: absolute;
  left: 0;
  top: 7px;                      /* = the li's padding-top */
  font-size: inherit;
  line-height: var(--lh-snug);   /* same line box as the text beside it */
}

/* Golden marks the yes column — the same rule as the CTA. */
.card-yes { background: var(--golden); }
.card-yes .eyebrow { color: rgba(28,28,28,0.62); }
.card-yes li { color: var(--ink); }
.card-yes li::before { content: "✓"; }

.card-no {
  background: var(--p-white);
  border: 1px solid rgba(28,28,28,0.12);
}
.card-no li { color: var(--fg-2); }
.card-no li::before { content: "✕"; color: var(--fg-4); }

/* ── Footer ────────────────────────────────────────────────── */

footer { border-top: 1px solid rgba(28,28,28,0.12); }

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  /* The extra bottom padding keeps the links off the edge once they wrap,
     and clears the home indicator on iOS. */
  padding: var(--s-6) var(--s-4) calc(var(--s-10) + env(safe-area-inset-bottom));
  font-size: var(--t-body-sm);
  letter-spacing: var(--ls-snug);
  color: var(--fg-3);
}

.foot-links { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.foot-links a { transition: color 140ms ease; }
.foot-links a:hover { color: var(--ink); }

/* The home page's footer: columns, then a bar. */
.foot-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(0, 1fr));
  gap: var(--s-8);
  padding-block: var(--s-10) var(--s-8);
}

.foot-col { display: flex; flex-direction: column; gap: var(--s-3); }
.foot-col .eyebrow { margin-bottom: var(--s-1); }
.foot-col a {
  font-size: var(--t-body-sm);
  letter-spacing: var(--ls-snug);
  color: var(--fg-2);
  transition: color 140ms ease;
}
.foot-col a:hover { color: var(--ink); }

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-5) calc(var(--s-10) + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(28,28,28,0.08);
  font-size: var(--t-body-sm);
  color: var(--fg-3);
}
.foot-bar a:hover { color: var(--ink); }

.lang {
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  font-size: var(--t-meta);
  letter-spacing: 0.04em;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero h1 { max-width: 14ch; }
  .qr { display: none; }

  .feature { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
  .feature .phone { width: min(72%, 280px); }

  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .isnt-grid { grid-template-columns: 1fr; }

  .cta { width: 100%; justify-content: center; }
  .cta-meta { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

/* ── Invite ────────────────────────────────────────────────── */

.invite { padding-bottom: clamp(48px, 7vw, 88px); }

.card-invite {
  background: var(--p-white);
  border: 1px solid rgba(28,28,28,0.12);
  text-align: center;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
}

.card-invite h2 {
  margin: var(--s-3) auto var(--s-4);
  max-width: 20ch;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.06;
}

.card-invite p {
  max-width: 52ch;
  margin: 0 auto var(--s-6);
  font-size: 16px;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-snug);
  color: var(--fg-2);
}

/* A button, not a link, so it needs the type reset a link does not. */
button.cta {
  border: 0;
  font-family: var(--font-ui);
  cursor: pointer;
}

button.cta:disabled { cursor: default; opacity: 1; }

/* ── Store marks ───────────────────────────────────────────── */

.store-mark {
  width: 18px;
  height: 18px;
  flex: none;
  margin-right: 1px;
}

.cta { gap: var(--s-2); }

/* ── Store badges ──────────────────────────────────────────── */

/* Apple's artwork is the pill itself (119.664 x 40, no padding). Google's
   646 x 250 PNG holds a 564 x 168 pill inset by 41px, so matching the file
   heights leaves its pill 33% short. Scale Google by 250/168 and crop the
   41px back off, and the two pills end up identical. */
.cta-row { --badge-h: clamp(48px, 4.8vw, 60px); }

/* No border-radius or overflow here: both badges ship with their own
   rounded corners, and clipping them crops the ends — which reads as the
   badge being too narrow. */
.badge {
  display: inline-flex;
  transition: opacity 140ms ease, transform 140ms ease;
}

.badge img { display: block; width: auto; }

.badge[data-ios] img { height: var(--badge-h); }

.badge[data-android] img {
  height: calc(var(--badge-h) * 1.488);
  margin: calc(var(--badge-h) * -0.244);
}

.badge:hover { opacity: 0.88; transform: translateY(-1px); }
.badge:active { transform: translateY(0); }

/* ── Instagram ─────────────────────────────────────────────── */

.ig-link { display: inline-flex; align-items: center; gap: var(--s-2); }
.ig { width: 16px; height: 16px; flex: none; }

/* ── Scroll reveal ─────────────────────────────────────────── */

/* The .reveal class is added by script, so without JavaScript nothing is
   hidden and the page reads normally. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms cubic-bezier(.22,.61,.36,1),
              transform 620ms cubic-bezier(.22,.61,.36,1);
}

.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* Staggered children, for rows of cards. */
.js-reveal .reveal[data-delay="1"] { transition-delay: 90ms; }
.js-reveal .reveal[data-delay="2"] { transition-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* Hero sub: "and see who's in." always sits on its own line, never an orphaned "in." */
.hero-sub { text-wrap: balance; }

/* ── Masthead Instagram ────────────────────────────────────── */

/* Desktop only. On a phone the brand sits alone and nothing is expected
   beside it, and the badges are a few centimetres below anyway. */
.top-ig {
  display: none;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  letter-spacing: var(--ls-snug);
  color: rgba(255,255,255,0.86);
  transition: color 140ms ease;
}

.top-ig:hover { color: var(--p-white); }
.top-ig .ig { width: 17px; height: 17px; flex: none; }

@media (min-width: 861px) {
  .top-ig { display: inline-flex; }
}
