/* Autodetailing demo: cold, technical, high contrast, sharp edges (approved design M4.9). */
@font-face {
  font-family: "Archivo";
  src: url("/ukazky/detailing/fonts/archivo-subset.woff2") format("woff2");
  font-weight: 400 900; font-stretch: 100% 125%; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/ukazky/detailing/fonts/jetbrains-mono-subset.woff2") format("woff2");
  font-weight: 400 500; font-display: swap;
}

:root {
  --bg: #0a0b0d; --panel: #121418; --panel-2: #1a1d22; --line: #ffffff1c; --text: #f2f3f5; --muted: #8d939c; --signal: #ff4d12;
  --display: "Archivo", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --cut: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  color-scheme: dark;
}
body { background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--display); font-stretch: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
main:focus { outline: none; }
.wrap { width: min(1320px, 100% - 48px); margin-inline: auto; }
.mono { font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.signal { color: var(--signal); }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--display); font-stretch: 125%; font-weight: 900; text-transform: uppercase; line-height: 0.92; letter-spacing: -0.01em; overflow-wrap: anywhere; }

.concept { padding: 6px 24px; background: var(--signal); color: #000; text-align: center; }
.concept a { text-decoration: underline; text-underline-offset: 3px; }
.concept a:focus-visible { outline-color: #000; outline-offset: 1px; }

/* Header: wide logo, numbered mono nav, cut-corner button */
.header { position: absolute; z-index: 5; left: 0; right: 0; border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 24px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; font: 900 1.125rem var(--display); font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; }
.logo span { overflow-wrap: anywhere; }
.logo i { flex: none; width: 22px; height: 22px; background: var(--signal); clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%); }
.nav { display: flex; gap: 34px; padding: 0; list-style: none; }
.nav a span, .mobile-menu a span { color: var(--signal); margin-right: 6px; }
.nav a:hover, .mobile-menu a:not(.btn):hover { color: var(--signal); }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; background: var(--signal); color: #000; font: 800 0.875rem var(--display); font-stretch: 112%; letter-spacing: 0.08em; text-transform: uppercase; clip-path: var(--cut); overflow-wrap: anywhere; }
/* The cut corner would clip an outer outline: focus is drawn inside the orange button */
.btn:focus-visible { outline: 2px solid #000; outline-offset: -6px; }
.btn-ghost { background: none; color: var(--text); border: 1px solid var(--line); clip-path: none; }
.btn-ghost:hover { border-color: var(--signal); }
.btn-ghost:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.header .btn { padding: 12px 18px; font-size: 0.75rem; }
.menu-btn, .mobile-menu { display: none; }
.skip-link { padding: 12px 18px; }

/* Hero: full photo, huge wide headline, spec bar along the bottom */
.hero { position: relative; min-height: min(100vh, 900px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #0a0b0df2 0, #0a0b0dcc 30%, #0a0b0d00 64%), linear-gradient(0deg, var(--bg) 0, #0a0b0d00 40%), linear-gradient(180deg, #0a0b0dcc 0, #0a0b0d00 20%); }
.hero .wrap { position: relative; z-index: 2; padding-top: 150px; }
.hero h1 { max-width: 9.5em; margin-top: 22px; font-size: clamp(2.4rem, 0.9rem + 4.6vw, 5.25rem); }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero p:not(.mono) { max-width: 30em; margin-top: 26px; color: #c8ccd2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 72px; border-top: 1px solid var(--line); }
.specs div { padding: 22px 24px 30px 0; }
.specs div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.specs dd { display: block; margin-top: 6px; font: 800 1.125rem var(--display); font-stretch: 112%; text-transform: uppercase; overflow-wrap: anywhere; }

/* Services: big outlined numbers, cropped photos */
.section { padding-block: clamp(80px, 9vw, 130px); }
.section.tight { padding-top: 0; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; }
.head h2 { margin-top: 14px; font-size: clamp(2.2rem, 1rem + 4vw, 4.5rem); }
.head p:not(.mono) { max-width: 30em; color: var(--muted); }
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin-top: 56px; background: var(--line); }
.service { position: relative; padding: 28px; background: var(--panel); }
.service .num { font: 900 4.5rem/1 var(--display); font-stretch: 125%; color: transparent; -webkit-text-stroke: 1px #ffffff40; }
.service .shot { height: 180px; margin: 20px -28px 24px; overflow: hidden; }
.service .shot img { width: 100%; height: 100%; object-fit: cover; }
.service .shot-right img { object-position: 100% 50%; }
.service h3 { font-size: 1.75rem; }
.service ul { margin-top: 16px; padding: 0; list-style: none; color: var(--muted); }
.service li { padding: 9px 0; border-top: 1px solid var(--line); font: 400 0.8125rem var(--mono); }
.service li::before { content: "+ "; color: var(--signal); }

/* Before / after: a real range input drives the split (--pos = how much of "before" shows on the left) */
.ba { position: relative; margin-top: 56px; aspect-ratio: 21 / 9; overflow: hidden; --pos: 50%; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.ba.simulated .before { filter: saturate(0.35) brightness(0.7) contrast(0.8) sepia(0.4); }
.ba .grime { position: absolute; inset: 0; opacity: 0.55; mix-blend-mode: multiply; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.2 2 0 0 0 -0.8'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23g)'/%3E%3C/svg%3E"); }
.ba .after-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.ba .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--signal); pointer-events: none; }
.ba .handle::after { content: "◂ ▸"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; padding: 10px 12px; background: var(--signal); color: #000; font: 800 0.875rem var(--display); white-space: nowrap; }
.ba .tag { position: absolute; top: 20px; padding: 6px 10px; background: #000c; }
.ba .tag.l { left: 20px; } .ba .tag.r { right: 20px; }
/* The input covers the photo: dragging anywhere moves the split, vertical swipes still scroll the page */
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba:has(input:focus-visible) .handle::after { outline: 2px solid var(--text); outline-offset: 3px; }
.ba:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 3px; }
.ba-note { margin-top: 12px; color: var(--muted); }
/* Without JavaScript the split cannot move: the photo stays halved and the dead control is hidden */
html:not(.js) .ba input, html:not(.js) .ba .handle::after { display: none; }

/* Packages: spec-sheet columns, the middle one highlighted */
.sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 40px; }
.sizes p { margin-right: 6px; color: var(--muted); }
.size { padding: 12px 18px; border: 1px solid var(--line); background: none; font: 800 0.8125rem var(--display); font-stretch: 112%; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* The check mark keeps its place in every state, so choosing a size does not shift the buttons */
.size::before { content: "✓"; content: "✓" / ""; display: inline-block; width: 1.4em; color: transparent; }
.size:hover { border-color: var(--signal); }
.size[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: #000; }
.size[aria-pressed="true"]::before { color: inherit; }
.size[aria-pressed="true"]:focus-visible { outline-color: var(--text); }
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.sizes + .packages { margin-top: 24px; }
.package { display: flex; flex-direction: column; padding: 32px 28px; background: var(--panel); border: 1px solid var(--line); clip-path: var(--cut); }
.package.pick { background: var(--panel-2); border-color: var(--signal); box-shadow: inset 0 3px 0 var(--signal); }
.package h3 { margin-top: 14px; font-size: 2rem; }
.price { margin-top: 18px; font: 800 2.25rem var(--display); font-stretch: 100%; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.price small { font: 400 0.75rem var(--mono); color: var(--muted); text-transform: uppercase; }
.package ul { margin: 22px 0 28px; padding: 0; list-style: none; }
.package li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.package li span { font: 500 0.75rem var(--mono); color: var(--signal); }
/* Lighter than the design's #ffffff4d, which did not reach the 4.5:1 text contrast; still clearly faded */
.package li.no { color: #80868f; }
.package li.no span { color: inherit; }
.package .btn { margin-top: auto; justify-content: center; }
.price-note { margin-top: 18px; color: var(--muted); }

/* Appointment: summary of the chosen package and the sample contact, made of the package panels */
.term { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; margin-top: 56px; }
.panel { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 32px 28px; background: var(--panel); border: 1px solid var(--line); clip-path: var(--cut); }
.summary.is-chosen { background: var(--panel-2); border-color: var(--signal); box-shadow: inset 0 3px 0 var(--signal); }
.summary h3 { font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.06em; }
.summary h3:focus { outline: none; }
.summary h3:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.summary-empty { color: #c8ccd2; }
.summary-empty a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.summary dl { align-self: stretch; }
.summary dl div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.summary dt { color: var(--muted); }
.summary dd { font: 800 1.125rem var(--display); font-stretch: 112%; text-transform: uppercase; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contact p:not(.mono) { color: #c8ccd2; }

.footer { border-top: 1px solid var(--line); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; padding-block: 36px; color: var(--muted); }

@media (max-width: 960px) {
  .nav, .header .header-cta { display: none; }
  .menu-btn { display: block; padding: 10px 14px; border: 1px solid var(--line); background: none; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .menu-btn[aria-expanded="true"] { border-color: var(--signal); color: var(--signal); }
  /* Opened, the menu drops down over the top of the photo on a solid background */
  .header:has(.mobile-menu.is-open) { background: var(--bg); }
  .mobile-menu { display: grid; flex-basis: 100%; padding: 0 0 20px; list-style: none; font-size: 0.875rem; }
  .mobile-menu a:not(.btn) { display: block; padding: 14px 0; border-top: 1px solid var(--line); }
  .mobile-menu .btn { width: 100%; justify-content: center; margin-top: 12px; }
  .js .mobile-menu:not(.is-open) { display: none; }
  html:not(.js) .menu-btn { display: none; }
  /* Without JavaScript the links stay listed in the header: the hero text moves below them */
  html:not(.js) .hero .wrap { padding-top: 420px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs div:nth-child(3) { padding-left: 0; border-left: 0; }
  .specs div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .services, .packages, .term { grid-template-columns: minmax(0, 1fr); }
  .ba { aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .hero::before { background: linear-gradient(0deg, var(--bg) 0, #0a0b0de6 45%, #0a0b0d99 75%, #0a0b0dcc 100%); }
  /* 62 % in the design suited the earlier photo; the new one keeps both the car and the detailer at 55 % */
  .hero img { object-position: 55% 50%; }
  .sizes p { flex-basis: 100%; }
  .size { flex: 1 1 auto; }
  .wrap { width: min(1320px, 100% - 32px); }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .specs div, .specs div + div { padding: 16px 12px 18px 0; }
  .specs div:nth-child(even) { padding-left: 12px; }
  .ba .tag { top: 12px; } .ba .tag.l { left: 12px; } .ba .tag.r { right: 12px; }
}
