/* RGB GROUP Mini App — brand: Royal Indigo #240952, White, Warm Brass #DFB160 (accent ≤10%), Indigo Mist #F0F1F7 */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/inter-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/inter-lat.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20B8, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(../fonts/mont-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(../fonts/mont-lat.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20B8, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --indigo: #240952;
  --indigo-2: #38395F;
  --brass: #DFB160;
  --mist: #F0F1F7;
  --white: #FFFFFF;

  --bg: var(--mist);
  --surface: var(--white);
  --surface-2: #E6E7F2;
  --title: var(--indigo);
  --text: var(--indigo-2);
  --muted: #6D6E92;
  --line: rgba(36, 9, 82, .10);
  --btn-bg: var(--indigo);
  --btn-text: var(--white);
  --btn2-bg: rgba(36, 9, 82, .07);
  --btn2-text: var(--indigo);
  --hero-bg: var(--indigo);
  --shadow: 0 6px 24px rgba(36, 9, 82, .08);
  --danger: #B3261E;
  --ok: #2E7D5B;

  --radius: 18px;
  --radius-s: 12px;
  --pad: 16px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-title: 'Montserrat', system-ui, sans-serif;
  --font-text: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

html.theme-dark {
  --bg: #130A2B;
  --surface: #1E1342;
  --surface-2: #2A1D55;
  --title: #F0F1F7;
  --text: #D9DAEA;
  --muted: #A4A5C4;
  --line: rgba(240, 241, 247, .12);
  --btn-bg: var(--white);
  --btn-text: var(--indigo);
  --btn2-bg: rgba(240, 241, 247, .10);
  --btn2-text: #F0F1F7;
  --hero-bg: #240952;
  --shadow: 0 6px 24px rgba(0, 0, 0, .25);
  --danger: #FF8A80;
  --ok: #7FD1A8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; color: var(--title); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 16px; line-height: 1.3; }
p { margin: 0; }

.app { max-width: 600px; margin: 0 auto; min-height: 100vh; min-height: var(--tg-viewport-stable-height, 100vh); }
.view { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); }
.app.is-nested .view { padding-bottom: calc(var(--safe-b) + 32px); }
.screen { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.section { padding: 20px var(--pad) 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section__link { background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: 14px; cursor: pointer; }
.eyebrow { font: 500 12px/1.3 var(--font-title); letter-spacing: .06em; color: var(--muted); text-transform: none; }
.lead { color: var(--text); font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 18px; border: 0; border-radius: 14px;
  background: var(--btn-bg); color: var(--btn-text);
  font: 600 15px/1.2 var(--font-text); text-decoration: none; cursor: pointer;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn--block { width: 100%; }
.btn--secondary { background: var(--btn2-bg); color: var(--btn2-text); }
.btn--light { background: var(--white); color: var(--indigo); }
.btn--ghost-light { background: rgba(255, 255, 255, .12); color: var(--white); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-col { display: grid; gap: 10px; }

/* ---------- Icons ---------- */
.ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-bg); color: var(--white);
  padding: 22px var(--pad) 22px; border-radius: 0 0 28px 28px; position: relative; overflow: hidden;
}
.hero__logo { width: 150px; height: auto; margin-bottom: 26px; }
.hero h1 { color: var(--white); font-size: 25px; }
.hero__accent { display: block; width: 36px; height: 3px; background: var(--brass); border-radius: 2px; margin: 0 0 14px; }
.hero p { color: rgba(255, 255, 255, .82); margin: 12px 0 20px; }
.hero__img { margin: 20px calc(-1 * var(--pad)) -22px; aspect-ratio: 16 / 9; object-fit: cover; width: calc(100% + 2 * var(--pad)); max-width: none; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats--4 { grid-template-columns: 1fr 1fr; }
.stat { background: var(--surface); border-radius: var(--radius-s); padding: 12px; box-shadow: var(--shadow); }
.stat__v { font: 600 20px/1.15 var(--font-title); color: var(--title); }
.stat__l { font-size: 12px; line-height: 1.3; color: var(--muted); margin-top: 4px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card--pad { padding: 16px; }
.card + .card { margin-top: 12px; }

.pcard { display: block; width: 100%; text-align: left; border: 0; padding: 0; cursor: pointer; background: var(--surface); color: inherit; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pcard + .pcard { margin-top: 14px; }
.pcard__media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { padding: 14px 16px 16px; }
.pcard__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard__meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.pcard__price { margin-top: 8px; font-weight: 600; color: var(--title); }
.pcard__price--ask { color: var(--muted); font-weight: 400; }

.badge {
  position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px;
  font: 600 12px/1.2 var(--font-text); background: rgba(255, 255, 255, .94); color: var(--indigo);
}
.badge--done::before, .badge--sale::before, .badge--new::before, .badge--soon::before, .badge--premium::before, .badge--social::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--indigo);
}
.badge--done::before { background: #2E7D5B; }
.badge--sale::before { background: var(--brass); }
.badge--new::before { background: var(--brass); }
.badge--soon::before { background: #8A8BB0; }
.badge--premium::before { background: var(--brass); }
.badge--social::before { background: #5B6BD6; }

/* horizontal scroller */
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 10px; scroll-padding-inline: var(--pad); scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.mini { width: 220px; }
.hscroll > .pcard + .pcard { margin-top: 0; }
.mini .pcard__media { aspect-ratio: 4 / 3; }
.mini .pcard__body { padding: 10px 12px 12px; }

/* list rows */
.rows { display: grid; gap: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.row + .row { border-top: 1px solid var(--line); }
.row__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--btn2-bg); color: var(--title); flex: none; }
.row__main { flex: 1; min-width: 0; }
.row__title { color: var(--title); font-weight: 600; }
.row__sub { color: var(--muted); font-size: 13px; }
.row__chev { color: var(--muted); }

/* ---------- Project screen ---------- */
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px var(--pad) 0; }
.topbar__back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); padding: 6px 0; cursor: pointer; }
.tg .topbar__back { display: none; }

.gallery { position: relative; }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; background: var(--surface-2); border: 0; padding: 0; cursor: zoom-in; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gallery__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: width .2s ease; }
.gallery__dot.is-active { width: 18px; border-radius: 3px; background: var(--white); }
.gallery__count { position: absolute; right: 12px; top: 12px; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(36, 9, 82, .7); color: #fff; }
.gallery__note { position: absolute; left: 12px; bottom: 26px; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(36, 9, 82, .7); color: #fff; }

.phead { padding: 16px var(--pad) 0; }
.phead .badge { position: static; display: inline-block; margin-bottom: 10px; background: var(--btn2-bg); color: var(--title); }
.phead__addr { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); font-size: 14px; margin-top: 8px; }
.phead__addr .ico { width: 18px; height: 18px; margin-top: 2px; }
.price { margin-top: 12px; display: inline-block; font: 600 18px/1.2 var(--font-title); color: var(--title); }
.price small { font: 400 13px var(--font-text); color: var(--muted); display: block; margin-top: 2px; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 2px; background: var(--brass); transform: rotate(45deg); }

.plans { display: flex; gap: 10px; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 8px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none; }
.plans::-webkit-scrollbar { display: none; }
.plan { flex: none; width: 150px; scroll-snap-align: start; background: var(--surface); border: 0; border-radius: var(--radius-s); padding: 8px; box-shadow: var(--shadow); cursor: zoom-in; text-align: left; color: inherit; }
.plan__img { position: relative; background: #fff; border-radius: 8px; aspect-ratio: 1; overflow: hidden; }
.plan__img img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.plan__t { font-size: 12px; color: var(--muted); margin-top: 6px; }
.plan__a { font-weight: 600; color: var(--title); }
.note { margin-top: 12px; font-size: 13px; color: var(--muted); }

.sticky-cta { padding: 20px var(--pad) 0; }

/* ---------- Offer cards (purchase) ---------- */
.offer { padding: 18px 16px; }
.offer__ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--hero-bg); color: #fff; margin-bottom: 12px; }
.offer__ico .ico { stroke: #fff; }
.offer h3 { margin-bottom: 6px; }
.offer p { margin-bottom: 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: flex; gap: 10px; }
.steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--font-title); background: var(--btn2-bg); color: var(--title); }

/* ---------- Values ---------- */
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.value { background: var(--surface); border-radius: var(--radius-s); padding: 14px; box-shadow: var(--shadow); }
.value .ico { color: var(--title); margin-bottom: 8px; }
.value__t { font: 600 14px/1.3 var(--font-title); color: var(--title); }
.quote { border-left: 3px solid var(--brass); padding: 2px 0 2px 12px; }

/* ---------- Service block ---------- */
.svc { background: var(--hero-bg); color: #fff; border-radius: var(--radius); padding: 18px 16px; }
.svc h2, .svc h3 { color: #fff; }
.svc p { color: rgba(255, 255, 255, .82); }
.svc .checklist li { color: rgba(255, 255, 255, .92); }
.svc__num { font: 600 34px/1 var(--font-title); color: #fff; }
.svc__num span { color: var(--brass); }

/* ---------- Form ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; color: var(--muted); }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--title);
  outline: none; transition: border-color .15s ease; appearance: none; -webkit-appearance: none;
}
.input:focus { border-color: var(--title); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field.is-invalid .input { border-color: var(--danger); }
.field__err { display: none; font-size: 12px; color: var(--danger); }
.field.is-invalid .field__err { display: block; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--indigo); flex: none; }
html.theme-dark .consent input { accent-color: var(--brass); }
.consent.is-invalid { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.result { text-align: center; padding: 36px 20px; }
.result__ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--btn2-bg); color: var(--title); }
.result__ico .ico { width: 30px; height: 30px; }
.result--error .result__ico { color: var(--danger); }
.result p { margin: 8px 0 20px; }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 600px; margin: 0 auto;
  padding: 6px 4px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.app.is-nested .tabbar { display: none; }
.tab { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: var(--muted); font-size: 11px; line-height: 1.2; cursor: pointer; }
.tab .ico { width: 24px; height: 24px; }
.tab.is-active { color: var(--title); font-weight: 600; }
.tab.is-active .ico { stroke-width: 2.1; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(19, 10, 43, .96); display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; background: #fff; }
.lightbox__close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox__cap { position: absolute; bottom: calc(20px + var(--safe-b)); left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }

.contact-card .row__title a { text-decoration: none; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; color: var(--title); font-weight: 600; }

.footer { padding: 28px var(--pad) 8px; text-align: center; color: var(--muted); font-size: 12px; }

@media (min-width: 420px) {
  h1 { font-size: 28px; }
  .hero h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .gallery__track, .hscroll, .plans { scroll-behavior: auto; }
}
