/* ==========================================================================
   Choreo Lab — choreolab.dance
   Two colors carry everything: Sapphire #051F45 · Desert Peach #F2C4CD
   ========================================================================== */

:root {
  --sapphire: #051F45;
  --sapphire-deep: #03142e;
  --sapphire-soft: #0a2c5c;
  --peach: #F2C4CD;
  --peach-bright: #f7d6dd;
  --peach-deep: #e5a9b6;
  --peach-ink: #4a1f2c;
  --ink: #0b1526;
  --ink-soft: #3a4a63;
  --paper: #ffffff;

  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Hanken Grotesk", -apple-system, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-card: 16px;
  --radius-media: 20px;
  --container: 1140px;
  --section-pad: clamp(4.5rem, 10vw, 8.5rem);

  --z-nav: 100;
  --z-menu: 110;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--peach);
  color: var(--sapphire);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 12px 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--sapphire-soft);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible,
.loop :focus-visible,
.cta :focus-visible,
.footer :focus-visible,
.nav :focus-visible {
  outline-color: var(--peach);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  border: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--peach { background: var(--peach); color: var(--sapphire); }
.btn--peach:hover { background: var(--peach-bright); }

.btn--ghost {
  background: transparent;
  color: var(--peach);
  border: 1.5px solid rgba(242, 196, 205, 0.45);
}
.btn--ghost:hover { border-color: var(--peach); }

.btn--small { padding: 0.55rem 1.25rem; font-size: 0.9rem; }
.btn--big { padding: 1.1rem 2.5rem; font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--z-nav);
  background: transparent;
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.nav.is-scrolled {
  background: var(--sapphire-deep);
  box-shadow: 0 1px 0 rgba(242, 196, 205, 0.14);
}

.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.9rem clamp(1.25rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--peach);
  text-decoration: none;
}
.nav__mark { width: 30px; height: 30px; flex-shrink: 0; }
.nav__word {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  transform: translateY(0.05em);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.nav__links > a:not(.btn) {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav__links > a:not(.btn):hover { color: var(--peach); }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  background: var(--peach);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0;
    z-index: var(--z-menu);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--sapphire-deep);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links > a:not(.btn) { font-size: 1.35rem; }
  .nav__toggle { position: relative; z-index: calc(var(--z-menu) + 1); }
  .nav__toggle.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--sapphire);
  color: #fff;
  padding-top: clamp(6.5rem, 14vh, 9rem);
  padding-bottom: clamp(3rem, 8vh, 6rem);
  overflow: hidden;
}

.hero__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  min-height: min(78vh, 780px);
}

.hero__title {
  font-size: clamp(2.9rem, 2rem + 4.5vw, 5.5rem);
  line-height: 1.04;
  color: #fff;
}
.hero__title em {
  font-style: normal;
  color: var(--peach);
}

