@font-face {
  font-family: Manrope;
  src: url('assets/manrope.ttf') format('truetype');
  font-display: swap;
  font-weight: 400 800;
}

:root {
  --ink: #12201f;
  --deep: #101b1b;
  --paper: #f0f1e9;
  --white: #f6f8f2;
  --turquoise: #6ad0cb;
  --brand: #4fb8b7;
  --brand-dark: #1b706c;
  --mauve: #8f7277;
  --line: #1d343132;
  --dark-line: #daeee142;
  --muted: #4d5954;
  --gutter: clamp(1.2rem, 6.4vw, 7rem);
  --header-height: 5.45rem;
  font-family: Manrope, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--deep);
  font-weight: 500;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
p { line-height: 1.65; }
a { color: inherit; text-underline-offset: .3em; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 5px;
}
section[id], footer[id] { scroll-margin-top: var(--header-height); }
.wrap { width: min(calc(100% - 2 * var(--gutter)), 94rem); margin-inline: auto; }
.skip {
  position: fixed;
  z-index: 9;
  top: .75rem;
  left: .75rem;
  transform: translateY(-175%);
  padding: .75rem 1rem;
  background: var(--white);
  color: var(--ink);
}
.skip:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: var(--header-height);
  margin-bottom: calc(-1 * var(--header-height));
  color: var(--white);
  background: #101b1b38;
  transition: background-color .24s ease;
}
.site-header[data-solid], .site-header[data-open] { background: var(--deep); }
.header-inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--dark-line);
}
.brand { display: inline-flex; align-items: center; gap: .42rem; text-decoration: none; }
.brand img { width: 3.1rem; height: 3.05rem; object-fit: contain; }
.brand > span { font-size: 1.95rem; font-weight: 800; letter-spacing: -.08em; line-height: .82; }
.brand small { display: block; font-size: .615rem; letter-spacing: .16em; margin-top: .42rem; }
#site-nav { display: flex; align-items: center; gap: clamp(1.2rem, 3.6vw, 3.8rem); }
#site-nav a { text-decoration: none; font-size: .92rem; font-weight: 750; }
#site-nav a:hover { color: var(--turquoise); }
.nav-contact {
  position: relative;
  display: grid;
  min-height: 2.9rem;
  place-items: center;
  padding-inline: 1.35rem;
  border: 1px solid #7dbdb07a;
  background: #29463c45;
  transition: border-color .2s, background-color .2s;
}
.nav-contact::before, .nav-contact::after {
  content: '';
  position: absolute;
  width: .69rem;
  height: .69rem;
  border: 0 solid var(--turquoise);
  pointer-events: none;
}
.nav-contact::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.nav-contact::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.nav-contact:hover { border-color: var(--turquoise); background: #29463cb0; }
.menu-button { display: none; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: max(43rem, 93svh);
  padding-top: var(--header-height);
  color: var(--white);
  background: var(--deep);
  overflow: clip;
}
.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-image { object-fit: cover; object-position: 62% 48%; }
.hero::after {
  content: '';
  background:
    linear-gradient(90deg, #101a1be8 0%, #101a1b9e 34%, #10202113 68%),
    linear-gradient(0deg, #0c1718ed 0%, transparent 36%, transparent 78%, #111d1edb 100%);
}
.hero-content { padding-block: clamp(4rem, 8vh, 7rem) clamp(2.4rem, 7.3vh, 5.8rem); }
.eyebrow, .metadata {
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: .72rem; }
.eyebrow::before { content: ''; width: 1.65rem; height: 2px; background: var(--brand); }
h1, h2, h3 { font-weight: 800; }
.hero h1 {
  max-width: 10ch;
  margin-top: 1.32rem;
  font-size: clamp(4.5rem, 8.35vw, 8.7rem);
  line-height: .88;
  letter-spacing: -.087em;
}
.hero h1 .hero-line { display: block; }
.hero h1 .accent { color: var(--turquoise); }
.hero-lead { max-width: 34ch; color: #f1f7f0; margin-top: 1.35rem; font-size: clamp(1.03rem, 1.5vw, 1.25rem); }
.button {
  display: inline-flex;
  min-height: 3.45rem;
  justify-content: center;
  align-items: center;
  padding: .72rem 1.32rem;
  text-decoration: none;
  font-weight: 800;
  transition: background-color .22s, color .22s;
}
.button-bright { color: #11211f; background: var(--turquoise); }
.button-bright:hover { background: var(--white); }
.hero .button { margin-top: 1.48rem; }
.hero-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  min-height: 3.65rem;
  padding-block: .65rem;
  gap: .18rem 1.3rem;
  border-top: 1px solid var(--dark-line);
  font-size: .775rem;
  font-weight: 750;
}
.hero-caption a { text-decoration: none; }
.hero-caption a:hover { text-decoration: underline; }

h2 { font-size: clamp(2.95rem, 6.5vw, 7.25rem); line-height: .94; letter-spacing: -.081em; }
.hero-current {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-content, .hero-caption { position: relative; z-index: 1; }
.current-control {
  min-height: 2.75rem;
  padding: .25rem .65rem;
  color: var(--white);
  border: 1px solid var(--dark-line);
  background: #0d19198c;
  cursor: pointer;
  font-weight: 750;
}
.current-control:hover { border-color: var(--turquoise); color: var(--turquoise); }

.power-story { position: relative; isolation: isolate; overflow: clip; color: var(--white); background: #111c19; }
.story-wire { position: absolute; top: 0; left: 0; z-index: 2; width: 100%; display: block; pointer-events: none; }
.story-terminal { position: absolute; width: 1px; height: 1px; pointer-events: none; }
.transformer-section {
  position: relative;
  padding-block: clamp(3rem, 6vw, 6rem) clamp(2rem, 4vw, 4rem);
  background: radial-gradient(ellipse at 73% 48%, #223c34 0%, #12221e 37%, #111c1900 70%), linear-gradient(#0c1718, #111c19);
}
.transformer-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(1.65rem, 5vw, 5rem);
}
.transformer-copy h2, .cabinet-copy h2, .contact-copy h2 { font-size: clamp(3rem, 6.45vw, 7rem); margin-block: .75rem 1.12rem; }
.transformer-copy h2 span, .cabinet-copy h2 span, .contact-copy h2 span { color: var(--turquoise); }
.transformer-copy > p:last-child, .cabinet-copy > p:not(.eyebrow), .contact-copy > p:not(.eyebrow) { max-width: 40ch; color: #c1d0c7; }
.cabinet-copy > p + p { margin-top: .85rem; }
.about-next { display: inline-block; margin-top: 1.2rem; }
.transformer-machine { position: relative; justify-self: end; width: 100%; max-width: 45rem; }
.transformer-machine > img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; filter: brightness(.71) saturate(.74); transition: filter .55s ease; }
.transformer-machine[data-energized] > img { filter: brightness(1.07) saturate(.9) drop-shadow(0 0 1.1rem #4fb8b745); }
.transformer-in { left: 38.4%; top: 1.4%; }
.transformer-out { left: 79.15%; top: 18.6%; }
.projects, .services { padding-block: clamp(4.5rem, 9vw, 9.5rem); }
.projects {
  --route-gap: clamp(3rem, 13vw, 12.5rem);
  padding-block-end: clamp(2.55rem, 5.4vw, 5rem);
  color: var(--white);
  background: #111c19;
  overflow: clip;
}
.projects h2 span { color: var(--turquoise); }
.section-intro {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(16rem, 21rem);
  gap: 1.4rem;
  align-items: end;
  margin-bottom: clamp(2rem, 5.2vw, 5.2rem);
}
.section-intro h2 { margin-top: .8rem; }
.section-intro p { color: #becfc5; }
.section-intro .eyebrow { color: var(--turquoise); }
.project-entry { top: 70%; right: calc(21rem + .7rem); }
.project-route { position: relative; }
.project-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(0, .83fr);
  column-gap: var(--route-gap);
  align-items: start;
}
.project-pair + .project-pair { margin-top: clamp(3.15rem, 7vw, 7rem); }
.project-pair[data-flow='reverse'] { grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); }
.project-pair[data-flow='reverse'] .field-project:first-child { grid-column: 2; grid-row: 1; }
.project-pair[data-flow='reverse'] .field-project:nth-child(2) { grid-column: 1; grid-row: 1; }
.field-project { min-width: 0; }
.project-pair .field-project:nth-child(2) { margin-top: clamp(3.75rem, 10.5vw, 10rem); }
.field-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .28rem 1rem;
  padding-block: .62rem .68rem;
  border-top: 1px solid var(--dark-line);
  color: #baced0;
  font-size: .81rem;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.field-meta span:first-child { color: var(--turquoise); }
.field-frame { position: relative; }
.field-photo {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(16rem, 26vw, 29rem);
  overflow: hidden;
  text-decoration: none;
  cursor: zoom-in;
  background: #1e312d;
}
.field-photo::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  background: linear-gradient(0deg, #091612f5, #0916126a 32%, transparent 64%);
}
.field-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.3,1);
}
.field-photo:hover img, .field-photo:focus-visible img { transform: scale(1.045); }
.field-title {
  position: absolute;
  inset: auto auto 0 0;
  pointer-events: none;
  max-width: 13ch;
  padding: 1.1rem 0 1.15rem 1.14rem;
  margin-right: 3.6rem;
  font-size: clamp(1.64rem, 3.68vw, 4.1rem);
  letter-spacing: -.072em;
  line-height: .97;
  text-wrap: balance;
}
.field-project-compact .field-photo { min-height: clamp(12.25rem, 21vw, 20rem); }
.field-project-compact .field-title { font-size: clamp(1.65rem, 3.3vw, 3.2rem); }
.image-expand {
  position: absolute;
  right: .65rem;
  bottom: .75rem;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  font-size: 1.4rem;
  background: #111f1d92;
  color: var(--white);
  border: 1px solid #e3faf197;
  transition: background-color .2s, color .2s;
}
.field-photo:hover .image-expand { background: var(--turquoise); color: var(--deep); }
.wire-terminal { position: absolute; top: 50%; width: 1px; height: 1px; pointer-events: none; }
.project-pair[data-flow='forward'] .field-project:first-child .wire-terminal,
.project-pair[data-flow='reverse'] .field-project:nth-child(2) .wire-terminal { right: 0; }
.project-pair[data-flow='forward'] .field-project:nth-child(2) .wire-terminal,
.project-pair[data-flow='reverse'] .field-project:first-child .wire-terminal { left: 0; }
.field-details {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .38rem .85rem;
  padding-top: .76rem;
}
.field-details p { color: #c4d1ca; max-width: 35ch; }
.field-gallery { display: inline-flex; align-items: center; gap: .36rem; }
.field-gallery button { width: 2.75rem; height: 2.75rem; border: 1px solid var(--dark-line); background: #203630; color: var(--white); font-size: 1.65rem; line-height: 1; cursor: pointer; }
.field-gallery button:hover { border-color: var(--turquoise); color: var(--turquoise); }
.field-count { min-width: 4.6ch; padding-inline: .22rem; text-align: center; font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: #d1ddd5; }
.text-link { font-weight: 800; }

.cabinet-section {
  padding-block: clamp(3.1rem, 7vw, 7.5rem) clamp(4.2rem, 8.5vw, 8.5rem);
  background: radial-gradient(ellipse at 74% 42%, #2a4239 0%, #172922 38%, #111c19 76%);
}
.cabinet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
  align-items: center;
  column-gap: clamp(2rem, 6vw, 7rem);
}
.cabinet-machine { grid-column: 2; grid-row: 1; display: grid; justify-items: center; gap: .85rem; min-width: 0; }
.cabinet-frame {
  position: relative;
  isolation: isolate;
  width: min(100%, 26rem);
  aspect-ratio: 4 / 5;
  display: grid;
  perspective: 1150px;
  background: #101a17;
  border: .38rem solid #5a7063;
  box-shadow: inset 0 0 0 2px #101714, 0 1.3rem 2.25rem #050e0b8c;
}
.cabinet-frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-area: 1 / 1;
  object-fit: cover;
  filter: brightness(.58) saturate(.73);
  transition: filter .65s ease .12s;
}
.cabinet-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 1.45rem #020a08a9;
}
.cabinet-in { left: 50%; top: -.45rem; }
.cabinet-in::before { content: ''; position: absolute; top: .17rem; left: -.42rem; width: .86rem; height: .48rem; background: #9aa89f; border: 1px solid #3a5046; }
.cabinet-out { left: 67%; bottom: -.42rem; }
.cabinet-out::before { content: ''; position: absolute; bottom: .12rem; left: -.34rem; width: .68rem; height: .52rem; background: #84978b; border: 1px solid #334c40; }
.cabinet-door {
  position: absolute;
  z-index: 2;
  inset-block: .18rem;
  width: calc(50% - .18rem);
  transform: rotateY(0);
  border: 1px solid #92a197;
  background: linear-gradient(118deg, #707f77, #34463f 55%, #243630);
  box-shadow: inset 0 0 0 .18rem #1e2d28, .15rem .2rem .65rem #030a08b8;
  transition: transform .95s cubic-bezier(.2,.72,.25,1);
}
.cabinet-door::before {
  content: '';
  position: absolute;
  inset: .65rem;
  border: 1px solid #b6c7bb38;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #b6c7bb09 4px);
}
.cabinet-door span {
  position: absolute;
  top: 46%;
  width: .62rem;
  height: 16%;
  border: 1px solid #8d9a91;
  background: linear-gradient(90deg, #111c17, #5e7064 79%, #202d26);
  box-shadow: .13rem .16rem .28rem #0b1412b3;
}
.cabinet-door-left { left: .1rem; transform-origin: 0 50%; }
.cabinet-door-right { right: .1rem; transform-origin: 100% 50%; }
.cabinet-door-left span { right: 12%; }
.cabinet-door-right span { left: 12%; }
.cabinet-section[data-open] .cabinet-door-left, .cabinet-section:not([data-ready]) .cabinet-door-left { transform: rotateY(-79deg); }
.cabinet-section[data-open] .cabinet-door-right, .cabinet-section:not([data-ready]) .cabinet-door-right { transform: rotateY(79deg); }
.cabinet-section[data-replaying] .cabinet-door { transition-duration: .42s; }
.cabinet-section[data-open] .cabinet-frame img, .cabinet-section:not([data-ready]) .cabinet-frame img { filter: brightness(1.02) saturate(.94); }
.cabinet-control {
  min-height: 2.75rem;
  padding: .5rem .85rem;
  border: 1px solid var(--dark-line);
  color: var(--white);
  background: #12221d;
  cursor: pointer;
  font-weight: 750;
}
.cabinet-control:hover { border-color: var(--turquoise); }
.cabinet-copy { grid-column: 1; grid-row: 1; position: relative; z-index: 3; }
.cabinet-section[data-ready] .cabinet-copy {
  transition: opacity .48s ease .77s, transform .54s ease .77s, visibility 0s .77s;
}
.cabinet-section[data-ready]:not([data-open]) .cabinet-copy {
  opacity: 0;
  visibility: hidden;
  transform: translateY(1.2rem);
  transition: none;
}
.cabinet-links { display: flex; align-items: center; flex-wrap: wrap; gap: .68rem; margin-block: 1.28rem 1rem; }
.button-contact { border: 1px solid #7dbdb073; color: var(--white); background: #21372e72; }
.button-contact:hover { border-color: var(--turquoise); color: var(--turquoise); }
.cabinet-leds { position: absolute; z-index: 1; top: 43%; left: 66%; display: flex; gap: .34rem; pointer-events: none; }
.cabinet-leds i { width: .42rem; height: .42rem; border-radius: 50%; background: #163329; border: 1px solid #83a798; transition: background-color .22s, box-shadow .22s; }
.cabinet-section[data-open] .cabinet-leds i { background: #91ffe1; box-shadow: 0 0 .7rem #4ff4bd; transition-delay: .57s; }
.cabinet-section[data-open] .cabinet-leds i:nth-child(2) { transition-delay: .69s; }
.cabinet-section[data-open] .cabinet-leds i:nth-child(3) { transition-delay: .81s; }
.power-story[data-static-motion] .cabinet-section *,
.power-story[data-static-motion] .contact-stage *,
.power-story[data-static-motion] .transformer-machine > img { transition: none !important; animation: none !important; }

.services { background: #172823; color: var(--white); }
.service-heading, .service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(4.5rem, 11vw, 10rem) minmax(0, 1fr);
  column-gap: clamp(1rem, 3.15vw, 3.2rem);
}
.service-heading { align-items: end; margin-bottom: clamp(2rem, 4.5vw, 4.25rem); }
.service-heading h2 { font-size: clamp(2.8rem, 6.1vw, 6.75rem); }
.service-heading h2 span { color: var(--turquoise); }
.service-heading p { grid-column: 3; color: #c1d0c7; max-width: 28ch; }
.service-layout { align-items: start; min-height: clamp(19rem, 31vw, 30rem); }
.service-list { border-top: 1px solid var(--dark-line); }
.service-list details { border-bottom: 1px solid var(--dark-line); }
.service-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.1rem;
  min-height: 3.9rem;
  padding-block: .9rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
  font-size: clamp(1.05rem, 2.05vw, 1.85rem);
  letter-spacing: -.036em;
}
.service-list summary::-webkit-details-marker { display: none; }
.service-list summary::after { content: '+'; color: var(--turquoise); font-size: 1.55rem; line-height: 1; }
.service-list details[open] summary::after { content: '−'; }
.service-list details p { color: #c1d0c7; max-width: 42ch; margin-bottom: .95rem; }

.cable-tray {
  position: relative;
  grid-column: 2;
  align-self: stretch;
  background: url('assets/konsollu-kablo-tavasi.png') repeat-y center top / 100% auto;
  filter: saturate(.67) brightness(.9) drop-shadow(.16rem .25rem .24rem #0916119c);
}
.tray-in, .tray-out { left: 50%; }
.tray-in { top: 0; }
.tray-out { bottom: 0; }

.contact-stage { padding-block: clamp(4.25rem, 8.5vw, 8.5rem); background: radial-gradient(ellipse at 73% 32%, #283e32, #111c19 69%); }
.contact-layout { display: grid; align-items: center; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(2rem, 7vw, 7.5rem); }
.breaker-station { grid-column: 2; grid-row: 1; display: grid; justify-items: center; gap: .9rem; }
.contact-copy { grid-column: 1; grid-row: 1; position: relative; z-index: 3; }
.breaker-assembly {
  position: relative;
  width: min(100%, 30rem);
  aspect-ratio: 3 / 2;
  isolation: isolate;
  background: #15221c;
  box-shadow: 0 1rem 2.4rem #081311aa;
}
.breaker-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.breaker-on { opacity: 0; clip-path: inset(54% 27% 20% 37%); transition: opacity .22s ease .14s; }
.breaker-in { left: 50%; top: 1%; }
.contact-stage[data-live] .breaker-on, .contact-stage:not([data-ready]) .breaker-on { opacity: 1; }
.contact-stage[data-replaying] .breaker-on { transition-delay: 0s; }
.contact-stage[data-ready] .contact-copy { transition: opacity .44s ease .45s, transform .5s ease .45s, visibility 0s .45s; }
.contact-stage[data-ready]:not([data-live]) .contact-copy { opacity: 0; visibility: hidden; transform: translateY(1rem); transition: none; }

.references { padding-block: clamp(3.5rem, 7vw, 6.5rem); color: var(--white); background: var(--deep); border-top: 1px solid var(--dark-line); }
.references h2 { margin-bottom: clamp(1.4rem, 3vw, 2.7rem); font-size: clamp(2.65rem, 5.6vw, 6.1rem); }
.references h2 span { color: var(--turquoise); }
.reference-strip {
  --reference-width: clamp(7.5rem, 13vw, 11rem);
  --reference-gap: clamp(.45rem, 1.2vw, 1.2rem);
  overflow: hidden;
  padding-block: .55rem;
}
.reference-strip:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 5px; }
.reference-motion { display: flex; }
.reference-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex: none;
  gap: var(--reference-gap);
  list-style: none;
  margin: 0;
  padding: 0 var(--reference-gap) 0 0;
  width: 100%;
}
.reference-item { flex: 0 0 var(--reference-width); }
.reference-item img { width: 100%; height: auto; }
.reference-strip[data-loop] .reference-motion { width: max-content; animation: reference-flow 70s linear infinite; }
.reference-strip[data-loop] .reference-list { width: auto; flex-wrap: nowrap; }
.reference-strip:hover .reference-motion,
.reference-strip:focus .reference-motion,
.reference-strip[data-paused] .reference-motion { animation-play-state: paused; }
@keyframes reference-flow { to { transform: translateX(-50%); } }

footer { color: var(--white); background: #0d1715; }
.footer-inner { padding-top: clamp(2.8rem, 6vw, 5.6rem); }
.footer-row {
  --ground-drop: .9rem;
  --ground-width: clamp(8.25rem, 14vw, 12.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ground-width);
  align-items: center;
  gap: clamp(.9rem, 3.1vw, 3.3rem);
  padding-block: var(--ground-drop) clamp(1.25rem, 3vw, 2.6rem);
  border-top: 2px solid #937357;
  box-shadow: 0 -1px 0 #d8a87842;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.75rem 3rem;
}
.footer-brand img { width: 3.7rem; height: 3.6rem; }
.footer-brand > span { font-size: 2.25rem; }
.footer-contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 1.35rem clamp(1.3rem, 4vw, 4.6rem);
  margin: 0;
  font-style: normal;
}
.footer-contact div > span { display: block; margin-bottom: .36rem; color: var(--turquoise); font-size: .87rem; font-weight: 820; }
.footer-contact a, .footer-contact p { color: #e6eee7; font-size: .97rem; font-weight: 680; }
.footer-bottom {
  border-top: 1px solid var(--dark-line);
  padding-bottom: clamp(1.75rem, 3.5vw, 3rem);
}
.footer-credits {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.65rem;
  padding-top: 1rem;
  font-size: .84rem;
  font-weight: 750;
  color: #c4d0c7;
}
.footer-ground {
  --ground-height: calc(var(--ground-width) * 2 / 3);
  --ground-lug: calc(var(--ground-height) * .1955);
  --ground-bend: clamp(1.6rem, 3.5vw, 3rem);
  position: relative;
  align-self: stretch;
  display: grid;
  align-items: center;
}
.footer-ground img { width: 100%; height: auto; filter: drop-shadow(0 .35rem .65rem #050a08); }
.footer-ground::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--ground-drop) - 2px);
  left: calc(38.15% - var(--ground-bend) + 1px);
  width: var(--ground-bend);
  height: calc(var(--ground-drop) + (100% - var(--ground-height)) / 2 + var(--ground-lug) + 2px);
  border: 0 solid #a98662;
  border-width: 3px 3px 0 0;
  border-top-right-radius: .9rem;
  filter: drop-shadow(0 1px 0 #453521);
  z-index: 1;
}
.footer-ground::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: calc(-1 * var(--ground-drop) - .31rem);
  left: calc(38.15% - var(--ground-bend) - .46rem);
  width: .92rem;
  height: .63rem;
  border: 1px solid #9f7a52;
  border-radius: .16rem;
  background: radial-gradient(circle, #503a29 0 11%, #d4b38c 15% 27%, transparent 32%), linear-gradient(#aa8c65, #624b37);
  box-shadow: 0 .1rem .15rem #050d0a;
}

dialog {
  width: min(68rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100% - 2rem);
  padding: .85rem;
  border: 1px solid var(--dark-line);
  background: var(--deep);
  color: var(--white);
}
dialog::backdrop { background: #080e0ef2; }
dialog form { display: flex; justify-content: end; margin-bottom: .6rem; }
.close-photo { border: 1px solid var(--dark-line); color: var(--white); background: transparent; padding: .64rem .8rem; cursor: pointer; }
.close-photo span { margin-left: .3rem; }
dialog img { width: 100%; max-height: 72vh; object-fit: contain; }
dialog figcaption { padding-top: .6rem; }
.photo-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: .72rem; }
.photo-controls button { min-height: 2.75rem; padding-inline: .7rem; border: 1px solid var(--dark-line); color: var(--white); background: transparent; cursor: pointer; }
.photo-controls button:disabled { opacity: .45; cursor: default; }

@media (max-width: 760px) {
  :root { --header-height: 4.5rem; }
  .site-header { height: auto; min-height: var(--header-height); }
  .header-inner { min-height: var(--header-height); flex-wrap: wrap; }
  .brand img { width: 2.65rem; height: 2.55rem; }
  .brand > span { font-size: 1.67rem; }
  .menu-button:not([hidden]) {
    display: inline-flex;
    gap: .62rem;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .4rem .62rem;
    border: 1px solid var(--dark-line);
    background: transparent;
    color: var(--white);
    font-weight: 750;
  }
  .menu-button span { width: 1rem; height: .47rem; border-block: 1px solid currentColor; }
  #site-nav { flex-wrap: wrap; gap: .75rem; padding-bottom: .65rem; }
  #site-nav[data-mobile] {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    padding: 0 var(--gutter) 1rem;
    gap: 0;
    display: grid;
    background: var(--deep);
  }
  #site-nav[data-mobile][data-closed] { display: none; }
  #site-nav[data-mobile] a { display: block; padding-block: .9rem; border: 0; border-bottom: 1px solid var(--dark-line); }
  #site-nav[data-mobile] .nav-contact { display: grid; justify-self: start; margin-top: .65rem; padding-block: .64rem; border: 1px solid #7dbdb07a; }
  .hero { min-height: max(40rem, 86svh); }
  .hero-image { object-position: 79% 47%; }
  .hero::after {
    background:
      linear-gradient(90deg, #101a1bce, #101a1b24),
      linear-gradient(0deg, #0b1516f7 0%, #0b151675 50%, #0b151617 77%, #0b1516ae 100%);
  }
  .hero h1 { font-size: clamp(3.6rem, 11.15vw, 5.35rem); }
  .hero-content { padding-top: 5.7rem; }
  .hero-caption { font-size: .75rem; }
  .section-intro, .transformer-layout, .cabinet-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .transformer-copy { order: 2; padding: .8rem 0 0 1.1rem; }
  .transformer-machine { order: 1; justify-self: center; }
  .projects .section-intro { padding-left: 1.1rem; }
  .project-entry { left: .3rem; top: 50%; right: auto; }
  .project-route { padding-left: 1.12rem; }
  .project-pair, .project-pair[data-flow='reverse'] { display: block; }
  .project-pair + .project-pair, .project-pair .field-project:nth-child(2) { margin-top: 2.3rem; }
  .project-pair .field-project .field-frame .wire-terminal { left: -.8rem; right: auto; }
  .field-photo { min-height: clamp(13.5rem, 58vw, 23rem); }
  .field-title, .field-project-compact .field-title { font-size: clamp(1.62rem, 7vw, 3.35rem); }
  .current-control { min-height: 2.75rem; }
  .cabinet-layout { row-gap: 2.3rem; }
  .cabinet-machine, .cabinet-copy, .breaker-station, .contact-copy { grid-column: auto; grid-row: auto; }
  .cabinet-frame { width: min(78%, 23rem); }
  .breaker-assembly { width: min(95%, 27rem); }
  .service-heading { display: block; padding-right: 1rem; }
  .service-heading p { margin-top: 1rem; }
  .service-layout { grid-template-columns: minmax(0, 1fr) clamp(2rem, 8vw, 3.65rem) minmax(0, 1fr); column-gap: clamp(.52rem, 2.4vw, 1.25rem); }
  .service-list summary { gap: .35rem; font-size: clamp(.95rem, 3.9vw, 1.35rem); overflow-wrap: anywhere; }
  .service-list details p { font-size: .94rem; }
  .footer-contact { grid-template-columns: minmax(0, 1fr); }
  .footer-row { --ground-width: clamp(5.5rem, 25vw, 8.25rem); gap: .62rem; }
  .footer-main { gap: 1.1rem; }
  .footer-brand img { width: 2.8rem; height: 2.7rem; }
  .footer-brand > span { font-size: 1.8rem; }
  .footer-contact a { overflow-wrap: anywhere; }
  .footer-credits { display: grid; gap: .55rem; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: clamp(2.8rem, 12.2vw, 3.5rem); }
  .hero-caption { min-height: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reference-strip[data-loop] .reference-motion { width: 100%; }
  .reference-strip[data-loop] .reference-list { width: 100%; flex-wrap: wrap; }
  .reference-strip[data-loop] .reference-list[aria-hidden='true'] { display: none; }
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
