/* Offdoor "coming soon" page (offdoor.app). Tokens from UI.md §3.
   No form, no cookies, no third-party requests: fonts are served from here. */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/Poppins_400Regular.ttf) format('truetype'); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(fonts/Poppins_500Medium.ttf) format('truetype'); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(fonts/Poppins_600SemiBold.ttf) format('truetype'); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(fonts/Poppins_700Bold.ttf) format('truetype'); }

:root {
  --pink: #ED5E93;
  --bg: #FFFFFF; --surface: #F4F4F7;
  --line: rgba(0,0,0,.12); --text: #000000; --muted: #5F5F66;
  --accent-text: #C2336B;
  --side: 20px;
  /* A soft spring (no overshoot bounce), as a CSS easing. */
  --spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --surface: #1C1C1E;
    --line: rgba(255,255,255,.16); --text: #F4F5FA; --muted: #A8A8AE;
    --accent-text: #ED5E93;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.5 Poppins, -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--side); }
.brand { display: flex; align-items: center; gap: 10px; height: 64px; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--out), transform 1.1s var(--out); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
.d1 { --d: .1s; } .d2 { --d: .2s; }
/* Line-by-line masked text */
.lines > span { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.lines > span > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--out); transition-delay: calc(var(--i, 0) * .09s + var(--d, 0s)); }
.lines.in > span > span { transform: none; }

/* ---------- The door scene ---------- */
.scene { position: relative; height: 290vh; background: var(--pink); }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; color: #fff; }
.top { position: absolute; z-index: 6; top: env(safe-area-inset-top); left: 0; right: 0; }

.t1 { position: absolute; left: 0; right: 0; top: calc(64px + env(safe-area-inset-top) + 2svh); text-align: center; padding: 0 var(--side); will-change: opacity, transform, filter; }
.t1 p { margin: 0 0 10px; font-weight: 500; font-size: 15px; opacity: .9; }
.t1 h1 { margin: 0 auto; font-weight: 700; letter-spacing: -.035em; line-height: 1.02; font-size: clamp(34px, 8.6vw, 66px); max-width: 14ch; }
@media (min-width: 760px) { .t1 h1 { max-width: 22ch; font-size: clamp(40px, 5.4vw, 64px); } }

/* Soft glow breathing on the pink before you scroll */
.aura { position: absolute; left: 50%; top: 60%; width: 120vmin; height: 120vmin; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.22), transparent 70%); animation: breathe 5s ease-in-out infinite; pointer-events: none; }
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.08); opacity: .7; } }

