/* Код 22 — design system. Cinematic: title-sequence typography, film stock darks, gold practical light, grain. */
:root {
  /* cinematic night: near-black stock, ivory highlights, one warm practical light (gold) */
  --paper: #0b0a09;
  --paper-2: #12100e;
  --card: #16130f;
  --ink: #efe7d6;
  --ink-2: #c9bfad;
  --muted: #8f8676;
  --rule: #2b2620;
  --gold: #c9a35c;
  --gold-soft: rgba(201, 163, 92, .22);
  --night: #050504;
  --night-text: #efe7d6;
  --ok: #8fc7a4;
  --err: #e08a7a;
  --radius: 4px;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); }
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; margin: 0 auto; }

/* typography */
h1, h2, h3, .display { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.08; margin: 0 0 .5em; }
h1 { font-size: clamp(38px, 6.4vw, 72px); }
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: 26px; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 640px; }
.eyebrow { font: 600 12px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; display: block; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.serif-num { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1; }
hr, .rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* header / footer */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.wordmark { font-family: var(--serif); font-size: 28px; font-weight: 600; text-decoration: none; color: var(--ink); letter-spacing: -.01em; }
.wordmark span { color: var(--gold); }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--gold); }
.site-footer { border-top: 1px solid var(--rule); margin-top: 64px; padding: 36px 0 120px; color: var(--muted); font-size: 13px; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 24px; }
.site-footer b { color: var(--ink); display: block; margin-bottom: 8px; font-size: 14px; }
.site-footer a { display: block; color: var(--ink-2); text-decoration: none; padding: 2px 0; }

