/* ===================== Demefco: Modern Upgrade ===================== */
:root {
  --blue-dark: #1c4a6e;
  --blue: #2a70ab;
  --blue-light: #5498c5;
  --blue-pale: #eaf2f8;
  --text: #373737;
  --text-light: #6f6f6f;
  --bg: #ffffff;
  --bg-alt: #f4f8fb;
  --border: #e3e9ee;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(28, 74, 110, 0.18);
  --shadow-lg: 0 25px 60px -15px rgba(28, 74, 110, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

/* ===================== Preloader ===================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: linear-gradient(150deg, #123650, var(--blue-dark) 60%, var(--blue));
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-mark {
  width: 88px; height: 88px;
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.35);
  animation: preloaderPulse 1.4s ease-in-out infinite;
}
.preloader-mark img { width: 100%; height: 100%; object-fit: contain; }
@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.preloader-bar {
  width: 160px; height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-light), #fff);
  transition: width 0.2s ease-out;
}

/* ===================== Custom cursor ===================== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2500;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor-dot {
  width: 7px; height: 7px;
  background: var(--blue-light);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(84, 152, 197, 0.55);
  transition: opacity 0.3s, width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s;
}
.cursor-ready .cursor-dot,
.cursor-ready .cursor-ring { opacity: 1; }
.cursor-ring.hovering {
  width: 54px; height: 54px;
  background: rgba(84, 152, 197, 0.12);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ===================== Marquee ===================== */
.marquee {
  background: var(--blue-dark);
  overflow: hidden;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  white-space: nowrap;
  animation: marqueeScroll 38s linear infinite;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.marquee-item ion-icon {
  font-size: 1.3rem;
  color: var(--blue-light);
  flex-shrink: 0;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  color: var(--blue-dark);
  line-height: 1.2;
  font-weight: 700;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 10px;
  display: inline-block;
}

/* ---------- Progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(42, 112, 171, 0.55);
}
.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -8px rgba(42, 112, 171, 0.6);
}
.btn-outline {
  border: 1.5px solid rgba(255,255,255,0.6);
  color: #fff;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-3px);
  border-color: #fff;
}

/* ===================== Header ===================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 560;
  padding: 22px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 0;
  box-shadow: 0 4px 24px -8px rgba(28, 74, 110, 0.15);
}
/* Keep the header transparent while the mobile menu is open, so the
   close button always sits against the overlay's dark background */
.site-header.menu-open {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
.site-header.menu-open .logo-tagline { color: rgba(255, 255, 255, 0.85); }
.site-header.menu-open .nav-link { color: #fff; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.35s var(--ease);
}
.logo:hover { transform: scale(1.03); }
.logo-img {
  height: 46px;
  width: auto;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -4px rgba(28, 74, 110, 0.35);
}
.logo-tagline {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-light);
  transition: color 0.4s;
}
.site-header:not(.scrolled) .logo-tagline { color: rgba(255,255,255,0.85); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}
.main-nav ul {
  display: flex;
  gap: 34px;
}
.nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: #fff;
  transition: color 0.35s;
  padding: 4px 0;
}
.site-header.scrolled .nav-link { color: var(--text); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--blue-light);
  transition: width 0.35s var(--ease);
}
.nav-link:hover,
.nav-link.active-link { color: var(--blue-light); }
.site-header.scrolled .nav-link:hover,
.site-header.scrolled .nav-link.active-link { color: var(--blue); }
.nav-link:hover::after,
.nav-link.active-link::after { width: 100%; }

.nav-cta { padding: 11px 24px; font-size: 0.88rem; }

/* ---------- Hamburger ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px; height: 44px;
  z-index: 600;
  position: relative;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.4s var(--ease), opacity 0.3s, background 0.3s;
}
.site-header.scrolled .hamburger span { background: var(--blue-dark); }
.hamburger.active span { background: #fff; }
.hamburger.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------- Mobile overlay ---------- */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--blue-dark), var(--blue) 70%);
  z-index: 550;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  clip-path: circle(0px at calc(100% - 40px) 40px);
  transition: clip-path 0.6s var(--ease);
  pointer-events: none;
}
.mobile-overlay.active {
  clip-path: circle(150% at calc(100% - 40px) 40px);
  pointer-events: auto;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.mobile-link {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--d) * 0.07s);
}
.mobile-overlay.active .mobile-link {
  opacity: 1;
  transform: translateY(0);
}
.mobile-cta {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease) 0.4s, transform 0.5s var(--ease) 0.4s;
}
.mobile-overlay.active .mobile-cta { opacity: 1; transform: translateY(0); }

