/* Intelligent Electromagnetics Ltd — site styles
   Palette follows the brand: black / white / grey with an amber accent. */

:root {
  --ink: #111111;
  --ink-2: #3a3a3a;
  --muted: #666666;
  --line: #e4e4e1;
  --paper: #ffffff;
  --paper-2: #f5f5f3;
  --black: #0b0b0b;
  --black-2: #171717;
  --accent: #ffbf23;
  --accent-deep: #e6a800;
  --container: 1160px;
  --gutter: 24px;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Hidden SVG icon sprite (kept out of flow; CSP forbids inline style attrs) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Skip link ------------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
}
.skip:focus { left: 12px; }

/* Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
}

.brand { display: inline-flex; line-height: 0; }
.brand img { height: 62px; width: auto; }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 34px;
}

.nav a {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.nav a:hover,
.nav a:focus-visible { border-bottom-color: var(--accent); }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-accent { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 128px 0 136px;
  background: var(--black);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  right: -4%;
  top: 50%;
  width: min(60vw, 780px);
  aspect-ratio: 1715 / 925;
  transform: translateY(-46%);
  background: url("../img/brand/mark-white.svg") center / contain no-repeat;
  opacity: 0.09;
  pointer-events: none;
}

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

.eyebrow {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(42px, 6.6vw, 78px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 26px;
}

.hero .lede {
  max-width: 640px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.65;
  color: #d6d6d6;
  margin-bottom: 40px;
}

.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Credibility strip under the hero ------------------------------------- */
.strip {
  background: var(--black-2);
  color: #d6d6d6;
  border-top: 1px solid #262626;
  padding: 18px 0;
  text-align: center;
  font-size: 15.5px;
}
.strip p { margin: 0; }
.strip a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}

/* Sections -------------------------------------------------------------- */
.section { padding: 104px 0; }
.section[id] { scroll-margin-top: 96px; }
.band { background: var(--paper-2); }
.dark { background: var(--black); color: #fff; }

.section-head {
  max-width: 820px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 300;
  letter-spacing: -0.015em;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 20px auto 0;
  background: var(--accent);
  border-radius: 2px;
}

.section-head .intro {
  margin-top: 26px;
  font-size: 18.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.dark .section-head .intro { color: #d0d0d0; }

/* Services -------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 52px 40px;
}

.card figure {
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover img { transform: scale(1.025); }

.card h3 {
  font-size: 23px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.card a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Team ------------------------------------------------------------------ */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 56px 48px;
}

.member { text-align: center; }

.member img {
  width: 176px;
  height: 176px;
  margin: 0 auto 22px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1);
  border: 4px solid #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.member h3 {
  font-size: 22px;
  font-weight: 600;
}

.member .role {
  display: block;
  margin: 6px 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.member .profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}
.member .profile:hover { color: #000; border-bottom-color: var(--accent-deep); }
.member .profile svg { width: 18px; height: 18px; }

.member .lead {
  margin: 0 0 12px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.member .bio {
  text-align: left;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* Contact --------------------------------------------------------------- */
.contact .section-head { margin-bottom: 40px; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.follow {
  max-width: 640px;
  margin: 72px auto 0;
  padding-top: 48px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.follow h3 {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 12px;
}

.follow p { color: #cfcfcf; margin-bottom: 22px; }

.follow a.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.follow a.link svg { width: 20px; height: 20px; }

/* Footer ---------------------------------------------------------------- */
.site-footer {
  background: #000;
  color: #9a9a9a;
  font-size: 14px;
  padding: 34px 0;
  border-top: 1px solid #1f1f1f;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 32px;
}

.site-footer .legal { max-width: 760px; }
.site-footer .legal p { margin: 0; }
.site-footer .legal p + p { margin-top: 6px; font-size: 13px; color: #7f7f7f; }
.site-footer a { color: #cfcfcf; text-decoration: none; }
.site-footer .legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { color: #fff; }
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
}

/* 404 ------------------------------------------------------------------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 300; margin-bottom: 16px; }
.notfound p { color: var(--muted); margin-bottom: 28px; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 860px) {
  .section { padding: 80px 0; }
  .hero { padding: 96px 0 104px; }
  .hero::after { width: 90vw; right: -30%; top: auto; bottom: -6%; transform: none; opacity: 0.07; }
}

@media (max-width: 720px) {
  .site-header .container {
    flex-direction: column;
    gap: 8px;
    padding-block: 12px;
    min-height: 0;
  }
  .brand img { height: 54px; }
  .nav ul { gap: 22px; flex-wrap: wrap; justify-content: center; }
  .nav a { font-size: 14px; }
  .section[id] { scroll-margin-top: 130px; }
  .section-head { margin-bottom: 44px; }
  .services { gap: 36px; }
  .team { gap: 48px; }
  .follow { margin-top: 56px; padding-top: 36px; }
  .site-footer .container { justify-content: center; text-align: center; }
  .site-footer .legal { max-width: none; }
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 84px; }
  .hero .actions .btn { width: 100%; }
  .contact-actions .btn { width: 100%; }
}

/* Utilities ------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
