:root {
  --paper: #fbfbf9;
  --warm: #f1eadc;
  --download-bg: #f1f1ea;
  --ink: #1f1d19;
  --muted: rgba(31, 29, 25, 0.56);
  --soft-line: rgba(31, 29, 25, 0.1);
  --gold: #c1b393;
  --sage: #7f8b72;
  --font-primary: Outfit, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

@font-face {
  font-family: "Outfit";
  src: url("./assets/fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

#home,
#features,
#about,
#download,
#contact {
  scroll-margin-top: 88px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-primary);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

img {
  display: block;
}

.site-nav {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  padding: 10px clamp(24px, 5vw, 96px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  transition:
    color 260ms ease,
    background 260ms ease,
    backdrop-filter 260ms ease,
    opacity 260ms ease,
    transform 260ms ease;
}

.site-nav.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.site-nav.is-dark {
  color: var(--ink);
  background: var(--paper);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px rgba(31, 29, 25, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: transparent;
}

.brand-mark img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.site-nav nav a {
  padding: 6px 10px;
  border-radius: 999px;
  opacity: 0.82;
  transition: opacity 180ms ease, background 180ms ease;
}

.site-nav nav a:hover {
  opacity: 1;
  background: rgba(193, 179, 147, 0.16);
}

.site-nav nav a.is-active {
  opacity: 1;
  background: transparent;
}

.hero-panel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  scroll-snap-align: start;
}

.hero-media,
.hero-bg,
.hero-video,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-bg,
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video {
  z-index: 1;
  opacity: 0;
  transition: opacity 420ms ease;
}

.hero-media.is-video-ready .hero-video {
  opacity: 1;
}

.hero-shade {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08) 52%, rgba(0, 0, 0, 0.45)),
    rgba(0, 0, 0, 0.2);
}

.hero-copy {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: clamp(24px, 5vw, 96px);
  width: min(900px, calc(100% - 48px));
  transform: translateY(-42%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--sage);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.hero-copy h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  margin: 22px 0 42px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 17px;
  line-height: 1.45;
}

.app-store {
  width: 180px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.74);
  color: #fff;
  font-size: 21px;
  line-height: 1;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22);
  transition: transform 180ms ease, border-color 180ms ease;
}

.app-store:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.72);
}

.app-store small {
  display: block;
  margin-bottom: 4px;
  font-size: 10.5px;
}

.apple-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.hero-badges {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: clamp(28px, 5vw, 96px);
  width: 220px;
  transform: translateY(-50%);
  color: var(--gold);
  text-align: center;
}

.pro-badge {
  min-height: 128px;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.pro-badge span {
  display: block;
  font-size: 16px;
}

.pro-badge strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
}

.wheat {
  width: 40px;
  height: 52px;
  flex: 0 0 auto;
}

.wheat-right {
  width: 45px;
}

.badge-line {
  width: 106px;
  height: 1px;
  margin: 0 auto;
  background: rgba(193, 179, 147, 0.45);
}

.content-page {
  background: var(--paper);
  scroll-snap-align: start;
}

.overview-section,
.habit-section,
.quotes-section,
.cta-section {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.overview-section {
  width: 100%;
  padding: 132px 0 84px;
}

.section-title {
  max-width: 720px;
}

.section-title-center,
.quotes-heading {
  width: min(760px, calc(100% - 48px));
  max-width: none;
  margin-inline: auto;
  text-align: center;
}

.section-title h2,
.course-copy h2,
.quotes-heading h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1.14;
  font-weight: 400;
  letter-spacing: 0;
}

.section-title p,
.course-copy p,
.quotes-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.intro-stack {
  width: 100%;
  margin-top: 84px;
  display: grid;
  gap: 24px;
}

.intro-row {
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 50vw) minmax(360px, 1fr);
  gap: clamp(40px, 6.5vw, 118px);
  align-items: center;
}

.intro-row:nth-child(even) {
  grid-template-columns: minmax(360px, 1fr) minmax(0, 50vw);
}

