/* =========================================================
   Mimtech Technology Sdn Bhd — Landing Page Styles
   Palette: White / Blue / Red
   ========================================================= */

:root {
  --blue-900: #0a1f44;
  --blue-800: #0f2a5c;
  --blue-700: #123a7a;
  --blue-600: #1650b8;
  --blue-500: #3a5fa0;
  --blue-150: #cfdff9;
  --blue-100: #e6eefc;
  --blue-50:  #f2f6fd;

  --red-600: #9c2138;
  --red-500: #b8293f;
  --red-150: #eecdd3;
  --red-100: #f5e6e9;
  --red-50:  #fbf1f2;

  --amber-500: #c9812f;

  --white: #f6f8fc;
  --gray-900: #101828;
  --gray-700: #3f4757;
  --gray-500: #6b7280;
  --gray-300: #d9dee6;
  --gray-100: #f5f7fa;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(10, 31, 68, 0.06);
  --shadow-md: 0 12px 32px rgba(10, 31, 68, 0.12);
  --shadow-lg: 0 24px 60px rgba(10, 31, 68, 0.18);

  --container-width: 1180px;
  --transition: 0.25s ease;

  /* Fonts — loaded via Google Fonts (see index.html).
     Big Shoulders Display: free industrial-condensed face (Biosphere
     look-alike) for headings/brand elements. IBM Plex Sans for body copy —
     designed for an engineering/tech company. Plex Mono for stats/data. */
  --font-display: 'Big Shoulders Display', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--blue-900);
  line-height: 1.1;
  letter-spacing: 0;
}

h2 { font-size: clamp(2rem, 3.2vw, 2.75rem); }
h3 { font-size: 1.25rem; }

p { color: var(--gray-700); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-600);
  background: var(--red-100);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.eyebrow-light {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.text-accent { color: var(--red-600); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(155deg, var(--red-500), var(--red-600));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: linear-gradient(155deg, var(--red-600), var(--red-600)); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--blue-900);
  border-color: var(--gray-300);
}
.btn-outline:hover { border-color: var(--blue-600); color: var(--blue-600); transform: translateY(-2px); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); transform: translateY(-2px); }

.btn-lg { padding: 15px 30px; font-size: 1rem; }

/* ===== Intro ===== */
html.intro-active, body.intro-active { overflow: hidden; height: 100%; }

.site-intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(184,41,63,0.08), transparent 42%),
    radial-gradient(circle at 84% 82%, rgba(22,80,184,0.1), transparent 50%),
    linear-gradient(155deg, #ffffff, var(--blue-50));
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s cubic-bezier(0.65, 0, 0.35, 1), visibility 0.7s;
}
.site-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(10,31,68,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(10,31,68,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0;
  animation: introGrid 1.4s ease forwards;
  animation-delay: 0.1s;
}
.site-intro.site-intro-exit { opacity: 0; visibility: hidden; pointer-events: none; }

.site-intro-inner { position: relative; text-align: center; }

.site-intro-logo-wrap {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: min(80vw, 560px);
  margin: 0 auto 30px;
}

.site-intro-logo {
  display: block;
  width: 100%;
  height: auto;
}

.site-intro-logo-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0.85) 52%, transparent 62%);
  background-size: 60% 100%;
  background-repeat: no-repeat;
  background-position: -60% 0;
  -webkit-mask-image: url("assets/mimtech-logo.png");
          mask-image: url("assets/mimtech-logo.png");
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  opacity: 0;
  animation: introShineSweep 2.6s ease-in-out infinite;
  animation-delay: 1s;
}

.site-intro-tag {
  margin-top: 10px;
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-700);
  font-weight: 500;
  opacity: 0;
  animation: introFade 0.6s ease forwards;
  animation-delay: 1s;
}

.site-intro-line {
  display: block;
  width: 0;
  height: 2px;
  margin: 28px auto 0;
  background: linear-gradient(90deg, transparent, var(--red-500) 12%, var(--blue-800) 50%, var(--red-500) 88%, transparent);
  animation: introLine 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: 1.25s;
}