.hero__sub {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero__note {
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: rgba(242, 196, 205, 0.75);
}

.hero__stage {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__glow {
  position: absolute;
  inset: 8% -10% 0;
  background: radial-gradient(closest-side, rgba(242, 196, 205, 0.22), transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

/* Phone mockup ----------------------------------------------------------- */

.phone {
  position: relative;
  width: min(310px, 78vw);
  border-radius: 52px;
  background: #0b0f18;
  padding: 10px;
  box-shadow: 0 30px 60px -25px rgba(2, 8, 20, 0.55);
}

.phone--hero {
  transform: rotate(-3deg);
  will-change: transform;
}

.phone__screen {
  position: relative;
  border-radius: 42px;
  overflow: hidden;
  aspect-ratio: 9 / 19.2;
  background: var(--sapphire-deep);
}
.phone__screen--light { background: #fdf7f8; }

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

.phone__island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 24px;
  border-radius: 999px;
  background: #05070c;
}

/* In-phone practice studio UI */

.studio-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
  color: #fff;
}

.studio-ui__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 46px 16px 24px;
  background: linear-gradient(to bottom, rgba(3, 20, 46, 0.85), transparent);
}
.studio-ui__back { font-size: 20px; line-height: 1; color: var(--peach); }
.studio-ui__title { font-weight: 600; letter-spacing: 0.02em; }
.studio-ui__bookmark { color: var(--peach); display: inline-flex; }

.studio-ui__bottom {
  padding: 26px 16px 22px;
  background: linear-gradient(to top, rgba(3, 20, 46, 0.92), transparent);
  display: grid;
  gap: 11px;
}

.studio-ui__progress {
  position: relative;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}
.studio-ui__played {
  position: absolute;
  inset: 0 62% 0 0;
  border-radius: 2px;
  background: var(--peach);
}
.studio-ui__handle {
  position: absolute;
  left: 38%;
  top: 50%;
  width: 11px;
  height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--peach);
}

.studio-ui__speeds {
  display: flex;
  gap: 6px;
}
.studio-ui__speeds span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 10px;
  font-weight: 600;
}
.studio-ui__speeds .is-on { background: var(--peach); color: var(--sapphire); }

.studio-ui__modes { display: flex; gap: 6px; }
.studio-ui__mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 10px;
  font-weight: 600;
}
.studio-ui__mode.is-on {
  background: var(--peach);
  border-color: var(--peach);
  color: var(--sapphire);
}

/* --------------------------------------------------------------------------
   Problem (peach)
   -------------------------------------------------------------------------- */

.problem {
  background: var(--peach);
  color: var(--ink);
  padding-block: var(--section-pad);
  text-align: center;
}

.problem__title {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  color: var(--sapphire);
}

.problem__lede {
  max-width: 44rem;
  margin: 1.4rem auto 0;
  color: var(--peach-ink);
  font-size: clamp(1rem, 0.97rem + 0.3vw, 1.15rem);
}

.problem__pile {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1rem;
  max-width: 46rem;
  margin-inline: auto;
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(5, 31, 69, 0.35);
  color: var(--sapphire);
  font-size: 0.92rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(var(--r, 0deg));
}
.tool svg { width: 18px; height: 18px; }

.problem__arrow {
  margin: 2.2rem auto 0;
  color: var(--sapphire);
  opacity: 0.7;
  width: 24px;
}

.problem__solution { margin-top: 2rem; }

.problem__app {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.7rem;
  border-radius: 20px;
  background: var(--sapphire);
  color: var(--peach);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.26em;
}
.problem__app svg { width: 32px; height: 32px; }

.problem__punch {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 1.2vw, 1.9rem);
  color: var(--sapphire);
}

/* --------------------------------------------------------------------------
   Features (white)
   -------------------------------------------------------------------------- */

.features {
  background: var(--paper);
  padding-block: var(--section-pad);
}

.features__head {
  max-width: 42rem;
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}
.features__head h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  color: var(--sapphire);
}
.features__head p { margin-top: 1rem; color: var(--ink-soft); }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.2rem, 5vw, 4rem);
}
.feature--flip .feature__copy { order: 2; }
.feature--flip .feature__demo { order: 1; }

.feature + .feature {
  border-top: 1px solid rgba(5, 31, 69, 0.08);
}

.feature__copy h3 {
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem);
  color: var(--sapphire);
}

.feature__tag {
  margin-top: 0.7rem;
  font-weight: 600;
  color: var(--peach-ink);
  font-size: 1.05rem;
}

.feature__copy > p:last-child {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  max-width: 42ch;
}

/* Demo panels -------------------------------------------------------------- */

.demo { position: relative; }

.demo__media {
  position: relative;
  border-radius: var(--radius-media);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-width: 420px;
  margin-inline: auto;
  background: var(--sapphire-deep);
}
.demo__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.demo__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 31, 69, 0.08);
  pointer-events: none;
}

