/* =====================================================================
   Студия стекла — стили сайта
   Палитра собрана из самого материала: холодный «морозный» фон,
   бирюза и кобальт цветного стекла, янтарь как тёплый блик.
   ===================================================================== */

@font-face { font-family: 'Philosopher'; font-weight: 400; font-display: swap; src: url(/fonts/philosopher-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Philosopher'; font-weight: 400; font-display: swap; src: url(/fonts/philosopher-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family: 'Philosopher'; font-weight: 700; font-display: swap; src: url(/fonts/philosopher-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Philosopher'; font-weight: 700; font-display: swap; src: url(/fonts/philosopher-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family: 'Golos'; font-weight: 400; font-display: swap; src: url(/fonts/golos-text-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos'; font-weight: 400; font-display: swap; src: url(/fonts/golos-text-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family: 'Golos'; font-weight: 500; font-display: swap; src: url(/fonts/golos-text-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos'; font-weight: 500; font-display: swap; src: url(/fonts/golos-text-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family: 'Golos'; font-weight: 600; font-display: swap; src: url(/fonts/golos-text-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos'; font-weight: 600; font-display: swap; src: url(/fonts/golos-text-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122; }

:root {
  --frost: #f2f6f5;
  --paper: #ffffff;
  --mist: #dde8e6;
  --line: #c6d6d3;
  --ink: #1d2c33;
  --ink-soft: #4b5d64;
  --katun: #157a76;      /* бирюза Катуни — ссылки, акценты */
  --cobalt: #2846a6;     /* кобальтовое стекло — кнопки, выбор */
  --cobalt-deep: #1d3480;
  --amber: #e2a232;      /* янтарный блик */
  --rose: #d7607a;
  --danger: #b3261e;

  --display: 'Philosopher', 'Georgia', serif;
  --body: 'Golos', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 4vw, 2.75rem);
  --step-4: clamp(2.6rem, 7vw, 4.6rem);

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 64ch;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--frost); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--body);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--katun); text-underline-offset: 3px; }
a:hover { color: var(--cobalt); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- Шапка ---------------------------------------------------------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter); max-width: 1240px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.2rem/1.1 var(--display); }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo svg path { fill: var(--katun); }
.logo svg .glint { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .85; }
.top nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); font-size: var(--step--1); }
.top nav a { color: var(--ink-soft); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav .nav-cta { color: var(--cobalt); font-weight: 600; }
@media (max-width: 640px) { .top nav a:not(.nav-cta) { display: none; } }

/* ---- Первый экран: солнечные блики сквозь стекло --------------------- */
.hero {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 72px);
  align-items: center; max-width: 1240px; margin: 0 auto;
  padding: clamp(24px, 6vw, 80px) var(--gutter) clamp(56px, 9vw, 120px);
}
.caustics { position: absolute; inset: -10% -20% 0; z-index: -1; pointer-events: none; overflow: hidden; }
.caustics i {
  position: absolute; border-radius: 48% 52% 60% 40% / 55% 45% 55% 45%;
  filter: blur(38px); opacity: .55; mix-blend-mode: multiply;
  animation: drift 26s ease-in-out infinite alternate;
}
.caustics i:nth-child(1) { width: 34vw; height: 22vw; left: 52%; top: 4%;  background: #8fd6cf; }
.caustics i:nth-child(2) { width: 22vw; height: 26vw; left: 70%; top: 34%; background: #f3c56a; animation-delay: -8s; }
.caustics i:nth-child(3) { width: 26vw; height: 16vw; left: 44%; top: 56%; background: #9fb2ef; animation-delay: -14s; }
.caustics i:nth-child(4) { width: 14vw; height: 12vw; left: 84%; top: 8%;  background: #f2a3b4; animation-delay: -4s; }
@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg) scale(1); }
  to   { transform: translate(-4vw, 3vw) rotate(25deg) scale(1.12); }
}
.hero h1 { font-size: var(--step-4); max-width: 12ch; }
.lead { margin-top: 24px; font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 36px; }
.hero-photo { margin: 0; justify-self: end; width: min(100%, 440px); }
.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 220px 220px var(--radius) var(--radius); /* силуэт стеклянной капли */
  box-shadow: 0 30px 60px -30px rgba(29, 52, 128, .45);
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { justify-self: stretch; width: 100%; order: -1; }
  .hero-photo img { aspect-ratio: 4 / 3; border-radius: 200px 200px var(--radius) var(--radius); }
  .caustics i { filter: blur(28px); }
  .caustics i:nth-child(1) { width: 70vw; height: 50vw; left: 30%; }
}