.site-intro-skip {
  position: absolute;
  right: 28px;
  bottom: 28px;
  background: rgba(10,31,68,0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(10,31,68,0.16);
  color: var(--blue-700);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  animation: introFade 0.6s ease forwards;
  animation-delay: 0.15s;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.site-intro-skip:hover { color: var(--blue-900); border-color: rgba(10,31,68,0.35); background: rgba(10,31,68,0.06); }

@keyframes introGrid { to { opacity: 1; } }
@keyframes introFade { to { opacity: 1; } }
@keyframes introLine { to { width: 120px; } }
@keyframes introShineSweep {
  0%, 6% { background-position: -60% 0; opacity: 0; }
  16% { opacity: 1; }
  42% { opacity: 1; }
  55%, 100% { background-position: 160% 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-intro { display: none; }
}

@media (max-width: 560px) {
  .site-intro-logo-wrap { width: min(88vw, 380px); margin-bottom: 20px; }
  .site-intro-tag { font-size: 0.85rem; }
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246,248,252,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-300);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; letter-spacing: 0.02em; color: var(--blue-900); }
.logo-img { display: block; height: 48px; width: auto; transform: translateY(-9px); }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: var(--white);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
}
.logo-dot { color: var(--red-600); }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  font-weight: 800;
  color: var(--gray-700);
  transition: color var(--transition);
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { color: var(--blue-600); }
.main-nav a.active { color: var(--blue-700); font-weight: 900; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--blue-900);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===== Blueprint grid + pipe-line decoration =====
   Shared decorative language for light sections: a faint technical grid
   plus a thin dashed "pipe route" accent, echoing the hero telemetry card
   and intro overlay so the whole page feels like one system. */
.blueprint-section { position: relative; z-index: 0; overflow: hidden; }
.blueprint-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(10,31,68,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,31,68,0.09) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 90%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 90%);
}
/* Same grid, recoloured light-on-dark for sections with a navy background */
.blueprint-section-dark::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
}
.pipeline-accent {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  fill: none;
  stroke: var(--blue-600);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 7 8;
  opacity: 0.22;
}
.pipeline-accent circle { fill: var(--blue-600); stroke: none; }
.pipeline-accent-red { stroke: var(--red-500); }
.pipeline-accent-red circle { fill: var(--red-500); }

.pipeline-accent-hero { width: 220px; height: 460px; top: -20px; left: 2%; }
.pipeline-accent-services { width: 250px; height: 300px; top: -20px; right: 5%; transform: scaleX(-1); }
.pipeline-accent-about { width: 260px; height: 320px; top: -30px; right: 4%; transform: scaleX(-1); }
.pipeline-accent-products { width: 280px; height: 340px; bottom: -40px; left: 3%; }
.pipeline-accent-portfolio { width: 260px; height: 320px; top: -20px; right: 4%; transform: scaleX(-1); }

/* ===== Hero ===== */
.hero {
  padding: 96px 0 56px;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 68px;
  align-items: start;
}
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); font-weight: 800; margin: 16px 0 22px; }
.hero-lead { font-size: 1.08rem; font-weight: 500; max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }

.hero-reassurance { font-size: 0.86rem; color: var(--gray-500); margin-bottom: 36px; }
.hero-reassurance a { color: var(--blue-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.hero-reassurance a:hover { color: var(--blue-600); }

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; color: var(--blue-800); }
.hero-stat span { font-size: 0.85rem; color: var(--gray-500); }
.hero-stat-permits { gap: 8px; }
.hero-stat-permits span { padding-left: 9px; }
.hero-permit-logos { display: flex; align-items: center; gap: 8px; }
.hero-permit-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 60px;
  background: var(--white);
  border: 1px solid var(--blue-100);
  border-radius: 8px;
  padding: 5px 8px;
  box-shadow: var(--shadow-sm);
}
.hero-permit-logo { display: block; height: 100%; width: 100%; object-fit: contain; }

.hero-media { display: flex; flex-direction: column; gap: 20px; }
.hero-image-main {
  position: relative;
  height: 400px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(circle at 82% 4%, rgba(37,99,235,0.4), transparent 55%),
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    var(--blue-900);
  background-size: auto, 28px 28px, 28px 28px, auto;
}

/* ===== Hero slider: telemetry card / noise grid card ===== */
.hero-slider { overflow: hidden; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slider-dots {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 7px;
  z-index: 2;
}
.hero-slider-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-slider-dot { cursor: pointer; }
.hero-slider-dot.is-active { background: var(--white); transform: scale(1.3); }

/* ===== Telemetry card (decorative) ===== */
.telemetry-card, .noise-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 30px;
}
.telemetry-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.telemetry-zone { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.telemetry-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5fa584;
}
.telemetry-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5fa584;
  box-shadow: 0 0 8px rgba(52,211,153,0.8);
  animation: telemetryBlink 1.8s ease-in-out infinite;
}

.telemetry-chart { position: relative; flex: 1; margin: 16px 0; min-height: 60px; }
.telemetry-svg { width: 100%; height: 100%; display: block; }
.telemetry-grid { stroke: rgba(255,255,255,0.12); stroke-width: 1; }
.telemetry-path { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 7 7; animation: telemetryFlow 2.6s linear infinite; }
.telemetry-path-flow { stroke: #8fa8d1; }
.telemetry-path-pressure { stroke: var(--red-500); opacity: 0.8; }

.telemetry-pulse {
  position: absolute;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #5fa584;
}
.telemetry-pulse::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #5fa584;
  opacity: 0.65;
  animation: telemetryPing 1.9s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.telemetry-stats { display: flex; gap: 8px; }
.telemetry-stats div {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 10px;
}
.telemetry-stats strong { display: block; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--white); }
.telemetry-stats strong.is-tick { animation: telemetryTick 0.5s ease; }
.telemetry-stats span { font-size: 0.62rem; letter-spacing: 0.03em; text-transform: uppercase; color: rgba(255,255,255,0.5); }

