/* Khoj by Swadesh Nai Swarga.
   Two themes keyed on :root[data-theme]. js/theme-early.js sets it before first paint from a saved
   choice, else from prefers-color-scheme, so the page never flashes the wrong theme. The no-JS
   fallback is the media query below. Red as TEXT always uses --accent-text: SNS red (#C1121F) is
   only 2:1 on the dark ground, so it is kept for fills. */

:root,
:root[data-theme='dark'] {
  --bg: #0C0A0A;  --bg-2: #171313;  --bg-3: #1E1919;  --bg-win: #0F0C0C;
  --fg: #F3EEE6;  --fg-2: #C9C1B6;  --fg-3: #B8AFA4;  --fg-4: #8F867B;
  --line: #2A2323; --line-2: #3A3030;
  --accent: #C1121F;       /* fills, white text 9.8:1 */
  --accent-text: #E2352F;  /* large text on --bg, 4.4:1 */
  --on-accent: #FFFFFF;
  --btn-light-bg: #F3EEE6; --btn-light-fg: #0C0A0A;
  --stage: url('/assets/himal-dark-2.svg');
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #F5F5F5;  --bg-2: #EBEBEB;  --bg-3: #E2E2E2;  --bg-win: #FFFFFF;
  --fg: #0A0A0A;  --fg-2: #4D4D4D;  --fg-3: #5F5F5F;  --fg-4: #616161;
  --line: #D9D9D9; --line-2: #C8C8C8;
  --accent: #C1121F;
  --accent-text: #A50E19;  /* 7.2:1 on --bg */
  --on-accent: #FFFFFF;
  --btn-light-bg: #0A0A0A; --btn-light-fg: #F5F5F5;
  --stage: url('/assets/himal-light-2.svg');
  --shadow: 0 30px 70px rgba(10, 10, 10, 0.18);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F5F5F5;  --bg-2: #EBEBEB;  --bg-3: #E2E2E2;  --bg-win: #FFFFFF;
    --fg: #0A0A0A;  --fg-2: #4D4D4D;  --fg-3: #5F5F5F;  --fg-4: #616161;
    --line: #D9D9D9; --line-2: #C8C8C8;
    --accent-text: #A50E19;
    --btn-light-bg: #0A0A0A; --btn-light-fg: #F5F5F5;
    --stage: url('/assets/himal-light-2.svg');
    --shadow: 0 30px 70px rgba(10, 10, 10, 0.18);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: 'Archivo', 'Hind', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
[lang='ne'] { font-family: 'Hind', 'Noto Sans Devanagari', sans-serif; letter-spacing: 0; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; left: 16px; top: -60px; padding: 10px 16px; border-radius: 999px; background: var(--fg); color: var(--bg); z-index: 10; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--red { background: var(--accent); color: var(--on-accent); }
.btn--red:hover { background: #A50E19; }
.btn--light { min-height: 44px; padding: 0 20px; font-size: 14px; background: var(--btn-light-bg); color: var(--btn-light-fg); }
.btn--ghost { background: var(--bg-3); color: var(--fg); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--fg-4); }

/* Nav */
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand__name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav__links a { text-decoration: none; color: var(--fg-2); }
.nav__links a:hover { color: var(--fg); }
.nav__end { display: flex; align-items: center; gap: 10px; }
.theme {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--bg-3); color: var(--fg); border: 1px solid var(--line-2);
}
.theme:hover { border-color: var(--fg-4); }
.theme__moon { display: none; }
:root[data-theme='light'] .theme__sun { display: none; }
:root[data-theme='light'] .theme__moon { display: block; }
@media (max-width: 720px) { .nav__links { display: none; } }

/* Hero */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; padding-block: 88px 56px; max-width: 1100px; }
.pill { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--fg-2); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero__title { margin: 0; font-size: clamp(46px, 8vw, 112px); line-height: 0.98; font-weight: 700; letter-spacing: -0.035em; }
.hero__title .line { display: block; padding-bottom: 0.06em; }
.hero__title em { font-style: italic; color: var(--accent-text); padding-right: 0.04em; }
.hero__lede { margin: 0; max-width: 640px; font-size: 19px; line-height: 1.55; color: var(--fg-2); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Stage: the product window over a Walls landscape */
.stage__frame {
  border-radius: 28px; overflow: hidden; padding: clamp(16px, 5vw, 72px);
  background: var(--bg-2) var(--stage) center 70% / cover no-repeat;
}
.win {
  display: flex; flex-wrap: wrap; min-height: 500px; overflow: hidden;
  border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.win__side { flex: 1 1 220px; max-width: 260px; padding: 16px 12px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); }
.win__lights { display: flex; gap: 6px; padding: 2px 4px; }
.win__lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.win__url { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg-3); font-size: 13px; color: var(--fg-3); }
.win__pins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.win__pins span { height: 40px; border-radius: 10px; background: var(--bg-3); display: grid; place-items: center; }
.win__tabs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.win__tabs li { padding: 8px 10px; border-radius: 8px; color: var(--fg-2); }
.win__tabs .is-on { background: var(--bg-3); color: var(--fg); }
.win__tabs .is-new { color: var(--fg-4); }
.win__spaces { margin-top: auto; display: flex; gap: 8px; padding: 4px; }
.win__spaces i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.win__spaces .is-on { background: var(--accent); }
.win__page { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: clamp(40px, 6vw, 80px) 24px; background: var(--bg-win); }
.win__logo { display: flex; align-items: center; gap: 14px; }
.win__logo span { font-size: 52px; font-weight: 600; line-height: 1.1; }
.win__search { width: 100%; max-width: 460px; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--fg-3); }
.win__search span { color: var(--fg); font-size: 17px; }
@media (max-width: 640px) {
  .win { min-height: 0; }
  .win__side { max-width: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .win__tabs li:nth-child(n + 4) { display: none; }
}

/* Sections */
.section { padding-block: 120px 40px; }
.section--center { text-align: center; }
.h2 { margin: 0 0 16px; font-size: clamp(34px, 5vw, 64px); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; }
.section__lede { margin: 0 0 56px; max-width: 580px; color: var(--fg-2); }
.section--center .section__lede { margin-inline: auto; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }

/* Features: a list that picks a shot from a 3D stack (the zen-browser.app pattern) */
.feat { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.feat__side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.feat__list { display: flex; flex-direction: column; gap: 6px; }
.feat__item {
  display: block; width: 100%; padding: 16px 18px; border: 0; border-radius: 16px; background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color 0.2s ease;
}
.feat__item:hover, .feat__item[aria-pressed='true'] { background: var(--bg-2); }
.feat__item h3 { margin: 0 0 6px; font-size: 21px; font-weight: 600; }
.feat__item p { margin: 0; font-size: 16px; color: var(--fg-2); }
.feat__item[aria-pressed='true'] h3 { color: var(--accent-text); }
.feat__media { flex: 1.6 1 480px; min-width: 0; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.feat__stack { position: relative; aspect-ratio: 16 / 10; perspective: 2000px; transform-style: preserve-3d; }
.feat__shot {
  position: absolute; inset: 0; width: 100%; height: auto; border-radius: 22px;
  border: 1px solid var(--line-2); box-shadow: var(--shadow); background: var(--bg-2);
  transform-origin: top center; backface-visibility: hidden; will-change: transform, opacity;
  transform: translate3d(0, var(--y, 0), var(--z, -100px)) rotate3d(1, 0, 0, var(--tilt, 0)) scale(var(--scale, 0.95));
  opacity: 0.55; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.feat__shot[data-on] { opacity: 1; }
@media (max-width: 1023px) {
  .feat__media { position: static; order: -1; flex-basis: 100%; }
  .feat__shot { transform: none; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
  .feat__shot[data-on] { opacity: 1; visibility: visible; }
}

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; text-align: left; }
.cards--5 { display: flex; flex-wrap: wrap; }
.cards--5 .card { flex: 1 1 200px; } /* a short last row stretches instead of leaving one card stranded */
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); }
.card__icon { width: 28px; height: 28px; margin-bottom: 6px; color: var(--accent-text); }
.card strong { font-size: 20px; font-weight: 600; }
.card span { font-size: 14px; color: var(--fg-2); }
.card em { margin-top: auto; padding-top: 12px; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); }
.card--value { padding: 32px; border-radius: 24px; gap: 12px; }
.card--value svg { color: var(--accent-text); }
.card--value strong { font-size: 22px; }
.card--value span { font-size: 16px; line-height: 1.6; }

.follow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(32px, 6vw, 80px); border-radius: 28px; background: var(--bg-2); border: 1px solid var(--line); }
.follow__text { flex: 1 1 380px; }
.follow__text p { margin: 0; color: var(--fg-2); }
.follow__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.section:last-of-type { padding-bottom: 120px; }

