/* Landing page: one floating Recto card on a dark stage, lit from the top left. */
:root { color-scheme: dark; --bg: #0C0B0A; --text: #F2F1EF; --dim: #8D8C8A; }
body.home {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  display: flex; flex-direction: column;
}
body.home a { color: inherit; }

/* The beam: a soft cone of light from the top left */
.beam { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.beam::before {
  content: ""; position: absolute; inset: -10%; filter: blur(28px);
  background: conic-gradient(from 112deg at 0% 0%, transparent 0deg, rgba(255, 236, 222, 0.1) 8deg, rgba(255, 236, 222, 0.3) 18deg, rgba(255, 228, 210, 0.07) 30deg, transparent 40deg);
  -webkit-mask: radial-gradient(130% 130% at 0% 0%, #000 20%, transparent 85%); mask: radial-gradient(130% 130% at 0% 0%, #000 20%, transparent 85%);
  animation: breathe 9s ease-in-out infinite alternate;
}
.beam::after { /* where the light lands */
  content: ""; position: absolute; left: 10vw; top: 6vh; width: 55vw; height: 55vh; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(181, 40, 26, 0.16), transparent); filter: blur(40px);
}
@keyframes breathe { from { opacity: 0.75; } to { opacity: 1; } }
body.home::after { /* film grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0.05; mix-blend-mode: screen;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top, .stage-wrap, .bottom { position: relative; z-index: 1; }
.top { padding: 26px 32px; }
.wordmark { font-size: 17px; font-weight: 600; letter-spacing: -0.03em; text-decoration: none; background: none; }

.stage-wrap { max-width: none; margin: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 24px 40px; perspective: 1400px; }

/* Card */
.bob { width: 100%; max-width: 1040px; animation: bob 8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.card {
  --rx: 0deg; --ry: 0deg; --tx: 0px; --ty: 0px; --shine: 0.5; --px: 30%; --py: 0%;
  position: relative; border-radius: 34px; padding: 40px 48px; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; min-height: 560px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(214, 70, 48, 0.55), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(10, 4, 3, 0.85), transparent 70%),
    linear-gradient(150deg, #A3271A 0%, #6E170E 45%, #2A0A06 100%);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.9), 0 0 80px -20px rgba(181, 40, 26, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translate3d(var(--tx), var(--ty), 0) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: enter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes enter { from { opacity: 0; translate: 0 40px; scale: 0.96; } }
.card.live { transition: transform 0.15s ease-out; }
/* Glass rim: a 1.5px border that brightens toward the light */
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 3;
  background:
    radial-gradient(260px circle at var(--px) var(--py), rgba(255, 240, 230, calc(0.25 + var(--shine) * 0.55)), transparent 70%),
    linear-gradient(135deg, rgba(255, 235, 225, calc(0.18 + var(--shine) * 0.5)), rgba(255, 255, 255, 0.05) 35%, rgba(255, 255, 255, 0.02) 65%, rgba(255, 180, 160, calc(0.04 + (1 - var(--shine)) * 0.12)));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: opacity 0.4s;
}
/* Glare across the glass face */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background:
    radial-gradient(600px circle at var(--px) var(--py), rgba(255, 230, 215, calc(var(--shine) * 0.12)), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 30%);
}

.copy { position: relative; z-index: 4; display: flex; flex-direction: column; height: 100%; justify-content: space-between; gap: 40px; }
.app { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.app img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.card h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 18px; }
.card h1 span { color: rgba(255, 225, 215, 0.6); }
.card .sub { font-size: 18px; line-height: 1.5; color: rgba(255, 236, 230, 0.78); max-width: 34ch; margin: 0; }
.soon { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 12px 20px; border-radius: 14px; font-size: 15px; font-weight: 600;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.soon .pulse { width: 8px; height: 8px; border-radius: 50%; background: #FF6A55; position: relative; }
.soon .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #FF6A55; animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { transform: scale(2.8); opacity: 0; } }

/* Phone demo */
.demo { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 16px; transform: translateZ(40px); }
.phone { width: 252px; height: 512px; border-radius: 44px; padding: 10px; background: #0E0D0C; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 40px 70px -30px rgba(0, 0, 0, 0.85); }
.screen { position: relative; height: 100%; border-radius: 35px; overflow: hidden; padding: 46px 18px 18px; background: #E3E1DD; color: #1D1C1B; font-size: 11.5px; line-height: 1.45; transition: background 0.8s ease; }
.screen::before { content: ""; position: absolute; top: 11px; left: 50%; width: 74px; height: 21px; margin-left: -37px; border-radius: 12px; background: #000; }
.clean .screen { background: #F3F2F0; }
.screen .t { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; transition: color 0.6s ease; }
.clean .screen .t { color: #B5281A; }
.photo { height: 0; border-radius: 12px; margin: 0; background: linear-gradient(135deg, #E9C46A, #D9822B 55%, #B5281A); opacity: 0; transition: height 0.7s cubic-bezier(0.6, 0, 0.3, 1) 0.15s, opacity 0.5s ease 0.2s, margin 0.7s ease 0.15s; }
.clean .photo { height: 86px; opacity: 1; margin-bottom: 12px; }
.junk { overflow: hidden; max-height: 140px; margin-bottom: 10px; transition: max-height 0.7s cubic-bezier(0.6, 0, 0.3, 1), opacity 0.4s ease, margin 0.7s ease; }
.clean .junk { max-height: 0; opacity: 0; margin-bottom: 0; }
.ad { height: 52px; border-radius: 6px; background: repeating-linear-gradient(135deg, #CDCAC4 0 8px, #D8D5D0 8px 16px); display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #8D8A85; }
.story i { display: block; height: 7px; border-radius: 4px; background: #C6C3BE; margin-bottom: 7px; }
.story i:nth-child(3n) { width: 82%; } .story i:nth-child(4n) { width: 64%; }
.popup { position: absolute; left: 14px; right: 14px; bottom: 20px; padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); font-weight: 600; text-align: center; transition: transform 0.6s cubic-bezier(0.6, 0, 0.3, 1), opacity 0.4s; }
.popup small { display: block; margin-top: 8px; padding: 7px; border-radius: 8px; background: #2E6BE6; color: #fff; }
.clean .popup { transform: translateY(150%); opacity: 0; }
.recipe .label { font-size: 9.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #6F6E6C; margin: 10px 0 6px; }
.recipe ul, .recipe ol { margin: 0; padding: 0; list-style: none; }
.recipe li { margin: 0 0 5px; padding-left: 14px; position: relative; opacity: 0.3; transform: translateX(-4px); transition: opacity 0.5s ease, transform 0.5s ease; }
.recipe ul li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: #B5281A; }
.recipe ol { counter-reset: s; } .recipe ol li { counter-increment: s; }
.recipe ol li::before { content: counter(s); position: absolute; left: 0; font-weight: 700; color: #B5281A; }
.clean .recipe li { opacity: 1; transform: none; }
.clean .recipe li:nth-child(2) { transition-delay: 0.08s; } .clean .recipe li:nth-child(3) { transition-delay: 0.16s; } .clean .recipe li:nth-child(4) { transition-delay: 0.24s; }
.caption { font-size: 13px; height: 1.6em; position: relative; width: 240px; text-align: center; color: rgba(255, 236, 230, 0.7); }
.caption span { position: absolute; inset: 0; transition: opacity 0.5s ease, transform 0.5s ease; }
.caption .after, .clean .caption .before { opacity: 0; transform: translateY(6px); }
.clean .caption .after { opacity: 1; transform: none; }

/* Under the card, and the page foot */
.under { margin-top: 30px; font-size: 15px; color: var(--dim); animation: enter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both; }
.under a { margin: 0 12px; color: var(--dim); }
.under a:hover { color: var(--text); }
.bottom { padding: 28px 32px; font-size: 13px; color: var(--dim); text-align: center; }

@media (max-width: 820px) {
  .top { padding: 22px 20px; }
  .stage-wrap { padding: 12px 16px 32px; }
  .card { grid-template-columns: 1fr; padding: 28px 24px 32px; border-radius: 28px; min-height: 0; gap: 36px; }
  .copy { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .bob, .card, .under, .beam::before { animation: none; }
}