@keyframes telemetryFlow { to { stroke-dashoffset: -28; } }
@keyframes telemetryBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes telemetryPing {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes telemetryTick { 0% { color: #5fa584; } 100% { color: var(--white); } }

/* ===== Noise grid card (decorative) ===== */
.noise-table-wrap { flex: 1; margin: 16px 0 6px; display: flex; align-items: center; overflow: hidden; }
table.noise-grid { border-collapse: separate; border-spacing: 3px; width: 100%; table-layout: fixed; }
.noise-grid th, .noise-grid td { font-family: var(--font-mono); text-align: center; }
.noise-grid thead th { font-size: 0.6rem; letter-spacing: 0.03em; color: rgba(255,255,255,0.45); font-weight: 500; padding-bottom: 4px; }
.noise-grid thead th.today { color: #7dd3a8; }
.noise-grid .logger-cell {
  text-align: left;
  font-size: 0.64rem;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  padding-right: 8px;
}
.noise-grid .logger-cell .loc {
  display: block;
  font-family: var(--font-body);
  font-size: 0.56rem;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}
.noise-grid td.cell {
  border-radius: 6px;
  padding: 6px 2px;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}
.noise-grid .band-normal   { background: rgba(22,80,184,0.55); }
.noise-grid .band-elevated { background: rgba(201,129,47,0.7); }
.noise-grid .band-critical { background: rgba(184,41,63,0.85); }

.noise-grid tr.flagged .logger-cell { color: #f3b3bf; }
.noise-grid tr.flagged .logger-cell::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red-500);
  margin-right: 5px;
  vertical-align: middle;
  animation: noiseFlagPulse 1.6s ease-in-out infinite;
}

.noise-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.noise-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.noise-legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.noise-flag-note { margin-left: auto; color: #f3b3bf !important; }

@keyframes noiseFlagPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(184,41,63,0); }
  50% { box-shadow: 0 0 6px rgba(184,41,63,0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .telemetry-path, .telemetry-status-dot, .telemetry-pulse::before, .noise-grid tr.flagged .logger-cell::before { animation: none; }
  .hero-slide { transition: none; }
}
.hero-badge-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-chip {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.hero-chip-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hero-chip-icon svg { width: 19px; height: 19px; }
.hero-chip-icon-red { background: var(--red-100); color: var(--red-600); }
.hero-chip strong { display: block; font-size: 0.86rem; color: var(--blue-900); }
.hero-chip span { font-size: 0.76rem; color: var(--gray-500); }

/* ===== Trust strip ===== */
.trust-strip { padding: 28px 0; border-bottom: 1px solid var(--gray-300); }
.trust-inner { display: flex; flex-direction: column; gap: 20px; }
.trust-label { font-size: 0.82rem; font-weight: 600; color: var(--gray-500); text-align: center; }
.trust-logos { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.trust-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 158px;
  height: 52px;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.trust-logo:hover,
.trust-logo:focus-visible {
  border-color: var(--blue-700);
  transform: translateY(-2px);
}
.trust-logo img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}
/* Shown automatically in place of the <img> until its file is added to assets/logos/ */
.trust-logo-fallback {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--blue-700);
}
.trust-logo:hover .trust-logo-fallback,
.trust-logo:focus-visible .trust-logo-fallback { color: var(--blue-900); }

/* ===== About ===== */
.about { padding: 100px 0; background: linear-gradient(155deg, var(--blue-900), var(--blue-700)); }
.about-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.about-media { position: relative; height: 480px; display: flex; gap: 18px; }
.about-image { display: block; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); object-fit: cover; }
.about-image-main {
  width: 62%; height: 100%;
  border: 3px solid var(--white);
}
.about-side { display: flex; flex-direction: column; gap: 18px; flex: 1; min-width: 0; }
.about-image-secondary {
  width: 100%; flex: 1; min-height: 0;
  border: 3px solid var(--white);
}
.about-image-focus-low { object-position: center 72%; }
.about-experience-card {
  position: absolute;
  left: 0;
  width: 62%; /* matches .about-image-main so it never bleeds into the side column */
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(100deg, var(--red-600), var(--red-500));
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 -10px 26px rgba(10,31,68,0.28);
  padding: 18px 22px;
}
.about-experience-card strong {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  flex-shrink: 0;
  padding-right: 16px;
  border-right: 1px solid rgba(255,255,255,0.35);
}
.about-experience-card span {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255,255,255,0.92);
  max-width: 200px;
}

.about-content h2 { margin-bottom: 18px; color: var(--white); }
.about-content p { margin-bottom: 22px; max-width: 560px; color: rgba(255,255,255,0.78); }
.about-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.about-list li { display: flex; align-items: center; gap: 10px; font-weight: 500; color: rgba(255,255,255,0.92); }
.check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: var(--white);
  font-size: 0.75rem; font-weight: 800; flex-shrink: 0;
}
.about-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Section heading ===== */
.section-heading { max-width: 620px; margin: 0 auto 56px; text-align: center; }
.section-heading p { font-size: 1.02rem; }

/* ===== Services ===== */
.services { padding: 100px 0; background: var(--gray-100); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-500), var(--blue-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--blue-100);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--blue-700);
  transition: background var(--transition), color var(--transition);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card:hover .service-icon { background: var(--blue-700); color: var(--white); }
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 0.94rem; margin-bottom: 18px; }
.service-link { font-weight: 600; font-size: 0.9rem; color: var(--red-600); }

