:root {
  --bg: #070c18;
  --panel: #10182b;
  --panel-2: #14213d;
  --line: rgba(210, 174, 72, 0.25);
  --text: #f7f7fb;
  --muted: #b8becd;
  --gold: #c9a231;
  --gold-light: #f1d776;
  --green: #0f9f7a;
  --red: #b64b5c;
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(7, 12, 24, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background: url("../images/qcird_logo.png") center / contain no-repeat;
}

.brand strong {
  display: block;
  font-family: Cinzel, serif;
  font-size: 0.92rem;
  letter-spacing: 0;
}

.brand small {
  display: block;
  max-width: 320px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.main-nav a {
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--gold-light);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: clamp(54px, 8vw, 112px) clamp(20px, 5vw, 72px) 32px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 12, 24, 0.96) 0%, rgba(7, 12, 24, 0.86) 48%, rgba(7, 12, 24, 0.62) 100%),
    url("../images/qcird_logo.png") right 8vw center / min(48vw, 560px) no-repeat;
  opacity: 0.95;
}

.hero-content,
.hero-stats {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  max-width: 860px;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(2.55rem, 7vw, 5.8rem);
  font-weight: 700;
}

h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(2rem, 4.2vw, 3.7rem);
}

h3 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.35rem;
}

.hero-content > p:not(.eyebrow) {
  max-width: 760px;
  margin: 22px 0 0;
  color: #e2e7f3;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn,
.program-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary,
.program-card button {
  background: var(--gold);
  color: #08101f;
}

.btn.secondary {
  border-color: var(--line);
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.03);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 56px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stats span {
  min-height: 92px;
  padding: 20px;
  background: rgba(16, 24, 43, 0.84);
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-stats strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
}

.section,
.cta-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) clamp(20px, 4vw, 32px);
}

.section + .section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 28px;
}

.two-column,
.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: 32px;
  align-items: start;
}

.prose p,
.section > p,
.split-panel p,
.two-column p {
  margin-top: 0;
  color: #dce2ee;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li,
.check-grid span,
.mandate-grid article,
.service-grid article {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--panel);
  padding: 16px 18px;
  color: #edf1f8;
}

.feature-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  background: var(--gold);
  transform: translateY(-1px);
}

.split-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: var(--panel);
}

.check-grid,
.mandate-grid,
.service-grid,
.program-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-grid span::before {
  content: "+";
  color: var(--gold-light);
  margin-right: 9px;
}

.mandate-grid,
.program-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.philosophy,
.ethics-section,
.quality-section {
  background: linear-gradient(180deg, rgba(20, 33, 61, 0.72), rgba(16, 24, 43, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #e8edf6;
  padding: 10px 13px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.program-card {
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: 260px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel);
}

.program-card p {
  margin: 0;
  color: var(--muted);
}

.program-card button {
  justify-self: start;
  align-self: end;
}

.detail-panel {
  margin-top: 18px;
  padding: 24px;
  border-left: 4px solid var(--gold);
  background: var(--panel-2);
}

.detail-panel p,
.detail-panel li {
  color: #dce2ee;
}

.detail-panel ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.accordion {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--panel);
}

.accordion-trigger {
  width: 100%;
  min-height: 58px;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.accordion-panel {
  display: none;
  padding: 0 20px 18px;
  color: var(--muted);
}

.accordion-trigger.is-open + .accordion-panel {
  display: block;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: var(--panel);
}

summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 800;
}

details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}

.cta-section {
  margin-bottom: 48px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(201, 162, 49, 0.16), rgba(15, 159, 122, 0.11));
}

.cta-section h2 {
  max-width: 900px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px clamp(20px, 5vw, 72px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #050914;
  color: var(--muted);
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  max-width: 760px;
  margin: 8px 0 0;
}

.site-footer a {
  color: var(--gold-light);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 980px) {
  .menu-toggle { display: block; }

  .main-nav {
    position: fixed;
    inset: 72px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: #091122;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .main-nav.open { display: flex; }

  .main-nav a {
    padding: 12px;
  }

  .two-column,
  .split-panel,
  .hero-stats,
  .mandate-grid,
  .program-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand small {
    max-width: 190px;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(7, 12, 24, 0.95), rgba(7, 12, 24, 0.9)),
      url("../images/qcird_logo.png") center 32px / 260px no-repeat;
  }

  .hero-actions,
  .button-row {
    flex-direction: column;
  }

  .btn,
  .program-card button {
    width: 100%;
  }

  .split-panel {
    padding: 20px;
  }

  .check-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: block;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 18px;
  }
}
