/* Stanza Lift — website. Mobile first, in the manner of a product page: black, big type, 3D. */
:root {
  --black: #000;
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --ink-3: #6e6e73;
  --pine: #7fc4a3;
  --pine-hi: #a6e3c5;
  --paper: #f5f5f7;
  --paper-ink: #1d1d1f;
  --paper-ink-2: #6e6e73;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: 24px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font: 17px/1.47 var(--font);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
img {
  display: block;
  max-width: 100%;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(env(safe-area-inset-top) + 52px);
  padding: env(safe-area-inset-top) var(--gutter) 0;
}
/* the frosted bar is its own layer, always there and only faded in: switching the blur on and off
   (or fading the bar itself) makes Safari flash it on the first scroll */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(0 0 0 / 0.66);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  box-shadow: 0 0.5px 0 rgb(255 255 255 / 0.1);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.nav.solid::before {
  opacity: 1;
}
.nav-logo {
  animation: fade 1s ease 2.5s both;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.nav-logo svg {
  width: 22px;
  height: 22px;
  fill: var(--pine);
}
.nav-cta {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--pine);
  color: #06140d;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.5s var(--ease);
}
.nav.solid .nav-cta {
  opacity: 1;
  transform: none;
}

/* ---------- pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s ease, color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.pill:active {
  transform: scale(0.96);
}
.pill.solid {
  background: var(--pine);
  color: #06140d;
}
.pill.solid:hover {
  background: var(--pine-hi);
}
.pill.link {
  color: var(--pine);
  padding: 0 12px;
}
.pill.link span {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}
.pill.link:hover span {
  transform: translateX(3px);
}
.pill.big {
  width: 100%;
  min-height: 58px;
  font-size: 18px;
}

/* ---------- WebGL canvases; the fallbacks show only without WebGL ---------- */
.gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* its own compositing layer from the start, so fading it never re-layers (and flashes) */
  will-change: opacity, transform;
  transform: translateZ(0);
}
.gl-fallback {
  display: none;
}
.no-gl .gl {
  display: none;
}
.no-gl .gl-fallback {
  display: block;
}

