/* Олимп — печати, штампы, кассовые аппараты
   Палитра: бумага, синие чернила печати, красная сургучная печать, тёмно-синий для текста */

@font-face { font-family: "Lora"; src: url("fonts/Lora-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }

:root {
  --paper: #EDF0F6;
  --card: #F9FAFC;
  --white: #FFFFFF;
  --ink: #1D2B94;
  --ink-dark: #141A3D;
  --seal: #C4373A;
  --muted: #4B5272;
  --line: #CBD2E3;
  --focus: #C4373A;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 20px;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-dark);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--seal); }
ul { list-style: none; margin: 0; padding: 0; }
dl, dd { margin: 0; }

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Шапка ---------- */
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 28px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; height: 44px; width: auto; max-width: 240px; }
.brand-fallback { display: flex; align-items: center; gap: 12px; }
.brand-fallback[hidden], .brand-logo[hidden] { display: none; }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.01em; }
.brand-sub { font-size: 0.78rem; color: var(--muted); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink-dark); text-decoration: none; font-weight: 500; font-size: 0.97rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--seal); }
.top-contact { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.top-phone { font-weight: 600; color: var(--ink-dark); text-decoration: none; font-size: 1.02rem; white-space: nowrap; }
.top-phone:hover { color: var(--seal); }
.top-hours { font-size: 0.82rem; color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font: 600 1rem/1 var(--sans);
  border-radius: 6px; border: 2px solid var(--ink);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-dark); border-color: var(--ink-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }

/* ---------- Первый экран ---------- */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.hero-copy h1 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); line-height: 1.1; max-width: 16em; }
.lead { margin-top: 22px; font-size: 1.12rem; color: var(--muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { font-size: 0.86rem; color: var(--muted); }
.facts dd { font-weight: 600; font-size: 1.05rem; }

/* Конструктор оттиска — главный акцент страницы */
.seal-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 26px 26px 22px; box-shadow: 0 1px 0 var(--white) inset, 0 12px 30px -18px rgba(20, 26, 61, .35); }
.seal-card h2 { font-size: 1.2rem; line-height: 1.3; font-weight: 600; max-width: 22em; }
.seal-stage {
  margin: 18px 0 20px; padding: 16px;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(29, 43, 148, .05) 27px 28px),
    #FFFFFF;
  border: 1px solid var(--line); border-radius: 6px;
  display: grid; place-items: center;
}
#seal { width: min(100%, 300px); height: auto; color: #1D2B94; mix-blend-mode: multiply; transform-origin: 50% 50%; }
#seal.stamp { animation: stamp .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes stamp {
  0% { transform: scale(1.16) rotate(-4deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.seal-arc { font-family: var(--sans); font-weight: 600; font-size: 19px; letter-spacing: .04em; }
.seal-center { font-family: var(--sans); font-weight: 600; letter-spacing: .03em; }

.seal-form { display: grid; gap: 12px; }
label > span, legend { display: block; font-size: 0.86rem; font-weight: 500; color: var(--muted); margin-bottom: 4px; padding: 0; }
input[type="text"], input[type="tel"], textarea {
  width: 100%; padding: 11px 13px; font: 400 1rem/1.4 var(--sans); color: var(--ink-dark);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 6px;
}
input[type="text"]:hover, input[type="tel"]:hover, textarea:hover { border-color: #9AA6CC; }
input[type="text"]:focus-visible, input[type="tel"]:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.inks { border: 0; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.inks legend { width: 100%; }
.ink-opt { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; cursor: pointer; }
.ink-opt input { position: absolute; opacity: 0; pointer-events: none; }
.swatch { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 2px solid var(--white); box-shadow: 0 0 0 1.5px var(--line); }
.ink-opt input:checked + .swatch { box-shadow: 0 0 0 2.5px var(--c); }
.ink-opt input:focus-visible + .swatch { outline: 3px solid var(--focus); outline-offset: 3px; }
.seal-note { margin-top: 16px; font-size: 0.86rem; color: var(--muted); }

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section-order { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: 28px; }

.tabs { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--white); }
.tabs button { font: 600 0.97rem/1 var(--sans); padding: 13px 20px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.tabs button + button { border-left: 1.5px solid var(--ink); }
.tabs button:hover { background: var(--paper); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs button:focus-visible { outline-offset: -4px; outline-color: var(--focus); }
.tabs button[aria-selected="true"]:focus-visible { outline-color: #fff; }

.panel-lead { color: var(--muted); max-width: 40em; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { font: 500 0.92rem/1 var(--sans); padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-dark); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink-dark); border-color: var(--ink-dark); color: #fff; }

/* Строки каталога */
.rows { border-top: 2px solid var(--ink-dark); background: var(--white); }
.row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 96px 130px auto;
  align-items: center; gap: 12px 24px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.row:hover { background: var(--card); }
.imp { min-height: 100px; display: flex; align-items: center; }
.fig { display: block; overflow: visible; }
.fig-shape { fill: rgba(29, 43, 148, .08); stroke: var(--ink); stroke-width: 1.6; }
.fig-inner { fill: none; stroke: rgba(29, 43, 148, .35); stroke-width: 1; stroke-dasharray: 3 3; }
.fig .dim { stroke: var(--muted); stroke-width: 1; }
.fig .dim-text { fill: var(--ink-dark); font: 500 11px var(--sans); }
.photo { width: 96px; height: 96px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-empty { background: none; border-color: transparent; }
.row-name { font-weight: 600; font-size: 1.08rem; line-height: 1.3; }
.row-sub { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.row-desc { color: var(--muted); font-size: 0.95rem; margin-top: 6px; max-width: 46em; }
.row-price { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; text-align: right; white-space: nowrap; }
.rows-kkm .row { grid-template-columns: minmax(0, 1fr) 112px 150px auto; padding: 22px 20px; }
.rows-kkm .photo { width: 112px; height: 112px; }

/* ---------- Заказ ---------- */
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.order-copy p { margin-top: 18px; color: var(--muted); max-width: 30em; }
.order-copy h2 + p { margin-top: 20px; }
.order-phones { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1.5; color: var(--ink-dark) !important; }
.order-phones a { color: var(--ink); text-decoration: none; }
.order-phones a:hover { color: var(--seal); }
.order-form { display: grid; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
textarea { resize: vertical; min-height: 110px; }
.err { display: block; margin-top: 6px; color: #A12227; font-size: 0.88rem; }
.err[hidden] { display: none; }
.order-form input[aria-invalid="true"] { border-color: #A12227; }
.form-note { font-size: 0.86rem; color: var(--muted); }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 40px 64px; align-items: start; }
.contact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.contact-list dt { font-size: 0.86rem; color: var(--muted); margin-bottom: 4px; }
.contact-list dd { font-size: 1.05rem; line-height: 1.55; }
.contact-list a { font-weight: 500; }

.foot { border-top: 2px solid var(--ink-dark); padding: 22px 0 28px; font-size: 0.9rem; color: var(--muted); }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .hero { padding: 36px 0 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .order-grid, .contacts-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav { display: none; }
  .top-contact { margin-left: auto; }
  .section { padding: 52px 0; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .brand-sub { display: none; }
  .row, .rows-kkm .row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "imp photo" "meta price" "act act";
    padding: 16px;
  }
  .rows-kkm .row { grid-template-areas: "meta photo" "price price" "act act"; }
  .row .imp { grid-area: imp; height: auto; min-height: 48px; }
  .row .photo, .rows-kkm .photo { grid-area: photo; width: 88px; height: 88px; justify-self: end; }
  .row .meta { grid-area: meta; }
  .row .row-price { grid-area: price; align-self: start; }
  .row .btn { grid-area: act; width: 100%; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; padding: 13px 8px; font-size: 0.9rem; }
  .contact-list { grid-template-columns: 1fr; }
  .order-form { padding: 20px; }
  .seal-card { padding: 20px 18px 18px; }
  .top-hours { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #seal.stamp { animation: none; }
  .btn { transition: none; }
}
