:root {
  --bg: #ffffff;
  --surface: #eef7fc;
  --surface-2: #d3ecf9;
  --ink: #0b2f4a;
  --muted: #3d6a85;
  --brand: #45b7e8;
  --brand-hover: #30a7dd;
  --accent: var(--brand);
  --accent-ink: #0b2f4a;
  --deep: #071f33;
  --panel-field: #17405f;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4.5rem, 2rem + 13vw, 15rem);

  --margin: clamp(16px, 3vw, 40px);
  --gap: clamp(96px, 10vw, 160px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 "Jost", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }
::selection { background: var(--brand); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 10; }
.skip:focus { top: 10px; }

.display {
  font-size: var(--step-display);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.head {
  font-size: var(--step-head);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.sub { font-size: var(--step-lead); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; }

/* Buttons: square, one fill */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--brand); color: var(--accent-ink);
  font: 500 var(--step-body)/1 "Jost", sans-serif;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: scale(0.97); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: var(--step-small); }
.btn--light { background: var(--bg); color: var(--ink); }
.btn--light:hover { background: var(--surface); }
.link { font-weight: 500; text-underline-offset: 6px; text-decoration-thickness: 2px; transition: text-underline-offset 160ms ease; }
.link:hover { text-underline-offset: 3px; }

/* Bar */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; gap: 32px;
  padding: 18px var(--margin);
}
.wordmark { display: inline-flex; align-items: center; text-decoration: none; padding: 6px 0; }
.wordmark svg { width: 120px; height: auto; fill: var(--brand); color: var(--brand); display: block; }
.bar nav { display: flex; gap: 28px; margin-left: auto; }
.bar nav a { text-decoration: none; font-weight: 500; transition: opacity 160ms; }
.bar nav a:hover { opacity: 0.6; }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 120px var(--margin) 40px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 20px;
  overflow: hidden;
}
.hero__motif {
  position: absolute; z-index: 0;
  top: 50%; right: -22vw;
  width: 92vw; max-width: 1500px;
  transform: translateY(-50%);
}
.hero__motif svg { width: 100%; height: auto; display: block; overflow: visible; }
.m-a { fill: var(--surface-2); }
.m-b { fill: var(--brand); }
.m-tint { fill: var(--ink); mix-blend-mode: multiply; opacity: 0.25; }
.hero__motif image { filter: grayscale(1) contrast(1.1); }
.hero__text { position: relative; z-index: 1; grid-column: 1 / span 7; align-self: center; }
.hero__text .display { margin-bottom: 40px; }
.hero__logo { line-height: 0; }
.hero__logo svg { display: block; width: min(100%, 46vw); height: auto; fill: var(--brand); color: var(--brand); overflow: visible; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 40px; }
.hero__facts {
  position: relative; z-index: 1; grid-column: 1 / -1;
  list-style: none; margin: 48px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px 48px;
  font-size: var(--step-body);
}
.hero__facts strong { font-size: var(--step-lead); font-weight: 700; margin-right: 6px; }


/* About */
.about { padding: var(--gap) 20px 0; }
.about__panel {
  background: var(--ink); color: var(--bg);
  min-height: 105svh;
  overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  padding: 56px;
}
.about__panel .head { max-width: 12ch; }
.about__left { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.about__shape {
  margin: 0 0 -96px;
  width: min(38vw, 560px); aspect-ratio: 1;
  clip-path: circle(50%);
  background: var(--deep);
}
.about__shape img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(1) contrast(1.05); mix-blend-mode: luminosity; }
.about__right { display: flex; flex-direction: column; gap: 48px; padding-left: 12%; align-self: start; max-width: 520px; }
.about__right .sub { margin-bottom: 12px; }
.about__right .btn { align-self: flex-start; }