/* Roadmap page */
.hero--page { padding-block: 72px 24px; }
.hero__title--page { font-size: clamp(44px, 7vw, 96px); }
.section--tight { padding-top: 40px; display: flex; flex-direction: column; gap: 56px; }
.road { display: flex; flex-wrap: wrap; gap: 24px 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.road__stage { flex: 1 1 220px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.road__title { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.road__tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.road__tag--done { background: var(--bg-3); color: var(--fg); }
.road__tag--now { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.road__list { flex: 3 1 420px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.road__item { padding: 24px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); }
.road__item h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; }
.road__item p { margin: 0; font-size: 15px; color: var(--fg-2); }
.road__item a { color: var(--accent-text); }
.nav__links a[aria-current='page'] { color: var(--fg); }

.foot { border-top: 1px solid var(--line); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 32px; font-size: 14px; color: var(--fg-3); }
.foot__brand { display: flex; align-items: center; gap: 10px; }
.foot__brand strong { color: var(--fg); }

@media (max-width: 480px) {
  .hero { padding-block: 56px 40px; }
  .btn { white-space: normal; text-align: center; }
  .section { padding-block: 88px 24px; }
}

/* Motion. The goo reveal (js/site.js) owns the start state; motion-pending hides targets until it
   has set it, with a timeout in theme-early.js in case the script never runs. */
html.motion-pending [data-stair],
html.motion-pending [data-reveal] { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
.road__prose { flex: 3 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.road__prose p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--fg-2); }
