/* =========================================================
   EASY WAY — EMBEDDED SYSTEMS & IoT SUPPORT
   Page: embedded-iot.html
   Independent layout; shares Index shell and hero scale.
   Own device-bus design language (distinct from Civil,
   Mechanical, Electrical and Renewable).
   ========================================================= */

.embedded-iot-page {
  --ei-navy: #071f35;
  --ei-ink: #0a2942;
  --ei-text: #607589;
  --ei-line: #dbe6ed;
  --ei-accent: #7fb0ff;
  --ei-accent-deep: #1769e0;
  background: #fff;
}

/* ---------------- HERO ---------------- */

.ei-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 84% 14%, rgba(127, 176, 255, .15), transparent 32%),
    radial-gradient(circle at 8% 90%, rgba(24, 184, 176, .09), transparent 34%),
    linear-gradient(120deg, #061c31 0%, #082943 58%, #0a3352 100%);
}

.ei-hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to right, #000 8%, transparent 92%);
}

.ei-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .78fr);
  gap: clamp(32px, 4vw, 58px);
  align-items: center;
  padding: 44px 0 46px;
}

.ei-hero__copy { max-width: 660px; }
.ei-hero__copy .eyebrow { color: var(--ei-accent); }

.ei-hero h1 {
  max-width: 640px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.55rem, 3.2vw, 3.35rem);
  line-height: 1.01;
  letter-spacing: -.035em;
}

.ei-hero h1 span {
  display: block;
  margin-top: 8px;
  color: var(--ei-accent);
}

.ei-hero__lead {
  max-width: 610px;
  margin: 16px 0 0;
  color: #c2d2de;
  font-size: .92rem;
  line-height: 1.62;
}

.ei-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.ei-hero__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: #e9f0fb;
  font-size: .68rem;
  font-weight: 800;
}

.ei-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 19px;
}

.ei-hero__actions .button { min-height: 45px; padding-inline: 18px; font-size: .79rem; }

.ei-hero__actions .button--outline {
  color: #fff;
  border-color: rgba(255,255,255,.27);
  background: rgba(255,255,255,.03);
}

/* Hero right — vertical device bus: SENSOR → MCU → ACTUATOR, CLOUD branch */

.ei-hero__board {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(255,255,255,.06);
  box-shadow: 0 28px 70px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
}

.ei-bus {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px 4px;
}

.ei-bus__node {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(4,18,31,.45);
}

.ei-bus__node i {
  grid-row: 1 / 3;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ei-accent);
  box-shadow: 0 0 10px rgba(127, 176, 255, .8);
}

.ei-bus__node span {
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.ei-bus__node small {
  color: #8fa9c0;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ei-bus__line {
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, var(--ei-accent), rgba(127,176,255,.25));
}

.ei-bus__line--dash {
  height: 18px;
  background: repeating-linear-gradient(180deg, rgba(127,176,255,.55) 0 4px, transparent 4px 8px);
}

.ei-hero__board figcaption {
  margin-top: 12px;
  padding: 13px 8px 3px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.ei-hero__board figcaption strong {
  display: block;
  color: #eef6ff;
  font-size: .86rem;
}

.ei-hero__board figcaption small {
  display: block;
  margin-top: 3px;
  color: #a9bccb;
  font-size: .72rem;
  line-height: 1.5;
}


/* ---------------- SHARED SECTION / HEADING ---------------- */

.ei-section {
  padding: 38px 0 40px;
}

.ei-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 50px;
  align-items: end;
  margin-bottom: 34px;
}

