/* The dark look of the Optika Yuzhnaya site (tools/build_dark.py lays it over the light one).
   A near-black ground, a thin display face, rounded dark tiles, a photograph across the first screen,
   a tab bar on a phone. Everything else (grid, widgets, forms) is the light site's own. */
:root { color-scheme: dark; --tile: #1c1c1b; --tile-2: #242423; --tile-line: rgba(255, 255, 255, .07); --r-tile: 24px; }
html[data-look="dark"] body { background: var(--bg); color: var(--ink); font-weight: 400; }
html[data-look="dark"] ::selection { background: var(--action); color: var(--action-ink); }
html[data-look="dark"] :is(h1, h2, h3) { font-weight: 300; }
html[data-look="dark"] h2 { letter-spacing: -0.012em; }
html[data-look="dark"] .section-head > p, html[data-look="dark"] .hero__lead { color: color-mix(in oklab, var(--ink) 82%, transparent); }

/* the header: one dark bar, the words as quiet pills */
/* no blur on the bar: a filter on it would trap the phone menu (a fixed sheet) inside the bar */
html[data-look="dark"] .nav { background: var(--bg); border-bottom-color: var(--tile-line); }
html[data-look="dark"] .nav__logo { font-weight: 400; }
@media (max-width: 1023px) { html[data-look="dark"] .nav.is-open .nav__links { justify-content: flex-start; } }
html[data-look="dark"] .nav__link { color: color-mix(in oklab, var(--ink) 80%, transparent); }
html[data-look="dark"] .reach__phone { color: var(--ink); }
html[data-look="dark"] .reach__phone:hover { color: var(--action); }
html[data-look="dark"] .reach__name { color: var(--muted); }

/* buttons: the filled one in the light teal, the second one an outlined pill */
html[data-look="dark"] .btn--secondary { background: transparent; border-color: rgba(255, 255, 255, .28); color: var(--ink); }
html[data-look="dark"] .btn--secondary:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
html[data-look="dark"] .btn--primary:hover { background: color-mix(in oklab, var(--action) 86%, #fff); }

/* ---- the first screen: the photograph across the wrap, the words on it, four tiles under it */
main > .hero.hero-dark { padding-top: calc(var(--nav) + var(--s-3)); padding-bottom: var(--s-4); }
main > .hero.hero-dark > .wrap { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; row-gap: var(--s-3); }
.hd__stage { position: relative; display: flex; align-items: center; min-height: 380px; border-radius: 28px; overflow: hidden; background: var(--tile); isolation: isolate; }
.hd__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 21%; }
.hd__stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 12, 12, .9) 0%, rgba(12, 12, 12, .72) 32%, rgba(12, 12, 12, .18) 62%, rgba(12, 12, 12, 0) 78%); }
.hd__text { display: grid; gap: var(--s-4); align-content: center; width: min(100%, 640px); padding: clamp(24px, 4vw, 56px); }
.hero.hero-dark h1 { font-size: clamp(34px, 4.1vw, 62px); line-height: 1.04; font-weight: 300; text-transform: uppercase; letter-spacing: -0.01em; text-wrap: balance; }
.hero.hero-dark .hero__lead { font-size: var(--t-lead); max-width: 44ch; color: rgba(255, 255, 255, .88); }
.hero.hero-dark .hero__kicker { margin: 0; }
.hero.hero-dark .btn-row { margin-top: var(--s-2); }
html[data-look="dark"] .hero-rating, html[data-look="dark"] .hero-rating > span { color: rgba(255, 255, 255, .86); }
.hd__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); gap: var(--s-3); margin: 0; }
.hd__facts > div { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-5); border-radius: var(--r-tile); background: var(--tile); border: 1px solid var(--tile-line); }
.hd__facts dt { font-size: var(--t-label); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hd__facts dd { margin: 0; font-size: var(--t-h3); font-weight: 300; line-height: 1.2; }
.hd__facts .hd__review dd { font-size: var(--t-body); line-height: 1.45; font-weight: 400; }
.hd__quote { font: inherit; }
@media (max-width: 1023px) {
  .hd__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hd__facts .hd__review { grid-column: 1 / -1; }
  .hd__facts dd { font-size: var(--t-lead); }
}
@media (max-width: 639px) {
  main > .hero.hero-dark { padding-top: calc(var(--nav) + var(--s-2)); padding-bottom: var(--s-5); }
  .hd__stage { align-items: flex-end; min-height: min(74svh, 620px); border-radius: var(--r-tile); }
  .hd__photo { object-position: 50% 18%; }
  .hd__stage::before { background: linear-gradient(180deg, rgba(12, 12, 12, 0) 22%, rgba(12, 12, 12, .7) 52%, rgba(12, 12, 12, .94) 100%); }
  .hd__text { padding: var(--s-5); gap: var(--s-3); }
  .hero.hero-dark h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero.hero-dark .hero__lead { font-size: var(--t-body); }
  .hd__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .hd__facts > div { padding: var(--s-4); border-radius: 18px; }
  .hd__facts > div:nth-child(3) { grid-column: 1 / -1; }
  .hd__facts dd { font-size: var(--t-body); font-weight: 400; }
}

/* ---- tiles: every card is a rounded dark tile */
html[data-look="dark"] .card, html[data-look="dark"] .frame.vc, html[data-look="dark"] .sun, html[data-look="dark"] .cx-map,
html[data-look="dark"] .to-panel { border-color: var(--tile-line); }
html[data-look="dark"] .card { background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r-tile); }
html[data-look="dark"] .frame { border-color: var(--tile-line); }
html[data-look="dark"] :is(.frame--photo, .develop, .tile__media, .faq-photo) { border-radius: var(--r-tile); }

