/* Giftora company site (build.mjs). Light by default, dark when the system asks for it. */
:root {
  --bg: #fbfaff;
  --panel: #ffffff;
  --line: #e7e4f3;
  --text: #17162a;
  --muted: #6a6788;
  --accent: #e2468b;
  --accent2: #7c4ddb;
  --todo-bg: #fff2b8;
  --todo-text: #6b4e00;
  --c-common: #8a94a3;
  --c-uncommon: #1fae7c;
  --c-rare: #3b82f6;
  --c-epic: #a855f7;
  --c-legendary: #e0a000;
  --c-mythic: #ff4d8d;
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a12;
    --panel: #151524;
    --line: #2a2a40;
    --text: #f1f0fb;
    --muted: #9b99b8;
    --accent: #ff5fa2;
    --accent2: #a78bfa;
    --todo-bg: #4a3b00;
    --todo-text: #ffe28a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--accent2); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-top: 24px; padding-bottom: 48px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(28px, 5vw, 44px); margin: 24px 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 24px; margin: 40px 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; }
.doc { max-width: 820px; }
.doc h2 { font-size: 20px; margin-top: 32px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; }
.brand svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.top nav a, .lang { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 10px; font-size: 15px; }
.top nav a:hover, .lang:hover { color: var(--text); background: var(--line); }
.top nav a[aria-current='page'] { color: var(--text); background: var(--line); }
.lang { border: 1px solid var(--line); font-weight: 600; }
@media (max-width: 720px) {
  .top .wrap { gap: 8px; }
  .top nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .top nav a { white-space: nowrap; }
  .lang { margin-left: auto; }
}

/* Home */
.hero { padding: 24px 0 8px; }
.hero h1 {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { font-size: 19px; max-width: 720px; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  margin: 4px 8px 4px 0;
}
.btn:hover { color: #fff; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { margin: 0 0 8px; }
.card p:last-child { margin-bottom: 0; }
.steps { padding-left: 24px; }
.steps li { margin: 6px 0; }

/* Price table */
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; min-width: 480px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.dot.common { background: var(--c-common); }
.dot.uncommon { background: var(--c-uncommon); }
.dot.rare { background: var(--c-rare); }
.dot.epic { background: var(--c-epic); }
.dot.legendary { background: var(--c-legendary); }
.dot.mythic { background: var(--c-mythic); }

/* Requisites */
.req { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.req div { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.req div:last-child { border-bottom: 0; }
.req dt { color: var(--muted); }
.req dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .req div { grid-template-columns: 1fr; gap: 0; } }
mark.todo { background: var(--todo-bg); color: var(--todo-text); padding: 0 6px; border-radius: 6px; font-size: 0.9em; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: 14px; }
footer p { margin: 4px 0; }
.foot-cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 12px; }
footer nav { display: flex; flex-direction: column; gap: 4px; }

/* 404 */
.center { text-align: center; }
.big { font-size: 72px; font-weight: 800; margin: 24px 0 0; color: var(--muted); }
