/* Yaad · All your apps, one chat.
   Chalk page, deep ink, one marigold thread. Telegram's own colours appear only inside the phone. */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --ink: #14162b;
  --muted: #5d6180;
  --line: #e2e4ee;
  --marigold: #f2a20c;
  --marigold-ink: #8a5300;
  --marigold-wash: #fff3dc;
  /* inside the phone: Telegram's light theme */
  --tg-bg: #dfe8f1;
  --tg-out: #e5ffd2;
  --tg-in: #ffffff;
  --tg-blue: #2aabee;
  --wa: #25d366;
  --slack: #611f69;
  --radius: 22px;
  --serif: "Tiro Devanagari Hindi", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12142a;
    --surface: #1b1e38;
    --ink: #f1f2fa;
    --muted: #a4a8c8;
    --line: #2c3054;
    --marigold-ink: #ffc65a;
    --marigold-wash: #2e2717;
    --tg-bg: #0e1621;
    --tg-out: #2b5278;
    --tg-in: #182533;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.01em; }
p { margin: 0; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 6px; }

main > section { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------- top ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1120px; margin: 0 auto; padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.mark { text-decoration: none; font-weight: 600; letter-spacing: 0.02em; display: inline-flex; gap: 8px; align-items: baseline; }
.mark span { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--marigold-ink); }
.top-cta { font-size: 0.95rem; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--marigold); padding-bottom: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform 150ms ease-out; }
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-quiet { box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-marigold { background: var(--marigold); color: #1d1300; }

/* ---------- 1 · hero ---------- */
.hero {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(32px, 5vw, 64px);
  align-items: center; min-height: calc(100svh - 70px); padding-top: 24px !important; padding-bottom: 56px !important;
}
/* The one flourish: the word itself, huge and soft, behind the phone. */
.hero::before {
  content: "याद"; position: absolute; right: -2vw; top: 50%; translate: 0 -54%; z-index: -1;
  font-family: var(--serif); font-size: clamp(14rem, 34vw, 30rem); line-height: 1;
  color: var(--marigold-wash); pointer-events: none; user-select: none;
}
@media (prefers-color-scheme: dark) { .hero::before { color: #1d1f3d; } }
.kicker { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.25rem; }
.kicker span { font-style: normal; color: var(--marigold-ink); }
h1 { font-size: clamp(3.1rem, 7.4vw, 6rem); line-height: 0.95; margin-top: 18px; }
.lede { margin-top: 24px; max-width: 34rem; font-size: 1.25rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.channels { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.95rem; color: var(--muted); }
.ch { display: inline-flex; align-items: center; gap: 8px; }
.ch em { font-style: normal; font-size: 0.8rem; padding: 1px 8px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); }
.ch-live { color: var(--ink); font-weight: 600; }
.ch-live .dot { background: var(--tg-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tg-blue) 22%, transparent); }

/* ---------- the phone ---------- */
.phone {
  width: min(330px, 100%); margin-left: auto; border-radius: 44px; padding: 10px;
  background: var(--ink); box-shadow: 0 40px 80px -40px rgb(20 22 43 / 0.55);
}
.phone-bar { display: flex; gap: 10px; align-items: center; padding: 14px 16px 12px; background: var(--tg-in); border-radius: 34px 34px 0 0; color: var(--ink); }
.phone-bar b { display: block; font-size: 0.95rem; line-height: 1.1; }
.phone-bar small { color: var(--muted); font-size: 0.75rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--marigold); color: #1d1300; font-family: var(--serif); font-size: 1.15rem; }
.chat { background: var(--tg-bg); border-radius: 0 0 34px 34px; padding: 14px 12px 22px; display: flex; flex-direction: column; gap: 8px; min-height: 420px; font-size: 0.92rem; line-height: 1.4; }
.msg { max-width: 84%; padding: 8px 12px; border-radius: 16px; background: var(--tg-in); color: var(--ink); box-shadow: 0 1px 1px rgb(0 0 0 / 0.08); }
.msg.me { align-self: flex-end; background: var(--tg-out); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; border-bottom-left-radius: 5px; }
.msg.card { padding: 6px 6px 10px; }
.msg.card p { padding: 8px 6px 4px; }
.poster { height: 128px; border-radius: 11px; display: flex; align-items: flex-end; padding: 10px; font-weight: 600; letter-spacing: 0.12em; font-size: 0.78rem; line-height: 1.2; }
.p-dune { background: #d9b489; color: #3b2510; }
.p-pushpa { background: #9e2b25; color: #ffd27a; }
.app-tag { display: inline-block; margin: 2px 6px 0; font-size: 0.72rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.note .app-tag { margin: 6px 0 0; }
.app-tag.marquee { background: #fdeef4; color: #b0466f; }
.app-tag.journal { background: #eaf0fd; color: #1f3a8f; }
.choices { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.choices span { text-align: center; font-size: 0.82rem; padding: 6px; border-radius: 9px; background: color-mix(in srgb, var(--tg-blue) 14%, transparent); color: var(--tg-blue); font-weight: 600; }

/* ---------- section titles ---------- */
h2 { font-size: clamp(2.1rem, 4.8vw, 3.7rem); line-height: 1.04; max-width: 18ch; text-wrap: balance; }
.problem h2 { max-width: 24ch; }
h2 i { color: var(--marigold-ink); }
.section-lede { margin-top: 20px; max-width: 38rem; color: var(--muted); font-size: 1.2rem; }

/* ---------- 2 · problem ---------- */
.problem { padding-top: clamp(64px, 10vw, 128px) !important; padding-bottom: clamp(48px, 8vw, 96px) !important; }
.graveyard { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.graveyard li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); filter: grayscale(1); opacity: 0.62;
}
.graveyard li:nth-child(odd) { opacity: 0.48; }
.graveyard .ico { grid-row: span 2; font-size: 1.6rem; }
.graveyard b { font-weight: 600; }
.graveyard small { color: var(--muted); font-size: 0.88rem; }
.graveyard-note { margin-top: 28px; font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--muted); max-width: 40rem; }

/* ---------- 3 · story ---------- */
.story { padding-top: clamp(48px, 8vw, 96px) !important; }
.story-title { font-size: clamp(3rem, 8vw, 6rem); color: var(--ink); }
.story-title::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 20px; border-radius: 4px; background: var(--marigold); }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(32px, 6vw, 96px); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.45; transition: opacity 300ms ease-out; counter-increment: step; }
.step.on { opacity: 1; }
.step h3 { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; }
.step h3::before { content: counter(step); display: block; font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--marigold-ink); margin-bottom: 10px; }
.step p { margin-top: 14px; max-width: 30rem; color: var(--muted); font-size: 1.15rem; }
.story-phone { position: sticky; top: 12vh; align-self: start; padding: 4vh 0; }
.story-phone .chat { min-height: 560px; justify-content: flex-end; }
/* Like a real chat: unsent messages take no space; new ones arrive at the bottom. */
.js [data-at]:not(.shown) { display: none; }
.js [data-at].shown { animation: arrive 360ms ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(12px) scale(0.98); } }

/* ---------- 4 · one bot, real apps ---------- */
.apps { padding-top: clamp(80px, 12vw, 144px) !important; padding-bottom: clamp(48px, 8vw, 96px) !important; }
.hub { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(40px, 0.8fr) auto minmax(40px, 0.8fr) minmax(0, 1.2fr); align-items: center; }
.hub-col { display: flex; flex-direction: column; gap: 14px; }
.threads { width: 100%; height: 240px; overflow: visible; }
.threads path { fill: none; stroke: var(--marigold); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.threads path.dim { stroke: var(--line); stroke-dasharray: 4 6; }
.node { display: block; padding: 14px 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.node.chan { color: var(--muted); }
.node.chan.live { color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--tg-blue); }
.node.yaad { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 2.4rem; color: var(--marigold-ink); background: var(--marigold-wash); box-shadow: inset 0 0 0 2.5px var(--marigold); }
.node.app b { display: block; font-weight: 600; }
.node.app small { color: var(--muted); font-size: 0.85rem; }
a.node.app:hover { box-shadow: inset 0 0 0 1.5px var(--marigold); }
.node.app.next { opacity: 0.45; box-shadow: inset 0 0 0 1px var(--line); border: 1px dashed transparent; }

/* ---------- 5 · channels ---------- */
.channels-section { padding-top: clamp(48px, 8vw, 96px) !important; padding-bottom: clamp(48px, 8vw, 96px) !important; }
.ch-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.ch-card { position: relative; padding: 26px 24px 64px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ch-card h3 { font-family: var(--serif); font-size: 1.7rem; }
.ch-card p { margin-top: 10px; color: var(--muted); }
.ch-card::before { content: ""; display: block; width: 28px; height: 28px; border-radius: 9px; margin-bottom: 18px; }
.ch-card.tg::before { background: var(--tg-blue); }
.ch-card.wa::before { background: var(--wa); }
.ch-card.sl::before { background: var(--slack); }
.pill { position: absolute; left: 24px; bottom: 22px; font-size: 0.8rem; font-weight: 600; padding: 3px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.pill.live { background: color-mix(in srgb, var(--tg-blue) 14%, transparent); box-shadow: none; color: #137cb3; }

/* ---------- 6 · builders ---------- */
.builders { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; padding-top: clamp(48px, 8vw, 96px) !important; padding-bottom: clamp(48px, 8vw, 96px) !important; }
.code { margin: 0; padding: 26px 28px; border-radius: var(--radius); background: #14162b; color: #e8e9f5; font: 400 0.95rem/1.7 ui-monospace, "SF Mono", Menlo, monospace; overflow-x: auto; }
.code .c { color: #8b90b8; }
.code .s { color: #ffc65a; }

/* ---------- 7 · trust ---------- */
.trust { padding-top: clamp(32px, 6vw, 64px) !important; padding-bottom: clamp(48px, 8vw, 96px) !important; }
.trust ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; border-top: 1px solid var(--line); padding-top: 36px; }
.trust li { color: var(--muted); font-size: 1rem; }
.trust b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.trust b::before { content: "✦ "; color: var(--marigold); }

/* ---------- 8 · start ---------- */
.start { text-align: center; padding-top: clamp(80px, 12vw, 160px) !important; padding-bottom: clamp(80px, 12vw, 160px) !important; }
.start h2 { margin: 0 auto; max-width: 14ch; font-size: clamp(2.6rem, 6.5vw, 5rem); }
.start h2 span { color: var(--marigold-ink); }
.start p { margin: 22px auto 34px; color: var(--muted); font-size: 1.2rem; }

.foot { max-width: 1120px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.foot span:first-child span { font-family: var(--serif); color: var(--marigold-ink); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 32px !important; }
  .hero-phone .phone { margin: 0 auto; }
  .graveyard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-grid { grid-template-columns: 1fr; }
  .story-phone { position: sticky; top: 64px; order: -1; z-index: 2; padding: 8px 0; background: var(--bg); }
  .story-phone .phone { margin: 0 auto; width: min(300px, 100%); }
  .story-phone .chat { min-height: 0; height: 34svh; overflow: hidden; }
  /* Text sits in the lower part of the screen, under the sticky phone. */
  .step { min-height: 85svh; justify-content: flex-end; padding-bottom: 8svh; }
  .hub { grid-template-columns: 1fr; gap: 14px; justify-items: stretch; }
  .hub .threads { display: none; }
  .hub-col:first-child { flex-direction: row; flex-wrap: wrap; }
  .node.yaad { margin: 8px auto; width: 96px; height: 96px; }
  .ch-cards, .builders { grid-template-columns: 1fr; }
  .trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .graveyard, .trust ul { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step { opacity: 1; transition: none; }
  .js [data-at].shown { animation: none; }
  .btn { transition: none; }
}
