/*
 * The landing page. Rules from .agents/skills (emil-design-eng, apple-design):
 * - type: the system font; big headings tight (negative tracking, 1.05 leading), body loose;
 * - space: an 8 px rhythm; sections breathe (12–16 units apart);
 * - glass: blur + saturate, a faint fill and a bright top edge; never glass on glass;
 * - motion: strong ease-out, under 300 ms for anything you touch; sections rise in once;
 * - hover only where there is a real pointer; every press gives way a touch (0.97).
 */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --edge: inset 0 1px 0 rgb(255 255 255 / 0.14);
  --blur: blur(22px) saturate(160%);
  --page: min(1120px, 100% - 40px);
}
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body.landing {
  overflow-x: hidden;
  background:
    radial-gradient(70rem 40rem at 85% -10%, rgb(124 92 255 / 0.22), transparent 60%),
    radial-gradient(60rem 36rem at -10% 20%, rgb(255 94 135 / 0.14), transparent 60%),
    radial-gradient(50rem 40rem at 50% 110%, rgb(255 163 90 / 0.10), transparent 60%),
    var(--canvas);
}
/* Parked above the page, not beside it: a link pushed off to the side widens a right-to-left page. */
.skip { position: absolute; top: -100px; inset-inline-start: 16px; }
.skip:focus { top: 16px; z-index: 20; background: var(--ink); color: var(--canvas); padding: 8px 12px; border-radius: 10px; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 6px; }

/* ── type ── */
.landing h1 { font: 700 clamp(2.4rem, 7.2vw, 4.6rem)/1.03 var(--display); letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.landing h2 { font: 700 clamp(1.9rem, 4.6vw, 3rem)/1.08 var(--display); letter-spacing: -0.028em; margin: 0 0 calc(var(--space) * 5); max-width: 18ch; text-wrap: balance; }
.landing h3 { font: 650 1.15rem/1.3 var(--display); letter-spacing: -0.01em; margin: 0 0 var(--space); }
.landing p { margin: 0; color: var(--ink2); }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rose) !important; margin-bottom: calc(var(--space) * 1.5) !important; }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); max-width: 36ch; margin-top: calc(var(--space) * 2.5) !important; }

/* ── controls ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font-weight: 650; text-decoration: none; color: #1a1418;
  background: linear-gradient(135deg, var(--amber), var(--rose) 55%, var(--violet));
  box-shadow: 0 8px 28px rgb(255 94 135 / 0.35);
  transition: transform 160ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-quiet { background: var(--glass); color: var(--ink); box-shadow: var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: 0 10px 36px rgb(255 94 135 / 0.5); }
  .btn-quiet:hover { box-shadow: var(--edge), 0 6px 24px rgb(0 0 0 / 0.3); }
}

/* ── top bar: a translucent layer the page scrolls under ── */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  padding: 12px max(20px, (100% - 1120px) / 2);
  background: rgb(5 4 7 / 0.55); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-edge);
}
.topbar nav { display: flex; gap: 22px; margin-inline-start: auto; font-size: 0.95rem; }
.topbar nav a { color: var(--ink2); text-decoration: none; }
.topbar nav a:hover { color: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
/* The app's mark (the glass doorway): it brings its own glow. */
.brand-mark { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 0 10px rgb(255 94 135 / 0.35)); }

/* ── hero: the picture, the line, and a phone that's already buzzing ── */
.hero {
  position: relative; width: var(--page); margin: 0 auto; min-height: min(860px, 100svh - 64px);
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; padding: 64px 0 80px;
}
/* Full-bleed, centred from the left edge: setting both sides and a width over-constrains the box, and a
   right-to-left page then drops `left` and pushes the picture sideways. */
