/* Kitsugi website. Brand colours from the identity sheet:
   #F6F2E9 light background · #171614 dark background · #000000 OLED
   #F2EEE6 text/surface (the cream of the K) · #C9A84E kintsugi gold (the
   seam only, never a UI accent) · #C5664D highlight / call to action. */

:root {
  --gold: #c9a84e;
  --cta: #c5664d;
  --cta-text: #fffaf2;
  --radius: 14px;
  --radius-lg: 22px;
  --page: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;

  /* Dark (default) */
  --bg: #171614;
  --surface: #1f1d1a;
  --surface-2: #272420;
  --text: #f2eee6;
  --muted: #aaa397;
  --faint: #6f695f;
  --line: rgba(242, 238, 230, 0.1);
  --line-strong: rgba(242, 238, 230, 0.18);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f2e9;
  --surface: #fffcf6;
  --surface-2: #efe9dc;
  --text: #171614;
  --muted: #5e584e;
  --faint: #9a9284;
  --line: rgba(23, 22, 20, 0.1);
  --line-strong: rgba(23, 22, 20, 0.18);
  --shadow: 0 30px 70px rgba(64, 48, 24, 0.16);
  color-scheme: light;
}

:root[data-theme="oled"] {
  --bg: #000000;
  --surface: #0c0b0a;
  --surface-2: #161513;
  --text: #f2eee6;
  --muted: #a39c90;
  --faint: #645f56;
  --line: rgba(242, 238, 230, 0.1);
  --line-strong: rgba(242, 238, 230, 0.18);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* Without the script, follow the system. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f6f2e9;
    --surface: #fffcf6;
    --surface-2: #efe9dc;
    --text: #171614;
    --muted: #5e584e;
    --faint: #9a9284;
    --line: rgba(23, 22, 20, 0.1);
    --line-strong: rgba(23, 22, 20, 0.18);
    color-scheme: light;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 240ms ease, color 240ms ease;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The K: ink on light, cream on dark and OLED. */
.mark-cream {
  display: block;
}
.mark-ink {
  display: none;
}
:root[data-theme="light"] .mark-cream {
  display: none;
}
:root[data-theme="light"] .mark-ink {
  display: block;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--cta);
  color: var(--cta-text);
}
.skip:focus {
  left: 8px;
}

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

/* ------------------------------------------------------------------ Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(100% - var(--gutter) * 2, var(--page));
  height: 68px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand .mark {
  width: 34px;
  height: 34px;
}

.wordmark {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.32em;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

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

.theme-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: var(--surface);
}

.theme-toggle .icon {
  display: none;
}
:root[data-theme="light"] .icon-sun,
:root[data-theme="dark"] .icon-moon,
:root[data-theme="oled"] .icon-oled {
  display: block;
}

.menu-toggle {
  display: none;
  padding: 0 10px;
}

.mobile-menu {
  display: grid;
  gap: 2px;
  padding: 8px var(--gutter) 16px;
  border-top: 1px solid var(--line);
}

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

.mobile-menu a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  text-decoration: none;
}

/* -------------------------------------------------------------- Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-cta {
  background: var(--cta);
  color: var(--cta-text);
}

.button-cta:hover {
  background: color-mix(in srgb, var(--cta) 88%, #000);
}

.button-ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.button-ghost:hover {
  border-color: color-mix(in srgb, var(--text) 30%, transparent);
}

.nav-download {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.86rem;
}

/* ----------------------------------------------------------------- Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100% - var(--gutter) * 2, var(--page));
  margin: 0 auto;
  padding: clamp(56px, 10vw, 110px) 0 0;
  text-align: center;
}

.hero::before {
  /* A soft warm glow behind the K. */
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: -1;
  width: min(720px, 120vw);
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--gold) 14%, transparent), transparent);
  pointer-events: none;
}