/* ===================== Hero ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(150deg, #123650 0%, var(--blue-dark) 42%, var(--blue) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; transition: transform 0.4s ease-out; }
.grid-overlay {
  position: absolute; inset: 0;
  z-index: 2;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 60% 40%, black 10%, transparent 70%);
}

/* ---------- Blueprint illustration ---------- */
@property --mx {
  syntax: '<length-percentage>';
  inherits: false;
  initial-value: 50%;
}
@property --my {
  syntax: '<length-percentage>';
  inherits: false;
  initial-value: 36%;
}
.blueprint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.9;
}
/* Desktop: the plan stays faint until the cursor "shines a light" on it */
.blueprint.spotlight-enabled {
  -webkit-mask-image: radial-gradient(circle 260px at var(--mx) var(--my), rgba(0,0,0,1) 0%, rgba(0,0,0,1) 28%, rgba(0,0,0,0.08) 100%);
  mask-image: radial-gradient(circle 260px at var(--mx) var(--my), rgba(0,0,0,1) 0%, rgba(0,0,0,1) 28%, rgba(0,0,0,0.08) 100%);
  transition: --mx 0.12s linear, --my 0.12s linear;
}
.bp-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s var(--ease);
  /* JS assigns a staggered transition-delay per element in document order */
}
.bp-guide {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
  stroke-dasharray: 5 6;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.bp-bubble {
  fill: #163f5e;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 1.2;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.bp-bubble-text {
  fill: rgba(255, 255, 255, 0.82);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-anchor: middle;
  dominant-baseline: central;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.bp-text {
  fill: rgba(255, 255, 255, 0.5);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-anchor: middle;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.blueprint.drawn .bp-line { stroke-dashoffset: 0; }
.blueprint.drawn .bp-guide,
.blueprint.drawn .bp-bubble,
.blueprint.drawn .bp-bubble-text,
.blueprint.drawn .bp-text { opacity: 1; }

.bp-glow {
  stroke: rgba(169, 212, 236, 0.65);
  filter: drop-shadow(0 0 3px rgba(84, 152, 197, 0.6));
}
.blueprint.drawn .bp-glow {
  animation: bpGlowPulse 3.8s ease-in-out 2.2s infinite;
}
@keyframes bpGlowPulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(84, 152, 197, 0.45)); stroke-opacity: 0.55; }
  50% { filter: drop-shadow(0 0 10px rgba(84, 152, 197, 0.95)); stroke-opacity: 1; }
}

.spotlight-glow {
  position: absolute;
  top: 0; left: 0;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 212, 236, 0.4), rgba(84, 152, 197, 0.14) 45%, transparent 72%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(3px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 1;
}
.spotlight-glow.active { opacity: 1; }

@media (max-width: 640px) {
  .blueprint { opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-line { transition: none; stroke-dashoffset: 0; }
  .bp-guide, .bp-bubble, .bp-bubble-text, .bp-text { transition: none; opacity: 1; }
  .blueprint.drawn .bp-glow { animation: none; }
  .blueprint.spotlight-enabled { transition: none; }
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.32;
  animation: float 14s ease-in-out infinite;
}
.blob-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle at 30% 30%, var(--blue-light), transparent 70%);
  top: -120px; right: -100px;
}
.blob-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle at 60% 60%, #7fb8dd, transparent 70%);
  bottom: -160px; left: -80px;
  animation-delay: -6s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 30px) scale(1.06); }
}

