@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,300&family=Barlow+Condensed:wght@400;500;600;700&display=swap');

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

:root {
  --brand: #4a6478;
  --brand-dark: #344858;
  --brand-light: #6a8499;
  --accent: oklch(0.72 0.13 55);
  --accent-dark: oklch(0.60 0.13 55);
  --bg: #f7f6f4;
  --bg-alt: #edecea;
  --white: #ffffff;
  --text: #1e2830;
  --text-mid: #4a5560;
  --text-light: #7a8590;
  --rule: #d4d0cb;
  --nav-h: 88px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}
body.page-leaving { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  body { transition: none !important; }
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 48px;
  gap: 48px;
}
.nav-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 60px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 0; list-style: none; margin-left: auto; }
.nav-links a {
  display: block;
  padding: 8px 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px; font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.nav-cta {
  margin-left: 16px;
  padding: 10px 24px !important;
  background: var(--brand) !important;
  color: var(--white) !important;
  border-radius: 3px;
}
.nav-cta:hover { background: var(--brand-dark) !important; color: var(--white) !important; }

/* Dropdown */
.nav-item { position: relative; }
.nav-item:hover .dropdown { opacity: 1; pointer-events: all; transform: translateY(0); }
.dropdown {
  position: absolute; top: calc(100% + 1px); left: 0;
  background: var(--white); border: 1px solid var(--rule);
  border-top: 2px solid var(--brand); min-width: 260px; padding: 8px 0;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: all 0.2s; box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.dropdown a {
  text-transform: none !important; letter-spacing: 0 !important;
  font-size: 14px !important; font-family: 'Barlow', sans-serif !important;
  font-weight: 400 !important; padding: 10px 20px !important;
  color: var(--text) !important; border-left: 3px solid transparent;
  transition: all 0.15s !important; display: block !important;
}
.dropdown a:hover { background: var(--bg); border-left-color: var(--brand); color: var(--brand) !important; }

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  margin-top: var(--nav-h);
  background: var(--brand-dark);
  padding: 72px 72px 64px;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  right: 72px; top: 50%;
  transform: translateY(-50%);
  width: 200px; height: 200px;
  border: 40px solid rgba(255,255,255,0.05);
  border-radius: 50%;
}
.page-header .breadcrumb {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 16px;
}
.page-header .breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.page-header .breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.page-header h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(36px, 4vw, 56px); font-weight: 700;
  color: var(--white); line-height: 1.05;
}
.page-header p {
  margin-top: 14px; font-size: 17px; font-weight: 300;
  color: rgba(255,255,255,0.7); max-width: 520px; line-height: 1.65;
}

/* ── SECTION UTILITIES ── */
.section { padding: 88px 72px; }
.section-sm { padding: 64px 72px; }
.section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(30px, 3.5vw, 46px); font-weight: 700;
  line-height: 1.1; color: var(--text); margin-bottom: 16px;
}
.section-intro {
  font-size: 17px; font-weight: 300; color: var(--text-mid);
  max-width: 560px; line-height: 1.7; margin-bottom: 52px;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block; padding: 13px 30px;
  background: var(--brand); color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  border-radius: 3px; transition: background 0.2s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline {
  display: inline-block; padding: 13px 30px;
  border: 1.5px solid var(--brand); color: var(--brand);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  border-radius: 3px; transition: all 0.2s;
}
.btn-outline:hover { background: var(--brand); color: var(--white); }

/* ── CTA BAND ── */
.cta-band {
  background: var(--accent);
  padding: 56px 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.cta-band h2 { color: var(--white); font-size: 34px; margin: 0; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 17px; margin-top: 6px; }
.btn-white {
  flex-shrink: 0; display: inline-block; padding: 13px 30px;
  background: var(--white); color: var(--accent-dark);
  font-size: 14px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  white-space: nowrap;
  border-radius: 3px; transition: opacity 0.2s;
}
.btn-white:hover { opacity: 0.9; }

/* ── PLACEHOLDER IMAGES ── */
.img-placeholder {
  background: repeating-linear-gradient(
    45deg, var(--bg-alt), var(--bg-alt) 10px, var(--bg) 10px, var(--bg) 20px
  );
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; overflow: hidden;
}
.img-placeholder span {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-light);
}

/* ── FOOTER ── */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  padding: 56px 72px 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px;
}
.footer-brand img { height: 64px; margin-bottom: 16px; display: block; }
.footer-brand p { font-size: 14px; line-height: 1.65; }
.footer-col h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.9); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 14px; color: rgba(255,255,255,0.55);
  text-decoration: none; transition: color 0.15s;
}
.footer-col ul li a:hover { color: rgba(255,255,255,0.9); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center; font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,0.55); text-decoration: none; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,100,120,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(74,100,120,0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes drawLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal[data-delay="4"] { transition-delay: 0.48s; }
.reveal[data-delay="5"] { transition-delay: 0.6s; }

.reveal-left { transform: translateX(-40px); }
.reveal-left.in-view { transform: none; }
.reveal-right { transform: translateX(40px); }
.reveal-right.in-view { transform: none; }
.reveal-scale { transform: scale(0.94); }
.reveal-scale.in-view { transform: none; }

/* Hero / page-header entrance */
.hero-left > *, .page-header > * { animation: fadeInUp 1s cubic-bezier(0.22,1,0.36,1) both; }
.hero-left > *:nth-child(1), .page-header > *:nth-child(1) { animation-delay: 0.1s; }
.hero-left > *:nth-child(2), .page-header > *:nth-child(2) { animation-delay: 0.25s; }
.hero-left > *:nth-child(3), .page-header > *:nth-child(3) { animation-delay: 0.4s; }
.hero-left > *:nth-child(4) { animation-delay: 0.55s; }
.hero-left > *:nth-child(5) { animation-delay: 0.7s; }
.hero-right { animation: slideInRight 1.2s cubic-bezier(0.22,1,0.36,1) both; animation-delay: 0.2s; }
.page-header::after { animation: float 6s ease-in-out infinite; }

/* Nav slide down on load */
nav { animation: fadeIn 0.5s ease-out both; }
.nav-links a { position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 18px; right: 18px; bottom: 4px; height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a:not(.nav-cta).active::after { transform: scaleX(1); }

/* Buttons — lift + sheen */
.btn-primary, .btn-outline, .btn-white, .nav-cta {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1),
              background 0.2s, color 0.2s, box-shadow 0.25s;
}
.btn-primary::before, .btn-outline::before, .btn-white::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s;
}
.btn-primary:hover, .btn-outline:hover, .btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}
.btn-primary:hover::before, .btn-outline:hover::before, .btn-white:hover::before { left: 100%; }
.btn-primary:active, .btn-outline:active, .btn-white:active { transform: translateY(0); }