.demo--record .demo__media { aspect-ratio: 16 / 11; max-width: 560px; }

.demo__media--wide {
  aspect-ratio: 16 / 10;
  max-width: 680px;
}

.demo__controls {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(5, 31, 69, 0.25);
  background: transparent;
  color: var(--sapphire);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chip:hover { border-color: var(--sapphire); }
.chip.is-on {
  background: var(--sapphire);
  border-color: var(--sapphire);
  color: var(--peach);
}
.chip--wide { padding-inline: 1.5rem; }

/* Speed demo */

.demo__beat {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.demo__beat span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: var(--peach);
  animation: beat-sweep 2.4s linear infinite;
}
@keyframes beat-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}
@media (prefers-reduced-motion: reduce) {
  .demo__beat span { animation: none; width: 55%; }
}

.demo__readout {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(3, 20, 46, 0.75);
  color: var(--peach);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Mirror demo */

.demo--mirror img {
  transition: transform 0.5s var(--ease);
}
.demo--mirror.is-mirrored img { transform: scaleX(-1); }

.demo__corner {
  position: absolute;
  top: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(3, 20, 46, 0.75);
  color: var(--peach);
  font-weight: 700;
  font-size: 0.85rem;
}
.demo__corner--l { left: 14px; }
.demo__corner--r { right: 14px; }

/* Region (footwork / armwork) demos */

.demo--region {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
}
.demo--region .demo__media { flex: 1 1 auto; }

.demo__shade {
  position: absolute;
  inset-inline: 0;
  background: rgba(3, 15, 33, 0.94);
  pointer-events: none;
}
.demo__shade--top { top: 0; height: var(--cover, 50%); }
.demo__shade--bottom { bottom: 0; height: var(--cover, 50%); }
.demo__shade::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 2px;
  background: var(--peach);
}
.demo__shade--top::after { bottom: 0; }
.demo__shade--bottom::after { top: 0; }

.demo__rail {
  display: flex;
  align-items: center;
  width: 44px;
  justify-content: center;
}

.vslider {
  -webkit-appearance: none;
  appearance: none;
  width: 240px;
  height: 44px;
  background: transparent;
  transform: rotate(90deg);
  cursor: pointer;
}
.vslider::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(5, 31, 69, 0.25);
}
.vslider::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(5, 31, 69, 0.25);
}
.vslider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9.5px;
  border-radius: 50%;
  background: var(--peach);
  border: 2.5px solid var(--sapphire);
}
.vslider::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--peach);
  border: 2.5px solid var(--sapphire);
}

/* Record demo */

.demo__count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 5.5rem;
  color: var(--peach);
  background: rgba(3, 20, 46, 0);
  pointer-events: none;
  transition: background-color 0.3s var(--ease);
}
.demo__count.is-counting { background: rgba(3, 20, 46, 0.55); }

.demo__rec {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(3, 20, 46, 0.75);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.demo__rec.is-live { opacity: 1; }
.demo__rec i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5a5a;
}
.demo__rec.is-live i { animation: rec-blink 1.1s steps(1) infinite; }
@keyframes rec-blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) {
  .demo__rec.is-live i { animation: none; }
}

/* Compare demo */

.demo--compare .demo__media { touch-action: pan-y; }

.compare__you {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos, 50%));
}
.compare__you img {
  transform: scale(1.06) translateX(2.5%);
  filter: brightness(0.8) saturate(0.85);
}

.compare__label {
  position: absolute;
  top: 14px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(3, 20, 46, 0.75);
  color: var(--peach);
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
}
.compare__label--l { left: 14px; }
.compare__label--r { right: 14px; }

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  margin-left: -1px;
  background: var(--peach);
  cursor: ew-resize;
}
.compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--peach);
  color: var(--sapphire);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(2, 8, 20, 0.35);
}

/* Ghost demo */

