/* ============================================================
   Tesfaye Assefa GC & GWWC — Global Stylesheet
   ============================================================ */

:root {
  --ink: #0b1c2c;
  --navy: #12395c;
  --navy-600: #1a4a76;
  --amber: #e08a1e;
  --amber-600: #c67411;
  --sand: #f5f2ec;
  --slate: #5b6b7a;
  --line: #e2ddd3;
  --white: #ffffff;

  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(11, 28, 44, 0.06), 0 4px 12px rgba(11, 28, 44, 0.06);
  --shadow-lg: 0 20px 50px -20px rgba(11, 28, 44, 0.35);

  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  --maxw: 1200px;
  --header-offset: 96px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-offset, 96px);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p { margin: 0 0 1em; }

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--amber);
  display: inline-block;
}

.section { padding: 6rem 0; }
.section-sm { padding: 4rem 0; }

.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section-head p { color: var(--slate); font-size: 1.05rem; margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(224, 138, 30, 0.7); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-600); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header { transition: box-shadow 0.3s ease, background 0.3s ease; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  border-bottom: 3px solid var(--amber);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.brand-text strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.02rem;
  line-height: 1.1;
  color: var(--ink);
}
.brand-text span { font-size: 0.72rem; color: var(--slate); letter-spacing: 0.05em; }

.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--amber); transition: width 0.25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--navy); }

.nav-cta { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 44px; height: 44px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; width: 24px; background: var(--ink); transition: 0.3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.12);
  animation: kenburns 20s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  0%   { transform: scale(1.12) translate3d(0, 0, 0); }
  100% { transform: scale(1.22) translate3d(-2%, -1.5%, 0); }
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(11,28,44,0.92) 0%, rgba(11,28,44,0.72) 45%, rgba(11,28,44,0.35) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 7rem 0 6rem; max-width: 760px; }
.hero h1 { color: var(--white); font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: 1.2rem; }
.hero h1 .hl { color: var(--amber); }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,0.86); max-width: 560px; margin-bottom: 2rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }

/* Hero staged entrance */
.hero-inner > * { opacity: 0; animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.hero-inner > .eyebrow      { animation-delay: 0.15s; }
.hero-inner > h1            { animation-delay: 0.30s; }
.hero-inner > .lead         { animation-delay: 0.48s; }
.hero-inner > .hero-badges  { animation-delay: 0.62s; }
.hero-inner > .hero-actions { animation-delay: 0.76s; }
@keyframes heroUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.82rem; font-weight: 500;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Stats bar ---------- */
.stats {
  position: relative; z-index: 3;
  margin-top: -3.5rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.stat { padding: 2rem 1.75rem; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat .num span { color: var(--amber); }
.stat .label { color: var(--slate); font-size: 0.92rem; margin-top: 0.4rem; }

/* ---------- Services ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card .icon {
  width: 54px; height: 54px; border-radius: 12px;
  background: rgba(18, 57, 92, 0.08);
  color: var(--navy);
  display: grid; place-items: center;
  margin-bottom: 1.25rem;
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.3rem; }
.card p { color: var(--slate); margin-bottom: 0; }
.card .tag {
  display: inline-block; margin-bottom: 1rem;
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber);
}

/* ---------- Split / Alternating ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; height: 100%; object-fit: cover; }
.split-media { position: relative; }
.media-badge {
  position: absolute; bottom: -18px; left: -18px;
  background: var(--amber); color: var(--ink);
  padding: 1rem 1.4rem; border-radius: 12px;
  font-family: var(--font-head); font-weight: 700;
  box-shadow: var(--shadow-lg); max-width: 200px; line-height: 1.2;
}
.media-badge small { display: block; font-weight: 500; font-size: 0.75rem; opacity: 0.75; }

.check-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.check-list li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--ink); }
.check-list li svg { width: 22px; height: 22px; color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.check-list li strong { display: block; font-family: var(--font-head); }
.check-list li span { color: var(--slate); font-size: 0.95rem; }

/* ---------- Dark section ---------- */
.dark { background: var(--ink); color: var(--white); }
.dark h1, .dark h2, .dark h3 { color: var(--white); }
.dark .section-head p { color: rgba(255,255,255,0.7); }

/* ---------- Projects ---------- */
.project-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); background: var(--ink);
  min-height: 340px; display: flex; align-items: flex-end;
}
.project-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease; opacity: 0.9;
}
.project-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,28,44,0.92) 0%, rgba(11,28,44,0.2) 60%, rgba(11,28,44,0) 100%);
}
.project-card:hover img { transform: scale(1.07); }
.project-body { position: relative; z-index: 2; padding: 1.75rem; color: var(--white); }
.project-body .cat {
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber);
}
.project-body h3 { color: var(--white); font-size: 1.4rem; margin: 0.4rem 0 0.4rem; }
.project-body .loc { color: rgba(255,255,255,0.8); font-size: 0.92rem; display: flex; align-items: center; gap: 0.4rem; }
.project-body .loc svg { width: 15px; height: 15px; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.5rem; }
.pill {
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 500;
  padding: 0.5rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--slate);
}
.pill.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---------- Values ---------- */
.value {
  padding: 1.75rem; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
}
.value .n { font-family: var(--font-head); color: var(--amber); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; }
.value h3 { font-size: 1.15rem; margin: 0.5rem 0 0.5rem; }
.value p { color: var(--slate); font-size: 0.95rem; margin: 0; }

