/* =======================================================
   SEALAND COASTAL — Restoration Engineering Since 1992
   ======================================================= */

:root {
  /* Brand palette — deep ocean teal + warm sand */
  --teal-900: #06363b;
  --teal-800: #0a4a51;
  --teal-700: #0e6b75;
  --teal-600: #11868f;
  --teal-500: #1aa1aa;
  --teal-300: #6ad3d8;
  --teal-100: #d4f0f1;

  --sand-100: #f5efe3;
  --sand-200: #ece2cc;
  --sand-300: #d9c8a3;

  --gold-500: #c79a3e;
  --gold-400: #e3b65a;

  --ink-900: #0a1416;
  --ink-700: #213035;
  --ink-500: #4a5e64;
  --ink-300: #94a4a8;

  --bg: #fbfaf6;
  --surface: #ffffff;
  --surface-2: #f5efe3;
  --border: rgba(10, 74, 81, 0.12);

  --text: var(--ink-900);
  --text-muted: var(--ink-500);
  --accent: var(--teal-700);
  --accent-strong: var(--teal-800);

  /* Type */
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;
  --text-hero: clamp(2.75rem, 6vw, 5.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius / shadow */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(6, 54, 59, 0.06);
  --shadow: 0 4px 16px rgba(6, 54, 59, 0.08);
  --shadow-lg: 0 18px 60px rgba(6, 54, 59, 0.18);

  --container: 1240px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

[data-theme="dark"] {
  --bg: #050d0e;
  --surface: #0d1c1f;
  --surface-2: #0a1416;
  --border: rgba(106, 211, 216, 0.14);

  --text: #eef5f5;
  --text-muted: #93a8ac;
  --accent: var(--teal-300);
  --accent-strong: var(--teal-500);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--text);
}
.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}
.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: var(--space-6);
  max-width: 22ch;
}
.section-body {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
section { padding: var(--space-24) 0; }
@media (max-width: 768px) {
  section { padding: var(--space-16) 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
}
.btn--primary {
  background: var(--teal-700);
  color: #fff;
}
.btn--primary:hover {
  background: var(--teal-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
[data-theme="dark"] .btn--primary {
  background: var(--teal-300);
  color: var(--teal-900);
}
[data-theme="dark"] .btn--primary:hover { background: var(--teal-500); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--light { background: rgba(255,255,255,0.95); color: var(--teal-900); }
.btn--light:hover { background: #fff; transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-3) 0;
  background: rgba(251, 250, 246, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease-out);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
[data-theme="dark"] .nav { background: rgba(5, 13, 14, 0.85); }
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text);
}
.nav__logo svg { flex-shrink: 0; }
.nav__logo-text { letter-spacing: -0.01em; }

/* PNG logo (badge + wordmark composite) */
.brand-logo {
  display: block;
  height: auto;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-logo--nav { height: 56px; }
.brand-logo--footer { height: 88px; }
@media (max-width: 640px) {
  .brand-logo--nav { height: 44px; }
  .brand-logo--footer { height: 72px; }
}
/* On the dark footer background, lighten/whiten the logo so the navy reads */
.footer .brand-logo--footer {
  filter: brightness(0) invert(1);
}
[data-theme="dark"] .brand-logo {
  filter: brightness(0) invert(1);
}
.nav__menu {
  display: flex;
  gap: var(--space-8);
  align-items: center;
}
.nav__menu a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color 0.2s ease;
  font-weight: 500;
}
.nav__menu a:hover { color: var(--accent); }
.nav__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.nav__icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.25s ease;
}
.nav__icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.lang-wrap { position: relative; }
.lang-menu {
  position: absolute;
  right: 0;
  top: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  min-width: 180px;
  max-height: 60vh;
  overflow-y: auto;
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text);
  transition: background 0.2s ease;
}
.lang-menu button:hover { background: var(--surface-2); color: var(--accent); }
.lang-menu button[aria-current="true"] { color: var(--accent); font-weight: 600; }

.menu-toggle { display: none; }
@media (max-width: 900px) {
  .nav { padding: var(--space-3) var(--space-4); }
  .nav__menu {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--surface);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: var(--space-8) var(--space-6);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    border-top: 1px solid var(--border);
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__menu a { font-size: var(--text-lg); }
  .menu-toggle { display: inline-flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 var(--space-24);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,54,59,0.55) 0%, rgba(6,54,59,0.78) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 900px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  backdrop-filter: blur(10px);
}
.hero__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 8px var(--gold-400);
}
.hero__title {
  font-size: var(--text-hero);
  line-height: 1.05;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-6);
}
.hero__title em {
  font-style: italic;
  color: var(--gold-400);
  font-weight: 300;
}
.hero__subtitle {
  font-size: var(--text-xl);
  color: rgba(255,255,255,0.85);
  max-width: 60ch;
  margin-bottom: var(--space-10);
  line-height: 1.5;
}
.hero__cta-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats {
  background: var(--teal-900);
  color: #fff;
  padding: var(--space-12) 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-8);
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  line-height: 1;
  color: var(--gold-400);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.75);
}
@media (max-width: 768px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}

