:root {
  --ethercat-cyan: #35d6ff;
  --ethercat-green: #55d5aa;
  --ethercat-panel: #0b1418;
  --ethercat-panel-line: #284a53;
}

:root[data-theme="light"] {
  --ethercat-cyan: #087d9e;
  --ethercat-green: #147e50;
  --ethercat-panel: #e4ecec;
  --ethercat-panel-line: #aac2c7;
}

.ethercat-page {
  min-width: 320px;
}

.ethercat-page .nav-product.current {
  color: var(--text);
}

.ethercat-page .nav-product.current::after {
  position: absolute;
  right: 0;
  bottom: -26px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
}

.ethercat-hero {
  position: relative;
  min-height: min(820px, 94vh);
  padding: 130px 0 86px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.ethercat-hero::before,
.ethercat-hero::after {
  position: absolute;
  background: var(--line);
  content: "";
  pointer-events: none;
}

.ethercat-hero::before {
  top: 126px;
  right: 4vw;
  width: 17vw;
  height: 1px;
}

.ethercat-hero::after {
  right: 10vw;
  bottom: 80px;
  width: 1px;
  height: 18vh;
}

.ethercat-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(370px, 0.96fr);
  align-items: center;
  gap: 66px;
}

.ethercat-hero-copy {
  position: relative;
  z-index: 2;
}

.ethercat-eyebrow {
  margin: 0 0 18px;
  color: var(--ethercat-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.ethercat-hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(46px, 5vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.ethercat-hero h1 em {
  color: var(--ethercat-cyan);
  font-style: normal;
}

.ethercat-lede {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.8;
}

.ethercat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 31px;
}

.ethercat-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.ethercat-facts span::before {
  margin-right: 7px;
  color: var(--ethercat-green);
  content: "●";
}

.ethercat-device-frame {
  position: relative;
  min-height: 500px;
  margin: 0;
  border: 1px solid var(--ethercat-panel-line);
  background: var(--ethercat-panel);
  box-shadow: var(--shadow);
}

.ethercat-device-frame::before,
.ethercat-device-frame::after {
  position: absolute;
  z-index: 2;
  width: 76px;
  height: 2px;
  background: var(--ethercat-cyan);
  content: "";
}

.ethercat-device-frame::before {
  top: -1px;
  left: -1px;
}

.ethercat-device-frame::after {
  right: -1px;
  bottom: -1px;
}

.ethercat-device-frame img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: center 46%;
  filter: saturate(0.82) contrast(1.04);
}

.ethercat-device-frame figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 15px 17px;
  border: 1px solid #32545b;
  background: rgba(8, 18, 21, 0.92);
  color: #eff9fb;
}

.ethercat-device-frame figcaption strong,
.ethercat-device-frame figcaption span {
  display: block;
}

.ethercat-device-frame figcaption span {
  margin-top: 2px;
  color: #91a6aa;
  font-size: 10px;
}

.ethercat-section {
  padding: 94px 0;
  border-bottom: 1px solid var(--line);
}

.ethercat-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 52px;
  align-items: end;
  margin-bottom: 43px;
}

.ethercat-heading h2,
.ethercat-proof-copy h2,
.ethercat-episode-grid h2,
.ethercat-cta h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 49px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.ethercat-heading > p,
.ethercat-proof-copy > p:not(.section-index),
.ethercat-episode-grid > div > p:not(.section-index):not(.ethercat-test-condition),
.ethercat-cta p:not(.section-index) {
  margin: 0;
  color: var(--text-soft);
}

.ethercat-metrics {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1fr;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.ethercat-metrics article {
  min-width: 0;
  padding: 27px 22px;
  border-right: 1px solid var(--line);
}

.ethercat-metrics article:last-child {
  border-right: 0;
}

.ethercat-metrics strong {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.ethercat-metrics article:first-child strong {
  color: var(--ethercat-cyan);
}

.ethercat-metrics article:nth-child(3) strong {
  color: var(--ethercat-green);
}

.ethercat-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 11px;
}

.ethercat-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 39px;
}

