/* TagTuner website. Colours follow the app (App.xaml): near-black surfaces,
   one lime accent. The app previews on this page stay dark in both themes,
   because the app itself is dark. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg: #111210;
  --bg-raised: #161714;
  --card: #1b1c19;
  --card-hover: #21231f;
  --stroke: #2a2c27;
  --stroke-strong: #3a3d36;

  --text: #eef0ea;
  --text-2: #bfc3b8;
  --text-3: #8e9387;

  --accent: #c8f542;
  --accent-hover: #d6fa6a;
  --accent-ink: #c8f542;
  --accent-soft: rgb(200 245 66 / .12);
  --on-accent: #11140a;
  --warn: #f5c451;

  --shadow: 0 30px 80px -24px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .06);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* The app, always dark */
  --app-bg: #1f1f1f;
  --app-panel: #232323;
  --app-row: #2a2a2a;
  --app-row-sel: #333a26;
  --app-stroke: #353535;
  --app-text: #f2f2f2;
  --app-text-2: #b4b4b4;
  --app-text-3: #8a8a8a;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f4;
    --bg-raised: #eef0ea;
    --card: #ffffff;
    --card-hover: #fafbf8;
    --stroke: #e1e4dc;
    --stroke-strong: #c8ccc1;

    --text: #151612;
    --text-2: #43463e;
    --text-3: #62665b;

    --accent-ink: #4a6b0a;
    --accent-soft: rgb(120 170 20 / .14);

    --shadow: 0 30px 70px -26px rgb(30 40 10 / .3), 0 0 0 1px rgb(20 30 10 / .08);
  }
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 767px) { .wrap { padding: 0 16px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 30; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

section { padding: 112px 0; }
section[id] { scroll-margin-top: 72px; }
@media (max-width: 767px) { section { padding: 72px 0; } }

h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.1rem); }
h3 { font-size: 1.1rem; letter-spacing: -.01em; line-height: 1.3; }
.lead { color: var(--text-2); font-size: 1.125rem; max-width: 56ch; margin-top: 16px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  font-weight: 550; font-size: 15px; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--stroke-strong); color: var(--text); }
.btn-ghost:hover { background: var(--card); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--stroke); }
.nav .wrap { display: flex; align-items: center; height: 64px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 14.5px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.nav-links .gh { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 860px) { .nav-links .hide-sm { display: none; } }

/* ── Hero ───────────────────────────────────────────────────── */
.hero { padding: 72px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.4rem); letter-spacing: -.035em; line-height: 1.02; }
.hero .lead { font-size: 1.15rem; max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero .lead { max-width: 48ch; }
}

