/* Yuzumi site — tokens mirrored from the app (frontend/src/style.css @theme).
 *
 * Colour is not a free choice here: the site has to read as the same product as
 * the desktop app, so the palette, type stack and surface ramp are the app's own
 * values. Red is functional: progress and the call to action, never a wash.
 */

:root {
  /* Surfaces: black with a barely warm tint, straight from the app. */
  --night-900: #070606;
  --night-800: #0e0c0c;
  --night-700: #151212;
  --night-600: #231c1c;
  --night-500: #352a2a;

  /* Text scale, warm greys. */
  --text-1: #f6f1f1;
  --text-2: #d3c9c9;
  --text-3: #a69a9a;

  /* Accents. */
  --red: #d72638; /* progress, marks — never body text on dark */
  --red-text: #f25a68; /* red that passes contrast as text */
  --red-fill: #b81c2d; /* button fill, 6.5:1 with white */
  --ember: #ff6b4a;

  --rule: 1px solid var(--night-600);
  --pad: clamp(1.25rem, 5vw, 3.5rem);
  --measure: 36rem;
  --radius: 6px;
}

@media (prefers-color-scheme: light) {
  :root {
    --night-900: #fbf3f2;
    --night-800: #fde8e6;
    --night-700: #ffffff;
    --night-600: #f4cfcc;
    --night-500: #e6aeaa;
    --text-1: #1d1111;
    --text-2: #432e2e;
    --text-3: #5f4747;
    --red-text: #b81c2d;
    --ember: #b4281c;
  }
}

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

html {
  color-scheme: dark light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night-900);
  color: var(--text-1);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-optical-sizing: auto;
}

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

a:hover {
  color: var(--text-1);
}

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

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

/* ── top bar ───────────────────────────────────────────────────────────── */

.bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem var(--pad);
  border-bottom: var(--rule);
  background: var(--night-800);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  color: var(--text-1);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--red);
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--text-3);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

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

.nav a[aria-current='page'] {
  color: var(--text-1);
  border-bottom-color: var(--red);
}

/* ── layout ────────────────────────────────────────────────────────────── */

main {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--pad);
  flex: 1;
}

.col {
  max-width: var(--measure);
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}

h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: var(--measure);
}

.muted {
  color: var(--text-3);
}

.fine {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── hero ──────────────────────────────────────────────────────────────── */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.intro-copy {
  max-width: var(--measure);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  background: var(--red-fill);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:hover {
  background: var(--red);
  color: #fff;
}

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

.btn.secondary {
  background: transparent;
  border-color: var(--night-500);
  color: var(--text-1);
}

.btn.secondary:hover {
  border-color: var(--text-3);
  background: var(--night-800);
  color: var(--text-1);
}

/* The hero visual is the app's own chrome, drawn in CSS: no screenshot, no
 * stock art, and it stays sharp at any width. */
.mock {
  margin: 0;
  border: var(--rule);
  border-radius: 10px;
  background: var(--night-800);
  padding: 10px;
  box-shadow: 0 24px 60px -32px #000;
}

.mock-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background:
    radial-gradient(120% 100% at 22% 18%, #2b1a1c 0%, transparent 58%),
    radial-gradient(90% 90% at 82% 88%, #14202a 0%, transparent 62%),
    var(--night-700);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  gap: 0.75rem;
}

.mock-caption {
  align-self: center;
  margin: auto 0;
  color: var(--text-3);
  font-size: 0.875rem;
  text-align: center;
  max-width: 20rem;
  padding-inline: 1rem;
}

.mock-sub {
  font-size: 0.875rem;
  color: var(--text-1);
  background: #000000a6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
}

.mock-bar {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--night-500);
}

.mock-bar span {
  position: absolute;
  inset: 0 38% 0 0;
  border-radius: 2px;
  background: var(--red);
}

.mock-bar span::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.mock-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.chip {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--night-500);
  border-radius: 4px;
  color: var(--text-2);
}

.mock-chrome .spacer {
  margin-left: auto;
}

/* Mascot: drop /assets/mascot.png next to the site and it appears; until then
 * the slot stays out of the layout instead of showing a broken image. */
.mascot {
  position: relative;
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.mascot img {
  width: min(220px, 42vw);
}

.mascot[hidden] {
  display: none;
}

/* ── sections ──────────────────────────────────────────────────────────── */

.section {
  margin-top: clamp(4rem, 10vw, 7rem);
  border-top: var(--rule);
  padding-top: 2.5rem;
}

.section > .lede {
  margin-bottom: 2.5rem;
}

.spec {
  margin: 0;
  display: grid;
  gap: 0;
}

.spec > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem 2rem;
  padding: 1.125rem 0;
  border-top: var(--rule);
}

.spec > div:last-child {
  border-bottom: var(--rule);
}

.spec dt {
  font-weight: 600;
  color: var(--text-1);
}

.spec dd {
  margin: 0;
  color: var(--text-3);
}

/* Download block: facts read like a released build, not a pricing table. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 2.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: var(--rule);
}

.facts div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.facts dt {
  font-size: 0.8125rem;
  color: var(--text-3);
}

.facts dd {
  margin: 0;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}

/* ── changelog ─────────────────────────────────────────────────────────── */

.release {
  padding: 1.75rem 0;
  border-top: var(--rule);
}

.release:last-of-type {
  border-bottom: var(--rule);
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.release-head h2 {
  margin: 0;
  font-size: 1.1875rem;
}

.release-date {
  color: var(--text-3);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.release-body {
  max-width: var(--measure);
  color: var(--text-2);
}

.release-body ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.release-body li {
  margin-bottom: 0.4rem;
}

.release-body h3 {
  margin: 1.25rem 0 0.5rem;
  color: var(--text-1);
}

.release-body strong {
  color: var(--text-1);
  font-weight: 600;
}

/* ── status / admin ────────────────────────────────────────────────────── */

.status {
  margin: 2rem 0 0;
  border: var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.status div {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-top: var(--rule);
  font-size: 0.9375rem;
}

.status div:first-child {
  border-top: 0;
}

.status dt {
  color: var(--text-3);
}

.status dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

pre {
  margin: 1.5rem 0 0;
  padding: 1rem;
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--night-800);
  color: var(--text-2);
  font-size: 0.8125rem;
  overflow-x: auto;
}

/* ── footer ────────────────────────────────────────────────────────────── */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1.5rem var(--pad);
  border-top: var(--rule);
  color: var(--text-3);
  font-size: 0.875rem;
}

.foot a {
  color: var(--text-3);
}

.foot .spacer {
  margin-left: auto;
}

/* ── responsive ────────────────────────────────────────────────────────── */

@media (max-width: 52rem) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .spec > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .status div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

@media (max-width: 26rem) {
  .bar {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .brand {
    flex-basis: 100%;
  }

  .actions {
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .facts {
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
