/* Taara website. Colour and spacing tokens come from taara-brand/tokens.css;
   this file adds the few website-only tokens and the page layout. */

:root, [data-theme="light"] {
  --ember-hover: #9c3700;
  --placeholder: #c0bfbc;
  --accent-bg: #1c71d8;
  --on-accent: #ffffff;
  --deep: #241f31;
  color-scheme: light;
}
[data-theme="dark"] {
  --ember-hover: #ffbe6f;
  --placeholder: #5e5c64;
  --deep: #ffffff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ember-hover: #ffbe6f;
    --placeholder: #5e5c64;
    --deep: #ffffff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure, pre, dl, dd { margin: 0; }
img, svg { display: block; }

a { color: var(--ember); }
a:hover { color: var(--ember-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--dusk); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 11px 18px; border-radius: var(--radius-sm);
  background: var(--accent-bg); color: var(--on-accent); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.container { max-width: 1152px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 12px; padding-bottom: 12px;
}
.brand-link { display: flex; align-items: center; min-height: 44px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nav-link {
  color: var(--ink); text-decoration: none; font-weight: 700;
  padding: 11px 12px; border-radius: var(--radius-sm);
}
.nav-link:hover { color: var(--ink); background: var(--surface-300); }
.nav-github {
  display: flex; align-items: center; gap: 6px;
  color: var(--ink); background: var(--surface-300); text-decoration: none; font-weight: 700;
  padding: 11px 18px; border-radius: var(--radius-sm);
}
.nav-github:hover { color: var(--ink); background: var(--border); }
.theme-toggle {
  width: 44px; height: 44px; border: 0; border-radius: var(--radius-pill);
  background: var(--surface-300); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--border); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Shared type */
.eyebrow {
  font-size: 12px; line-height: 16px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.label {
  font-size: 12px; line-height: 16px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted);
}
.display { font-size: 64px; line-height: 68px; font-weight: 800; letter-spacing: -0.02em; }
.title-1 { font-size: 36px; line-height: 42px; font-weight: 800; letter-spacing: -0.01em; }
.title-2 { font-size: 28px; line-height: 34px; font-weight: 800; }
.heading { font-size: 17px; line-height: 22px; font-weight: 700; }
.lead { font-size: 17px; line-height: 26px; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }

.section { padding-top: 96px; display: flex; flex-direction: column; gap: 36px; }
.section-intro { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }

/* Buttons (pills) */
.btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 24px;
  border-radius: var(--radius-pill); font-weight: 700; text-decoration: none;
}
.btn-star { background: var(--star); color: var(--night); }
.btn-star:hover { color: var(--night); background: #f8e45c; }
.btn-outline-dark { border: 1px solid #77767b; color: #ffffff; }
.btn-outline-dark:hover { color: #ffffff; border-color: #deddda; }
.btn-accent { background: var(--accent-bg); color: var(--on-accent); }
.btn-accent:hover { color: var(--on-accent); background: #1a5fb4; }
.btn-neutral { background: var(--surface-300); color: var(--ink); }
.btn-neutral:hover { color: var(--ink); background: var(--border); }

.badge {
  font-size: 12px; line-height: 16px; font-weight: 700;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--surface-300); color: var(--ink); white-space: nowrap;
}
.badge-star { background: var(--star-tint); }

/* Hero (home) */
.hero-wrap { padding-top: 12px; }
.hero {
  position: relative; overflow: hidden; background: var(--sky);
  border-radius: var(--radius-lg); padding: 96px 48px 108px; color: #ffffff;
}
.hero-star {
  position: absolute; right: -240px; bottom: -240px; width: 520px; height: 520px;
  border-radius: var(--radius-pill); background: var(--star);
}
.hero-ember {
  position: absolute; right: 252px; bottom: 312px; width: 48px; height: 48px;
  border-radius: var(--radius-pill); background: #ffa348;
}
.hero-body { position: relative; max-width: 640px; display: flex; flex-direction: column; gap: 24px; }
.hero .eyebrow { color: var(--star); }
.hero-text { font-size: 19px; line-height: 28px; color: #deddda; max-width: 540px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .actions { padding-top: 12px; }

/* App cards */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.app-card {
  background: var(--surface-200); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; display: flex; flex-direction: column; gap: 18px;
}
.app-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app-card-name { display: flex; flex-direction: column; gap: 6px; }
.app-card-name h3 { font-size: 26px; line-height: 32px; font-weight: 800; }
.app-card-name p { font-size: 17px; line-height: 22px; font-weight: 700; color: var(--ink-muted); }
.app-card-link {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-weight: 700; text-decoration: none; align-self: flex-start;
}
.app-card-next { background: var(--surface-100); border: 2px dashed var(--border); }
.next-icon {
  position: relative; width: 88px; height: 88px; border-radius: 26px;
  background: var(--surface-300); overflow: hidden;
}
.next-icon::after {
  content: ""; position: absolute; left: -26px; bottom: -26px; width: 52px; height: 52px;
  border-radius: var(--radius-pill); background: var(--placeholder);
}

/* Principles and features */
.principle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.principle, .feature { display: flex; flex-direction: column; gap: 12px; }
.principle {
  padding: 24px; border-radius: var(--radius-md);
  background: var(--surface-200); border: 1px solid var(--border);
}
.principle p, .feature p { color: var(--ink-muted); }
.icon-disc {
  width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--sky);
  display: flex; align-items: center; justify-content: center; color: var(--star);
}

/* Try-it panel */
.try {
  display: flex; flex-wrap: wrap; gap: 36px; align-items: center;
  padding: 48px; border-radius: var(--radius-lg); background: var(--star-tint);
}
.try-text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.try-code { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.code-block {
  padding: 18px 24px; border-radius: var(--radius-md); background: var(--night); color: #ffffff;
  font-family: var(--font-mono); font-size: 14px; line-height: 22px; overflow-x: auto; white-space: pre;
}

/* Boxed list */
.boxed-list {
  background: var(--surface-200); border: 1px solid var(--border); border-radius: var(--radius-md);
  display: flex; flex-direction: column; overflow: hidden;
}
.row-link {
  display: flex; align-items: center; gap: 18px; padding: 18px 24px;
  color: var(--ink); text-decoration: none;
}
.row-link + .row-link { border-top: 1px solid var(--border); }
.row-link:hover { color: var(--ink); background: var(--surface-300); }
.row-link svg { color: var(--ink-muted); flex: none; }
.row-text { flex: 1; display: flex; flex-direction: column; }
.row-text strong { font-weight: 700; }
.row-text span { color: var(--ink-muted); }

/* App page */
.app-hero { padding-top: 60px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.app-hero-name { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.app-hero-summary { font-size: 26px; line-height: 32px; font-weight: 700; color: var(--ink-muted); }
.app-hero-text { font-size: 17px; line-height: 26px; max-width: 560px; }
.app-hero .actions { justify-content: center; }

.showcase-wrap { padding-top: 60px; }
.showcase {
  position: relative; overflow: hidden; background: var(--sky); border-radius: var(--radius-lg);
  padding: 60px 48px 0; display: flex; justify-content: center;
}
.showcase-star {
  position: absolute; left: -200px; bottom: -200px; width: 440px; height: 440px;
  border-radius: var(--radius-pill); background: var(--star);
}
.showcase-ember {
  position: absolute; left: 236px; bottom: 260px; width: 40px; height: 40px;
  border-radius: var(--radius-pill); background: #ffa348;
}
.window {
  position: relative; width: 100%; max-width: 960px;
  border-radius: 12px 12px 0 0; overflow: hidden;
}
.window img, .screenshot img { width: 100%; height: auto; }
.screenshot {
  max-width: 960px; width: 100%; margin: 0 auto;
  border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border);
}
.try-text .mono { font-size: 13px; overflow-wrap: anywhere; }

.about-split { padding-top: 96px; display: flex; flex-wrap: wrap; gap: 48px; }
.about-name { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.devanagari {
  font-family: "Noto Sans Devanagari", var(--font-sans);
  font-size: 48px; line-height: 64px; font-weight: 700; color: var(--deep);
}
.details { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.details dl {
  background: var(--surface-200); border: 1px solid var(--border); border-radius: var(--radius-md);
  display: flex; flex-direction: column;
}
.details dl > div {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px 18px;
}
.details dl > div + div { border-top: 1px solid var(--border); }
.details dt { font-weight: 700; }
.details dd { color: var(--ink-muted); }
.mono { font-family: var(--font-mono); font-size: 14px; }

/* Footer */
.site-footer { margin-top: 96px; background: var(--surface-300); }
.footer-inner {
  padding-top: 36px; padding-bottom: 36px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand p { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-nav a { padding: 11px 12px; color: var(--ink); text-decoration: none; font-weight: 700; }
.footer-nav a:hover { color: var(--ember); }

/* Phone width */
@media (max-width: 720px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .display { font-size: 42px; line-height: 48px; }
  .title-1 { font-size: 28px; line-height: 34px; }
  .hero { padding: 48px 24px 160px; }
  .hero-star { right: -200px; bottom: -330px; }
  .hero-ember { right: 120px; bottom: 96px; width: 36px; height: 36px; }
  .hero-text { font-size: 17px; line-height: 26px; }
  .section, .about-split { padding-top: 60px; }
  .app-grid, .principle-grid, .feature-grid { grid-template-columns: 1fr; }
  .app-card { padding: 24px; }
  .try { padding: 24px; }
  .showcase { padding: 36px 16px 0; }
  .showcase-ember { left: 150px; bottom: 210px; }
  .app-hero-summary { font-size: 21px; line-height: 28px; }
  .nav-link { padding: 11px 8px; }
  .site-footer { margin-top: 60px; }
}
