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

:root { --transition: 0.35s ease; }

[data-theme="dark"] {
  --bg: #1a1917;
  --surface: #23221f;
  --border: #33312c;
  --text: #e8e4dc;
  --muted: #8a857b;
  --accent: #9b6fd4;
  --hover: #2a2926;
  --scroll-thumb: #3d3a34;
}

[data-theme="light"] {
  --bg: #f4f1eb;
  --surface: #ece8e0;
  --border: #d4cfc6;
  --text: #1a1a1a;
  --muted: #7a756d;
  --accent: #7c4dba;
  --hover: #e4e0d7;
  --scroll-thumb: #c4bfb6;
}

/* Readability comfort mode */
html[data-readability="comfort"] body {
  font-size: 15px;
  line-height: 1.75;
}
html[data-readability="comfort"] .hero-text p,
html[data-readability="comfort"] .feature-desc,
html[data-readability="comfort"] .install-desc,
html[data-readability="comfort"] .install-note,
html[data-readability="comfort"] .install-warning p {
  font-size: 13px;
  line-height: 1.65;
}
html[data-readability="comfort"][data-theme="dark"] { --muted: #b3ada3; }
html[data-readability="comfort"][data-theme="light"] { --muted: #5f5a52; }

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
html::-webkit-scrollbar { width: 6px; height: 6px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 4px; }
html::-webkit-scrollbar-thumb:hover { background: var(--muted); }

body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--text); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

code {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAV (matches reign exactly) ── */
nav {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
  position: relative;
}

.logo { font-weight: 500; font-size: 14px; letter-spacing: -0.3px; }
.logo span { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 24px; }


.theme-toggle {
  width: 28px;
  height: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
#readabilityBtn { font-size: 10px; font-weight: 500; }
html[data-readability="comfort"] #readabilityBtn { color: var(--accent); border-color: var(--accent); }

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 60px 0 68px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}

.hero-text h1 {
  font-family: 'Newsreader', serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.8px;
  margin-bottom: 18px;
}
.hero-text h1 em { font-style: italic; color: var(--accent); }

.hero-text p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  max-width: 390px;
  margin-bottom: 28px;
}

.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}
.btn:hover { opacity: 0.82; color: #fff; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: none;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

.fork-note { font-size: 10px; color: var(--muted); }
.fork-note::before { content: "→ "; color: var(--accent); }
.fork-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.fork-note a:hover { color: var(--accent); }

.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-visual img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  transition: border-color var(--transition);
}

/* ── SECTIONS ── */
.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}

.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── FEATURES (row list, matches project-list style) ── */
.feature-list { border-bottom: 1px solid var(--border); }

.feature-row {
  border-top: 1px solid var(--border);
  padding: 10px 6px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: baseline;
  transition: background 0.2s;
}
.feature-row:hover { background: var(--hover); }

.feature-name { font-size: 12px; font-weight: 500; color: var(--text); }
.feature-name::before { content: "→ "; color: var(--accent); }

.feature-desc { font-size: 11px; color: var(--muted); line-height: 1.55; }

/* ── SCREENSHOTS ── */
.screenshots-group + .screenshots-group { margin-top: 28px; }

.screenshots-sublabel {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  opacity: 0.55;
  margin-bottom: 10px;
}

.shots-landscape {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.shots-landscape-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.shots-portrait {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.shots-landscape img,
.shots-landscape-4 img,
.shots-portrait img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  border: 1px solid var(--border);
  display: block;
  cursor: zoom-in;
  transition: border-color 0.2s, opacity 0.2s;
}
.shots-landscape img:hover,
.shots-landscape-4 img:hover,
.shots-portrait img:hover { border-color: var(--accent); opacity: 0.9; }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}

/* ── INSTALL ── */
.install-warning {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 11px;
  line-height: 1.65;
}

.warn-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 500;
}

.install-warning p { color: var(--muted); }
.install-warning a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.install-warning a:hover { opacity: 0.8; }

.warn-disclaimer {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
  opacity: 0.7;
  font-style: italic;
}

.install-steps { border-bottom: 1px solid var(--border); margin-bottom: 16px; }

.install-row {
  border-top: 1px solid var(--border);
  padding: 10px 6px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: baseline;
  transition: background 0.2s;
}
.install-row:hover { background: var(--hover); }

.install-step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  font-size: 9px;
  color: var(--muted);
  opacity: 0.45;
  letter-spacing: 0.5px;
  min-width: 18px;
}

.install-desc { font-size: 11px; color: var(--muted); line-height: 1.55; }
.install-desc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.install-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.install-note::before { content: "→ "; color: var(--accent); }

/* ── FOOTER (matches reign exactly) ── */
footer {
  padding: 14px 0;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color var(--transition);
}

.footer-links {
  display: flex;
  gap: 16px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.footer-links a { color: var(--muted); font-size: 11px; }
.footer-links a:hover { color: var(--accent); }

.clock { font-variant-numeric: tabular-nums; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .page { padding: 0 20px; }

  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 52px; }
  .hero-visual { order: -1; }
  .hero-visual img { max-width: 180px; }
  .hero-text h1 { font-size: 30px; }
  .hero-text p { max-width: 100%; }

  .feature-row { grid-template-columns: 1fr; gap: 4px; }
  .feature-desc { padding-left: 14px; }

  /* landscape: 2-col; 3-img group gets last item full-width centered */
  .shots-landscape { grid-template-columns: 1fr 1fr; }
  .shots-landscape img:last-child { grid-column: 1 / -1; max-width: 55%; margin: 0 auto; }
  .shots-landscape-4 { grid-template-columns: 1fr 1fr; }

  /* portrait: 2-col; last item full-width centered */
  .shots-portrait { grid-template-columns: 1fr 1fr; }
  .shots-portrait img:last-child { grid-column: 1 / -1; max-width: 45%; margin: 0 auto; }

  .install-row { grid-template-columns: 1fr; gap: 4px; }
  .install-desc { padding-left: 26px; }

  .footer-links { position: static; transform: none; }
  footer { flex-wrap: wrap; gap: 8px; padding: 14px 0 28px; }
}
