/* Luminous landing page */

:root {
  /* Palette: muted warm charcoal / warm paper. Follows the system unless
     [data-theme] is set (see the header toggle in main.js). */
  color-scheme: dark light;
  --bg: light-dark(#eee9df, #191918);
  --bg-header: light-dark(rgb(238 233 223 / 0.85), rgb(25 25 24 / 0.82));
  --surface: light-dark(#e5e0d4, #222220);
  --surface-code: light-dark(#dbd5c7, #2c2c29);
  --surface-button: light-dark(#e5e0d4, #2a2a27);
  --surface-tint: light-dark(rgb(25 25 24 / 0.05), rgb(245 241 233 / 0.05));
  --border-subtle: light-dark(#dcd6c8, #2c2c29);
  --border: light-dark(#cdc7b8, #38382f);
  --border-strong: light-dark(#b5af9f, #4a4a43);
  --text: light-dark(#191918, #f5f1e9);
  --text-nav: light-dark(#3a3934, #d2cec4);
  --text-muted: light-dark(#55534c, #b7b4ab);
  --text-dim: light-dark(#6b685f, #928f86);
  --link: light-dark(#3a45b0, #9ba4ff);
  --link-hover: light-dark(#232c85, #c3c9ff);
  --brand: #4f5bd5;
  --indigo: light-dark(#4f58a8, #8b93d5);
  --amber: light-dark(#8f5508, #ffb648);
  --on-amber: light-dark(#fff, #191918);
  --button-edge: light-dark(rgb(25 25 24 / 0.16), rgb(245 241 233 / 0.12));
  --button-edge-hover: light-dark(rgb(25 25 24 / 0.4), rgb(245 241 233 / 0.28));
  --glow-strong: light-dark(rgb(79 91 213 / 0.10), rgb(79 91 213 / 0.14));
  --glow-soft: light-dark(rgb(79 91 213 / 0.06), rgb(98 111 232 / 0.10));
  --shadow-color: light-dark(rgb(60 50 30 / 0.25), rgb(0 0 0 / 0.6));

  /* Typography */
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Expose", "Inter", system-ui, sans-serif;

  /* Layout */
  --content-width: 1160px;   /* excludes the gutters */
  --gutter: 32px;
  --header-height: 72px;
  --radius-pill: 9999px;
  --radius-card: 12px;
  --radius-frame: 14px;
  --shadow-frame: 0 24px 60px -24px var(--shadow-color);
}

/* Expose has no Cyrillic glyphs; set Cyrillic pages' headings wholly in Inter
   rather than mixing faces word by word. */
:root:lang(ru),
:root:lang(uk) {
  --font-display: "Inter", system-ui, sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

/* The icon SVGs are fixed light grey; darken them on the light palette. */
.platform img.icon,
.alt-downloads img,
.social-links img {
  filter: var(--icon-filter, none);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --icon-filter: brightness(0.22);
  }
}

[data-theme="light"] {
  --icon-filter: brightness(0.22);
}

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

html {
  scroll-padding-top: var(--header-height);
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

.container {
  max-width: calc(var(--content-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  flex-shrink: 0;
}

/* Screenshot frame shared by the hero and feature images */
.frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-frame);
  box-shadow: var(--shadow-frame);
}

/* Light-theme screenshots (<name>-light-EN.png) sit right after their dark
   twin. They stay hidden until the light theme is in effect; if the file is
   missing, main.js removes the element and the dark shot keeps showing. */
.shot-light {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .shot-light {
    display: block;
  }

  :root:not([data-theme="dark"]) .shot-dark:has(+ .shot-light) {
    display: none;
  }
}

[data-theme="light"] .shot-light {
  display: block;
}

[data-theme="light"] .shot-dark:has(+ .shot-light) {
  display: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-header);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-nav);
  font-size: 13.5px;
  font-weight: 500;
}

.site-nav__link:hover {
  color: var(--text);
}

/* Language menu: a pill trigger showing the active code, opening a list of
   native language names. Revealed and wired up by main.js. */
.lang-menu {
  position: relative;
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu__button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font: 700 12.5px var(--font-body);
  cursor: pointer;
}

.lang-menu__button:hover,
.lang-menu__button[aria-expanded="true"] {
  color: var(--text);
}

.lang-menu__chevron {
  transition: transform 0.15s ease;
}

.lang-menu__button[aria-expanded="true"] .lang-menu__chevron {
  transform: rotate(180deg);
}

.lang-menu__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 16px 40px -16px var(--shadow-color);
}

.lang-menu__list[hidden] {
  display: none;
}

.lang-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-nav);
  font: 500 14px var(--font-body);
  text-align: start;
  cursor: pointer;
}

.lang-menu__item:hover,
.lang-menu__item:focus-visible {
  outline: none;
  background: var(--surface-tint);
  color: var(--text);
}

.lang-menu__item[aria-checked="true"] {
  color: var(--text);
  font-weight: 700;
}

.lang-menu__item[aria-checked="true"]::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

/* Theme toggle: main.js sets data-theme-applied to the theme in effect and the
   button shows the icon of the theme a click switches to. */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle__sun {
  display: none;
}

[data-theme-applied="dark"] .theme-toggle__sun {
  display: block;
}

[data-theme-applied="dark"] .theme-toggle__moon {
  display: none;
}

/* Shared controls */
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-badge {
  display: inline-flex;
}

.button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding-inline: 20px;
  border: 1px solid var(--button-edge);
  border-radius: 4px;
  background: var(--surface-button);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.button:hover {
  border-color: var(--button-edge-hover);
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  padding-block: 88px 40px;
}

/* Soft indigo glow behind the headline */
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, var(--glow-strong), transparent 68%);
  filter: blur(10px);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero__intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.hero__badge {
  padding: 7px 16px;
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero__title {
  max-width: 820px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5.6vw, 62px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__sub {
  max-width: 600px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

.get-started {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 560px;
  margin-top: 28px;
}

.get-started__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.get-started__caption {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.stat-pills li {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-tint);
  color: var(--text-muted);
  font-size: 13px;
}

.hero__screenshot {
  position: relative;
  margin-top: 56px;
}

.hero__screenshot::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at center, var(--glow-soft), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

.hero__screenshot .frame {
  position: relative;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 40px 90px -30px var(--shadow-color);
}

/* Card sections (downloads, what's new) */
.section {
  padding-block: 64px;
}

.section__title {
  margin-bottom: 32px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}



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

.card__title {
  margin-bottom: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-wrap: pretty;
}


.card__body {
  flex: 1;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: pretty;
}




.card__badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: var(--on-amber);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

/* Download heading */
.download-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  text-align: center;
}

.download-intro__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.download-intro__sub {
  max-width: 480px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Download options: one column per platform, a single primary action each */
.download-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 16px;
  max-width: 820px;
  margin-inline: auto;
}

.platform {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.platform__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.platform__note {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

.button--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.button--primary:hover {
  border-color: var(--link-hover);
  background: color-mix(in srgb, var(--brand) 82%, #fff);
  color: #fff;
}

.alt-downloads {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.alt-downloads a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.alt-downloads__desc {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Point-form release notes: heading row first, then the list. */
.card > .card__heading {
  margin-bottom: 14px;
}

.card__heading .card__title,
.card__heading .card__badge {
  margin-bottom: 0;
}

.release-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.release-list li {
  position: relative;
  padding-left: 16px;
  text-wrap: pretty;
}

.release-list li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--indigo);
}

/* Features: full-width bands. "base" matches the page theme, "flip" is the
   opposite theme, "raised" is a lifted base surface, and "accent" is the brand
   colour. Scoped color-scheme re-resolves every light-dark() token inside. */
.band {
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.band--raised {
  background: var(--surface);
}

.band--flip {
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .band--flip {
    color-scheme: dark;
  }
}

[data-theme="dark"] .band--flip {
  color-scheme: light;
}

[data-theme="light"] .band--flip {
  color-scheme: dark;
}

.band--accent {
  --text: #fff;
  --text-muted: rgb(255 255 255 / 0.92);
  --indigo: #eef0ff;
  --border: rgb(255 255 255 / 0.28);
  --surface-code: rgb(255 255 255 / 0.16);
  --shadow-color: rgb(10 14 70 / 0.45);
  border-top-color: transparent;
  background: var(--brand);
}

.features {
  padding-bottom: 0;
}

.feature-list .feature__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-block: 96px;
}

/* Alternate the media side on wide screens. Text stays first in the DOM,
   so when the row wraps on narrow screens the text always sits above. */
.feature-list .feature:nth-child(even) .feature__inner {
  flex-direction: row-reverse;
}

.feature__text {
  display: flex;
  flex: 1 1 380px;
  flex-direction: column;
  gap: 14px;
}

.feature__media {
  flex: 1 1 420px;
}

.feature__media > .frame {
  width: 100%;
}

.feature__media--pair {
  display: flex;
  gap: 16px;
}

.feature__media--pair > .frame {
  flex: 1;
  min-width: 0;
}

.feature__overline {
  color: var(--indigo);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.feature__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.feature__body {
  max-width: 440px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.feature__body code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-code);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.feature-band .container {
  padding-block: 96px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
}

.feature-grid .feature {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-grid .feature__title {
  font-size: 26px;
}

.feature-grid .feature__body {
  max-width: none;
}

/* Dynamic-theme slideshow: frames are stacked and cross-faded by main.js */
.theme-cycle {
  position: relative;
  aspect-ratio: 1440 / 900;
}

.theme-cycle__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.theme-cycle__frame.is-active {
  opacity: 1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 36px;
}

.site-footer__copyright {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 13px;
}

.site-footer__copyright a {
  color: inherit;
  text-decoration: underline;
}

.site-footer__copyright a:hover {
  color: var(--text-nav);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

.social-links a {
  display: flex;
}

.social-links a:hover {
  opacity: 0.75;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --gutter: 20px;
    --header-height: 128px;  /* the header wraps onto two rows */
  }

  /* Keep the nav, language menu and theme toggle on one 375px-wide row. */
  .site-header__actions,
  .site-nav {
    gap: 14px;
  }

  .site-nav__link .icon {
    display: none;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-cycle__frame {
    transition: none;
  }
}
