:root {
  --ink: #12242B;
  --ink-soft: #3B5158;
  --deep: #0A171C;
  --foam: #E6EEEC;
  --foam-dim: #D5E3E0;
  --suds: #BCD9D4;
  --brass: #C99022;
  --brass-lit: #E9B84A;
  --tongue: #DD6E8C;
  --paper: #FFFFFF;
  --line: rgba(18, 36, 43, 0.14);
  --shadow: 0 18px 40px -24px rgba(10, 23, 28, 0.55);
  --radius: 14px;
  --display: "Unbounded", "Trebuchet MS", sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--foam);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, legend {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.section-title { font-size: clamp(28px, 4.5vw, 46px); }

/* ------------------------------------------------------------- brass tag */

.tag {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50% 50% 52% 52% / 46% 46% 58% 58%;
  background: radial-gradient(circle at 32% 28%, var(--brass-lit), var(--brass) 62%, #9C6C12);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
  position: relative;
}
.tag::after {
  content: "";
  position: absolute;
  top: 3px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--foam);
}

/* ----------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(230, 238, 236, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark-text { display: flex; flex-direction: column; line-height: 1.1; }
.mark-text b { font-family: var(--display); font-size: 17px; letter-spacing: -0.01em; }
.mark-text i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav { margin-left: auto; display: flex; gap: 26px; font-size: 15px; }

/* ------------------------------------------------------- перемикач мов */

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(18, 36, 43, 0.08);
}
.topbar .lang-switch { margin-left: auto; }
.topbar .nav + .lang-switch { margin-left: 0; }

.lang-btn {
  border: 0;
  background: transparent;
  padding: 6px 11px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-current="true"] { background: var(--ink); color: var(--foam); }

.lang-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}
.lang-bar-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lang-bar .hint { margin: 0; }

.per-lang, .all-langs {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--suds);
  color: var(--deep);
  margin-left: 6px;
}
.all-langs { background: var(--foam-dim); color: var(--ink-soft); }
.photo-lang {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--suds);
  color: var(--deep);
}
.nav a { text-decoration: none; padding-bottom: 2px; border-bottom: 1.5px solid transparent; }
.nav a:hover { border-color: var(--brass); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-brass { background: var(--brass); color: #1B1204; }
.btn-brass:hover { background: var(--brass-lit); }
.btn-ink { background: var(--ink); color: var(--foam); }
.btn-ink:hover { background: var(--deep); }
.btn-ghost { border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--foam); }
.btn-wide { width: 100%; padding: 16px; font-size: 16px; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* ------------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 7vw, 96px) clamp(16px, 4vw, 48px);
  max-width: 1240px;
  margin: 0 auto;
}

.hero h1 { font-size: clamp(34px, 5.4vw, 62px); }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-soft); max-width: 46ch; margin: 20px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.facts { display: flex; flex-wrap: wrap; gap: 32px; margin: 36px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.facts a { text-decoration: none; }

/* --------------------------------------------------- signature: before/after */

.compare { margin: 0; }
.compare-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--suds), var(--foam-dim));
  box-shadow: var(--shadow);
  touch-action: pan-y;
  user-select: none;
}
.compare-frame img { width: 100%; height: 100%; object-fit: cover; }
.compare-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.compare-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 44px;
  margin-left: -22px;
  cursor: ew-resize;
  display: grid;
  place-items: center;
}
.compare-handle::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--foam);
}
.grip {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 4px 14px rgba(10, 23, 28, 0.4);
  position: relative;
}
.grip::before, .grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0; height: 0;
  border: 6px solid transparent;
  transform: translateY(-50%);
}
.grip::before { left: 6px; border-right-color: #1B1204; }
.grip::after { right: 6px; border-left-color: #1B1204; }
.compare-handle:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.compare-label {
  position: absolute;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(10, 23, 28, 0.72);
  color: var(--foam);
  padding: 5px 10px;
  border-radius: 999px;
}
.compare-label.left { left: 14px; }
.compare-label.right { right: 14px; }

.compare-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  color: var(--ink-soft);
  background: repeating-linear-gradient(135deg, var(--foam-dim) 0 14px, var(--suds) 14px 28px);
}
.compare-frame.has-images .compare-empty,
.compare-frame.has-images ~ figcaption + * { display: none; }
.compare-frame:not(.has-images) .compare-handle,
.compare-frame:not(.has-images) .compare-label { display: none; }

.compare figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 12px;
}
.compare-frame:not(.has-images) + figcaption { visibility: hidden; }