/* ============================================================
   PROBLEM
   ============================================================ */
.problem__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
.problem__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-lg);
}
.problem__media img {
  width: 100%; height: 100%; object-fit: cover;
}
.problem__cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.fact-card {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.fact-card:hover { transform: translateX(4px); border-left-color: var(--gold-500); }
.fact-card__num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--accent);
  margin-bottom: var(--space-1);
}
.fact-card__label { font-weight: 600; margin-bottom: var(--space-2); }
.fact-card__body { font-size: var(--text-sm); color: var(--text-muted); }
@media (max-width: 900px) {
  .problem__grid { grid-template-columns: 1fr; gap: var(--space-10); }
  .problem__media { aspect-ratio: 16 / 11; }
}

/* ============================================================
   PROCESS — 10 STEPS
   ============================================================ */
.process { background: var(--surface-2); }
.process__header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto var(--space-16);
}
.process__header .section-body { margin: 0 auto; }
.process__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  position: relative;
  transition: all 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.step:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-900);
  color: var(--gold-400);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.step__title {
  font-size: var(--text-lg);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: var(--space-2);
}
.step__body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   PHOTO GRID
   ============================================================ */
.photogrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-12);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.photogrid__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: auto;
}
.photogrid__item:nth-child(1) { grid-row: 1 / 3; aspect-ratio: 1 / 1; }
.photogrid__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.photogrid__item:hover img { transform: scale(1.05); }
.photogrid__item::after {
  content: attr(data-cap);
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  background: rgba(6,54,59,0.85);
  color: #fff;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.photogrid__item:hover::after { opacity: 1; }
@media (max-width: 768px) {
  .photogrid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .photogrid__item:nth-child(1) { grid-column: 1 / 3; grid-row: auto; aspect-ratio: 16/10; }
  .photogrid__item { aspect-ratio: 1/1; }
  .photogrid__item::after { opacity: 1; }
}

/* ============================================================
   PARTNERSHIP
   ============================================================ */
.partnership {
  position: relative;
  color: #fff;
  padding: var(--space-32) 0;
  overflow: hidden;
  background: var(--teal-900);
}
.partnership__bg {
  position: absolute; inset: 0; z-index: 0;
}
.partnership__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.partnership__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(6,54,59,0.85), rgba(6,54,59,0.6));
}
.partnership .container { position: relative; z-index: 1; }
.partnership .section-title { color: #fff; }
.partnership .section-body { color: rgba(255,255,255,0.85); }
.partnership .section-label { color: var(--gold-400); }
.partner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-10);
}
.partner-tag {
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
}

/* ============================================================
   RESTORED COAST
   ============================================================ */
.restored__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
.restored__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.restored__media img { width: 100%; height: 100%; object-fit: cover; }
.benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.benefit {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-base);
}
.benefit svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--accent);
  margin-top: 3px;
}
@media (max-width: 900px) {
  .restored__grid { grid-template-columns: 1fr; }
  .restored__media { aspect-ratio: 16/10; }
}

/* ============================================================
   TECHNOLOGY GRID
   ============================================================ */
.tech { background: var(--surface-2); }
.tech__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-12);
}
.tech-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tech-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tech-card__icon {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-100);
  color: var(--accent-strong);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}
[data-theme="dark"] .tech-card__icon { background: rgba(106, 211, 216, 0.12); color: var(--teal-300); }
.tech-card__icon svg { width: 24px; height: 24px; }
.tech-card__title {
  font-size: var(--text-lg);
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.tech-card__body { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   IMPACT / TESTIMONIALS
   ============================================================ */
.impact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}
@media (max-width: 900px) {
  .impact__grid { grid-template-columns: 1fr; }
}
.impact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.impact-card__quote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 var(--space-6) 0;
  font-style: italic;
}
.impact-card figcaption { margin: 0; }
.impact-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.impact-card__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.impact-card__name { font-weight: 600; font-size: var(--text-sm); }
.impact-card__role { font-size: var(--text-xs); color: var(--text-muted); }

