/* RVZN MEDIA storefront. Light, quiet, one accent. */

:root {
  --bg: #fbfbfc;
  --ink: #14161a;
  --muted: #5f6570;
  --plate: #f0f1f3;
  --line: #e3e5e9;
  --accent: #3340f5;
  --accent-hover: #2430d6;
  --accent-ink: #ffffff;
  --ok: #17794a;
  --ok-bg: #eaf6ef;
  --danger: #b3261e;
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

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

.skip {
  position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: 6px; z-index: 20;
}
.skip:focus { left: 8px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 680px; }
.page { padding-block: clamp(40px, 8vw, 88px); }

/* Type */
h1, h2, h3 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); letter-spacing: -0.04em; line-height: 1.04; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.015em; font-weight: 600; }
p { margin: 0 0 1em; }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46ch; margin-top: 18px; }
.fine { font-size: 0.85rem; color: var(--muted); }
.empty { color: var(--muted); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav-cart { display: inline-flex; align-items: center; gap: 6px; color: var(--ink) !important; font-weight: 500; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; font-weight: 600;
}
.cart-count[hidden] { display: none; }

/* Hero */
.hero { padding-block: clamp(56px, 11vw, 132px) clamp(40px, 6vw, 72px); }
.hero h1 { max-width: 13ch; }

/* Plates: product imagery on a quiet neutral surface */
.plate {
  background: var(--plate); border-radius: var(--radius); padding: clamp(20px, 4vw, 56px); aspect-ratio: 4 / 3;
  overflow: hidden; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center;
}
.plate img {
  width: 100%; height: 100%; object-fit: contain; min-height: 0;
  filter: drop-shadow(0 18px 36px rgba(20, 22, 26, 0.18));
}
.plate-name { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 500; letter-spacing: -0.03em; color: var(--muted); text-align: center; }
.plate-link { display: block; text-decoration: none; }

/* Product list (home) */
.product-list { display: grid; gap: clamp(40px, 7vw, 80px); padding-bottom: clamp(32px, 6vw, 64px); }
.product-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.product-row-body h2 a { text-decoration: none; }
.product-row-body h2 a:hover { text-decoration: underline; text-decoration-color: var(--line); }
.tagline { font-size: 1.1rem; color: var(--muted); margin: 12px 0 8px; max-width: 34ch; }
.meta-line { font-size: 0.9rem; color: var(--muted); margin-bottom: 24px; }
.buy-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.price { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.price.big { font-size: 1.6rem; margin-bottom: 16px; letter-spacing: -0.02em; }

/* How it works */
.how {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px);
  padding-block: clamp(40px, 7vw, 80px); border-top: 1px solid var(--line); margin-top: clamp(24px, 5vw, 48px);
}
.how p { color: var(--muted); margin: 8px 0 0; max-width: 34ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 500;
  font-size: 0.97rem; padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-wide { width: 100%; padding-block: 14px; }
.btn-small { padding: 8px 14px; font-size: 0.88rem; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 0.85rem; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); }
.link-button:hover { color: var(--ink); }

/* Product page */
.back { display: inline-block; font-size: 0.9rem; color: var(--muted); text-decoration: none; margin-bottom: 24px; }
.back:hover { color: var(--ink); }
.product-page { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(48px, 8vw, 96px); }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.product-info h1 { font-size: clamp(2rem, 4vw, 3rem); }
.buy-box { margin: 28px 0 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.buy-box .fine { margin: 14px 0 0; }
.added { margin: 14px 0 0; font-size: 0.92rem; color: var(--ok); }
.added a { color: inherit; }
.notice { background: var(--plate); padding: 14px 18px; border-radius: var(--radius-sm); margin: 24px 0; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }

.specs { margin: 0; display: grid; gap: 0; }
.specs > div { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.93rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }

.product-text { max-width: 62ch; margin-top: clamp(40px, 7vw, 80px); }
.product-text p { color: #2c3037; }
.product-text h2 { margin: 40px 0 16px; font-size: 1.3rem; }
.features { padding-left: 1.1em; margin: 0 0 1em; }
.features li { margin-bottom: 6px; }

/* Forms */
.stack { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; font-size: 0.93rem; }
.field > span { font-weight: 500; }
.field small { color: var(--muted); font-size: 0.82rem; }
.field input, .field select, .inline-field input {
  font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #cfd2d8; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .inline-field input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.check input { margin-top: 5px; accent-color: var(--accent); }
.form-error { color: var(--danger); font-size: 0.93rem; margin: 0; }
.form-error[hidden] { display: none; }
.inline-field { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; margin-top: 8px; color: var(--muted); }
.inline-field input { width: 110px; padding: 8px 10px; }

/* Cart + checkout */
.cart-lines { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-line img { border-radius: 8px; background: var(--plate); padding: 6px; }
.cart-line-name { font-weight: 500; text-decoration: none; }
.cart-line-side { text-align: right; display: grid; gap: 4px; }
.cart-foot { margin-top: 28px; display: grid; gap: 16px; justify-items: stretch; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; }

.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); margin-top: 36px; align-items: start; }
.summary { background: var(--plate); border-radius: var(--radius); padding: 28px; position: sticky; top: 92px; }
.summary h2 { font-size: 1.15rem; margin-bottom: 18px; }
.summary-lines { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.summary-lines li { display: flex; justify-content: space-between; gap: 16px; font-size: 0.95rem; }
.summary-total { display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid #d9dbe0; font-size: 1.1rem; }

/* Licences */
.license-list { display: grid; gap: 16px; margin: 32px 0; }
.license { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; display: grid; gap: 12px; }
.license-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; }
.license h2 { font-size: 1.25rem; }
.license p { margin: 0; }
.code-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.code {
  font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.02em; background: var(--plate);
  padding: 10px 14px; border-radius: var(--radius-sm); word-break: break-all; user-select: all;
}

/* Prose (legal) */
.prose { max-width: 720px; }
.prose h1 { margin-bottom: 8px; }
.prose section { margin-top: 36px; }
.prose h2 { font-size: 1.2rem; margin-bottom: 10px; }
.prose p { color: #2c3037; }

/* Tutorials */
.tutorial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 40px 32px; margin-top: 36px; }
.tutorial h2 { font-size: 1.1rem; margin: 14px 0 6px; letter-spacing: -0.015em; }
.tutorial p { margin: 0 0 4px; color: var(--muted); font-size: 0.95rem; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--plate); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(40px, 8vw, 96px); padding-block: 36px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-name { font-weight: 600; }
.footer-meta { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.92rem; align-content: start; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* Responsive */
@media (max-width: 860px) {
  .product-row, .product-grid, .checkout-grid { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .nav a:not(.nav-cart):not([href="/licenses"]) { display: none; }
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 56px 1fr; }
  .cart-line img { width: 56px; }
  .cart-line-side { grid-column: 2; text-align: left; display: flex; gap: 16px; align-items: baseline; }
  .nav a[href="/licenses"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
