/* ===========================================================================
   Green Building Council of Mauritius
   Bootstrap 5.3 + this file. Ratio by design: mostly white and grey,
   one pale green band, saturated green reserved for actions.
   =========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  --white:      #FFFFFF;
  --paper:      #F5F5F1;   /* warm neutral alternate band  */
  --mint:       #E7F0E6;   /* the one pale green band      */
  --ink:        #14201A;   /* headings                     */
  --body:       #384039;   /* body copy                    */
  --muted:      #5C6560;   /* meta, captions               */
  --border:     #E3E5DF;
  --green:      #1F7A4D;   /* actions, links               */
  --green-dark: #0F3B27;   /* dark bands, headings         */
  --green-deep: #0A2A1B;   /* footer                       */

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --font-editorial: "Newsreader", Georgia, serif;

  --t-hero: clamp(2.3rem, 5vw, 3.9rem);
  --t-h2:   clamp(1.65rem, 3vw, 2.4rem);
  --t-h3:   1.2rem;
  --t-stat: clamp(2.4rem, 4.6vw, 3.6rem);

  --shell: 1160px;
  --bar-h: 2.25rem;
  --nav-h: 4.5rem;
}

/* --- 2. Bootstrap overrides ---------------------------------------------- */
:root {
  --bs-body-bg: var(--white);
  --bs-body-color: var(--body);
  --bs-body-font-family: var(--font-body);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.7;
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--border);
  --bs-link-color: var(--green);
  --bs-link-hover-color: var(--green-dark);
  --bs-link-color-rgb: 31, 122, 77;
  --bs-primary-rgb: 31, 122, 77;
  --bs-border-radius: 0.25rem;
  --bs-border-radius-sm: 0.1875rem;
  --bs-border-radius-lg: 0.375rem;
  --bs-focus-ring-color: rgba(31, 122, 77, 0.35);
}

