:root {
  --background: #07080d;
  --panel: #11131b;
  --line: rgba(255, 255, 255, .1);
  --text: #f4f5f8;
  --muted: #a9afbc;
  --brand: #ffad33;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; color-scheme: dark only; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; position: relative; isolation: isolate; color: var(--text); background: var(--background); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url("images/background-graphite-desktop.svg?v=3") center / cover no-repeat; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.page { width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 100; padding: 14px 0; background: rgba(7, 8, 13, .1); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.nav { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { color: var(--brand); font-size: 14px; font-weight: 800; letter-spacing: .12em; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: clamp(16px, 2.4vw, 34px); }
.nav-links a { color: #c8ccd5; font-size: 13px; transition: color .2s ease; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--brand); }
.hero { min-height: 600px; display: flex; flex-direction: column; justify-content: center; padding: 88px 0; }
.eyebrow { margin: 0 0 22px; display: flex; align-items: center; gap: 10px; color: #bac0cb; font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #fff1a6; box-shadow: 0 0 5px #fff, 0 0 12px var(--brand), 0 0 22px rgba(255, 91, 31, .8); }
.hero h1 { max-width: none; margin: 0; font-size: clamp(40px, 5.4vw, 74px); line-height: 1.02; letter-spacing: -.055em; font-weight: 700; }
.hero h1 span { display: block; white-space: nowrap; }
.hero-lead { max-width: 780px; margin: 30px 0 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 22px); line-height: 1.55; text-wrap: balance; }
.hero-lead span { display: block; white-space: nowrap; }
.hero-actions { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 12px; }
.button, .project-open { min-height: 50px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.button:hover, .project-open:hover { transform: translateY(-2px); }
.button-primary, .project-open { color: #17120a; background: var(--brand); border: 1px solid var(--brand); }
.button-secondary { color: var(--text); background: rgba(255,255,255,.04); border: 1px solid rgba(255,173,51,.7); }
.section { padding: 112px 0; border-top: 1px solid rgba(255, 173, 51, .45); }
.section-heading { margin-bottom: 48px; }
.section-heading h2 { max-width: 850px; margin: 0; font-size: clamp(35px, 4.4vw, 62px); line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.service-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.service-grid article, .process-grid li, .faq-item { padding: 25px; background: linear-gradient(145deg, rgba(35,38,48,.88), rgba(15,17,24,.94)); border: 1px solid var(--line); border-radius: 18px; }
.service-grid article { grid-column: span 2; min-height: 170px; }
.service-grid article:nth-child(4), .service-grid article:nth-child(5) { grid-column: span 3; }
.service-grid span, .process-grid span, .faq-list span { color: var(--brand); font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.service-grid h3, .process-grid h3 { margin: 48px 0 0; font-size: 20px; line-height: 1.25; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card, .project-dialog { --accent: #9a7cff; --accent-soft: rgba(154,124,255,.14); }
.telegram-card { --accent: #4f9cff; --accent-soft: rgba(79,156,255,.14); }
.edm-card { --accent: #33d6b4; --accent-soft: rgba(51,214,180,.13); }
.project-card { min-width: 0; overflow: hidden; position: relative; display: flex; flex-direction: column; background: linear-gradient(145deg, rgba(38,41,51,.96), rgba(15,17,24,.98)); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.24); }
.project-card::before, .project-dialog::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); }
.project-card-body { flex: 1; min-height: 390px; padding: 32px 27px 27px; display: flex; flex-direction: column; align-items: flex-start; }
.project-platform { width: fit-content; padding: 8px 11px; color: #fff; background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 64%, transparent); border-radius: 999px; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 36%, transparent); font: 650 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.project-card h3 { margin: 24px 0 15px; font-size: clamp(24px, 2.1vw, 31px); line-height: 1.08; letter-spacing: -.035em; }
.project-card p { margin: 0 0 28px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.project-open { width: 100%; margin-top: auto; color: #fff; background: color-mix(in srgb, var(--accent) 22%, #13151d); border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.process-grid { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; list-style: none; }
.process-grid li { min-height: 210px; }
.process-grid h3 { margin-top: 72px; }
.faq-list { display: grid; gap: 10px; }
.faq-item { min-height: 120px; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; align-items: start; }
.faq-item > span { padding-top: 5px; }
.faq-copy h3 { margin: 0; font-size: clamp(18px, 1.8vw, 23px); line-height: 1.25; letter-spacing: -.02em; }
.faq-copy p { max-width: 1050px; margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.contact { padding: 112px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, .8fr); gap: 58px; align-items: end; border-top: 1px solid rgba(255, 173, 51, .45); border-bottom: 1px solid rgba(255, 173, 51, .45); }
.contact h2 { margin: 0 0 20px; max-width: 760px; font-size: clamp(38px, 4.6vw, 66px); line-height: 1.03; letter-spacing: -.05em; text-wrap: balance; }
.contact-copy > p:last-child { margin: 0; max-width: 650px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.contact-links { display: grid; gap: 12px; }
.contact-link { min-height: 102px; padding: 21px 23px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: linear-gradient(135deg, rgba(38,40,48,.96), rgba(17,19,26,.96)); border: 1px solid rgba(255,173,51,.72); border-radius: 16px; box-shadow: 0 0 18px rgba(255,145,20,.16); transition: transform .2s ease, box-shadow .2s ease; }
.contact-link:hover { transform: translateY(-2px); box-shadow: 0 0 26px rgba(255,145,20,.3); }
.contact-link span { color: var(--muted); font-size: 12px; }
.contact-link strong { grid-column: 1; margin-top: 7px; overflow-wrap: anywhere; font-size: clamp(19px, 2vw, 27px); }
.contact-link i { grid-column: 2; grid-row: 1 / 3; color: var(--brand); font-size: 26px; font-style: normal; }
footer { min-height: 88px; display: flex; align-items: center; justify-content: space-between; color: #6f7582; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: transparent;
  border: 1px solid rgba(255, 173, 51, .62);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255,173,51,.12);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, box-shadow .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: rgba(255,173,51,.07); box-shadow: 0 0 22px rgba(255,173,51,.26); }
.back-to-top:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 3px; }
html.modal-open, body.modal-open { overflow: hidden; overscroll-behavior: none; }
.project-modal { position: fixed; inset: 0; z-index: 500; overflow-y: auto; overscroll-behavior: contain; padding: 30px; background: rgba(3,4,8,.91); backdrop-filter: blur(12px); }
.project-modal[hidden] { display: none; }
.project-dialog { width: min(1080px, 100%); min-height: calc(100vh - 60px); margin: 0 auto; overflow: hidden; position: relative; background: #11131a; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.modal-close { position: sticky; top: 18px; z-index: 2; float: right; width: 44px; height: 44px; margin: 18px 18px 0 0; padding: 0; display: grid; place-items: center; color: #fff; background: rgba(15,17,24,.92); border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent); border-radius: 50%; cursor: pointer; }
.modal-close-bottom { position: static; float: none; width: fit-content; min-width: 148px; height: 44px; margin: 28px auto 0; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 0; border-radius: 999px; font-size: 14px; font-weight: 700; }
.modal-close.modal-close-bottom svg { display: none; }
.dialog-content { padding: 70px clamp(24px, 6vw, 76px) 76px; }
.dialog-content > h2 { max-width: 820px; margin: 28px 0 50px; font-size: clamp(38px, 5.5vw, 68px); line-height: 1; letter-spacing: -.05em; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-grid section, .modal-section { padding: 28px; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 16px; }
.detail-grid h3, .modal-section h3 { margin: 0 0 17px; color: color-mix(in srgb, var(--accent) 80%, white); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.detail-grid p { margin: 0; color: #c1c5ce; font-size: 16px; line-height: 1.7; }
.modal-section { margin-top: 14px; }
.result-list { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; list-style: none; }
.result-list li { min-height: 50px; padding: 14px 14px 14px 38px; position: relative; display: flex; align-items: center; color: #c7cbd4; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 11px; font-size: 14px; line-height: 1.4; }
.result-list li::before { content: "✓"; position: absolute; left: 14px; color: var(--accent); font-weight: 800; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 9px 12px; color: #eef0f5; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 44%, transparent); border-radius: 999px; font-size: 13px; }
.gallery-heading { width: min(100%, 720px); margin: 0 auto; display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.gallery-heading span { color: var(--muted); font-size: 13px; }
.gallery { width: min(100%, 720px); margin: 0 auto; display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 4px 0 12px; scroll-snap-type: x mandatory; scrollbar-color: var(--accent) rgba(255,255,255,.06); }
.gallery button { flex: 0 0 100%; height: clamp(230px, 32vw, 340px); padding: 12px; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: #090b10; border: 1px solid var(--line); border-radius: 14px; cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.gallery-count { width: min(100%, 720px); margin: 9px auto 0; color: color-mix(in srgb, var(--accent) 75%, white); text-align: right; font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 56px 72px; background: rgba(3,4,8,.96); touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox-image { max-width: min(1500px, 92vw); max-height: 84vh; display: block; object-fit: contain; border: 1px solid rgba(255,173,51,.5); border-radius: 14px; box-shadow: 0 24px 80px rgba(0,0,0,.7); }
.lightbox-close, .lightbox-nav { position: absolute; padding: 0; display: grid; place-items: center; color: #fff; background: rgba(15,17,24,.9); border: 1px solid rgba(255,173,51,.65); border-radius: 50%; cursor: pointer; }
.lightbox-close { top: 20px; right: 24px; width: 44px; height: 44px; }
.lightbox-nav { top: 50%; width: 48px; height: 48px; display: grid; transform: translateY(-50%); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.modal-close svg, .lightbox-close svg, .lightbox-nav svg { width: 18px; height: 18px; display: block; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-count { position: absolute; bottom: 23px; color: #fff; font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 980px) {
  .project-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body::before { inset: auto; top: 0; left: 0; width: 100vw; height: 100vh; height: 100lvh; background-image: url("images/background-graphite-desktop.svg?v=3"); background-position: center top; background-size: cover; transform: translateZ(0); }
  .page { width: min(100% - 28px, 1320px); }
  .site-header { padding: 10px 0; }
  .nav { align-items: flex-start; flex-direction: column; gap: 10px; }
  .nav-links { width: 100%; overflow: visible; justify-content: space-between; gap: 8px; padding: 3px 0 7px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; white-space: nowrap; font-size: clamp(10px, 2.9vw, 12px); }
  .hero { min-height: 500px; padding: 64px 0; }
  .hero h1 { font-size: clamp(35px, 4.4vw, 62px); line-height: 1.02; letter-spacing: -.045em; }
  .hero h1 span { white-space: normal; }
  .hero-lead { margin-top: 25px; font-size: 17px; line-height: 1.55; text-wrap: initial; }
  .hero-lead span { white-space: normal; }
  .hero-actions { display: grid; }
  .section, .contact { padding: 78px 0; }
  .section-heading { margin-bottom: 34px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-grid article, .service-grid article:nth-child(4), .service-grid article:nth-child(5) { grid-column: auto; min-height: 132px; }
  .service-grid h3 { margin-top: 35px; }
  .project-card-body { min-height: 350px; padding: 25px 22px 22px; }
  .project-card h3 { font-size: 27px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-grid li { min-height: 145px; }
  .process-grid h3 { margin-top: 44px; }
  .faq-item { min-height: 0; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 20px 17px; }
  .faq-copy h3 { font-size: 18px; }
  .faq-copy p { margin-top: 10px; font-size: 14px; line-height: 1.6; }
  .contact-links { min-width: 0; }
  .contact-link strong { font-size: 19px; }
  .project-modal { padding: 0; }
  .project-dialog { min-height: 100%; border: 0; border-radius: 0; }
  .dialog-content { padding: 66px 16px 45px; }
  .dialog-content > h2 { margin-bottom: 34px; font-size: clamp(36px, 11vw, 50px); }
  .detail-grid, .result-list { grid-template-columns: 1fr; }
  .detail-grid section, .modal-section { padding: 21px; }
  .gallery-heading { align-items: flex-start; flex-direction: column; gap: 0; }
  .gallery button { height: 230px; padding: 8px; }
  .lightbox { padding: 58px 10px; }
  .lightbox-image { max-width: 96vw; max-height: 78vh; border-radius: 8px; }
  .lightbox-nav { display: none; }
  footer { min-height: 76px; }
  .back-to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