/* ===== Projects ===== */
.projects { padding: 100px 0; }
#products.projects { background: var(--red-600); }
#products .section-heading h2 { color: var(--white); }
#products .section-heading p { color: rgba(255,255,255,0.82); }
#portfolio.projects { background: var(--blue-150); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.project-image { display: block; width: 100%; height: 210px; object-fit: cover; }
.project-image-focus-low { object-position: center 70%; }
.project-image-focus-top { object-position: center 12%; }
.project-image-1 { background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); }
.project-image-2 { background: linear-gradient(135deg, var(--red-600), var(--red-500)); }
.project-image-3 { background: linear-gradient(135deg, var(--blue-900), var(--blue-600)); }
.project-body { padding: 22px 24px; background: var(--white); }
.project-meta { font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; color: var(--red-600); text-transform: uppercase; letter-spacing: 0.05em; }
.project-body h3 { margin: 10px 0 14px; font-size: 1.1rem; }
.project-body p { font-size: 0.9rem; }
.project-link { font-weight: 600; font-size: 0.9rem; color: var(--blue-700); }
.portfolio-cta { text-align: center; margin-top: 44px; }

/* ===== Product detail cards — 2D horizontal slide (no 3D rendering) ===== */
.flip-card {
  position: relative;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  border-radius: var(--radius-md);
  isolation: isolate;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transform: translateX(0);
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Front card is visible first. */
.flip-card-front {
  z-index: 2;
  background: var(--white);
  transform: translateX(0);
  pointer-events: auto;
}

/* Details panel waits just outside the right edge. */
.flip-card-back {
  z-index: 1;
  background: linear-gradient(155deg, var(--blue-800), var(--blue-900));
  padding: 26px 26px 24px;
  justify-content: flex-start;
  transform: translateX(100%);
  pointer-events: none;
}

/* Details pressed: front exits left, details enters from right. */
.flip-card.is-flipped .flip-card-front {
  transform: translateX(-100%);
  pointer-events: none;
}

.flip-card.is-flipped .flip-card-back {
  transform: translateX(0);
  pointer-events: auto;
}

.flip-card-back h3 {
  color: var(--white);
  margin: 10px 0 16px;
  font-size: 1.05rem;
}

.project-meta-light {
  align-self: flex-start;
  color: var(--white);
  background: rgba(255,255,255,0.14);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  margin-right: 70px;
}

.model-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.model-list li {
  color: rgba(255,255,255,0.9);
  font-size: 0.92rem;
  font-weight: 500;
  padding-left: 16px;
  position: relative;
}

.model-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-500);
}

.project-link-light { color: var(--white); }

.flip-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(10, 31, 68, 0.6);
  border: none;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  z-index: 4;
}

.flip-btn-icon { font-size: 0.9rem; line-height: 1; }
.flip-btn:hover,
.flip-btn:focus-visible { background: var(--red-600); transform: translateY(-1px); }
.flip-btn-back { background: rgba(255,255,255,0.16); }
.flip-btn-back:hover,
.flip-btn-back:focus-visible { background: var(--red-500); }

/* Users who prefer reduced motion get an instant panel swap. */
@media (prefers-reduced-motion: reduce) {
  .flip-card-front,
  .flip-card-back { transition: none; }
}

/* ===== Why us ===== */
.why-us { padding: 100px 0; background: linear-gradient(155deg, var(--blue-900), var(--blue-700)); }
.why-us-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.why-us-content h2 { color: var(--white); margin-bottom: 18px; }
.why-us-content > p { color: rgba(255,255,255,0.78); max-width: 520px; margin-bottom: 36px; }
.why-us-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.why-us-item { display: flex; align-items: flex-start; gap: 14px; }
.why-us-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red-500), var(--blue-600));
  color: var(--white);
}
.why-us-badge svg { width: 20px; height: 20px; }
.why-us-item strong { display: block; color: var(--white); font-size: 1rem; margin-bottom: 6px; }
.why-us-item span { color: rgba(255,255,255,0.7); font-size: 0.88rem; }