/* Services: index with preview */
.services { padding: var(--gap) var(--margin) 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; }
.services__intro { grid-column: 1 / span 4; }
.services__intro p { margin-top: 24px; max-width: 30ch; }
.services__shape { margin: 48px 0 0; width: 78%; aspect-ratio: 1; clip-path: circle(50%); background: var(--surface-2); }
.services__shape img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; }
.index { grid-column: 5 / -1; position: relative; display: grid; grid-template-columns: 1fr; gap: 40px; }
.index__list { list-style: none; margin: 0; padding: 0; }
.index__row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px;
  padding: 14px 0; text-decoration: none;
  transition: opacity 240ms ease;
}
.index__row::before {
  content: ""; flex: none; width: 22px; height: 12px; align-self: center;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12'%3E%3Ccircle cx='6' cy='6' r='6' fill='%2345b7e8'/%3E%3Ccircle cx='16' cy='6' r='6' fill='%230b2f4a'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 240ms var(--ease-out);
}
.index__row:hover::before, .index__row:focus-visible::before { transform: translateX(6px); }
.index__name { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; flex: 1 1 60%; }
.index__note { flex-basis: 100%; padding-left: 46px; max-width: 52ch; }
.index__thumb { order: 10; flex-basis: 100%; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 12px; filter: grayscale(1); }
.index__frame { display: none; }
@media (hover: hover) and (pointer: fine) {
  .index { padding-right: 0; }
  .index { grid-template-columns: 1.6fr 1fr; }
  .index__thumb { display: none; }
  .index__list:has(.index__row:hover, .index__row:focus-visible) .index__row:not(:hover, :focus-visible) { opacity: 0.35; }
  .index__frame {
    display: block; position: sticky; top: 15vh; align-self: start;
    width: 100%; aspect-ratio: 1;
    clip-path: circle(50%);
    background: var(--surface-2);
    transition: transform 360ms var(--ease-out);
  }
  .index__frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: opacity 240ms ease; }
  .index__frame::after { content: ""; position: absolute; inset: 0; background: var(--brand); mix-blend-mode: multiply; opacity: 0.7; }
}

/* Band: the transformer symbol repeated */
.band {
  margin-top: var(--gap);
  height: clamp(64px, 9vw, 120px);
  background: var(--ink);
  overflow: hidden;
}
.band svg { width: 100%; height: 100%; display: block; }
.band__row { animation: drift 30s linear infinite; }
.band circle { fill: var(--brand); }
.band circle:nth-child(even) { fill: var(--bg); fill-opacity: 1; }
@keyframes drift { to { transform: translateX(-200px); } }

/* Work / circuit */
.work { padding: var(--gap) var(--margin) 0; }
.work__head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: end; margin-bottom: 56px; }
.work__head .head { grid-column: 1 / span 7; }
.work__head p { grid-column: 9 / -1; }
.circuit { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; row-gap: 32px; align-items: start; }
.circuit__tabs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.circuit__tabs button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 20px;
  font: 500 var(--step-body)/1 "Jost", sans-serif;
  color: var(--ink); background: var(--surface); border: 0; cursor: pointer;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
  padding-inline: 28px;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.circuit__tabs button:hover { background: var(--surface-2); }
.circuit__tabs button:active { transform: translateY(2px); }
.circuit__tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.circuit__tabs [aria-selected="true"] .dot { background: var(--brand); }
.circuit__tabs .dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; opacity: 0.45; transition: opacity 200ms; }
.circuit__tabs [aria-selected="true"] .dot { opacity: 1; }
.circuit__tabs .count { font-size: var(--step-small); opacity: 0.75; }
.circuit__panels { grid-column: 1 / span 7; background: var(--ink); color: var(--bg); padding: 44px; min-height: 0; align-self: stretch; margin-top: -32px; }
.circuit__panel + .circuit__panel { margin-top: 40px; }
.js .circuit__panel[hidden] { display: none; }
.js .circuit__panel + .circuit__panel { margin-top: 0; }
.circuit__panel .sub { margin-bottom: 24px; font-size: var(--step-head); font-weight: 700; text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.95; }
.works { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: var(--step-lead); line-height: 1.25; }
.works li { display: flex; gap: 14px; align-items: baseline; }
.works li::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); transform: translateY(-2px); }
.js .works li { animation: in 420ms var(--ease-out) both; }
.js .works li:nth-child(2) { animation-delay: 50ms; }
.js .works li:nth-child(3) { animation-delay: 100ms; }
.js .works li:nth-child(4) { animation-delay: 150ms; }
.js .works li:nth-child(5) { animation-delay: 200ms; }
.js .works li:nth-child(6) { animation-delay: 250ms; }
.js .works li:nth-child(7) { animation-delay: 300ms; }
.js .works li:nth-child(8) { animation-delay: 350ms; }
.js .works li:nth-child(9) { animation-delay: 400ms; }
@keyframes in { from { opacity: 0; transform: translateY(14px); } }
.circuit__photo {
  grid-column: 8 / -1; margin: 0;
  aspect-ratio: 1; clip-path: circle(50%);
  background: var(--surface-2); position: relative;
}
.circuit__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: opacity 260ms ease, transform 6s linear; }
.circuit__photo::after { content: ""; position: absolute; inset: 0; background: var(--brand); mix-blend-mode: multiply; opacity: 0.7; }

