/* ============================================================
   OM Surveying Ltd — Brand CSS
   Complements Tailwind CDN.
   Design direction: Industrial-Precision — dark forest green,
   sharp accent green, survey-grid overlays, Barlow Condensed
   display type, technical-blueprint undertones.
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────── */

:root {
  --green-dark:    #1a6945;
  --green-deeper:  #12482f;
  --green-accent:  #26c97a;
  --green-accent2: #1aa85f;
  --green-bg:      #f0faf5;
  --green-muted:   #e4f4ec;
  --text-dark:     #1a2e22;
  --text-mid:      #3d5a47;
  --charcoal:      #111c16;

  /* spacing scale */
  --space-section: 6rem;

  /* typography */
  --font-display: 'Barlow Condensed', system-ui, sans-serif;
  --font-body:    'Barlow', system-ui, sans-serif;
}

/* ── Base resets ────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ─────────────────────────────────────────────── */

.nav-root {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, backdrop-filter 0.3s ease,
              box-shadow 0.3s ease, padding 0.3s ease;
  padding: 1.25rem 0;
}

/* transparent by default (only on pages where hero is flush) */
.nav-root.nav-transparent {
  background: transparent;
}

/* solid / glass after scroll */
.nav-root.nav-solid {
  background: rgba(18, 72, 47, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
  padding: 0.75rem 0;
}

/* pages without hero flush — always solid */
.nav-root.nav-always-solid {
  background: var(--green-deeper);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  padding: 0.9rem 0;
}

.nav-link {
  position: relative;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.88);
  transition: color 0.2s;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-accent);
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--charcoal);
}

/* Survey-grid SVG overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(38, 201, 122, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 201, 122, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Diagonal contour lines (survey-map feel) */
.hero-contour {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(38, 201, 122, 0.04) 40px,
    rgba(38, 201, 122, 0.04) 41px
  );
  pointer-events: none;
}

/* Gradient fade from dark charcoal to deep green */
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--charcoal) 0%,
    #0e3d26 50%,
    #163620 100%
  );
  pointer-events: none;
}

/* Radial glow behind hero text */
.hero-glow {
  position: absolute;
  top: 10%;
  left: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(38,201,122,0.12) 0%, transparent 65%);
  pointer-events: none;
}

/* Coordinate tag — technical flavour */
.coord-tag {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--green-accent);
  opacity: 0.7;
  text-transform: uppercase;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 1.5rem 4rem;
  background: var(--green-deeper);
  /* fine grid lines */
  background-image:
    linear-gradient(rgba(38, 201, 122, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 201, 122, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, var(--green-deeper) 0%, var(--charcoal) 100%);
  background-size: 40px 40px, 40px 40px, auto;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-accent);
  border: 1px solid rgba(38,201,122,0.35);
  border-radius: 3px;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1rem;
}

/* ── Typography ─────────────────────────────────────────────── */

.display-heading {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.section-label {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-accent);
  display: block;
  margin-bottom: 0.75rem;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* ── Stats section ──────────────────────────────────────────── */

.stats-section {
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(38,201,122,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38,201,122,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

.stat-card {
  position: relative;
  text-align: center;
  padding: 2.5rem 2rem;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 2.5rem;
  background: linear-gradient(to bottom, transparent, var(--green-accent));
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1;
  color: var(--green-accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 0.5rem;
}

/* ── Service cards ──────────────────────────────────────────── */

.service-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(26, 105, 69, 0.12);
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--green-dark), var(--green-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,105,69,0.15), 0 2px 8px rgba(0,0,0,0.06);
  border-color: rgba(38,201,122,0.3);
}

.service-card-number {
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--green-accent);
  opacity: 0.7;
  display: block;
  margin-bottom: 0.75rem;
}

.service-icon-wrap {
  width: 3rem;
  height: 3rem;
  background: var(--green-bg);
  border: 1px solid rgba(26,105,69,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

/* ── Why Choose Us ──────────────────────────────────────────── */

.checklist-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 500;
  font-size: 1rem;
}

.checklist-item:last-child { border-bottom: none; }

.check-icon {
  width: 1.75rem;
  height: 1.75rem;
  background: rgba(38,201,122,0.15);
  border: 1px solid rgba(38,201,122,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── HSE panel ──────────────────────────────────────────────── */

.hse-panel {
  position: relative;
  background: var(--green-bg);
  border: 1px solid rgba(38,201,122,0.25);
  border-radius: 2px;
  overflow: hidden;
}

.hse-panel::after {
  content: 'HSE';
  position: absolute;
  bottom: -1rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 5rem;
  color: rgba(26,105,69,0.06);
  letter-spacing: -0.05em;
  pointer-events: none;
  line-height: 1;
}

/* ── CTA Banner ─────────────────────────────────────────────── */

.cta-banner {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--green-deeper) 0%, var(--charcoal) 60%);
}

.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(38,201,122,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38,201,122,0.06) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ── Core value cards ───────────────────────────────────────── */

.value-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(26,105,69,0.1);
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.value-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(26,105,69,0.12);
}

.value-card-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--green-dark), var(--green-accent));
}

