/* Cathedra Index — public department landing */
:root {
  --cd-green: #0b6e2f;
  --cd-green-deep: #064820;
  --cd-green-soft: #e8f5ec;
  --cd-ink: #0f172a;
  --cd-muted: #5b6b63;
  --cd-line: rgba(15, 23, 42, 0.08);
  --cd-radius: 20px;
  --cd-shadow: 0 16px 40px rgba(6, 40, 20, 0.12);
  --cd-header-h: 72px;
  --cd-font: "Noto Sans", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.cd-page {
  margin: 0;
  font-family: var(--cd-font);
  color: var(--cd-ink);
  background: #f6f8f6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.cd-container {
  width: min(1140px, calc(100% - 2rem));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.cd-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--cd-header-h);
  display: flex;
  align-items: center;
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.cd-header__inner {
  width: min(1200px, calc(100% - 1.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cd-header__logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease;
}

.cd-header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.cd-header__nav::-webkit-scrollbar { display: none; }

.cd-header__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.cd-header__link i {
  font-size: 0.78rem;
  line-height: 1;
  width: 1em;
  text-align: center;
}

.cd-header__link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.cd-header__right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  flex-shrink: 0;
}

.cd-lang {
  display: flex;
  gap: 0.35rem;
}

.cd-lang a {
  min-width: 2.35rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cd-lang a.active,
.cd-lang a:hover {
  background: #fff;
  color: var(--cd-green);
  border-color: #fff;
}

.cd-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.cd-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cd-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.cd-header.is-scrolled .cd-header__logo img { filter: none; }

.cd-header.is-scrolled .cd-header__link {
  color: var(--cd-ink);
}

.cd-header.is-scrolled .cd-header__link:hover {
  background: var(--cd-green-soft);
  color: var(--cd-green);
}

.cd-header.is-scrolled .cd-lang a {
  color: var(--cd-ink);
  border-color: #dbe4de;
  background: #fff;
}

.cd-header.is-scrolled .cd-lang a.active {
  background: var(--cd-green);
  border-color: var(--cd-green);
  color: #fff;
}

.cd-header.is-scrolled .cd-burger {
  border-color: #dbe4de;
}

.cd-header.is-scrolled .cd-burger span {
  background: var(--cd-ink);
}

/* Mobile drawer */
.cd-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  visibility: hidden;
}

.cd-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.cd-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 24, 14, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cd-drawer.is-open .cd-drawer__backdrop { opacity: 1; }

.cd-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 88vw);
  background: #fff;
  padding: 1.25rem;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cd-drawer.is-open .cd-drawer__panel { transform: translateX(0); }

.cd-drawer__close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--cd-green-soft);
  color: var(--cd-green);
  cursor: pointer;
  font-size: 1.1rem;
}

.cd-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  color: var(--cd-ink);
}

.cd-drawer__link i {
  width: 1.25rem;
  text-align: center;
  color: var(--cd-green);
}

.cd-drawer__link:hover {
  background: var(--cd-green-soft);
}

/* ---------- Hero ---------- */
.cd-hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background:
    radial-gradient(ellipse 70% 60% at 10% 20%, rgba(72, 187, 120, 0.22), transparent 55%),
    linear-gradient(145deg, #042f12 0%, #064a1f 38%, #0b6e2f 72%, #0a5a26 100%);
  color: #fff;
  overflow: hidden;
}

.cd-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--cd-header-h) + 2.5rem) 1.5rem 3.5rem;
  padding-left: max(1.5rem, calc((100vw - 1140px) / 2 + 1rem));
  position: relative;
  z-index: 2;
}

