/* ============ TITAN' — Brand tokens ============ */
:root {
  --orange: #E94E00;
  --orange-dim: rgba(233, 78, 0, .35);
  --black: #171C16;
  --black-2: #101410;
  --black-3: #1E241E;
  --grey: #D7DCE8;
  --grey-dim: rgba(215, 220, 232, .55);
  --light: #F3F3F3;
  --font-head: 'Roboto', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-h: 76px;
  --radius: 2px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none), (max-width: 900px) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--orange); color: var(--light); }

.container {
  width: min(1280px, 92vw);
  margin-inline: auto;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.05; }

/* ============ Preloader ============ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--black-2);
  display: grid; place-items: center;
  transition: transform .8s var(--ease);
}
.preloader.done { transform: translateY(-101%); }
.preloader__inner { display: grid; place-items: center; gap: 28px; }
.preloader__sign { width: 84px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.preloader__bar {
  width: 180px; height: 2px; background: rgba(215,220,232,.15); overflow: hidden;
}
.preloader__bar span { display: block; height: 100%; width: 0; background: var(--orange); }

/* ============ Noise & cursor ============ */
.noise {
  position: fixed; inset: -50%; z-index: 999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .05;
  animation: noiseShift 0.6s steps(3) infinite;
}
@keyframes noiseShift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 1%); }
  66% { transform: translate(1%, -2%); }
}

.cursor {
  position: fixed; z-index: 1001; width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange); pointer-events: none;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed; z-index: 1001; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--orange-dim); pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, border-color .25s;
}
.cursor-ring.is-hover { width: 60px; height: 60px; border-color: var(--orange); }

/* ============ Header ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: clamp(16px, 4vw, 48px);
  transition: background .4s, backdrop-filter .4s, box-shadow .4s;
}
.header.is-scrolled {
  background: rgba(16, 20, 16, .82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(215,220,232,.08);
}
.header__logo { display: flex; align-items: center; gap: 12px; }
.header__sign { height: 40px; }
.header__wordmark {
  font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: .12em;
}
.apos { color: var(--orange); }

.header__nav { display: flex; gap: clamp(16px, 2.5vw, 36px); }
.nav-link {
  position: relative; font-size: 14px; letter-spacing: .04em; color: var(--grey);
  transition: color .25s;
}
.nav-link:hover { color: var(--light); }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--orange); transition: width .3s var(--ease);
}
.nav-link:hover::after { width: 100%; }

.header__right { display: flex; align-items: center; gap: 20px; }
.header__phone {
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .06em;
  color: var(--light);
}
.burger { display: none; background: none; border: 0; width: 32px; height: 24px; position: relative; }
.burger span {
  position: absolute; left: 0; width: 100%; height: 2px; background: var(--light); transition: .3s;
}
.burger span:first-child { top: 6px; }
.burger span:last-child { bottom: 6px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .05em;
  padding: 16px 32px; border-radius: var(--radius);
  position: relative; overflow: hidden;
  transition: color .3s var(--ease), border-color .3s;
  white-space: nowrap;
}
.btn--sm { padding: 11px 20px; font-size: 13px; }
.btn--wide { width: 100%; }
.btn--solid { background: var(--orange); color: var(--light); }
.btn--solid::before {
  content: ""; position: absolute; inset: 0; background: var(--black-2);
  transform: translateY(101%); transition: transform .35s var(--ease);
}
.btn--solid:hover::before { transform: translateY(0); }
.btn--solid > * { position: relative; }
.btn--solid { z-index: 0; }
.btn--solid:hover { color: var(--orange); }
.btn--ghost { border: 1px solid rgba(215,220,232,.3); color: var(--light); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn span, .btn b { position: relative; z-index: 1; }

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--header-h);
  overflow: hidden;
  background: radial-gradient(120% 90% at 70% 20%, var(--black-3) 0%, var(--black) 55%, var(--black-2) 100%);
}
.hero__bg { position: absolute; inset: 0; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(215,220,232,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215,220,232,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 100%);
}
.hero__glow {
  position: absolute; right: -10%; top: 10%; width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(233,78,0,.14) 0%, transparent 60%);
}
.hero__maskwrap {
  position: absolute; right: -6vw; top: 50%;
  translate: 0 -50%;
  width: clamp(420px, 46vw, 760px);
  will-change: transform;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(65% 60% at 55% 50%, #000 35%, transparent 78%);
  mask-image: radial-gradient(65% 60% at 55% 50%, #000 35%, transparent 78%);
}
.hero__mask {
  width: 100%;
  opacity: .16;
  animation: maskIn 1.6s var(--ease) .3s both;
}
@keyframes maskIn {
  from { opacity: 0; transform: translateX(70px) scale(1.04); }
  to   { opacity: .16; transform: none; }
}
/* фірмові глітч-елементи з брендбука */
.glitch-el { position: absolute; pointer-events: none; opacity: .5; }
.glitch-el--a {
  left: 0; top: 26%; width: clamp(180px, 22vw, 340px);
  animation: glitchDriftA 7s steps(6) infinite;
}
.glitch-el--b {
  left: 6%; bottom: 16%; width: clamp(140px, 16vw, 250px);
  animation: glitchDriftB 9s steps(5) infinite;
}
.glitch-el--c {
  right: 0; top: 12%; width: clamp(200px, 24vw, 380px); opacity: .35;
  animation: glitchDriftA 11s steps(4) infinite;
}
@keyframes glitchDriftA {
  0%, 88%, 100% { transform: none; opacity: .5; }
  90% { transform: translateX(-10px); opacity: .8; }
  94% { transform: translateX(6px); opacity: .35; }
}
@keyframes glitchDriftB {
  0%, 82%, 100% { transform: none; opacity: .45; }
  86% { transform: translate(8px, -3px); opacity: .75; }
  92% { transform: translate(-5px, 2px); opacity: .3; }
}