/* ── Team / diamond photo frame ─────────────────────────────── */

.photo-diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: var(--green-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.photo-diamond:hover {
  transform: rotate(3deg) scale(1.04);
}

.photo-diamond img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Diamond border ring */
.photo-diamond-wrap {
  position: relative;
  display: inline-block;
}

.photo-diamond-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: transparent;
  border: 2px solid var(--green-accent);
  opacity: 0.4;
  pointer-events: none;
}

/* ── Team card ──────────────────────────────────────────────── */

.team-card {
  text-align: center;
}

.team-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-top: 1.25rem;
}

.team-role {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-accent2);
  font-weight: 600;
}

/* ── Contact cards ──────────────────────────────────────────── */

.contact-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(26,105,69,0.1);
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.contact-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--green-dark), var(--green-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.contact-card:hover::before {
  transform: scaleX(1);
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(26,105,69,0.12);
}

.contact-icon-wrap {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--green-dark), var(--green-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}

/* ── Experience list ────────────────────────────────────────── */

.exp-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 2px;
  transition: background 0.2s;
}

.exp-item:hover {
  background: var(--green-bg);
}

.exp-bullet {
  width: 2rem;
  height: 2rem;
  background: var(--green-bg);
  border: 1.5px solid var(--green-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Divider line with label ────────────────────────────────── */

.divider-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(26,105,69,0.15);
}

/* ── Geometric accent shapes ─────────────────────────────────── */

.geo-diamond {
  position: absolute;
  width: 220px;
  height: 220px;
  background: var(--green-accent);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  opacity: 0.08;
  pointer-events: none;
}

.geo-diamond--dark {
  background: var(--green-dark);
  opacity: 0.18;
}

.geo-diamond--sm {
  width: 120px;
  height: 120px;
}

.geo-diamond--lg {
  width: 400px;
  height: 400px;
  opacity: 0.05;
}

.geo-chevron {
  position: absolute;
  width: 180px;
  height: 180px;
  background: var(--green-accent);
  clip-path: polygon(0 0, 70% 0, 100% 50%, 70% 100%, 0 100%, 30% 50%);
  opacity: 0.08;
  pointer-events: none;
}

/* ── Stat pill (vision-mission page) ────────────────────────── */

.stat-pill {
  background: rgba(38,201,122,0.15);
  color: var(--green-accent);
  border: 1px solid rgba(38,201,122,0.4);
  border-radius: 3px;
  padding: 0.6rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
}

/* ── Footer ─────────────────────────────────────────────────── */

.footer-root {
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}

.footer-root::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(38,201,122,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38,201,122,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.1;
  color: #fff;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(38,201,122,0.3), transparent);
}

/* ── Buttons ─────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green-accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding: 0.875rem 2rem;
  border-radius: 2px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  background: #1aa85f;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(38,201,122,0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding: 0.875rem 2rem;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: #fff;
  transform: translateY(-1px);
}

/* ── Scroll-reveal animation ─────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.55s cubic-bezier(0.22,0.61,0.36,1),
              transform 0.55s cubic-bezier(0.22,0.61,0.36,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for child elements */
.reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.5s; }
.reveal-stagger > *:nth-child(7) { transition-delay: 0.6s; }

/* ── Noise / texture overlay ─────────────────────────────────── */

/* SVG noise via background — subtle grain on certain panels */
.texture-noise {
  position: relative;
}

.texture-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
  border-radius: inherit;
}

/* ── Map placeholder ─────────────────────────────────────────── */

.map-placeholder {
  background: var(--green-bg);
  border: 1px solid rgba(38,201,122,0.25);
  border-radius: 2px;
  height: 18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,105,69,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,105,69,0.1) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* ── Accessibility ───────────────────────────────────────────── */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--green-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Body offset for fixed nav */
body { padding-top: 0; }
.has-fixed-nav { padding-top: 4.5rem; }

/* ── Mobile — hamburger menu ─────────────────────────────────── */

#mobile-menu {
  background: rgba(12, 45, 28, 0.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(38,201,122,0.15);
}

/* ── Utility: clip-corner box ───────────────────────────────── */

.clip-corner-tl { clip-path: polygon(12px 0%, 100% 0%, 100% 100%, 0% 100%, 0% 12px); }
.clip-corner-tr { clip-path: polygon(0% 0%, calc(100% - 12px) 0%, 100% 12px, 100% 100%, 0% 100%); }
.clip-corner-br { clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0% 100%); }

/* ── Print ───────────────────────────────────────────────────── */

@media print {
  .nav-root, footer { display: none; }
  body { color: #000; }
}