.ethercat-flow article {
  position: relative;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.ethercat-flow article:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -11px;
  z-index: 2;
  width: 11px;
  color: var(--ethercat-cyan);
  content: "→";
  transform: translateY(-50%);
}

.ethercat-flow b {
  display: block;
  color: var(--ethercat-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
}

.ethercat-flow span {
  display: block;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 12px;
}

.ethercat-boundary-note {
  margin: 22px 0 0;
  padding-left: 15px;
  border-left: 2px solid var(--accent);
  color: var(--text-faint);
  font-size: 11px;
}

.ethercat-proof-section {
  background: var(--bg-soft);
}

.ethercat-proof-grid {
  display: grid;
  grid-template-columns: 1.16fr 0.84fr;
  gap: 34px;
  align-items: stretch;
}

.ethercat-proof-visual {
  min-height: 370px;
  margin: 0;
  border: 1px solid var(--line-strong);
  background: #071016;
}

.ethercat-proof-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ethercat-proof-copy {
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.ethercat-proof-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3.2vw, 39px);
}

.ethercat-proof-list {
  display: grid;
  gap: 0;
  margin: 25px 0 0;
}

.ethercat-proof-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 13px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.ethercat-proof-list dt {
  color: var(--ethercat-green);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.ethercat-proof-list dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
}

.ethercat-layer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.ethercat-layer-grid article {
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.ethercat-layer-grid article > span {
  color: var(--ethercat-cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ethercat-layer-grid h3 {
  margin: 27px 0 12px;
  font-size: 21px;
}

.ethercat-layer-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.ethercat-controller-figure {
  position: relative;
  min-height: 420px;
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ethercat-panel);
}

.ethercat-controller-figure img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.04);
}

.ethercat-controller-figure figcaption {
  position: absolute;
  right: 24px;
  bottom: 24px;
  max-width: 510px;
  padding: 18px 20px;
  border: 1px solid #32545b;
  background: rgba(8, 18, 21, 0.92);
  color: #eff9fb;
}

.ethercat-controller-figure figcaption span,
.ethercat-controller-figure figcaption strong {
  display: block;
}

