/* =========================================================
   Elementra Ltd — Dark Elegant Theme
   ========================================================= */

:root {
  /* Dark palette */
  --bg-0:       #05080f;   /* page background */
  --bg-1:       #0a1018;   /* sections */
  --bg-2:       #0f1726;   /* alt section */
  --surface:    #131c2e;   /* cards */
  --surface-2:  #18233a;   /* hover */
  --line:       #1f2c45;   /* hairline borders */
  --line-soft:  #16203440;

  /* Brand accents (from logo) */
  --teal:       #2dbcbf;
  --teal-dk:    #0a9ea3;
  --teal-glow:  #2dbcbf33;
  --blue:       #6892de;
  --blue-dk:    #4373c8;

  /* Elegant warm accent for headings & highlights */
  --gold:       #d4b173;

  /* Text */
  --text:       #e8eef7;
  --text-soft:  #c2cbd9;
  --muted:      #8895ad;
  --muted-2:    #6b7894;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--text-soft); }
.lead { font-size: 1.15rem; color: var(--text-soft); max-width: 64ch; }
.accent { color: var(--teal); }
.gold   { color: var(--gold); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 0.7em;
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal-dk) 0%, var(--blue-dk) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(10, 158, 163, 0.25);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 30px rgba(45, 188, 191, 0.4); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--gold); border-color: var(--gold); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* ========== Nav ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.scrolled {
  background: rgba(5, 8, 15, 0.92);
  border-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
}
.brand { display: flex; align-items: center; }
.brand-logo {
  height: 72px; width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links > a, .nav-links > .dropdown > a {
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
}
.nav-links > a:hover, .nav-links > .dropdown > a:hover { color: var(--gold); }
.nav-links a.btn { color: #fff; padding: 9px 18px; }
.nav-links a.btn:hover { color: #fff; }

/* Dropdown for Services */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  padding-top: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 60;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.dropdown-menu a:hover {
  background: var(--surface-2);
  color: var(--gold);
}
.dropdown > a::after {
  content: '⌄';
  margin-left: 6px;
  font-size: 0.8rem;
  opacity: 0.6;
}

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; transition: transform .2s; }

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 80px 0 100px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('images/hero-seismic.jpg') center/cover no-repeat;
  z-index: -2;
  opacity: 0.6;
  filter: saturate(0.85) contrast(1.05);
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(45,188,191,0.18) 0%, transparent 55%),
    linear-gradient(180deg, rgba(5,8,15,0.75) 0%, rgba(5,8,15,0.88) 70%, rgba(5,8,15,1) 100%);
  z-index: -1;
}
/* For sub-pages, hero background path is relative to page location */
.subpage .hero::before { background-image: url('../images/hero-seismic.jpg'); }

.hero-inner { position: relative; z-index: 1; max-width: 860px; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 32px; font-size: 1.2rem; color: var(--text-soft); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 28px; max-width: 640px;
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 26px;
}
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: 'Playfair Display', serif; font-size: 1.9rem; color: var(--gold); }
.hero-stats span { font-size: 0.85rem; color: var(--muted); }

/* Sub-page hero (services pages) — shorter */
.subpage .hero {
  min-height: 60vh;
  padding: 100px 0 80px;
}

/* ========== Sections ========== */
.section { padding: 100px 0; background: var(--bg-1); position: relative; }
.section-alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* ========== Service cards (home) ========== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(45,188,191,0.06), transparent 50%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--teal-dk);
  background: var(--surface-2);
}
.card:hover::before { opacity: 1; }
.card-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45,188,191,0.18), rgba(67,115,200,0.10));
  color: var(--teal);
  margin-bottom: 18px;
  border: 1px solid var(--line);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; color: var(--text); }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9rem;
}
.card-link:hover { color: var(--gold); }
.card-link::after {
  content: '→';
  transition: transform .2s;
}
.card-link:hover::after { transform: translateX(4px); }

.card.linked { cursor: pointer; }
.card.linked a.full-link {
  position: absolute; inset: 0;
  z-index: 2;
  font-size: 0; color: transparent;
}

/* ========== About / Values grid ========== */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.value {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.value-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 12px;
}
.value h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--text); }
.value p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ========== Track Record (project cards) ========== */
.project .tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212, 177, 115, 0.10);
  border: 1px solid rgba(212, 177, 115, 0.25);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 14px;
}

/* ========== Service page specifics ========== */
.svc-feature {
  display: block;
  max-width: 980px;
  margin: 0 auto;
}
.svc-feature .text h2 { margin-top: 0; }
.svc-image {
  margin: 0 0 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0e16;
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  max-height: 620px;
}
.svc-image img,
.svc-image svg {
  max-width: 100%;
  max-height: 580px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 4px;
}
.svc-image::after {
  content: none;
}