.cd-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.cd-hero__eyebrow i { color: #8de0a8; }

.cd-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.2vw, 3.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.cd-hero__lead {
  margin: 0 0 1.75rem;
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 36rem;
  font-weight: 500;
}

.cd-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.35rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cd-btn i {
  font-size: 0.85rem;
  line-height: 1;
}

.cd-btn--primary {
  background: #fff;
  color: var(--cd-green);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.cd-btn--primary:hover {
  transform: translateY(-2px);
  background: #ecfdf3;
}

.cd-btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.cd-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.cd-btn--solid {
  background: var(--cd-green);
  color: #fff;
}

.cd-btn--solid:hover {
  background: var(--cd-green-deep);
  transform: translateY(-2px);
}

.cd-hero__media {
  position: relative;
  min-height: 320px;
}

.cd-hero__media img,
.cd-hero__media-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cd-hero__media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(160deg, rgba(14, 90, 42, 0.55), rgba(4, 47, 18, 0.75)),
    repeating-linear-gradient(
      -12deg,
      rgba(255, 255, 255, 0.04) 0 12px,
      transparent 12px 24px
    );
  color: rgba(255, 255, 255, 0.55);
  font-size: 3.5rem;
}

.cd-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 47, 18, 0.55) 0%, transparent 42%);
  pointer-events: none;
}

.cd-hero__glow {
  position: absolute;
  width: 50%;
  height: 120%;
  top: -20%;
  right: -8%;
  background: radial-gradient(circle, rgba(141, 224, 168, 0.2), transparent 65%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Quick links ---------- */
.cd-quick {
  margin-top: -2.5rem;
  position: relative;
  z-index: 5;
  margin-bottom: 1rem;
}

.cd-quick__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cd-quick__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border-radius: var(--cd-radius);
  border: 1px solid var(--cd-line);
  box-shadow: var(--cd-shadow);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cd-quick__card:hover {
  transform: translateY(-4px);
  border-color: rgba(11, 110, 47, 0.28);
  box-shadow: 0 20px 44px rgba(6, 40, 20, 0.14);
}

.cd-quick__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cd-green-soft);
  color: var(--cd-green);
  flex-shrink: 0;
  font-size: 1.15rem;
}

.cd-quick__icon i {
  line-height: 1;
  width: auto;
  height: auto;
}

.cd-quick__text strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.cd-quick__text span {
  font-size: 0.82rem;
  color: var(--cd-muted);
  font-weight: 500;
}

/* ---------- Features ---------- */
.cd-section {
  padding: 4.5rem 0;
}

.cd-section--soft {
  background: linear-gradient(180deg, #fff 0%, #f3f7f4 100%);
}

.cd-section__head {
  max-width: 40rem;
  margin-bottom: 2.25rem;
}

.cd-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cd-green);
  margin-bottom: 0.65rem;
}

.cd-section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cd-section__desc {
  margin: 0;
  color: var(--cd-muted);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 500;
}

.cd-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.cd-feature {
  background: #fff;
  border: 1px solid var(--cd-line);
  border-radius: var(--cd-radius);
  padding: 1.5rem 1.35rem;
  min-height: 100%;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.cd-feature:hover {
  transform: translateY(-6px);
  border-color: rgba(11, 110, 47, 0.28);
  box-shadow: 0 22px 48px rgba(6, 40, 20, 0.12);
}

.cd-feature--accent {
  background: linear-gradient(160deg, #0b6e2f, #064820);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 22px 48px rgba(11, 110, 47, 0.28);
}

.cd-feature--accent .cd-feature__text {
  color: rgba(255, 255, 255, 0.82);
}

.cd-feature__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  background: var(--cd-green-soft);
  color: var(--cd-green);
  font-size: 1.25rem;
}

.cd-feature__icon i {
  line-height: 1;
  display: block;
  font-style: normal;
}

.cd-feature--accent .cd-feature__icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.cd-feature__title {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.cd-feature__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--cd-muted);
  font-weight: 500;
}