.intro-row:nth-child(even) .intro-image {
  order: 2;
}

.intro-row:nth-child(odd) .intro-copy {
  padding-right: clamp(24px, 5vw, 96px);
}

.intro-row:nth-child(even) .intro-copy {
  justify-self: end;
  width: min(520px, calc(100% - 48px));
}

.intro-row:nth-child(3) .intro-copy {
  justify-self: start;
  width: min(520px, calc(100% - 48px));
}

.intro-row:nth-child(2) {
  transition-delay: 120ms;
}

.intro-row:nth-child(3) {
  transition-delay: 240ms;
}

.reveal-item.in-view,
.reveal-soft.in-view {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.intro-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #ded6c8;
  box-shadow: 0 34px 86px rgba(31, 29, 25, 0.12);
}

.intro-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 520ms ease, transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.intro-image img + img {
  opacity: 0;
}

.intro-image:hover img:first-child {
  opacity: 0;
}

.intro-image:hover img + img {
  opacity: 1;
}

.intro-image:hover img {
  transform: scale(1.045);
}

.intro-copy span,
.card-heading span {
  color: var(--sage);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.intro-copy h3 {
  margin: 0 0 18px;
  font-size: 32px;
  line-height: 1.18;
  font-weight: 400;
}

.intro-copy p {
  margin: 0;
  max-width: 450px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

.course-story {
  position: relative;
  height: 145vh;
  min-height: 980px;
}

.course-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
}

.course-copy {
  position: absolute;
  z-index: 4;
  top: 64px;
  left: 50%;
  width: min(740px, calc(100% - 48px));
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 240ms ease, transform 240ms ease, filter 240ms ease;
}

.course-story.is-video .course-copy {
  opacity: 1;
  filter: blur(0);
  transform: translateX(-50%);
}

.course-stage {
  position: absolute;
  inset: 0;
}

.course-phone {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 57%;
  width: min(360px, 22vw);
  transform: translate(-50%, -42%) scale(var(--phone-scale, 0.78));
  opacity: var(--phone-opacity, 0);
  filter: blur(var(--phone-blur, 18px));
  transition: filter 120ms linear;
  will-change: transform, opacity, filter;
}

.phone-shell img {
  width: 100%;
  height: auto;
}

.course-burst {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.course-tile {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--tile-size, clamp(96px, 9vw, 160px));
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  opacity: var(--tile-opacity, 0);
  filter: blur(var(--tile-blur, 16px));
  transform:
    translate(-50%, -50%)
    translate(calc(var(--x) * var(--tile-spread, 0)), calc(var(--y) * var(--tile-spread, 0)))
    scale(var(--tile-scale, 0.3));
  box-shadow: 0 22px 60px rgba(31, 29, 25, 0.12);
  transition:
    opacity 120ms linear,
    filter 120ms linear,
    transform 120ms linear;
}

.course-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-video {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(210px, 24vh, 250px);
  opacity: var(--video-opacity, 0);
  filter: blur(var(--video-blur, 18px));
  transform: scale(var(--video-scale, 0.88));
  transition: opacity 140ms linear, filter 140ms linear, transform 140ms linear;
}

.video-frame {
  position: relative;
  width: min(1200px, calc(100vw - 48px));
  height: min(650px, calc(100vh - 260px));
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 29, 25, 0.8), rgba(127, 139, 114, 0.58)),
    url("./assets/course-tile-01.jpg") center / cover;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
}

.course-video-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-pulse {
  position: absolute;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.course-story.is-video .video-pulse {
  opacity: 0;
}

.video-pulse::before {
  content: "";
  position: absolute;
  left: 29px;
  top: 23px;
  border-left: 18px solid rgba(255, 255, 255, 0.86);
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
}

.video-frame span {
  margin-top: 128px;
}

.habit-section {
  padding: 128px 0 112px;
}

.habit-features {
  margin-top: 72px;
  display: grid;
  gap: 96px;
}

.habit-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(42px, 7vw, 120px);
  align-items: center;
}