.svc-list {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.svc-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  padding: 20px 28px;
  color: var(--text-soft);
  display: flex; align-items: flex-start; gap: 16px;
  transition: border-color .2s, transform .2s;
}
.svc-list li:hover {
  border-left-color: var(--gold);
  transform: translateX(2px);
}
.svc-list li::before {
  content: '✦';
  color: var(--teal);
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.svc-list li strong {
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
  font-size: 1rem;
}
.svc-list li span { font-size: 0.9rem; color: var(--muted); }

.svc-tools {
  margin-top: 36px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.svc-tools .ct-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}
.svc-tools .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-tools .tag-chip {
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.svc-other {
  background: var(--bg-2);
  padding: 70px 0;
  border-top: 1px solid var(--line);
}
.svc-other h3 { text-align: center; margin-bottom: 30px; color: var(--text); }
.svc-other .cards { gap: 16px; }
.svc-other .card { padding: 22px; }
.svc-other .card h4 { margin: 0 0 6px; color: var(--text); font-family: 'Playfair Display', serif; font-size: 1.05rem; }
.svc-other .card p { margin: 0; font-size: 0.88rem; }

/* ========== CTA strip ========== */
.cta-strip {
  background: linear-gradient(135deg, #0a1730 0%, #061222 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 60px 0;
  text-align: center;
}
.cta-strip h2 { margin-bottom: 12px; }
.cta-strip p { color: var(--muted); margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ========== Contact ========== */
.contact { background: linear-gradient(180deg, var(--bg-0) 0%, #020509 100%); color: var(--text-soft); border-top: 1px solid var(--line); }
.contact h2 { color: var(--text); }
.contact .eyebrow { color: var(--gold); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-grid--form-only {
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}
.contact-list {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: grid; gap: 14px;
}
.contact-list li {
  display: flex; align-items: center; gap: 14px;
  color: var(--text-soft);
}
.contact-list svg { width: 22px; height: 22px; color: var(--teal); flex-shrink: 0; }
.contact-list a { color: var(--text-soft); }
.contact-list a:hover { color: var(--gold); }

.contact-form {
  background: var(--surface);
  color: var(--text);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid; gap: 14px;
}
.contact-form label { display: grid; gap: 6px; font-size: 0.84rem; font-weight: 600; color: var(--text-soft); }
.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-1);
  color: var(--text);
  transition: border-color .15s, background .15s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted-2); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--bg-2);
}
.contact-form button { justify-self: start; margin-top: 4px; }
.form-note { font-size: 0.78rem; color: var(--muted-2); margin: 0; }
.form-note a { color: var(--teal); }

/* ========== Footer ========== */
.footer { background: #020509; color: var(--muted); padding: 40px 0 28px; font-size: 0.88rem; border-top: 1px solid var(--line); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
  font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--text-soft); }
.footer ul a:hover { color: var(--gold); }
.footer-brand img { height: 56px; width: auto; display: block; margin-bottom: 16px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.footer-brand p { color: var(--muted); margin: 0; max-width: 320px; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.82rem; color: var(--muted-2);
}
.footer-bottom a { color: var(--muted); }

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .svc-feature { grid-template-columns: 1fr; gap: 32px; }
  .svc-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-1);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: opacity .18s, transform .18s;
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a.btn { margin-top: 8px; text-align: center; }
  .dropdown-menu {
    position: static; transform: none; opacity: 1; pointer-events: auto;
    min-width: 0; box-shadow: none; background: transparent; border: 0; padding: 4px 0 8px 16px;
  }
  .dropdown > a::after { display: none; }
  .nav-toggle { display: block; }
  .brand-logo { height: 52px; }

  .hero { min-height: 80vh; padding: 60px 0 80px; }
  .section { padding: 70px 0; }
  .hero-stats { grid-template-columns: 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}


/* ========== Stats banner (under About) ========== */
.stats-banner {
  background: linear-gradient(120deg, rgba(45,188,191,0.10), rgba(67,115,200,0.10));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
}
.stats-inner {
  display: grid;
  grid-template-columns: auto 1px 1fr;
  gap: 36px;
  align-items: center;
}
.stat-headline {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1;
}
.stat-headline strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3.6rem, 8vw, 5.6rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-headline strong sup {
  font-size: 0.55em;
  color: var(--teal);
  vertical-align: super;
  margin-left: 4px;
}
.stat-headline span {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 8px;
}
.stat-divider {
  width: 1px;
  height: 96px;
  background: var(--line);
}
.stat-sub {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin: 0;
  max-width: 640px;
}

/* ========== Projects map ========== */
.projects-map {
  margin: 36px 0 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f5efe4; /* sandy map fallback */
  box-shadow: var(--shadow);
}
.projects-map img {
  display: block;
  width: 100%;
  height: auto;
}
.projects-map figcaption {
  padding: 14px 22px;
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
  text-align: center;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.region {
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.region strong {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}
.region span {
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 760px) {
  .stats-inner { grid-template-columns: 1fr; gap: 22px; text-align: left; }
  .stat-divider { display: none; }
}