/* =========================================================================
   Natural Cycles — app-install landing page
   Page-local styles. Only the tokens this page actually uses are kept here
   (pruned from the full NC design-system sheet). Values match the official
   palette / radii / shadows.
   ========================================================================= */

/* Webfonts — Open Sauce One, self-hosted from /fonts (OTF).
   Weights used across the page: Regular 400, Medium 500, Bold 700, ExtraBold 800. */
@font-face {
  font-family: 'Open Sauce One';
  font-weight: 400;
  font-style: normal;
  src: url('/fonts/OpenSauceOne-Regular.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Open Sauce One';
  font-weight: 500;
  font-style: normal;
  src: url('/fonts/OpenSauceOne-Medium.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Open Sauce One';
  font-weight: 700;
  font-style: normal;
  src: url('/fonts/OpenSauceOne-Bold.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Open Sauce One';
  font-weight: 800;
  font-style: normal;
  src: url('/fonts/OpenSauceOne-ExtraBold.otf') format('opentype');
  font-display: swap;
}

:root {
  --font: 'Open Sauce One', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --nc-ink: #1a1a1a; /* body text, titles */
  --nc-ink-2: #5f5f5f; /* secondary text */
  --nc-ink-3: #757575; /* tertiary text */
  --nc-plum: #72035d; /* brand mark, accents */
  --nc-surface: #ffffff;
  --nc-bg: #f3eeee; /* warm sand page bg */
  --nc-line: #dedede;
  --nc-line-2: #a3a3a3;

  --nc-r-md: 12px;
  --nc-r-lg: 20px;
  --nc-shadow-lg: 0 8px 24px rgba(26, 26, 26, 0.06), 0 1px 3px rgba(26, 26, 26, 0.03);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font);
  line-height: 1.5;
  color: var(--nc-ink);
  background: var(--nc-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
}
img {
  display: block;
}

/* ---- logo (sits just above the headline, part of the hero group) ---- */
.lp-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 20px;
}
.lp-bar img {
  height: 28px;
  width: auto;
}
.lp-logo {
  font-family: var(--font);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--nc-ink);
}

/* ---- hero ---- */
.hero {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px clamp(20px, 5vw, 64px) 40px;
}
.hero__inner {
  width: 100%;
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* mobile/base single-column order: headline → sub → store box → video → trust */
.hero h1 {
  order: 1;
}
.hero .sub {
  order: 2;
}
.download {
  order: 3;
}
.media-wrap {
  order: 4;
}
.trust {
  order: 5;
}

.hero h1 {
  font-family: var(--font);
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--nc-ink);
  margin: 0 0 14px;
  text-wrap: balance;
}
/* rotating last word of the h1 */
.hero h1 .rotator {
  display: inline-block;
  color: var(--nc-plum);
  text-align: left;
  transition:
    opacity 0.32s ease,
    transform 0.32s ease;
}
.hero h1 .rotator.is-out {
  opacity: 0;
  transform: translateY(-0.25em);
}
.hero .sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--nc-ink-2);
  margin: 0 auto;
  max-width: 28em;
}
/* small screens: sits in normal flow under the content */
.trust {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--nc-ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  justify-content: center;
}
.trust .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--nc-line-2);
}

/* ---- media (square animation) ---- */
.media-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto 0;
  --media-w: 300px;
  overflow: hidden;
}
.media-card {
  width: var(--media-w);
  aspect-ratio: 1;
  flex: 0 0 auto;
}
.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin-top: -2px;
}
/* (wide-screen size + placement handled by the two-column grid below) */

/* ============================================================
   DOWNLOAD BLOCK — store badges + QR (floating card)
   ============================================================ */
