
:root {
  --ink: #162033;
  --muted: #5b667a;
  --line: #dfe5ee;
  --panel: #f6f8fb;
  --brand: #1d4f8f;
  --brand-dark: #12315a;
  --warm: #8f1f24;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(22,32,51,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
  line-height: 1.6;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223,229,238,.8);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
}

nav { display: flex; gap: 24px; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}
nav a:hover { color: var(--brand); }

.hero, .section {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(52px, 8vw, 104px) 0 58px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.55rem, 6vw, 5.5rem); letter-spacing: -.06em; }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.045em; }
h3 { font-size: 1.18rem; }

.lead {
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  max-width: 54ch;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(29,79,143,.25);
}

.button.secondary {
  background: var(--white);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-image img, .about-photo img {
  width: 100%;
  display: block;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.section { padding: 72px 0; }
.split {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
}

.split p, .about-copy p {
  color: var(--muted);
  font-size: 1.03rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cards article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 14px 38px rgba(22,32,51,.06);
}

.about {
  display: grid;
  grid-template-columns: minmax(260px, 390px) 1fr;
  gap: clamp(30px, 6vw, 76px);
  align-items: start;
}

.about-photo {
  position: sticky;
  top: 100px;
}

.about-copy p {
  max-width: 74ch;
}

.contact {
  margin-bottom: 72px;
  padding: 44px;
  border-radius: 30px;
  background: var(--ink);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.contact .eyebrow { color: #9ec4ff; }
.contact h2 { max-width: 760px; }
.contact .button { background: var(--white); color: var(--ink); }

@media (max-width: 900px) {
  nav { display: none; }
  .hero, .split, .about {
    grid-template-columns: 1fr;
  }
  .about-photo { position: relative; top: auto; max-width: 460px; }
  .cards { grid-template-columns: 1fr; }
  .contact { align-items: flex-start; flex-direction: column; }
}

/* Service card background textures */
.cards article.service-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 38px rgba(22,32,51,.08);
}

.cards article.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .92;
  filter: saturate(1.18) contrast(1.08);
  transform: scale(1.04);
}

.cards article.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.68)),
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.28), transparent 55%);
}

.cards article.service-card > * {
  position: relative;
  z-index: 1;
}

.cards article.service-card h3,
.cards article.service-card p {
  text-shadow: 0 1px 0 rgba(255,255,255,.58);
}

.cards article.pcb-design-card::before {
  background-image: url("assets/pcbbackground.png");
  background-position: 55% 50%;
}

.cards article.embedded-systems-card::before {
  background-image: url("assets/schematicbackground.png");
  background-position: 48% 50%;
}

.cards article.instrumentation-card::before {
  background-image: url("assets/testbackground.png");
  background-position: 50% 54%;
}

/* About page layout */
.page-hero {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(260px, .75fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(52px, 8vw, 104px) 0 58px;
}

.page-hero .lead {
  margin-bottom: 0;
}

.page-hero-photo img {
  width: 100%;
  display: block;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.about-article {
  max-width: 1180px;
  color: var(--muted);
  font-size: 1.04rem;
}

.about-article::after {
  content: "";
  display: block;
  clear: both;
}

.story-section {
  clear: both;
  padding: 0 0 clamp(34px, 5vw, 58px);
  margin: 0 0 clamp(28px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
}

.story-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.story-section .eyebrow {
  margin-top: 0;
  margin-bottom: 8px;
}

.story-section h2 {
  margin-bottom: 14px;
  max-width: none;
  font-size: clamp(1.35rem, 2.25vw, 2rem);
  letter-spacing: -.025em;
}

.story-section p {
  max-width: none;
}

.story-section p:last-child {
  margin-bottom: 0;
}

.story-image-placeholder {
  float: left;
  width: clamp(138px, 22vw, 240px);
  aspect-ratio: 4 / 3;
  margin: 4px clamp(18px, 3vw, 34px) 16px 0;
  display: grid;
  place-items: center;
  border: 1px dashed #b7c0cf;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(246,248,251,.64)),
    repeating-linear-gradient(135deg, rgba(29,79,143,.08) 0 10px, rgba(29,79,143,0) 10px 20px);
  color: #7a8598;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 14px 38px rgba(22,32,51,.06);
}

@media (max-width: 900px) {
  .page-hero {
    grid-template-columns: 1fr;
  }

  .page-hero-photo {
    max-width: 460px;
  }
}

@media (max-width: 620px) {
  .story-image-placeholder {
    float: none;
    width: 100%;
    max-width: 360px;
    margin: 0 0 18px 0;
  }
}