.ghost__layer {
  opacity: calc(var(--ghost, 55) / 100);
  transform: translateX(-4.5%) scale(1.05);
  filter: brightness(1.25);
}

.demo__controls--slider {
  align-items: center;
  gap: 0.9rem;
  flex-wrap: nowrap;
}
.demo__controls--slider label,
.demo__controls--slider output {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sapphire);
  min-width: 3.2rem;
}
.demo__controls--slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 1 260px;
  height: 3px;
  border-radius: 2px;
  background: rgba(5, 31, 69, 0.25);
  cursor: pointer;
}
.demo__controls--slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9.5px;
  border-radius: 50%;
  background: var(--peach);
  border: 2.5px solid var(--sapphire);
}
.demo__controls--slider input::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(5, 31, 69, 0.25);
}
.demo__controls--slider input::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--peach);
  border: 2.5px solid var(--sapphire);
}
.demo__controls--slider input::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(5, 31, 69, 0.25);
}

/* Timestamps demo */

.demo--marks { max-width: 430px; margin-inline: auto; }

.marks {
  border-radius: var(--radius-card);
  border: 1px solid rgba(5, 31, 69, 0.12);
  background: #fdf9fa;
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
}

.marks__row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(5, 31, 69, 0.08);
}
.marks__time {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--sapphire);
  background: var(--peach);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
}
.marks__body { flex: 1; display: grid; line-height: 1.35; }
.marks__body strong { color: var(--sapphire); font-size: 0.95rem; }
.marks__body span { color: var(--ink-soft); font-size: 0.82rem; }
.marks__flag { color: var(--peach-deep); }

.marks__add {
  margin-top: 0.3rem;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1.5px dashed rgba(5, 31, 69, 0.3);
  background: none;
  color: var(--sapphire);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Practice loop (sapphire)
   -------------------------------------------------------------------------- */

.loop {
  background: var(--sapphire);
  color: #fff;
  padding-block: var(--section-pad);
  text-align: center;
}

.loop h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  color: var(--peach);
}

.loop__lede {
  max-width: 42rem;
  margin: 1.4rem auto 0;
  color: rgba(255, 255, 255, 0.82);
}

.loop__flow {
  margin: 3.2rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  max-width: 60rem;
}

.loop__step {
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid rgba(242, 196, 205, 0.4);
  color: var(--peach);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.loop__step.is-active {
  background: var(--peach);
  border-color: var(--peach);
  color: var(--sapphire);
}
.loop__step:not(:last-child)::after {
  content: "→";
  margin-left: 1rem;
  color: rgba(242, 196, 205, 0.5);
  font-weight: 400;
}
.loop__step { display: inline-flex; align-items: center; }

.loop__strip {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  max-width: 56rem;
  margin-inline: auto;
}

.loop__tile {
  position: relative;
  border-radius: var(--radius-media);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sapphire-soft);
}
.loop__tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.loop__tile--split { display: grid; grid-template-columns: 1fr 1fr; }
.loop__tile--split img { position: relative; }
.loop__tile--split img:last-of-type {
  transform: scale(1.08);
  filter: brightness(0.75);
}

.loop__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(3, 20, 46, 0.8);
  color: var(--peach);
  font-size: 0.78rem;
  font-weight: 700;
}
.loop__tag i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5a5a;
}

.loop__tile--action {
  display: grid;
  place-content: center;
  gap: 0.7rem;
  text-align: center;
}
.loop__again {
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  background: var(--peach);
  color: var(--sapphire);
  font-weight: 700;
}
.loop__hint { color: rgba(242, 196, 205, 0.7); font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   Organization (peach)
   -------------------------------------------------------------------------- */

.organize {
  background: var(--peach);
  padding-block: var(--section-pad);
}

.organize__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.organize h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem);
  color: var(--sapphire);
}
.organize__copy > p {
  margin-top: 1.2rem;
  color: var(--peach-ink);
  max-width: 46ch;
}

