/* Vadhod — site styles.
   Palette and type are lifted from the app's own design system
   (core/design/color/PastelColors.kt, core/design/theme/Type.kt) so the
   site and the app read as one thing. */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-var.woff2") format("woff2-variations");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* light — warm ivory paper */
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-sunk: #f0eee6;
  --line: #e2dfd4;
  --line-soft: #ece9df;
  --ink: #1f1e1d;
  --ink-soft: #3d3d3a;
  --muted: #6b6a64;
  --accent: #c25f3d;          /* clay, darkened for AA on ivory */
  --accent-plain: #d97757;    /* brand clay, for large/non-text use */
  --accent-sunk: #f6e1d7;
  --accent-ink: #5a2a17;
  --good: #4f7461;            /* sage, darkened for AA */
  --good-sunk: #dce7df;
  --shadow: 0 1px 2px rgba(31, 30, 29, .05), 0 8px 24px -12px rgba(31, 30, 29, .12);
  --on-accent: #ffffff;
  --accent-hover: #cc785c;

  --measure: 68ch;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --step: clamp(3.5rem, 8vw, 6rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1916;
    --surface: #1f1e1d;
    --surface-sunk: #2a2825;
    --line: #3a3833;
    --line-soft: #302f2c;
    --ink: #f0eee6;
    --ink-soft: #e4e1d8;
    --muted: #b0aca1;
    --accent: #e9a082;
    --accent-plain: #e9a082;
    --accent-sunk: #3a2a22;
    --accent-ink: #ffd9c7;
    --good: #a8c4b4;
    --good-sunk: #2a332d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
  --on-accent: #2b1409;
  --accent-hover: #f0b195;
  }
}

:root[data-theme="dark"] {
  --bg: #1a1916;
  --surface: #1f1e1d;
  --surface-sunk: #2a2825;
  --line: #3a3833;
  --line-soft: #302f2c;
  --ink: #f0eee6;
  --ink-soft: #e4e1d8;
  --muted: #b0aca1;
  --accent: #e9a082;
  --accent-plain: #e9a082;
  --accent-sunk: #3a2a22;
  --accent-ink: #ffd9c7;
  --good: #a8c4b4;
  --good-sunk: #2a332d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
  --on-accent: #2b1409;
  --accent-hover: #f0b195;
}

:root[data-theme="light"] {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-sunk: #f0eee6;
  --line: #e2dfd4;
  --line-soft: #ece9df;
  --ink: #1f1e1d;
  --ink-soft: #3d3d3a;
  --muted: #6b6a64;
  --accent: #c25f3d;
  --accent-plain: #d97757;
  --accent-sunk: #f6e1d7;
  --accent-ink: #5a2a17;
  --good: #4f7461;
  --good-sunk: #dce7df;
  --shadow: 0 1px 2px rgba(31, 30, 29, .05), 0 8px 24px -12px rgba(31, 30, 29, .12);
  --on-accent: #ffffff;
  --accent-hover: #cc785c;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent-plain); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; display: block; }

code, kbd, samp, pre {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: .875em;
}

/* ---------- shell ---------- */

.wrap { width: 100%; max-width: 60rem; margin-inline: auto; padding-inline: var(--pad); }
.measure { max-width: var(--measure); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-in {
  display: flex; align-items: center; gap: 1rem;
  min-height: 3.75rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 800; letter-spacing: -.015em; color: var(--ink);
  text-decoration: none; font-size: 1.0625rem;
}
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.brand span { color: var(--ink); }
.topnav { margin-left: auto; display: flex; gap: 1.25rem; align-items: center; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--ink); }

/* ---------- type ---------- */

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 800; }
h3 { font-size: 1.1875rem; font-weight: 700; }

.eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 .875rem;
}
.lede { font-size: clamp(1.0625rem, 2.2vw, 1.25rem); color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

section { padding-block: var(--step); }
section + section { padding-top: 0; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }

/* ---------- hero manifest card (the signature) ---------- */

.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { margin: 0 0 2rem; }

.manifest {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 46rem;
}
.manifest-head {
  display: flex; align-items: center; gap: .5rem;
  padding: .625rem .9375rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-sunk);
  font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.manifest-body { padding: 1.125rem .9375rem 1.25rem; overflow-x: auto; }
.manifest pre { margin: 0; line-height: 1.9; white-space: pre; }
.tag { color: var(--muted); }
.attr { color: var(--accent); font-weight: 600; }
.gone {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--accent-plain);
  text-decoration-thickness: 2px;
  opacity: .72;
}
.note {
  display: inline-block; margin-left: .5rem;
  font-family: "Nunito", sans-serif; font-size: .8125rem; font-weight: 700;
  color: var(--good); background: var(--good-sunk);
  padding: .0625rem .5rem; border-radius: 999px;
  text-decoration: none; vertical-align: 1px;
}

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6875rem 1.125rem; border-radius: 10px;
  font-weight: 700; font-size: .9375rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent-plain); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-sunk); }
.play-badge img { height: 56px; width: auto; }

/* ---------- cards / grid ---------- */

.grid { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.25rem 1.25rem 1.375rem;
}
.card h3 { margin-bottom: .375rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .9375rem; }
.card-icon { font-size: 1.125rem; margin-bottom: .625rem; display: block; }

/* ---------- shots ---------- */

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%;
  gap: .875rem; overflow-x: auto; padding-bottom: .75rem;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.shots img {
  border-radius: 14px; border: 1px solid var(--line);
  scroll-snap-align: center; background: var(--surface-sunk);
}
@media (min-width: 46rem) { .shots { grid-auto-columns: 1fr; grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; } }

/* ---------- data table ---------- */

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td { text-align: left; padding: .75rem .9375rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { font-weight: 700; color: var(--ink); white-space: nowrap; }
td { color: var(--ink-soft); }
td code { word-break: break-all; }

.hash {
  display: block; background: var(--surface-sunk); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: .625rem .75rem; word-break: break-all;
  font-size: .8125rem; color: var(--ink-soft);
}

pre.block {
  background: var(--surface-sunk); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: .9375rem; overflow-x: auto; margin: 0;
  line-height: 1.6;
}

/* ---------- callout ---------- */

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent-plain);
  background: var(--surface); border-radius: 10px; padding: 1rem 1.125rem;
}
.callout p { margin: 0; font-size: .9375rem; color: var(--ink-soft); }
.callout strong { color: var(--ink); }

/* ---------- app row (hub) ---------- */

.applink {
  display: flex; gap: 1.125rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 1.25rem; text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.applink:hover { border-color: var(--accent-plain); transform: translateY(-2px); }
.applink img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.applink h3 { margin-bottom: .25rem; }
.applink p { margin: 0; color: var(--ink-soft); font-size: .9375rem; }
.applink .go { color: var(--accent); font-weight: 700; font-size: .875rem; margin-top: .5rem; display: block; }

.tags { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .75rem; }
.tag-pill {
  font-size: .75rem; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .125rem .5625rem;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line-soft); margin-top: var(--step);
  padding-block: 2.5rem 3.5rem; color: var(--muted); font-size: .875rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }
.footlinks { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin-bottom: 1rem; }

/* ---------- prose (privacy) ---------- */

.prose h2 { margin-top: 2.5rem; margin-bottom: .75rem; font-size: 1.375rem; }
.prose h2:first-of-type { margin-top: 1.5rem; }
.prose p { margin: 0 0 1rem; color: var(--ink-soft); }
.prose ul { margin: 0 0 1rem; padding-left: 1.25rem; color: var(--ink-soft); }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--accent-plain); }
.prose strong { color: var(--ink); font-weight: 700; }

/* ---------- theme toggle ---------- */

.themetoggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; padding: 0;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px;
  font-size: .9375rem; line-height: 1; cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.themetoggle:hover { color: var(--ink); border-color: var(--muted); }