/* Contact coupon */
.contact { padding: var(--gap) var(--margin) 96px; }
.contact__city { margin: 0 0 64px; }
.contact__city img { width: 100%; height: clamp(220px, 32vw, 460px); object-fit: cover; filter: grayscale(1) contrast(1.05); }
.contact__city figcaption { margin-top: 14px; font-size: var(--step-body); }
.coupon {
  --notch: 28px;
  display: grid; grid-template-columns: 46fr 54fr;
  max-width: 1200px; margin: 0 auto;
  background: var(--ink); color: var(--bg);
  position: relative;
}
.coupon::before, .coupon::after {
  content: ""; position: absolute; left: 46%; width: var(--notch); height: var(--notch);
  border-radius: 50%; background: var(--bg); transform: translate(-50%, -50%); top: 0;
}
.coupon::after { top: 100%; }
.coupon__left { padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; border-right: 5px dotted var(--bg); }
.coupon__title { font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; max-width: 8ch; }
.coupon__left p { max-width: 34ch; }
.coupon__right { padding: 48px; display: grid; gap: 10px; }
.coupon input, .coupon select, .coupon textarea {
  width: 100%; min-height: 54px; padding: 14px 16px;
  font: 400 1rem/1.4 "Jost", sans-serif;
  color: var(--bg); background: var(--panel-field); border: 0; border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
.coupon textarea { resize: vertical; }
.coupon select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px; }
.coupon ::placeholder { color: #a9c6da; }
.coupon input:focus-visible, .coupon select:focus-visible, .coupon textarea:focus-visible, .btn--submit:focus-visible { outline: 3px solid var(--bg); outline-offset: 0; }
.btn--submit { width: 100%; min-height: 56px; background: var(--brand); color: var(--ink); margin-top: 6px; }
.btn--submit:hover { background: var(--brand-hover); }

/* Footer */
.foot { background: var(--ink); color: var(--bg); padding: clamp(56px, 7vw, 96px) var(--margin) 32px; }
.foot__mark svg { display: block; width: 100%; height: auto; fill: var(--brand); color: var(--brand); }
.foot__cols { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; margin-top: 56px; }
.foot__cols nav { grid-column: 1 / span 6; display: flex; flex-wrap: wrap; gap: 12px 32px; font-weight: 500; }
.foot__cols nav a { text-decoration: none; }
.foot__cols nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.foot__contact { grid-column: 8 / -1; display: grid; gap: 12px; }
.foot__last { display: flex; justify-content: space-between; align-items: center; margin-top: 56px; }
.foot__last .btn--light:hover { background: var(--surface); }
.foot__credits { margin-top: 28px; font-size: 0.8125rem; line-height: 1.5; opacity: 0.6; max-width: 110ch; transition: opacity 200ms; }
.foot__credits:hover, .foot__credits[open] { opacity: 0.85; }
.foot__credits summary { cursor: pointer; width: max-content; list-style: none; }
.foot__credits summary::-webkit-details-marker { display: none; }
.foot__credits summary::after { content: " +"; }
.foot__credits[open] summary::after { content: " −"; }
.foot__credits p { margin-top: 8px; }

/* Entrances (only with JS) */
.js .reveal > * { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js .reveal.is-in > * { opacity: 1; transform: none; }
.js .reveal.is-in > *:nth-child(2) { transition-delay: 80ms; }
.js .reveal.is-in > *:nth-child(3) { transition-delay: 160ms; }
.js .reveal .about__right > * { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js .reveal.is-in .about__right > * { opacity: 1; transform: none; }
.js .reveal.is-in .about__right > *:nth-child(2) { transition-delay: 160ms; }
.js .reveal.is-in .about__right > *:nth-child(3) { transition-delay: 240ms; }
.js .reveal.is-in .about__right > *:nth-child(4) { transition-delay: 320ms; }
.js .index__row { opacity: 0; transform: translateY(20px); }
.js .index__row.is-in { opacity: 1; transform: none; transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.js .index__list:has(.index__row:hover, .index__row:focus-visible) .index__row.is-in:not(:hover, :focus-visible) { opacity: 0.35; transition: opacity 240ms ease; }

.hero__text > * { animation: in 800ms var(--ease-out) both; }
.hero__text > *:nth-child(2) { animation-delay: 90ms; }
.hero__text > *:nth-child(3) { animation-delay: 180ms; }
.hero__facts li { animation: in 800ms var(--ease-out) both; animation-delay: 300ms; }
.hero__facts li:nth-child(2) { animation-delay: 370ms; }
.hero__facts li:nth-child(3) { animation-delay: 440ms; }
.m-b { animation: swing 1200ms var(--ease-out) both; transform-origin: 640px 320px; }
.hero__motif image { animation: zoom 18s ease-in-out infinite alternate; transform-origin: 50% 50%; transform-box: fill-box; }
@keyframes swing { from { transform: translateX(120px); opacity: 0; } }
@keyframes zoom { to { transform: scale(1.08); } }

/* Tablet */
@media (max-width: 1000px) {
  .about__panel { padding: 40px; }
  .about__panel { grid-template-columns: 1fr; min-height: 0; }
  .about__panel .head { max-width: none; }
  .about__left { display: contents; }
  .about__right { padding-left: 0; order: 2; max-width: 620px; }
  .about__shape { order: 3; width: 60vw; margin: 16px auto -15vw; }
  .services__intro { grid-column: 1 / -1; margin-bottom: 40px; }
  .services__shape { display: none; }
  .index { grid-column: 1 / -1; }
  .circuit__panels { grid-column: 1 / span 7; }
  .circuit__photo { grid-column: 8 / -1; }
}

/* Phone */
@media (max-width: 720px) {
  .bar { gap: 16px; }
  .bar nav { display: none; }
  .bar .wordmark { visibility: hidden; }
  .bar .btn { margin-left: auto; }
  .hero { display: flex; flex-direction: column; padding-top: 96px; min-height: 0; }
  .hero__motif { position: relative; order: 2; top: auto; right: auto; transform: none; width: 150vw; margin: 40px 0 0 -10vw; }
  .hero__text { order: 1; }
  .hero__facts { order: 3; flex-direction: column; gap: 8px; margin-top: 24px; }
  .hero__logo svg { width: 100%; }
  .about { padding: var(--gap) 10px 0; }
  .about__panel { grid-template-columns: 1fr; padding: 32px 22px 0; min-height: 0; }
  .about__left { display: contents; }
  .about__panel .head { order: 1; font-size: 8.5vw; }
  .about__right { order: 2; gap: 32px; }
  .about__shape { order: 3; width: 86vw; max-width: none; margin: 16px auto -20vw; }
  .work__head { display: block; }
  .work__head p { margin-top: 16px; }
  .circuit { display: block; }
  .circuit__tabs button { padding-inline: 22px; }
  .circuit__panels { margin-top: 0; padding: 32px 22px; min-height: 0; }
  .circuit__photo { width: 80vw; margin: 32px auto 0; }
  .coupon {
    grid-template-columns: 1fr;
  }
  .coupon::before, .coupon::after { left: 0; top: var(--cut, 50%); }
  .coupon::after { left: 100%; top: var(--cut, 50%); }
  .coupon__left { padding: 36px 24px; border-right: 0; border-bottom: 5px dotted var(--bg); }
  .coupon__right { padding: 32px 24px; }
  .foot__cols { display: block; }
  .foot__contact { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
  .js .reveal > *, .js .reveal .about__right > *, .js .index__row { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
