/* FRIM project page — g Canandé layout, Sastena chrome */

.g-project {
  --g-bg: #0f1010;
  --g-text: #f5f7f6;
  --g-muted: rgba(245, 247, 246, 0.72);
  --g-lime: #87ed7b;
  --g-blue: #7ec8e3;
  --g-badge-carbon: #7adff1;
  --g-badge-conservation: #81ef7f;
  --g-badge-reforestation: #fcf6bc;
  --g-badge-partner: rgba(255, 254, 249, 0.94);
  --g-badge-type-text: #0f1010;
  --g-badge-partner-text: #0f1010;
  --g-glass: rgba(255, 255, 255, 0.067);
  --g-radius: 16px;
  --g-overlay: linear-gradient(0deg, rgb(15, 16, 16) 0%, rgba(15, 16, 16, 0) 20%, rgba(15, 16, 16, 0) 40%, rgb(15, 16, 16) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%);
}

body.s-home.g-project {
  background: var(--g-bg);
  color: var(--g-text);
}

body.g-project > footer:not(.s-footer) {
  display: none;
}

.g-project .s-header .s-nav-shell {
  background: rgba(15, 16, 16, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.g-main {
  padding-top: 0;
}

.g-container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* Shared background overlay technique — full viewport width */
.g-bg-overlay {
  position: relative;
  isolation: isolate;
}

.g-bg-overlay::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-image: var(--g-overlay), var(--section-bg);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.g-bg-overlay > * {
  position: relative;
  z-index: 1;
}

.g-glass {
  background: var(--g-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--g-radius);
}

.g-headline {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--g-text);
}

.g-headline .g-accent {
  color: var(--g-lime);
}

.g-body {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--g-muted);
}

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--g-lime);
  color: #0f1010;
  font: 700 0.95rem/1.2 inherit;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.g-btn:hover {
  transform: translateY(-1px);
  background: #9ef392;
}

.g-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

/* Hero */
.g-hero {
  --section-bg: url("assets/web/drone/drone-12.jpg");
  min-height: clamp(620px, 78vh, 780px);
  display: flex;
  align-items: stretch;
  padding: clamp(108px, 14vw, 140px) 0 clamp(48px, 8vw, 72px);
}

.g-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: end;
  width: 100%;
  min-height: clamp(420px, 52vh, 560px);
}

.g-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: end;
  max-width: min(100%, 560px);
  padding-left: clamp(12px, 3vw, 48px);
}

.g-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0;
  color: var(--g-text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.g-location svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.g-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.g-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  background: var(--g-badge-conservation);
  color: var(--g-badge-type-text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.g-tag-icon {
  box-sizing: border-box;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: contain;
}

.g-tag svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.g-tag--carbon {
  background: var(--g-badge-carbon);
}

.g-tag--conservation {
  background: var(--g-badge-conservation);
}

.g-tag--reforestation {
  background: var(--g-badge-reforestation);
}

.g-tag--partner {
  background: var(--g-badge-partner);
  color: var(--g-badge-partner-text);
}

.g-hero-title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: var(--g-text);
}

.g-hero-media {
  justify-self: end;
  width: min(100%, 560px);
}

.g-hero-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
  align-items: end;
}

.g-hero-media-grid img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  display: block;
}

/* FRIM team photo — spans impact through stakeholders */
.g-frim-band {
  --section-bg: url("assets/web/kbg/frim-canopy.jpeg");
}

.g-frim-band.g-bg-overlay::before {
  background-size: 100% 100%, contain;
  background-position: center, center top;
}

.g-frim-band .g-context,
.g-frim-band .g-gallery {
  background: transparent;
}

/* Impact */
.g-impact {
  padding: 64px 0 72px;
}

.g-impact .g-headline {
  margin-bottom: 28px;
}

.g-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.g-metric {
  padding: 16px;
}

.g-metric--text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  padding: 24px 28px;
}

.g-metric-value {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--g-lime);
}

.g-metric-label {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--g-muted);
}

.g-metric-note {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(245, 247, 246, 0.55);
}

.g-metric-kbg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Context */
.g-context {
  padding: 64px 0;
  background: var(--g-bg);
}

