:root {
  --bg: #0c0d10;
  --surface: #15171c;
  --surface-2: #1c1f26;
  --line: #2a2e37;
  --text: #edebe6;
  --muted: #9b9ea6;
  --ai: #a78bfa;
  --mobil: #34d399;
  --delphi: #f5a524;
  --csob: #0b3a70;
  --accent: #edebe6;
  --radius: 18px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand { font: 700 18px var(--display); text-decoration: none; letter-spacing: -0.01em; }
.topbar nav { display: flex; gap: 6px; align-items: center; }
.topbar nav a {
  text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 7px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.topbar nav a:hover, .topbar nav a.active { color: var(--text); background: var(--surface-2); }
.topbar nav .nav-cta { color: var(--bg); background: var(--text); }
.topbar nav .lang { font: 500 13px var(--mono); letter-spacing: .06em; }
.topbar nav .nav-cta:hover { color: var(--bg); background: #fff; }

.eyebrow { font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 20px; }
.eyebrow.light { color: #9cc3ff; }

.hero {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center;
  padding: 72px 0 56px;
}
.hero h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 800; }
.hero .lead { font-size: 19px; color: var(--muted); margin-top: 26px; max-width: 40em; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-photo { margin: 0; position: relative; }
.hero-photo img {
  border-radius: 28px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; width: 100%; height: auto;
  filter: saturate(.9) contrast(1.03);
}
.hero-photo::after {
  content: ""; position: absolute; inset: auto -18px -18px auto; width: 60%; height: 60%;
  border-radius: 28px; z-index: -1;
  background: linear-gradient(135deg, var(--ai), var(--mobil) 55%, var(--delphi));
  opacity: .55; filter: blur(40px);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.big { font-size: 20px; padding: 16px 28px; }

.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 96px; }
.door {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; min-height: 260px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: transform .25s, border-color .25s;
}
.door::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
  opacity: .6; transition: opacity .25s;
}
.door > * { position: relative; }
.door:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.door:hover::before { opacity: 1; }
.door-num { font: 500 13px var(--mono); color: var(--accent); }
.door h2 { font-size: 30px; }
.door p { color: var(--muted); }
.door-go { margin-top: auto; color: var(--accent); font-weight: 600; }

.areas { display: flex; flex-direction: column; gap: 96px; padding-bottom: 96px; }

.terminal {
  margin: 0 -24px; padding: 72px 48px 48px;
  border-radius: 32px;
  background:
    radial-gradient(90% 70% at 85% 10%, #1f6fd1 0%, transparent 60%),
    linear-gradient(160deg, #0b2a55 0%, #071a36 70%);
  overflow: hidden;
}
.terminal-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.terminal h2 { font-size: clamp(32px, 4.2vw, 54px); font-weight: 800; }
.terminal-copy > p:not(.eyebrow) { color: #c5d6ee; margin-top: 22px; font-size: 18px; }
.terminal-photo { margin: 0; }
.terminal-photo img {
  border-radius: 24px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  transform: rotate(2deg);
}
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font: 500 13px var(--mono); padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #dbe8fb;
}
.screens {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-top: 56px; padding: 6px 0 18px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
}
.screens img {
  flex: 0 0 auto; width: 190px; scroll-snap-align: start;
  border-radius: 20px; border: 6px solid #0a0f18; background: #0a0f18;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.7);
  cursor: zoom-in; transition: transform .2s;
}
.screens img:hover { transform: translateY(-4px); }

.area { scroll-margin-top: 80px; }
.area-head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: end;
  padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
.area-num { font: 800 64px/0.8 var(--display); color: var(--accent); }
.area-head h2 { font-size: clamp(34px, 4.5vw, 56px); font-weight: 800; }
.area-sub { color: var(--muted); margin-top: 10px; font-size: 18px; }
.area-toggle {
  display: none;
  font: 600 15px var(--body); color: var(--accent);
  background: transparent; border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 999px; padding: 9px 16px; cursor: pointer;
}
.area-body { padding-top: 36px; }
.area-intro { font-size: 19px; max-width: 46em; color: #d6d4cf; }

.offer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.offer article, .cases article {
  padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.offer h3, .cases h3 { font-size: 21px; margin-bottom: 10px; }
.offer p, .cases p { color: var(--muted); font-size: 15.5px; }
.offer article { border-top: 3px solid var(--accent); }

.subhead { font-size: 22px; margin: 56px 0 18px; }
.repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.repo {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 14px; text-decoration: none;
  transition: border-color .2s, background .2s;
}
.repo:hover { border-color: var(--accent); background: var(--surface); }
.repo strong { font: 500 15px var(--mono); color: var(--accent); }
.repo span { color: var(--muted); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 56px; }
.steps div { padding: 22px 0 0; border-top: 1px solid var(--line); }
.steps span { font: 500 13px var(--mono); color: var(--accent); }
.steps h4 { font-size: 22px; margin: 8px 0 6px; }
.steps p { color: var(--muted); }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.project {
  display: flex; flex-direction: column; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; padding: 0; color: inherit; font: inherit;
  transition: transform .25s, border-color .25s;
}
.project:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.project-shots {
  display: flex; gap: 10px; justify-content: center; align-items: flex-end;
  height: 270px; padding: 26px 18px 0; overflow: hidden;
  background: radial-gradient(100% 90% at 50% 0%, color-mix(in srgb, var(--tint, var(--accent)) 28%, var(--surface-2)), var(--surface-2));
}
.project-shots img {
  width: 42%; border-radius: 14px 14px 0 0; border: 4px solid #0b0c0f; border-bottom: 0;
  object-fit: cover; object-position: top; height: 100%;
}
.project-shots.wide img { width: 92%; height: auto; border-radius: 10px 10px 0 0; }
.project-shots img:nth-child(2) { height: 88%; opacity: .92; }
.project-info { padding: 20px 22px 24px; }
.project-info h3 { font-size: 21px; }
.project-info p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span { font: 500 12px var(--mono); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 3px 9px; border-radius: 999px; }

.more ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.more li { color: var(--muted); padding: 14px 0; border-top: 1px solid var(--line); }
.more strong { color: var(--text); display: block; font-weight: 600; }

.delphi-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.facts { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
.facts li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline; }
.facts b { font: 800 30px var(--display); color: var(--accent); }
.facts span { color: var(--muted); }
.code {
  margin: 0; padding: 24px 26px; overflow-x: auto;
  font: 400 14px/1.75 var(--mono); color: #e6e1d6;
  background: #16130d; border: 1px solid #3a3020; border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(245,165,36,.25);
}
.c-k { color: var(--delphi); font-weight: 500; }
.c-s { color: #9fd39a; }
.c-c { color: #7c7466; font-style: italic; }
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 40px; }
.cases .case-wide {
  grid-column: 1 / -1; border-top: 3px solid var(--accent);
  display: grid; grid-template-columns: 1fr 1.1fr; column-gap: 36px; align-content: start;
}
.case-wide > :not(.case-visual) { grid-column: 1; }
.case-visual { grid-column: 2; grid-row: 1 / span 4; margin: 0; position: relative; align-self: center; }
.case-visual img:first-child { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 24px 50px -28px rgba(0,0,0,.6); }
.case-visual .sticker { position: absolute; width: 38%; right: -18px; bottom: -34px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.35)); transform: rotate(-4deg); }
.case-wide h3 { font-size: 26px; }
.case-wide > p:not(.case-tag) { max-width: 52em; font-size: 16.5px; }
.case-points { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.case-points li { font: 500 13px var(--mono); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 5px 12px; border-radius: 999px; }
.case-tag { font: 500 12px var(--mono) !important; color: var(--accent) !important; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .08em; }
.case-ai { border-color: color-mix(in srgb, var(--ai) 45%, var(--line)) !important; background: linear-gradient(140deg, color-mix(in srgb, var(--ai) 12%, var(--surface)), var(--surface)) !important; }
.case-ai .case-tag { color: var(--ai) !important; }
.case-ai a { display: inline-block; margin-top: 14px; color: var(--ai); font-weight: 600; text-decoration: none; }

.why { max-width: 820px; margin: 0 auto; padding: 40px 0 96px; text-align: center; }
.why h2 { font-size: clamp(30px, 4vw, 46px); }
.why p { color: var(--muted); font-size: 19px; margin-top: 20px; }

.contact {
  text-align: center; padding: 72px 24px; margin-bottom: 48px;
  border-radius: 32px; background: var(--surface); border: 1px solid var(--line);
}
.contact h2 { font-size: clamp(34px, 5vw, 60px); font-weight: 800; }
.contact > p { color: var(--muted); margin-top: 14px; font-size: 18px; }
.contact-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.contact .fine { font-size: 13px; margin-top: 40px; color: #6c6f77; }

/* focus mode: /ai, /mobil, /delphi */
body[data-focus] .areas { gap: 72px; }
body.focused .doors { display: none; }
body.focused .area { order: 2; }
body.focused .area.is-focus { order: 0; }
body.focused .terminal { order: 1; }
body[data-focus="delphi"] .terminal { order: 3; }
body.focused .area:not(.is-focus):not(.open) .area-body { display: none; }
body.focused .area:not(.is-focus) .area-head { border-bottom: 0; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
body.focused .area:not(.is-focus) .area-num { font-size: 40px; }
body.focused .area:not(.is-focus) h2 { font-size: 30px; }
body.focused .area:not(.is-focus) .area-toggle { display: inline-block; }
body.focused .area.open .area-toggle { display: none; }
body.focused .area.is-focus .area-head { border-bottom-color: var(--accent); }
body.focused .areas::before {
  content: attr(data-more); order: 2; font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
body.focused .area:not(.is-focus):not(.open) { margin-top: -52px; }
body[data-focus="mobil"] .terminal { order: -1; }
body[data-focus="delphi"] .areas::before { order: 1; }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(5,6,8,.92); }
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 1fr auto; align-items: center; justify-items: center; }
.lightbox img { grid-column: 2; max-height: 84vh; max-width: 100%; border-radius: 14px; object-fit: contain; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 44px; cursor: pointer; opacity: .7; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: 12px; right: 20px; }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-caption { grid-column: 1 / -1; color: #bbb; padding: 14px 16px 24px; text-align: center; }

.project.is-more { display: none; }
.projects.show-all .project.is-more { display: flex; }
.show-more {
  display: block; margin: 24px auto 0; cursor: pointer;
  font: 600 15px var(--body); color: var(--accent);
  background: transparent; border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 999px; padding: 11px 20px;
}
.show-more:hover { background: var(--surface); }
.case-shot { cursor: zoom-in; transition: border-color .2s; }
.case-shot:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.case-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; border-radius: 10px; margin-bottom: 18px; background: #fff; }

.quotes { padding: 0 0 96px; }
.quotes h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 32px; }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quote-grid figure { margin: 0; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 18px; }
.quote-grid blockquote { margin: 0; font-size: 16.5px; color: #d6d4cf; }
.quote-grid blockquote::before { content: "“"; display: block; font: 800 44px/0.6 var(--display); color: var(--ai); margin-bottom: 10px; }
.quote-grid figure:nth-child(3n+2) blockquote::before { color: var(--mobil); }
.quote-grid figure:nth-child(3n) blockquote::before { color: var(--delphi); }
.quote-grid figcaption { margin-top: auto; color: var(--muted); font-size: 14px; }
.quote-grid figcaption strong { display: block; color: var(--text); font-size: 15px; }

@media (max-width: 960px) {
  .quote-grid { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
  .hero-photo { max-width: 420px; }
  .doors, .projects, .repos { grid-template-columns: 1fr 1fr; }
  .offer { grid-template-columns: 1fr 1fr; }
  .terminal-inner, .delphi-grid, .cases .case-wide { grid-template-columns: 1fr; }
  .case-wide > :not(.case-visual), .case-visual { grid-column: 1; grid-row: auto; }
  .case-visual { margin-bottom: 40px; }
  .terminal-photo { max-width: 460px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 0 16px; }
  .topbar { padding: 12px 16px; }
  .topbar nav a { padding: 6px 8px; font-size: 14px; }
  .brand { font-size: 16px; }
  .doors, .projects, .repos, .offer, .cases, .steps, .more ul, .quote-grid { grid-template-columns: 1fr; }
  .door { min-height: 0; }
  .terminal { margin: 0 -16px; padding: 48px 20px 32px; border-radius: 24px; }
  .screens img { width: 150px; }
  .area-head { grid-template-columns: 1fr; gap: 10px; }
  .area-num { font-size: 44px; }
  .facts li { grid-template-columns: 90px 1fr; }
  .lightbox[open] { grid-template-columns: 40px 1fr 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
