/* Repkind landing page. Editorial layout: a full-bleed photographic hero with
   condensed display type over it, then light sections so the app's own light
   UI screenshots sit naturally. */
:root {
  --cyan: #1ecde8;
  --ink: #0d1116;
  --muted: #5d6b76;
  --paper: #f4f7f9;
  --white: #fff;
  --line: #e2e9ee;
  --max: 1180px;
  /* Page colours. --ink and --white stay fixed for the always-dark parts
     (hero, marquee, the final call to action); these follow the theme. */
  --bg: var(--paper);
  --surface: #fff;
  --text: #0d1116;
  --shot-shadow: rgba(13, 17, 22, 0.16);
  color-scheme: light;
}

/* Dark: the system setting, unless the visitor chose with the switch. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080d12;
    --surface: #111820;
    --text: #eef2f5;
    --muted: #9aa7b1;
    --line: #1e2a33;
    --shot-shadow: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080d12;
  --surface: #111820;
  --text: #eef2f5;
  --muted: #9aa7b1;
  --line: #1e2a33;
  --shot-shadow: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Display type: Inter, tight and heavy, like the app. */
.display,
h1,
.get h2 {
  font-family: Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  /* The fixed bar (and the white strip) overlays the top of this; the copy
     stays clear of it. */
  padding-top: 112px;
  display: flex;
  flex-direction: column;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 10, 14, 0.72) 0%, rgba(6, 10, 14, 0.3) 38%, rgba(6, 10, 14, 0.86) 100%),
    radial-gradient(70% 60% at 50% 45%, rgba(6, 10, 14, 0.1), rgba(6, 10, 14, 0.62));
}

/* Fixed rather than sticky: it starts life on top of the hero photograph, so
   it has to overlay rather than occupy space. */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  /* It used to inherit this from .hero. Outside it, the links would be ink on
     a dark photograph. */
  color: var(--white);
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

/* White announcement strip on top of the bar: straight to the store on a
   phone, to the store buttons on a computer. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  background: #ffffff;
  color: #0b1015;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
}
.topbar:hover {
  background: #eef2f5;
}
.topbar-short {
  display: none;
}
@media (max-width: 520px) {
  .topbar {
    font-size: 11.5px;
    letter-spacing: 0.08em;
  }
  .topbar-full {
    display: none;
  }
  .topbar-short {
    display: inline;
  }
}

.navbar.solid {
  background: rgba(10, 14, 18, 0.9);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Anchored sections would otherwise land underneath the fixed bar. */
#top,
#how,
#features,
#support,
#get {
  scroll-margin-top: 128px;
}