/* ---------- 1. hero ---------- */
.hero {
  position: relative;
  /* locked to the screen height at load (main.js), so the browser bars collapsing doesn't resize it */
  min-height: var(--hero-h, 100svh);
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 52px) var(--gutter) calc(env(safe-area-inset-bottom) + 64px);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  /* a pine light from below the blocks */
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 140vw;
  max-width: 1100px;
  aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgb(127 196 163 / 0.2), rgb(127 196 163 / 0.05) 55%, transparent);
  pointer-events: none;
  animation: glow-in 2.4s var(--ease) 0.1s both;
}
@keyframes glow-in {
  from {
    opacity: 0;
  }
}
/* the blocks take whatever height the text leaves, so they never sit on the headline */
.hero-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
  margin: 0 calc(-1 * var(--gutter)) 8px;
}
.mark-fallback {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46%;
  max-width: 260px;
  fill: var(--pine);
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero-title {
  font-size: clamp(64px, 20vw, 140px);
  letter-spacing: -0.055em;
  /* tight, but the lines' boxes must not overlap: the last word repaints for its sheen, and would
     flicker over the g and comma of the line above */
  line-height: 1.02;
}
/* each word's box holds its descenders (g, p, comma), and the first line sits above the second */
.hero-title .w {
  position: relative;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.hero-title .w {
  z-index: 1;
}
.hero-title br ~ .w {
  z-index: 0;
}
.hero-sub {
  max-width: 22ch;
  margin: 18px auto 0;
  color: var(--ink-2);
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 28px;
  opacity: 0;
  animation: rise 1s var(--ease) 2.15s both;
}
/* the last word catches a slow pine sheen */
.hero-title .w:last-child {
  background: linear-gradient(100deg, var(--ink) 30%, var(--pine-hi) 48%, var(--pine) 52%, var(--ink) 70%) 0 0 / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* no blur on this one: Safari can't draw gradient text through a filter */
  filter: none;
  animation: word-plain 1.1s var(--ease) both, sheen 6s ease-in-out 2.4s infinite;
  animation-delay: calc(1.45s + var(--i) * 0.08s), 2.6s;
}
@keyframes word-plain {
  from {
    opacity: 0;
    transform: translateY(0.25em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sheen {
  0% {
    background-position: 100% 0;
  }
  45%,
  100% {
    background-position: 0% 0;
  }
}
/* words blur in, one after another (spans added by main.js) */
.words .w {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.25em);
  animation: word 1.1s var(--ease) both;
  animation-delay: calc(1.45s + var(--i) * 0.08s);
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  width: 22px;
  height: 34px;
  margin-left: -11px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.25);
  animation: fade 1s ease 3s both;
}
.scroll-cue i {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ink-2);
  animation: cue 1.8s var(--ease-io) infinite;
}

/* ---------- 2. statement ---------- */
.statement {
  padding: 22vh var(--gutter);
  max-width: 980px;
  margin: 0 auto;
}
.scrub {
  margin: 0;
  font-size: clamp(32px, 8.6vw, 64px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.scrub .w {
  color: var(--ink);
  opacity: 0.16;
  transition: opacity 0.35s ease;
}
.scrub .w.lit {
  opacity: 1;
}
.scrub .w.accent.lit {
  color: var(--pine);
}

/* ---------- 3. story ---------- */
.story {
  position: relative;
  /* about 1.3 screens of scrolling per step, so a quick swipe doesn't skip one */
  height: 620vh;
}
.story-sticky {
  position: sticky;
  top: 0;
  /* the screen height at load, like the hero: the browser bars coming and going mustn't resize
     the 3D phone */
  height: var(--hero-h, 100svh);
  overflow: hidden;
}
.story-captions {
  position: absolute;
  inset: calc(env(safe-area-inset-top) + 76px) var(--gutter) auto;
  z-index: 2;
  height: 210px;
  text-align: center;
}
.cap {
  position: absolute;
  inset: 0;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(16px);
  transition: opacity 0.6s ease, filter 0.6s ease, transform 0.8s var(--ease);
  pointer-events: none;
}
.cap.on {
  opacity: 1;
  filter: none;
  transform: none;
}
.cap.past {
  transform: translateY(-16px);
}
.cap-kicker {
  margin: 0 0 8px;
  color: var(--pine);
  font-size: 15px;
  font-weight: 600;
}
.cap h2 {
  font-size: clamp(34px, 9.6vw, 64px);
}
.cap p:last-child {
  max-width: 30ch;
  margin: 12px auto 0;
  color: var(--ink-2);
  font-size: 17px;
}
.story-stage {
  position: absolute;
  inset: calc(env(safe-area-inset-top) + 270px) 0 0;
}
.phone-fallback {
  position: absolute;
  left: 50%;
  top: 4%;
  width: min(62vw, 300px);
  translate: -50% 0;
  border-radius: 36px;
  box-shadow: 0 0 0 8px #2a2b2d, 0 40px 80px rgb(0 0 0 / 0.6);
}
.story-dots {
  /* phones: the captions show where you are, and the pill would sit on the phone */
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 22px);
  z-index: 2;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  translate: -50% 0;
}
.story-dots i {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.35);
  transition: width 0.5s var(--ease), background 0.3s ease;
}
.story-dots i.on {
  width: 22px;
  background: var(--ink);
}

/* ---------- 4. bento (light) ---------- */
.bento-wrap {
  background: var(--paper);
  color: var(--paper-ink);
  padding: 110px var(--gutter) 120px;
  border-radius: 32px;
}
.bento-head {
  max-width: 980px;
  margin: 0 auto 40px;
}
.kicker {
  margin: 0 0 10px;
  color: var(--pine);
  font-size: 17px;
  font-weight: 600;
}
.bento-wrap .kicker {
  color: #2f6b55;
}
.bento-head h2,
.get h2,
.faq h2 {
  font-size: clamp(40px, 11vw, 80px);
  letter-spacing: -0.045em;
}
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
  perspective: 900px;
}
.tile {
  position: relative;
  min-height: 190px;
  padding: 22px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px -12px rgb(0 0 0 / 0.12);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.tile.big,
.tile.wide {
  grid-column: 1 / -1;
}
.tile h3 {
  font-size: 21px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.tile p {
  margin: 6px 0 0;
  color: var(--paper-ink-2);
  font-size: 15px;
  line-height: 1.35;
}
.tile-label {
  margin: 0 !important;
  color: #2f6b55 !important;
  font-weight: 600;
  font-size: 15px !important;
}
.tile-num {
  margin: 4px 0 0 !important;
  font-size: clamp(88px, 28vw, 160px) !important;
  font-weight: 800;
  line-height: 1 !important;
  letter-spacing: -0.06em;
  background: linear-gradient(180deg, #1d1d1f 30%, #2f6b55);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tile-text {
  max-width: 32ch;
}
.tile-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
  border-radius: 14px;
  background: #e8f4ee;
}
.tile-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #2f6b55;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile.wide h3 {
  margin-top: 8px;
  font-size: 24px;
}
.swatches {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.swatches i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 0.08);
  transform: scale(0);
  transition: transform 0.6s var(--ease);
}
.tile.in .swatches i {
  transform: none;
}
.swatches i:nth-child(2) { transition-delay: 0.05s; }
.swatches i:nth-child(3) { transition-delay: 0.1s; }
.swatches i:nth-child(4) { transition-delay: 0.15s; }
.swatches i:nth-child(5) { transition-delay: 0.2s; }
.swatches i:nth-child(6) { transition-delay: 0.25s; }
.swatches i:nth-child(7) { transition-delay: 0.3s; }
.swatches i:nth-child(8) { transition-delay: 0.35s; }

/* ---------- 5. get the app ---------- */
.get {
  position: relative;
  padding: 120px var(--gutter) 40px;
  max-width: 640px;
  margin: 0 auto;
}
.get-glow {
  position: absolute;
  left: 50%;
  top: 60px;
  width: 520px;
  height: 520px;
  margin-left: -260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(127 196 163 / 0.14), transparent);
  pointer-events: none;
  z-index: -1;
}
.platforms {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 34px 0 14px;
  padding: 4px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
}
.platforms button {
  position: relative;
  z-index: 1;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: 600 15px var(--font);
  cursor: pointer;
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.platforms button[aria-selected="true"] {
  color: var(--black);
}
.platform-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.5s var(--ease);
}
.platforms[data-on="android"] .platform-pill {
  transform: translateX(100%);
}
.taps {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.taps[hidden] {
  display: none;
}
.taps li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 0.5px solid rgb(255 255 255 / 0.12);
}
.taps.swap li {
  animation: rise 0.55s var(--ease) both;
}
.taps.swap li:nth-child(2) { animation-delay: 0.06s; }
.taps.swap li:nth-child(3) { animation-delay: 0.12s; }
.tap-n {
  flex: none;
  width: 44px;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--pine);
}
.taps h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 21px;
  letter-spacing: -0.03em;
}
.taps p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}
.ico {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--pine);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.get-note {
  margin: 14px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
}