.hero__content { position: relative; z-index: 2; }
.hero__over {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--grey-dim);
  margin-bottom: 28px;
}
.tick { width: 34px; height: 1px; background: var(--orange); display: inline-block; }
.hero__title {
  font-size: clamp(44px, 7.4vw, 108px);
  text-transform: uppercase; letter-spacing: .01em;
  margin-bottom: 32px;
}
.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: block; transform: translateY(110%); }
.hero__title em { font-style: normal; color: var(--orange); }
.hero__sub { max-width: 520px; color: var(--grey); font-size: 17px; margin-bottom: 40px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__footer {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: clamp(24px, 5vw, 72px);
  padding-block: 36px 40px;
  border-top: 1px solid rgba(215,220,232,.08);
  margin-top: clamp(40px, 8vh, 96px);
}
.hero__fact { display: grid; gap: 2px; }
.hero__fact b { font-family: var(--font-head); font-size: 22px; color: var(--orange); letter-spacing: .03em; }
.hero__fact span { font-size: 12.5px; color: var(--grey-dim); letter-spacing: .04em; }
.hero__scroll { margin-left: auto; width: 1px; height: 48px; background: rgba(215,220,232,.15); position: relative; overflow: hidden; }
.hero__scroll span {
  position: absolute; top: -50%; width: 100%; height: 50%; background: var(--orange);
  animation: scrollHint 1.8s var(--ease) infinite;
}
@keyframes scrollHint { to { top: 110%; } }

/* reveal helpers */
.reveal { opacity: 0; transform: translateY(28px); }

/* ============ Marquee ============ */
.marquee {
  border-block: 1px solid rgba(215,220,232,.08);
  background: var(--black-2);
  overflow: hidden; padding-block: 18px;
}
.marquee__track {
  display: flex; gap: 48px; align-items: center; width: max-content;
  animation: marquee 22s linear infinite;
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--grey-dim);
}
.marquee__track i { color: var(--orange); font-style: normal; font-size: 10px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Sections ============ */
.section { padding-block: clamp(88px, 12vh, 160px); position: relative; }
.section__head { margin-bottom: clamp(48px, 7vh, 80px); position: relative; }
.section__num {
  font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: .2em;
  color: var(--orange);
  display: flex; width: fit-content; align-items: center; gap: 10px; margin-bottom: 18px;
}
.section__num::after { content: ""; width: 40px; height: 1px; background: var(--orange-dim); }
.section__title {
  font-size: clamp(34px, 4.6vw, 64px); text-transform: uppercase; margin-bottom: 20px;
}
.section__lead { color: var(--grey-dim); font-size: 17px; max-width: 560px; }

/* glitch on titles (hover / inview pulse) */
.glitch-title { position: relative; display: inline-block; }
.glitch-title::before, .glitch-title::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.glitch-title.glitching::before {
  opacity: .8; color: var(--orange); transform: translate(3px, -2px);
  clip-path: inset(20% 0 55% 0); animation: glitchA .32s steps(2) both;
}
.glitch-title.glitching::after {
  opacity: .8; color: var(--grey); transform: translate(-3px, 2px);
  clip-path: inset(60% 0 15% 0); animation: glitchB .32s steps(2) both;
}
@keyframes glitchA { 50% { clip-path: inset(5% 0 80% 0); } }
@keyframes glitchB { 50% { clip-path: inset(75% 0 3% 0); } }

.glitch-word { position: relative; }

/* ============ Services ============ */
.services { background: var(--black); }
.services__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(215,220,232,.1);
  border-left: 1px solid rgba(215,220,232,.1);
}
.scard {
  position: relative; padding: 40px 32px 56px;
  border-right: 1px solid rgba(215,220,232,.1);
  border-bottom: 1px solid rgba(215,220,232,.1);
  transition: background .35s var(--ease);
  overflow: hidden;
}
.scard::before {
  content: attr(data-i); position: absolute; top: 20px; right: 24px;
  font-family: var(--font-head); font-size: 13px; letter-spacing: .15em; color: var(--grey-dim);
  transition: color .3s;
}
.scard::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.scard:hover { background: var(--black-3); }
.scard:hover::after { transform: scaleX(1); }
.scard:hover::before { color: var(--orange); }
.scard__icon { width: 44px; height: 44px; color: var(--orange); margin-bottom: 26px; }
.scard__icon svg { width: 100%; height: 100%; }
.scard h3 { font-size: 21px; margin-bottom: 12px; letter-spacing: .01em; }
.scard p { color: var(--grey-dim); font-size: 15px; }
.scard__arrow {
  position: absolute; left: 32px; bottom: 20px; color: var(--orange);
  opacity: 0; transform: translateX(-8px); transition: .3s var(--ease);
  font-size: 20px;
}
.scard:hover .scard__arrow { opacity: 1; transform: translateX(0); }