.why-us-media-col { display: flex; flex-direction: column; gap: 20px; }
.why-us-media { position: relative; height: 460px; }
.why-us-logos { display: flex; gap: 10px; width: 96%; margin-left: auto; }
.why-us-logo { flex: 1; width: auto; height: 48px; padding: 6px 10px; }
.why-us-image { position: absolute; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); object-fit: cover; }
.why-us-image-main { width: 96%; height: 100%; right: 0; top: 0; border: 1px solid rgba(255,255,255,0.18); }
.why-us-slider { overflow: hidden; }
.why-us-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 78%;
  opacity: 0;
  transition: opacity 1s ease;
}
.why-us-slide.is-active { opacity: 1; }
.why-us-slide-top { object-position: center 18%; }
.why-us-slider-dots {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 7px;
  z-index: 2;
}
.why-us-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}
.why-us-dot { cursor: pointer; }
.why-us-dot.is-active { background: var(--white); transform: scale(1.3); }
.why-us-image-secondary { width: 34%; height: 30%; left: 0; bottom: 0; border: 6px solid var(--blue-900); }
.why-us-callout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(155deg, var(--red-500), var(--red-600));
  padding: 12px 14px;
  box-sizing: border-box;
}
.why-us-callout-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: rgba(255,255,255,0.14);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1px;
}
.why-us-callout-icon svg { width: 14px; height: 14px; }
.why-us-callout strong { font-size: 0.78rem; color: var(--white); line-height: 1.25; }
.why-us-callout-link { font-weight: 600; font-size: 0.74rem; color: var(--white); }

/* ===== Testimonials ===== */
.testimonials { padding: 100px 0; }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  border-top: 3px solid var(--red-500);
}
.testimonial-card p { color: var(--gray-900); font-size: 0.96rem; margin-bottom: 22px; }
.testimonial-card footer strong { display: block; color: var(--blue-900); font-size: 0.92rem; }
.testimonial-card footer span { font-size: 0.8rem; color: var(--gray-500); }

/* ===== CTA band ===== */
.cta-band { padding: 70px 0; background: var(--red-600); }
.cta-inner { text-align: center; max-width: 620px; margin: 0 auto; }
.cta-band h2 { color: var(--white); margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.88); margin-bottom: 30px; }
.cta-band .btn-primary { background: var(--white); color: var(--red-600); }
.cta-band .btn-primary:hover { background: var(--blue-50); color: var(--red-600); }

/* ===== Contact ===== */
.contact { padding: 100px 0; background: var(--blue-900); }
.contact-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 64px; }
.contact-map-wrap h2 { color: var(--white); margin: 14px 0 12px; }
.contact-map-wrap > p { color: rgba(255,255,255,0.75); max-width: 480px; margin-bottom: 28px; }
.contact-map {
  width: 100%;
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.12);
}
.contact-map iframe { width: 100%; height: 100%; min-height: 420px; display: block; }

.contact-details { color: var(--white); padding-top: 12px; }
.section-tag { font-family: var(--font-display); color: var(--red-500); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; }
.contact-details h3 { color: var(--white); margin: 10px 0 12px; font-size: 1.6rem; }
.contact-details > p { color: rgba(255,255,255,0.7); margin-bottom: 30px; }
.contact-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  color: var(--white);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-list strong { display: block; color: var(--white); font-size: 0.92rem; margin-bottom: 3px; }
.contact-list span { color: rgba(255,255,255,0.65); font-size: 0.88rem; }
.contact-logo-wrap { display: flex; }
.contact-logo { display: block; height: 76px; width: auto; filter: brightness(0.8) saturate(0.85); opacity: 0.92; }

/* ===== Footer ===== */
.site-footer { background: #071531; padding: 64px 0 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.88rem; margin-top: 14px; max-width: 240px; }
.footer-brand .logo { position: relative; color: var(--white); margin-bottom: 4px; }
.footer-brand .logo-img { position: relative; z-index: 1; height: 44px; transform: none; }
.footer-logo-glow {
  animation: footer-logo-glow-pulse 3s ease-in-out infinite;
}
@keyframes footer-logo-glow-pulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 5px rgba(120, 175, 255, 0.75))
      drop-shadow(0 0 14px rgba(80, 145, 235, 0.5))
      drop-shadow(0 0 26px rgba(60, 120, 220, 0.3));
  }
  50% {
    filter:
      drop-shadow(0 0 9px rgba(120, 175, 255, 0.9))
      drop-shadow(0 0 22px rgba(80, 145, 235, 0.65))
      drop-shadow(0 0 38px rgba(60, 120, 220, 0.4));
  }
}
@media (prefers-reduced-motion: reduce) {
  .footer-logo-glow { animation: none; filter: drop-shadow(0 0 8px rgba(120, 175, 255, 0.8)) drop-shadow(0 0 20px rgba(80, 145, 235, 0.55)); }
}
.footer-col h4 { color: var(--white); font-size: 0.88rem; margin-bottom: 18px; letter-spacing: 0.06em; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: rgba(255,255,255,0.55); font-size: 0.88rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 24px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--red-600);
  color: var(--white);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background var(--transition);
  z-index: 90;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--red-500); }

/* ===== Scroll animations =====
   Content is visible by default (no-JS / slow-JS safe).
   Only when JS has confirmed it's running (body.js-animate) do we
   hide [data-animate] elements pending their scroll reveal. */
