/* ============================================================
   Creative Power Engineers — Design System
   Classy, modern, editorial. Ink navy + signal red.
   ============================================================ */

:root {
  --ink: #0e1320;
  --ink-2: #161d2e;
  --ink-3: #1f2840;
  --paper: #f7f6f2;
  --paper-2: #efede6;
  --white: #ffffff;
  --red: #e23a2e;
  --red-deep: #b8281e;
  --gold: #c9a45c;
  --text: #2a3040;
  --text-soft: #5b6378;
  --text-on-dark: #c9cfdd;
  --line: rgba(14, 19, 32, 0.12);
  --line-on-dark: rgba(255, 255, 255, 0.12);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --radius: 18px;
  --shadow-soft: 0 20px 60px -25px rgba(14, 19, 32, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Typography ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1.5px;
  background: var(--red);
}

.section-title { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 18px; }
.section-lede { max-width: 640px; color: var(--text-soft); font-size: 18px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.scrolled {
  background: rgba(14, 19, 32, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--red);
  display: grid; place-items: center;
  color: var(--red);
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-tag {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-on-dark);
}

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
  transition: color 0.25s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--white); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: 999px;
  transition: background 0.25s, transform 0.25s;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--red-deep); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 40px; height: 40px;
  position: relative;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  margin: 5px auto;
  transition: 0.3s var(--ease);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(10, 14, 25, 0.93) 0%, rgba(10, 14, 25, 0.72) 45%, rgba(10, 14, 25, 0.35) 100%),
    var(--ink-2) url("../assets/img/hero-substation.jpg") center / cover no-repeat;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(to top, var(--paper), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; padding: 160px 0 140px; max-width: 760px; }
.hero h1 {
  color: var(--white);
  font-size: clamp(40px, 6vw, 72px);
  margin-bottom: 26px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero p {
  font-size: clamp(17px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-deep); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.4); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-3); }

.hero-badges {
  display: flex;
  gap: 28px;
  margin-top: 64px;
  flex-wrap: wrap;
}
.hero-badge {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------- Stats band ---------- */

.stats-band {
  position: relative;
  z-index: 2;
  margin-top: -70px;
}
.stats-grid {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.stat {
  padding: 40px 34px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.stat-value sup { font-size: 0.5em; color: var(--red); }
.stat-label {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ---------- Sections ---------- */

.section { padding: 110px 0; }
.section-dark {
  background: var(--ink);
  color: var(--text-on-dark);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .section-lede { color: var(--text-on-dark); }
.section-tinted { background: var(--paper-2); }

.section-head { margin-bottom: 64px; }
.section-head.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

/* ---------- Service cards ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 38px 34px;
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.card:hover::before { transform: scaleY(1); }
.card-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: rgba(226, 58, 46, 0.09);
  color: var(--red);
  display: grid; place-items: center;
  margin-bottom: 24px;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 22px; margin-bottom: 12px; }
.card p { color: var(--text-soft); font-size: 15.5px; }
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-weight: 600;
  font-size: 14px;
  color: var(--red);
}

.section-dark .card {
  background: var(--ink-2);
  border-color: var(--line-on-dark);
}
.section-dark .card h3 { color: var(--white); }
.section-dark .card p { color: var(--text-on-dark); }

/* ---------- Feature split ---------- */

.split-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 70px;
  align-items: center;
}
.figure {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3.2;
  background:
    linear-gradient(160deg, rgba(31, 40, 64, 0.25), rgba(14, 19, 32, 0.45)),
    var(--ink-3) center / cover no-repeat;
  box-shadow: var(--shadow-soft);
}
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure-caption {
  position: absolute;
  left: 22px; bottom: 22px;
  background: rgba(14, 19, 32, 0.78);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 10px 18px;
  border-radius: 999px;
}

.checklist { list-style: none; margin-top: 30px; display: grid; gap: 16px; }
.checklist li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 16px;
}
.checklist .tick {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(226, 58, 46, 0.1);
  color: var(--red);
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.checklist .tick svg { width: 12px; height: 12px; }

/* ---------- Clients ---------- */

.clients-strip { padding: 70px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.clients-label {
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 36px;
}
.clients-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 46px;
}
.client-name {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--ink);
  opacity: 0.55;
  transition: opacity 0.25s;
  white-space: nowrap;
}
.client-name:hover { opacity: 1; }

/* ---------- Projects ---------- */

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.filter-btn {
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: 0.25s;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.active { background: var(--ink); color: var(--white); border-color: var(--ink); }

.projects-list { display: grid; gap: 14px; }
.project-row {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 26px;
  align-items: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.project-row:hover { transform: translateX(4px); box-shadow: var(--shadow-soft); }
.project-rating {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--red);
  line-height: 1.25;
}
.project-scope { font-size: 15px; color: var(--text); }
.project-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.project-meta span { display: inline-flex; align-items: center; gap: 6px; }
.project-badge {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-public { background: rgba(31, 40, 64, 0.08); color: var(--ink-3); }
.badge-private { background: rgba(201, 164, 92, 0.16); color: #8a6a2c; }
.badge-progress { background: rgba(226, 58, 46, 0.1); color: var(--red-deep); }

.projects-count { font-size: 14px; color: var(--text-soft); margin-bottom: 20px; }

/* Featured project cards (home) */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.featured-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--ink-3) center / cover no-repeat;
  isolation: isolate;
}
.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 25, 0.92) 8%, rgba(10, 14, 25, 0.25) 55%, rgba(10, 14, 25, 0.15));
  z-index: -1;
  transition: background 0.35s;
}
.featured-card .fc-body { padding: 30px; }
.featured-card .fc-kicker {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.featured-card h3 { color: var(--white); font-size: 21px; margin-bottom: 8px; }
.featured-card p { font-size: 14px; color: rgba(255, 255, 255, 0.75); }

/* ---------- Timeline ---------- */

.timeline { position: relative; margin-top: 20px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--red), rgba(226, 58, 46, 0.15));
}
.timeline-item {
  position: relative;
  padding: 0 0 42px 44px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--red);
}
.timeline-year {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.timeline-item p { color: var(--text-soft); margin-top: 6px; max-width: 560px; }

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.team-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.team-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 24px;
  display: grid; place-items: center;
  margin-bottom: 20px;
}
.team-card h3 { font-size: 20px; }
.team-role {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin: 6px 0 14px;
  font-weight: 600;
}
.team-card p { font-size: 14.5px; color: var(--text-soft); }

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  counter-reset: step;
}
.process-step {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--ink-2);
  border: 1px solid var(--line-on-dark);
}
.process-step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.12);
  display: block;
  line-height: 1;
  margin-bottom: 16px;
}
.process-step h3 { font-size: 18px; margin-bottom: 8px; }
.process-step p { font-size: 14px; }