/* ---------- Policy accordion ---------- */
.policy { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; margin-bottom: 1rem; }
.policy summary {
  cursor: pointer; list-style: none; padding: 1.4rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem;
}
.policy summary::-webkit-details-marker { display: none; }
.policy summary .ic { width: 30px; height: 30px; flex-shrink: 0; color: var(--amber); transition: transform 0.3s ease; }
.policy[open] summary .ic { transform: rotate(45deg); }
.policy .policy-body { padding: 0 1.75rem 1.75rem; color: var(--slate); }
.policy .policy-body p:last-child { margin-bottom: 0; }
.policy .policy-body ul { margin: 0 0 1em; padding-left: 1.2rem; }
.policy .policy-body li { margin-bottom: 0.4rem; }

/* ---------- Media modal (video/lightbox) ---------- */
.media-modal { display: none; position: fixed; inset: 0; z-index: 99999; align-items: center; justify-content: center; }
.media-modal.open { display: flex; }
.media-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,0.65); backdrop-filter: blur(4px); }
.media-modal-content { position: relative; z-index: 2; width: calc(100% - 3rem); max-width: 980px; padding: 1.25rem; }
.media-modal-close { position: absolute; right: 0.5rem; top: 0.5rem; z-index: 3; background: rgba(255,255,255,0.06); border: none; color: #fff; width: 40px; height: 40px; border-radius: 8px; font-size: 20px; cursor: pointer; }
.media-modal .media-modal-nav { display:flex; gap:0.5rem; justify-content:flex-end; margin-top:0.75rem; }
/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; color: var(--white);
  border-radius: 0;
}
.cta-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cta-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(11,28,44,0.94), rgba(18,57,92,0.8)); }
.cta-inner { position: relative; z-index: 2; text-align: center; padding: 5.5rem 0; }
.cta-inner h2 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); }
.cta-inner p { color: rgba(255,255,255,0.82); max-width: 560px; margin: 0 auto 2rem; font-size: 1.1rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact-grid > .reveal {
  background: var(--white);
  border: 1px solid rgba(226,221,211,0.95);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
}
.contact-grid > .reveal h2 { margin-top: 0; }
.info-item {
  display: flex; gap: 1rem;
  padding: 1.25rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(226,221,211,0.95);
  background: rgba(248,246,241,0.95);
  transition: transform 0.2s ease, background 0.2s ease;
}
.info-item:hover {
  background: rgba(255,248,237,0.95);
  transform: translateX(0.12rem);
}
.info-item:last-child { border-bottom: none; }
.info-item .ic {
  width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
  background: rgba(224,138,30,0.12); color: var(--amber);
  display: grid; place-items: center;
}
.info-item .ic svg { width: 24px; height: 24px; }
.info-item h4 { font-size: 1rem; margin: 0 0 0.25rem; }
.info-item p, .info-item a { color: var(--slate); margin: 0; font-size: 0.95rem; word-break: break-word; }
.info-item a:hover { color: var(--amber); }

.form-card {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(224,138,30,0.22);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(224,138,30,0.08), transparent 35%);
  pointer-events: none;
}
.form-card > * { position: relative; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: 0.9rem; margin-bottom: 0.5rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.95rem 1rem; border: 1px solid var(--line); border-radius: 12px;
  font-family: var(--font-body); font-size: 0.96rem; background: var(--white); color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(224,138,30,0.15); background: var(--white);
}
.field textarea { resize: vertical; min-height: 150px; }
.form-note { font-size: 0.9rem; color: var(--slate); }
.form-success { display: none; padding: 1rem 1.25rem; background: rgba(18,57,92,0.08); border-radius: 10px; color: var(--navy); font-weight: 500; margin-bottom: 1.25rem; }
.form-success.show { display: block; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; color: var(--white); overflow: hidden; }
.page-hero .hero-bg::after { background: linear-gradient(120deg, rgba(11,28,44,0.94), rgba(18,57,92,0.7)); }
.page-hero-inner { position: relative; z-index: 2; padding: 5.5rem 0 4rem; max-width: 720px; }
.page-hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.15rem; margin: 0; max-width: 560px; }
.crumbs { font-family: var(--font-head); font-size: 0.85rem; letter-spacing: 0.05em; color: rgba(255,255,255,0.7); margin-bottom: 1.25rem; }
.crumbs a:hover { color: var(--amber); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 4.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; margin-bottom: 3rem; }
.site-footer .brand-text strong { color: var(--white); }
.site-footer p { color: rgba(255,255,255,0.6); font-size: 0.92rem; margin-top: 1rem; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.92rem; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom a { color: var(--amber); }
.footer-bottom a:hover { color: #ffd166; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.grid .reveal,
.project-card.reveal,
.card.reveal { transition-delay: 0s !important; }

/* Directional variants */
.reveal-left  { transform: translateX(-52px); }
.reveal-right { transform: translateX(52px); }
.reveal-scale { transform: scale(0.9); }
.reveal-left.in, .reveal-right.in, .reveal-scale.in { transform: none; }

/* Card hover shine sweep */
.card, .project-card, .value { position: relative; }
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.7s ease; pointer-events: none; opacity: 0;
}
.card:hover::before { transform: translateX(120%); opacity: 1; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--amber-600));
  z-index: 100; transition: width 0.1s linear;
}