.hero-art {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100vw; max-width: none; height: 100%; object-fit: cover; z-index: -1;
  opacity: 0.55; mask-image: linear-gradient(to bottom, #000 40%, transparent 98%); -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 98%);
}
.hero::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 100vw; z-index: -1;
  background: linear-gradient(90deg, rgb(5 4 7 / 0.92) 0%, rgb(5 4 7 / 0.6) 55%, rgb(5 4 7 / 0.2) 100%);
}
/* The shade sits behind the words: on their side in a right-to-left page. */
[dir='rtl'] .hero::before { background: linear-gradient(270deg, rgb(5 4 7 / 0.92) 0%, rgb(5 4 7 / 0.6) 55%, rgb(5 4 7 / 0.2) 100%); }
.badge {
  display: inline-block; padding: 6px 12px; margin-bottom: 20px !important; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  color: var(--ink) !important; background: var(--glass); box-shadow: var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.phone { margin: 0; justify-self: center; width: min(340px, 100%); }
.phone-screen {
  border-radius: 44px; padding: 14px; aspect-ratio: 9 / 18.5;
  background: rgb(18 15 22 / 0.72); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgb(255 255 255 / 0.1); box-shadow: var(--edge), 0 30px 80px rgb(0 0 0 / 0.6), 0 0 120px rgb(124 92 255 / 0.25);
  display: flex; flex-direction: column;
}
.chat-top { display: flex; align-items: center; gap: 10px; padding: 10px 8px 14px; border-bottom: 1px solid var(--glass-edge); }
.chat-top img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.chat-top b { display: block; font-size: 0.95rem; }
.chat-top span { font-size: 0.75rem; color: var(--live, #7dffb3); }
.chat { list-style: none; margin: 0; padding: 14px 4px; display: flex; flex-direction: column; gap: 8px; flex: 1; justify-content: flex-end; font-size: 0.92rem; }
.chat li { max-width: 80%; padding: 9px 13px; border-radius: 20px; line-height: 1.35; }
.chat .them { align-self: flex-start; background: rgb(42 39 46 / 0.85); border-end-start-radius: 6px; }
.chat .me { align-self: flex-end; background: linear-gradient(135deg, var(--rose), var(--violet)); color: #fff; border-end-end-radius: 6px; }
.chat .voice { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.play { width: 0; height: 0; border-left: 10px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.wave { flex: 1; height: 18px; background: repeating-linear-gradient(90deg, var(--ink2) 0 2px, transparent 2px 5px); mask-image: linear-gradient(90deg, #000 20%, rgb(0 0 0 / 0.5)); -webkit-mask-image: linear-gradient(90deg, #000 20%, rgb(0 0 0 / 0.5)); }
.voice span:last-child { font-size: 0.75rem; color: var(--ink3); }
.typing { align-self: flex-start; display: flex; gap: 4px; background: rgb(42 39 46 / 0.85); }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink2); animation: dot 1.2s infinite var(--ease-out); }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.phone figcaption { margin-top: 14px; text-align: center; font-size: 0.85rem; color: var(--ink3); }

/* ── bands ── */
.band { width: var(--page); margin: 0 auto; padding: 112px 0 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li, .promises li, .feature, .plan, .faq details {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius); box-shadow: var(--edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.steps li { padding: 28px; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 18px; border-radius: 50%; font-weight: 700; color: #1a1418; background: linear-gradient(135deg, var(--amber), var(--rose)); }

.worlds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.world { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--glass-edge); background: rgb(18 15 22 / 0.7); }
.world-cover { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.world-body { padding: 22px 24px 26px; }
.world-body > p:not(.eyebrow) { min-height: 3em; }
.cast { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; padding: 0; margin: 18px 0 0; }
.cast li { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink2); }
.cast img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: top; border: 1px solid var(--glass-edge); }
.cast-name span { padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.06); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { padding: 26px; }
.feature-wide { grid-column: span 2; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.feature-wide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feature-wide div { padding: 22px 26px 26px; }

.promises { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.promises li { padding: 26px; }
.promise-links a { color: var(--ink); line-height: 1.9; }
.chat .when { align-self: center; max-width: none; padding: 2px 10px; font-size: 0.72rem; color: var(--ink3); }

.region { display: inline-flex; padding: 4px; gap: 4px; margin-bottom: 24px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-edge); }
.region button { border: 0; border-radius: 999px; padding: 8px 16px; font: 600 0.9rem var(--font); color: var(--ink2); background: transparent; cursor: pointer; transition: background 200ms var(--ease-out), color 200ms var(--ease-out); }
.region button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { padding: 28px; }
.plan-pick { border-color: rgb(255 94 135 / 0.5); box-shadow: var(--edge), 0 0 60px rgb(255 94 135 / 0.18); }
.price { margin: 6px 0 18px !important; color: var(--ink3) !important; }
.price span { font: 700 2rem/1.1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--ink2); }
.plan li::before { content: '✓'; color: var(--rose); margin-inline-end: 10px; }
.note { margin-top: 20px !important; font-size: 0.9rem; color: var(--ink3) !important; }

.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details { padding: 0 24px; }
.faq summary { cursor: pointer; padding: 20px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--rose); font-size: 1.3rem; line-height: 1; transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; }

.site-foot {
  width: var(--page); margin: 128px auto 0; padding: 40px 0 56px; border-top: 1px solid var(--glass-edge);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; font-size: 0.9rem; color: var(--ink3);
}
.site-foot p { margin-top: 10px !important; color: var(--ink3) !important; }
.site-foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 28px; }
.site-foot nav a { color: var(--ink2); text-decoration: none; }
.site-foot nav a:hover { color: var(--ink); text-decoration: underline; }
/* Every language, each named in itself: a crawlable path to each version, and a way back for a person. */
.site-foot .langs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 24px; border-top: 1px solid var(--glass-edge); font-size: 0.85rem; }
.site-foot .langs a[aria-current] { color: var(--ink); }

/* ── entering: once, as each section is reached (only when the script runs) ── */
[data-reveal] { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(24px); }
/* From one inset to another: a transition to `none` can't interpolate, and the picture would pop. */
.world-cover, .feature-wide img { clip-path: inset(0 0 0 0); transition: clip-path 900ms var(--ease-out) 120ms; }
.js [data-reveal]:not(.in) :is(.world-cover, .feature-wide img) { clip-path: inset(0 0 100% 0); }

/* ── smaller screens ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 40px; min-height: 0; }
  .hero::before { background: linear-gradient(180deg, rgb(5 4 7 / 0.55), rgb(5 4 7 / 0.92) 70%); }
  .steps, .promises, .plans { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .band { padding-top: 88px; }
}
@media (max-width: 640px) {
  .topbar nav { display: none; }
  .topbar .btn-small { margin-inline-start: auto; }
  .worlds, .features { grid-template-columns: 1fr; }
  .feature-wide { grid-column: auto; }
  .site-foot nav { grid-template-columns: 1fr; }
  .region { display: flex; flex-wrap: wrap; border-radius: 22px; }
}