/* ---------- CTA band ---------- */

.cta-band {
  background:
    linear-gradient(110deg, rgba(14, 19, 32, 0.95), rgba(14, 19, 32, 0.75)),
    var(--ink-2) url("../assets/img/cta-towers.jpg") center / cover no-repeat;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(50px, 7vw, 90px);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); font-size: clamp(28px, 3.6vw, 42px); max-width: 540px; }
.cta-band p { color: rgba(255, 255, 255, 0.72); margin-top: 12px; max-width: 480px; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
  align-items: start;
}
.contact-item { display: flex; gap: 18px; margin-bottom: 30px; }
.contact-item .ci-icon {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(226, 58, 46, 0.09);
  color: var(--red);
  display: grid; place-items: center;
}
.contact-item .ci-icon svg { width: 22px; height: 22px; }
.contact-item h3 { font-size: 17px; margin-bottom: 4px; }
.contact-item p, .contact-item a { color: var(--text-soft); font-size: 15.5px; }
.contact-item a:hover { color: var(--red); }

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 44px;
  box-shadow: var(--shadow-soft);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--text);
  background: var(--paper);
  transition: border-color 0.25s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--red);
}
.field textarea { resize: vertical; min-height: 130px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 80px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 50px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-grid h4 {
  color: var(--white);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.footer-grid ul { list-style: none; display: grid; gap: 12px; }
.footer-grid a { font-size: 15px; transition: color 0.25s; }
.footer-grid a:hover { color: var(--white); }
.footer-about p { font-size: 15px; margin-top: 18px; max-width: 320px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 32px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  background:
    linear-gradient(120deg, rgba(10, 14, 25, 0.94), rgba(10, 14, 25, 0.7)),
    var(--ink-2) url("../assets/img/page-hero-lines.jpg") center / cover no-repeat;
  color: var(--white);
  padding: 190px 0 100px;
}
.page-hero h1 { color: var(--white); font-size: clamp(36px, 5vw, 58px); max-width: 720px; }
.page-hero p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  max-width: 600px;
  margin-top: 20px;
}

/* ---------- Gallery ---------- */

.masonry {
  columns: 3;
  column-gap: 22px;
}
.masonry-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 22px;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--ink-3);
  isolation: isolate;
}
.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease);
}
.masonry-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 25, 0.75) 0%, transparent 38%);
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 1;
}
.masonry-item .mi-caption {
  position: absolute;
  left: 18px; right: 18px; bottom: 14px;
  color: var(--white);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
  z-index: 2;
}
.masonry-item:hover img { transform: scale(1.04); }
.masonry-item:hover::after, .masonry-item:hover .mi-caption { opacity: 1; transform: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 14, 25, 0.96);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(1200px, 88vw);
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
}
.lb-caption {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14.5px;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 80vw;
}
.lb-counter {
  position: absolute;
  top: 28px;
  left: 36px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  letter-spacing: 0.18em;
}
.lb-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background 0.25s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-close { top: 24px; right: 32px; }
.lb-prev { left: 32px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 32px; top: 50%; transform: translateY(-50%); }

@media (max-width: 1020px) { .masonry { columns: 2; } }
@media (max-width: 620px) {
  .masonry { columns: 1; }
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
}

/* ---------- Document list (annual returns / downloads) ---------- */

.doc-list { display: grid; gap: 14px; max-width: 780px; }
.doc-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.doc-row:hover { transform: translateX(4px); box-shadow: var(--shadow-soft); }
.doc-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(226, 58, 46, 0.09);
  color: var(--red);
  display: grid;
  place-items: center;
}
.doc-icon svg { width: 22px; height: 22px; }
.doc-row h3 { font-size: 17px; }
.doc-row .doc-meta { font-size: 13.5px; color: var(--text-soft); margin-top: 3px; }
.doc-row .btn { margin-left: auto; padding: 10px 22px; font-size: 14px; flex-shrink: 0; }

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .cards-grid, .featured-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(even) { border-right: 0; }
  .stat:nth-child(n+3) { border-bottom: 0; }
  .split-grid, .contact-grid { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed;
    inset: 0;
    background: rgba(14, 19, 32, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }
  .nav.open { opacity: 1; pointer-events: auto; }
  .nav a { font-size: 20px; }
  .nav-toggle { display: block; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 80px 0; }
  .hero-inner { padding: 140px 0 120px; }
  .project-row { grid-template-columns: 1fr; gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .cards-grid, .featured-grid, .team-grid, .process-grid, .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .stat:nth-child(n+3) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; }
}
