/* Roomful · warm paper, candy accents, zero JavaScript.
   All motion is pure CSS: entrance keyframes, scroll driven reveals
   behind @supports, and cross document view transitions. */

:root {
  color-scheme: light dark;
  --bg: #FFF9F2;
  --card: #FFFFFF;
  --chip: #FFF0E0;
  --ink: #2B2118;
  --muted: #736A62;
  --edge: rgba(43, 33, 24, 0.08);
  --shadow: 0 10px 30px rgba(43, 33, 24, 0.10);
  --shadow-lift: 0 26px 54px rgba(43, 33, 24, 0.17);
  --indigo: #5055AD;
  --indigo-ink: #FFFFFF;
  --tangerine: #FF9F45;
  --tangerine-ink: #2B2118;
  --mint: #2FA97A;
  --mint-ink: #2B2118;
  --wash-indigo: rgba(80, 85, 173, 0.07);
  --wash-tangerine: rgba(255, 159, 69, 0.10);
  --wash-mint: rgba(47, 169, 122, 0.08);
  --blob-indigo: rgba(80, 85, 173, 0.28);
  --blob-tangerine: rgba(255, 142, 77, 0.32);
  --blob-mint: rgba(47, 169, 122, 0.26);
  --price-ink: #B65312;
  --header-veil: rgba(255, 249, 242, 0.72);
  --glow-dot: rgba(43, 33, 24, 0.05);
  --receipt-shadow: rgba(43, 33, 24, 0.16);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16131D;
    --card: #211C2B;
    --chip: #322F3C;
    --ink: #F5F2FA;
    --muted: #A09DA6;
    --edge: rgba(245, 242, 250, 0.09);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.40);
    --shadow-lift: 0 28px 60px rgba(0, 0, 0, 0.55);
    --indigo: #8A90F2;
    --indigo-ink: #16131D;
    --tangerine: #FF9F45;
    --tangerine-ink: #16131D;
    --mint: #4FE3AD;
    --mint-ink: #16131D;
    --wash-indigo: rgba(138, 144, 242, 0.09);
    --wash-tangerine: rgba(255, 159, 69, 0.08);
    --wash-mint: rgba(79, 227, 173, 0.08);
    --blob-indigo: rgba(138, 144, 242, 0.20);
    --blob-tangerine: rgba(255, 142, 77, 0.22);
    --blob-mint: rgba(79, 227, 173, 0.16);
    --price-ink: #FFB25C;
    --header-veil: rgba(22, 19, 29, 0.66);
    --glow-dot: rgba(245, 242, 250, 0.045);
    --receipt-shadow: rgba(0, 0, 0, 0.55);
  }
}

/* mirrors the app's Increase Contrast behavior: secondary type and
   hairlines strengthened, decorative tints removed entirely */
@media (prefers-contrast: more) {
  :root {
    --muted: #51483F;
    --edge: rgba(43, 33, 24, 0.32);
    --wash-indigo: transparent;
    --wash-tangerine: transparent;
    --wash-mint: transparent;
  }

  body::before,
  .hero-scene,
  .feature.shot::before {
    display: none;
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --muted: #CDCAD2;
    --edge: rgba(245, 242, 250, 0.34);
  }
}

/* ---------- appearance toggle (zero JavaScript) ---------- */

/* The footer checkbox flips the page to the opposite of the system
   scheme, like the app's appearance setting. Unchecked always means
   match system; with no scripts, the choice lasts for the page view. */

@media (prefers-color-scheme: light) {
  :root:has(#appearance-flip:checked) {
    color-scheme: dark;
    --bg: #16131D;
    --card: #211C2B;
    --chip: #322F3C;
    --ink: #F5F2FA;
    --muted: #A09DA6;
    --edge: rgba(245, 242, 250, 0.09);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.40);
    --shadow-lift: 0 28px 60px rgba(0, 0, 0, 0.55);
    --indigo: #8A90F2;
    --indigo-ink: #16131D;
    --tangerine: #FF9F45;
    --tangerine-ink: #16131D;
    --mint: #4FE3AD;
    --mint-ink: #16131D;
    --wash-indigo: rgba(138, 144, 242, 0.09);
    --wash-tangerine: rgba(255, 159, 69, 0.08);
    --wash-mint: rgba(79, 227, 173, 0.08);
    --blob-indigo: rgba(138, 144, 242, 0.20);
    --blob-tangerine: rgba(255, 142, 77, 0.22);
    --blob-mint: rgba(79, 227, 173, 0.16);
    --price-ink: #FFB25C;
    --header-veil: rgba(22, 19, 29, 0.66);
    --glow-dot: rgba(245, 242, 250, 0.045);
    --receipt-shadow: rgba(0, 0, 0, 0.55);
  }
}

