:root {
  /* Palette tuned to the Half Built logo (adjust here if the mark changes) */
  --bg-main: #1F2A2E;                /* deep charcoal background */
  --bg-surface: #253237;             /* slightly lighter charcoal for sections/cards */
  --bg-surface-hover: #2b363c;       /* gentle lift on hover */
  --text-main: #F2EAD7;              /* warm off-white / cream */
  --text-muted: #B8B0A0;             /* desaturated warm grey */
  --accent: #F2EAD7;                 /* logo text colour */
  --accent-soft: rgba(242,234,215,0.08); /* low-opacity accent for borders/glow */
  --border: #3A4A4F;                 /* subtle warm grey border */
  --radius: 14px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; }
.logo { max-height: 52px; width: auto; height: auto; object-fit: contain; display: block; }
.brand-text { display: none; }

.nav { display: flex; gap: 14px; font-weight: 600; }
.nav a { padding: 8px 10px; border-radius: 10px; }
.nav a.active { background: var(--accent-soft); color: var(--text-main); }

.hero { padding: 64px 0 36px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero-text h1 { margin: 0 0 10px; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.08; }
.hero-text .lede { margin: 0 0 18px; color: var(--text-muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--text-muted); margin: 0 0 6px; font-size: 0.85rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-logo { display: none; }

.section { padding: 42px 0; }
.section-head h2 { margin: 0 0 6px; font-size: 1.5rem; }
.section-head p { margin: 0; color: var(--text-muted); }

.video-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 16px; }
.video-grid.three-up { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.video-card { background: #182027; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 16px; box-shadow: 0 10px 28px rgba(0,0,0,0.28); display: grid; gap: 10px; position: relative; }
.embed { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: var(--bg-surface); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hidden { display: none; }

.fallback-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: #182027; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 16px; box-shadow: 0 10px 28px rgba(0,0,0,0.28); position: relative; overflow: hidden; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease; }
.card::before { content: \"\"; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent); opacity: 0.5; }
.card:hover { transform: translateY(-2px); background: #1d2730; box-shadow: 0 14px 34px rgba(0,0,0,0.33); border-color: rgba(255,255,255,0.12); }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; color: var(--text-muted); }

.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--border); font-weight: 700; margin-bottom: 10px; color: var(--text-main); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; border-radius: 12px; font-weight: 700; border: 1px solid transparent; cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; color: inherit; background: transparent; }
.btn.primary { background: var(--accent); color: var(--bg-main); box-shadow: var(--shadow); }
.btn.ghost { border-color: var(--accent); color: var(--accent); }
.btn:hover, .btn:focus-visible { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(0,0,0,0.3); }

.muted { color: var(--text-muted); }
.small { font-size: 0.95rem; color: var(--text-muted); }

.footer { padding: 28px 0 36px; color: var(--text-muted); }

.logo-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 20% 20%, var(--accent-soft), transparent 40%); opacity: 0.7; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Articles coming soon banner */
.articles-coming-soon {
  margin-top: 3rem;
}

.articles-coming-soon .subtitle {
  opacity: 0.75;
  margin-bottom: 2rem;
}

.coming-soon-banner {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 18px;
  padding: 3rem 2.5rem;
  text-align: center;
}

.coming-soon-banner span {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.coming-soon-banner p {
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
  opacity: 0.85;
}

@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1.2fr 1fr; }
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg-main: #f5f3ec;
    --bg-surface: #ffffff;
    --text-main: #1f2a2e;
    --text-muted: #5b5f63;
    --accent: #1f2a2e;
    --accent-soft: rgba(31, 42, 46, 0.12);
    --border: #d8d5cc;
    --shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
  }

  .card:hover { box-shadow: 0 18px 36px rgba(17, 24, 39, 0.12); }
}
