/* Midnight Galaxy v2 — Light and Dark */
:root,
:root[data-theme="light"] {
  --bg: #f6f4fb;
  --card: #ffffff;
  --tint: #f5f3fa;
  --border: #e7e2f2;
  --border-strong: #d6cfe8;
  --ink: #2b1e3e;
  --body: #3a3450;
  --muted: #756890;
  --label: #756890;
  --blue: #4a4e8f;
  --button: #4a4e8f;
  --violet: #7b5cc4;
  --shadow: rgba(43, 30, 62, .05);
  --band: linear-gradient(115deg, #efe8fb, #e9eefb, #e2f4f8);

  --teal-s: #1597b0;   --teal-i: #0b6f83;   --teal-t: #e2f4f8;
  --violet-s: #8a63d2; --violet-i: #6a44b3; --violet-t: #efe8fb;
  --coral-s: #ec6a52;  --coral-i: #b8432c;  --coral-t: #fdece8;
  --green-s: #27a465;  --green-i: #1b7a4a;  --green-t: #e3f5eb;
  --gold-s: #e0a125;   --gold-i: #94650a;   --gold-t: #fbf1db;
}
:root[data-theme="dark"] {
  --bg: #111018;
  --card: #1b1a25;
  --tint: #252231;
  --border: #2d2a3c;
  --border-strong: #3e3a52;
  --ink: #f5f2fc;
  --body: #d8d3e6;
  --muted: #a39bb8;
  --label: #b6a8dc;
  --blue: #9a9ef5;
  --button: #5b5fd6;
  --violet: #a983f0;
  --shadow: rgba(0, 0, 0, .35);
  --band: linear-gradient(115deg, #1d1830, #171a2c, #122228);

  --teal-s: #3cc3dc;   --teal-i: #86e0ef;   --teal-t: rgba(60, 195, 220, .14);
  --violet-s: #a983f0; --violet-i: #cdb3f8; --violet-t: rgba(169, 131, 240, .16);
  --coral-s: #ff8a73;  --coral-i: #ffb4a5;  --coral-t: rgba(255, 138, 115, .14);
  --green-s: #3fcf86;  --green-i: #90e7ba;  --green-t: rgba(63, 207, 134, .14);
  --gold-s: #f2b84b;   --gold-i: #f8d48f;   --gold-t: rgba(242, 184, 75, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - 1040px) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 38px; height: 38px; }
:root[data-theme="dark"] .show-light,
:root[data-theme="light"] .show-dark { display: none; }
.wordmark { font-family: "DM Serif Display", Georgia, serif; font-size: 22px; color: var(--ink); }
.nav { margin-left: auto; display: flex; gap: 22px; }
.nav a { text-decoration: none; color: var(--body); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--violet); }
.theme-toggle {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 6px 14px;
}
.theme-toggle:hover { border-color: var(--violet); }
:root[data-theme="dark"] .t-light,
:root[data-theme="light"] .t-dark { display: none; }

/* Layout */
main { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.section { padding: 64px 0 8px; }
.overline {
  margin: 0 0 10px; font-size: 11px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--label);
}
h1, h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400; color: var(--ink); margin: 0 0 18px; line-height: 1.12;
}
h1 { font-size: clamp(38px, 6vw, 60px); }
h1 em { font-style: normal; color: var(--violet); }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { margin: 10px 0 6px; font-size: 19px; font-weight: 700; color: var(--ink); }
p { margin: 0 0 16px; }
.narrow { max-width: 620px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
  margin-top: 28px; padding: 44px 40px;
  background: var(--band); border: 1px solid var(--border); border-radius: 24px;
}
.lede { font-size: 18px; max-width: 540px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 9px;
  background: var(--button); color: #fff; font-weight: 600; text-decoration: none;
  border: 1px solid transparent;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn.ghost:hover { border-color: var(--violet); }
.hero-photo img {
  width: 100%; max-width: 340px; height: auto; aspect-ratio: 1; object-fit: cover;
  margin-left: auto; border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow);
}

/* Two columns */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.quote {
  margin: 8px 0 0; padding: 18px 20px; border-radius: 16px;
  background: var(--tint); font-family: "DM Serif Display", Georgia, serif;
  font-size: 21px; line-height: 1.35; color: var(--ink);
}
.quote cite {
  display: block; margin-top: 8px; font-family: "DM Sans", sans-serif;
  font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted);
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: 0 2px 10px var(--shadow);
}
.card.tint { background: var(--tint); border-style: dashed; border-color: var(--border-strong); box-shadow: none; }
.card p { margin: 0; color: var(--body); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.chip.teal   { background: var(--teal-t);   color: var(--teal-i); }
.chip.violet { background: var(--violet-t); color: var(--violet-i); }
.chip.coral  { background: var(--coral-t);  color: var(--coral-i); }
.chip.green  { background: var(--green-t);  color: var(--green-i); }
.chip.gold   { background: var(--gold-t);   color: var(--gold-i); }
.chips .chip { font-size: 14px; padding: 6px 16px; }

/* Stats */
.stats { display: grid; gap: 14px; }
.stat {
  display: flex; align-items: baseline; gap: 14px;
  padding: 16px 20px; border-radius: 16px;
}
.stat strong { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-weight: 600; }
.stat.teal   { background: var(--teal-t);   color: var(--teal-i); }
.stat.violet { background: var(--violet-t); color: var(--violet-i); }
.stat.coral  { background: var(--coral-t);  color: var(--coral-i); }

/* Contact + footer */
.contact { padding-bottom: 40px; }
.footer {
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  max-width: 1040px; margin: 40px auto 0; padding: 32px 16px 40px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 14px;
}
.footer-logo img { width: 280px; height: auto; }
.footer-meta { display: flex; gap: 20px; flex-wrap: wrap; }

/* Mobile */
@media (max-width: 820px) {
  .nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding: 28px 22px; gap: 28px; }
  .hero-photo { order: -1; }
  .hero-photo img { max-width: 200px; margin: 0; }
  .two-col, .cards { grid-template-columns: 1fr; gap: 20px; }
  .section { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