@media (prefers-color-scheme: dark) {
  :root:has(#appearance-flip:checked) {
    color-scheme: light;
    --bg: #FFF9F2;
    --card: #FFFFFF;
    --chip: #FFF0E0;
    --ink: #2B2118;
    --muted: #736A62;
    --edge: rgba(43, 33, 24, 0.08);
    --shadow: 0 10px 30px rgba(43, 33, 24, 0.10);
    --shadow-lift: 0 26px 54px rgba(43, 33, 24, 0.17);
    --indigo: #5055AD;
    --indigo-ink: #FFFFFF;
    --tangerine: #FF9F45;
    --tangerine-ink: #2B2118;
    --mint: #2FA97A;
    --mint-ink: #2B2118;
    --wash-indigo: rgba(80, 85, 173, 0.07);
    --wash-tangerine: rgba(255, 159, 69, 0.10);
    --wash-mint: rgba(47, 169, 122, 0.08);
    --blob-indigo: rgba(80, 85, 173, 0.28);
    --blob-tangerine: rgba(255, 142, 77, 0.32);
    --blob-mint: rgba(47, 169, 122, 0.26);
    --price-ink: #B65312;
    --header-veil: rgba(255, 249, 242, 0.72);
    --glow-dot: rgba(43, 33, 24, 0.05);
    --receipt-shadow: rgba(43, 33, 24, 0.16);
  }
}

/* keep the strengthened contrast pairs matched to the flipped scheme */
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root:has(#appearance-flip:checked) {
    --muted: #CDCAD2;
    --edge: rgba(245, 242, 250, 0.34);
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:has(#appearance-flip:checked) {
    --muted: #51483F;
    --edge: rgba(43, 33, 24, 0.32);
  }
}

/* ---------- base ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", sans-serif;
  line-height: 1.6;
  font-size: 17px;
  overflow-x: clip;
}

/* fixed backdrop: three soft candy glows plus a faint dot grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(900px 620px at 86% -120px, var(--blob-tangerine), transparent 70%),
    radial-gradient(720px 540px at -140px 34%, var(--blob-indigo), transparent 70%),
    radial-gradient(820px 620px at 108% 86%, var(--blob-mint), transparent 72%),
    radial-gradient(var(--glow-dot) 1px, transparent 1.4px);
  background-size: auto, auto, auto, 26px 26px;
  opacity: 0.55;
}

::selection {
  background: var(--tangerine);
  color: #2B2118;
}

:focus-visible {
  outline: 3px solid var(--tangerine);
  outline-offset: 3px;
  border-radius: 8px;
}

h1,
h2 {
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

h1 {
  font-size: clamp(44px, 5vw + 18px, 88px);
  margin: 14px 0 18px;
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(27px, 2vw + 16px, 42px);
  margin: 14px 0 16px;
}

a {
  color: var(--ink);
  text-decoration-color: var(--tangerine);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 0.18s ease, background-color 0.25s ease;
}

a:hover {
  text-decoration-thickness: 3.5px;
}

.muted {
  color: var(--muted);
}

.fine {
  font-size: 15px;
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* ---------- header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-veil);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid var(--edge);
}

header .wrap {
  display: flex;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  view-transition-name: brand;
}

.brand svg {
  display: block;
  border-radius: 7px;
  transition: transform 0.55s var(--spring);
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.1);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(64px, 11vh, 130px) 0 clamp(36px, 6vh, 72px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-inline: auto;
  padding-inline: 24px;
}

.hero .mark {
  display: inline-block;
  width: clamp(84px, 10vw, 116px);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(43, 33, 24, 0.28));
}

/* in dark mode the tile is nearly the page color, so the brown shadow
   vanishes: trade it for lamplight spilling out plus a deep drop */