.hero-mark img {
  width: clamp(104px, 16vw, 148px);
  height: auto;
  animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.gold-rule {
  display: block;
  width: 52px;
  height: 2px;
  margin: 28px 0 22px;
  border-radius: 2px;
  background: var(--gold);
  animation: grow 900ms 200ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.eyebrow {
  color: var(--cta);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin-top: 14px;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  font-weight: 800;
}

.br-phone {
  display: none;
}

.lede {
  max-width: 600px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.platforms {
  margin-top: 18px;
  color: var(--faint);
  font-size: 0.82rem;
}

/* A drawing of the app window. */
.app-frame {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  max-width: 980px;
  height: clamp(340px, 46vw, 470px);
  margin-top: clamp(48px, 8vw, 80px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
}

.app-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
}

.app-side img {
  width: 24px;
  height: 24px;
  margin-bottom: 12px;
}

.side-item {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--line-strong);
}

.side-item.is-on {
  background: color-mix(in srgb, var(--cta) 75%, transparent);
}

.app-main {
  min-width: 0;
  overflow: hidden;
}

.app-hero {
  display: flex;
  align-items: flex-end;
  gap: clamp(16px, 3vw, 28px);
  padding: clamp(20px, 4vw, 36px);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--cta) 32%, transparent), transparent 60%),
    linear-gradient(to bottom, color-mix(in srgb, var(--gold) 10%, transparent), transparent);
}

.app-cover {
  position: relative;
  flex: none;
  width: clamp(96px, 16vw, 168px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(145deg, #2b2723, #171614);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.app-cover svg {
  /* A gold kintsugi crack across the cover. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.app-cover path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.app-info {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.app-kicker {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.app-title {
  font-size: clamp(1.5rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.app-meta {
  color: var(--muted);
  font-size: 0.74rem;
}

.app-buttons {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.app-buttons i {
  width: 74px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.app-buttons i.is-play {
  border-color: transparent;
  background: var(--text);
}

.app-buttons i.is-small {
  width: 30px;
}

.app-tracks {
  margin: 0;
  padding: 6px clamp(16px, 4vw, 36px);
  list-style: none;
}

.app-tracks li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 44px;
  border-bottom: 1px solid var(--line);
}

.app-tracks b {
  width: 10px;
  height: 8px;
  border-radius: 2px;
  background: var(--line-strong);
}

.app-tracks span {
  width: var(--w);
  height: 9px;
  border-radius: 5px;
  background: var(--line-strong);
}

.app-tracks em {
  color: var(--faint);
  font-size: 0.72rem;
  font-style: normal;
}

.app-tracks li.is-playing {
  margin-inline: -10px;
  padding-inline: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--cta) 16%, transparent);
}

.app-tracks li.is-playing b,
.app-tracks li.is-playing span {
  background: var(--cta);
}

.app-player {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 60%, var(--surface));
}

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

.app-now > i {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: linear-gradient(145deg, #2b2723, #171614);
}

.app-now span {
  display: grid;
  gap: 6px;
}

.app-now b {
  width: 90px;
  height: 8px;
  border-radius: 4px;
  background: var(--line-strong);
}

.app-now small {
  width: 60px;
  height: 7px;
  border-radius: 4px;
  background: var(--line);
}

.app-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-controls i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--line-strong);
}

.app-controls i.is-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--text);
}

.app-progress {
  justify-self: end;
  width: min(160px, 100%);
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
}

.app-progress span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: 2px;
  background: var(--cta);
}

/* ------------------------------------------------------------- Sections */
.section {
  width: min(100% - var(--gutter) * 2, var(--page));
  margin: 0 auto;
  padding: clamp(64px, 10vw, 112px) 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 52px);
}

.section-head h2,
.download h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
}

.section-lede {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* The gold seam between sections. */
.seam {
  width: min(100% - var(--gutter) * 2, var(--page));
  height: 24px;
  margin: 0 auto;
}

.seam svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.seam path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}

/* With the script, each seam draws itself when it scrolls into view. */
.js .seam path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1600ms cubic-bezier(0.3, 0.6, 0.2, 1);
}

.js .seam.is-visible path {
  stroke-dashoffset: 0;
}

/* Libraries */
.library-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

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