/* ---- Кнопки --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--cobalt); color: #fff; font: 600 var(--step-0)/1 var(--body);
  text-decoration: none; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 24px -12px rgba(40,70,166,.8);
}
.btn:hover { background: var(--cobalt-deep); color: #fff; }
.btn:disabled { opacity: .6; cursor: progress; }
.link { background: none; border: 0; padding: 0; font: 500 var(--step-0)/1.4 var(--body); color: var(--katun); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---- Общие блоки ---------------------------------------------------- */
.block { max-width: 1240px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter); }
.block > h2 { max-width: 20ch; }
.sub { margin-top: 12px; color: var(--ink-soft); max-width: var(--measure); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(s); display: block; font: 700 2.6rem/1 var(--display); color: var(--katun); margin-bottom: 14px; }
.steps p { margin-top: 8px; color: var(--ink-soft); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.why { padding-top: 0; }
.why > div, .why p { max-width: var(--measure); }
.why p { margin-top: 18px; font-size: var(--step-1); line-height: 1.55; }

/* ---- Галерея -------------------------------------------------------- */
.gallery { margin-top: 36px; columns: 4 220px; column-gap: 16px; }
.gallery button {
  display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; background: none;
  break-inside: avoid; cursor: zoom-in; text-align: left; color: inherit; font: inherit;
}
@media (max-width: 560px) { .gallery { columns: 2; column-gap: 10px; } .gallery button { margin-bottom: 12px; } }
.gallery img { width: 100%; border-radius: var(--radius); background: var(--mist); }
.gallery span { display: block; padding: 8px 2px 0; font-size: var(--step--1); color: var(--ink-soft); }
.gallery button:hover span { color: var(--ink); }
.viewer { border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); }
.viewer::backdrop { background: rgba(16, 26, 32, .82); }
.viewer img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.viewer p { color: #fff; text-align: center; margin-top: 12px; }
.viewer button { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

/* ---- Ярмарки -------------------------------------------------------- */
.usual { margin-top: 18px; max-width: var(--measure); padding-left: 16px; border-left: 3px solid var(--amber); }
.events { list-style: none; padding: 0; margin: 28px 0 0; max-width: 820px; }
.events li { display: grid; grid-template-columns: 13rem 1fr; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.events time { font: 700 var(--step-1)/1.2 var(--display); color: var(--cobalt); }
.events .place { color: var(--ink-soft); }
@media (max-width: 560px) { .events li { grid-template-columns: 1fr; } }
.empty { margin-top: 24px; color: var(--ink-soft); }

/* ---- Анкета --------------------------------------------------------- */
.form-block > .sub, #form, .done { max-width: 760px; }
#form { margin-top: 36px; }
fieldset { border: 0; margin: 0 0 34px; padding: 0; min-width: 0; }
legend, .row2 legend { font: 700 var(--step-1)/1.25 var(--display); padding: 0; margin-bottom: 12px; }
legend b, .field b { color: var(--rose); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
@media (max-width: 680px) { .row2 { grid-template-columns: 1fr; gap: 24px; } }
.hint { font-size: var(--step--1); color: var(--ink-soft); margin: -4px 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 11px 18px; border-radius: 999px;
  background: var(--paper); border: 1.5px solid var(--line); color: var(--ink);
  font-size: .97rem; line-height: 1.25; transition: background .15s, border-color .15s, color .15s;
}
.chip input:hover + span { border-color: var(--katun); }
.chip input:checked + span { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }

.field { display: block; margin-top: 16px; }
.field span { display: block; font-size: var(--step--1); font-weight: 500; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); font: 400 1rem/1.4 var(--body);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(40,70,166,.18); }
.field.narrow { max-width: 220px; }
.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 18px; }
.inline .field { flex: 1 1 220px; }
.inline .field.narrow { flex: 0 1 220px; }
.inline .hint { margin: 0 0 14px; flex: 1 1 160px; }
.invalid input, .invalid textarea, input.invalid { border-color: var(--danger); }
.err { color: var(--danger); font-size: var(--step--1); margin-top: 6px; min-height: 0; }
.err:empty { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--step--1); color: var(--ink-soft); max-width: var(--measure); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cobalt); flex: none; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.form-msg { color: var(--danger); }

.done { margin-top: 36px; padding: 32px; border-radius: var(--radius); background: var(--paper); border: 1.5px solid var(--line); max-width: 640px; }
.done h3 { font-size: var(--step-2); color: var(--katun); }
.done p { margin: 12px 0 18px; }

/* ---- Вопросы -------------------------------------------------------- */
.faq details { max-width: 760px; border-bottom: 1px solid var(--line); }
.faq details:first-of-type { margin-top: 28px; border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 1.5rem/1 var(--body); color: var(--katun); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 20px; color: var(--ink-soft); max-width: var(--measure); }

/* ---- Подвал --------------------------------------------------------- */
.foot {
  background: var(--ink); color: #dfe9e7; margin-top: 40px;
  padding: 48px var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px;
}
.foot a { color: #9fe0d8; }
.foot-brand { font: 700 var(--step-2)/1.1 var(--display); color: #fff; margin-bottom: 8px; }
.contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; align-content: start; }
.contacts b { font-weight: 500; color: #9db0b4; margin-right: 8px; }
.foot-small { grid-column: 1 / -1; font-size: var(--step--1); color: #9db0b4; }
@media (max-width: 640px) { .foot { grid-template-columns: 1fr; } }

/* ---- Простая текстовая страница (обработка данных) ------------------ */
.doc { max-width: 760px; margin: 0 auto; padding: 24px var(--gutter) 80px; }
.doc h1 { font-size: var(--step-3); margin: 24px 0 24px; }
.doc h2 { font-size: var(--step-1); margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc p + p { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caustics i { animation: none; }
}
