/* ============================================================
   KG HUB — Housing Intelligence Ecosystem
   Brand system: obsidian black, brushed gold, Tw Cen MT + Dosis
   ============================================================ */

/* ---------- Fonts (supplied brand files) ---------- */
@font-face { font-family: 'Tw Cen MT'; src: url('../fonts/TCM_____.TTF') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Tw Cen MT'; src: url('../fonts/TCB_____.TTF') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Tw Cen MT Condensed'; src: url('../fonts/TCCM____.TTF') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Tw Cen MT Condensed'; src: url('../fonts/TCCEB.TTF') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Dosis'; src: url('../fonts/Dosis-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Dosis'; src: url('../fonts/Dosis-Book.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Dosis'; src: url('../fonts/Dosis-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Dosis'; src: url('../fonts/Dosis-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Dosis'; src: url('../fonts/Dosis-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

/* ---------- Theme tokens ---------- */
:root {
  --gold: #C9A24B;
  --gold-bright: #E8C97A;
  --gold-deep: #8F6E2A;
  --gold-grad: linear-gradient(120deg, #8F6E2A 0%, #C9A24B 38%, #F0D690 55%, #C9A24B 72%, #8F6E2A 100%);

  --font-display: 'Tw Cen MT Condensed', 'Arial Narrow', sans-serif;
  --font-head: 'Tw Cen MT', 'Century Gothic', sans-serif;
  --font-body: 'Dosis', 'Segoe UI', sans-serif;

  --max-w: 1240px;
  --radius: 14px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Dark (default brand theme) */
:root, [data-theme="dark"] {
  --bg: #0B0B0D;
  --bg-2: #121215;
  --bg-3: #1A1A1F;
  --surface: #141418;
  --surface-2: #1C1C22;
  --line: rgba(201,162,75,.22);
  --line-soft: rgba(255,255,255,.07);
  --text: #ECEAE4;
  --text-2: #A8A49B;
  --text-3: #6F6C66;
  --accent: var(--gold);
  --header-bg: rgba(11,11,13,.82);
  --hero-overlay: linear-gradient(180deg, rgba(11,11,13,.55) 0%, rgba(11,11,13,.78) 62%, #0B0B0D 100%);
  --card-shadow: 0 18px 50px rgba(0,0,0,.45);
  --chip-bg: rgba(201,162,75,.10);
  color-scheme: dark;
}

/* Light */
[data-theme="light"] {
  --bg: #F5F4F1;
  --bg-2: #ECEBE6;
  --bg-3: #E2E0D9;
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --line: rgba(143,110,42,.30);
  --line-soft: rgba(20,20,24,.10);
  --text: #1A1A1E;
  --text-2: #55534D;
  --text-3: #8B887F;
  --accent: #8F6E2A;
  --header-bg: rgba(245,244,241,.85);
  --hero-overlay: linear-gradient(180deg, rgba(11,11,13,.50) 0%, rgba(11,11,13,.72) 62%, #F5F4F1 100%);
  --card-shadow: 0 14px 40px rgba(0,0,0,.14);
  --chip-bg: rgba(143,110,42,.10);
  color-scheme: light;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: .01em;
  transition: background .35s var(--ease), color .35s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } body { font-size: 16px; } }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.04; letter-spacing: .015em; text-transform: uppercase; }
h1 { font-size: clamp(3rem, 7.5vw, 5.6rem); }
h2 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.h-sub { font-family: var(--font-head); text-transform: none; letter-spacing: .01em; }

.eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .34em;
  color: var(--accent); display: inline-flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--gold-grad); }

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lead { font-size: 1.2rem; font-weight: 300; color: var(--text-2); max-width: 64ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .14em;
  padding: 15px 32px; border-radius: 4px; cursor: pointer; border: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-gold { background: var(--gold-grad); background-size: 200% 100%; color: #15120A; box-shadow: 0 8px 26px rgba(201,162,75,.28); }
.btn-gold:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 12px 34px rgba(201,162,75,.40); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--accent); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background .35s var(--ease);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: flex; align-items: center; }
.brand-logo { height: 52px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-2); position: relative; padding: 6px 0; transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0%;
  background: var(--gold-grad); transition: width .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  display: grid; place-items: center; cursor: pointer;
  transition: color .25s, border-color .25s, transform .25s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--gold); transform: rotate(18deg); }
.theme-toggle svg { width: 19px; height: 19px; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: none; border-radius: 8px; cursor: pointer; color: var(--text); place-items: center; }
.nav-burger svg { width: 20px; height: 20px; }

@media (max-width: 940px) {
  .nav-links {
    position: fixed; top: 76px; right: 0; width: min(320px, 86vw); height: calc(100vh - 76px);
    flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px;
    background: var(--bg-2); border-left: 1px solid var(--line-soft);
    transform: translateX(105%); transition: transform .35s var(--ease);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.05rem; padding: 10px 0; }
  .nav-burger { display: grid; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 150px 0 110px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; background: url('../img/city.jpg') center 30% / cover no-repeat; transform: scale(1.04); animation: heroDrift 26s var(--ease) infinite alternate; }
@keyframes heroDrift { from { transform: scale(1.04) translateY(0); } to { transform: scale(1.1) translateY(-16px); } }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero .wrap { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--gold-bright); }
.hero h1 { margin: 22px 0 10px; color: #F2EFE7; }
.hero .h-sub { color: #C9C5BB; font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 400; }
.hero-logo { width: 200px; margin-bottom: 34px; border-radius: 10px; box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 42px; }
.hero .btn-ghost { color: #ECEAE4; border-color: rgba(236,234,228,.35); }
.hero .btn-ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); }
.hero-stats { display: flex; gap: 48px; margin-top: 64px; flex-wrap: wrap; }
.hero-stat { border-left: 1px solid rgba(201,162,75,.4); padding-left: 18px; }
.hero-stat b { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--gold-bright); display: block; line-height: 1; }
.hero-stat span { font-size: .8rem; text-transform: uppercase; letter-spacing: .2em; color: #9B978E; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Why section ---------- */
.why-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: center; }
@media (max-width: 880px) { .why-grid { grid-template-columns: 1fr; gap: 40px; } }
.why-grid h2 { margin: 18px 0 22px; }
.why-points { margin-top: 30px; display: grid; gap: 0; }
.why-point { display: flex; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line-soft); }
.why-point:last-child { border-bottom: 1px solid var(--line-soft); }
.why-point svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; margin-top: 4px; }
.why-point b { font-family: var(--font-head); font-size: 1.05rem; display: block; }
.why-point p { color: var(--text-2); font-size: .98rem; }
.why-visual { position: relative; }
.why-visual img { border-radius: var(--radius); box-shadow: var(--card-shadow); }
.why-visual::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  border: 1px solid var(--line); border-radius: var(--radius); z-index: -1;
}

/* ---------- Domains ---------- */
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { margin: 18px 0 16px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::after { content: ""; width: 36px; height: 1px; background: var(--gold-grad); }

.domain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1080px) { .domain-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .domain-grid { grid-template-columns: 1fr; } }

.domain-card {
  position: relative; display: block; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 30px 26px 26px; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s var(--ease);
}
.domain-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold-grad); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.domain-card:hover { transform: translateY(-6px); border-color: var(--line); box-shadow: var(--card-shadow); }
.domain-card:hover::before { transform: scaleX(1); }
.domain-icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--chip-bg);
  display: grid; place-items: center; color: var(--accent); margin-bottom: 20px;
}
.domain-icon svg { width: 26px; height: 26px; }
.domain-card h3 { font-size: 1.45rem; margin-bottom: 6px; }
.domain-card .tag { font-size: .85rem; color: var(--text-2); line-height: 1.45; display: block; min-height: 2.6em; }
.domain-card .host {
  display: flex; align-items: center; gap: 10px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--line-soft);
  font-size: .82rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}