.ethercat-controller-figure figcaption span {
  margin-bottom: 7px;
  color: var(--ethercat-cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.ethercat-controller-figure figcaption strong {
  font-size: 14px;
}

.ethercat-ecosystem-section {
  background: var(--bg-soft);
}

.ethercat-ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.ethercat-ecosystem-grid article {
  min-height: 270px;
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.ethercat-ecosystem-grid article:nth-child(3) {
  border-color: #645227;
}

.ethercat-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid currentColor;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ethercat-status.verified {
  color: var(--ethercat-green);
}

.ethercat-status.protected {
  color: var(--text-faint);
}

.ethercat-status.roadmap {
  color: var(--accent);
}

.ethercat-ecosystem-grid h3 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.ethercat-ecosystem-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.ethercat-episode-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}

.ethercat-episode-grid figure {
  margin: 0;
  border: 1px solid var(--ethercat-panel-line);
  background: #071016;
  box-shadow: var(--shadow);
}

.ethercat-episode-grid figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ethercat-episode-grid h2 {
  margin-bottom: 20px;
  font-size: clamp(31px, 3.8vw, 47px);
}

.ethercat-episode-grid ul {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.ethercat-episode-grid li {
  position: relative;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 13px;
}

.ethercat-episode-grid li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 1px;
  background: var(--ethercat-cyan);
  content: "";
}

.ethercat-test-condition {
  margin: 24px 0 20px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.ethercat-cta {
  padding: 78px 0;
  background: var(--bg-soft);
}

.ethercat-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 42px;
  align-items: center;
}

.ethercat-cta h2 {
  max-width: 790px;
}

.ethercat-cta p:not(.section-index) {
  max-width: 760px;
  margin-top: 14px;
}

.ethercat-cta .ethercat-actions {
  justify-content: flex-end;
  margin-top: 0;
}

@media (max-width: 1080px) {
  .ethercat-hero-grid {
    gap: 38px;
  }

  .ethercat-device-frame,
  .ethercat-device-frame img {
    min-height: 460px;
    height: 460px;
  }

  .ethercat-layer-grid article,
  .ethercat-ecosystem-grid article {
    padding: 23px;
  }
}

@media (max-width: 900px) {
  .ethercat-hero {
    min-height: auto;
    padding-top: 116px;
  }

  .ethercat-hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ethercat-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ethercat-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .ethercat-metrics article:nth-child(2) {
    border-right: 0;
  }

  .ethercat-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .ethercat-flow {
    grid-template-columns: repeat(3, 1fr);
  }

  .ethercat-flow article::after {
    display: none;
  }

  .ethercat-proof-grid,
  .ethercat-episode-grid {
    grid-template-columns: 1fr;
  }

  .ethercat-layer-grid,
  .ethercat-ecosystem-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ethercat-layer-grid article:last-child,
  .ethercat-ecosystem-grid article:last-child {
    grid-column: 1 / -1;
  }

  .ethercat-cta-grid {
    grid-template-columns: 1fr;
  }

  .ethercat-cta .ethercat-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .ethercat-page .nav-product.current::after {
    display: none;
  }

  .ethercat-page .nav-new {
    top: 11px;
    right: 0;
  }

  .ethercat-hero {
    padding-top: 94px;
  }

  .ethercat-hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .ethercat-device-frame,
  .ethercat-device-frame img {
    min-height: 470px;
    height: 470px;
  }

  .ethercat-proof-visual {
    min-height: auto;
  }

  .ethercat-controller-figure,
  .ethercat-controller-figure img {
    min-height: 360px;
    height: 360px;
  }
}

@media (max-width: 620px) {
  .ethercat-hero {
    padding: 94px 0 70px;
  }

  .ethercat-hero::before,
  .ethercat-hero::after {
    display: none;
  }

  .ethercat-hero h1 {
    font-size: 42px;
  }

  .ethercat-lede {
    font-size: 15px;
  }

  .ethercat-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ethercat-actions .button {
    width: 100%;
  }

  .ethercat-facts {
    display: grid;
    gap: 9px;
  }

  .ethercat-device-frame,
  .ethercat-device-frame img {
    min-height: 420px;
    height: 420px;
  }

  .ethercat-device-frame figcaption {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .ethercat-section {
    padding: 68px 0;
  }

  .ethercat-heading {
    margin-bottom: 32px;
  }

  .ethercat-metrics,
  .ethercat-flow,
  .ethercat-layer-grid,
  .ethercat-ecosystem-grid {
    grid-template-columns: 1fr;
  }

  .ethercat-metrics article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ethercat-metrics article:last-child {
    border-bottom: 0;
  }

  .ethercat-flow article:not(:last-child)::after {
    display: block;
    top: auto;
    right: 18px;
    bottom: -18px;
    width: auto;
    content: "↓";
    transform: none;
  }

  .ethercat-layer-grid article:last-child,
  .ethercat-ecosystem-grid article:last-child {
    grid-column: auto;
  }

  .ethercat-proof-copy {
    padding: 25px;
  }

  .ethercat-proof-list div {
    grid-template-columns: 78px 1fr;
  }

  .ethercat-controller-figure,
  .ethercat-controller-figure img {
    min-height: 330px;
    height: 330px;
  }

  .ethercat-controller-figure figcaption {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .ethercat-cta {
    padding: 64px 0;
  }

}

@media (max-width: 390px) {
  .ethercat-hero h1 {
    font-size: 38px;
  }

  .ethercat-device-frame,
  .ethercat-device-frame img {
    min-height: 380px;
    height: 380px;
  }

  .ethercat-proof-list div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