body.js-animate [data-animate] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
body.js-animate [data-animate].in-view { opacity: 1; transform: translateY(0); }

/* =========================================================
   RESPONSIVE — MOBILE + TABLET
   iPhone / Android / iPad / Android tablets
   Desktop/laptop styles above stay unchanged.
   ========================================================= */

/* Safe overflow defaults */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Allow grid/flex children and long strings to shrink/wrap safely */
.hero-inner > *,
.about-inner > *,
.why-us-inner > *,
.contact-inner > *,
.services-grid > *,
.projects-grid > *,
.why-us-grid > *,
.hero-chip > div,
.about-content,
.why-us-content,
.contact-details,
.contact-list li > div,
.service-card,
.project-card,
.flip-card-inner,
.flip-card-front,
.flip-card-back {
  min-width: 0;
}

.contact-list span,
.model-list li,
.project-body p,
.service-card p,
.about-list li,
.why-us-item span,
.hero-chip span,
.hero-reassurance,
.footer-bottom,
.project-meta-light {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* =========================================================
   TABLET + MOBILE BASE
   - all screens <= 980px
   - touch tablets up to 1100px (e.g. iPad landscape)
   ========================================================= */
@media (max-width: 980px),
       (min-width: 981px) and (max-width: 1100px) and (hover: none) and (pointer: coarse) {

  .container {
    padding-left: 22px;
    padding-right: 22px;
  }

  /* Header / hamburger */
  .site-header { width: 100%; }

  .header-inner {
    position: relative;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .logo-img {
    height: 42px;
    transform: none;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 18px;
    padding: 20px 24px max(20px, env(safe-area-inset-bottom));
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    box-shadow: var(--shadow-md);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.open { display: flex; }
  .main-nav a { font-size: 1.02rem; line-height: 1.35; }
  .nav-toggle { display: flex; }
  .header-actions .btn-primary { display: none; }

  /* Main page layout */
  .hero-inner,
  .about-inner,
  .why-us-inner,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero {
    padding-top: 76px;
    padding-bottom: 52px;
  }

  .about,
  .services,
  .projects,
  .why-us,
  .contact {
    padding-top: 78px;
    padding-bottom: 78px;
  }

  .section-heading { margin-bottom: 44px; }

  /* Hero */
  .hero-media { margin-top: 24px; }
  .hero-image-main { height: 320px; }

  .telemetry-card,
  .noise-card {
    padding: 16px 16px 14px;
  }

  .telemetry-chart { margin: 10px 0; }
  .telemetry-stats { gap: 8px; }
  .telemetry-stats div { padding: 7px 8px; }
  .telemetry-stats strong { font-size: 0.9rem; }
  .telemetry-stats span { font-size: 0.56rem; }
  .telemetry-zone,
  .telemetry-status { font-size: 0.6rem; }

  .noise-grid .logger-cell .loc { display: none; }
  .noise-grid td.cell { font-size: 0.6rem; padding: 4px 2px; }
  .noise-legend { gap: 8px; margin-bottom: 14px; }
  .noise-legend span { font-size: 0.52rem; }
  .noise-legend .noise-flag-note { display: none; }

  /* About image collage */
  .about-media {
    height: 320px;
    margin-top: 16px;
  }

  .about-experience-card {
    left: 0;
    right: auto;
    bottom: 0;
    width: 62%;
    min-height: 66px;
    justify-content: center;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: linear-gradient(100deg, var(--red-600), var(--red-500));
    box-shadow: 0 -8px 22px rgba(10,31,68,0.24);
  }

  .about-experience-card strong {
    min-width: 54px;
    font-size: 1.65rem;
    padding-right: 12px;
    text-align: center;
  }

  .about-experience-card span {
    max-width: none;
    font-size: 0.72rem;
    line-height: 1.28;
    color: rgba(255,255,255,0.95);
  }

  /* Services / products / portfolio */
  .services-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .service-card { padding: 28px 24px; }

  /* 2D detail cards: extra height for wrapped tablet content */
  .flip-card-inner { min-height: 405px; }
  .flip-card-back { padding: 24px 24px 22px; }
  .model-list { gap: 9px; }
  .model-list li { line-height: 1.42; }

  .project-meta-light {
    margin-right: 0;
    max-width: calc(100% - 92px);
  }

  /* Why Us image + polished red licence box */
  .why-us-media {
    height: 320px;
    margin-top: 16px;
  }

  .why-us-image-main { width: 100%; }

  .why-us-image-secondary.why-us-callout {
    width: 136px;
    height: 104px;
    min-height: 0;
    left: 14px;
    right: auto;
    bottom: 14px;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    border: 4px solid var(--blue-900);
    border-radius: 16px;
    background: linear-gradient(155deg, var(--red-500), var(--red-600));
    box-shadow: 0 10px 24px rgba(7,21,49,0.26);
    z-index: 4;
  }

  .why-us-callout-icon {
    width: 28px;
    height: 28px;
    margin: 0 0 2px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .why-us-callout-icon svg {
    width: 14px;
    height: 14px;
  }

  .why-us-callout strong {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.18;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .why-us-callout-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0;
    font-size: 0.66rem;
    line-height: 1.15;
    color: rgba(255,255,255,0.96);
  }

  /* Slider controls stay at the bottom-centre of the image. */
  .why-us-slider-dots {
    bottom: 10px;
    z-index: 5;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(7,21,49,0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .why-us-dot.is-active { transform: scale(1.25); }

  .why-us-logos {
    width: 100%;
    margin-left: 0;
  }

  .why-us-logo { min-width: 0; }

  /* Contact */
  .contact-details { padding-top: 0; }
  .contact-list li { min-width: 0; }

  .back-to-top {
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

/* =========================================================
   PHONE + SMALL TABLET
   ========================================================= */
@media (max-width: 760px) {

  .container {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }

  h2 { font-size: clamp(1.9rem, 8vw, 2.35rem); }
  h3 { line-height: 1.18; }

  .hero {
    padding-top: 54px;
    padding-bottom: 44px;
  }

  .about,
  .services,
  .projects,
  .why-us,
  .contact {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .cta-band { padding: 54px 0; }
  .section-heading { margin-bottom: 34px; }
  .section-heading p { font-size: 0.96rem; }

  /* Buttons wrap instead of overflowing */
  .btn {
    max-width: 100%;
    min-height: 44px;
    white-space: normal;
    text-align: center;
    justify-content: center;
    line-height: 1.25;
  }

  .hero-actions .btn,
  .about-actions .btn {
    flex: 1 1 150px;
  }

  /* Header */
  .header-inner { min-height: 62px; }
  .logo-img { height: 38px; }

  .nav-toggle {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  /* Hero */
  .hero h1 {
    font-size: clamp(2.05rem, 10.5vw, 2.8rem);
    margin-top: 12px;
    margin-bottom: 18px;
  }

  .hero-lead {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .hero-reassurance {
    margin-bottom: 28px;
    line-height: 1.55;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
    width: 100%;
  }

  .hero-stat-permits { grid-column: 1 / -1; }
  .hero-stat strong { font-size: 1.5rem; }

  .hero-media { margin-top: 8px; }

  .hero-image-main {
    height: 340px;
    border-radius: 18px;
  }

  .telemetry-card,
  .noise-card {
    padding: 14px 12px 22px;
  }

  .telemetry-head { gap: 6px; }
  .telemetry-zone,
  .telemetry-status { font-size: 0.56rem; }
  .telemetry-status { margin-left: auto; }

  .telemetry-stats { gap: 5px; }
  .telemetry-stats div { padding: 7px 5px; }
  .telemetry-stats strong { font-size: 0.82rem; }
  .telemetry-stats span { font-size: 0.49rem; line-height: 1.25; }

  table.noise-grid { border-spacing: 2px; }
  .noise-grid .logger-cell { font-size: 0.56rem; padding-right: 3px; }
  .noise-grid thead th { font-size: 0.52rem; }
  .noise-grid td.cell { font-size: 0.54rem; padding: 4px 1px; }
  .noise-legend { gap: 6px 9px; padding-top: 7px; margin-bottom: 8px; }
  .noise-legend span { font-size: 0.48rem; }

  .hero-badge-row { gap: 10px; }

  .hero-chip {
    min-width: 0;
    flex: 1 1 100%;
    padding: 13px 14px;
  }

  /* Partner logos */
  .trust-inner { gap: 14px; }

  .trust-logos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    justify-content: center;
  }

  .trust-logo {
    width: 100%;
    max-width: none;
    height: 50px;
    padding: 9px 13px;
  }

  .trust-logo:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(180px, 100%);
    justify-self: center;
  }

  /* About */
  .about-media {
    height: 350px;
    gap: 10px;
  }

  .about-side { gap: 10px; }

  .about-list li {
    align-items: flex-start;
    line-height: 1.45;
  }

  .check { margin-top: 1px; }

  /* Single-column content cards */
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .service-card { padding: 24px 21px; }
  .service-card p { font-size: 0.92rem; line-height: 1.55; }

  .project-image { height: 200px; }
  .project-body { padding: 20px 20px 22px; }
  .project-body h3 { font-size: 1.08rem; line-height: 1.22; }

  .flip-card-inner { min-height: 430px; }
  .flip-card-back { padding: 23px 21px 68px; }
  .flip-card-back h3 { font-size: 1.03rem; }
  .model-list li { font-size: 0.9rem; line-height: 1.4; padding-left: 14px; }

  /* Back button at bottom leaves room for long headings */
  .flip-btn-back {
    top: auto;
    right: 14px;
    bottom: 14px;
  }

  .project-meta-light { max-width: 100%; }

  /* Why Us */
  .why-us-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .why-us-item { gap: 12px; }
  .why-us-item span { line-height: 1.45; }
  .why-us-media { height: 350px; }

  .why-us-logos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .why-us-logo {
    width: 100%;
    height: 50px;
  }

  /* Contact */
  .contact-inner { gap: 42px; }

  .contact-map,
  .contact-map iframe {
    min-height: 280px;
  }

  .contact-details h3 { font-size: 1.45rem; }
  .contact-list { gap: 17px; }
  .contact-list li { gap: 11px; }
  .contact-icon { width: 38px; height: 38px; }
  .contact-list span { font-size: 0.86rem; line-height: 1.48; }

  .contact-logo {
    max-width: 100%;
    height: auto;
    max-height: 68px;
  }

  .cta-inner .btn { width: min(100%, 360px); }
  .footer-bottom { line-height: 1.45; }
}

/* =========================================================
   STANDARD PHONES
   320 / 360 / 375 / 390 / 412 / 430px
   ========================================================= */
@media (max-width: 520px) {

  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .site-intro-inner {
    width: 100%;
    padding: 0 20px;
  }

  .site-intro-logo-wrap { width: min(90vw, 360px); }

  .site-intro-tag {
    font-size: 0.78rem;
    line-height: 1.55;
    letter-spacing: 0.1em;
  }

  .site-intro-skip {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .eyebrow {
    font-size: 0.7rem;
    line-height: 1.35;
    padding: 6px 11px;
  }

  .hero-actions,
  .about-actions { gap: 10px; }

  .hero-actions .btn,
  .about-actions .btn {
    flex-basis: 100%;
    width: 100%;
  }

  .hero-permit-logos { flex-wrap: wrap; }
  .hero-permit-badge { width: 56px; height: 36px; }

  .hero-image-main { height: 330px; }
  .telemetry-zone { max-width: 55%; }

  .telemetry-status {
    max-width: 43%;
    text-align: right;
    justify-content: flex-end;
  }

  .noise-table-wrap {
    margin-top: 10px;
    margin-bottom: 4px;
  }

  table.noise-grid { border-spacing: 1px; }
  .noise-grid .logger-cell { font-size: 0.5rem; letter-spacing: -0.02em; }
  .noise-grid thead th { font-size: 0.48rem; }
  .noise-grid td.cell { font-size: 0.5rem; }
  .noise-legend span { font-size: 0.45rem; }

  .about-media { height: 320px; }
  .about-image-main { width: 64%; }
  .about-experience-card { width: 64%; }

  .project-image { height: 190px; }
  .flip-card-inner { min-height: 445px; }

  .why-us-media { height: 320px; }

  .contact-map,
  .contact-map iframe {
    min-height: 250px;
  }

  .contact-list span { font-size: 0.82rem; }
  .back-to-top { width: 44px; height: 44px; }
}

/* =========================================================
   EXTRA SMALL PHONES
   ========================================================= */
@media (max-width: 380px) {

  .why-us-image-secondary.why-us-callout {
    left: 10px;
    right: auto;
    bottom: 10px;
    width: 122px;
    height: 96px;
    padding: 9px 10px;
    border-width: 3px;
    border-radius: 14px;
  }

  .why-us-callout-icon {
    width: 25px;
    height: 25px;
  }

  .why-us-callout strong { font-size: 0.62rem; }
  .why-us-callout-link { font-size: 0.60rem; }
  .why-us-slider-dots { bottom: 8px; }

  .about-experience-card {
    left: 0;
    right: auto;
    bottom: 0;
    width: 64%;
    padding: 10px 10px;
    gap: 9px;
  }

  .about-experience-card strong {
    min-width: 48px;
    font-size: 1.45rem;
    padding-right: 9px;
  }

  .about-experience-card span {
    font-size: 0.64rem;
    line-height: 1.2;
  }
}

/* =========================================================
   VERY SMALL / SPLIT SCREEN
   ========================================================= */
@media (max-width: 360px) {

  .container {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .logo-img { height: 34px; }
  .hero h1 { font-size: 2rem; }

  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat-permits { grid-column: auto; }

  .hero-image-main { height: 320px; }

  .telemetry-card,
  .noise-card {
    padding-left: 9px;
    padding-right: 9px;
  }

  .telemetry-stats strong { font-size: 0.75rem; }
  .telemetry-stats span { font-size: 0.44rem; }

  .trust-logos { grid-template-columns: 1fr; }

  .trust-logo,
  .trust-logo:last-child:nth-child(odd) {
    grid-column: auto;
    width: min(180px, 100%);
    justify-self: center;
  }

  .about-media { height: 300px; }

  .service-card { padding: 22px 18px; }
  .project-body { padding-left: 18px; padding-right: 18px; }
  .flip-card-back { padding-left: 18px; padding-right: 18px; }
  .model-list li { font-size: 0.86rem; }

  .why-us-logos { grid-template-columns: 1fr 1fr; }
}

/* Touch devices should not keep desktop hover effects stuck after a tap */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover,
  .project-card:hover,
  .trust-logo:hover,
  .btn:hover {
    transform: none;
  }

  .flip-btn { min-height: 38px; }
}
