/* Theme ONLY via html[data-theme]. Default dark. No OS prefers-color-scheme override. */

html[data-theme="dark"],
html:not([data-theme]) {
  color-scheme: dark;
  --ink: #f0ebe3;
  --forest: #050806;
  --emerald: #1e4d35;
  --sage: #3a7d5c;
  --mint: #101a14;
  --gold: #c9a84c;
  --gold-bright: #e2c36a;
  --gold-dim: #a8893a;
  --parchment: #050806;
  --cream: #0c1610;
  --stone: #243028;
  --ash: #9a9388;
  --charcoal: #d8d2c6;
  --card: #0f1a13;
  --header-bg: rgba(5, 8, 6, 0.94);
  --shadow: rgba(0, 0, 0, 0.45);
  --note-bg: #122018;
  --note-border: #1e4d35;
  --note-text: #e2c36a;
  --btn-text: #050806;
  --max: 880px;
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #0d1b12;
  --forest: #14291e;
  --emerald: #1e4d35;
  --sage: #3a7d5c;
  --mint: #e6f0ea;
  --gold: #c9a84c;
  --gold-bright: #e2c36a;
  --gold-dim: #a8893a;
  --parchment: #f7f5f0;
  --cream: #ede9df;
  --stone: #d4cec3;
  --ash: #5a5550;
  --charcoal: #2e2b26;
  --card: #ffffff;
  --header-bg: rgba(247, 245, 240, 0.94);
  --shadow: rgba(13, 27, 18, 0.06);
  --note-bg: #e6f0ea;
  --note-border: #cfe0d6;
  --note-text: #14291e;
  --btn-text: #0a1410;
  --max: 880px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--parchment);
  background-color: var(--parchment);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.serif { font-family: 'Amiri', Georgia, serif; }

.site-header {
  border-bottom: 1px solid var(--stone);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Amiri', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
}

.brand-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ash);
}

.nav-links a:hover { color: var(--gold-bright); }

.theme-toggle {
  border: 1px solid var(--stone);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.hub-wrap { max-width: 980px; }

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.hero p {
  color: var(--ash);
  max-width: 36rem;
  margin: 0 auto;
  font-size: 1.02rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.app-card {
  background: var(--card);
  border: 1px solid var(--stone);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 28px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.app-card-top img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--stone);
}

.app-card h2 {
  font-family: 'Amiri', Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--ink);
}

.app-card .tagline {
  font-size: 0.88rem;
  color: var(--ash);
  margin-top: 0.15rem;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--btn-text);
}

.btn-primary:hover { background: var(--gold-bright); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--stone);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.doc-header {
  text-align: center;
  margin-bottom: 2rem;
}

.doc-header .product {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.92rem;
}

.doc-header .product img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
}

.doc-header h1 {
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.last-updated {
  color: var(--ash);
  font-size: 0.9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--stone);
  border-radius: 22px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  box-shadow: 0 8px 28px var(--shadow);
}

.card h3 {
  font-family: 'Amiri', Georgia, serif;
  font-size: 1.28rem;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  color: var(--ink);
}

.card h3:first-child { margin-top: 0; }

.card p {
  margin-bottom: 1rem;
  color: var(--charcoal);
  font-size: 0.98rem;
}

.card ul {
  margin: 0 0 1.1rem 1.25rem;
  color: var(--charcoal);
  font-size: 0.98rem;
}

.card li { margin-bottom: 0.45rem; }

.card strong { color: var(--ink); }

.card a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 2px; }

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.92rem;
  color: var(--note-text);
}

.site-footer {
  text-align: center;
  color: var(--ash);
  font-size: 0.88rem;
  padding: 0 1.25rem 2.5rem;
}

.site-footer a { color: var(--gold); }
.site-footer a:hover { text-decoration: underline; }

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin: 0 auto 1rem;
  border: 1px solid var(--stone);
  background: #000;
  object-fit: cover;
}

@media (max-width: 560px) {
  .nav-links a:not(.theme-toggle) { display: none; }
  .app-card-top img { width: 48px; height: 48px; border-radius: 12px; }
}
