/* Light theme is the default; html[data-theme="dark"] switches the page body to dark.
   The top bar and footer are black in both themes. */
:root {
  --accent: #ff2d6f;
  --bar: #000;
  --bar-line: #1f1f1f;
  --bar-ink: #fff;
  --bar-muted: #9a9a9a;

  --bg: #f5f5f3;
  --text: #0b0b0b;
  --grid: #e7e7e4;

  --font: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

/* Dark theme is graphite, not pure black, so the black top bar still stands apart. */
:root[data-theme="dark"] {
  --bg: #17181b;
  --text: #ececee;
  --grid: #202125;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* The hero grows so the footer always sits at the bottom of tall windows. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top bar (always black) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bar);
  color: var(--bar-ink);
  border-bottom: 1px solid var(--bar-line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-word {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.06em;
}

.topbar-right { display: flex; align-items: center; gap: 28px; }

.nav { display: flex; gap: 28px; }

.nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bar-muted);
  transition: color 0.15s;
}

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

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--bar-muted);
  background: transparent;
  border: 1px solid #333;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

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

.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Show the icon of the theme you would switch to. */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

main { flex: 1; display: flex; flex-direction: column; }

/* Hero */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: min(calc(88vh - 60px), 760px);
  padding: 96px 0;
  background:
    linear-gradient(var(--bg) 0, transparent 30%, transparent 70%, var(--bg) 100%),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 80px),
    var(--bg);
}

.hero-title {
  margin: 0;
  font-size: clamp(52px, 8vw, 112px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* Footer (help area, always black like the top bar) */
.footer {
  padding: 72px 0 32px;
  font-size: 14px;
  color: var(--bar-muted);
  background: var(--bar);
  border-top: 1px solid var(--bar-line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px 32px;
}

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

.footer-col h2 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bar-ink);
}

.footer-col ul { margin: 0; padding: 0; list-style: none; }

.footer-col li + li { margin-top: 10px; }

.footer-col a {
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--bar-ink); }

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  font-size: 13px;
  color: #6f6f6f;
  border-top: 1px solid var(--bar-line);
}

/* Small screens */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .topbar-right, .nav { gap: 14px; }
  .nav a { font-size: 12px; letter-spacing: 0.04em; }
  .brand-word { font-size: 18px; }
  .hero { min-height: auto; padding: 88px 0 96px; }
  .footer { padding-top: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { margin-top: 48px; }
}

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