/* Chess Organiser website. Colours follow the desktop app (app/src/app.css):
   black and gold from the logo on warm paper. The hero, the pairing-tests band
   and the footer are always dark; everything else follows the system theme. */

:root {
  --ink: #0b0b0b;
  --ink-2: #151515;
  --ink-line: #2b2b2b;
  --ink-text: #ecebe7;
  --ink-muted: #a9a79f;

  --gold: #c9a043;
  --gold-hover: #d6b05a;
  --gold-light: #e0b965;
  --on-gold: #141414;

  --bg: #f5f4f0;
  --bg-alt: #eeece6;
  --surface: #ffffff;
  --line: #dcd8cd;
  --text: #17171a;
  --muted: #5b5951;
  --accent-text: #85600f;
  --accent-soft: #f6eedb;
  --shot-shadow: 0 30px 70px -30px rgb(23 23 26 / 0.45), 0 8px 24px -12px rgb(23 23 26 / 0.18);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --bg-alt: #141414;
    --surface: #1a1a1a;
    --line: #2e2e2e;
    --text: #ecebe7;
    --muted: #a6a49c;
    --accent-text: #e0b965;
    --accent-soft: #2c2616;
    --shot-shadow: 0 30px 70px -30px rgb(0 0 0 / 0.9), 0 8px 24px -12px rgb(0 0 0 / 0.6);
  }
}

/* Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg .fill {
  fill: currentColor;
  stroke: none;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

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

.narrow {
  max-width: calc(820px + 2 * var(--gutter));
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.975rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.button-lg {
  min-height: 52px;
  padding: 14px 26px;
  font-size: 1.05rem;
}

.button-gold {
  background: var(--gold);
  color: var(--on-gold);
}
.button-gold:hover {
  background: var(--gold-hover);
}

.button-ghost {
  border-color: rgb(236 235 231 / 0.28);
  color: var(--ink-text);
}
.button-ghost:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.button-outline {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}
.button-outline:hover {
  border-color: var(--gold);
}

/* Eyebrow: a small gold diamond, as at the foot of the logo. */

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 10px 0 2px;
  vertical-align: 0.1em;
  background: var(--gold);
  transform: rotate(45deg);
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 62ch;
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(11 11 11 / 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  color: var(--ink-text);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.brand img {
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}

.nav-links a:not(.button) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 180ms ease;
}
.nav-links a:not(.button):hover {
  color: var(--ink-text);
}

.nav-github svg {
  width: 18px;
  height: 18px;
}

.nav-cta {
  min-height: 40px;
  margin-inline-start: 8px;
  padding: 8px 18px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  padding: 10px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-text);
  cursor: pointer;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px var(--gutter) 20px;
    background: var(--ink);
    border-bottom: 1px solid var(--ink-line);
  }
  .nav[data-open='true'] .nav-links {
    display: flex;
  }
  .nav-links a:not(.button) {
    font-size: 1.05rem;
  }
  .nav-cta {
    margin: 8px 0 0;
    min-height: 48px;
  }
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 7vw, 88px);
  background:
    radial-gradient(60% 45% at 50% 0%, rgb(201 160 67 / 0.2), transparent 70%),
    radial-gradient(50% 40% at 50% 78%, rgb(201 160 67 / 0.14), transparent 70%),
    var(--ink);
  color: var(--ink-text);
}

/* A faint chessboard that fades out towards the edges. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(rgb(255 255 255 / 0.035) 0 25%, transparent 0 50%) 50% 0 / 88px 88px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero .eyebrow {
  color: var(--gold-light);
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.04;
  max-width: 15ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--gold-light);
}

.hero .lead {
  margin-top: 24px;
  color: var(--ink-muted);
  font-size: clamp(1.075rem, 1.6vw, 1.25rem);
  max-width: 60ch;
}

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

.hero-meta {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.hero-shot {
  position: relative;
  margin-top: clamp(44px, 6vw, 72px);
}

/* App window frame */

.window {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shot-shadow);
}

.window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.dot:nth-child(2) {
  background: #febc2e;
}
.dot:nth-child(3) {
  background: #28c840;
}