/* Back to top */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--navy); color: var(--white); display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--amber); color: var(--ink); }
.to-top svg { width: 22px; height: 22px; }

/* Header shrink on scroll */
.site-header { transition: box-shadow 0.3s ease, background 0.3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px -12px rgba(11,28,44,0.35); background: rgba(245, 242, 236, 0.95); }
.site-header.scrolled .nav { height: 66px; }
.nav { transition: height 0.3s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .split.reverse .split-media { order: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav { height: auto; }
  .nav-cta { gap: 0.75rem; }
  .nav-toggle { display: flex; }
}

/* Make the rounded container tighter on small screens */
@media (max-width: 860px) {
  .site-header { padding: 0.4rem 0; }
  .site-header .container.nav {
    max-width: calc(100% - 1.2rem);
    margin: 0 0.6rem;
    border-radius: 12px;
    padding: 0.45rem 0.9rem;
  }
}

/* Stronger elevation when page is scrolled */
.site-header.scrolled .container.nav {
  padding: 0.35rem 0.9rem;
  box-shadow: 0 14px 36px rgba(11,28,44,0.12);
}

/* Updated Header / Nav styles */
/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999999 !important;
  background: transparent !important;
  padding: 0.4rem 0 !important;
  display: flex !important;
  justify-content: center !important;
  -webkit-backface-visibility: hidden !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.site-header .container.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--maxw);
  background: rgba(255,255,255,0.98);
  border-radius: 14px;
  padding: 0.55rem 1rem;
  box-shadow: 0 10px 30px rgba(11,28,44,0.08);
  border: 1px solid rgba(11,28,44,0.06);
  transition: padding 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Reduce top padding reserved for smaller viewports */
@media (max-width: 860px) {
  :root { --header-offset: 78px; }
}