.domain-card .host img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.domain-card .go {
  position: absolute; top: 26px; right: 22px; width: 30px; height: 30px;
  color: var(--text-3); opacity: 0; transform: translateX(-6px);
  transition: opacity .3s, transform .3s var(--ease), color .3s;
}
.domain-card:hover .go { opacity: 1; transform: none; color: var(--accent); }

/* ---------- Insights (dynamic) ---------- */
.insights-band { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.insights-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.api-status { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; }
.api-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.api-status.live .dot { background: #4CAF7D; box-shadow: 0 0 10px rgba(76,175,125,.6); }
.api-status.fallback .dot { background: var(--gold); }

.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .articles-grid { grid-template-columns: 1fr; } }

.article-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--card-shadow); border-color: var(--line); }
.article-thumb { aspect-ratio: 16/9; background: var(--bg-3) url('../img/city.jpg') center/cover; }
.article-body { padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.article-meta { display: flex; align-items: center; gap: 12px; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); }
.article-meta .cat { color: var(--accent); }
.article-card h3 { font-family: var(--font-head); text-transform: none; font-weight: 700; font-size: 1.12rem; line-height: 1.35; letter-spacing: 0; }
.article-card p { font-size: .94rem; color: var(--text-2); flex: 1; }
.article-card .read { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.article-card .read svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.article-card:hover .read svg { transform: translateX(4px); }

.skeleton { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); min-height: 320px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(201,162,75,.07) 50%, transparent 70%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.topic-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: .82rem; font-weight: 600; letter-spacing: .06em;
  padding: 8px 16px; border-radius: 999px;
  background: var(--chip-bg); color: var(--accent); border: 1px solid var(--line);
}

