/* ===== DESIGN TOKENS ===== */
:root {
  /* Colors */
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1f2a44;
  --muted: #5f6b7d;
  --brand: #2b6cb0;
  --brand-dark: #1e5a94;
  --brand-light: #3b82f6;
  --brand-glow: rgba(43, 108, 176, 0.25);
  --accent: #3b82f6;
  --line: #e4e8ef;
  --line-light: #f1f4f9;
  --success: #006644;
  --success-bg: #ecfdf5;
  --error: #9f1239;
  --error-bg: #fff1f2;
  --navy-900: #0b1d3a;
  --navy-800: #0d3162;
  --navy-700: #173f77;

  /* Typography */
  --font-heading: 'Poppins', Arial, Helvetica, sans-serif;
  --font-body: 'Inter', Arial, Helvetica, sans-serif;

  /* Spacing */
  --max: 1080px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(31, 42, 68, 0.06);
  --shadow-md: 0 4px 20px rgba(31, 42, 68, 0.08);
  --shadow-lg: 0 12px 40px rgba(31, 42, 68, 0.12);
  --shadow-xl: 0 20px 60px rgba(31, 42, 68, 0.16);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-base: 0.35s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.7vw, 3.2rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: clamp(1.45rem, 2.9vw, 2.05rem);
  font-weight: 700;
  margin-top: 0;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

p {
  max-width: 68ch;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-light);
  text-decoration: underline;
}

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

/* ===== LAYOUT ===== */
.container {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--transition-base), background var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.96);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

/* Desktop nav */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  align-items: center;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition-fast);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.nav a:hover {
  color: var(--brand);
  text-decoration: none;
}

.nav a:hover::after {
  width: 100%;
}

.nav a.active {
  color: var(--brand);
  font-weight: 600;
}

.nav a.active::after {
  width: 100%;
}

/* Hamburger button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
  position: relative;
  width: 40px;
  height: 40px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
  position: absolute;
  left: 8px;
}

.hamburger span:nth-child(1) { top: 11px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 27px; }

.hamburger.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 29, 58, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-overlay.is-visible {
  opacity: 1;
}

/* ===== HERO (Homepage) ===== */
.hero {
  background: var(--bg);
  color: var(--text);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.7vw, 3.2rem);
  margin: 0 0 0.5rem;
  color: var(--text);
}

.hero p {
  margin: 0.25rem 0;
  font-size: 1.1rem;
}

.hero .subtle {
  color: var(--muted);
  font-size: 1rem;
}

.hero .cta-row {
  margin-top: 1.5rem;
}

.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.hero-media img {
  width: 100%;
  display: block;
}

/* ===== PAGE HERO (Sub-pages) ===== */
.page-hero {
  background: #f5f8fd;
  color: var(--text);
  padding: 3.2rem 0;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 0.25rem;
}

.page-hero .subtle,
.page-hero .kicker {
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.breadcrumb .separator {
  color: var(--muted);
}

.breadcrumb .current {
  color: var(--muted);
}

/* ===== SECTIONS ===== */
.section {
  padding: 4.5rem 0;
}

/* ===== MAP ===== */
.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}

.map-container iframe {
  display: block;
  width: 100%;
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.about-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

.about-grid img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

/* ===== SERVICE CARDS ===== */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card {
  overflow: hidden;
  padding: 0;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.service-card:hover img {
  transform: scale(1.05);
}

.service-card-body {
  padding: 1.35rem;
}

.service-card h2,
.service-card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  text-transform: capitalize;
}

.kicker {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== SERVICE DETAIL ===== */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}

.service-detail img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.service-features li {
  padding: 0.45rem 0;
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.5;
}

.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 16px;
  height: 16px;
  background: var(--brand);
  border-radius: 50%;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 11.5L3 8l1-1 2.5 2.5L12 4l1 1-6.5 6.5z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 11.5L3 8l1-1 2.5 2.5L12 4l1 1-6.5 6.5z' fill='white'/%3E%3C/svg%3E");
}

.cta-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.25rem;
  border: 2px solid var(--brand);
  color: var(--brand);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
              transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-lg {
  padding: 0.8rem 1.75rem;
  font-size: 0.95rem;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}

/* Loading spinner */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.is-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== CONTACT ===== */
.contact-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1.1fr;
}

.contact-info {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.contact-info h2 {
  color: var(--text);
}

.contact-info p {
  color: var(--muted);
}

.contact-info a {
  color: var(--brand);
}

.contact-info a:hover {
  color: var(--brand-dark);
}

.contact-details-row {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-detail svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== FORMS ===== */
form {
  display: grid;
  gap: 0.75rem;
}

label {
  font-weight: 600;
  font-size: 0.92rem;
}

input,
textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--bg);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

/* ===== NOTICES ===== */
.notice {
  font-size: 0.9rem;
  color: var(--success);
  background: var(--success-bg);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  display: none;
}

.notice.show {
  display: block;
  animation: slideUp 0.35s var(--ease-out);
}

.notice.error {
  color: var(--error);
  background: var(--error-bg);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-brand .brand {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  display: block;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.site-footer h4 {
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-top: 0;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  color: var(--muted);
}

.footer-contact a {
  color: var(--muted);
}

.footer-contact a:hover {
  color: var(--brand);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--line-light);
  color: var(--muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.footer-social a:hover {
  background: var(--brand);
  color: #fff;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== SCROLL REVEAL ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== UTILITIES ===== */
.subtle {
  color: var(--muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero .cta-row {
    justify-content: center;
  }

  .hero-media {
    max-width: 480px;
    margin: 0 auto;
  }

  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-detail {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  /* Mobile nav */
  .hamburger {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: 0;
    z-index: 95;
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav-overlay {
    display: block;
  }

  .nav a {
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-light);
    width: 100%;
  }

  .nav a::after {
    display: none;
  }

  .site-header-inner {
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
