/* Studio: a calm, modern product look for software stores. */
:root {
  --accent: #5b5bf0; --line: #e6e8f0; --bad: #d4343f; --ok: #13865a;
  --font: Inter, "SF Pro Text", "Segoe UI Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: Inter, "SF Pro Display", "Segoe UI Variable Display", system-ui, -apple-system, sans-serif;
  --bg: #f7f8fb; --surface: #ffffff; --text: #14161f; --muted: #5f6475; --tint: #eef0fe;
  --radius: .85rem; --shadow: 0 1px 2px #10182808, 0 2px 8px #1018280a; --shadow-lg: 0 8px 28px #10182814;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #8e8fff; --line: #252836; --bad: #ff6b74; --ok: #3ccf8e;
    --bg: #0c0d12; --surface: #14161e; --text: #e9ebf2; --muted: #9da2b4; --tint: #1c1e33; --shadow: 0 1px 2px #0006; --shadow-lg: 0 12px 32px #0008; }
}
:root[data-theme="dark"] { --accent: #8e8fff; --line: #252836; --bad: #ff6b74; --ok: #3ccf8e;
  --bg: #0c0d12; --surface: #14161e; --text: #e9ebf2; --muted: #9da2b4; --tint: #1c1e33; --shadow: 0 1px 2px #0006; --shadow-lg: 0 12px 32px #0008; }

body { background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; font-size: 1rem; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
a { color: var(--accent); text-underline-offset: .2em; }

/* Header: full-width frosted bar */
.site-header { position: sticky; top: 0; z-index: 5; max-width: none; padding: .7rem max(1rem, calc((100% - 70rem) / 2)); border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.5) blur(12px); -webkit-backdrop-filter: saturate(1.5) blur(12px); }
.brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .5rem; }
.brand::before { content: ""; width: 1.25rem; height: 1.25rem; border-radius: .35rem; background: var(--accent); }
.site-header nav { gap: .15rem; }
.header-right { gap: .15rem; }
.site-header nav a, .header-right > a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .92rem; padding: .35rem .6rem; border-radius: .5rem; transition: color .15s, background .15s; }
.site-header nav a:hover, .header-right > a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.currency-menu { margin-right: .25rem; }
.currency-menu summary { padding: .28rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; color: var(--text); background: var(--surface); }
.currency-menu summary:hover, .currency-menu[open] summary { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.currency-menu ul { background: var(--surface); color: var(--text); border-color: var(--line); border-radius: .7rem; box-shadow: var(--shadow-lg); }
.currency-menu li a { border-radius: .45rem; font-size: .9rem; font-weight: 500; }
.currency-menu li a:hover { background: var(--tint); }
.currency-menu li a.on { background: var(--accent); color: #fff; }
.mode-toggle { border-color: var(--line); color: var(--muted); background: var(--surface); margin-right: .25rem; }
.mode-toggle:hover { color: var(--text); }

main, .site-footer { max-width: 70rem; padding: 1.5rem 1rem; }
.site-footer { color: var(--muted); border-top-color: var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; opacity: 1; font-size: .88rem; }
.site-footer p { margin: .25rem 0; }
.site-footer a, .site-footer button.link { color: var(--muted); }

/* Type */
h1, h2, h3 { letter-spacing: -.022em; line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: 1.75rem 0 .6rem; }
h2 { font-size: 1.3rem; }
.lead { font-size: 1.15rem; color: var(--muted); opacity: 1; max-width: 40rem; }
.hint { color: var(--muted); opacity: 1; }

/* Product grid */
.grid { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; margin-top: 1.75rem; }
.card-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s; display: flex; flex-direction: column; }
.card-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.card-item img, .noimg { aspect-ratio: 16 / 10; border-radius: calc(var(--radius) - .3rem); }
.card-item img { border: 1px solid var(--line); box-sizing: border-box; }
.noimg { opacity: 1; color: var(--accent); font-weight: 600; background: var(--tint); }
.card-item h2 { font-size: 1.05rem; margin-top: .85rem; }
.card-item p { margin: .3rem 0; font-size: .95rem; }
.card-item .price { margin-top: auto; padding-top: .5rem; }
.price { color: var(--text); font-weight: 650; }
.price.big { font-size: 2rem; letter-spacing: -.02em; }

/* Product page */
.product-layout { gap: 2.5rem; }
@media (min-width: 52rem) { .product-layout { grid-template-columns: minmax(0, 1fr) 21rem; } }
.buybox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-lg); top: 5rem; }
.gallery img, .gallery video { border-radius: calc(var(--radius) - .25rem); border: 1px solid var(--line); box-shadow: var(--shadow); }
.subnav { gap: .35rem; border: 0; padding: 0; }
.subnav a { padding: .32rem .85rem; border-radius: 999px; background: var(--tint); text-decoration: none; font-weight: 500; font-size: .88rem; }
.prose { font-size: 1.03rem; line-height: 1.65; }
.prose pre, .prose code { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; font-size: .9em; }
.prose pre { background: #0f1220; color: #e3e6f3; border-radius: .6rem; padding: 1rem; }
.prose blockquote { border-left-color: var(--accent); color: var(--muted); }
.release { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.release h2 { font-size: 1.2rem; margin-top: 0; }

/* Controls */
button, .btn { border-radius: .6rem; font-weight: 600; background: var(--accent); color: #fff; transition: transform .12s, filter .15s; }
button:hover, .btn:hover { filter: brightness(1.08); }
button:active, .btn:active { transform: translateY(1px); }
button.link { background: none; color: var(--accent); font-weight: inherit; }
button.secondary { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.secondary:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.buy-button { padding: .8rem 1.1rem; }
input:not([type=checkbox]):not([type=radio]) { border-radius: .6rem; padding: .62rem .75rem; background: var(--surface); border-color: var(--line); }
input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
fieldset { border: 1px solid var(--line); border-radius: .6rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.notice { border-radius: .6rem; border-width: 1px; }
.notice.ok { background: color-mix(in srgb, var(--ok) 9%, transparent); }
.notice.err { background: color-mix(in srgb, var(--bad) 9%, transparent); }
.card.narrow { background: var(--surface); border-color: var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.tag { font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--tint); color: var(--accent); }

table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; box-shadow: var(--shadow); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: color-mix(in srgb, var(--text) 3%, transparent); }
th, td { padding: .75rem 1rem; border-bottom-color: var(--line); }
tbody tr:last-child td { border-bottom: 0; }
.consent { background: var(--surface); color: var(--text); }