.habit-feature-reverse {
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
}

.habit-copy span {
  color: var(--sage);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.habit-copy h3 {
  margin: 0 0 20px;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 400;
}

.habit-copy p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.interactive-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
}

.card-heading {
  position: relative;
  z-index: 2;
  max-width: 390px;
}

.card-heading h3 {
  margin: 12px 0 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 400;
}

.checkin-demo,
.pet-demo {
  aspect-ratio: 860 / 672;
  background: transparent;
  box-shadow: none;
}

.checkin-scene,
.pet-scene {
  position: absolute;
  inset: 0;
}

.checkin-bg,
.pet-shelf {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.checkin-layer {
  position: absolute;
  z-index: 2;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.checkin-layer:hover,
.checkin-layer.is-previewing {
  filter: brightness(0.96);
  transform: translateY(-4px);
}

.checkin-layer img {
  width: 100%;
  height: auto;
}

.checkin-clock {
  left: 7%;
  top: 43%;
  width: 37.2%;
}

.checkin-calendar {
  left: 45%;
  top: 16%;
  width: 47.7%;
}

.checkin-book {
  left: 30%;
  top: 72%;
  width: 50%;
}

.scroll-grid {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.scroll-grid button {
  position: absolute;
  left: var(--book-x);
  top: var(--book-y);
  width: 9.7%;
  transform-origin: center;
  transition: transform 180ms ease, filter 180ms ease;
}

.scroll-grid button:hover,
.scroll-grid button.is-previewing {
  transform: translateY(-6px) scale(1.08);
}

.scroll-grid img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(31, 29, 25, 0.12));
  transition: filter 180ms ease;
}

.scroll-grid button:hover img,
.scroll-grid button.is-previewing img {
  filter: drop-shadow(0 12px 18px rgba(31, 29, 25, 0.14)) brightness(1.04);
}

.panda-friend {
  position: absolute;
  z-index: 4;
  right: -2%;
  bottom: -2%;
  width: 50%;
}

.floating-preview {
  position: fixed;
  z-index: 80;
  left: 0;
  top: 0;
  width: min(var(--preview-width, 230px), calc(100vw - 56px));
  pointer-events: none;
  opacity: 0;
  filter: blur(10px);
  transform: translate(24px, -50%) rotate(var(--preview-rotate, 0deg)) scale(0.92);
  transition: opacity 160ms ease, filter 160ms ease, transform 160ms ease;
}

.floating-preview.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate(24px, -50%) rotate(var(--preview-rotate, 0deg)) scale(1);
}

.floating-preview img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(31, 29, 25, 0.22);
}

.quotes-section {
  position: relative;
  height: 1120px;
  overflow: hidden;
  padding: 112px 0 0;
}

.quotes-heading {
  position: relative;
  z-index: 4;
}

.waterfall {
  position: relative;
  z-index: 2;
  margin: 66px auto 0;
  width: min(820px, 100%);
  height: 920px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 84%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 84%, transparent);
}

.waterfall::before,
.waterfall::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  height: 140px;
  pointer-events: none;
}

.waterfall::before {
  top: 0;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(251, 251, 249, 0.78) 42%, rgba(251, 251, 249, 0) 100%);
}

.waterfall::after {
  bottom: 0;
  background: linear-gradient(0deg, var(--paper) 0%, rgba(251, 251, 249, 0.78) 42%, rgba(251, 251, 249, 0) 100%);
}

.poster-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.poster-column img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.poster-column.up {
  animation: postersUp 30s linear infinite;
}

.poster-column.down {
  animation: postersDown 30s linear infinite;
}