/* --------------------------------------------------------------- services */

.services, .works, .about, .quote {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 48px);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card h3 { font-size: 20px; }
.service-card p { margin: 0; color: var(--ink-soft); font-size: 15px; flex: 1; }
.service-card .price {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

/* ------------------------------------------------ смуга «приїжджаю до вас» */

.mobile-band {
  background: var(--ink);
  color: var(--foam);
  margin: clamp(20px, 4vw, 40px) 0;
}
.mobile-band-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 68px) clamp(16px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.mobile-band .eyebrow { color: var(--brass-lit); }
.mobile-band h2 { font-size: clamp(26px, 3.8vw, 40px); margin-bottom: 16px; }
.mobile-band p { color: var(--suds); max-width: 62ch; margin: 0 0 26px; }
.mobile-band-art { color: var(--suds); width: clamp(120px, 16vw, 190px); opacity: 0.55; }
.mobile-band-art svg { width: 100%; height: auto; }

/* -------------------------------------------------------- поле телефону */

.phone-group {
  display: flex;
  align-items: stretch;
  background: var(--foam);
  border: 1.5px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.phone-group:focus-within { border-color: var(--ink); background: var(--paper); }
.phone-group:has(.invalid) { border-color: var(--tongue); background: #FDF0F3; }
.phone-prefix {
  display: grid;
  place-items: center;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink-soft);
  background: rgba(18, 36, 43, 0.07);
  border-right: 1px solid var(--line);
  user-select: none;
}
.phone-group input {
  border: 0;
  background: transparent;
  border-radius: 0;
  flex: 1;
}
.phone-group input:focus { background: transparent; }
.phone-group input.invalid { background: transparent; border: 0; }

/* ---------------------------------------------------------------- gallery */

.works-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ig-link { font-family: var(--mono); font-size: 13px; text-decoration: none; border-bottom: 1.5px solid var(--brass); }

.gallery {
  margin-top: 32px;
  columns: 4 220px;
  column-gap: 14px;
}
.gallery figure {
  margin: 0 0 14px;
  break-inside: avoid;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--foam-dim);
  cursor: zoom-in;
}
.gallery img { width: 100%; transition: transform 0.4s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(transparent, rgba(10, 23, 28, 0.8));
}
.gallery figcaption em { font-style: normal; font-family: var(--mono); font-size: 11px; opacity: 0.85; display: block; }
.gallery-empty { color: var(--ink-soft); margin-top: 24px; }

/* ------------------------------------------------------------------ about */

.about { max-width: 860px; }
.about-text { font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-soft); margin-top: 20px; }

/* ------------------------------------------------- signature: ticket form */

.ticket {
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 780px;
  margin: 0 auto;
}
.ticket-head {
  background: var(--ink);
  color: var(--foam);
  padding: clamp(26px, 4vw, 40px);
  position: relative;
}
.ticket-head .eyebrow { color: var(--suds); }
.ticket-head h2 { font-size: clamp(26px, 3.6vw, 38px); }
.ticket-sub { color: var(--suds); margin: 12px 0 0; font-size: 15px; }
.ticket-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -9px;
  height: 18px;
  background: radial-gradient(circle at 9px 9px, var(--paper) 8px, transparent 9px) repeat-x;
  background-size: 18px 18px;
}