/* ---------- Team ---------- */
.experts-page { padding: 170px 0 48px; }
.team-banner { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.team-banner img { width: 100%; max-height: 560px; object-fit: cover; object-position: center 62%; }
.team-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(11,11,13,.72)); }
.team-banner figcaption {
  position: absolute; left: 32px; right: 32px; bottom: 26px; z-index: 2;
  color: #ECEAE4; font-family: var(--font-head); font-size: 1.1rem;
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
}
.team-banner.team-banner-wide {
  width: 100%; min-height: min(88vh, 920px); border-radius: 0; box-shadow: none; margin-bottom: 0;
  background: #8A8A8A;
}
.team-banner.team-banner-wide img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  max-height: none; object-fit: cover; object-position: center 32%;
}
.team-banner.team-banner-wide::after {
  background: linear-gradient(180deg, rgba(11,11,13,.35) 0%, transparent 24%, transparent 76%, rgba(11,11,13,.4) 100%);
}
.team-banner.team-banner-wide .team-banner-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 5vh, 56px) 0 clamp(20px, 4vh, 40px);
  pointer-events: none;
}
.team-banner.team-banner-wide .section-head--banner {
  margin-bottom: 0; max-width: 760px; margin-inline: auto;
  pointer-events: auto; text-shadow: 0 2px 24px rgba(0,0,0,.55);
}
.team-banner.team-banner-wide figcaption {
  position: static; text-align: center; justify-content: center;
  max-width: 720px; margin: 0 auto; pointer-events: auto;
  color: #ECEAE4; text-shadow: 0 2px 20px rgba(0,0,0,.6);
}
.experts-intro { padding-top: 48px; }
.experts-intro > .lead { max-width: 58ch; margin: 0 auto 56px; text-align: center; }
@media (max-width: 720px) {
  .team-banner.team-banner-wide { min-height: min(72vh, 680px); }
  .team-banner.team-banner-wide .section-head--banner h2 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .team-banner.team-banner-wide figcaption { font-size: .95rem; }
}
[data-theme="light"] .team-banner.team-banner-wide::after {
  background: linear-gradient(180deg, rgba(255,255,255,.3) 0%, transparent 24%, transparent 76%, rgba(11,11,13,.3) 100%);
}
[data-theme="light"] .team-banner.team-banner-wide .section-head--banner,
[data-theme="light"] .team-banner.team-banner-wide figcaption {
  color: #1A1A1E; text-shadow: 0 2px 16px rgba(0,0,0,.22);
}
[data-theme="light"] .team-banner.team-banner-wide figcaption { color: #2A2A30; }

.experts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1080px) { .experts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .experts-grid { grid-template-columns: 1fr; } }