.download {
  margin-top: 32px;
  background: var(--nc-surface);
  border-radius: var(--nc-r-lg);
  box-shadow: var(--nc-shadow-lg);
  padding: 16px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.download__label {
  font-size: 17px;
  font-weight: 800;
  color: var(--nc-ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* one store badge.
   Default (mobile): fixed 160px wide each; wrap onto separate rows when two
   no longer fit side by side.
   Desktop (below): equal HEIGHT — both official badges sized by height, widths
   left to each badge's natural aspect (the Apple/Google convention). */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  /* fixed 160px wide; wraps to its own row when two no longer fit */
  flex: 0 0 160px;
  width: 160px;
  box-sizing: border-box;
  border-radius: 10px;
  transition:
    transform 0.14s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.badge img {
  width: 100%;
  height: auto;
  display: block;
}
.badge:hover {
  transform: translateY(-2px);
}
.badge:active {
  transform: translateY(0);
}
.badge:focus-visible {
  outline: 2px solid var(--nc-plum);
  outline-offset: 3px;
}

/* PRIMARY (detected store) — official artwork; clip to a uniform radius so both
   stores' baked-in corners match, with a soft lift */
.badge.is-primary {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(60, 30, 55, 0.14);
}
.badge.is-primary:hover {
  box-shadow: 0 10px 22px rgba(60, 30, 55, 0.18);
}

/* SECONDARY (other store) — subtle outlined glyph + text, ~3:1 to match a badge */
.badge--outline {
  gap: 11px;
  aspect-ratio: 3 / 1;
  padding: 0 14px;
  border: 1.5px solid var(--nc-line);
  border-radius: 10px;
  color: var(--nc-ink-3);
  background: transparent;
}
.badge--outline svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: currentColor;
}
.badge--outline .b-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
  white-space: nowrap;
}
.badge--outline .b-top {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.badge--outline .b-bot {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 1px;
  color: var(--nc-ink-2);
}
.badge--outline:hover {
  border-color: var(--nc-line-2);
  color: var(--nc-ink-2);
}

/* QR (desktop only) */
.qr {
  display: none;
  align-items: center;
  gap: 14px;
  margin: 14px auto 0;
  padding: 12px 16px 12px 12px;
  background: var(--nc-bg);
  border: 1px solid var(--nc-line);
  border-radius: var(--nc-r-md);
  width: fit-content;
}
.qr__img {
  width: 78px;
  height: 78px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--nc-line);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.qr__img img {
  width: 100%;
  height: 100%;
}
.qr__txt {
  max-width: 200px;
}
.qr__txt strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--nc-ink);
}
.qr__txt span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--nc-ink-3);
}

/* platform-driven: the QR is a desktop affordance (scanned with a phone) */
body[data-platform='desktop'] .qr {
  display: flex;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* wide views: two columns (content left, video right) + pinned trust strip.
   Everything here is viewport-driven — no dependency on the detected platform. */
@media (min-width: 861px) {
  /* fill the viewport so the whole group (logo → headline → columns) centers */
  .hero {
    min-height: 100vh;
    padding-bottom: 64px;
  }

  .hero__inner {
    max-width: 1040px;
    display: grid;
    grid-template-columns: auto auto; /* each column hugs its content … */
    justify-content: center; /* … and the pair is centered together */
    column-gap: clamp(28px, 3.5vw, 64px);
    row-gap: clamp(20px, 3vw, 36px);
    align-items: center;
  }
  /* logo, then headline + sub, all centered across the top */
  .lp-bar {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
  }
  .hero h1 {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    text-align: center;
  }
  .hero .sub {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0 auto;
    text-align: center;
  }
  /* download left, larger video right, both pulled toward the center */
  .download {
    grid-column: 1;
    grid-row: 4;
    margin: 0;
  }
  .media-wrap {
    grid-column: 2;
    grid-row: 4;
    margin: 0;
    --media-w: 520px;
  }

  /* store badges: equal HEIGHT, natural widths (Apple/Google convention) */
  .badge {
    flex: 0 0 auto;
    width: auto;
  }
  .badge img {
    height: 48px;
    width: auto;
  }

  /* trust strip pinned to the bottom of the screen */
  .trust {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    margin: 0;
    padding: 13px clamp(20px, 5vw, 64px);
    background: var(--nc-bg);
  }
}

@media (max-width: 860px) {
  /* cap the square video at 50% of viewport height on mobile (width == height) */
  .media-wrap {
    --media-w: min(260px, 50vh);
  }
  .hero h1 {
    font-size: clamp(28px, 8vw, 36px);
  }
}

@media (max-width: 520px) {
  .lp-bar {
    padding: 18px 20px;
  }
  .hero {
    padding-left: 20px;
    padding-right: 20px;
  }
  .download {
    align-self: stretch;
  }
}