.ei-heading h2 {
  margin: 5px 0 0;
  color: var(--ei-ink);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.ei-heading > p {
  color: var(--ei-text);
  line-height: 1.65;
}

.ei-heading .eyebrow { color: var(--ei-accent-deep); }


/* ---------------- SCOPE CARDS ---------------- */

.ei-scope {
  background:
    radial-gradient(circle at 88% 6%, rgba(23, 105, 224, .07), transparent 44%),
    radial-gradient(circle at 4% 94%, rgba(23, 105, 224, .05), transparent 42%),
    linear-gradient(180deg, #e3ecf5 0%, #f1f6fa 48%, #e6eef5 100%);
  border-bottom: 1px solid var(--ei-line);
}

.ei-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.ei-scope-card {
  padding: 24px;
  border: 1px solid var(--ei-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(7,35,56,.05);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.ei-scope-card:hover {
  transform: translateY(-3px);
  border-color: #a9c8e8;
  box-shadow: 0 17px 38px rgba(7,35,56,.08);
}

.ei-scope-card__code {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border: 1px solid #d5e5f7;
  border-radius: 10px;
  background: linear-gradient(135deg, #eaf2fd, #f2f7ff);
  color: var(--ei-accent-deep);
  font-family: Consolas, "Courier New", monospace;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
}

.ei-scope-card h3 {
  margin: 0 0 9px;
  color: var(--ei-ink);
  font-size: 1.05rem;
  line-height: 1.25;
}

.ei-scope-card p {
  margin: 0;
  color: var(--ei-text);
  font-size: .85rem;
  line-height: 1.56;
}


/* ---------------- STACK ---------------- */

.ei-stack { background: #fff; }

.ei-stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.ei-stack-card {
  padding: 24px;
  border: 1px solid var(--ei-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7,35,56,.04);
}

.ei-stack-card h3 {
  margin: 0 0 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--ei-line);
  color: var(--ei-ink);
  font-size: .95rem;
}

.ei-stack-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ei-stack-card__chips span {
  padding: 6px 11px;
  border: 1px solid #d5e5f7;
  border-radius: 999px;
  background: #eef4fc;
  color: #1c5fb3;
  font-size: .72rem;
  font-weight: 800;
}

.ei-stack-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ei-stack-card ul li {
  position: relative;
  padding-left: 20px;
  color: #46617a;
  font-size: .8rem;
  font-weight: 700;
}

.ei-stack-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--ei-accent-deep), var(--ei-accent));
  opacity: .85;
}


/* ---------------- LAYERS (dark strip) ---------------- */

.ei-layers {
  padding: 38px 0 40px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(127, 176, 255, .11), transparent 34%),
    linear-gradient(125deg, #061c31 0%, #082943 100%);
}

.ei-layers__head {
  max-width: 620px;
  margin-bottom: 26px;
}

.ei-layers .eyebrow { color: var(--ei-accent); }

.ei-layers h2 {
  margin: 5px 0 0;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.ei-layer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.ei-layer {
  padding: 16px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  text-align: center;
}

.ei-layer span {
  display: block;
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.ei-layer small {
  display: block;
  margin-top: 4px;
  color: #8fa9c0;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ei-layer__arrow {
  align-self: center;
  color: var(--ei-accent);
  font-style: normal;
  font-size: 1rem;
  font-weight: 900;
}


/* ---------------- GALLERY ---------------- */

.ei-gallery {
  background:
    radial-gradient(circle at 88% 6%, rgba(23, 105, 224, .06), transparent 44%),
    linear-gradient(180deg, #e6eef5 0%, #f4f8fb 48%, #e9f1f7 100%);
  border-bottom: 1px solid var(--ei-line);
}

.ei-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ei-work-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--ei-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(7,35,56,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ei-work-card:hover {
  transform: translateY(-3px);
  border-color: #a9c8e8;
  box-shadow: 0 17px 38px rgba(7,35,56,.09);
}

.ei-work-card img {
  display: block;
  width: 100%;
  height: 215px;
  object-fit: cover;
}

.ei-work-card__caption {
  display: block;
  padding: 14px 16px 15px;
  border-top: 1px solid var(--ei-line);
}

.ei-work-card__caption strong {
  display: block;
  color: var(--ei-ink);
  font-size: .92rem;
}

.ei-work-card__caption small {
  display: block;
  margin-top: 2px;
  color: var(--ei-accent-deep);
  font-size: .72rem;
  font-weight: 800;
}

.ei-gallery__action {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.ei-gallery__note {
  max-width: 720px;
  margin: 18px auto 0;
  color: #6d8294;
  font-size: .68rem;
  line-height: 1.6;
  text-align: center;
}


/* ---------------- FITS BAND ---------------- */

.ei-fits {
  padding: 38px 0 40px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(127, 176, 255, .11), transparent 34%),
    linear-gradient(125deg, #061c31 0%, #082943 100%);
}

.ei-fits__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 45px;
  align-items: center;
}

.ei-fits .eyebrow { color: var(--ei-accent); }

.ei-fits h2 {
  margin: 5px 0 9px;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.ei-fits__box > div:first-child p {
  max-width: 640px;
  margin: 0;
  color: #b9cad6;
  line-height: 1.6;
}

.ei-fits__links {
  display: grid;
  gap: 10px;
  min-width: 320px;
}

.ei-fits__links a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 13px;
  background: rgba(255,255,255,.05);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.ei-fits__links a:hover {
  transform: translateY(-2px);
  border-color: rgba(127,176,255,.45);
  background: rgba(127,176,255,.07);
}

.ei-fits__links strong {
  color: #fff;
  font-size: .88rem;
}

.ei-fits__links span {
  color: var(--ei-accent);
  font-size: .74rem;
  font-weight: 800;
}


/* ---------------- FINAL CTA ---------------- */

.ei-final {
  padding: 76px 0;
  background: linear-gradient(180deg, #eaf1f7 0%, #f6f9fb 100%);
}

.ei-final__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 45px;
  align-items: center;
  padding: 36px 40px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 85%, rgba(127, 176, 255, .13), transparent 33%),
    #08263e;
  box-shadow: 0 24px 55px rgba(7,35,56,.13);
}

.ei-final__box > div:first-child > small {
  display: block;
  color: var(--ei-accent);
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ei-final__box h2 {
  max-width: 780px;
  margin: 8px 0 9px;
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.ei-final__box p {
  max-width: 760px;
  margin: 0;
  color: #b9cad6;
  line-height: 1.6;
}

.ei-final__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 215px;
}

.ei-final__actions .button { justify-content: center; }


/* ---------------- CURRENT NAV ITEM ---------------- */

.embedded-iot-page .nav-dropdown a[aria-current="page"] {
  background: rgba(23,105,224,.08);
  color: #1157bd;
}


/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 1100px) {
  .ei-hero__inner { grid-template-columns: minmax(0, 1fr) 390px; gap: 42px; }
}

@media (max-width: 900px) {
  .ei-section, .ei-layers, .ei-fits { padding: 34px 0; }
  .ei-hero__inner { grid-template-columns: 1fr; gap: 34px; padding: 52px 0; }
  .ei-hero__board { max-width: 560px; }
  .ei-heading { grid-template-columns: 1fr; gap: 20px; }
  .ei-layer-row { grid-template-columns: 1fr; gap: 12px; }
  .ei-layer__arrow { transform: rotate(90deg); justify-self: center; }
  .ei-fits__box { grid-template-columns: 1fr; gap: 24px; }
  .ei-fits__links { min-width: 0; }
}

@media (max-width: 760px) {
  .ei-hero__inner { padding: 24px 0 28px; }

  .ei-hero .eyebrow {
    max-width: 290px;
    margin-bottom: 10px;
    font-size: .57rem;
    line-height: 1.55;
    letter-spacing: .11em;
  }

  .ei-hero h1 {
    max-width: 345px;
    font-size: clamp(1.72rem, 8.35vw, 2.08rem);
    line-height: 1.035;
    letter-spacing: -.03em;
    text-wrap: balance;
  }

  .ei-hero__lead {
    max-width: 345px;
    margin-top: 12px;
    font-size: .75rem;
    line-height: 1.58;
  }

  .ei-hero__tags { gap: 6px; margin-top: 14px; }
  .ei-hero__tags span { min-height: 26px; padding: 0 9px; font-size: .57rem; }

  .ei-hero__actions { gap: 8px; margin-top: 16px; display: grid; grid-template-columns: 1fr; }
  .ei-hero__actions .button { justify-content: center; min-height: 43px; padding: 10px 14px; font-size: .72rem; }

  .ei-hero__board { padding: 13px; border-radius: 18px; }
  .ei-hero__board figcaption strong { font-size: .78rem; }
  .ei-hero__board figcaption small { font-size: .66rem; }

  .ei-work-grid { grid-template-columns: 1fr; }
  .ei-work-card img { height: 200px; }
}

@media (max-width: 680px) {
  .ei-section, .ei-layers, .ei-fits { padding: 28px 0; }
  .ei-heading h2 { font-size: 2rem; }

  .ei-scope-grid { grid-template-columns: 1fr; }
  .ei-scope-card { padding: 21px; }

  .ei-stack-grid { grid-template-columns: 1fr; }

  .ei-final__box { grid-template-columns: 1fr; padding: 26px 22px; border-radius: 18px; }
  .ei-final__actions { display: grid; grid-template-columns: 1fr; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ei-scope-card,
  .ei-work-card,
  .ei-fits__links a {
    transition: none;
  }
}