/* the three steps: the words padded inside their tile */
html[data-look="dark"] #visit .card { padding: var(--s-5) var(--s-5) var(--s-4); }
html[data-look="dark"] #visit .card > .panel { border-radius: 16px; }

/* the finished orders: the name on top, the photograph, a line under it */
html[data-look="dark"] #orders .tile { display: flex; flex-direction: column; gap: 0; padding: 0 var(--s-2) var(--s-2); border-radius: var(--r-tile); background: var(--tile-2); border: 1px solid var(--tile-line); }
html[data-look="dark"] #orders .tile__head { order: -1; justify-content: center; padding: var(--s-4) var(--s-3); }
html[data-look="dark"] #orders .tile__head > h3 { font: 400 var(--t-label)/1.3 var(--font-text); letter-spacing: .07em; text-transform: uppercase; text-align: center; }
html[data-look="dark"] #orders .tile__media { border-radius: 18px; }
html[data-look="dark"] #orders .tile > p { padding: var(--s-4) var(--s-3) var(--s-3); font-size: var(--t-small); color: color-mix(in oklab, var(--ink) 80%, transparent); }

/* rows and questions keep their rules, a little quieter */
html[data-look="dark"] .rows__name { font-weight: 400; }
html[data-look="dark"] .rows__value { color: var(--ink); }

/* the reviews: the platform's own mark needs a light plate under its dark letters */
html[data-look="dark"] .rv-platform { background: var(--tile); border-color: var(--tile-line); color: var(--ink); }
html[data-look="dark"] .rv-platform__logo { box-sizing: content-box; padding: 3px 8px; border-radius: 8px; background: #fff; }
html[data-look="dark"] .stars { fill: #f2c94c; }

/* form fields on the dark ground */
html[data-look="dark"] .field :is(input[type="text"], input[type="tel"], textarea) { background: var(--tile); border-color: rgba(255, 255, 255, .2); color: var(--ink); }
html[data-look="dark"] .field :is(input, textarea):focus-visible { border-color: var(--action); }

/* the subscribe button on the orders band */
html[data-look="dark"] .subscribe-cta { background: var(--ink); color: #111110; }

/* the closing block and the footer */
html[data-look="dark"] .footer__col h3 { font-weight: 400; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-size: var(--t-label); }
html[data-look="dark"] .footer__legal { color: var(--muted); }

/* ---- the phone's tab bar */
.tabbar { display: none; }
@media (max-width: 639px) {
  :root { --bar: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; inset: auto 0 0 0; z-index: 49; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: calc(64px + env(safe-area-inset-bottom)); padding: 0 var(--s-2) env(safe-area-inset-bottom); background: rgba(26, 26, 25, .94); border-top: 1px solid var(--tile-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 56px; font-size: 11px; line-height: 1; color: var(--muted); text-decoration: none; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a:is(:active, :focus-visible) { color: var(--ink); }
  .tabbar a:last-child { color: var(--action); }
}