.expert-card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.expert-card:hover { transform: translateY(-6px); box-shadow: var(--card-shadow); border-color: var(--line); }
.expert-photo { position: relative; aspect-ratio: 1; overflow: hidden; }
.expert-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); filter: saturate(.92); }
.expert-card:hover .expert-photo img { transform: scale(1.05); }
.expert-photo .domain-pill {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(11,11,13,.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--gold-bright); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(201,162,75,.4);
}
.expert-info { padding: 20px 22px 22px; }
.expert-info h3 { font-size: 1.3rem; }
.expert-info .role { font-size: .85rem; color: var(--text-2); display: block; margin: 4px 0 12px; }
.expert-info .bio { font-size: .92rem; color: var(--text-2); }
.expert-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.expert-tags span { font-size: .72rem; font-weight: 600; letter-spacing: .05em; padding: 5px 11px; border-radius: 999px; background: var(--chip-bg); color: var(--accent); }

/* ---------- Future Home ---------- */
.future-home { position: relative; overflow: hidden; }
.future-home .fh-bg { position: absolute; inset: 0; background: url('../img/city.jpg') center/cover fixed; opacity: .9; }
@media (prefers-reduced-motion: reduce), (max-width: 880px) { .future-home .fh-bg { background-attachment: scroll; } }
.future-home::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11,11,13,.92) 30%, rgba(11,11,13,.55)); }
.future-home .wrap { position: relative; z-index: 2; }
.future-home h2, .future-home .h-sub { color: #F2EFE7; }
.fh-card { max-width: 620px; }
.fh-card .h-sub { margin: 18px 0 30px; color: #C9C5BB; }
.fh-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-bright); border: 1px solid rgba(201,162,75,.45); padding: 9px 18px; border-radius: 999px;
}

/* ---------- Newsletter ---------- */
.newsletter { background: var(--bg-2); border-top: 1px solid var(--line-soft); }
.nl-box {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 56px; position: relative; overflow: hidden;
}
.nl-box::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold-grad); }
@media (max-width: 880px) { .nl-box { grid-template-columns: 1fr; padding: 36px 28px; gap: 28px; } }
.nl-form { display: flex; gap: 12px; }
@media (max-width: 560px) { .nl-form { flex-direction: column; } }
.nl-form input {
  flex: 1; padding: 15px 18px; border-radius: 4px; font-family: var(--font-body); font-size: 1rem;
  background: var(--bg); color: var(--text); border: 1px solid var(--line-soft);
}
.nl-form input:focus { outline: none; border-color: var(--gold); }
.nl-note { font-size: .85rem; color: var(--text-3); margin-top: 14px; }
.nl-msg { margin-top: 14px; font-weight: 600; color: var(--accent); min-height: 1.4em; }

