/* ============================================================
   GLOBAL STYLES — schedull
   Palette: "Forest Ink" — deep forest greens + warm amber
   Light:   parchment background, forest primary, amber accent
   Dark:    midnight forest, emerald tones, warm amber glow
   ============================================================ */

html {
  font-size: 13px;
  font-family: Montserrat, sans-serif;
}

/* ── Light mode (default) ── */
:root {
  /* Surfaces */
  --main:               #F4F1EB;   /* warm parchment */
  --main-auxiliary:     #E8E3D8;   /* warm stone */
  --tertiary:           #DDDAD0;   /* light divider */
  --white-color:        #FAFAF7;   /* pure-ish white */
  --card-background:    #FFFFFFaa;

  /* Typography */
  --font-color:         #18201B;   /* deep ink (warm near-black) */
  --font-color-contrast:#F4F1EB;   /* text on dark surfaces */

  /* Brand palette */
  --purple-color:       #1E3D2F;   /* deep forest green — primary brand */
  --blue-color:         #B87318;   /* warm amber — accent */
  --dark-blue-color:    #122518;   /* deeper forest */
  --light-blue-color:   #B8731822; /* amber tint for backgrounds */

  /* Status / categorical */
  --red-color:          #C0432B;   /* terra cotta */
  --green-color:        #3A7048;   /* leaf green */

  /* Shadows */
  --shadow-color-intense: rgba(24, 32, 27, 0.55);
  --shadow-color-light:   rgba(24, 32, 27, 0.12);
}

/* ── Dark mode — "Warm Midnight" ── */
body.dark-mode {
  /* Surfaces — warm charcoal, no green hue */
  --main:               #131110;   /* espresso near-black */
  --main-auxiliary:     #1B1916;   /* warm charcoal surface */
  --tertiary:           #2C2926;   /* warm divider/border */
  --white-color:        #211E1B;   /* card base */
  --card-background:    #211E1Baa;

  /* Text — warm cream, zero green cast */
  --font-color:         #E5DDD4;   /* warm cream */
  --font-color-contrast:#131110;

  /* Brand — green reserved for interactive elements only, softened */
  --purple-color:       #4E7D6788;   /* muted sage — gentler, less dominant */
  --blue-color:         #D4921C88;   /* amber — the warmth of dark mode */
  --dark-blue-color:    #2A3028;   /* desaturated deep */
  --light-blue-color:   #D4921C22;

  --red-color:          #D6554088;
  --green-color:        #4E906088;

  --shadow-color-intense: rgba(0, 0, 0, 0.70);
  --shadow-color-light:   rgba(0, 0, 0, 0.30);
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  background-color: var(--main);
  color: var(--font-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

body > .container > main {
  flex: 1;
  min-height: 100svh; /* page total = header + main(≥100vh) + footer → always requires scroll */
}

header {
  background-color: inherit;
  color: inherit;
}

header#root {
  position: sticky;
  top: 0;
  z-index: 200;
}

.default-header { display: none; }

a {
  text-decoration: none;
  color: inherit;
}

.footer-link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.footer-link-button:hover {
  color: var(--blue-color);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

dialog {
  background-color: var(--main);
  color: var(--font-color);
  box-shadow: 0 0 10px var(--shadow-color-intense);
  border-radius: 8px;
  border: none;
}

@keyframes cookie-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


.cookie-consent {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 3000;
  width: min(400px, calc(100vw - 32px));
  padding: 1.35rem 1.35rem 1.1rem;
  color: var(--font-color);
  background: color-mix(in srgb, var(--main) 96%, var(--white-color));
  border: 1px solid color-mix(in srgb, var(--tertiary) 80%, transparent);
  border-radius: 20px;
  box-shadow: 0 4px 24px color-mix(in srgb, var(--font-color) 10%, transparent),
              0 12px 48px color-mix(in srgb, var(--font-color) 6%, transparent);
  animation: cookie-slide-up 0.4s cubic-bezier(0.34, 1.15, 0.64, 1) both;
}

.cookie-consent__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.cookie-consent h2,
.cookie-consent h3,
.cookie-consent p {
  margin: 0;
}

.cookie-consent h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--purple-color);
  line-height: 1.15;
}

.cookie-consent__intro,
.cookie-consent__category p {
  color: var(--font-color);
  font-size: 0.84rem;
  line-height: 1.6;
  opacity: 0.78;
}

.cookie-consent__intro {
  margin-bottom: 1rem;
}

.cookie-consent__categories {
  display: grid;
  gap: 0.55rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.cookie-consent__categories--visible {
  max-height: 600px;
  opacity: 1;
  margin-top: 0.85rem;
  margin-bottom: 0.2rem;
}

.cookie-consent__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: var(--main-auxiliary);
  border: 1px solid var(--tertiary);
  border-radius: 14px;
}