@keyframes postersUp {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

@keyframes postersDown {
  from {
    transform: translateY(-50%);
  }
  to {
    transform: translateY(0);
  }
}

.cta-section {
  margin-top: 20px;
  width: 100%;
  min-height: 430px;
  padding-block: 72px;
  padding-inline: max(72px, calc((100vw - 1200px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: var(--download-bg);
  color: var(--ink);
}

.cta-section h2 {
  margin: 0;
  font-size: clamp(56px, 5.8vw, 96px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: 0;
}

.cta-section p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.app-store-dark {
  background: rgba(31, 29, 25, 0.86);
  border-color: rgba(31, 29, 25, 0.14);
  flex: 0 0 auto;
}

.site-footer {
  min-height: 220px;
  padding-block: 58px;
  padding-inline: max(72px, calc((100vw - 1200px) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: start;
  gap: 72px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.5);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.site-footer a {
  width: fit-content;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.site-footer a:hover {
  color: rgba(255, 255, 255, 0.86);
}

.footer-slogan {
  color: rgba(255, 255, 255, 0.5);
}

.footer-slogan strong {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 24px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.footer-slogan p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.download-toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 28px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(31, 29, 25, 0.88);
  color: #fff;
  font-size: 14px;
  transform: translate(-50%, 80px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.download-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.reveal-soft,
.reveal-item {
  opacity: 0;
  filter: blur(16px);
  transform: translateY(38px);
  transition:
    opacity 760ms ease,
    filter 880ms ease,
    transform 880ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 1800px) {
  .site-nav,
  .site-footer {
    padding-inline: calc((100vw - 1200px) / 2);
  }

  .hero-copy {
    left: calc((100vw - 1200px) / 2);
  }

  .hero-badges {
    right: calc((100vw - 1200px) / 2);
  }
}

@media (max-width: 1140px) {
  .site-nav {
    padding-inline: 28px;
  }

  .hero-badges {
    display: none;
  }

  .intro-row,
  .intro-row:nth-child(even) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 42px;
    min-height: 620px;
    padding-inline: 28px;
  }

  .intro-row:nth-child(even) .intro-copy,
  .intro-row:nth-child(3) .intro-copy {
    justify-self: auto;
    width: auto;
  }

  .intro-row:nth-child(odd) .intro-copy {
    padding-right: 0;
  }

  .course-phone {
    width: min(360px, 44vw);
  }

  .habit-feature,
  .habit-feature-reverse {
    grid-template-columns: 1fr;
  }

  .habit-feature-reverse .habit-copy {
    order: 2;
  }
}

@media (max-width: 760px) {
  .site-nav {
    height: 58px;
    padding-inline: 16px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .site-nav nav {
    gap: 2px;
    font-size: 11px;
  }

  .site-nav nav a {
    padding-inline: 5px;
  }

  .hero-copy {
    top: 55%;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .overview-section,
  .habit-section,
  .quotes-section {
    width: min(100% - 32px, 1200px);
  }

  .cta-section {
    width: 100%;
    padding-inline: 28px;
  }

  .site-footer {
    padding-inline: 28px;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .section-title h2,
  .course-copy h2,
  .quotes-heading h2,
  .cta-section h2 {
    font-size: 42px;
  }

  .intro-row,
  .intro-row:nth-child(even) {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-inline: 16px;
    gap: 26px;
  }

  .intro-row:nth-child(even) .intro-image {
    order: 0;
  }

  .course-copy {
    top: 84px;
    left: 50%;
  }

  .course-phone {
    width: min(300px, 76vw);
  }

  .course-tile {
    width: 92px;
  }

  .interactive-card {
    min-height: 0;
    padding: 0;
  }

  .checkin-demo,
  .pet-demo {
    width: 100%;
  }

  .panda-friend {
    right: -3%;
    bottom: -2%;
    width: 50%;
  }

  .quotes-section {
    height: auto;
    min-height: 960px;
  }

  .waterfall {
    margin-top: 46px;
    width: 100%;
    gap: 16px;
  }

  .poster-column img {
    height: auto;
  }

  .cta-section {
    padding: 42px 28px;
    flex-direction: column;
    align-items: flex-start;
  }
}
