/* KnowWhere landing page. Builds on style.css (tokens, nav, buttons, footer).
   Flat backgrounds, one accent, one typeface, spacing and radius from the fixed scales. */

:root { --h-from: #000000; --h-to: #666666; }
@media (prefers-color-scheme: dark) { :root { --h-from: #ffffff; --h-to: #9b9b9b; } }

body.kw { overflow-x: clip; }
html:has(body.kw) { overflow-x: clip; }

/* reveal: a heavy fade up. Hidden only when JS is on, so the page reads without it. */
.js .rv {
  opacity: 0; transform: translateY(64px); filter: blur(12px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .rv.in { opacity: 1; transform: none; filter: blur(0); }

/* ---------- hero ---------- */
.kw-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--s600); align-items: center; min-height: 100dvh; padding-block: var(--s400) var(--s600); }
.kw-hero .copy { max-width: 680px; }
.label { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; padding: var(--s50) var(--s75); border-radius: var(--r-sm); background: var(--raised); color: var(--ink); margin-bottom: var(--s300); }
.kw-hero h1 {
  font-size: 36px; line-height: 40px; letter-spacing: -0.03em; margin-bottom: var(--s200);
  max-width: 680px;
}
.kw-hero h1 .grad { background: linear-gradient(90deg, var(--h-from), var(--h-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.u { position: relative; display: inline-block; }
.u svg { position: absolute; left: 0; bottom: -10px; width: 100%; height: 12px; overflow: visible; pointer-events: none; }
.u path { stroke: var(--accent); stroke-width: 4; fill: none; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 1.1s 0.9s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.kw-hero p.lead { font-size: 18px; line-height: 28px; color: var(--muted); max-width: 680px; margin: 0 0 var(--s400); }
.cta-row { display: flex; gap: var(--s200); align-items: center; flex-wrap: wrap; }
.cta-row .note { font-size: 14px; line-height: 20px; color: var(--muted); }
.proof { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s100) var(--s300); margin: var(--s500) 0 0; padding: 0; }
.proof li { display: flex; align-items: center; gap: var(--s75); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); }
.proof .ico { color: var(--accent); }
.langs { display: flex; gap: var(--s75); margin-top: var(--s300); }
.langs span { font-size: 14px; line-height: 20px; font-weight: 600; padding: var(--s50) var(--s100); border-radius: var(--r-lg); background: var(--surface); color: var(--muted); transition: all 500ms var(--ease); }
.langs span[data-on="true"] { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }

/* phone showing the real app */
.stage { display: grid; justify-items: center; gap: var(--s200); }
.phone {
  width: min(320px, 78vw); aspect-ratio: 390 / 844; padding: var(--s75); border-radius: var(--r-3xl);
  background: #181818; box-shadow: 0 32px 64px color-mix(in srgb, var(--accent) 28%, transparent);
  animation: float 8s ease-in-out infinite;
}
@media (prefers-color-scheme: dark) { .phone { background: #272727; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.screen { position: relative; width: 100%; height: 100%; border-radius: var(--r-2xl); overflow: hidden; background: var(--surface); }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 700ms var(--ease); }
.slide.on { opacity: 1; }
.slides-ctl { display: flex; align-items: center; gap: var(--s100); }
.dots { display: flex; gap: var(--s75); }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--r-full); background: var(--line); cursor: pointer; transition: all 500ms var(--ease); position: relative; }
.dots button::after { content: ""; position: absolute; inset: -18px -9px; }
.dots button[aria-current="true"] { width: 24px; background: var(--accent); }
.pause { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-full); background: var(--surface); color: var(--ink); cursor: pointer; transition: all 300ms var(--ease); position: relative; }
.pause::after { content: ""; position: absolute; inset: -6px; }
.pause:hover { background: var(--raised); }
.pause:active { transform: scale(0.96); }
.pause .ico { width: 16px; height: 16px; }
.pause .i-play { display: none; }
.pause[aria-pressed="true"] .i-play { display: block; }
.pause[aria-pressed="true"] .i-pause { display: none; }

/* ---------- sentence ribbons ---------- */
.ribbons { margin: 0 calc(50% - 50vw); overflow: hidden; padding: var(--s100) 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ribbon { display: flex; gap: var(--s100); width: max-content; padding: var(--s50) 0; animation: slide 50s linear infinite; }
.ribbon.rev { animation-direction: reverse; animation-duration: 62s; }
.ribbons:hover .ribbon { animation-play-state: paused; }
.ribbon span { white-space: nowrap; padding: var(--s100) var(--s200); border-radius: var(--r-lg); background: var(--surface); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- tagline reveal ---------- */
.tagline { padding: var(--s900) 0 var(--s700); }
.tagline p { max-width: 680px; margin: 0; font-size: 36px; line-height: 40px; letter-spacing: -0.03em; font-weight: 700; }
.tagline .w { color: color-mix(in srgb, var(--ink) 30%, transparent); transition: color 600ms var(--ease); }
.tagline .w.on { color: var(--ink); }
.tagline .w.hl.on { color: var(--accent); }

/* ---------- section heads ---------- */
.section { margin-top: var(--s900); }
.sec-head { max-width: 680px; margin-bottom: var(--s600); }
.sec-head h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.03em; margin: 0 0 var(--s100); }
.sec-head p { font-size: 18px; line-height: 28px; color: var(--muted); margin: 0; }

/* ---------- how it works: zig zag ---------- */
.zig { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s600); align-items: center; margin-bottom: var(--s800); }
.zig:nth-of-type(even) .art { order: -1; }
.zig .num { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent); margin-bottom: var(--s100); }
.zig h3 { font-size: 30px; line-height: 36px; letter-spacing: -0.02em; margin-bottom: var(--s100); }
.zig p { font-size: 18px; line-height: 28px; color: var(--muted); margin: 0; max-width: 480px; }
.art { position: relative; min-height: 360px; display: grid; place-items: center; border-radius: var(--r-3xl); background: var(--surface); overflow: hidden; }
.bars { display: flex; gap: var(--s75); align-items: center; height: 96px; }
.bars i { width: 8px; height: 96px; border-radius: var(--r-full); background: var(--accent); transform: scaleY(0.2); animation: eq 1.3s var(--ease) infinite; animation-delay: calc(var(--k) * 90ms); }
@keyframes eq { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(1); } }
.pin { width: 72px; height: 88px; animation: drop 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes drop { 0%, 55%, 100% { transform: translateY(0); } 15% { transform: translateY(-32px); } 30% { transform: translateY(0); } 40% { transform: translateY(-10px); } }
.pin-shadow { width: 48px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 22%, transparent); margin: var(--s50) auto 0; animation: sh 2.6s ease-in-out infinite; }
@keyframes sh { 0%, 55%, 100% { transform: scaleX(1); opacity: 0.7; } 15% { transform: scaleX(0.5); opacity: 0.35; } 30% { transform: scaleX(1); } }
.ask { display: grid; gap: var(--s100); width: min(300px, 80%); }
.ask b { display: block; padding: var(--s100) var(--s200); border-radius: var(--r-2xl); font-size: 16px; line-height: 24px; font-weight: 600; }
.ask b:first-child { background: var(--bg); justify-self: start; border-bottom-left-radius: var(--r-sm); }
.ask b:last-child { background: var(--accent); color: var(--accent-ink); justify-self: end; border-bottom-right-radius: var(--r-sm); animation: nudge 3.2s var(--ease) infinite; }
@keyframes nudge { 0%, 40% { transform: scale(0.94); opacity: 0.4; } 55%, 100% { transform: scale(1); opacity: 1; } }

/* ---------- benefits: asymmetric bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s200); align-items: stretch; }
.tile { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-3xl); padding: var(--s300); transition: all 500ms var(--ease); }
.tile .visual { margin-top: auto; padding-top: var(--s300); }
.tile:hover { background: var(--raised); transform: translateY(-4px); }
.tile .ico { width: 32px; height: 32px; color: var(--accent); }
.tile h3 { font-size: 20px; line-height: 28px; margin: var(--s200) 0 var(--s75); }
.tile p { margin: 0; color: var(--muted); max-width: 520px; }
.t-a { grid-column: span 4; } .t-b { grid-column: span 2; } .t-c { grid-column: span 3; } .t-d { grid-column: span 3; } .t-e { grid-column: span 6; }
.scripts { display: grid; gap: var(--s75); font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; }
.scripts div:nth-child(2) { color: var(--accent); }
.scripts div:nth-child(3) { direction: rtl; text-align: left; }
.race { height: 8px; border-radius: var(--r-full); background: var(--raised); overflow: hidden; }
.race i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; animation: fill 3.4s var(--ease) infinite; }
.tile:hover .race { background: var(--bg); }
@keyframes fill { 0% { transform: scaleX(0); opacity: 1; } 45%, 80% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.race-labels { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); margin-top: var(--s75); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s200); }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: var(--s100); align-items: start; font-size: 16px; line-height: 24px; font-weight: 600; }
.timeline li::before { content: ""; width: 8px; height: 8px; margin-top: var(--s75); border-radius: var(--r-full); background: var(--accent); opacity: 0.45; }
.timeline li:last-child::before { opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.timeline small { display: block; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--muted); }
.wave { display: flex; gap: var(--s75); align-items: center; height: 48px; }
.wave i { flex: none; width: 8px; height: 48px; border-radius: var(--r-full); background: var(--accent); transform: scaleY(0.2); animation: eq 1.5s var(--ease) infinite; animation-delay: calc(var(--k) * 70ms); }
.t-e { display: grid; grid-template-columns: auto 1fr; gap: var(--s300); align-items: center; }
.t-e .ico { width: 48px; height: 48px; }
.t-e h3 { margin-top: 0; }

/* ---------- without opening the app ---------- */
.hands { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s600); align-items: center; }
.ways { list-style: none; margin: var(--s400) 0 0; padding: 0; display: grid; gap: var(--s100); }
.ways li { display: grid; grid-template-columns: auto 1fr; gap: var(--s200); align-items: start; padding: var(--s200); border-radius: var(--r-2xl); background: var(--surface); transition: all 500ms var(--ease); }
.ways li:hover { background: var(--raised); transform: translateX(8px); }
.ways .ico { width: 32px; height: 32px; color: var(--accent); }
.ways b { display: block; font-size: 18px; line-height: 28px; }
.ways span { color: var(--muted); }
.lockscreen { width: min(300px, 78vw); aspect-ratio: 9 / 17; padding: var(--s75); border-radius: var(--r-3xl); background: #181818; box-shadow: 0 32px 64px color-mix(in srgb, var(--accent) 24%, transparent); }
@media (prefers-color-scheme: dark) { .lockscreen { background: #272727; } }
.lockscreen .scr { height: 100%; border-radius: var(--r-2xl); overflow: hidden; padding: var(--s700) var(--s200) var(--s200); display: flex; flex-direction: column; background: #1f1f1f; color: #fff; }
.lockscreen .time { text-align: center; font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; }
.lockscreen .date { text-align: center; font-size: 14px; line-height: 20px; font-weight: 600; color: #cfcfcf; margin: var(--s75) 0 var(--s400); }
.notif { display: flex; gap: var(--s100); align-items: center; padding: var(--s100); border-radius: var(--r-2xl); background: #ffffff; color: #111; animation: slideIn 1.2s 0.3s var(--ease) both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
.notif img { width: 32px; height: 32px; border-radius: var(--r-lg); flex: none; }
.notif b { display: block; font-size: 12px; line-height: 16px; }
.notif span { display: block; font-size: 12px; line-height: 16px; color: #5c5c5c; }
.notif .go { margin-left: auto; flex: none; font-weight: 700; font-size: 12px; line-height: 16px; padding: var(--s75) var(--s100); border-radius: var(--r-lg); background: #4f46e5; color: #fff; animation: tap 3.2s 1.6s var(--ease) infinite; }
@keyframes tap { 0%, 60%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); } 70% { transform: scale(0.94); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.6); } 90% { transform: scale(1); box-shadow: 0 0 0 12px rgba(79, 70, 229, 0); } }
.widgets { margin-top: auto; display: flex; gap: var(--s100); align-items: center; justify-content: center; }
.widgets .wide { display: flex; align-items: center; gap: var(--s100); padding: var(--s75) var(--s200) var(--s75) var(--s100); border-radius: var(--r-full); background: #ffffff; color: #111; }
.widgets .wide b { display: block; font-size: 14px; line-height: 20px; }
.widgets .wide span { display: block; font-size: 12px; line-height: 16px; color: #5c5c5c; }
.widgets .wide img, .widgets .round img { width: 24px; height: 24px; }
.widgets .round { width: 56px; height: 56px; border-radius: var(--r-full); background: #ffffff; display: grid; place-items: center; }

/* ---------- what leaves the phone ---------- */
.leaves { display: grid; gap: var(--s100); }
.leave { display: grid; grid-template-columns: 280px 1fr; gap: var(--s300); align-items: start; background: var(--surface); border-radius: var(--r-3xl); padding: var(--s300); transition: all 500ms var(--ease); }
.leave:hover { background: var(--raised); }
.leave .head { display: flex; align-items: center; gap: var(--s100); }
.leave .ico { width: 32px; height: 32px; color: var(--accent); }
.leave h3 { font-size: 20px; line-height: 28px; }
.leave ul { margin: 0; padding-left: var(--s300); color: var(--muted); }
.leave li { margin-bottom: var(--s50); }
.leaves-note { margin: var(--s200) 0 0; color: var(--muted); }

/* ---------- faq: side by side ---------- */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--s600); align-items: start; }
.faq-wrap .sec-head { position: sticky; top: var(--s900); margin-bottom: 0; }
.qa { background: var(--surface); border-radius: var(--r-3xl); padding: var(--s300); margin-bottom: var(--s100); }
.qa h3 { font-size: 18px; line-height: 28px; margin-bottom: var(--s75); }
.qa p { margin: 0; color: var(--muted); }

/* ---------- final call to action ---------- */
.join { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s600); align-items: center; background: var(--surface); border-radius: var(--r-3xl); padding: var(--s700) var(--s600); margin-top: var(--s900); }
.join h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.03em; margin: 0 0 var(--s100); }
.join p { color: var(--muted); margin: 0; }
.join .risk { font-size: 14px; line-height: 20px; margin-top: var(--s200); }
.join form.waitlist { max-width: none; }
.join form.waitlist input[type="email"] { background: var(--bg); }

/* ---------- breakpoints ---------- */
@media (min-width: 640px) {
  .kw-hero h1 { font-size: 48px; line-height: 1; }
  .kw-hero p.lead { font-size: 20px; }
  .tagline p { font-size: 48px; line-height: 1; }
  .sec-head h2, .join h2 { font-size: 48px; line-height: 1; }
}
@media (min-width: 1024px) {
  .kw-hero h1 { font-size: 60px; }
  .tagline p { font-size: 60px; }
}
@media (max-width: 960px) {
  .kw-hero { grid-template-columns: 1fr; min-height: 0; padding-top: var(--s300); }
  .zig, .hands, .faq-wrap, .join { grid-template-columns: 1fr; gap: var(--s400); }
  .zig:nth-of-type(even) .art { order: 0; }
  .faq-wrap .sec-head { position: static; }
  .bento { grid-template-columns: 1fr 1fr; }
  .t-a, .t-b, .t-e { grid-column: span 2; } .t-c, .t-d { grid-column: span 1; }
  .leave { grid-template-columns: 1fr; gap: var(--s100); }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .t-a, .t-b, .t-c, .t-d, .t-e { grid-column: auto; }
  .t-e { grid-template-columns: 1fr; }
  .section, .join { margin-top: var(--s700); }
  .tagline { padding: var(--s700) 0 var(--s500); }
  .join { padding: var(--s500) var(--s300); }
}

/* ---------- calm motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; filter: none; }
  .ribbons { margin: 0; }
  .ribbon { flex-wrap: wrap; width: auto; justify-content: center; }
  .ribbon .dup { display: none; }
  .u path { stroke-dashoffset: 0; }
  .tagline .w { color: var(--ink); }
  .bars i, .wave i { transform: scaleY(0.6); }
}

/* ---------- real screens inside panels ---------- */
.art.shot { padding-inline: var(--s300); }
.art.shot img { width: min(300px, 100%); height: auto; border-radius: var(--r-2xl) var(--r-2xl) 0 0; box-shadow: 0 -8px 40px color-mix(in srgb, var(--accent) 16%, transparent); }
.art.shot { height: 440px; min-height: 0; grid-template-rows: 100%; }
.art.bottom { place-items: end center; }
.art.top { place-items: start center; padding-top: var(--s400); height: 520px; }
.art.top img { border-radius: var(--r-2xl); }

/* two phones, one in front of the other */
.duo { position: relative; display: grid; place-items: center; min-height: 560px; padding: var(--s500) var(--s200); overflow: hidden; border-radius: var(--r-3xl); background: var(--surface); }
.duo .back { position: absolute; width: min(250px, 52%); left: 8%; top: var(--s500); transform: rotate(-5deg); border-radius: var(--r-2xl); box-shadow: 0 24px 48px color-mix(in srgb, var(--ink) 18%, transparent); opacity: 0.95; }
.duo .lockscreen { position: relative; z-index: 1; margin-left: 28%; }
@media (max-width: 960px) { .duo .back { left: 4%; } }
@media (max-width: 600px) { .duo .back { display: none; } .duo .lockscreen { margin-left: 0; } .duo { min-height: 0; } }