/* ── App preview (a working miniature of the TagTuner window) ─ */
.app {
  background: var(--app-bg); color: var(--app-text);
  border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden; font-size: 13px; user-select: none;
}
.app-bar { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--app-stroke); }
.app-bar img { width: 18px; height: 18px; border-radius: 5px; }
.crumbs { display: flex; gap: 7px; align-items: center; color: var(--app-text-2); font-size: 12px;
  background: #2b2b2b; border: 1px solid var(--app-stroke); border-radius: 5px; padding: 3px 10px; }
.crumbs b { color: var(--app-text); font-weight: 600; }
.app-dots { margin-left: auto; display: flex; gap: 18px; color: var(--app-text-3); }
.app-dots .icon { width: 12px; height: 12px; }
.app-body { display: grid; grid-template-columns: 208px 1fr; min-height: 372px; }
.meta { border-right: 1px solid var(--app-stroke); padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.meta-head { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--app-text-3); }
.meta-cover { display: flex; gap: 10px; align-items: flex-start; }
.meta-cover .art { width: 64px; height: 64px; border-radius: 5px; background: #2b2b2b center/cover; border: 1px solid var(--app-stroke); }
.meta-cover span { font-size: 10.5px; color: var(--app-text-2); font-family: "Geist Mono", monospace; white-space: pre-line; }
.field label { display: block; font-size: 10.5px; color: var(--app-text-2); margin-bottom: 3px; }
.field div { height: 26px; border-radius: 4px; background: #2c2c2c; border: 1px solid var(--app-stroke);
  padding: 0 8px; display: flex; align-items: center; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field div.mixed { color: var(--app-text-3); font-style: italic; }
.field div.off { opacity: .45; }
.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.meta-plan { margin-top: auto; font-size: 11px; color: var(--app-text-2); border-top: 1px solid var(--app-stroke); padding-top: 9px; }

.list-head, .row { display: grid; grid-template-columns: 30px 40px minmax(0, 1fr) minmax(0, .8fr) 48px; gap: 10px; align-items: center; }
.list-head { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--app-text-3); padding: 10px 14px 8px; }
.list-head .r { text-align: right; }
.rows { display: flex; flex-direction: column; gap: 3px; padding: 0 6px 10px; }
.row { padding: 5px 8px; border-radius: 5px; cursor: pointer; transition: background .15s; }
.row:hover { background: var(--app-row); }
.row.sel { background: var(--app-row-sel); }
.row .n { font-family: "Geist Mono", monospace; color: var(--app-text-2); text-align: right; font-size: 12px; }
.row .art { width: 36px; height: 36px; border-radius: 4px; background: #2b2b2b center/cover; }
.row .t b { display: block; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t span, .row .al { color: var(--app-text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .f { font-family: "Geist Mono", monospace; font-size: 11px; color: var(--app-text-2); text-align: right; }
.row .f.warn { color: var(--warn); }
.preview-hint { margin-top: 14px; font-size: 13.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .app-body { grid-template-columns: 1fr; }
  .meta { display: none; }
  .list-head, .row { grid-template-columns: 26px 36px minmax(0, 1fr) 44px; }
  .list-head .al, .row .al { display: none; }
}

/* ── Album mode: reorder ────────────────────────────────────── */
.album .wrap > p.lead { margin-bottom: 44px; }
.album-card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 0; border: 1px solid var(--stroke); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.album-card .app { border-radius: 0; box-shadow: none; }
.order { list-style: none; margin: 0; padding: 10px 8px 12px; display: flex; flex-direction: column; gap: 3px; position: relative; }
.order li { display: grid; grid-template-columns: 22px 30px 40px minmax(0, 1fr) minmax(0, 1fr) 40px 56px; gap: 12px; align-items: center;
  padding: 6px 8px; border-radius: 5px; background: transparent; cursor: grab; touch-action: none;
  transition: background .2s; }
.order li:hover { background: var(--app-row); }
.order li.dragging { background: var(--app-row-sel); box-shadow: 0 10px 30px -10px rgb(0 0 0 / .8); cursor: grabbing; z-index: 2; position: relative; }
.order li .grip { color: var(--app-text-3); display: grid; place-items: center; }
.order li .n { font-family: "Geist Mono", monospace; color: var(--app-text-2); text-align: right; font-size: 12px; transition: color .3s; }
.order li .art { width: 36px; height: 36px; border-radius: 4px; background: #2b2b2b center/cover; }
.order li .t b { display: block; font-weight: 500; }
.order li .t span { display: block; font-size: 11.5px; color: var(--app-text-3); }
.order li .fname { font-family: "Geist Mono", monospace; font-size: 12px; color: var(--app-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.order li .fmt { font-family: "Geist Mono", monospace; font-size: 11px; color: var(--app-text-3); }
.order-head { display: grid; grid-template-columns: 22px 30px 40px minmax(0, 1fr) minmax(0, 1fr) 40px 56px; gap: 12px; padding: 12px 16px 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--app-text-3); }
.order-head .r { text-align: right; }
.order li .moves { display: flex; gap: 2px; opacity: 0; transition: opacity .2s; }
.order li:hover .moves, .order li:focus-within .moves { opacity: 1; }
.order li .moves button { width: 26px; height: 26px; border-radius: 5px; border: 0; background: transparent; color: var(--app-text-2); cursor: pointer; display: grid; place-items: center; }
.order li .moves button:hover { background: #3a3a3a; color: var(--app-text); }
.order li.changed .n, .order li.changed .fname { color: var(--accent); }
@media (max-width: 640px) {
  .order li, .order-head { grid-template-columns: 22px 26px 36px minmax(0, 1fr) 56px; }
  .order li .fname, .order li .fmt, .order-head .hide-xs { display: none; }
}
.album-side { padding: 28px 28px 30px; display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--stroke); }
.album-side h3 { font-size: 1rem; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--text-2); font-size: 14.5px; }
.checks li b { color: var(--text); font-weight: 550; display: block; }
.checks .icon { color: var(--accent-ink); margin-top: 3px; }
.album-side .undo { margin-top: auto; font-size: 13.5px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
kbd { font-family: "Geist Mono", monospace; font-size: 12px; border: 1px solid var(--stroke-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--text-2); }
@media (max-width: 900px) {
  .album-card { grid-template-columns: 1fr; }
  .album-side { border-left: 0; border-top: 1px solid var(--stroke); }
}

/* ── Drop flow ──────────────────────────────────────────────── */
.flow .wrap { text-align: center; }
.flow .lead { margin: 16px auto 0; }
.flow-row { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1.15fr) 90px minmax(0, 1fr); align-items: center; text-align: left; }
.file { border: 1px solid var(--stroke); background: var(--card); border-radius: var(--radius); padding: 14px; display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; }
.file .art { width: 48px; height: 48px; border-radius: 6px; background: var(--bg-raised) center/cover; display: grid; place-items: center; color: var(--text-3); }
.file b { display: block; font-weight: 550; font-size: 14.5px; }
.file span { display: block; font-family: "Geist Mono", monospace; font-size: 12px; color: var(--text-3); }
.file span.bad { color: var(--warn); }
.file.out { border-color: color-mix(in srgb, var(--accent-ink) 45%, var(--stroke)); }
.file.out span.good { color: var(--accent-ink); }
.wire { position: relative; height: 2px; background: var(--stroke-strong); margin: 0 10px; overflow: hidden; border-radius: 2px; }
.wire::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--accent-ink), transparent); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { border: 1px solid var(--stroke); background: var(--card); border-radius: var(--radius); padding: 11px 14px; display: flex; gap: 11px; align-items: center; font-size: 14.5px; }
.steps .icon { color: var(--accent-ink); }
@media (prefers-reduced-motion: no-preference) {
  .flow.play .wire::after { animation: wire 1.8s var(--ease) infinite; }
  .flow.play .wire.two::after { animation-delay: .9s; }
  .flow .steps li, .flow .file.out { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .flow.play .steps li, .flow.play .file.out { opacity: 1; transform: none; }
  .flow.play .steps li:nth-child(1) { transition-delay: .25s; }
  .flow.play .steps li:nth-child(2) { transition-delay: .45s; }
  .flow.play .steps li:nth-child(3) { transition-delay: .65s; }
  .flow.play .steps li:nth-child(4) { transition-delay: .85s; }
  .flow.play .file.out { transition-delay: 1.1s; }
}
@keyframes wire { to { left: 110%; } }
@media (max-width: 900px) {
  .flow-row { grid-template-columns: 1fr; gap: 0; }
  .wire { width: 2px; height: 36px; margin: 10px auto; }
  .wire::after { display: none; }
}

/* ── Bento ──────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.tile { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius-lg); padding: 26px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.tile p { color: var(--text-2); font-size: 15px; max-width: 46ch; }
.tile.explorer { grid-column: span 4; grid-row: span 2; padding-bottom: 0; }
.tile.explorer .shot { margin-top: auto; padding-top: 20px; }
.tile.explorer .shot img { border-radius: 10px 10px 0 0; box-shadow: var(--shadow); }
.tile.covers { grid-column: span 2; }
.tile.covers .cover-grid, .tile.formats .pills { margin-top: auto; padding-top: 12px; }
.tile.formats { grid-column: span 2; }
.tile.artist { grid-column: 3 / span 4; grid-row: 3; padding-bottom: 0; }
.tile.artist .shot { margin-top: auto; padding-top: 16px; }
.tile.artist .shot img { border-radius: 8px 8px 0 0; }
.tile.langs { grid-column: 1 / span 2; grid-row: 3; }
.cover-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cover-grid img:nth-child(n+4) { display: none; }
.cover-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 5px; transition: transform .25s var(--ease); }
.cover-grid img:hover { transform: translateY(-2px); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill { font-family: "Geist Mono", monospace; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--stroke-strong); color: var(--text-2); }
.langs-list { margin-top: auto; padding-top: 12px; }
.langs-list .pill { font-family: "Geist", sans-serif; font-size: 14px; }
.langs-list .pill.on { border-color: color-mix(in srgb, var(--accent-ink) 55%, var(--stroke)); color: var(--text); background: var(--accent-soft); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .tile.explorer, .tile.covers, .tile.formats, .tile.artist, .tile.langs { grid-column: auto; grid-row: auto; }
}

/* ── Whole window ───────────────────────────────────────────── */
.window .shot { margin-top: 44px; }
.window .shot img { border-radius: 12px; box-shadow: var(--shadow); width: 100%; }

/* ── Safety ─────────────────────────────────────────────────── */
.safety .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.facts { list-style: none; margin: 36px 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.facts li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.facts .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.facts b { display: block; font-weight: 550; margin-bottom: 2px; }
.facts span { color: var(--text-2); font-size: 15px; }
.safety .shot img { border-radius: 12px; box-shadow: var(--shadow); width: 100%; }
@media (max-width: 900px) { .safety .wrap { grid-template-columns: 1fr; gap: 44px; } }

/* ── Download ───────────────────────────────────────────────── */
.download .wrap { max-width: 920px; }
.download .head { text-align: center; }
.download .lead { margin: 16px auto 0; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; }
.dl { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.dl.main { border-color: color-mix(in srgb, var(--accent-ink) 40%, var(--stroke)); }
.dl-top { display: flex; align-items: center; gap: 12px; }
.dl-top .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--bg-raised); display: grid; place-items: center; color: var(--text-2); }
.dl-top .ic .icon { width: 22px; height: 22px; }
.dl-top div b { display: block; font-size: 1.05rem; font-weight: 600; }
.dl-top div span { font-family: "Geist Mono", monospace; font-size: 12.5px; color: var(--text-3); }
.dl p { color: var(--text-2); font-size: 15px; flex: 1; }
.dl .btn { justify-content: center; }
.fineprint { margin-top: 26px; text-align: center; color: var(--text-3); font-size: 14px; }
.fineprint a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

/* ── Footer ─────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--stroke); padding: 36px 0 48px; color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
footer nav { display: flex; gap: 22px; margin-left: auto; }
footer a:hover { color: var(--text); }

/* ── Reveal on scroll ───────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}
