/* Younivi — light/dark, system fonts, editorial layout */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --paper: #f7f7f7;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --faint: #767676;
  --line: #e6e6e6;
  --accent: #2a3a4e;
  --max: 52rem;
  --card-shadow: 0 1px 2px rgba(26, 26, 26, 0.04);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;
  --paper: #1a1a1a;
  --ink: #e8e8e8;
  --muted: #a8a8a8;
  --faint: #8c8c8c;
  --line: #333333;
  --accent: #b7c7db;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141414;
    --paper: #1a1a1a;
    --ink: #e8e8e8;
    --muted: #a8a8a8;
    --faint: #8c8c8c;
    --line: #333333;
    --accent: #b7c7db;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover { color: var(--ink); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 1.1rem 0 0;
  background: var(--bg);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 0.55rem;
}

.brand {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.page {
  flex: 1;
  padding: 2rem 0 3rem;
}

.kicker {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 28ch;
}

.lede {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 42ch;
}

.product-grid {
  display: grid;
  gap: 1rem;
  margin: 0 0 2.5rem;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.product-card {
  display: block;
  padding: 1.25rem 1.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.product-card:hover {
  border-color: var(--muted);
  transform: translateY(-1px);
  color: inherit;
}

.product-card h2 {
  margin: 0 0 0.35rem;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
}

.product-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

.product-card .arrow {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--accent);
}

.about-block {
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

.about-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.about-block p {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
}

.notice {
  margin-top: 2rem;
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  color: var(--faint);
  border-left: 3px solid var(--line);
  background: var(--paper);
}

.prose {
  max-width: 42rem;
}

.prose h1 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.75rem;
  margin: 0 0 1rem;
}

.prose p,
.prose ul {
  color: var(--muted);
}

.prose ul {
  padding-left: 1.25rem;
}

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--faint);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}

.foot-nav a {
  color: var(--muted);
  text-decoration: none;
}

.foot-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.legal {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  max-width: 48rem;
}