.zoom { position: absolute; left: 50%; top: 60%; width: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.frame {
  --h: 400px; height: var(--h); width: calc(var(--h) * .52);
  position: relative; transform: translate(-50%, -50%);
  border-radius: 16px 16px 4px 4px; perspective: 1400px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}
/* Behind the door, as in the app's entrance (DoorEntrance.tsx): the app's pink
   gradient, dim at first, then lit by the white-pink light from the opening. */
.inside { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: linear-gradient(135deg, #F47BA8, #E24C86); }
.dim { position: absolute; inset: 0; background: #000; opacity: .35; }
.bloom { position: absolute; inset: 0; opacity: 0; will-change: opacity, transform;
  background: linear-gradient(90deg, rgba(255,250,252,1) 0%, rgba(255,240,246,.85) 40%, rgba(255,230,240,0) 100%); transform-origin: left center; }
.t2 { position: absolute; inset: 0; display: grid; place-items: center; color: #111; text-align: center; font-weight: 700; letter-spacing: -.02em; font-size: calc(var(--h) * .068); line-height: 1.15; padding: 0 10%; opacity: 0; }
.t2 em { font-style: normal; color: #C2336B; }

.leaf { position: absolute; inset: 0; border-radius: inherit; transform-origin: right center; background: linear-gradient(135deg, #F47BA8, #E24C86); will-change: transform, opacity; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.leaf .panel { position: absolute; left: 14%; right: 14%; border-radius: 8px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); }
.leaf .pa { top: 9%; height: 34%; } .leaf .pb { bottom: 7%; height: 38%; }
.leaf .knob { position: absolute; left: 6%; top: 52%; width: 46%; transform: translateY(-50%); overflow: visible; }
.knob .lever { transform-box: view-box; transform-origin: 8.4px 12px; }
.shade { position: absolute; inset: 0; border-radius: inherit; background: #000; opacity: 0; pointer-events: none; }
/* The thin line of light under the closed door, and the light on the floor once open */
.gap { position: absolute; left: 4%; right: 4%; bottom: -3px; height: 3px; border-radius: 3px; background: #fff; box-shadow: 0 0 14px 3px rgba(255,255,255,.8); opacity: .55; animation: flicker 3.2s ease-in-out infinite; }
@keyframes flicker { 50% { opacity: .9; } }
.floor { position: absolute; left: -60%; right: -60%; top: 100%; height: 70%; transform-origin: top center; transform: scaleY(0);
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0));
  clip-path: polygon(37.5% 0, 62.5% 0, 100% 100%, 0 100%); opacity: 0; filter: blur(3px); }

.scroll-hint { position: absolute; bottom: calc(26px + env(safe-area-inset-bottom) + 56px); left: 50%; transform: translateX(-50%); font-size: 13px; opacity: .85; display: grid; justify-items: center; gap: 6px; }
.scroll-hint svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* The room you walk into: it arrives while you are still going through */
.room { position: absolute; inset: 0; z-index: 5; background: var(--bg); color: var(--text); opacity: 0; pointer-events: none; display: grid; align-content: center; justify-items: center; padding: calc(64px + env(safe-area-inset-top)) var(--side) calc(80px + env(safe-area-inset-bottom)); will-change: opacity, transform; overflow: hidden; }
.room.live { pointer-events: auto; }
.room .wash { position: absolute; inset: 0 0 auto; height: 70%; pointer-events: none;
  background: linear-gradient(180deg, rgba(244,123,168,.28), rgba(226,76,134,.1) 45%, rgba(226,76,134,0));
  animation: wash 7s ease-in-out infinite alternate; }
@keyframes wash { to { opacity: .6; transform: translateY(-4%); } }
.room .inner { position: relative; width: min(100%, 440px); display: grid; gap: 14px; text-align: center; }
.room h2 { margin: 0; font-size: clamp(46px, 12vw, 84px); letter-spacing: -.045em; line-height: 1; font-weight: 700; }
.room h2 .w { display: inline-block; overflow: hidden; padding-bottom: .06em; vertical-align: top; }
.room h2 .w span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--out); }
.room h2 .w + br + .w span { transition-delay: .08s; }
.room.t-in h2 .w span { transform: none; }
.room .lead { margin: 4px 0 10px; color: var(--muted); font-size: 17px; opacity: 0; transform: translateY(10px); transition: opacity .7s .12s, transform .9s .12s var(--out); }
.room.t-in .lead { opacity: 1; transform: none; }
.room .cta { display: grid; gap: 10px; justify-items: center; opacity: 0; transform: translateY(30px) scale(.97); transition: opacity .7s, transform 1.1s var(--spring); }
.room.c-in .cta { opacity: 1; transform: none; }
.room .brand-r { position: absolute; top: env(safe-area-inset-top); left: 0; right: 0; }
.room .brand { color: var(--text); }
@media (max-height: 700px) { .room h2 { font-size: 44px; } .room .lead { font-size: 15px; } }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: min(100%, 320px); height: 56px; padding: 0 28px; border-radius: 999px; text-decoration: none;
  background: var(--pink); color: #fff; font: 600 17px Poppins, sans-serif; overflow: hidden;
  transition: transform .5s var(--spring), filter .2s;
  box-shadow: 0 10px 24px -10px rgba(237,94,147,.8);
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(.97); transition-duration: .12s; }
.btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.btn .sheen { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); animation: sheen 3.6s 1.2s var(--out) infinite; }
@keyframes sheen { 0% { transform: translateX(-100%); } 30%, 100% { transform: translateX(100%); } }
.btn span { position: relative; }
/* Second choice (TikTok): same shape, quiet surface instead of pink */
.btn.alt { background: var(--surface); color: var(--text); box-shadow: none; }
.handle { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- After the door ---------- */
.after { background: var(--bg); position: relative; z-index: 1; }
section.how, section.safe { padding: 96px 0; }
section.safe { border-top: 1px solid var(--line); }
.kicker { color: var(--accent-text); font-weight: 600; font-size: 15px; margin: 0 0 10px; }
.big { margin: 0 0 44px; font-size: clamp(32px, 7.4vw, 56px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; max-width: 16ch; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .big-n { grid-row: span 2; font-size: clamp(64px, 16vw, 120px); line-height: .8; font-weight: 700; letter-spacing: -.06em; color: var(--pink); transform: translateY(30%) scale(.8); opacity: 0; transition: transform 1.2s var(--spring), opacity .6s; }
.step.in .big-n { transform: none; opacity: 1; }
.step h4 { margin: 0; font-size: clamp(22px, 5vw, 30px); font-weight: 600; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); font-size: 17px; max-width: 46ch; }
/* a pink line that draws itself down the steps as you scroll */
.how .wrap { position: relative; }
.rail { position: absolute; left: calc(var(--side) - 12px); top: 140px; bottom: 30px; width: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.rail i { position: absolute; inset: 0; background: var(--pink); transform-origin: top; transform: scaleY(var(--r, 0)); }
@media (max-width: 520px) { .rail { display: none; } }
.rows { max-width: 760px; }
.row { display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row b { display: block; font-weight: 600; font-size: 18px; margin-bottom: 2px; }
.row span { color: var(--muted); font-size: 16px; }
footer { padding: 40px 0 calc(48px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
footer .f { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  [data-reveal], .lines > span > span { opacity: 1 !important; transform: none !important; }
}

/* 404 page */
.nf-in { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 22px; text-align: center; }
.nf-in h1 { margin: 0; font-size: clamp(32px, 8vw, 52px); letter-spacing: -.03em; line-height: 1.05; }