.g-context-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.g-context-card {
  padding: 28px;
}

.g-context-card .g-body {
  color: rgba(245, 247, 246, 0.88);
}

/* Gallery */
.g-gallery {
  padding: 48px 0 64px;
  background: var(--g-bg);
}

.g-gallery .g-headline {
  margin-bottom: 24px;
}

.g-gallery-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.g-gallery-item {
  flex: 0 0 min(78vw, 320px);
  scroll-snap-align: start;
  overflow: hidden;
  height: 240px;
  margin: 0;
  cursor: zoom-in;
}

.g-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.g-gallery-item--portrait img {
  object-fit: contain;
  background: rgba(15, 16, 16, 0.55);
}

.g-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(15, 16, 16, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.g-gallery-lightbox[hidden] {
  display: none;
}

.g-gallery-lightbox__img {
  max-width: min(100%, 960px);
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5);
}

.g-gallery-lightbox__close {
  position: absolute;
  top: clamp(12px, 3vw, 24px);
  right: clamp(12px, 3vw, 24px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--g-text);
  font: 400 1.5rem/1 inherit;
  cursor: pointer;
  transition: background 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.g-gallery-lightbox__close svg {
  display: block;
}

.g-gallery-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Stakeholders */
.g-stakeholders {
  padding: 72px 0;
}

.g-stakeholders-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.g-stakeholders-head .g-headline {
  margin-bottom: 10px;
}

.g-stakeholders .g-subhead {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--g-text);
}

.g-stakeholders-body {
  display: block;
}

.g-stakeholders-card {
  padding: 28px;
}

.g-stakeholders-card .g-body + .g-body {
  margin-top: 16px;
}

.g-stakeholders-partner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 360px;
}

.g-stake-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--g-text);
}

.g-partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 28px 32px;
  border-radius: var(--g-radius);
  background: rgba(255, 255, 255, 0.94);
}

.g-partner-logo img {
  width: 100%;
  max-width: 220px;
  max-height: 72px;
  object-fit: contain;
}

/* Objectives */
.g-objectives {
  padding: 72px 0;
  background: var(--g-bg);
}

.g-objectives-intro {
  max-width: 680px;
  margin: 14px 0 32px;
}

.g-objective-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.g-objective {
  padding: 28px;
}

.g-objective img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 22px;
}

.g-objective h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--g-text);
}

.g-objective p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--g-muted);
}

/* SDG */
.g-sdg {
  --section-bg: url("assets/web/drone/drone-09.jpg");
  padding: 72px 0;
}

.g-sdg .g-headline {
  margin-bottom: 10px;
}

.g-sdg .g-body {
  max-width: 640px;
  margin-bottom: 28px;
}

.g-sdg-icons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px;
  max-width: 100%;
}

.g-sdg-icons a {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.18s ease;
}

.g-sdg-icons a:hover {
  transform: translateY(-2px);
}

.g-sdg-icons img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
}

/* Contact CTA */
.g-contact {
  padding: 72px 24px 88px;
  background: var(--g-lime);
  color: #0f1010;
  text-align: center;
}

.g-contact .g-headline {
  color: #0f1010;
  max-width: 18ch;
  margin: 0 auto;
}

.g-contact .g-body {
  max-width: 540px;
  margin: 14px auto 0;
  color: rgba(15, 16, 16, 0.78);
}

.g-contact .g-btn {
  margin-top: 24px;
  background: #0f1010;
  color: var(--g-text);
}

.g-contact .g-btn:hover {
  background: #1a1c1b;
}

@media (max-width: 900px) {
  .g-container {
    width: min(100% - 36px, 1180px);
  }

  .g-hero-grid,
  .g-two-col,
  .g-metrics,
  .g-objective-grid {
    grid-template-columns: 1fr;
  }

  .g-hero-media {
    justify-self: start;
    width: min(100%, 420px);
  }

  .g-hero-media-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .g-hero-copy {
    padding-left: 0;
  }

  .g-hero-title {
    max-width: none;
  }

  .g-gallery-item {
    flex-basis: min(85vw, 280px);
  }
}