/* Card / image hover lift — global */
.preview-card, .project-card, .service-card, .value-card, .t-card, .team-card {
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.3s cubic-bezier(0.22,1,0.36,1);
}
.preview-card img, .project-card img, .service-img img, .preview-card-img img, .project-thumb img {
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.preview-card:hover img, .project-card:hover img,
.preview-card:hover .preview-card-img img, .project-card:hover .project-thumb img {
  transform: scale(1.06);
}

/* Stat count-up shimmer */
.stat-num, .stat-big {
  display: inline-block;
  background: linear-gradient(90deg, currentColor 0%, currentColor 40%, rgba(255,255,255,0.5) 50%, currentColor 60%, currentColor 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
}
.stat-num.in-view, .stat-big.in-view {
  animation: shimmer 2.4s ease-out 0.3s 1, countUp 0.6s ease-out both;
}

/* Filter buttons */
.filter-btn { transition: all 0.2s cubic-bezier(0.22,1,0.36,1); }
.filter-btn:hover { transform: translateY(-1px); }

/* Form inputs subtle focus lift */
.form-group input, .form-group select, .form-group textarea {
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  box-shadow: 0 0 0 4px rgba(74,100,120,0.08);
}

/* Map pin pulse */
.hero-card-dot, .map-pin-dot { animation: pulse 2.4s infinite; }

/* Footer link nudge */
.footer-col ul li a, .footer-bottom a {
  display: inline-block;
  transition: color 0.15s, transform 0.2s cubic-bezier(0.22,1,0.36,1);
}
.footer-col ul li a:hover, .footer-bottom a:hover { transform: translateX(4px); }

/* Service link arrow slide */
.service-link svg, .service-link::after { transition: transform 0.25s; }
.service-link { transition: color 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.service-link:hover { gap: 10px; }

/* Service number scale in */
.service-num, .value-num {
  transition: color 0.3s, transform 0.3s;
}
.service-card:hover .service-num { color: var(--brand-light); transform: scale(1.05); }

/* Team photo hover */
.team-photo {
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), border-color 0.3s;
}
.team-card:hover .team-photo { transform: translateY(-4px); border-color: var(--brand); }

/* State chip hover */
.state-chip {
  transition: all 0.2s cubic-bezier(0.22,1,0.36,1);
}
.state-chip:hover {
  background: var(--brand) !important;
  color: var(--white) !important;
  border-color: var(--brand) !important;
  transform: translateY(-2px);
}

/* Who chip hover (services page) */
.who-chip {
  transition: all 0.2s cubic-bezier(0.22,1,0.36,1);
}
.who-chip:hover {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
  transform: translateY(-1px);
}

/* Service card on home — entrance + arrow */
.service-card { animation: fadeInUp 0.6s cubic-bezier(0.22,1,0.36,1) both; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── MOBILE ── */
.hamburger { display: none; }
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .hamburger { display: block; margin-left: auto; background: none; border: none; cursor: pointer; }
  .section, .section-sm { padding: 56px 24px; }
  .page-header { padding: 56px 24px 48px; }
  .cta-band { flex-direction: column; text-align: center; padding: 48px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; padding: 0; gap: 32px; }
  footer { padding: 48px 24px 24px; }

  /* Tone down animations on mobile for performance */
  .reveal { transform: translateY(16px); transition-duration: 0.5s; }
  .reveal[data-delay="3"], .reveal[data-delay="4"], .reveal[data-delay="5"] { transition-delay: 0.15s; }
}

/* Tablet polish */
@media (max-width: 1200px) and (min-width: 901px) {
  .reveal { transition-duration: 0.6s; }
}