.hero-inner { position: relative; z-index: 2; padding-top: 90px; }
.hero .eyebrow { color: var(--blue-light); }
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  color: #fff;
  margin-bottom: 22px;
}
.hero-title .split-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.hero-title .split-inner {
  display: inline-block;
  transform: translateY(115%) rotate(4deg);
  opacity: 0;
  transition: transform 0.9s var(--ease), opacity 0.7s var(--ease);
}
.hero-title .split-line.in .split-inner {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
}
.hero-title .accent .split-inner {
  background: linear-gradient(90deg, #a9d4ec, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-text {
  color: rgba(255,255,255,0.85);
  font-size: 1.08rem;
  max-width: 700px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 7px; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  background: #fff;
  border-radius: 50%;
  animation: scrollDown 1.8s infinite;
}
@keyframes scrollDown {
  0% { opacity: 1; top: 7px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 22px; }
}

/* ===================== Reveal animation ===================== */
.reveal {
  opacity: 0;
  transform: translateY(46px) scale(0.94);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 0.12s);
}
.reveal.in-view { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

/* ---------- Tilt (3D hover) ---------- */
.tilt { transform-style: preserve-3d; will-change: transform; }

/* ---------- Magnetic buttons ---------- */
.magnetic { will-change: transform; }

/* ===================== Stats ===================== */
.stats {
  background: var(--blue-dark);
  padding: 54px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-number {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #fff;
}
.stat-label {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

/* ===================== Sections ===================== */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 680px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 16px; }
.section-intro { color: var(--text-light); font-size: 1.05rem; }

/* ---------- Value cards ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.value-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 26px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.value-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.value-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--blue-pale);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  transition: background 0.4s, color 0.4s, transform 0.4s var(--ease);
}
.value-icon svg { width: 26px; height: 26px; }
.value-card:hover .value-icon {
  background: var(--blue);
  color: #fff;
  transform: rotate(-8deg) scale(1.08);
}
.value-card h3 { font-size: 1.12rem; margin-bottom: 10px; }
.value-card p { color: var(--text-light); font-size: 0.94rem; }

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 16px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 6px 13px;
  border-radius: 50px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.service-card:hover .tag {
  background: var(--blue);
  color: #fff;
}
.tag:hover { transform: translateY(-2px) scale(1.05); }

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}
.project-media {
  height: 220px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  transition: transform 0.6s var(--ease);
  overflow: hidden;
}
.project-card:hover .project-media { transform: scale(1.04); }
.project-media-1 { background: linear-gradient(135deg, #2a70ab, #123650); }
.project-media-2 { background: linear-gradient(135deg, #5498c5, #2a70ab); }
.project-media-3 { background: linear-gradient(135deg, #1c4a6e, #5498c5); }
.project-media::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
}
.project-tag {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.35);
}
.project-body { padding: 24px 22px 28px; }
.project-body h3 { font-size: 1.08rem; margin-bottom: 10px; }
.project-body p { color: var(--text-light); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 50px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.info-item { display: flex; gap: 18px; align-items: flex-start; }
.info-icon {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--blue-pale);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.info-icon svg { width: 22px; height: 22px; }
.info-item h4 { font-size: 1rem; margin-bottom: 4px; }
.info-item p { color: var(--text-light); font-size: 0.94rem; }
.info-item a:hover { color: var(--blue); }

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { position: relative; margin-bottom: 22px; }
.field input,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 14px 8px;
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text);
  background: transparent;
  transition: border-color 0.3s;
  resize: none;
}
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--blue); }
.field label {
  position: absolute;
  top: 15px; left: 14px;
  color: var(--text-light);
  font-size: 0.96rem;
  pointer-events: none;
  transition: all 0.25s var(--ease);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: 4px;
  font-size: 0.7rem;
  color: var(--blue);
  font-weight: 600;
}
.form-submit { width: 100%; margin-top: 4px; }
.form-note { margin-top: 14px; font-size: 0.88rem; color: var(--blue); text-align: center; min-height: 1em; }

/* ===================== Footer ===================== */
.site-footer { background: var(--blue-dark); color: rgba(255,255,255,0.75); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  padding: 90px 0 60px;
}
.footer-brand .logo-tagline { color: rgba(255,255,255,0.85); }
.footer-brand p { margin-top: 18px; max-width: 320px; font-size: 0.92rem; }
.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; font-size: 0.92rem; }
.footer-col a { transition: color 0.3s, padding-left 0.3s; }
.footer-col a:hover { color: #fff; padding-left: 4px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 28px 0; }
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
}
.credit { color: rgba(255,255,255,0.55); }

/* ---------- To top ---------- */
.to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(42, 112, 171, 0.55);
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s, transform 0.35s var(--ease), visibility 0.35s, background 0.3s;
  z-index: 400;
}
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--blue-dark); }
.to-top svg { width: 20px; height: 20px; }

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
  .value-grid, .service-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .value-grid, .service-grid, .project-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; padding: 64px 20px 44px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; gap: 8px; }
  .hero-inner { padding-top: 70px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .contact-form { padding: 28px; }
  .to-top { bottom: 18px; right: 18px; }
}

@media (max-width: 400px) {
  .logo-img { height: 38px; }
  .logo-tagline { display: none; }
  .hero-title { font-size: clamp(2.1rem, 9vw, 2.6rem); }
}

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