/* ---------- 6. faq ---------- */
.faq {
  max-width: 640px;
  margin: 0 auto;
  padding: 100px var(--gutter) 0;
}
.faq h2 {
  margin-bottom: 18px;
}
.faq details {
  border-bottom: 0.5px solid rgb(255 255 255 / 0.12);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 19px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--ink-2);
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.4s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: -6px 0 20px;
  color: var(--ink-2);
  max-width: 44ch;
}
.faq details[open] p {
  animation: rise 0.45s var(--ease) both;
}

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 110px var(--gutter) calc(env(safe-area-inset-bottom) + 44px);
  text-align: center;
}
.foot svg {
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  fill: var(--pine);
}
.foot p {
  margin: 0;
  font-weight: 600;
}
.foot-small {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 400 !important;
}

/* ---------- scroll reveals ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
.js .tile.reveal {
  transform: translateY(40px) scale(0.96);
}
.js .tile.reveal.in {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

/* ---------- keyframes ---------- */
@keyframes word {
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes cue {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  80%,
  100% {
    transform: translateY(12px);
    opacity: 0;
  }
}

/* ---------- larger screens ---------- */
@media (min-width: 820px) {
  :root {
    --gutter: 48px;
  }
  .story-captions {
    inset: 0 auto 0 max(48px, calc(50% - 520px));
    width: 42%;
    height: auto;
    text-align: left;
  }
  .cap {
    top: 50%;
    bottom: auto;
    height: max-content;
    translate: 0 -50%;
  }
  .cap p:last-child {
    margin-left: 0;
  }
  .story-stage {
    inset: 0 0 0 40%;
  }
  .story-dots {
    display: flex;
  }
  .bento {
    grid-template-columns: repeat(3, 1fr);
  }
  .tile.big {
    grid-column: span 2;
    grid-row: span 2;
  }
  .tile.wide {
    grid-column: span 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