/* ---------- FAQ ---------- */
.cd-faq {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.cd-faq__intro p {
  color: var(--cd-muted);
  line-height: 1.7;
  font-weight: 500;
}

.cd-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cd-acc-item {
  background: #fff;
  border: 1px solid var(--cd-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.cd-acc-item.is-open {
  border-color: rgba(11, 110, 47, 0.28);
  box-shadow: 0 14px 32px rgba(6, 40, 20, 0.1);
}

.cd-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--cd-ink);
  line-height: 1.35;
}

.cd-acc-btn:hover { color: var(--cd-green); }

.cd-acc-item.is-open .cd-acc-btn {
  color: var(--cd-green);
}

.cd-acc-btn__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cd-green-soft);
  color: var(--cd-green);
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), background 0.28s ease, color 0.28s ease;
}

.cd-acc-btn__icon i {
  font-size: 0.78rem;
  line-height: 1;
}

.cd-acc-item.is-open .cd-acc-btn__icon {
  background: var(--cd-green);
  color: #fff;
  transform: rotate(180deg);
}

.cd-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
}

.cd-acc-item.is-open .cd-acc-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.38s ease 0.04s;
}

.cd-acc-panel__inner {
  overflow: hidden;
  min-height: 0;
}

.cd-acc-panel__text {
  margin: 0;
  padding: 0 1.2rem 1.2rem;
  color: var(--cd-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  font-weight: 500;
  transform: translateY(-8px);
  opacity: 0.45;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.cd-acc-item.is-open .cd-acc-panel__text {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- CTA band ---------- */
.cd-cta {
  padding: 0 0 4.5rem;
}

.cd-cta__box {
  border-radius: 28px;
  padding: 2.25rem 2rem;
  background:
    radial-gradient(circle at 90% 20%, rgba(141, 224, 168, 0.25), transparent 40%),
    linear-gradient(135deg, #064820, #0b6e2f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 24px 50px rgba(6, 40, 20, 0.22);
}

.cd-cta__box h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 800;
}

.cd-cta__box p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.cd-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ---------- Back to top ---------- */
.cd-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: none;
  background: var(--cd-green);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(11, 110, 47, 0.35);
  z-index: 50;
}

.cd-top.is-visible { display: inline-flex; }

.cd-top i { line-height: 1; }

/* ---------- Motion ---------- */
.cd-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.cd-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.cd-reveal-d1 { transition-delay: 0.08s; }
.cd-reveal-d2 { transition-delay: 0.16s; }
.cd-reveal-d3 { transition-delay: 0.24s; }
.cd-reveal-d4 { transition-delay: 0.32s; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cd-features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .cd-header__nav { display: none; }
  .cd-burger { display: inline-flex; }

  .cd-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .cd-hero__content {
    padding: calc(var(--cd-header-h) + 2rem) 1.25rem 2.25rem;
    padding-left: 1.25rem;
    text-align: left;
  }

  .cd-hero__title { max-width: none; }

  .cd-hero__media {
    min-height: 240px;
    order: -1;
    margin-top: var(--cd-header-h);
  }

  .cd-hero__media::after {
    background: linear-gradient(180deg, rgba(4, 47, 18, 0.35), transparent 45%);
  }

  .cd-quick { margin-top: -1.5rem; }

  .cd-quick__grid,
  .cd-faq {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root { --cd-header-h: 64px; }

  .cd-quick__grid,
  .cd-features {
    grid-template-columns: 1fr;
  }

  .cd-section { padding: 3.25rem 0; }

  .cd-cta__box {
    padding: 1.5rem 1.25rem;
    border-radius: 22px;
  }

  .cd-hero__actions,
  .cd-cta__actions {
    width: 100%;
  }

  .cd-hero__actions .cd-btn,
  .cd-cta__actions .cd-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cd-reveal,
  .cd-feature,
  .cd-quick__card,
  .cd-btn,
  .cd-acc-panel,
  .cd-acc-btn__icon,
  .cd-acc-panel__text,
  .cd-acc-item {
    transition: none !important;
  }

  .cd-reveal { opacity: 1; transform: none; }
}
