/* Reklama Master — day and night are the two themes.
   Tokens and rationale: see DESIGN.md in the project root. */

:root {
  --red: #E4192B;
  --blue: #2746D8;
  --lamp: #FFD25A;
  --wall: #E9ECF1;
  --wall-2: #DCE0E8;
  --seam: rgba(14, 22, 64, .09);
  --ink: #0E1640;
  --ink-2: #465078;
  --line: #C3C9D8;
  --panel: #FFFFFF;
  --focus: #2746D8;
  --cast: rgba(14, 22, 64, .32);
  --on: 0; /* how much of a sign's own light shows: 0 by day, 1 at night */
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Pacifico", "Brush Script MT", cursive;
  --pad: clamp(16px, 4.2vw, 60px);
  color-scheme: light;
}

html[data-light="night"] {
  --wall: #070B26;
  --wall-2: #0C1236;
  --seam: rgba(160, 175, 255, .07);
  --ink: #EDF0FF;
  --ink-2: #9CA6D4;
  --line: #2A3368;
  --panel: #0F1745;
  --focus: #FFD25A;
  --cast: rgba(0, 0, 0, .6);
  --on: 1;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  transition: background-color .5s, color .5s;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.vh, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 50; left: 12px; top: 12px; padding: 10px 14px; background: var(--panel); }

h2 {
  font: 700 clamp(1.55rem, 1rem + 2.3vw, 2.9rem)/1.08 var(--display);
  letter-spacing: -.015em;
  text-wrap: balance;
}
h3 { font: 700 1.05rem/1.25 var(--display); }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  height: 60px; padding: 0 var(--pad);
  background: color-mix(in srgb, var(--wall) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background-color .5s, border-color .5s;
}

.mark {
  display: inline-flex; align-items: center; gap: 12px; flex: none;
  font: 800 1rem/1 var(--display); letter-spacing: .01em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
}
/* the real logo mark, on its own pale tile so it reads in both themes */
.mark-logo { display: block; width: auto; height: 40px; border-radius: 8px; }
.foot .mark-logo { height: 34px; }

.nav { display: flex; gap: clamp(14px, 2vw, 28px); margin-left: auto; }
.nav a { font-weight: 500; font-size: .96rem; text-decoration: none; padding: 8px 0; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ---------- light / dark toggle ---------- */

.theme {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--ink); cursor: pointer;
  transition: background-color .5s, border-color .5s, color .5s;
}
.theme:hover { border-color: var(--ink); }
.theme svg { width: 20px; height: 20px; }
.theme .i-sun { display: none; }
html[data-light="night"] .theme .i-sun { display: block; }
html[data-light="night"] .theme .i-moon { display: none; }

/* ---------- hero: our building and five jobs, shown near the photos' real size so they stay sharp ---------- */

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 32px clamp(24px, 4vw, 64px); align-items: center;
  padding: clamp(32px, 5vw, 72px) var(--pad) clamp(48px, 7vw, 104px);
}
.hero-text p { margin-top: 22px; max-width: 44ch; font-size: 1.12rem; }
.hero-pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; height: clamp(460px, 76vh, 700px); }
.hero-col { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.hero-pics figure { position: relative; flex: 2 1 0; min-height: 0; overflow: hidden; border-radius: 8px; background: var(--wall-2); }
.hero-pics .hero-tall { flex-grow: 3; }
.hero-pics a { display: block; height: 100%; }
.hero-pics img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .3s; }
.hero-pics a:hover img { filter: brightness(1.1); }
.hero-pics figcaption {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 4px 9px; border-radius: 6px; pointer-events: none;
  background: rgba(5, 8, 28, .78); color: #FFFFFF; font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[data-light="day"] .only-night, html[data-light="night"] .only-day { display: none; }
html[data-light="night"] .hero-pics figure { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 0 40px rgba(255, 210, 90, .12); }

h1 {
  font: 800 clamp(2.15rem, .9rem + 4.5vw, 4.7rem)/1.02 var(--display);
  letter-spacing: -.025em; text-wrap: balance; max-width: 11ch;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 22px;
  border: 1.5px solid var(--ink); border-radius: 8px; background: transparent; cursor: pointer;
  font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--wall); }