@media (prefers-color-scheme: dark) {
  :root:not(:has(#appearance-flip:checked)) .hero .mark {
    filter:
      drop-shadow(0 0 30px rgba(255, 142, 77, 0.38))
      drop-shadow(0 18px 44px rgba(0, 0, 0, 0.6));
  }
}

@media (prefers-color-scheme: light) {
  :root:has(#appearance-flip:checked) .hero .mark {
    filter:
      drop-shadow(0 0 30px rgba(255, 142, 77, 0.38))
      drop-shadow(0 18px 44px rgba(0, 0, 0, 0.6));
  }
}

.hero .app-name {
  font-weight: 800;
  font-size: clamp(21px, 2vw, 26px);
  letter-spacing: 0.01em;
  margin: 20px 0 0;
}

.hero .lede {
  font-size: clamp(18px, 1vw + 13px, 22px);
  margin: 0 auto;
  max-width: 36em;
}

.hero .fine {
  margin: 16px 0 0;
}

/* underline swash beneath the last word of the headline */
.swash {
  position: relative;
  display: inline-block;
}

.swash-line {
  position: absolute;
  left: -3%;
  bottom: -0.16em;
  width: 106%;
  height: 0.28em;
  z-index: -1;
}

/* gap is longer than the path so no dash boundary (and no round cap dot)
   can ever land on the path while it waits to draw */
.swash-line path {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 0;
}

/* decorative scene behind the hero: floor plan plus confetti */
.hero-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.plan {
  position: absolute;
  left: 50%;
  top: clamp(8px, 4vh, 48px);
  transform: translateX(-50%);
  width: min(1060px, 120vw);
  height: auto;
  color: var(--ink);
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 42%, #000 38%, transparent 74%);
  mask-image: radial-gradient(ellipse 62% 70% at 50% 42%, #000 38%, transparent 74%);
}

.plan .plan-rooms {
  opacity: 0.11;
}

.plan .plan-lit {
  opacity: 0.14;
}

.plan .plan-glow {
  opacity: 0.5;
}

.confetti {
  position: absolute;
  display: block;
  opacity: 0.75;
}

.confetti.dot {
  border-radius: 50%;
}

.confetti.square {
  border-radius: 26%;
}

.c1 { width: 10px; height: 10px; background: var(--indigo);    left: 12%; top: 20%; --dur: 6.5s; --del: 0s;   }
.c2 { width: 14px; height: 14px; background: var(--tangerine); left: 85%; top: 24%; --dur: 7.8s; --del: 0.6s; }
.c3 { width: 8px;  height: 8px;  background: var(--mint);      left: 76%; top: 66%; --dur: 5.6s; --del: 0.3s; }
.c4 { width: 6px;  height: 6px;  background: var(--tangerine); left: 20%; top: 72%; --dur: 6.9s; --del: 1s;   }
.c5 { width: 11px; height: 11px; background: var(--indigo);    left: 66%; top: 12%; --dur: 8.4s; --del: 0.2s; }
.c6 { width: 12px; height: 12px; background: var(--mint);      left: 7%;  top: 50%; --dur: 7.2s; --del: 0.8s; }
.c7 { width: 26px; height: 9px;  border-radius: 999px;
      background: linear-gradient(135deg, #FFDFAE, #FF8E4D);   left: 89%; top: 46%; --dur: 6.2s; --del: 0.5s; }
.c8 { width: 6px;  height: 6px;  background: var(--indigo);    left: 42%; top: 9%;  --dur: 5.9s; --del: 1.2s; }

@media (prefers-color-scheme: dark) {
  :root:not(:has(#appearance-flip:checked)) .confetti {
    opacity: 0.55;
    box-shadow: 0 0 14px currentcolor;
  }
  :root:not(:has(#appearance-flip:checked)) .c1,
  :root:not(:has(#appearance-flip:checked)) .c5,
  :root:not(:has(#appearance-flip:checked)) .c8 { color: var(--indigo); }
  :root:not(:has(#appearance-flip:checked)) .c2,
  :root:not(:has(#appearance-flip:checked)) .c4,
  :root:not(:has(#appearance-flip:checked)) .c7 { color: var(--tangerine); }
  :root:not(:has(#appearance-flip:checked)) .c3,
  :root:not(:has(#appearance-flip:checked)) .c6 { color: var(--mint); }
  :root:not(:has(#appearance-flip:checked)) .plan .plan-rooms { opacity: 0.09; }
}

@media (prefers-color-scheme: light) {
  :root:has(#appearance-flip:checked) .confetti {
    opacity: 0.55;
    box-shadow: 0 0 14px currentcolor;
  }
  :root:has(#appearance-flip:checked) .c1,
  :root:has(#appearance-flip:checked) .c5,
  :root:has(#appearance-flip:checked) .c8 { color: var(--indigo); }
  :root:has(#appearance-flip:checked) .c2,
  :root:has(#appearance-flip:checked) .c4,
  :root:has(#appearance-flip:checked) .c7 { color: var(--tangerine); }
  :root:has(#appearance-flip:checked) .c3,
  :root:has(#appearance-flip:checked) .c6 { color: var(--mint); }
  :root:has(#appearance-flip:checked) .plan .plan-rooms { opacity: 0.09; }
}

/* App Store link with a slow gradient shimmer running around its border */
.pill {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 700;
  margin: 30px 0 0;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--chip), var(--chip)) padding-box,
    linear-gradient(120deg, #FFDFAE, #FF8E4D 40%, #FFDFAE 80%, #FF8E4D) border-box;
  background-size: 100% 100%, 300% 100%;
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--spring), box-shadow 0.35s ease;
}

.pill:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: var(--shadow-lift);
}

/* ---------- section labels ---------- */

.label {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.4s var(--spring);
}

.label.indigo {
  background: var(--indigo);
  color: var(--indigo-ink);
}

.label.tangerine {
  background: var(--tangerine);
  color: var(--tangerine-ink);
}

.label.mint {
  background: var(--mint);
  color: var(--mint-ink);
}

.feature:hover .label {
  transform: rotate(-2deg) scale(1.04);
}

/* ---------- tinted feature panels with screenshots ---------- */

.feature {
  margin: clamp(26px, 4vw, 54px) 0;
}

.feature .copy > p:last-child {
  margin-bottom: 0;
}

.feature.shot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(26px, 4vw, 44px);
  border: 1px solid var(--edge);
  padding: clamp(28px, 4.5vw, 68px);
}

.feature.shot > * {
  position: relative;
  z-index: 1;
}

/* big blurred color blob tucked in a corner of each panel */
.feature.shot::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(430px, 62%);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(72px);
  top: -20%;
  right: -8%;
}

.feature.shot.flip::before {
  right: auto;
  left: -8%;
}

.wash-indigo { background: var(--wash-indigo); }
.wash-indigo::before { background: var(--blob-indigo); }
.wash-tangerine { background: var(--wash-tangerine); }
.wash-tangerine::before { background: var(--blob-tangerine); }
.wash-mint { background: var(--wash-mint); }
.wash-mint::before { background: var(--blob-mint); }

.feature.shot .copy p {
  font-size: clamp(16.5px, 0.35vw + 15px, 19px);
  max-width: 34em;
}

.shot-media {
  display: flex;
  justify-content: center;
}

/* ---------- polaroid frames ---------- */

.polaroid {
  position: relative;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 12px 12px 30px;
  box-shadow: var(--shadow);
  max-width: min(320px, 76vw);
  margin: 30px auto 8px;
  transition: transform 0.55s var(--spring), box-shadow 0.4s ease;
}

.polaroid:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
}

/* washi tape holding the photo up */
.polaroid::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 27px;
  transform: translateX(-50%) rotate(-3deg);
  background: linear-gradient(180deg, rgba(255, 223, 174, 0.9), rgba(255, 178, 106, 0.62));
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(43, 33, 24, 0.14);
}

.feature.shot.flip .polaroid::before {
  transform: translateX(-50%) rotate(2.5deg);
}

.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* section two's chips detail shot is short and wide, not a phone:
   the frame follows the image's natural proportions at a wider cap.
   Higher specificity than .polaroid, so it also wins at desktop. */
.polaroid.wide {
  max-width: min(480px, 76vw);
}

/* ---------- night panel (private by construction) ---------- */

.feature.night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(26px, 4vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(32px, 5vw, 72px);
  background:
    radial-gradient(600px 400px at 80% -4%, rgba(255, 142, 77, 0.30), transparent 62%),
    radial-gradient(420px 300px at 8% 108%, rgba(138, 144, 242, 0.16), transparent 66%),
    linear-gradient(160deg, #2C2823, #161311 72%);
  color: #F5F2FA;
}

.feature.night h2 {
  color: #F5F2FA;
}

.feature.night .copy p {
  color: rgba(245, 242, 250, 0.88);
  font-size: clamp(16.5px, 0.35vw + 15px, 19px);
  max-width: 36em;
}

.feature.night .label.indigo {
  background: #8A90F2;
  color: #16131D;
}

.feature.night .mini {
  color: #8A90F2;
}

.night-plan {
  display: block;
  width: min(300px, 64vw);
  height: auto;
  margin: 34px auto 6px;
  filter: drop-shadow(0 30px 55px rgba(0, 0, 0, 0.45));
  transition: transform 0.6s var(--spring);
}

.feature.night:hover .night-plan {
  transform: scale(1.03);
}

/* ---------- duo cards (doesn't do + pricing) ---------- */

.duo {
  display: grid;
  gap: clamp(18px, 2.5vw, 30px);
  margin: clamp(26px, 4vw, 54px) 0;
}

.card-feature {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 28px;
  padding: clamp(26px, 3.5vw, 46px);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--spring), box-shadow 0.4s ease;
}

.card-feature:hover {
  transform: translateY(-6px) rotate(-0.35deg);
  box-shadow: var(--shadow-lift);
}

.card-feature h2 {
  font-size: clamp(24px, 1vw + 18px, 31px);
}

.mini {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 0 16px;
}

.mini.tangerine-ic { color: var(--tangerine); }
.mini.mint-ic { color: var(--mint); }

.prices {
  font-variant-numeric: tabular-nums;
}

.price {
  font-weight: 800;
  color: var(--price-ink);
  white-space: nowrap;
}

/* ---------- quiet receipt ---------- */

.quiet {
  margin: clamp(48px, 7vw, 96px) auto;
  max-width: 620px;
  filter: drop-shadow(0 14px 26px var(--receipt-shadow));
}

.quiet .card {
  background: var(--card);
  padding: 38px 34px 42px;
  transform: rotate(-0.6deg);
  transition: transform 0.5s var(--spring);
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 22px 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 22px 51% repeat-x;
  mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 22px 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 22px 51% repeat-x;
}

.quiet .card:hover {
  transform: rotate(0deg);
}

.quiet p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

/* generic card (support page answers reuse this) */
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 26px 30px;
  box-shadow: var(--shadow);
}

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 8px 0 64px;
}

footer::before {
  content: "";
  display: block;
  width: 120px;
  height: 4px;
  margin: 0 auto 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFDFAE, #FF8E4D);
}

footer nav {
  margin-bottom: 14px;
}

footer nav a {
  display: inline-block;
  font-weight: 700;
  margin: 0 4px;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.4s var(--spring);
}

footer nav a:hover {
  background: var(--chip);
  transform: translateY(-2px);
}

footer .fine {
  margin: 10px 0 0;
}

/* the appearance toggle: a checkbox in a pill, no scripts anywhere.
   The label swaps between the two room tiles, unlit and lit. Browsers
   too old to run the :has() flip never see the button at all. */
.scheme-row {
  display: none;
  margin: 26px 0 0;
}

@supports selector(:root:has(a)) {
  .scheme-row {
    display: block;
  }
}

.scheme-flip {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.scheme-toggle {
  display: inline-block;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 9px 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: color 0.3s ease, transform 0.4s var(--spring), box-shadow 0.35s ease;
}

.scheme-toggle:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.scheme-flip:focus-visible + .scheme-toggle {
  outline: 3px solid var(--tangerine);
  outline-offset: 3px;
}

.scheme-choice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.scheme-choice .tile {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.tile-dark {
  background: #3A3733;
  box-shadow: inset 0 0 0 1px var(--edge);
}

.tile-lit {
  background: linear-gradient(135deg, #FFDFAE, #FF8E4D);
}

/* show the choice that matches where the switch would take you:
   "Lights off" while the page is light, "Lights on" while it is dark */
.when-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(#appearance-flip:checked)) .when-light { display: none; }
  :root:not(:has(#appearance-flip:checked)) .when-dark { display: inline-flex; }
}

@media (prefers-color-scheme: light) {
  :root:has(#appearance-flip:checked) .when-light { display: none; }
  :root:has(#appearance-flip:checked) .when-dark { display: inline-flex; }
}

/* ---------- inner pages (privacy, support) ---------- */

.page {
  max-width: 780px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
  padding-bottom: 40px;
}

.page-hero {
  text-align: center;
  padding: clamp(44px, 8vh, 84px) 0 14px;
}

.page-hero .mark {
  display: inline-block;
  width: clamp(72px, 9vw, 96px);
  height: auto;
  filter: drop-shadow(0 14px 26px rgba(43, 33, 24, 0.25));
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(#appearance-flip:checked)) .page-hero .mark {
    filter:
      drop-shadow(0 0 24px rgba(255, 142, 77, 0.34))
      drop-shadow(0 14px 34px rgba(0, 0, 0, 0.6));
  }
}

@media (prefers-color-scheme: light) {
  :root:has(#appearance-flip:checked) .page-hero .mark {
    filter:
      drop-shadow(0 0 24px rgba(255, 142, 77, 0.34))
      drop-shadow(0 14px 34px rgba(0, 0, 0, 0.6));
  }
}

.page-hero h1 {
  font-size: clamp(34px, 3vw + 16px, 54px);
  margin: 18px 0 6px;
}

.page-hero .fine {
  margin: 0;
}

.page .lead {
  font-size: clamp(18px, 0.5vw + 16px, 21px);
  margin: 30px 0 8px;
}

.page > h2 {
  font-size: 21px;
  margin: 44px 0 8px;
  position: relative;
  padding-left: 24px;
}

/* little room tiles in front of the policy headings, cycling the accents */
.page > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: var(--indigo);
  transition: transform 0.4s var(--spring);
}

.page > h2:nth-of-type(3n + 2)::before { background: var(--tangerine); }
.page > h2:nth-of-type(3n)::before { background: var(--mint); }

.page > h2:hover::before {
  transform: rotate(45deg) scale(1.15);
}

.qa-grid {
  display: grid;
  gap: 18px;
  margin: 30px 0;
}

.qa {
  margin: 0;
  border: 1px solid var(--edge);
  border-radius: 22px;
  transition: transform 0.5s var(--spring), box-shadow 0.4s ease;
}

.qa:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.qa h2 {
  font-size: 19px;
  margin: 0 0 8px;
}

.qa p {
  margin: 0;
}

.closing {
  text-align: center;
  font-size: 15px;
  margin: 52px 0 0;
}

/* ---------- desktop layout ---------- */

@media (min-width: 960px) {
  .feature.shot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    column-gap: clamp(36px, 5vw, 84px);
    align-items: center;
  }

  /* the flip section is the wide chips shot, so its media column
     gets headroom for the 480px frame */
  .feature.shot.flip {
    grid-template-columns: minmax(300px, 480px) minmax(0, 1fr);
  }

  .feature.shot.flip .copy {
    grid-column: 2;
    grid-row: 1;
  }

  .feature.shot.flip .shot-media {
    grid-column: 1;
    grid-row: 1;
  }

  .polaroid {
    max-width: 360px;
    margin: 6px auto;
  }

  .feature.night {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    column-gap: clamp(40px, 5vw, 80px);
    align-items: center;
  }

  .night-plan {
    margin: 0;
  }

  .duo {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (min-width: 820px) {
  .qa-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .plan,
  .c6,
  .c7,
  .c8 {
    display: none;
  }
}

/* ---------- motion ---------- */

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mark-pop {
  from {
    opacity: 0;
    transform: scale(0.45) rotate(-12deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes scene-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bob {
  from {
    transform: translateY(-9px) rotate(-6deg);
  }
  to {
    transform: translateY(9px) rotate(8deg);
  }
}

/* the launch signature: the room lights up once, smooth and warm,
   with a soft settle, then the halo blooms behind it. Never a flicker. */
@keyframes room-light {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  70% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes halo-bloom {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes breathe {
  from { opacity: 1; }
  to { opacity: 0.55; }
}

@keyframes lit-breathe {
  from { opacity: 0.14; }
  to { opacity: 0.26; }
}

@keyframes swash-draw {
  from { stroke-dashoffset: 1.25; }
  to { stroke-dashoffset: 0; }
}

@keyframes shimmer {
  from { background-position: 0 0, 0% 50%; }
  to { background-position: 0 0, 300% 50%; }
}

@keyframes wiggle {
  0% { rotate: 0deg; }
  30% { rotate: -9deg; }
  60% { rotate: 7deg; }
  100% { rotate: 0deg; }
}

@keyframes reveal-rise {
  from {
    opacity: 0;
    transform: translateY(38px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* rise, overshoot a touch, then settle: playful without ever tilting */
@keyframes media-settle {
  0% {
    opacity: 0;
    transform: translateY(48px) scale(0.94);
  }
  70% {
    opacity: 1;
    transform: translateY(-6px) scale(1.012);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes plan-pop {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  70% {
    opacity: 1;
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes receipt-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* hero entrance, staggered */
  .hero-inner > * {
    animation: hero-rise 0.85s var(--ease-out) both;
  }

  .hero-inner > .mark {
    animation: mark-pop 0.9s var(--spring) both;
  }

  .hero-inner > :nth-child(1) { animation-delay: 0.05s; }
  .hero-inner > :nth-child(2) { animation-delay: 0.16s; }
  .hero-inner > :nth-child(3) { animation-delay: 0.26s; }
  .hero-inner > :nth-child(4) { animation-delay: 0.38s; }
  .hero-inner > :nth-child(5) { animation-delay: 0.5s; }
  .hero-inner > :nth-child(6) { animation-delay: 0.62s; }

  .hero-scene {
    animation: scene-fade 1.6s ease 0.35s both;
  }

  .confetti {
    animation: bob var(--dur, 7s) ease-in-out var(--del, 0s) infinite alternate;
  }

  /* the icon's story, played once: the plan sits unlit for a beat,
     then the big room lights up warm and the halo blooms, then breathes */
  .hero .mark .icon-room {
    transform-box: fill-box;
    transform-origin: center;
    animation: room-light 0.55s var(--ease-out) 1s both;
  }

  .hero .mark .icon-glow {
    animation: halo-bloom 0.65s var(--ease-out) 1.05s both, breathe 4.5s ease-in-out 2.1s infinite alternate;
  }

  .plan .plan-glow {
    animation: breathe 5s ease-in-out infinite alternate;
  }

  .plan .plan-lit {
    animation: lit-breathe 5s ease-in-out infinite alternate;
  }

  .night-plan .icon-glow {
    animation: breathe 4.5s ease-in-out infinite alternate;
  }

  .swash-line path {
    animation: swash-draw 0.8s var(--ease-out) 1.05s both;
  }

  .pill {
    animation: shimmer 6s linear infinite;
  }

  .card-feature:hover .mini,
  .feature.night:hover .mini {
    animation: wiggle 0.55s ease;
  }

  .page-hero > .mark {
    animation: mark-pop 0.9s var(--spring) both;
  }

  .page-hero > h1 {
    animation: hero-rise 0.85s var(--ease-out) 0.12s both;
  }

  .page-hero > .fine {
    animation: hero-rise 0.85s var(--ease-out) 0.22s both;
  }

  .page .lead {
    animation: hero-rise 0.85s var(--ease-out) 0.3s both;
  }

  /* scroll driven reveals, scrubbed by each element's own viewport entry */
  @supports (animation-timeline: view()) {
    .feature.shot .copy {
      animation: reveal-rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 42%;
    }

    .feature.shot .shot-media {
      animation: media-settle 1ms linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 48%;
    }

    .feature.night .copy {
      animation: reveal-rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 8% entry 45%;
    }

    .night-plan {
      animation: plan-pop 1ms linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 52%;
    }

    .duo > .card-feature:nth-child(1) {
      animation: reveal-rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 38%;
    }

    .duo > .card-feature:nth-child(2) {
      animation: reveal-rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 14% entry 50%;
    }

    .quiet {
      animation: receipt-in 1ms linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }

    .qa-grid .qa:nth-child(odd) {
      animation: reveal-rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 36%;
    }

    .qa-grid .qa:nth-child(even) {
      animation: reveal-rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 12% entry 46%;
    }
  }
}

/* smooth cross fades between pages, with the brand morphing in the corner */
@view-transition {
  navigation: auto;
}

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

  html {
    scroll-behavior: auto;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