/* --- 3. Base ------------------------------------------------------------- */
body { -webkit-font-smoothing: antialiased; }
em { font-family: var(--font-editorial); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

p { text-wrap: pretty; }
::selection { background: var(--green); color: #fff; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.85rem;
}

.caption { font-size: 0.8rem; color: var(--muted); }

.hero > .caption {
  font-size: 0.7rem;
  line-height: 1.5;
  margin-block: 0 !important;
  padding-block: 0.85rem;
}

/* --- 4. Bands ------------------------------------------------------------
   One padding rule. Backgrounds do the separating, so there are no
   dividers, boxes or shadows anywhere in this stylesheet.
   ------------------------------------------------------------------------- */
.band { padding-block: clamp(3.5rem, 7.5vw, 6.5rem); }
.band--tight { padding-block: clamp(2.5rem, 4.5vw, 3.75rem); }
.band--paper { background: var(--paper); }
.band--mint { background: var(--mint); }
.band--dark { background: var(--green-dark); }
.band--dark h2, .band--dark h3 { color: #fff; }
.band--dark p { color: rgba(255, 255, 255, 0.78); }
.band--dark .eyebrow { color: #9FD9B6; }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: var(--t-h2); }
.section-head p { margin: 1rem 0 0; }

/* --- 5. Announcement bar + header ---------------------------------------- */
.announce {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  min-height: var(--bar-h);
  display: flex;
  align-items: center;
}

.announce .shell {
  position: relative;
  justify-content: center !important;
  text-align: center;
}
.announce a {
  position: absolute;
  right: clamp(1.25rem, 4vw, 2.5rem);
  color: #fff;
  text-underline-offset: 3px;
}

@media (max-width: 575.98px) {
  .announce .shell { flex-direction: column; padding-block: 0.35rem; }
  .announce a { position: static; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-header .navbar { min-height: var(--nav-h); padding: 0; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-logo { display: block; width: auto; height: 64px; object-fit: contain; }

@media (max-width: 575.98px) {
  .brand-logo { height: 54px; }
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
}

.brand-name span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.site-nav .nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--body);
  padding: 0.5rem 0.85rem;
}

.site-nav .nav-link:hover { color: var(--green); }
.site-nav .nav-link.active { color: var(--green-dark); font-weight: 600; }

.navbar-toggler { border: 1px solid var(--border); padding: 0.4rem 0.55rem; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%2314201A' stroke-width='2' stroke-linecap='round' d='M4 8h22M4 15h22M4 22h22'/%3E%3C/svg%3E");
}

@media (max-width: 991.98px) {
  .site-nav .navbar-collapse { padding: 0.5rem 0 1rem; }
  .site-nav .nav-link { padding: 0.6rem 0; }
}

/* --- 6. Buttons ---------------------------------------------------------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  border-radius: 0.25rem;
}

.btn-green { background: var(--green); color: #fff; border: 1px solid var(--green); }
.btn-green:hover, .btn-green:focus { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

.btn-outline-green { background: transparent; color: var(--green-dark); border: 1px solid var(--border); }
.btn-outline-green:hover, .btn-outline-green:focus { border-color: var(--green-dark); color: var(--green-dark); background: transparent; }

.btn-on-dark { background: #fff; color: var(--green-dark); border: 1px solid #fff; }
.btn-on-dark:hover, .btn-on-dark:focus { background: transparent; color: #fff; }

.link-arrow {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--green);
  text-decoration: none;
}
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { color: var(--green-dark); }

/* --- 7. Hero -------------------------------------------------------------
   The single deliberate rule-break on the page: the white card overlaps
   the photograph's bottom edge instead of sitting inside the band.
   ------------------------------------------------------------------------- */
.hero { position: relative; background: var(--white); }

.hero-figure {
  position: relative;
  height: clamp(28rem, 58vw, 43rem);
  overflow: hidden;
  isolation: isolate;
}
.hero-figure img,
.louvre-scene { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero > div.shell {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.louvre-shadow {
  mix-blend-mode: multiply;
  will-change: transform;
  animation: louvre-sun-path 36s linear forwards;
}

@keyframes louvre-sun-path {
  from { transform: translateX(-900px); }
  to { transform: translateX(2000px); }
}

.hero-credit {
  position: absolute;
  right: clamp(1rem, 4vw, 2.5rem);
  bottom: 0.6rem;
  font-size: 0.72rem;
  color: rgba(20, 32, 26, 0.62);
}

.hero-card {
  position: relative;
  background: rgba(250, 249, 244, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  margin-top: 0;
  transform: translateX(clamp(-3rem, -3vw, -1.5rem));
  padding: clamp(1.75rem, 3.5vw, 2.65rem);
  max-width: 44rem;
  pointer-events: auto;
}

@media (max-width: 767.98px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-figure,
  .hero > div.shell {
    grid-area: 1 / 1;
  }
  .hero-figure {
    height: 100%;
    min-height: 31rem;
  }
  .hero > div.shell {
    position: relative;
    inset: auto;
    align-items: flex-start;
    padding-block: 2rem;
  }
  .hero > .caption {
    grid-row: 2;
  }
  .hero-card {
    margin-top: 0;
    transform: none;
  }
}

.hero-card h1 { font-size: var(--t-hero); font-weight: 700; letter-spacing: -0.03em; }
.hero-card p { margin: 1.25rem 0 0; }

@media (min-width: 768px) {
  .hero-card .lede {
    font-size: clamp(0.95rem, 1.2vw, 1.08rem);
    white-space: nowrap;
  }
}

/* --- 8. Pillars ---------------------------------------------------------- */
.pillars { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.pillar { display: flex; flex-direction: column; }
.pillar h3 { font-size: 1.45rem; margin: 1.1rem 0 0.6rem; }
.pillar p { color: var(--muted); font-size: 1rem; }
.pillar .link-arrow { margin-top: auto; padding-top: 0.75rem; align-self: flex-start; }

.pillar-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green-dark);
  display: grid;
  place-items: center;
}

.band--mint .pillar-mark { background: var(--white); }
.pillar-mark svg { width: 1.6rem; height: 1.6rem; }

/* --- 9. News cards ------------------------------------------------------- */
.news-section { padding-block: clamp(2.5rem, 4.5vw, 4rem); }
.news-section-head {
  margin-inline: auto;
  margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
  text-align: center;
}
.news-section-head .lede { margin-inline: auto; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}
.news-card {
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--white);
  border-top: 4px solid var(--green);
}
.news-image-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  aspect-ratio: 16 / 10;
  margin-bottom: 1.35rem;
  background: var(--paper);
  color: #8b958f;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.news-image-placeholder svg { width: 2.75rem; height: 2.75rem; stroke-width: 1.4; }
.news-card time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.news-card h2 { margin: 1.25rem 0 0.8rem; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.news-card p { margin: 0 0 1.5rem; color: var(--muted); }
.news-card .link-arrow { margin-top: auto; align-self: flex-start; }

@media (max-width: 767.98px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card { min-height: 0; }
}

/* --- 10. Cards ----------------------------------------------------------- */
.card-grid { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.tile { display: flex; flex-direction: column; text-decoration: none; }
.tile-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.tile:hover .tile-img img { transform: scale(1.04); }
.tile-date { margin: 1rem 0 0.4rem; font-size: 0.8rem; color: var(--muted); }
.tile h3 { font-size: var(--t-h3); margin: 0 0 0.5rem; }
.tile p { color: var(--muted); font-size: 0.98rem; margin: 0 0 0.9rem; }
.tile .link-arrow { margin-top: auto; align-self: flex-start; }

/* --- Featured projects image strip ------------------------------------- */
.project-strip { background: var(--paper); overflow: hidden; }
.project-strip-head {
  padding-block: clamp(2rem, 3.5vw, 3rem);
  text-align: center;
}
.project-strip-head h2 { margin: 0 0 0.75rem; font-size: var(--t-h2); }
.project-strip-head p { margin: 0 auto; }
.project-gallery-window { position: relative; overflow: hidden; }
.project-gallery-track {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  width: 240%;
  transform: translateX(calc(var(--project-index, 1) * -8.3333333%));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-gallery-track.is-resetting { transition: none; }
.project-gallery-track img {
  width: 100%;
  height: clamp(18rem, 24vw, 28rem);
  display: block;
  object-fit: cover;
  filter: grayscale(0);
  transition: filter 0.55s ease;
}
.project-gallery-track img:hover { filter: grayscale(1); }
.project-strip-control {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(2.5rem, calc(5vw - 8px), 4rem);
  height: auto;
  border: 0;
  border-radius: 0;
  color: #fff;
  font-size: 1.2rem;
  opacity: 0.72;
  transition: opacity 0.25s ease, background-color 0.25s ease;
  background: rgba(10, 42, 27, 0.48);
}
.project-strip-control--prev { left: 0; }
.project-strip-control--next { right: 0; }
.project-strip:hover .project-strip-control,
.project-strip-control:focus-visible {
  opacity: 1;
  background: rgba(10, 42, 27, 0.68);
}

@media (max-width: 767.98px) {
  .project-gallery-track { min-width: 54rem; }
  .project-strip-control { opacity: 1; }
}

/* --- 11. Split call to action -------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; } }
.split > * { padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem); }
.split-a { background: var(--mint); }
.split-b { background: var(--green-dark); }
.split-b h2, .split-b h3 { color: #fff; }
.split-b p { color: rgba(255, 255, 255, 0.78); }
.split h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }

/* --- 12. Definition rows -------------------------------------------------- */
.rows { border-top: 1px solid var(--border); }
.row-item { border-bottom: 1px solid var(--border); padding: 1.6rem 0; display: grid; gap: 0.4rem 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .row-item { grid-template-columns: 15rem 1fr; } }
.row-item h3 { font-size: 1.1rem; margin: 0; }
.row-item p { margin: 0; color: var(--muted); }

/* --- 13. Forms ----------------------------------------------------------- */
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; }
.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--white);
}
.form-control:focus, .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.14);
}
.form-control::placeholder { color: #9AA39C; }

/* --- 14. Footer ---------------------------------------------------------- */
.site-footer { background: var(--green-deep); color: rgba(255, 255, 255, 0.66); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.site-footer a { color: rgba(255, 255, 255, 0.86); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h4 { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.about-worldgbc { display: block; width: min(100%, 7.5rem); margin: 2.5rem auto 0; }
.about-worldgbc img { display: block; width: 100%; height: auto; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.16); margin-top: 2.5rem; padding-top: 1.5rem; font-size: 0.85rem; }

/* --- 15. Motion ---------------------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js [data-reveal].shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .tile:hover .tile-img img { transform: none; }
  .louvre-shadow { animation: none; transform: translateX(2000px); }
}

/* --- 16. Accordion (Bootstrap component, re-tokenised) ------------------- */
.accordion {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: var(--border);
  --bs-accordion-border-radius: 0;
  --bs-accordion-inner-border-radius: 0;
  --bs-accordion-btn-color: var(--ink);
  --bs-accordion-btn-bg: transparent;
  --bs-accordion-active-bg: transparent;
  --bs-accordion-active-color: var(--green);
  --bs-accordion-btn-padding-x: 0;
  --bs-accordion-btn-padding-y: 1.15rem;
  --bs-accordion-body-padding-x: 0;
  --bs-accordion-body-padding-y: 0;
  --bs-accordion-btn-focus-box-shadow: none;
}
.accordion-button { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.accordion-item { border-left: 0; border-right: 0; }
.accordion-body { color: var(--muted); padding-bottom: 1.4rem; max-width: 66ch; }

/* --- 17. Anchor offset for the sticky header ----------------------------- */
[id] { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