.btn-primary { background: var(--red); border-color: var(--red); color: #FFFFFF; }
.btn-primary:hover { background: #C0101F; border-color: #C0101F; color: #FFFFFF; }
html[data-light="night"] .btn-primary { box-shadow: 0 0 26px rgba(255, 42, 63, .5); }

/* ---------- shared section frame ---------- */

.band { padding: clamp(56px, 9vw, 128px) var(--pad); border-top: 1px solid var(--line); transition: border-color .5s; }
.head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px clamp(28px, 5vw, 80px); align-items: end; margin-bottom: clamp(26px, 4vw, 52px); }
.head p { max-width: 46ch; color: var(--ink-2); }

/* ---------- services: sample wall + detail, side by side so a click shows its result ---------- */

.services { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }

.wall {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(88px, 8.6vw, 124px);
  grid-auto-flow: dense; gap: 10px; align-content: start;
  padding: clamp(10px, 1.2vw, 16px);
  background: var(--wall-2); border: 1px solid var(--line); border-radius: 14px;
  transition: background-color .5s, border-color .5s;
}
.plate {
  position: relative; container-type: size; overflow: hidden;
  display: grid; place-items: center; align-content: center; gap: 4cqb;
  padding: 0; border: 0; border-radius: 8px; cursor: pointer;
  background: linear-gradient(168deg, #181C33, #070919 70%);
  color: #FFFFFF; font-family: var(--display); line-height: 1; text-transform: uppercase;
  scroll-snap-align: start;
}
.plate[aria-pressed="true"] { outline: 3px solid var(--red); outline-offset: 2px; }
html[data-light="night"] .plate[aria-pressed="true"] { outline-color: var(--lamp); }
.plate:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.pl { display: block; transition: opacity .5s; }
.pl-sub { display: block; font: 500 max(11px, 5cqi)/1.2 var(--body); text-transform: none; color: rgba(255, 255, 255, .72); transition: opacity .5s; }
/* things with no light of their own go quiet in the dark theme */
html[data-light="night"] .plate-unlit .pl, html[data-light="night"] .plate-unlit .pl-sub { opacity: .5; }

.p-harf { grid-column: span 2; }
.p-harf .pl { font-weight: 900; font-size: 7.7cqi; letter-spacing: .01em; }
.p-harf i, .p-harf b { font: inherit; }
.p-harf i { color: var(--red); text-shadow: .014em .016em 0 #8A0D19, .028em .032em 0 #8A0D19, .042em .048em 0 #8A0D19, .056em .064em 0 #8A0D19, .1em .14em .12em #000; }
.p-harf b { color: #3B5BF0; text-shadow: .014em .016em 0 #13257F, .028em .032em 0 #13257F, .042em .048em 0 #13257F, .056em .064em 0 #13257F, .1em .14em .12em #000; }
html[data-light="night"] .p-harf i { color: #FF5464; text-shadow: .014em .016em 0 #8A0D19, .028em .032em 0 #8A0D19, .042em .048em 0 #8A0D19, 0 0 .3em #FF2A3F, 0 0 .8em #FF2A3F; }
html[data-light="night"] .p-harf b { color: #7C97FF; text-shadow: .014em .016em 0 #13257F, .028em .032em 0 #13257F, .042em .048em 0 #13257F, 0 0 .3em #3D5CFF, 0 0 .8em #3D5CFF; }

.p-box .pl { font-weight: 800; font-size: 11.5cqi; padding: .42em .55em; border-radius: .1em; background: #E7EAF2; color: var(--blue); box-shadow: .03em .04em 0 #8E95AB, .06em .08em 0 #8E95AB; transition: background-color .5s, box-shadow .5s; }
html[data-light="night"] .p-box .pl { background: #FFFFFF; box-shadow: 0 0 .5em #DCE4FF, 0 0 1.6em rgba(140, 165, 255, .9); }

.p-stella { grid-row: span 2; }
.p-stella .pl {
  display: grid; place-items: center; width: 56cqi; height: 90cqb; border-radius: 6px 6px 0 0; align-self: end;
  background: linear-gradient(90deg, #1B36B8, #2F52EE 45%, #1B36B8);
  writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0;
  font-weight: 800; font-size: min(17cqi, 9.4cqb); line-height: 1.02; color: #FFFFFF;
}
html[data-light="night"] .p-stella .pl { box-shadow: 0 0 22px rgba(61, 92, 255, .9); text-shadow: 0 0 .35em #FFFFFF; }

.p-neon .pl { font: 400 30cqi/1.2 var(--script); text-transform: none; color: #F7B8D6; text-shadow: .03em .05em .04em #000; transition: color .4s, text-shadow .4s; }
html[data-light="night"] .p-neon .pl { color: #FFFFFF; text-shadow: 0 0 .04em #FFFFFF, 0 0 .14em #FF3D9A, 0 0 .4em #FF3D9A, 0 0 .9em #FF3D9A; }

.p-banner { grid-column: span 2; }
.p-banner .pl {
  font-weight: 900; font-size: 10.5cqi; padding: .34em .9em; color: var(--red); background: #F4F5F8; border-radius: 2px;
  --eye: radial-gradient(circle closest-side, #0A0D1C 38%, #A9AFBF 42% 86%, transparent 90%);
  background-image: var(--eye), var(--eye), var(--eye), var(--eye);
  background-position: .14em .14em, calc(100% - .14em) .14em, .14em calc(100% - .14em), calc(100% - .14em) calc(100% - .14em);
  background-size: .2em .2em; background-repeat: no-repeat;
}

.p-uv .pl { font-weight: 900; font-size: 12.5cqi; background: linear-gradient(90deg, #19C3F2, #F233B0 50%, #FFD91C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-uv::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 14%; height: 3px; border-radius: 2px; background: #8A5BFF; opacity: .55; transition: opacity .5s, box-shadow .5s; }
html[data-light="night"] .p-uv::after { opacity: 1; box-shadow: 0 0 12px #8A5BFF, 0 0 34px #8A5BFF; }

.p-dtf .pl { font-weight: 900; font-size: 24cqi; color: #FF3D7F; -webkit-text-stroke: .14em #FFFFFF; paint-order: stroke fill; transform: rotate(-4deg); }

.p-orakal { grid-column: span 2; }
.p-orakal .pl { font-weight: 900; font-size: 13cqi; color: #FFD21F; padding: .18em .3em; outline: 1.5px dashed rgba(255, 210, 31, .5); }

.p-suv { background: linear-gradient(168deg, #1B2550, #080B1F 70%); }
.p-suv .pl { font-weight: 700; font-size: 11.5cqi; padding: .5em .6em; border-radius: .14em; color: rgba(255, 255, 255, .9); background: linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04) 55%, rgba(255, 255, 255, .14)); border: 1px solid rgba(255, 255, 255, .4); text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }

.p-tab .pl { font-weight: 800; font-size: 10cqi; padding: .5em .6em; border-radius: .16em; color: #FFFFFF; background: #0E8A45; border: .1em solid #FFFFFF; transition: background-color .5s, color .5s, border-color .5s, box-shadow .5s; }
/* phosphor signs keep glowing when the power is off */
html[data-light="night"] .p-tab .pl { background: #0A2A1A; color: #C8FF8A; border-color: #C8FF8A; box-shadow: 0 0 18px rgba(170, 255, 110, .7); text-shadow: 0 0 .5em rgba(170, 255, 110, .9); }

.p-viz .pl { font: 700 11cqi/1.1 var(--display); text-transform: none; padding: .8em .6em; color: #0E1640; background: #FFFFFF; border-radius: 3px; transform: rotate(-5deg); box-shadow: 4px 5px 0 #AEB4C4; }
.p-montaj { background: repeating-linear-gradient(-45deg, #FFC421 0 14px, #0A0D1C 14px 28px); }
.p-montaj .pl { font-weight: 900; font-size: 13cqi; padding: .55em .5em; background: #0A0D1C; }
html[data-light="night"] .p-montaj { background: repeating-linear-gradient(-45deg, #8A6A12 0 14px, #0A0D1C 14px 28px); }
html[data-light="night"] .p-montaj .pl { opacity: 1; color: rgba(255, 255, 255, .6); }

/* ---------- service detail ---------- */

.detail {
  display: flex; flex-direction: column; min-width: 0;
  padding: clamp(18px, 1.8vw, 26px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  transition: background-color .5s, border-color .5s;
}
@keyframes detail-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: no-preference) {
  .detail.swap .svc > * { animation: detail-in .28s ease-out both; }
}
/* all twelve panels are in the page; the wall shows one at a time */
.svc { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
html.js .svc:not(.is-on) { display: none; }
.detail-more { text-align: center; }
.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.detail h3 { font-size: clamp(1.25rem, 1rem + .9vw, 1.6rem); letter-spacing: -.01em; }
.detail-lit { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.detail-lit::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 1px rgba(14, 22, 64, .3), 0 0 10px var(--lamp); }
.detail-lede { font-size: 1.04rem; line-height: 1.5; }
.detail-facts { display: grid; gap: 6px; font-size: .96rem; line-height: 1.4; color: var(--ink-2); }
.detail-facts li { position: relative; padding-left: 16px; }
.detail-facts li::before { content: ""; position: absolute; left: 0; top: .52em; width: 6px; height: 6px; background: var(--red); }
.detail-posts { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-height: 130px; margin-top: 2px; }
.detail-posts a { position: relative; display: block; min-height: 0; overflow: hidden; border-radius: 6px; background: var(--wall-2); }
.detail-posts img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-posts a:hover img { filter: brightness(1.12); }
.detail-more { min-height: 46px; font-size: .95rem; }

.is-video::before, .tile-video::before {
  content: ""; position: absolute; top: 8px; right: 8px; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(5, 8, 28, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%23fff'/%3E%3C/svg%3E") center / 17px no-repeat;
}

/* ---------- process ---------- */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); }
.steps li { counter-increment: step; position: relative; padding: 26px clamp(16px, 2.4vw, 36px) 0 0; }
.steps li::before { content: ""; position: absolute; left: 0; top: -9px; width: 1.5px; height: 17px; background: var(--ink); }
.steps li:last-child::after { content: ""; position: absolute; right: 0; top: -9px; width: 1.5px; height: 17px; background: var(--ink); }
.steps h3::before { content: counter(step); display: block; margin-bottom: 14px; font: 800 clamp(2rem, 1.4rem + 2vw, 3.2rem)/1 var(--display); color: var(--red); }
html[data-light="night"] .steps h3::before { color: #FF4658; text-shadow: 0 0 18px rgba(255, 42, 63, .65); }
.steps p { margin-top: 10px; color: var(--ink-2); max-width: 30ch; }

/* ---------- works strip ---------- */

.works {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 calc(var(--pad) * -1); padding: 6px var(--pad) 22px; scroll-padding-left: var(--pad);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.work { flex: 0 0 clamp(188px, 19vw, 264px); scroll-snap-align: start; text-decoration: none; }
.work img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; background: var(--wall-2); transition: box-shadow .5s; }
html[data-light="night"] .work img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 0 36px rgba(255, 210, 90, .14); }
.work b { display: block; margin-top: 14px; font: 700 .95rem/1.25 var(--display); }
.work span { display: block; margin-top: 4px; font-size: .95rem; color: var(--ink-2); }
.work:hover b { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- workshop ---------- */

.shop { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(28px, 6vw, 96px); align-items: start; }
.shop-photo img { display: block; width: 100%; height: auto; border-radius: 6px; }
.shop-photo figcaption { margin-top: 10px; font-size: .92rem; color: var(--ink-2); }
.lede { margin-top: 16px; max-width: 46ch; font-size: 1.12rem; color: var(--ink-2); }
.kit { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(20px, 3vw, 48px); margin-top: clamp(24px, 3vw, 40px); }
.kit > div { padding: 16px 0; border-top: 1px solid var(--line); }
.kit dt { font: 700 1rem/1.3 var(--display); }
.kit dd { margin-top: 6px; color: var(--ink-2); }
.joke { margin-top: clamp(28px, 4vw, 48px); padding-left: 20px; border-left: 4px solid var(--red); max-width: 52ch; }
.joke p { font-size: clamp(1.15rem, 1rem + .7vw, 1.45rem); line-height: 1.4; font-weight: 500; }
.joke footer { margin-top: 10px; font-size: .92rem; color: var(--ink-2); }

/* ---------- instagram wall ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-weight: 600; font-size: .93rem; }
.chip small { font: inherit; font-weight: 400; color: var(--ink-2); margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--wall); }
.chip[aria-pressed="true"] small { color: inherit; opacity: .7; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 196px), 1fr)); gap: 10px; }
.tile { position: relative; display: block; overflow: hidden; border-radius: 6px; background: var(--wall-2); text-decoration: none; }
.tile img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 12px 10px; color: #FFFFFF; background: linear-gradient(transparent, rgba(5, 8, 28, .88)); font-size: .86rem; line-height: 1.3; }
.tile-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-weight: 600; }
.tile time { display: block; margin-top: 3px; font-size: .8rem; opacity: .8; }
.tile:hover img { filter: brightness(1.12); }
.more { margin-top: 24px; text-align: center; }
.more[hidden] { display: none; }

/* ---------- finale ---------- */

.finale { padding: clamp(64px, 10vw, 150px) var(--pad); background: var(--wall-2); border-top: 1px solid var(--line); transition: background-color .5s, border-color .5s; }
.finale { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px clamp(32px, 5vw, 80px); align-items: start; }

.visit { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: background-color .5s, border-color .5s; }
.map { position: relative; height: clamp(300px, 34vw, 420px); background:
  linear-gradient(var(--seam), var(--seam)) 0 50% / 100% 1px no-repeat,
  linear-gradient(90deg, var(--seam), var(--seam)) 50% 0 / 1px 100% no-repeat, var(--wall); }
.map[data-loaded]::before { content: "Xarita yuklanmoqda…"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
html[data-light="night"] .map iframe { filter: brightness(.82) contrast(1.05); }
.map-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 600; }
.visit-info { padding: 22px 24px 24px; }
.visit-info h3 { font-size: 1.2rem; }
.visit-info dl { display: grid; gap: 10px; margin-top: 14px; }
.visit-info dl > div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; }
.visit-info dt { color: var(--ink-2); }
.visit-info dd { font-weight: 600; }
.visit-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.visit-links .btn { flex: 1 1 auto; min-height: 46px; font-size: .95rem; }
.finale h2 { font-size: clamp(1.5rem, .9rem + 2.6vw, 3.1rem); max-width: 20ch; }
.finale-sign { display: block; margin: 0 0 .1em -.04em; font: 400 clamp(3.2rem, 1.2rem + 5.6vw, 6.6rem)/1.15 var(--script); letter-spacing: 0; color: var(--red); transition: color .4s, text-shadow .4s; }
html[data-light="night"] .finale-sign { color: #FFFFFF; text-shadow: 0 0 .03em #FFFFFF, 0 0 .12em #FF2A3F, 0 0 .36em #FF2A3F, 0 0 .9em #FF2A3F; }
.finale-text { margin-top: 20px; max-width: 48ch; font-size: 1.12rem; color: var(--ink-2); }
.phones { display: flex; flex-wrap: wrap; gap: 8px 40px; margin-top: clamp(28px, 4vw, 48px); }
.phones a { font: 700 clamp(1.15rem, .9rem + 1.3vw, 1.9rem)/1.2 var(--display); font-variant-numeric: tabular-nums; text-decoration: none; }
.phones a:hover { text-decoration: underline; text-underline-offset: 6px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; padding: 28px var(--pad); border-top: 1px solid var(--line); font-size: .95rem; color: var(--ink-2); }
.foot a { margin-right: 16px; }

.dock { display: none; }

/* ---------- video player ---------- */

html.locked { overflow: hidden; }
.player {
  width: min(420px, calc(100vw - 16px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 12px; overflow: auto; overflow-x: hidden;
  background: #FFFFFF; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); scrollbar-width: none;
}
.player::-webkit-scrollbar { display: none; }
.player::backdrop { background: rgba(4, 6, 22, .86); backdrop-filter: blur(4px); }
.player-frame { position: relative; width: 100%; height: 680px; overflow: hidden; background: #FFFFFF; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .25s; }
.player-frame.ready iframe { opacity: 1; }
.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.player-frame.ready .player-poster { display: none; }
.player-frame::after {
  content: "Video yuklanmoqda…"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 8px 14px; border-radius: 6px; background: rgba(5, 8, 28, .82); color: #FFFFFF; font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.player-frame.ready::after { content: none; }

/* close and arrows sit on the dark backdrop, outside the video */
.player-close, .player-arrow {
  position: fixed; display: grid; place-items: center; width: 52px; height: 52px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #FFFFFF; cursor: pointer;
}
.player-close:hover, .player-arrow:hover { background: rgba(255, 255, 255, .28); }
.player-close:focus-visible, .player-arrow:focus-visible { outline-color: #FFD25A; }
.player-close { top: 12px; right: 12px; font-size: 2rem; line-height: 1; }
.player-arrow { top: 50%; transform: translateY(-50%); }
.player-arrow svg { width: 24px; height: 24px; }
.player-arrow[hidden] { display: none; }
.player-prev { left: max(12px, calc(50% - 210px - 76px)); }
.player-next { right: max(12px, calc(50% - 210px - 76px)); }

@media (max-width: 760px) {
  .player { margin-top: 72px; max-height: calc(100dvh - 84px); }
  .player-frame { height: 600px; }
  .player-arrow { top: 12px; transform: none; width: 48px; height: 48px; }
  .player-prev { left: 12px; }
  .player-next { left: 70px; right: auto; }
}

/* ---------- without scripts: every service is listed, controls that need scripts are gone ---------- */

html:not(.js) .wall, html:not(.js) .chips, html:not(.js) .more, html:not(.js) .theme { display: none; }
html:not(.js) .services { grid-template-columns: minmax(0, 1fr); }
html:not(.js) .detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 40px 32px; }
html:not(.js) .detail-posts a { aspect-ratio: 4 / 5; }

/* ---------- narrower screens ---------- */

@media (max-width: 1020px) {
  .nav { display: none; }
  .theme { margin-left: auto; }
  /* plates become one swipeable strip, so the detail right under it stays on screen */
  .services { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wall {
    grid-template-columns: none; grid-template-rows: repeat(2, 86px); grid-auto-flow: column dense; grid-auto-columns: 148px; grid-auto-rows: auto;
    gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: var(--pad);
    margin: 0 calc(var(--pad) * -1); padding: 10px var(--pad); border-radius: 0; border-left: 0; border-right: 0;
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  }
  .plate[aria-pressed="true"], .plate:focus-visible { outline-offset: -3px; }
  .detail-posts { flex: none; }
  .detail-posts a { aspect-ratio: 4 / 5; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 34px; border-top: 0; }
  .steps li { border-top: 1.5px solid var(--ink); }
  .steps li:last-child::after { content: none; }
}

/* below this the headline and the collage no longer fit side by side */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-pics { height: 520px; }
}

@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .hero, .head, .shop, .finale { grid-template-columns: 1fr; }
  .visit-info dl > div { grid-template-columns: 1fr; gap: 2px; }
  .hero-pics { height: 480px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-col-last { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--pad) * -1) 18px; padding: 2px var(--pad) 8px; scrollbar-width: none; }
  .chip { flex: none; }
  .shop-photo { max-width: 260px; }
  .kit { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .work { flex-basis: 62vw; }
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  .dock .btn { min-height: 48px; padding: 0 10px; font-size: .95rem; }
}

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