.nav {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: Inter, sans-serif;
  font-weight: 700;
  letter-spacing: 0.24em;
  font-size: 1.05rem;
  text-transform: uppercase;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

/* The mark is decorative beside the wordmark, so it carries no alt text and
   the link still reads as "Repkind". */
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 34px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

/* The text is only 20px tall, so a thumb aiming at it landed on the hero
   instead and nothing happened. The link keeps its size; its hit area grows to
   the 44px both platforms ask for, and the nav loses the matching padding so
   the bar stays the same height. */
.nav-links a,
footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-links a:hover {
  color: var(--cyan);
}

.pill {
  flex-shrink: 0;
  background: var(--white);
  color: var(--ink);
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  transition: background 0.15s ease;
}

.pill:hover {
  background: var(--cyan);
}

.hero-copy {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 26px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 26px;
}

h1 {
  display: flex;
  flex-direction: column;
  font-size: clamp(2.6rem, 8.2vw, 6.6rem);
  line-height: 1;
}

h1 .thin {
  font-weight: 300;
  letter-spacing: -0.02em;
}

h1 .fat {
  font-weight: 800;
  color: #e7ecef;
  margin-top: 0.02em;
}

.hero-copy p {
  max-width: 48ch;
  color: #dbe3e8;
  font-size: 1.04rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  color: var(--ink);
  padding: 17px 34px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  transition: background 0.15s ease, transform 0.15s ease;
}

.cta:hover {
  background: var(--cyan);
  transform: translateY(-1px);
}

.cta .arrow {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 0.8rem;
}

.cta.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.cta.ghost:hover {
  background: var(--ink);
  color: var(--white);
}

.scroll-hint {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 22px;
  font-size: 1.6rem;
  color: #cbd5dc;
}

/* ---------- marquee ---------- */
.marquee-clip {
  overflow-x: clip;
  overflow-y: visible;
}

.marquee-wrap {
  background: var(--ink);
  transform: rotate(-2.2deg) scale(1.05);
  margin: -34px 0 44px;
  padding: 14px 0;
  overflow: hidden;
}

.marquee {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  animation: slide 34s linear infinite;
}

.marquee span {
  font-family: Inter, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  color: var(--white);
  text-transform: uppercase;
}

@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- strip ---------- */
.strip {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 26px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.strip div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 22px;
}

.strip strong {
  display: block;
  font-family: Inter, sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 18px !important;
}

/* ---------- steps ---------- */
.how {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 26px;
}

.how h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 46px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.steps li {
  border-top: 2px solid var(--text);
  padding-top: 20px;
}

.num {
  font-family: Inter, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.steps h3 {
  margin: 12px 0 8px;
  font-size: 1.16rem;
  font-weight: 600;
}

.steps p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- features ---------- */
.features {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 26px 40px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 64px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.feature.reverse {
  direction: rtl;
}

.feature.reverse > * {
  direction: ltr;
}

.feature h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.feature > .feature-copy > p {
  color: var(--muted);
}

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

.ticks li {
  position: relative;
  padding-left: 30px;
  font-size: 0.98rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 16px;
  height: 2px;
  background: var(--cyan);
}

/* The screenshot sits straight on the page: no card or tint behind it. */
.shot {
  margin: 0;
  display: flex;
  justify-content: center;
}

.shot img {
  width: 260px;
  /* The width/height attributes reserve the space before the lazy image
     loads, so "Get the app" lands on the right spot. */
  height: auto;
  border-radius: 22px;
  box-shadow: 0 22px 50px var(--shot-shadow);
}

/* The app film sits on a full-width band in the film's own background colour,
   so the video has no visible edges. The band stays dark in both themes
   because the film's words are white. */
.film {
  max-width: none;
  padding: 0 26px;
  background: #0b1014;
  color: #eef2f5;
}

.film .feature {
  max-width: calc(var(--max) - 52px);
  margin: 0 auto;
  border-top: 0;
}

.film .feature > .feature-copy > p,
.film .eyebrow {
  color: #9aa7b1;
}

.film video {
  display: block;
  width: 340px;
  max-width: 100%;
  height: auto;
  background: #0b1014;
}

/* ---------- privacy note ---------- */
.privacy-note {
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 26px 80px;
  text-align: center;
}

.privacy-note h2 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.privacy-note p {
  color: var(--muted);
  margin-top: 14px !important;
}

.privacy-note a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- support ---------- */
.support {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 26px 80px;
  text-align: center;
}

.support h2 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.support p {
  color: var(--muted);
  margin-top: 14px !important;
}

.support p a,
.support strong {
  color: var(--text);
}

.support p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Flat outlined links, no fill: they sit on the page, not above it. */
.support-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.support-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.support-links a:hover {
  border-color: var(--cyan);
}

/* ---------- final cta ---------- */
.get {
  max-width: var(--max);
  margin: 0 auto 90px;
  padding: 78px 26px;
  text-align: center;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 34px;
}

.get img {
  margin: 0 auto 24px;
  border-radius: 20px;
}

.get h2 {
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  font-weight: 800;
  font-weight: 700;
}

.get p {
  color: #b7c2cb;
  margin-top: 14px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

.get .cta.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.get .cta.ghost:hover {
  background: var(--white);
  color: var(--ink);
}

/* Set by the inline script in the head. Unset (no JS, or an unrecognised
   device) leaves both buttons visible, which is the safe default. */
html[data-platform="ios"] .store-android,
html[data-platform="android"] .store-ios {
  display: none;
}

/* ---------- footer ---------- */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 26px 60px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

footer nav {
  display: flex;
  gap: 22px;
  margin: -12px 0;
}

footer nav a:hover {
  color: var(--text);
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature,
  .feature.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 34px;
  }

  .feature figure {
    order: -1;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .nav {
    padding: 6px 16px;
  }

  .hero {
    padding-top: 56px;
  }

  #top,
  #how,
  #features,
  #support,
  #get {
    scroll-margin-top: 68px;
  }

  /* Brand plus links plus the CTA overflow a phone width and pushed the CTA
     off-screen. The header keeps the logo and the CTA; the privacy link is
     still one tap away in the footer, which satisfies the legal requirement. */
  .nav-links {
    display: none;
  }

  /* A phone header has no room for a desktop-sized button. Kept at 36px
     tall: smaller than the 44px ideal, but it is the only control on that
     side of the bar, so there is nothing next to it to mis-tap. */
  .pill {
    padding: 10px 15px;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }

  .brand {
    letter-spacing: 0.16em;
    font-size: 0.95rem;
  }

  .hero-copy {
    padding: 0 16px 60px;
  }

  .strip,
  .how,
  .features,
  .privacy-note,
  .support,
  footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Four full-width white boxes read as filler on a phone. One dark panel
     with a 2x2 grid keeps the numbers together and echoes the hero. */
  .strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    background: var(--ink);
    border-radius: 24px;
    margin: 0 16px;
    padding: 6px;
  }

  .strip div {
    background: transparent;
    border: 0;
    border-radius: 18px;
    padding: 20px 16px;
  }

  .strip div:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .strip div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .strip strong {
    font-size: 2rem;
    color: var(--cyan);
  }

  .strip span {
    color: #b7c2cb;
    font-size: 0.86rem;
    margin-top: 6px;
  }

  .how {
    padding-top: 64px;
  }

  .how h2 {
    margin-bottom: 30px;
  }

  /* On desktop the steps are four columns under hairlines. Stacked, that
     became a run of ruled paragraphs. A timeline gives the stack a shape. */
  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .steps li {
    position: relative;
    border-top: 0;
    padding: 0 0 30px 58px;
  }

  .steps li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 40px;
    bottom: 0;
    width: 2px;
    background: var(--line);
  }

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

  .steps li:last-child::before {
    display: none;
  }

  .num {
    position: absolute;
    left: 0;
    top: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--white);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }

  .steps h3 {
    margin: 8px 0 6px;
    font-size: 1.12rem;
  }

  .get {
    border-radius: 24px;
    padding: 56px 20px;
  }

  .cta-row .cta {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ---------- phone hero: two films in a swipe track ---------- */
.hero-reel {
  display: none;
}

@media (max-width: 680px) {
  /* The films carry their own words, so the headline moves under them
     instead of sitting on top. */
  .hero {
    /* Room for the white strip; the bar's logo still sits over the film. */
    padding-top: 40px;
    min-height: 0;
    background: #0b1015;
  }

  .hero-bg,
  .hero-scrim,
  .scroll-hint {
    display: none;
  }

  .hero-reel {
    display: block;
    position: relative;
    height: 100svh;
    background: #0b1015;
  }

  /* Keeps the logo and the button in the bar readable over bright footage. */
  .hero-reel::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0 0 auto;
    height: 120px;
    background: linear-gradient(180deg, rgba(11, 16, 21, 0.6), rgba(11, 16, 21, 0));
    pointer-events: none;
  }

  .reel-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .reel-track::-webkit-scrollbar {
    display: none;
  }

  .reel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .reel-slide video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0b1015;
  }

  .hero-copy {
    padding: 44px 16px 56px;
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee {
    animation: none;
  }

  .cta:hover {
    transform: none;
  }
}

/* ---------- theme ---------- */
/* Each screenshot comes in a light and a dark version; show the one that
   matches the page. */
.shot .dark-shot {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot .light-shot {
    display: none;
  }
  :root:not([data-theme="light"]) .shot .dark-shot {
    display: block;
  }
}
:root[data-theme="dark"] .shot .light-shot {
  display: none;
}
:root[data-theme="dark"] .shot .dark-shot {
  display: block;
}

.theme-toggle {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s ease;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .moon,
:root[data-theme="dark"] .theme-toggle .sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .moon {
  display: block;
}
.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Document pages sit on the page colour, not the dark hero, so the switch
   takes the page's own text and hairline colours. */
.doc .theme-toggle {
  border-color: var(--line);
  color: var(--text);
}
.doc .theme-toggle:hover {
  background: var(--line);
}
.doc-nav .nav-end {
  gap: 14px;
}

/* Unsubscribe page: the one form on the site, posting to the email function. */
.unsub-form { margin-top: 24px; }
.unsub-btn {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  background: #1ecde8;
  color: #111820;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
}
.unsub-note { margin-top: 28px; }