.library-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.card-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 26px;
  fill: none;
  stroke: var(--cta);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.library-card h3 {
  font-size: 1.15rem;
}

.library-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.feature-wide {
  grid-column: span 3;
  background:
    radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--cta) 14%, transparent), transparent 60%),
    var(--surface);
}

.feature-kicker {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.feature h3 {
  margin-top: 12px;
  font-size: 1.35rem;
}

.feature-wide h3 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

.feature p:not(.feature-kicker) {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.feature-wide p:not(.feature-kicker) {
  max-width: 720px;
  font-size: 1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Server */
.server-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.server-item {
  padding: 28px 28px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.server-item h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
}

.server-item h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--cta);
  transform: rotate(45deg);
}

.server-item p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Apps */
.section-band {
  width: 100%;
  padding-inline: max(var(--gutter), (100% - var(--page)) / 2);
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-list li {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.app-list strong {
  font-size: 1rem;
}

.app-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

/* Self-hosted */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.principles article {
  padding-top: 18px;
  border-top: 2px solid var(--text);
}

.principles h3 {
  font-size: 1.1rem;
}

.principles p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.quickstart {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-top: clamp(48px, 7vw, 72px);
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.quickstart h3 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.quickstart-text > p {
  margin-top: 12px;
  color: var(--muted);
}

.steps {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.image-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
}

.image-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.image-title {
  font-weight: 700;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--cta) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--cta) 12%, transparent);
  color: var(--cta);
  font-size: 0.78rem;
  font-weight: 700;
}

.soon i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}

.image-parts {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.image-parts li {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.image-parts li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.image-parts strong {
  font-size: 0.95rem;
}

.image-parts span {
  color: var(--muted);
  font-size: 0.86rem;
}

/* Languages */
.languages {
  padding-block: 0 clamp(64px, 10vw, 112px);
  text-align: center;
}

.language-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  font-weight: 700;
}

.language-list li:nth-child(odd) {
  color: var(--muted);
}

/* Download */
.download {
  padding-top: 0;
}

.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(70% 90% at 50% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%),
    var(--surface);
  text-align: center;
}

.download-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.download h2 {
  margin-top: 26px;
}

.download-card > p {
  max-width: 560px;
  margin-top: 14px;
  color: var(--muted);
}

.download .hero-actions {
  margin-top: 28px;
}

.download .fine {
  margin-top: 20px;
  color: var(--faint);
  font-size: 0.82rem;
}

/* FAQ */
.faq {
  max-width: 820px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-size: 1.05rem;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  font-weight: 400;
  transition: transform 200ms ease;
}

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

.faq details p {
  max-width: 680px;
  padding: 0 0 24px;
  color: var(--muted);
}

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  width: min(100% - var(--gutter) * 2, var(--page));
  margin: 0 auto;
  padding: 36px 0 44px;
}

.footer .brand .mark {
  width: 28px;
  height: 28px;
}

.footer-tag {
  color: var(--faint);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes grow {
  from {
    width: 0;
  }
}

/* ----------------------------------------------------------- Responsive */
@media (max-width: 1020px) {
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .nav-actions {
    margin-left: auto;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .feature-grid,
  .server-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-wide {
    grid-column: span 2;
  }
  .quickstart {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .theme-label,
  .nav-download {
    display: none;
  }
  .br-phone {
    display: inline;
  }
  .hero-actions .button {
    width: 100%;
  }
  .library-grid,
  .feature-grid,
  .server-grid,
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-wide {
    grid-column: auto;
  }
  .app-frame {
    grid-template-columns: 44px minmax(0, 1fr);
    height: 330px;
  }
  .app-side img {
    width: 20px;
    height: 20px;
  }
  .side-item {
    width: 16px;
    height: 16px;
  }
  .app-buttons i {
    width: 48px;
  }
  .app-player {
    grid-template-columns: auto 1fr;
  }
  .app-progress {
    display: none;
  }
  .footer-links {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .js .seam path {
    stroke-dashoffset: 0;
  }
}