.window-title {
  position: absolute;
  inset: 0 90px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shot-link {
  display: block;
  cursor: zoom-in;
}

.window-hero {
  border-color: rgb(255 255 255 / 0.12);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.6),
    0 40px 120px -30px rgb(201 160 67 / 0.35),
    0 30px 80px -20px rgb(0 0 0 / 0.8);
}

.callout {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgb(201 160 67 / 0.55);
  border-radius: 12px;
  background: rgb(18 18 18 / 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink-text);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.7);
}

.callout svg {
  width: 20px;
  height: 20px;
  color: var(--gold-light);
}

.callout-keys {
  left: calc(var(--gutter) - 28px);
  bottom: 14%;
}

.callout-undo {
  right: calc(var(--gutter) + 48px);
  top: -24px;
}

.keys {
  display: flex;
  gap: 4px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid rgb(201 160 67 / 0.6);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #1d1d1d;
  color: var(--gold-light);
  font: 600 0.85rem/1 var(--font-mono);
}

@media (max-width: 1240px) {
  .callout-keys {
    left: calc(var(--gutter) + 16px);
  }
}

@media (max-width: 860px) {
  .callout {
    display: none;
  }
}

/* Stats */

.stats {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  padding: 32px 24px;
  border-inline-start: 1px solid var(--line);
}
.stat:first-child {
  border-inline-start: 0;
  padding-inline-start: 0;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-value span {
  margin: 0 4px;
  color: var(--gold);
  font-weight: 600;
}

.stat-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat,
  .stat:first-child {
    padding: 24px 0;
    border-inline-start: 0;
  }
  .stat:nth-child(even) {
    padding-inline-start: 20px;
    border-inline-start: 1px solid var(--line);
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat:nth-child(even) {
    padding-inline-start: 0;
    border-inline-start: 0;
  }
  .stat:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }
}

/* Sections */