/* ============ Process ============ */
.process { background: var(--black-2); }
.timeline {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  margin-bottom: clamp(56px, 8vh, 96px);
}
.tstep { position: relative; padding-top: 28px; }
.tstep::before {
  content: ""; position: absolute; top: 0; left: 0; right: -32px; height: 1px;
  background: rgba(215,220,232,.12);
}
.tstep:last-child::before { right: 0; }
.tstep::after {
  content: ""; position: absolute; top: -3.5px; left: 0; width: 7px; height: 7px;
  background: var(--grey-dim); transform: rotate(45deg);
}
.tstep--accent::after { background: var(--orange); }
.tstep__num {
  font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: .2em;
  color: var(--orange);
}
.tstep__body h3 { font-size: 20px; margin: 10px 0 8px; }
.tstep__body p { font-size: 14.5px; color: var(--grey-dim); }

.process__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid rgba(215,220,232,.1); padding-top: 48px;
}
.stat b {
  display: block; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(34px, 3.6vw, 52px); color: var(--light); letter-spacing: .01em;
}
.stat span { font-size: 13.5px; color: var(--grey-dim); }

/* ============ Calculator ============ */
.calc { background: var(--black); }
.calc__wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.calc__info { position: sticky; top: calc(var(--header-h) + 32px); }
.calc__sign { width: 120px; margin-top: 48px; opacity: .25; }

.calc__form {
  background: var(--black-2); border: 1px solid rgba(215,220,232,.1);
  padding: clamp(28px, 3.5vw, 48px); display: grid; gap: 32px;
}
.calc__field { border: 0; }
.calc__field legend {
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .05em;
  margin-bottom: 16px; color: var(--light);
}
.calc__field output { color: var(--orange); }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span {
  display: inline-block; padding: 10px 20px; font-size: 14px; letter-spacing: .03em;
  border: 1px solid rgba(215,220,232,.25); color: var(--grey);
  transition: .25s; user-select: none;
}
.chip input:checked + span {
  background: var(--orange); border-color: var(--orange); color: var(--light);
}
.chip:hover span { border-color: var(--orange); }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 2px;
  background: linear-gradient(to right, var(--orange) var(--fill, 12%), rgba(215,220,232,.2) var(--fill, 12%));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; background: var(--orange);
  transform: rotate(45deg); cursor: pointer; border: none;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; background: var(--orange); transform: rotate(45deg);
  cursor: pointer; border: none; border-radius: 0;
}

.calc__result {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-top: 1px solid rgba(215,220,232,.12); padding-top: 28px; flex-wrap: wrap;
}
.calc__label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-dim); }
.calc__price { font-family: var(--font-head); font-weight: 600; font-size: 40px; }
.calc__price b { color: var(--orange); font-weight: 600; }
.calc__note { font-size: 12.5px; color: var(--grey-dim); }