.cookie-consent__category h3 {
  margin-bottom: 0.18rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cookie-consent__badge {
  flex: 0 0 auto;
  padding: 0.22rem 0.6rem;
  color: var(--font-color-contrast);
  background: var(--purple-color);
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cookie-consent__switch {
  flex: 0 0 auto;
  cursor: pointer;
}

.cookie-consent__switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-consent__switch-track {
  position: relative;
  display: block;
  width: 46px;
  height: 26px;
  background: var(--tertiary);
  border: 1px solid color-mix(in srgb, var(--font-color) 20%, transparent);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cookie-consent__switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--main);
  border-radius: 50%;
  box-shadow: 0 2px 6px var(--shadow-color-light);
  transition: transform 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.cookie-consent__switch input:checked + .cookie-consent__switch-track {
  background: var(--blue-color);
  border-color: var(--blue-color);
}

.cookie-consent__switch input:checked + .cookie-consent__switch-track::after {
  transform: translateX(20px);
}

.cookie-consent__switch input:focus-visible + .cookie-consent__switch-track,
.cookie-consent__button:focus-visible,
.cookie-consent__close:focus-visible,
.footer-link-button:focus-visible {
  outline: 2px solid var(--blue-color);
  outline-offset: 3px;
}

.cookie-consent__links {
  margin-top: 0.65rem;
  margin-bottom: 0.85rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue-color);
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.cookie-consent__button,
.cookie-consent__close {
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.cookie-consent__button {
  min-height: 40px;
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--tertiary);
  border-radius: 10px;
  font-size: 0.79rem;
  font-weight: 700;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.cookie-consent__button:active {
  transform: scale(0.96);
}

.cookie-consent__button--primary {
  color: var(--font-color-contrast);
  background: var(--purple-color);
  border-color: var(--purple-color);
  flex: 1;
}

.cookie-consent__button--secondary {
  color: var(--font-color);
  background: var(--main-auxiliary);
  flex: 1;
}

.cookie-consent__button--ghost {
  width: 100%;
  color: color-mix(in srgb, var(--font-color) 55%, transparent);
  background: transparent;
  border-color: transparent;
  font-size: 0.77rem;
  text-align: center;
}

.cookie-consent__close {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--font-color);
  background: transparent;
  border: 1px solid var(--tertiary);
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.cookie-consent__close:hover {
  opacity: 1;
}

@media (max-width: 500px) {
  .cookie-consent {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    border-radius: 20px;
    padding: 1.1rem;
  }
}

.interrogation {
  border-radius: 1000px;
  border: 1px solid var(--font-color);
  color: var(--font-color);
  padding: 0 3px;
  font-size: 0.7em;
  opacity: 0.6;
}

.layout-wrapper {
  margin: auto;
  max-width: 1200px;
  margin-bottom: 10px;
}

/* Standard button */
.btn {
  cursor: pointer;
  padding: 8px 12px;
  list-style: none;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.btn:hover { opacity: 0.8; }

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--main-auxiliary);
  position: relative;
  margin-top: auto;
}

/* Amber crown line */
.site-footer::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--blue-color) 30%,
    var(--blue-color) 70%,
    transparent 100%);
  opacity: 0.55;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem; /* top padding lives inside .footer-expandable-inner */
}

/* ── Collapse / expand animation ── */
.footer-expandable {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-expandable-inner {
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  padding-top: 3rem;
  transition:
    opacity  0.5s ease                           0.1s,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}

.site-footer.is-expanded .footer-expandable {
  grid-template-rows: 1fr;
}

.site-footer.is-expanded .footer-expandable-inner {
  opacity: 1;
  transform: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.9fr 1fr 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}

/* Brand column */
.footer-brand__wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--purple-color);
  letter-spacing: -0.02em;
  line-height: 1;
}

.footer-brand__wordmark::after {
  content: '.';
  color: var(--blue-color);
}

.footer-brand__tagline {
  font-size: 0.78rem;
  color: var(--font-color);
  opacity: 0.7;
  margin: 0.65rem 0 0;
  line-height: 1.6;
  max-width: 22ch;
}

.footer-brand__email {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue-color);
  text-decoration: none;
  transition: opacity 0.18s;
}

.footer-brand__email:hover { opacity: 0.75; }

.footer-brand__email svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* Link columns */
.footer-col__label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--font-color);
  opacity: 0.65;
  margin-bottom: 0.85rem;
}

.footer-col__links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col__links a,
.footer-col__links .footer-link-button {
  font-size: 0.82rem;
  color: var(--font-color);
  opacity: 0.72;
  text-decoration: none;
  transition: opacity 0.15s, color 0.15s;
  width: fit-content;
}

.footer-col__links a:hover,
.footer-col__links .footer-link-button:hover {
  opacity: 1;
  color: var(--blue-color);
}

/* Social icons */
.footer-social {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--tertiary);
  color: var(--font-color);
  opacity: 0.65;
  text-decoration: none;
  transition: opacity 0.18s, border-color 0.18s, color 0.18s;
}

.footer-social__link:hover {
  opacity: 1;
  border-color: var(--blue-color);
  color: var(--blue-color);
}

.footer-social__link svg {
  display: block;
}

.footer-about-blurb {
  font-size: 0.74rem;
  color: var(--font-color);
  opacity: 0.7;
  line-height: 1.55;
  max-width: 20ch;
}

/* Bottom bar */
.footer-divider {
  height: 1px;
  background: var(--tertiary);
  margin: 2.25rem 0 0; /* bottom-bar provides its own top padding */
  opacity: 0.7;
}

.footer-bottom {
  padding: 1rem 0 1.75rem; /* visible in both collapsed and expanded states */
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-bottom__copy {
  font-size: 0.7rem;
  color: var(--font-color);
  opacity: 0.48;
}

.footer-bottom__links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom__links a,
.footer-bottom__links .footer-link-button {
  font-size: 0.7rem;
  color: var(--font-color);
  opacity: 0.38;
  text-decoration: none;
  transition: opacity 0.15s;
}

.footer-bottom__links a:hover,
.footer-bottom__links .footer-link-button:hover { opacity: 0.65; }

/* Responsive */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand__tagline { max-width: none; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-inner { padding: 2.5rem 1.25rem 1.75rem; }
}

/* ── App sidenav layout offset ───────────────────────────── */

@media (min-width: 768px) {
  body.has-app-sidenav > header#root,
  body.has-app-sidenav > .container,
  body.has-app-sidenav > .site-footer {
    margin-left: 240px;
  }
}