#quoteForm { padding: clamp(22px, 4vw, 40px); padding-top: 28px; }

fieldset { border: 0; padding: 0; margin: 0 0 28px; }
legend {
  font-size: 13px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
  padding: 0;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: block; margin-bottom: 14px; }
.field > span, .field label > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.field em { color: var(--tongue); font-style: normal; }

input[type="text"], input[type="tel"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--foam);
  border: 1.5px solid transparent;
  border-radius: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--paper);
}
textarea { resize: vertical; }
input.invalid, select.invalid { border-color: var(--tongue); background: #FDF0F3; }

.hint { font-size: 13px; color: var(--ink-soft); margin: 6px 0 0; }
.hint.calc { color: var(--ink); font-family: var(--mono); font-size: 13px; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice-body {
  display: block;
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
  height: 100%;
}
.choice-body b { display: block; font-size: 15px; }
.choice-body i { display: block; font-style: normal; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.choice input:checked + .choice-body { border-color: var(--ink); background: var(--foam); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--brass); outline-offset: 2px; }

.address-field { margin-top: 8px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status { margin: 14px 0 0; font-size: 15px; min-height: 22px; }
.form-status.ok { color: #1D6B4F; font-weight: 700; }
.form-status.err { color: #B23A55; font-weight: 700; }

/* ----------------------------------------------------------------- footer */

.footer { background: var(--ink); color: var(--foam); margin-top: 40px; }
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 48px) 32px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand b { font-family: var(--display); font-size: 22px; }
.footer-brand i { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--suds); }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer-col h3 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--suds);
  margin-bottom: 4px;
}
.footer-col a { text-decoration: none; width: fit-content; border-bottom: 1.5px solid transparent; }
.footer-col a:hover { border-color: var(--brass); }
.social em { font-style: normal; color: var(--suds); font-size: 13px; }
.copyright {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 32px;
  font-size: 13px;
  color: var(--suds);
}

/* --------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 23, 28, 0.94);
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 24px;
}
.lightbox img { max-height: 82vh; max-width: 92vw; border-radius: var(--radius); }
.lightbox p { color: var(--foam); text-align: center; margin: 0; font-size: 14px; }
.lightbox-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--foam);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

/* -------------------------------------------------------------- адмін-панель */

.admin-body { background: var(--foam); }
.admin-shell { max-width: 1000px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 32px) 80px; }
.admin-top { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-top h1 { font-size: 26px; }
.admin-top .spacer { margin-left: auto; }

.login-card {
  max-width: 380px;
  margin: 12vh auto;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card p { color: var(--ink-soft); font-size: 14px; margin-top: 0; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--ink); color: var(--foam); border-color: var(--ink); }

.panel { display: none; }
.panel.active { display: block; }

.card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 18px;
}
.card h2 { font-size: 19px; margin-bottom: 4px; }
.card .card-note { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photo-item { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--foam); }
.photo-item img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.photo-item .photo-meta { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.photo-item input { font-size: 14px; padding: 8px 10px; }
.photo-actions { display: flex; gap: 6px; }
.mini {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
}
.mini.danger { color: #B23A55; border-color: #F0C3CE; }
.mini:hover { border-color: var(--ink); }

.chat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.chat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}
.chat-row .mini { flex: 0 0 auto; }

.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--foam);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  box-shadow: var(--shadow);
  z-index: 200;
}
.toast.err { background: #B23A55; }

/* ------------------------------------------------------------- адаптивність */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .compare { order: -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .topbar .btn { padding: 10px 16px; font-size: 14px; }
  .row, .choice-grid { grid-template-columns: 1fr; }
  .gallery { columns: 2 140px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

@media (max-width: 900px) {
  .mobile-band-inner { grid-template-columns: 1fr; }
  .mobile-band-art { display: none; }
}

@media (max-width: 620px) {
  .topbar { flex-wrap: wrap; gap: 10px 12px; }
  .lang-switch { margin-left: auto; }
}
