/* Lumina website. Colours follow the app's tokens (apps/desktop/src/styles/globals.css). */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Sinhala";
  src: url("fonts/noto-sans-sinhala.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0D80-0DFF, U+200C-200D, U+25CC;
}

:root {
  --surface: #ffffff;
  --raised: #f7f7f5;
  --fg: #1d1d1f;
  --fg-soft: #48484c;
  --muted: #6a6a6f;
  --line: #e4e4e1;
  --accent: #d97706;
  --accent-strong: #ea8c1e;
  --accent-soft: #fdf3e3;
  --accent-ink: #a8530a;
  --on-accent: #2b1a04;
  --ok: #17765f;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  --radius: 11px;
  --font: "Manrope", "Noto Sans Sinhala", system-ui, "Segoe UI", "Nirmala UI", -apple-system, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1b1e20;
    --raised: #202325;
    --fg: #eae7e2;
    --fg-soft: #b6b9bd;
    --muted: #959a9f;
    --line: #2b2f33;
    --accent: #d8a44c;
    --accent-strong: #e8bb6d;
    --accent-soft: #33291a;
    --accent-ink: #d8a44c;
    --on-accent: #1b1408;
    --ok: #4ea89a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* The footer stays at the bottom of short pages (404). */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Sinhala needs a little more line height for its vowel signs. */
.lang-si {
  line-height: 1.75;
}

img,
svg {
  display: block;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.88em;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.05em 0.35em;
}

::selection {
  background: color-mix(in oklch, var(--accent) 30%, transparent);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
}

.narrow {
  max-width: 820px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 20;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: 8px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklch, var(--surface) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--fg-soft);
}

.nav-links a:hover {
  color: var(--fg);
  text-decoration: none;
}

.lang-switch {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
}

.icon-link {
  display: inline-flex;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 72px;
}

/* Grid items may shrink below their content (long code, the mock window). */
.hero > * {
  min-width: 0;
}

.badge {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.lang-si h1 {
  line-height: 1.3;
  letter-spacing: 0;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
}

.hl {
  color: var(--accent);
}

.lead {
  margin: 22px 0 0;
  font-size: 1.15rem;
  color: var(--fg-soft);
  max-width: 34em;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 9px;
  border: 1px solid var(--line);
  color: var(--fg);
  font-weight: 700;
  font-size: 1rem;
  transition:
    transform 120ms ease-out,
    background-color 120ms ease-out,
    border-color 120ms ease-out;
}

.btn:hover {
  text-decoration: none;
  border-color: var(--muted);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.meta-line {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Hero illustration: the app window, drawn in CSS. */
.window {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.w-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--raised);
}

.w-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}

.w-bar b {
  margin-left: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.w-body {
  display: grid;
  grid-template-columns: 56px 1fr;
  min-height: 300px;
}

.w-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  background: var(--raised);
}

.w-side i {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}

.w-side i.act {
  background: var(--accent);
}

.w-main {
  padding: 18px 20px;
}

.w-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.w-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
}

.m-row {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.m-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.m-dot.on {
  background: var(--ok);
  animation: glow 2.4s ease-in-out infinite;
}

.m-name {
  font-weight: 700;
}

.m-ver {
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
}

.m-state {
  min-width: 6.5em;
  text-align: right;
  color: var(--fg-soft);
  font-size: 0.8rem;
}

.w-url {
  margin-top: 16px;
  display: inline-flex;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--fg-soft);
}

/* Stack chips */
.stack {
  padding-bottom: 24px;
}

.eyebrow {
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.lang-si .eyebrow {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--fg-soft);
}

/* Sections */
.section {
  padding-top: 88px;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lang-si .section h2 {
  letter-spacing: 0;
  line-height: 1.4;
}

.section-lead {
  margin: 10px 0 0;
  color: var(--fg-soft);
  font-size: 1.08rem;
}

.grid {
  display: grid;
  gap: 18px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.features {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  transition:
    border-color 160ms ease-out,
    transform 160ms ease-out;
}

.card:hover {
  border-color: color-mix(in oklch, var(--accent) 55%, var(--line));
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-flex;
  padding: 9px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.feature h3,
.step h3 {
  margin: 14px 0 6px;
  font-size: 1.08rem;
}

.feature p,
.step p {
  margin: 0;
  color: var(--fg-soft);
  font-size: 0.97rem;
}

.steps {
  grid-template-columns: repeat(3, 1fr);
}

.step {
  position: relative;
  padding: 22px;
  border-left: 2px solid var(--line);
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

/* Downloads */
.version {
  font-size: 0.55em;
  color: var(--muted);
  font-weight: 600;
  vertical-align: middle;
}

.downloads {
  grid-template-columns: repeat(3, 1fr);
}

.dl-card.current {
  border-color: var(--accent);
}

.dl-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dl-head h3 {
  margin: 0;
  font-size: 1.08rem;
}

.dl-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.dl-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.95rem;
}

.dl-link:hover {
  background: var(--raised);
  text-decoration: none;
  color: var(--accent-ink);
}

.dl-more {
  margin-top: 22px;
  font-size: 0.95rem;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:first-of-type {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 800;
  transition: transform 160ms ease-out;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0 0 18px;
  color: var(--fg-soft);
}

/* Footer */
.foot {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background: var(--raised);
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 0.9rem;
  color: var(--muted);
}

.foot p {
  margin: 8px 0 0;
}

.foot-links {
  text-align: right;
}

/* 404 */
.not-found {
  min-height: 62vh;
  padding-top: 72px;
  padding-bottom: 24px;
  text-align: center;
}

.not-found .lead {
  margin-inline: auto;
}

.not-found h2 {
  margin: 36px 0 0;
  font-size: 1.6rem;
}

.not-found .cta {
  justify-content: center;
  margin-top: 36px;
}

.nf-code {
  margin: 0 0 8px;
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 56px;
    gap: 40px;
  }

  .steps,
  .downloads {
    grid-template-columns: 1fr;
  }

  .foot-inner {
    flex-direction: column;
  }

  .foot-links {
    text-align: left;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding-inline: 16px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a:not(.lang-switch):not(.icon-link) {
    display: none;
  }

  .m-state {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
