:root {
  color-scheme: light;
  --paper: #f5f7fa;
  --surface: #fff;
  --ink: #152638;
  --muted: #46586a;
  --blue: #2249c6;
  --line: #dbe2ea;
  --navy: #142638;
  --ease: cubic-bezier(.2, .7, .25, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 Inter, "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; }
:focus-visible { outline: 3px solid #4565ec; outline-offset: 5px; }
.frame { width: min(100% - 80px, 1240px); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 12px; left: 12px; padding: 9px 14px; background: var(--surface); transform: translateY(-160%); }
.skip:focus { transform: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(36px, 5.15vw, 77px); font-weight: 500; line-height: 1.045; letter-spacing: -.06em; }
h2 { font-size: clamp(31px, 4vw, 59px); font-weight: 500; line-height: 1.105; letter-spacing: -.048em; }
h3 { font-size: clamp(19px, 2vw, 25px); font-weight: 600; line-height: 1.22; letter-spacing: -.032em; }
p { color: var(--muted); }

.header { background: #f8faff; color: var(--ink); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 88px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px clamp(20px, 3vw, 44px); padding-block: 12px; }
.footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.header .wordmark { justify-self: start; }
.brand-mark { display: block; width: 24px; height: auto; }
.brand-name { display: block; width: 105px; height: auto; }
.header .brand-mark { width: clamp(25px, 2.8vw, 34px); }
.header .brand-name { width: clamp(109px, 12vw, 148px); }
.header nav { display: flex; justify-content: center; gap: clamp(13px, 2.3vw, 33px); }
nav a, .back-link { display: inline-flex; align-items: center; min-height: 44px; gap: 9px; font-size: 15px; font-weight: 500; text-decoration: none; }
.header nav a { color: var(--ink); white-space: nowrap; }
.header nav a:hover, .header-contacts a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 5px; }
.back-link:hover, .footer a:hover { color: var(--blue); }
.header-end { display: flex; align-items: center; gap: clamp(13px, 2vw, 24px); }
.header-contacts { display: grid; gap: 4px; font-size: 14px; line-height: 1.35; }
.header-contacts a { text-decoration: none; overflow-wrap: anywhere; }
.header-contacts a[href^="mailto:"] { color: var(--muted); }
.header-action.button {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) 14px;
  place-content: center;
  gap: 14px;
  padding-inline: 21px;
  border-radius: 999px;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}
.header-action-arrow { position: relative; width: 14px; height: 14px; }
.header-action-arrow::before, .header-action-arrow::after { content: ""; position: absolute; }
.header-action-arrow::before {
  top: 1px;
  left: 2px;
  width: 13px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}
.header-action-arrow::after {
  right: 1px;
  bottom: 1px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.hero-region { background: linear-gradient(180deg, #edf2fb, var(--paper)); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: clamp(28px, 5.8vw, 90px); align-items: center; padding-block: clamp(36px, 6vw, 92px); }
.hero-copy { container-type: inline-size; }
.hero h1 { font-size: clamp(31px, 10.5cqw, 74px); overflow-wrap: break-word; text-wrap: initial; }
.hero h1 span { color: var(--blue); }
.hero-copy p { font-size: clamp(16px, 1.55vw, 20px); max-width: 46ch; margin-block: 23px 27px; }
.hero-visual { min-width: 0; }
.circuit-field {
  display: block;
  width: 100%;
  aspect-ratio: 1.4;
  background: radial-gradient(ellipse, #b7caff55, transparent 72%);
}

.button { width: fit-content; display: inline-flex; align-items: center; gap: 24px; padding: 11px 18px; min-height: 47px; background: var(--blue); color: #fff; border-radius: 7px; text-decoration: none; font-weight: 500; transition: background .2s, transform .2s var(--ease); }
.button:hover { background: #193bae; transform: translateY(-2px); }
.button span:not(.header-action-label), .project-action span { transition: transform .22s var(--ease); }
.button:hover span:not(.header-action-label), .project-link:hover .project-action span { transform: translate(2px, -2px); }

.section { padding-block: clamp(44px, 6.4vw, 96px); }
#services { border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .65fr); align-items: end; gap: 12px 42px; margin-bottom: clamp(19px, 3vw, 35px); }
.section-heading p { max-width: 49ch; }
.service-grid { display: grid; grid-auto-rows: 1fr; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.service { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: clamp(20px,3vw,38px); background: white; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; }
#services .section-heading { display: block; }
.service h3 { margin: 20px 0 7px; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.16; }
.service p { margin: 0; font-size: 16px; line-height: 1.5; }
.service-icon { display: block; width: 76px; height: 76px; padding: 6px; border-radius: 15px; color: var(--navy); background: #f1f5ff; }
.service-icon .icon-accent { stroke: var(--blue); stroke-width: 3; }
.quest-door { transform-origin: 19px 32px; animation: quest-open 3s ease-in-out infinite; }
.chest-lid { transform-origin: 10px 30px; animation: chest-open 3s ease-in-out infinite; }
.piston { animation: piston-stroke 2.5s ease-in-out infinite; }
.code-line { stroke-dasharray: 1; animation: code-type 2.8s steps(8) infinite; }
.script-pencil { animation: script-write 3s ease-in-out infinite; }
.written-line { transform-origin: 21px 41px; animation: script-ink 3s ease-in-out infinite; }
.meter-needle { transform-origin: 32px 28px; animation: meter-read 2.5s ease-in-out infinite; }
@keyframes quest-open { 45%, 65% { transform: skewY(-12deg) scaleX(.29); } }
@keyframes chest-open { 45%, 65% { transform: rotate(-14deg); } }
@keyframes piston-stroke { 0%, 100% { transform: translateX(-9px); } 50%, 65% { transform: translateX(6px); } }
@keyframes code-type { 0%, 100% { stroke-dashoffset: 1; } 55%, 85% { stroke-dashoffset: 0; } }
@keyframes script-write { 0%, 100% { transform: translate(0); } 55%, 68% { transform: translateX(15px); } 82% { transform: translate(10px,-5px); } }
@keyframes script-ink { 0%, 100% { transform: scaleX(0); } 55%, 82% { transform: scaleX(1); } }
@keyframes meter-read { 40%, 65% { transform: rotate(86deg); } 53% { transform: rotate(72deg); } }

.showcase { background: #e8eef5; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.project-card { min-width: 0; }
.project-link { height: 100%; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; text-decoration: none; overflow: hidden; transition: box-shadow .24s, border-color .24s; }
.project-link:hover, .project-link:focus-visible { border-color: #9cb0d8; box-shadow: 0 9px 28px #253d6517; }
.project-copy { display: flex; align-items: flex-start; flex-direction: column; flex: 1; padding: clamp(16px, 2.15vw, 27px); }
.project-copy p { margin-block: 7px 15px; }
.project-action { display: inline-flex; gap: 8px; margin-top: auto; color: var(--blue); font-size: 14px; font-weight: 500; }
.project-art { aspect-ratio: 1.65; display: grid; place-items: center; isolation: isolate; overflow: hidden; }
.project-art > div { transition: scale .35s var(--ease); }
.project-link:hover .project-art > div, .project-link:focus-visible .project-art > div { scale: 1.055; }
.art-terminal { background: radial-gradient(ellipse at 60% 30%, #b2d6ff, #8aa7d3); }
.terminal-display { position: relative; width: 62%; aspect-ratio: 1.68; border: clamp(4px, .55vw, 8px) solid #233a59; border-radius: 8px; background: repeating-linear-gradient(0deg, #42688c52 0 1px, transparent 1px 13px), repeating-linear-gradient(90deg, #42688c52 0 1px, transparent 1px 13px), #d6e9fc; transform: rotate(-6deg); box-shadow: 6px 10px 0 #4e719a95; }
.terminal-display i { position: absolute; width: 7px; aspect-ratio: 1; border-radius: 50%; background: #234bca; box-shadow: 0 0 0 3px #234bca21; }
.terminal-display i:nth-child(1) { left: 23%; top: 25%; }
.terminal-display i:nth-child(2) { left: 42%; top: 50%; }
.terminal-display i:nth-child(3) { left: 55%; top: 29%; }
.terminal-display i:nth-child(4) { left: 70%; top: 62%; }
.terminal-display i:nth-child(5) { left: 81%; top: 37%; }
.art-arcade { background: radial-gradient(ellipse at 35% 34%, #f3cf99, #d9a975); }
.arcade-panel { width: 64%; aspect-ratio: 2.5; position: relative; background: #334455; border-radius: 7px; border: 2px solid #596a78; transform: skewY(-8deg) translateY(18%); box-shadow: 5px 9px 0 #1f2e3b; }
.joystick { position: absolute; width: 5%; height: 66%; left: 23%; bottom: 43%; background: #cbd2db; transform: rotate(-12deg); border-radius: 5px; }
.joystick::after { content: ""; position: absolute; width: 260%; aspect-ratio: 1; top: -25%; left: -80%; border-radius: 50%; background: #f6ddac; box-shadow: inset -4px -4px #cd9f6a; }
.arcade-keys { position: absolute; display: flex; gap: 12%; width: 42%; top: 30%; right: 10%; }
.arcade-keys i { width: 23%; aspect-ratio: 1; background: #a7c9f8; border-radius: 50%; box-shadow: 0 2px 0 #122536; }
.arcade-keys i:last-child { background: #f6ddac; }
.art-control { background: radial-gradient(ellipse at 65% 25%, #bad9ce, #86b0a8); }
.control-display { width: 65%; aspect-ratio: 1.6; background: #183e41; border-radius: 8px; border-top: 10px solid #285052; display: grid; grid-template-columns: repeat(3, 1fr); align-content: center; gap: 8%; padding: 8%; transform: rotate(5deg); box-shadow: 6px 10px 0 #3a756f78; }
.control-display i { height: 14px; border-radius: 2px; background: #80baab; }
.control-display i:nth-child(2n) { background: #c0e5cf; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding: 16px 12px 0 0; }
.steps li::before { content: counter(step, decimal-leading-zero); color: var(--blue); display: block; font-variant-numeric: tabular-nums; font-size: 14px; margin-bottom: 10px; }
.steps p { margin-top: 7px; }
.contact-wrap { padding-bottom: clamp(36px, 6vw, 84px); }
.contact { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px 36px; padding: clamp(24px, 5vw, 64px); background: var(--navy); color: #fff; border-radius: 16px; }
.contact p { color: #d3dfef; max-width: 52ch; margin-top: 12px; }
.button-light { color: var(--ink); background: #e2eaff; }
.button-light:hover { background: #fff; }
.contact :focus-visible { outline-color: #aec0ff; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer .wordmark { color: var(--ink); }

.case { padding-block: clamp(28px, 6vw, 78px); }
.back-link { color: var(--blue); margin-bottom: 22px; }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.case h1 { font-size: clamp(35px, 5vw, 67px); }
.case h2 { font-size: clamp(24px, 2.5vw, 36px); margin-block: 27px 10px; }
.case-intro { margin-top: 14px; font-size: 20px; }
.case-tech { margin-block: 17px 25px; font-size: 14px; }
.case-figure .project-art { border-radius: 13px; }
.case-figure figcaption { margin-top: 7px; color: var(--muted); font-size: 13px; }

@media (max-width: 1050px) {
  .header-inner { grid-template-columns: auto minmax(0, 1fr); gap: 2px 16px; }
  .header-end { justify-content: flex-end; }
  .header-contacts { min-width: 0; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; border-top: 1px solid var(--line); }
}
@media (max-width: 950px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .frame { width: calc(100% - 36px); }
  .header-inner { padding-block: 12px 6px; }
  .header-end { flex-wrap: wrap; gap: 8px 14px; }
  .header-action.button { max-width: 100%; padding-inline: 12px; gap: 8px; font-size: 14px; white-space: normal; }
  .hero, .section-heading, .case-grid { grid-template-columns: minmax(0, 1fr); }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-art { aspect-ratio: 1.85; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .footer-inner { flex-wrap: wrap; padding-block: 20px; gap: 12px 22px; }
}
@media (max-width: 540px) {
  .header-inner { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .header-inner nav { grid-row: 3; flex-wrap: wrap; gap: 0 16px; }
  .header-end { grid-row: 2; justify-content: flex-start; }
}
@media (max-width: 470px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: clamp(31px, 9.2vw, 43px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.contacts-layout { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; padding-block: clamp(32px, 5vw, 72px); }
.contacts-layout address { display: grid; justify-items: start; font-style: normal; font-size: 18px; }
.contacts-layout address a { color: var(--blue); text-underline-offset: 4px; }
.maintenance h1 { max-width: 21ch; font-size: clamp(32px, 5vw, 68px); }
.maintenance-intro { max-width: 62ch; margin-top: 20px; font-size: clamp(17px, 1.6vw, 21px); }
.rates-title { margin: clamp(36px, 5vw, 72px) 0 20px; font-size: clamp(26px, 3vw, 40px); }
.rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rate { display: flex; flex-direction: column; padding: clamp(20px, 2.5vw, 36px); background: white; border: 1px solid var(--line); border-radius: 16px; }
.rate p { margin: 14px 0 30px; }
.rate-price { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: clamp(28px, 3vw, 42px); font-weight: 500; line-height: 1.2; }
.rate-price small { display: block; margin-top: 6px; font-size: 15px; font-weight: 400; }
.rate.monthly { background: var(--navy); border-color: var(--navy); color: white; }
.monthly p, .monthly small { color: #dce7ff; }
.monthly .rate-price { border-color: #506176; }
@media (max-width: 800px) {
  .rates, .contacts-layout { grid-template-columns: 1fr; }
  .rate p { margin-bottom: 20px; }
}

.contact-page h1 { margin-bottom: clamp(32px, 5vw, 72px); }
.contact-spread { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 88px); }
.contact-channels { font-style: normal; }
.contact-channels a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: clamp(20px, 3vw, 38px) 0; border-top: 1px solid var(--line); text-decoration: none; }
.contact-channels a:last-child { border-bottom: 1px solid var(--line); }
.channel-label { grid-column: 1; color: var(--muted); font-size: 15px; }
.channel-value { grid-column: 1; font-size: clamp(23px, 3.4vw, 52px); letter-spacing: -.045em; overflow-wrap: anywhere; line-height: 1.2; }
.channel-arrow { grid-column: 2; grid-row: 1 / 3; color: var(--blue); font-size: 30px; }
.contact-channels a:is(:hover, :focus-visible) .channel-value { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.contact-imprint { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(24px, 3vw, 40px); border-radius: 12px; background: var(--blue); }
.contact-imprint img { width: clamp(58px, 6vw, 86px); height: auto; filter: brightness(0) invert(1); }
.contact-imprint p { color: white; }
.contact-imprint p:first-child { font-size: clamp(21px, 2vw, 28px); letter-spacing: -.03em; }
.contact-imprint p + p { margin-top: 3px; font-size: 15px; color: #e2eaff; }
@media (max-width: 700px) {
  .contact-spread { grid-template-columns: minmax(0, 1fr); }
  .contact-imprint { flex-direction: row-reverse; align-items: center; gap: 12px; }
}
