/* ==========================================================================
   AKAL ENGINEERING — Design System
   Motif: engineering-drawing / blueprint language, built on the site's
   original navy + teal palette.
   ========================================================================== */

:root {
  /* Color */
  --navy: #001f3f;
  --navy-deep: #00152b;
  --navy-soft: #032a52;
  --teal: #17a2b8;
  --teal-light: #5fd0e0;
  --teal-dim: #128293;
  --bg: #f4f4f9;
  --surface: #ffffff;
  --ink: #1c2b3a;
  --muted: #5b6b7c;
  --line: #dfe3ea;
  --tint: #eaf6f8;

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Layout */
  --nav-h: 76px;
  --radius: 10px;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@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;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  overflow-x: hidden;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------------- */
/* Spec-tag / eyebrow — engineering label convention                      */
/* ---------------------------------------------------------------------- */
.spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dim);
  border: 1px solid var(--teal);
  border-radius: 3px;
  padding: 5px 12px;
  background: var(--tint);
}

.spec-tag.on-dark {
  color: var(--teal-light);
  border-color: rgba(95, 208, 224, 0.5);
  background: rgba(23, 162, 184, 0.12);
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn-primary {
  background: var(--teal);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--teal-dim);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 162, 184, 0.3);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}
.btn-ghost:hover {
  border-color: var(--teal-light);
  color: var(--teal-light);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ---------------------------------------------------------------------- */
/* Navigation                                                              */
/* ---------------------------------------------------------------------- */
header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(0, 31, 63, 0.55);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

header.site-header.solid {
  background: rgba(0, 21, 43, 0.96);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.nav-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  flex-shrink: 1;
}

.brand > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand .mark {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--teal-light);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal-light);
  flex-shrink: 0;
  position: relative;
}
.brand .mark::before,
.brand .mark::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid var(--teal-light);
}
.brand .mark::before { top: -3px; left: -3px; border-width: 1px 0 0 1px; }
.brand .mark::after { bottom: -3px; right: -3px; border-width: 0 1px 1px 0; }

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--teal-light);
  font-weight: 400;
  text-transform: uppercase;
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav.primary-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 5px;
  transition: color 0.25s ease, background 0.25s ease;
}

nav.primary-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

nav.primary-nav a.active {
  color: var(--teal-light);
}

nav.primary-nav a.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  background: var(--teal-light);
  border-radius: 2px;
}

.nav-cta {
  margin-left: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.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); }

@media (max-width: 900px) {
  nav.primary-nav {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    height: calc(100vh - var(--nav-h));
    width: min(300px, 80vw);
    background: var(--navy-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 6px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }
  nav.primary-nav.open { transform: translateX(0); }
  nav.primary-nav a { padding: 14px 16px; font-size: 1rem; }
  .nav-cta { margin-left: 0; text-align: center; justify-content: center; }
  .nav-toggle { display: flex; }

  .nav-inner { padding: 0 16px; gap: 12px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand .mark { width: 30px; height: 30px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .brand small { display: none; }

  .policy-card,
  .sector-card,
  .value-card,
  .quick-tile,
  .office-card {
    padding: 22px 20px !important;
  }
}

/* ---------------------------------------------------------------------- */
/* Blueprint grid backgrounds                                             */
/* ---------------------------------------------------------------------- */
.blueprint {
  position: relative;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: center;
}

.blueprint::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(23, 162, 184, 0.22), transparent 70%);
  pointer-events: none;
}

.crosshair {
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: 0;
  animation: crosshair-pulse 4.5s ease-in-out infinite;
  pointer-events: none;
}
.crosshair::before, .crosshair::after {
  content: "";
  position: absolute;
  background: var(--teal-light);
}
.crosshair::before { width: 100%; height: 1px; top: 50%; left: 0; }
.crosshair::after { height: 100%; width: 1px; left: 50%; top: 0; }
.crosshair i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--teal-light);
  border-radius: 50%;
  transform: scale(0.4);
}

@keyframes crosshair-pulse {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 0.55; transform: scale(1); }
}

/* ---------------------------------------------------------------------- */
/* Section title-block                                                    */
/* ---------------------------------------------------------------------- */
.section-head {
  max-width: 640px;
  margin: 0 0 52px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-head .spec-tag { margin-bottom: 18px; }

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

section { padding: 96px 0; }

/* draw-on divider */
.divider {
  width: 100%;
  height: 1px;
  overflow: visible;
  margin: 0;
  display: block;
}
.divider line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.4s var(--ease);
}
.divider.in-view line { stroke-dashoffset: 0; }

/* ---------------------------------------------------------------------- */
/* Reveal-on-scroll                                                        */
/* ---------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.in-view > * { }
.reveal-group > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal-group.in-view > * { opacity: 1; transform: translateY(0); }
.reveal-group.in-view > *:nth-child(1) { transition-delay: 0.03s; }
.reveal-group.in-view > *:nth-child(2) { transition-delay: 0.09s; }
.reveal-group.in-view > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-group.in-view > *:nth-child(4) { transition-delay: 0.21s; }
.reveal-group.in-view > *:nth-child(5) { transition-delay: 0.27s; }
.reveal-group.in-view > *:nth-child(6) { transition-delay: 0.33s; }
.reveal-group.in-view > *:nth-child(7) { transition-delay: 0.39s; }
.reveal-group.in-view > *:nth-child(8) { transition-delay: 0.45s; }
.reveal-group.in-view > *:nth-child(9) { transition-delay: 0.51s; }
.reveal-group.in-view > *:nth-child(10) { transition-delay: 0.57s; }
.reveal-group.in-view > *:nth-child(11) { transition-delay: 0.63s; }

/* ---------------------------------------------------------------------- */
/* Bracket card — corner-mark component used across the site              */
/* ---------------------------------------------------------------------- */
.bracket-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.bracket-card::before,
.bracket-card::after,
.bracket-card .bc-tl,
.bracket-card .bc-br {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--teal);
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.bracket-card::before { top: -1px; left: -1px; border-style: solid; border-width: 2px 0 0 2px; transform: translate(4px, 4px); }
.bracket-card::after { bottom: -1px; right: -1px; border-style: solid; border-width: 0 2px 2px 0; transform: translate(-4px, -4px); }

.bracket-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 31, 63, 0.14);
  border-color: rgba(23, 162, 184, 0.35);
}
.bracket-card:hover::before,
.bracket-card:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

/* ---------------------------------------------------------------------- */
/* Stats strip                                                            */
/* ---------------------------------------------------------------------- */
.stats-strip {
  background: var(--navy-deep);
  padding: 56px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  color: var(--teal-light);
  font-weight: 600;
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 6px;
}
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  section { padding: 56px 0; }
  .section-head { margin-bottom: 34px; }
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
footer.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: rgba(255, 255, 255, 0.7); font-size: 0.92rem; transition: color 0.2s; }
.footer-grid a:hover { color: var(--teal-light); }
.footer-brand p { color: rgba(255, 255, 255, 0.6); font-size: 0.92rem; max-width: 320px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-mono);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------- */
/* Utility                                                                 */
/* ---------------------------------------------------------------------- */
.text-teal { color: var(--teal); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
