: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, 0.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, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223, 229, 238, 0.8);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.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;
} */

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;

  font-size: 1.8rem;
  font-weight: 800;
  font-family: Inter, sans-serif;
  color: #162033;
}

.corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #162033;
}

.corner.tl {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 7px 0 0 0;
}

.corner.tr {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 7px 0 0;
}

.corner.bl {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 7px;
}

.corner.br {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 7px 0;
}

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: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(52px, 8vw, 104px) 0 58px;
}

.hero-image {
  margin: 0;
}

.hero-image figcaption {
  margin-top: 10px;
  margin-left: 10px;
  text-align: left;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
  font-style: italic;
}

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

h1,
h2,
h3 {
  line-height: 1.08;
  margin: 0;
}
h1 {
  font-size: clamp(2.55rem, 6vw, 5.5rem);
  letter-spacing: -0.06em;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.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, 0.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: 0.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, 0.78);
}

.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, 0.82);
}

.cards article.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.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, 0.42),
      rgba(255, 255, 255, 0.68)
    ),
    radial-gradient(
      circle at 20% 10%,
      rgba(255, 255, 255, 0.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, 0.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, 0.95fr) minmax(260px, 0.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: -0.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, 0.82),
      rgba(246, 248, 251, 0.64)
    ),
    repeating-linear-gradient(
      135deg,
      rgba(29, 79, 143, 0.08) 0 10px,
      rgba(29, 79, 143, 0) 10px 20px
    );
  color: #7a8598;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 14px 38px rgba(22, 32, 51, 0.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;
  }
}