/* ============ About ============ */
.about { background: var(--black-2); overflow: hidden; }
.about__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.about__media { position: relative; }
.about__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  filter: saturate(.92) contrast(1.05);
}
.about__media::before {
  content: ""; position: absolute; inset: -14px 14px 14px -14px;
  border: 1px solid var(--orange-dim); z-index: -1;
}
.about__media figcaption {
  position: absolute; left: 0; bottom: 0; background: var(--black);
  padding: 12px 20px; font-size: 13px; letter-spacing: .06em; color: var(--grey);
}
.about__text p { color: var(--grey); margin-bottom: 20px; }
.about__text b { color: var(--light); }
.about__list { list-style: none; display: grid; gap: 14px; margin-top: 28px; }
.about__list li {
  display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--light);
}
.about__list li::before {
  content: ""; width: 8px; height: 8px; background: var(--orange); transform: rotate(45deg);
  flex-shrink: 0;
}

/* ============ Contact ============ */
.contact {
  background:
    radial-gradient(70% 90% at 85% 10%, rgba(233,78,0,.1) 0%, transparent 55%),
    var(--black);
}
.contact__wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 96px); }
.contact__phones { display: grid; gap: 8px; margin-block: 36px; }
.contact__phone {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(26px, 3vw, 40px); letter-spacing: .02em;
  transition: color .25s;
  width: fit-content;
}
.contact__phone:hover { color: var(--orange); }
.contact__mess { display: flex; gap: 12px; }
.mess {
  padding: 10px 22px; border: 1px solid rgba(215,220,232,.25); font-size: 14px;
  letter-spacing: .04em; color: var(--grey); transition: .25s;
}
.mess:hover { border-color: var(--orange); color: var(--orange); }

.contact__form {
  background: var(--black-2); border: 1px solid rgba(215,220,232,.1);
  padding: clamp(28px, 3.5vw, 48px); display: grid; gap: 24px; height: fit-content;
}
.field { display: grid; gap: 8px; }
.field span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-dim); }
.field input, .field select {
  background: transparent; border: 0; border-bottom: 1px solid rgba(215,220,232,.25);
  padding: 12px 2px; color: var(--light); outline: none; transition: border-color .25s;
  border-radius: 0;
}
.field input:focus, .field select:focus { border-color: var(--orange); }
.field select option { background: var(--black-2); }
.contact__agree { font-size: 12px; color: var(--grey-dim); text-align: center; }

/* ============ Footer ============ */
.footer {
  position: relative; background: var(--black-2);
  border-top: 1px solid rgba(215,220,232,.08);
  overflow: hidden;
}
.footer__wrap {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
  padding-block: 72px; position: relative; z-index: 1;
}
.footer__logo { width: 96px; margin-bottom: 20px; }
.footer__brand p { color: var(--grey-dim); font-size: 14px; }
.footer__col { display: grid; gap: 12px; align-content: start; font-size: 14.5px; }
.footer__col b { font-family: var(--font-head); letter-spacing: .06em; margin-bottom: 8px; color: var(--light); }
.footer__col a { color: var(--grey-dim); transition: color .25s; width: fit-content; }
.footer__col a:hover { color: var(--orange); }
.footer__col--legal span { color: var(--grey-dim); font-size: 13px; }
.footer__mask {
  position: absolute; right: -4%; bottom: -20%; width: 380px; opacity: .35;
  pointer-events: none;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .process__stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .calc__wrap, .contact__wrap, .about__grid { grid-template-columns: 1fr; }
  .calc__info { position: static; }
  .footer__wrap { grid-template-columns: 1fr 1fr; }
  .hero__maskwrap { right: -18vw; width: 62vw; }
}

@media (max-width: 900px) {
  .header__nav { display: none; }
  .header__phone { display: none; }
  .burger { display: block; }
  .header__nav.is-open {
    display: flex; flex-direction: column; gap: 28px;
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--black-2); padding: 48px 8vw; z-index: 99;
  }
  .header__nav.is-open .nav-link { font-size: 24px; font-family: var(--font-head); }
}

@media (max-width: 640px) {
  .services__grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .hero__footer { flex-wrap: wrap; gap: 20px; }
  .hero__scroll { display: none; }
  .calc__result { flex-direction: column; align-items: flex-start; }
  .footer__wrap { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