.organize__list {
  margin-top: 1.6rem;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}
.organize__list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--sapphire);
  font-weight: 500;
}
.organize__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sapphire);
}

.organize__demo { display: flex; justify-content: center; }

.phone--folders { width: min(290px, 74vw); }

.folders {
  position: absolute;
  inset: 0;
  padding: 52px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
}
.folders__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.folders__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--sapphire);
}
.folders__plus {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sapphire);
  color: var(--peach);
  font-size: 1.05rem;
  line-height: 1;
}
.folders__row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.85rem;
  border-radius: 13px;
  background: #fff;
  border: 1px solid rgba(5, 31, 69, 0.08);
  color: var(--sapphire);
}
.folders__swatch {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--sapphire);
  position: relative;
}
.folders__swatch::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  background: var(--peach);
}
.folders__row strong { flex: 1; font-weight: 600; font-size: 0.92rem; }
.folders__count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--peach-ink);
  background: var(--peach);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

/* --------------------------------------------------------------------------
   How it works (white)
   -------------------------------------------------------------------------- */

.how {
  background: var(--paper);
  padding-block: var(--section-pad);
}

.how h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  color: var(--sapphire);
  text-align: center;
}

.how__steps {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.how__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 2.5vw, 4rem);
  color: var(--peach-deep);
  line-height: 1;
  display: block;
}

.how__step h3 {
  margin-top: 0.9rem;
  font-size: 1.35rem;
  color: var(--sapphire);
}
.how__step p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* --------------------------------------------------------------------------
   Final CTA (sapphire, image-backed)
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  background: var(--sapphire);
  color: #fff;
  padding-block: clamp(6rem, 14vw, 11rem);
  text-align: center;
  overflow: hidden;
}

.cta__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  opacity: 0.3;
}

.cta__inner { position: relative; }

.cta h2 {
  font-size: clamp(2.4rem, 1.7rem + 3.6vw, 4.2rem);
  color: var(--peach);
}
.cta > .cta__inner > p:not(.cta__note) {
  margin-top: 1.2rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
}

.cta__actions { margin-top: 2.4rem; }

.store-badge {
  display: inline-block;
  margin-top: 2.2rem;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  opacity: 0.92;
}
.store-badge:hover { transform: translateY(-1px); opacity: 1; }

.cta__note {
  margin-top: 1.4rem;
  font-size: 0.88rem;
  color: rgba(242, 196, 205, 0.75);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--sapphire-deep);
  color: rgba(255, 255, 255, 0.8);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem;
}

.footer__brand p {
  margin-top: 1.1rem;
  max-width: 34ch;
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer__col { display: grid; gap: 0.7rem; align-content: start; }
.footer__col h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 0.4rem;
}
.footer__col a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
  justify-self: start;
}
.footer__col a:hover { color: var(--peach); }

.footer__base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-block: 1.4rem;
  border-top: 1px solid rgba(242, 196, 205, 0.14);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* --------------------------------------------------------------------------
   Reveal animations (enhance-only; content visible without JS)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  }
  html.js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; min-height: 0; }
  .hero__sub { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__stage { margin-top: 2.5rem; }
  .phone--hero { transform: rotate(0deg); }

  .feature,
  .organize__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .feature--flip .feature__copy { order: 1; }
  .feature--flip .feature__demo { order: 2; }
  .feature__copy { text-align: center; }
  .feature__copy > p:last-child { margin-inline: auto; }

  .organize__copy { text-align: center; }
  .organize__copy > p { margin-inline: auto; }
  .organize__list { justify-content: center; max-width: 24rem; margin-inline: auto; text-align: left; }

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

  .loop__strip { grid-template-columns: 1fr; max-width: 26rem; }
  .loop__step:not(:last-child)::after { content: none; }
}

@media (max-width: 560px) {
  .how__steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .demo--region { gap: 0.5rem; }
  .hero__actions .btn { width: 100%; }
}