/* ============================================================
   HERITAGE
   ============================================================ */
.heritage__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
@media (max-width: 900px) {
  .heritage__grid { grid-template-columns: 1fr; gap: var(--space-10); }
}
.heritage__timeline {
  margin-top: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-4);
  align-items: start;
}
.timeline-dot {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--accent);
  border-right: 2px solid var(--border);
  padding-right: var(--space-3);
}
.timeline-item h4 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-item p { font-size: var(--text-sm); color: var(--text-muted); margin: 0; }

.heritage__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.heritage__photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
}
.heritage__photo--wide { grid-column: 1 / 3; aspect-ratio: 16 / 9; }
.heritage__photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.heritage__photo:hover img { transform: scale(1.04); }
.heritage__photo-caption {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  right: var(--space-3);
  background: rgba(6,54,59,0.88);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s ease;
}
.heritage__photo:hover .heritage__photo-caption {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 900px) {
  .heritage__grid { grid-template-columns: 1fr; gap: var(--space-10); }
  .heritage__photo-caption { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: var(--teal-900);
  color: #fff;
  text-align: center;
  padding: var(--space-24) 0;
}
.cta-band .section-title { color: #fff; margin: 0 auto var(--space-6); }
.cta-band .section-body { color: rgba(255,255,255,0.8); margin: 0 auto var(--space-8); text-align: center; }
.cta-band .hero__cta-group { justify-content: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #050d0e;
  color: rgba(255,255,255,0.65);
  padding: var(--space-16) 0 var(--space-8);
  font-size: var(--text-sm);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
.footer h5 {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0 0 var(--space-4);
}
.footer ul { display: flex; flex-direction: column; gap: var(--space-2); }
.footer a:hover { color: var(--teal-300); }
.footer__brand p { margin: var(--space-4) 0; max-width: 36ch; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
}
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  * { animation: none !important; transition: none !important; }
}

/* RTL support for Arabic */
[dir="rtl"] .fact-card { border-left: none; border-right: 3px solid var(--accent); }
[dir="rtl"] .fact-card:hover { transform: translateX(-4px); }
[dir="rtl"] .timeline-dot { border-right: none; border-left: 2px solid var(--border); padding-right: 0; padding-left: var(--space-3); }
[dir="rtl"] .timeline-item { grid-template-columns: 1fr 80px; }

/* ===========================================================
   Project gallery + lightbox
   =========================================================== */
.gallery {
  margin-top: var(--space-16);
  padding-top: var(--space-12);
  border-top: 1px solid var(--border);
}
.gallery__head { max-width: 760px; margin-bottom: var(--space-8); }
.gallery__filters {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.gallery__filter {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.01em;
}
.gallery__filter:hover { border-color: var(--accent); color: var(--accent); }
.gallery__filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
[data-theme="dark"] .gallery__filter.is-active { color: #061418; }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}
.gallery__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.25);
}
.gallery__item img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.85rem 0.95rem 0.75rem;
  background: linear-gradient(to top, rgba(11,58,111,0.92), rgba(11,58,111,0));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.gallery__item:hover figcaption,
.gallery__item:focus-visible figcaption {
  opacity: 1; transform: translateY(0);
}
.gallery__item.is-hidden { display: none; }
.gallery__credit {
  margin-top: var(--space-8);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(5, 11, 20, 0.94);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: var(--space-6);
}
.lightbox[hidden] { display: none; }
.lightbox__inner {
  margin: 0;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-3);
}
.lightbox__inner img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 60px -10px rgba(0,0,0,0.6);
}
.lightbox__inner figcaption {
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-align: center;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s ease, transform 0.18s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,0.18); }
.lightbox__close { top: 24px; right: 24px; }
.lightbox__nav--prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox__nav--next:hover { transform: translateY(-50%) translateX(2px); }

@media (max-width: 640px) {
  .gallery__grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-3); }
  .gallery__item figcaption { font-size: 0.72rem; padding: 0.6rem 0.6rem 0.5rem; opacity: 1; transform: none; }
  .lightbox__close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lightbox__nav { width: 40px; height: 40px; font-size: 1.3rem; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}