.section {
  padding: clamp(72px, 10vw, 120px) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head .lead {
  margin-top: 16px;
}

/* Workflow */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font: 700 2.6rem/1 var(--font-display);
  font-variant-numeric: lining-nums;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Screenshot tour */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tabs [role='tab'] {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 500 0.95rem/1.2 var(--font-body);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}
.tabs [role='tab']:hover {
  border-color: var(--gold);
}
.tabs [role='tab'][aria-selected='true'] {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
}

.tab-panel[hidden] {
  display: none;
}

.caption {
  max-width: 70ch;
  margin-top: 22px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tabs [role='tab'] {
    flex: none;
  }
  .window-bar {
    height: 26px;
  }
  .window-title {
    display: none;
  }
  .dot {
    width: 9px;
    height: 9px;
  }
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 200ms ease;
}
.feature:hover {
  border-color: var(--gold);
}

.feature svg {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.feature h3 {
  margin-bottom: 8px;
}

.feature p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* Two-column text + terminal */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

.split h2 {
  margin-bottom: 18px;
}

@media (max-width: 960px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.terminal {
  overflow: hidden;
  border: 1px solid #2c2c2c;
  border-radius: 12px;
  background: #121212;
  box-shadow: 0 30px 70px -30px rgb(0 0 0 / 0.6);
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid #262626;
}

.terminal pre {
  margin: 0;
  padding: 20px 22px 24px;
  overflow-x: auto;
  color: #e8e6e0;
  font: 0.875rem/1.7 var(--font-mono);
}

.terminal code {
  font-size: inherit;
}

.terminal .c {
  color: #8d8b84;
}

.terminal .p {
  color: var(--gold-light);
  user-select: none;
}

/* Dark band: pairing tests */

.section-dark {
  background:
    radial-gradient(50% 60% at 85% 50%, rgb(201 160 67 / 0.1), transparent 70%),
    var(--ink);
  color: var(--ink-text);
}

.section-dark .eyebrow {
  color: var(--gold-light);
}

.section-dark .lead {
  color: var(--ink-muted);
}

.results {
  width: 100%;
  margin-top: 32px;
  border-collapse: collapse;
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
}

.results th,
.results td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--ink-line);
  text-align: right;
  white-space: nowrap;
}

.results th:first-child {
  padding-inline-start: 0;
  text-align: left;
  white-space: normal;
}

.results td:last-child,
.results th:last-child {
  padding-inline-end: 0;
}

.results thead th {
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.results tbody th {
  font-weight: 500;
}

.results td {
  color: var(--gold-light);
  font-weight: 600;
}

.results sup,
.note sup {
  color: var(--gold-light);
}

.note {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .results th,
  .results td {
    padding-inline: 6px;
    font-size: 0.9rem;
  }
}

/* Languages */

.langs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.langs li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.lang-native {
  font: 600 1.5rem/1.25 var(--font-display);
}

.lang-native[lang='ar'] {
  font-family: 'Noto Sans Arabic', 'Geeza Pro', 'Segoe UI', var(--font-body);
  font-weight: 600;
  text-align: left;
}

.lang-en {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .langs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .langs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Open source */

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

.points li {
  position: relative;
  padding-inline-start: 26px;
  color: var(--muted);
}

.points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.points strong {
  color: var(--text);
  font-weight: 600;
}

.points code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

/* Download */

.downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.download {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.download h3 {
  font: 700 1.9rem/1.1 var(--font-display);
}

.download > p:not(.download-tag, .download-file) {
  color: var(--muted);
}

.download .button {
  margin-top: 16px;
}

.download-file {
  color: var(--muted);
  font: 0.85rem var(--font-mono);
}

.download-tag {
  display: none;
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 600;
}

.download.is-yours {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.download.is-yours .download-tag {
  display: block;
}

@media (max-width: 700px) {
  .downloads {
    grid-template-columns: 1fr;
  }
}

.notice {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

.notice svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent-text);
}

.notice strong {
  color: var(--text);
}

.notice em {
  color: var(--text);
  font-style: normal;
  font-weight: 500;
}

.source {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.source summary,
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
}

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

.source summary {
  padding: 16px 52px 16px 20px;
  font-weight: 600;
}

.source > p {
  padding: 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.source pre {
  margin: 14px 20px 20px;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: #121212;
  color: #e8e6e0;
  font: 0.875rem/1.7 var(--font-mono);
}

.source pre code {
  font-size: inherit;
}

/* Plus sign that turns into a minus when open. */
.source summary::after,
.faq summary::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background:
    linear-gradient(var(--accent-text), var(--accent-text)) center / 14px 2px no-repeat,
    linear-gradient(var(--accent-text), var(--accent-text)) center / 2px 14px no-repeat;
  transition: transform 200ms ease;
}

.source[open] summary::after,
.faq details[open] summary::after {
  background: linear-gradient(var(--accent-text), var(--accent-text)) center / 14px 2px no-repeat;
  transform: rotate(180deg);
}

/* FAQ */

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

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

.faq summary {
  padding: 22px 48px 22px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.faq summary::after {
  right: 4px;
}

.faq summary:hover {
  color: var(--accent-text);
}

.faq details p {
  max-width: 68ch;
  padding-bottom: 24px;
  color: var(--muted);
}

/* Footer */

.footer {
  padding: 56px 0 40px;
  background: var(--ink);
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 40px;
}

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

.footer-brand p {
  margin-top: 12px;
  max-width: 40ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px 22px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-text);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--gold-light);
}

.footer-legal {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* 404 page */

.not-found {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(60% 50% at 50% 40%, rgb(201 160 67 / 0.16), transparent 70%),
    var(--ink);
  color: var(--ink-text);
}

.not-found::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(rgb(255 255 255 / 0.035) 0 25%, transparent 0 50%) 50% 0 / 88px 88px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 15%, transparent 75%);
}

.not-found-head {
  display: flex;
  align-items: center;
  min-height: var(--nav-height);
}

.not-found-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-block: 48px 96px;
  text-align: center;
}

.not-found .eyebrow {
  margin-bottom: -8px;
  color: var(--gold-light);
}

.not-found h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.08;
}

.not-found h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--gold-light);
}

.not-found .lead {
  color: var(--ink-muted);
}
