:root {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #111c2e;
  --line: #2a3c54;
  --text: #edf3fb;
  --muted: #b2c1d5;
  --blue: #8deaff;
  --cyan: #5eead4;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--blue); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #9bdeff; outline-offset: 4px; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--bg);
  padding: 8px 16px;
}
.skip:focus { transform: translateY(0); }
.site-header {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  background: #0b1220f2;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-row, .brand, .nav, .languages, .footer-row {
  display: flex;
  align-items: center;
}
.header-row { min-height: 74px; gap: 18px; justify-content: space-between; }
.brand { text-decoration: none; color: var(--text); font-weight: 800; gap: 10px; letter-spacing: .07em; line-height: 1.2; }
.brand img { border-radius: 10px; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .18em; }
.nav { gap: clamp(10px, 1.2vw, 21px); }
.nav a, .languages a { text-decoration: none; color: var(--muted); font-size: .82rem; }
.nav a:hover, .nav a[aria-current], .languages a[aria-current] { color: var(--blue); }
.languages { gap: 8px; }
.languages a { padding: 4px; }
.menu { display: none; }
main { padding-top: 74px; }
.hero {
  padding: clamp(56px, 8vw, 110px) 0;
  background: radial-gradient(ellipse at 78% 20%, #16445a66, transparent 42%),
              radial-gradient(ellipse at 15% 80%, #263b7060, transparent 52%);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(26px, 5vw, 70px); }
.hero h1 { max-width: 950px; margin: 0 0 18px; font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: 1.07; letter-spacing: -.04em; }
.hero h1 span { color: var(--cyan); }
.hero.subhero { padding: clamp(38px, 6vw, 80px) 0; }
.subhero h1 { font-size: clamp(2rem, 5vw, 4rem); }
.eyebrow { color: var(--blue); font-size: .77rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin-top: 0; }
.intro { color: var(--muted); max-width: 70ch; font-size: clamp(1.05rem, 1.7vw, 1.24rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn, .assistant-trigger {
  display: inline-block;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--cyan);
  color: #071421;
  text-decoration: none;
  font-weight: 750;
}
.btn:hover, .assistant-trigger:hover { background: var(--blue); }
.btn.secondary, .actions .btn + .btn { background: #15243a; color: var(--text); border-color: #456581; }
.btn.secondary:hover, .actions .btn + .btn:hover { border-color: var(--blue); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: 12px; color: #7b92ad; }
.section { padding: clamp(30px, 4.5vw, 66px) 0; }
.section + .section { border-top: 1px solid #203047; }
.section h2 { font-size: clamp(1.45rem, 3.2vw, 2.35rem); line-height: 1.2; margin: 0 0 20px; max-width: 34ch; }
.section p { color: var(--muted); max-width: 80ch; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; padding: 0; margin: 0 0 20px; }
ol.cards { counter-reset: flow; list-style: none; }
ol.cards > li { counter-increment: flow; }
ol.cards > li::before { content: counter(flow, decimal-leading-zero); color: var(--blue); font-weight: 700; }
.panel { min-width: 0; padding: clamp(18px, 2.6vw, 30px); border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #14223a, var(--panel)); }
.panel h3 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.3; }
.panel h3 a:hover { color: #fff; }
.panel h4 { margin: 0 0 6px; }
.panel p:last-child { margin-bottom: 0; }
.assignment { max-width: 820px; }
.assignment .cards { margin-bottom: 0; }
.assignment ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.assignment h3 { margin-bottom: 18px; }
details.panel { margin-bottom: 10px; padding-block: 15px; }
summary { cursor: pointer; color: var(--blue); font-weight: 650; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); align-items: end; gap: 22px; }
.gallery figure { margin: 0; text-align: center; }
.screen-frame { display: block; max-width: 240px; margin: 0 auto 12px; padding: 7px; border-radius: 20px; background: #050a13; border: 1px solid #4a6380; overflow: hidden; }
.screen-frame:hover { border-color: var(--blue); }
.screen-frame img { display: block; width: 100%; height: auto; border-radius: 14px; }
.laptop { max-width: 100%; border-radius: 14px 14px 5px 5px; border-bottom: 10px solid #455a76; }
.laptop img { border-radius: 7px; }
figcaption { color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-weight: 650; margin-bottom: 12px; }
input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid #526e8f; border-radius: 8px; color: var(--text); background: #0b1627; }
textarea { resize: vertical; }
.estimate output { display: inline-block; margin-left: 8px; font-size: 1.35rem; color: var(--blue); font-weight: 750; }
.contact-form { max-width: 780px; }
footer { padding: 26px 0 86px; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
.footer-row { flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 12px; }
.assistant-trigger { position: fixed; z-index: 5; right: 16px; bottom: 16px; box-shadow: 0 8px 32px #0008; }
dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 20px; border: 1px solid #526e8f; border-radius: 16px; color: var(--text); background: var(--panel); }
dialog::backdrop { background: #070c17d9; }
.dialog-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.dialog-head h2 { font-size: 1.3rem; margin: 0; }
dialog button, .menu { border: 1px solid #526e8f; border-radius: 8px; padding: 6px 10px; background: #172841; color: var(--text); }
.assistant-actions { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
#assistant-answer a { display: inline-block; margin: 0 12px 8px 0; }
#image-dialog { width: fit-content; max-width: calc(100% - 32px); }
#image-dialog img { display: block; margin: 10px auto 0; width: auto; height: auto; max-height: calc(100dvh - 115px); object-fit: contain; }
@media (max-width: 1120px) {
  .menu { display: block; margin-left: auto; }
  .nav { position: absolute; top: 100%; inset-inline: 0; padding: 14px 20px; gap: 12px 22px; flex-wrap: wrap; background: var(--bg); border-bottom: 1px solid var(--line); }
  .menu[aria-expanded="false"] + .nav { display: none; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .hero-grid { grid-template-columns: 1fr; }
  .header-row { gap: 8px; }
  .brand { gap: 6px; }
  .brand img { width: 32px; height: 32px; }
  .languages { gap: 1px; }
  .languages a { font-size: .74rem; padding-inline: 3px; }
  .menu { padding-inline: 6px; font-size: .8rem; }
}
@media (max-width: 350px) {
  .brand small { display: none; }
}
@media (min-width: 850px) {
  .gallery { grid-template-columns: 2.1fr 1fr 1fr; }
}
@media (max-width: 760px) {
  body:has(.contact-form) .assistant-trigger {
    position: static;
    margin: 0 14px 18px;
  }
  body:has(.contact-form) footer { padding-bottom: 26px; }
}
