/* EDIFICE — ELVAR chrome (header/footer). Maps elvar.in variables to EDIFICE tokens. */

/* Variable mappings for elvar.in components */
.edifice-header, .edifice-footer, .drawer {
  --accent: var(--green);
  --on-ink: #F4F1EC;
  --on-ink-mute: rgba(244, 241, 236, 0.65);
  --on-ink-faint: rgba(244, 241, 236, 0.45);
  --focus: var(--green);
  --focus-on-dark: #A8CBB6;
  --header-h: 72px;
  --radius: 2px;
  --font-display: var(--serif);
  --font-sans: var(--sans);
  --font-mono: var(--mono);
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s7: 56px; --s8: 64px;
  --hairline-ink: rgba(244, 241, 236, 0.18);
}

/* ---------- Header ---------- */
.edifice-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.edifice-header .wrap {
  height: var(--header-h);
  display: flex; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.edifice-header .nav { display: flex; align-items: center; width: 100%; gap: 24px; }
.edifice-header .brand { text-decoration: none; display: inline-flex; flex: none; }
.edifice-header .brand__word {
  font-family: var(--serif); font-size: 26px; letter-spacing: 0.08em;
  line-height: 1; color: var(--ink);
}
.edifice-header .nav__links { display: none; }
@media (min-width: 900px) {
  .edifice-header .nav__links { display: flex; align-items: center; gap: 4px; margin-left: 32px; }
  .edifice-header .nav__links a {
    display: inline-block; min-width: 96px; text-align: center;
    font-size: 15px; font-weight: 500; text-decoration: none;
    padding: 12px 8px; color: var(--ink); flex: none;
    font-family: var(--sans);
  }
  .edifice-header .nav__links a:hover { color: var(--green); }
  .edifice-header .nav__links a[aria-current="page"] { color: var(--green); }
}
.edifice-header .nav__spacer { flex: 1; }
.edifice-header .nav__cta {
  display: none;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 12px 20px; text-decoration: none;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 2px;
  transition: background 0.3s, border-color 0.3s;
}
.edifice-header .nav__cta:hover { background: var(--green); border-color: var(--green); }
@media (min-width: 900px) { .edifice-header .nav__cta { display: inline-flex; } }
.edifice-header .nav__cta--mobile {
  display: inline-flex; white-space: nowrap;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 12px 16px; text-decoration: none;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 2px;
}
@media (min-width: 900px) { .edifice-header .nav__cta--mobile { display: none; } }
.edifice-header .nav__burger {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 6px; width: 48px; height: 48px; flex: none;
  background: transparent; border: 0; cursor: pointer; padding: 0;
}
.edifice-header .nav__burger span { display: block; width: 24px; height: 2px; background: var(--ink); }
@media (min-width: 900px) { .edifice-header .nav__burger { display: none; } }

/* Offset for fixed header — overture needs to clear it */
body { padding-top: var(--header-h); }
.overture { margin-top: calc(var(--header-h) * -1); }

/* ---------- Mobile drawer ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper);
  visibility: hidden; opacity: 0;
  transition: opacity 240ms ease, visibility 0ms linear 240ms;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.drawer.is-open { visibility: visible; opacity: 1; transition: opacity 240ms ease; }
.drawer__top {
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--hairline);
}
.drawer__brand { font-family: var(--serif); font-size: 24px; letter-spacing: 0.08em; }
.drawer__close {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
  font-size: 30px; line-height: 1; color: var(--ink);
}
.drawer__links { display: flex; flex-direction: column; padding: 40px 24px 0; }
.drawer__links a {
  font-family: var(--serif); font-size: 34px; line-height: 1.15;
  text-decoration: none; color: var(--ink);
  padding: 14px 0; border-bottom: 1px solid var(--hairline);
}
.drawer__links a:hover { color: var(--green); }
.drawer__links a[aria-current="page"] { color: var(--green); }
.drawer__foot { padding: 40px 24px 48px; }
.drawer__foot .btn {
  display: inline-flex; width: 100%; justify-content: center;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  padding: 18px 36px; text-decoration: none;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
}
body.drawer-open { overflow: hidden; }

/* ---------- Footer ---------- */
.edifice-footer {
  background: var(--ink); color: var(--on-ink);
  padding-top: 64px; padding-bottom: 96px;
}
.edifice-footer .wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.edifice-footer .footer__grid { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .edifice-footer .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 48px; }
}
.edifice-footer .footer__brand {
  font-family: var(--serif); font-size: 30px; letter-spacing: 0.08em; margin: 0 0 16px;
  color: var(--on-ink);
}
.edifice-footer .footer__tag { color: var(--on-ink-mute); font-size: 15px; max-width: 30ch; font-family: var(--sans); }
.edifice-footer .footer__col h2 {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-ink-mute); margin: 0 0 16px;
}
.edifice-footer .footer__col ul { list-style: none; margin: 0; padding: 0; }
.edifice-footer .footer__col li { margin: 0 0 12px; }
.edifice-footer .footer__col a {
  text-decoration: none; font-size: 15px; color: var(--on-ink);
  font-family: var(--sans);
}
.edifice-footer .footer__col a:hover { color: var(--focus-on-dark); text-decoration: underline; }
.edifice-footer .footer__col a[aria-current="page"] { color: var(--focus-on-dark); }
.edifice-footer .footer__mail {
  font-weight: 600; font-size: 16px; text-decoration: none;
  border-bottom: 1px solid var(--hairline-ink); padding-bottom: 2px;
  color: var(--on-ink); font-family: var(--sans);
}
.edifice-footer .footer__mail:hover { color: var(--focus-on-dark); border-bottom-color: var(--focus-on-dark); }
.edifice-footer .footer__base {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--hairline-ink);
}
.edifice-footer .footer__base p { margin: 0; font-size: 14px; color: var(--on-ink-mute); font-family: var(--sans); }
