:root {
  --graphite: #0C0E10;
  --steel: #16191D;
  --steel-2: #23282E;
  --silver: #C8CDD3;
  --white: #F2F4F6;
  --accent: #FF5A1F;
  --accent-2: #FF7A47;
  --muted: #868E97;
  --head: 'Exo 2', system-ui, sans-serif;
  --body: 'Rubik', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--graphite); color: var(--white); font-family: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--head); font-weight: 900; line-height: 1; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(2.4rem, 10vw, 5rem); font-weight: 300; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 26px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 18px; }
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.sub { color: var(--muted); }
.step { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 16px 28px; border: 0; font-family: var(--head); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: background .2s; clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn-block { width: 100%; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(12, 14, 16, .7); backdrop-filter: blur(14px); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { font-family: var(--head); font-weight: 900; font-size: 1.4rem; letter-spacing: .32em; }
.nav { display: none; gap: 32px; font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nav a:hover { color: var(--white); }
.rec { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* кіно-герой з HUD */
.cine { position: relative; min-height: calc(100svh - 58px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.cine-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cine::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 14, 16, .35), rgba(12, 14, 16, .1) 40%, rgba(12, 14, 16, .95)); }
.hud { position: absolute; inset: 16px; pointer-events: none; }
.corner { position: absolute; width: 28px; height: 28px; border: 2px solid rgba(242, 244, 246, .8); }
.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.readout { position: absolute; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; padding: 4px 8px; background: rgba(12, 14, 16, .55); border: 1px solid rgba(242, 244, 246, .2); }
.r1 { top: 40px; left: 10px; }
.r2 { top: 40px; right: 10px; }
.r3 { top: 74px; left: 10px; }
.r4 { top: 74px; right: 10px; color: var(--accent); }
.cine-copy { position: relative; padding-bottom: 52px; }
.cine h1 { margin: 14px 0 26px; font-size: clamp(3rem, 14vw, 8rem); text-transform: uppercase; }
.cine h1 em { display: block; font-style: italic; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--white); font-size: .55em; }

/* специфікації */
.specs { border-top: 1px solid var(--steel-2); border-bottom: 1px solid var(--steel-2); }
.specs-in { display: grid; }
.specs-in div { padding: 20px 0; border-bottom: 1px solid var(--steel-2); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.specs-in div:last-child { border-bottom: 0; }
.specs b { font-family: var(--head); font-weight: 800; font-size: 2rem; }
.specs span { font-family: var(--mono); font-size: .75rem; color: var(--muted); text-align: right; }

/* конфігуратор */
.build { padding: 72px 0; }
.build-in { display: grid; gap: 28px; align-items: start; }
.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.classes label, .opt { position: relative; cursor: pointer; }
.classes input, .opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.classes span { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border: 1px solid var(--steel-2); background: var(--steel); transition: border-color .2s, background .2s; }
.classes b { font-family: var(--head); font-weight: 600; font-size: .95rem; }
.classes small { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.classes input:checked + span { border-color: var(--accent); background: rgba(255, 90, 31, .1); }
.classes input:focus-visible + span, .opt input:focus-visible + span { outline: 2px solid var(--accent); }
.opts { display: grid; gap: 6px; }
.opt { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--steel-2); background: var(--steel); transition: border-color .2s; }
.opt::before { content: ''; width: 22px; height: 22px; border: 2px solid var(--muted); transition: background .2s, border-color .2s; }
.opt:has(input:checked) { border-color: var(--accent); }
.opt:has(input:checked)::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") center/16px no-repeat; border-color: var(--accent); }
.opt span { display: flex; flex-direction: column; }
.opt b { font-family: var(--head); font-weight: 600; }
.opt small { font-size: .8rem; color: var(--muted); }
.opt em { font-style: normal; font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.summary { position: sticky; top: 76px; padding: 22px; background: var(--steel); border: 1px solid var(--steel-2); border-top: 3px solid var(--accent); }
.summary .step { margin-top: 0; }
.summary ul { display: grid; gap: 8px; min-height: 40px; }
.summary li { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.summary li span:last-child { font-family: var(--mono); }
.summary .empty { color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--steel-2); }
.sum-total b { font-family: var(--head); font-weight: 900; font-size: 2.2rem; color: var(--accent); }
.sum-days { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin: 6px 0 18px; }

/* до/після */
.result { padding: 40px 0 72px; }
.compare { position: relative; aspect-ratio: 4 / 3; overflow: hidden; user-select: none; }
.compare-after, .compare-before { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 14px; }
.compare span { position: relative; z-index: 1; padding: 5px 10px; background: rgba(0, 0, 0, .6); font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.compare-after { justify-content: flex-end; background: url(img/compare.webp) center / cover; filter: contrast(1.12) saturate(1.1); }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); background:
  repeating-linear-gradient(33deg, transparent 0 9px, rgba(255, 255, 255, .1) 9px 10px),
  repeating-linear-gradient(-58deg, transparent 0 13px, rgba(255, 255, 255, .08) 13px 14px),
  linear-gradient(rgba(120, 110, 95, .35), rgba(120, 110, 95, .35)),
  url(img/compare.webp) center / cover; filter: grayscale(.7) contrast(.7) brightness(1.15) blur(.4px); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--accent); translate: -50% 0; pointer-events: none; }
.compare-handle::after { content: '⟷'; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 46px; height: 46px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

/* процес-трек */
.process { padding: 0 0 72px; }
.track { display: grid; gap: 0; counter-reset: s; border-left: 1px solid var(--steel-2); }
.track li { counter-increment: s; position: relative; padding: 0 0 26px 26px; }
.track li::before { content: counter(s, decimal-leading-zero); position: absolute; left: -15px; top: -2px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--graphite); border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); font-size: .72rem; }
.track b { display: block; font-family: var(--head); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; }
.track span { color: var(--muted); font-size: .9rem; }

/* faq */
.faq { padding: 0 0 72px; }
.faq-in { display: grid; gap: 8px; }
.faq details { border-top: 1px solid var(--steel-2); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative; font-family: var(--head); font-weight: 600; font-size: 1.15rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font-family: var(--mono); font-size: 1.4rem; color: var(--accent); transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding-bottom: 20px; color: var(--muted); }

/* контакт */
.contact { padding: 72px 0 90px; background: var(--steel); border-top: 3px solid var(--accent); }
.contact-in { display: grid; gap: 24px; }
.contact h2 { margin: 0; font-weight: 900; font-style: italic; }
.form { display: grid; gap: 10px; }
.form input { width: 100%; padding: 16px; border: 1px solid var(--steel-2); background: var(--graphite); font-size: 1rem; }
.form input::placeholder { color: var(--muted); }
.form input:focus { outline: none; border-color: var(--accent); }
.addr { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-top: 6px; }

.footer { padding: 24px 0; border-top: 1px solid var(--steel-2); color: var(--muted); font-size: .85rem; }
.footer-in { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }

@media (min-width: 768px) {
  .wrap { padding: 0 32px; }
  .nav { display: flex; }
  .hud { inset: 28px; }
  .readout { font-size: .74rem; }
  .r1 { top: 50px; left: 18px; } .r2 { top: 50px; right: 18px; } .r3 { top: auto; bottom: 50px; left: auto; right: 18px; } .r4 { top: 86px; right: 18px; }
  .cine-copy { padding-bottom: 80px; }
  .specs-in { grid-template-columns: repeat(3, 1fr); }
  .specs-in div { border-bottom: 0; border-right: 1px solid var(--steel-2); padding: 26px 24px; flex-direction: column; }
  .specs-in div:first-child { padding-left: 0; }
  .specs-in div:last-child { border-right: 0; }
  .specs span { text-align: left; }
  .build-in { grid-template-columns: 1.5fr 1fr; gap: 48px; }
  .compare { aspect-ratio: 16 / 7; }
  .track { grid-template-columns: repeat(5, 1fr); border-left: 0; border-top: 1px solid var(--steel-2); }
  .track li { padding: 30px 16px 0 0; }
  .track li::before { left: 0; top: -15px; }
  .faq-in { grid-template-columns: 1fr 2fr; gap: 48px; }
  .contact-in { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