/* ---------- Footer ---------- */
.site-footer { background: #0B0B0D; color: #A8A49B; border-top: 1px solid rgba(201,162,75,.25); padding: 72px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer img.f-logo { height: 80px; width: auto; margin-bottom: 18px; }
.site-footer h4 { font-family: var(--font-head); color: #ECEAE4; font-size: .95rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 18px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { font-size: .95rem; transition: color .25s; }
.site-footer a:hover { color: var(--gold-bright); }
.footer-bottom { margin-top: 56px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: #6F6C66; }

/* ---------- Ecosystem page: relationship map ---------- */
.eco-map-wrap { display: grid; place-items: center; margin: 24px auto 8px; text-align: center; }
.eco-map-wrap.center { margin-left: auto; margin-right: auto; }
.eco-map { display: block; width: min(720px, 100%); margin-inline: auto; }
.eco-map .ring { fill: none; stroke: var(--line); stroke-dasharray: 3 6; }
.eco-map .spoke { stroke: var(--line); stroke-width: 1; }
.eco-map .node { cursor: pointer; }
.eco-map .node circle { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.eco-map .node:hover circle { stroke: var(--gold); }
.eco-map .node text { fill: var(--text); font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-anchor: middle; }
.eco-map .core circle { fill: var(--surface); stroke: var(--gold); stroke-width: 2; }
.eco-map .core-label text { fill: var(--accent); font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .06em; text-anchor: middle; dominant-baseline: middle; }
.eco-map .core-label .core-sub { font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .2em; fill: var(--text-2); }
@keyframes ringSpin { to { stroke-dashoffset: -90; } }
.eco-map .ring { animation: ringSpin 14s linear infinite; }

.domain-rows { display: grid; gap: 18px; margin-top: 56px; }
.domain-row {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 30px; transition: border-color .3s, transform .3s var(--ease);
}
.domain-row:hover { border-color: var(--line); transform: translateX(6px); }
@media (max-width: 820px) { .domain-row { grid-template-columns: 1fr; gap: 14px; } }
.domain-row h3 { font-size: 1.5rem; }
.domain-row .role { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); display: block; margin-top: 6px; font-weight: 600; }
.domain-row p { color: var(--text-2); font-size: .97rem; }

/* ---------- Domain page ---------- */
.domain-hero { position: relative; padding: 180px 0 90px; overflow: hidden; background: var(--bg-2); border-bottom: 1px solid var(--line-soft); }
.domain-hero .grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
@media (max-width: 880px) { .domain-hero .grid { grid-template-columns: 1fr; } .domain-hero { padding-top: 140px; } }
.domain-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 18px 0 8px; }
.host-card { display: flex; align-items: center; gap: 18px; margin-top: 34px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); max-width: 420px; }
.host-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.host-card b { font-family: var(--font-head); font-size: 1.05rem; display: block; }
.host-card span { font-size: .82rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.domain-hero .portrait { border-radius: var(--radius); box-shadow: var(--card-shadow); border: 1px solid var(--line); }

.domain-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; }

.character-profile { padding: 80px 0; background: var(--bg-2); border-bottom: 1px solid var(--line-soft); }
.character-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }
.character-main h2 { margin: 18px 0 20px; font-size: clamp(2rem, 4vw, 3rem); }
.character-lead {
  font-family: var(--font-head); font-size: 1.15rem; line-height: 1.55;
  color: var(--accent); margin-bottom: 28px; max-width: 52ch;
}
.character-story p { color: var(--text-2); margin-bottom: 18px; font-size: 1.02rem; line-height: 1.7; max-width: 62ch; }
.character-story p:last-child { margin-bottom: 0; }
.character-aside { display: grid; gap: 20px; }
.character-panel {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 28px;
}
.character-panel h3 { margin-bottom: 16px; font-size: 1.05rem; }
.character-highlights { list-style: none; display: grid; gap: 12px; }
.character-highlights li {
  position: relative; padding-left: 18px; color: var(--text-2); font-size: .96rem; line-height: 1.5;
}
.character-highlights li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold);
}
@media (max-width: 880px) {
  .character-grid { grid-template-columns: 1fr; gap: 32px; }
  .character-profile { padding: 64px 0; }
}
.domain-nav a {
  font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-soft); color: var(--text-2);
  transition: color .25s, border-color .25s;
}
.domain-nav a:hover { color: var(--accent); border-color: var(--gold); }
.domain-nav a.current { color: var(--accent); border-color: var(--gold); background: var(--chip-bg); }

/* ---------- Misc ---------- */
.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--accent); display: grid; place-items: center; cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .3s, transform .3s var(--ease);
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