/* sections */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.band-night { background: var(--night); color: var(--night-text); }
.band-night a { color: var(--night-text); }
.band-night .muted { color: #a59d8f; }
.band-paper2 { background: var(--paper-2); }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 999px; padding: 14px 26px; font: 600 16px/1 var(--sans); cursor: pointer; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.btn:hover { background: #2a2622; color: var(--paper); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #87672f; }
.btn-block { width: 100%; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
input[type="text"], input[type="email"], input[type="date"], select {
  width: 100%; background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px;
  padding: 14px 14px; font: 16px var(--sans); appearance: none; min-height: 50px;
}
input:focus, select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); width: 18px; height: 18px; flex: none; margin-top: 3px; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.err { color: var(--err); min-height: 1.3em; margin-top: 8px; font-size: 14px; }
.ok { color: var(--ok); }

/* cards */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-flat { background: transparent; border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tag { display: inline-block; font: 600 11px/1.6 var(--sans); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 1px 10px; }
.tag-solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.price { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1; }
.price s { font-family: var(--sans); font-size: 15px; color: var(--muted); font-weight: 400; margin-left: 8px; }

/* matrix chart: line art */
.chart .geom { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .55; }
.chart .pt circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.chart .pt.main circle { fill: var(--ink); }
.chart .pt.main text { fill: var(--paper); }
.chart .pt text { fill: var(--ink); font: 600 13px var(--sans); text-anchor: middle; dominant-baseline: central; }

/* reading text */
.prose { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.prose h1 { font-size: 36px; margin: 48px 0 12px; color: var(--ink); }
.prose h2 { font-size: 26px; margin: 32px 0 10px; color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose b { color: var(--ink); }

/* faq */
details.faq { border-top: 1px solid var(--rule); padding: 18px 0; }
details.faq:last-of-type { border-bottom: 1px solid var(--rule); }
details.faq summary { cursor: pointer; font-family: var(--serif); font-size: 23px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::after { content: "+"; font-family: var(--sans); color: var(--gold); }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: 12px 0 0; color: var(--ink-2); }

.breadcrumbs { font-size: 13px; color: var(--muted); padding: 16px 0 0; }
.breadcrumbs a { color: var(--muted); }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* --- cinematic layer ------------------------------------------------------ */
body::after { /* film grain */
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } }
.site-header { border-bottom: 0; position: relative; z-index: 5; }
.wordmark { letter-spacing: .02em; }
h1 { font-size: clamp(46px, 9vw, 128px); font-weight: 500; line-height: .95; letter-spacing: -.02em; }
h2 { font-weight: 500; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
.eyebrow { letter-spacing: .32em; font-weight: 500; }
.btn { border-radius: 999px; background: var(--ink); color: var(--paper); border-color: var(--ink); letter-spacing: .02em; }
.btn:hover { background: var(--gold); border-color: var(--gold); color: #0b0a09; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(239, 231, 214, .35); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #0b0a09; }
.card { background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)); border-color: var(--rule); border-radius: 6px; box-shadow: var(--shadow); }
input[type="text"], input[type="email"], input[type="date"], select { background: rgba(255,255,255,.03); border-color: var(--rule); border-radius: 4px; color-scheme: dark; }
.scene { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.scene > picture, .scene > img.bg { position: absolute; inset: 0; z-index: -2; }
.scene img.bg, .scene picture img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: push 18s ease-out forwards; }
.scene::before { /* letterbox vignette */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, #0b0a09 0%, rgba(11,10,9,.15) 18%, rgba(11,10,9,.25) 60%, #0b0a09 100%),
    radial-gradient(120% 80% at 70% 40%, transparent 30%, rgba(11,10,9,.85) 100%);
}
@keyframes push { to { transform: scale(1); } }
.frame { position: relative; overflow: hidden; border-radius: 4px; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.92) contrast(1.05); }
.frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 120px rgba(0,0,0,.75); pointer-events: none; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.letterbox-title { font-family: var(--serif); font-size: clamp(30px, 5vw, 64px); line-height: 1.05; font-weight: 500; }
.chart .geom { stroke: var(--gold); opacity: .55; }
.chart .pt circle { fill: var(--paper); stroke: var(--gold); }
.chart .pt.main circle { fill: var(--gold); stroke: var(--gold); }
.chart .pt.main text { fill: #0b0a09; }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } .scene img.bg, .scene picture img { animation: none; transform: none; } .reveal { opacity: 1; transform: none; } }
.wrap.section, .wrap.section-tight { padding-left: 16px; padding-right: 16px; }
.scene img.bg, .scene picture img { object-position: 72% 50%; }
@media (max-width: 640px) {
  .site-header.over .site-nav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; gap: 16px; white-space: nowrap; scrollbar-width: none; }
  .site-header.over .site-nav::-webkit-scrollbar { display: none; }
}

/* --- art layer v4: self-hosted art fonts + ChatGPT-generated gold details --------------------- */
:root {
  --display: "Prata", "Cormorant Garamond", Georgia, serif;          /* didone titles */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;  /* italic accents */
  --label: "Tenor Sans", "Manrope", system-ui, sans-serif;           /* buttons, nav, eyebrows */
  --unicase: "Cormorant Unicase", "Cormorant Garamond", Georgia, serif; /* wordmark, numerals */
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --foil: url("/static/img/ui/foil.webp");
}
body { font-family: var(--sans); letter-spacing: .005em; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: -.015em; }
h1 { font-size: clamp(40px, 7.4vw, 104px); line-height: 1.02; }
h2 { font-size: clamp(28px, 4vw, 48px); line-height: 1.08; }
h3 { font-size: 24px; }
h1 em, h2 em, h3 em { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.12em; color: var(--gold); letter-spacing: 0; }
.eyebrow { font-family: var(--label); font-weight: 400; font-size: 12px; letter-spacing: .34em; display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.lead { font-weight: 400; }

/* wordmark with the generated emblem */
.wordmark { font-family: var(--unicase); font-weight: 600; font-size: 26px; letter-spacing: .08em; display: inline-flex; align-items: center; gap: 10px; }
.wordmark::before { content: ""; width: 34px; height: 34px; background: url("/static/img/ui/emblem.webp") center / contain no-repeat; flex: none; }
.site-nav a { font-family: var(--label); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }

/* buttons: champagne-gold foil with a light sweep */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  font-family: var(--label); font-weight: 400; font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: #1a1408; border: 1px solid rgba(255, 236, 190, .55); border-radius: 999px; padding: 16px 30px;
  background: var(--foil) center / cover, linear-gradient(135deg, #8a6a2e, #e9cf8f 45%, #b48a3e);
  box-shadow: inset 0 1px 0 rgba(255, 248, 225, .65), inset 0 -1px 0 rgba(80, 55, 10, .45), 0 10px 30px -12px rgba(201, 163, 92, .55);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .45);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn::after { /* light sweep */
  content: ""; position: absolute; inset: -40% auto -40% -60%; width: 45%; z-index: -1; transform: skewX(-20deg) translateX(0);
  background: linear-gradient(90deg, transparent, rgba(255, 252, 235, .75), transparent); transition: transform .9s ease;
}
.btn:hover { color: #1a1408; background: var(--foil) center / cover; filter: brightness(1.06) saturate(1.05); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 248, 225, .7), 0 16px 40px -14px rgba(201, 163, 92, .8); }
.btn:hover::after { transform: skewX(-20deg) translateX(420%); }
.btn:active { transform: translateY(0); filter: brightness(.98); }
.btn:disabled::after { display: none; }
.btn-ghost {
  background: rgba(201, 163, 92, .04); color: var(--gold); text-shadow: none;
  border: 1px solid rgba(201, 163, 92, .55); box-shadow: inset 0 0 0 1px rgba(201, 163, 92, .08);
}
.btn-ghost:hover { color: #1a1408; background: var(--foil) center / cover; border-color: rgba(255, 236, 190, .55); }
.btn-gold { /* same foil, kept for compatibility */ }
.tab { font-family: var(--label); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.tab[aria-selected="true"] { background: var(--foil) center / cover; color: #1a1408; }
label.field { font-family: var(--label); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
input[type="text"], input[type="email"], input[type="date"], select { font-family: var(--sans); border-color: #3a3327; }
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 163, 92, .18); }

/* numerals and prices */
.serif-num, .price { font-family: var(--display); font-weight: 400; color: var(--gold); }
.price s { font-family: var(--sans); }

/* engraved corners on cards */
.card { position: relative; }
.card::before, .card::after {
  content: ""; position: absolute; width: 56px; height: 56px; pointer-events: none; opacity: .9;
  background: url("/static/img/ui/corner.webp") top left / contain no-repeat;
}
.card::before { top: 8px; left: 8px; }
.card::after { right: 8px; bottom: 8px; transform: rotate(180deg); }

/* ornamental divider between sections */
.ornament { height: 34px; margin: 8px auto; max-width: 720px; background: url("/static/img/ui/divider.webp") center / contain no-repeat; opacity: .9; }

/* gold line icons */
.icon { display: block; width: 56px; height: 56px; margin-bottom: 14px; background: center / contain no-repeat; }
.icon-sm { width: 22px; height: 22px; margin: 0; display: inline-block; vertical-align: -5px; }
.icon-octagram { background-image: url("/static/img/ui/icon-octagram.webp"); }
.icon-rings { background-image: url("/static/img/ui/icon-rings.webp"); }
.icon-hourglass { background-image: url("/static/img/ui/icon-hourglass.webp"); }
.icon-book { background-image: url("/static/img/ui/icon-book.webp"); }
.icon-bust { background-image: url("/static/img/ui/icon-bust.webp"); }
.icon-lock { background-image: url("/static/img/ui/icon-lock.webp"); }
.icon-moon { background-image: url("/static/img/ui/icon-moon.webp"); }
.icon-sparkle { background-image: url("/static/img/ui/icon-sparkle.webp"); }
details.faq summary { font-family: var(--display); font-weight: 400; font-size: 21px; }
.btn { white-space: nowrap; letter-spacing: .16em; }
@media (max-width: 420px) { .btn { letter-spacing: .12em; padding: 15px 22px; } }
.tag { font-family: var(--label); font-weight: 400; letter-spacing: .18em; }
.tag-solid { background: var(--foil) center / cover; color: #1a1408; border-color: rgba(255, 236, 190, .5); }
.tab { white-space: nowrap; }
@media (max-width: 480px) { .tab { font-size: 11px; letter-spacing: .08em; padding: 9px 12px; } .eyebrow { letter-spacing: .24em; } }