@media (max-width: 420px) {
  :root { --header-offset: 72px; }
}

/* DEBUG: force header visible and outline to help diagnose hiding issues
   Remove this block after verification */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 2147483647 !important;
  background: rgba(255,255,255,0.98) !important;
  outline: 3px solid rgba(255,0,0,0.55) !important;
}
.site-header .container.nav { margin-top: 0 !important; }
/* Backdrop behind mobile drawer */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(11, 28, 44, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.nav-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 2rem 1.5rem 1.75rem;
    background: var(--white);
    border-radius: 0;
    transform: translateX(100%);
    will-change: transform;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    overscroll-behavior: contain;
    border: none;
  }
  .nav-links.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links li {
    width: 100%;
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
  }
  .nav-links a {
    display: block;
    font-size: 1.05rem;
    line-height: 1.7;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(11, 28, 44, 0.08);
    width: 100%;
    color: var(--ink);
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-links a:hover { color: var(--navy); }
  .nav-links a::after { display: none; }
  .nav-links .mobile-cta {
    display: inline-flex;
    margin-top: 1.75rem;
    justify-content: center;
    background: var(--amber);
    color: var(--ink);
    border-radius: 999px;
    padding: 1rem 1.25rem;
    width: 100%;
    text-align: center;
  }
  .nav-links .mobile-cta:hover { background: var(--amber-600); }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1000;
  }
}

@media (max-width: 860px) {
  .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); }
  body.nav-lock { overflow: hidden; touch-action: none; }
}

@media (min-width: 861px) { .nav-links .mobile-cta { display: none; } }

@media (max-width: 720px) {
  .nav-cta > .btn-dark { display: none; }
  .section { padding: 4rem 0; }
  .section-head { margin-bottom: 2rem; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); text-align: center; }
  .stat:last-child { border-bottom: none; }
  .stats { margin-top: -2.5rem; }
  .footer-grid { grid-template-columns: 1fr; text-align: left; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; justify-content: center; }
  .media-badge { left: 1rem; bottom: 1rem; }
  .hero-inner { padding: 5rem 0 4.5rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .split { gap: 2rem; }
  .section-head[style] { display: block !important; }
  .section-head[style] .btn { margin-top: 1.25rem; }
  .to-top { right: 1rem; bottom: 1rem; }
  .container { padding: 0 1.25rem; }
  .page-hero-inner { padding: 4rem 0 3rem; }
  .footer-bottom { text-align: center; }
  .project-card { min-height: 280px; }
  .section-head h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
  .btn { width: 100%; justify-content: center; }
  .contact-grid { gap: 2rem; }
  .contact-grid > .reveal { background: var(--white); border: 1px solid rgba(226,221,211,0.95); border-radius: var(--radius); padding: 2rem; box-shadow: 0 24px 46px -28px rgba(11,28,44,0.35); }
  .contact-grid > .reveal h2 { font-size: clamp(2rem, 4vw, 2.6rem); }
  .contact-grid > .reveal p { margin-bottom: 1.75rem; }
  .info-item { background: rgba(245,242,236,0.95); border: 1px solid rgba(226,221,211,0.95); border-radius: 18px; padding: 1.35rem 1.25rem; transition: background 0.2s ease, transform 0.2s ease; }
  .info-item:hover { background: rgba(255,246,229,0.98); transform: translateX(0.2rem); }
  .info-item .ic { width: 52px; height: 52px; border-radius: 16px; background: rgba(224,138,30,0.12); color: var(--amber); }
  .info-item .ic svg { width: 24px; height: 24px; }
  .contact-grid .form-card { padding: 2.5rem; border-color: rgba(224,138,30,0.22); }
  .contact-grid .form-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at top left, rgba(224,138,30,0.08), transparent 35%); pointer-events: none; }
  .contact-grid .form-card > * { position: relative; }
  .form-card h3 { font-size: clamp(1.75rem, 4vw, 2.2rem); margin-bottom: 0.75rem; }
  .form-card p { margin-bottom: 1.75rem; }
  .form-note { color: var(--slate); }
  .field input, .field select, .field textarea { background: var(--white); }
  .contact-grid { grid-template-columns: 1fr; }
}


/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-inner > * { opacity: 1 !important; }
}
