/* ИНЬЯН — страница подарочных сертификатов и оферта. Встраивается в Тильду (yinyangberdsk.ru/gift, /oferta). */
:root {
  --olive: #60693C; --olive-deep: #4A5130; --sage: #848973; --cream: #F6EDDE; --cream-2: #FBF7F0;
  --powder: #D7C5BB; --gold: #B9A27A; --ink: #2B2C25; --muted: #66675A; --line: rgba(96, 105, 60, .22);
  --err: #9B3B2E;
  --f-display: "Cormorant", Georgia, serif;
  --f-script: "Great Vibes", "Snell Roundhand", cursive;
  --f-ui: Unbounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 300 15px/1.65 var(--f-ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--olive); }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; line-height: 1.05; letter-spacing: .01em; text-wrap: balance; color: var(--olive-deep); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.script { font-family: var(--f-script); font-weight: 400; color: var(--gold); text-transform: none; letter-spacing: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 400 10.5px/1.4 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--olive); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.muted { color: var(--muted); }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: rgba(246, 237, 222, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark, .logo-word { display: block; background: var(--olive); -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.logo-mark { -webkit-mask-image: url(logo-mark.png); mask-image: url(logo-mark.png); width: 22px; height: 28px; }
.logo-word { -webkit-mask-image: url(logo-word.png); mask-image: url(logo-word.png); width: 90px; height: 26px; }
.top-links { display: flex; gap: 14px; align-items: center; font: 400 11px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; }
.top-links a { text-decoration: none; color: var(--ink); padding: 12px 0; white-space: nowrap; }
.top-links .hide-s { display: none; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; border: 1px solid transparent; font: 400 12px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.btn-olive { background: var(--olive); color: var(--cream); }
.btn-olive:hover { background: var(--olive-deep); }
.btn-line { border-color: var(--olive); color: var(--olive); background: transparent; }
.btn-line:hover { background: var(--olive); color: var(--cream); }
.btn[disabled] { opacity: .5; cursor: default; }

/* Первый экран */
.hero { padding: 28px 0 56px; }
.hero-grid { display: grid; gap: 28px; }
.hero h1 { font-size: clamp(36px, 11vw, 88px); text-transform: uppercase; line-height: .95; }
.hero h1 .script { display: block; font-size: .6em; line-height: 1.05; margin-left: .8em; }
.hero-text { display: grid; gap: 18px; align-content: center; }
.hero-photo { border-radius: 22px; overflow: hidden; background: #e9e8e4; aspect-ratio: 4 / 3; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 400 10.5px/1.5 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Секции */
.sec { padding: 64px 0; border-top: 1px solid var(--line); }
.sec h2 { font-size: clamp(34px, 8vw, 58px); text-transform: uppercase; margin: 12px 0 26px; }
.sec h2 .script { font-size: .62em; text-transform: none; }

/* Номиналы — карточки товара */
.noms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nom { background: var(--olive); color: var(--cream); border-radius: 18px; padding: 18px 16px; display: grid; gap: 14px; min-height: 150px; align-content: space-between; text-decoration: none; position: relative; overflow: hidden; transition: transform .3s var(--ease); }
.nom:hover { transform: translateY(-2px); }
.nom::after { content: ""; position: absolute; right: -26px; top: -26px; width: 90px; height: 112px; border-radius: 50%; border: 1px solid rgba(246, 237, 222, .18); }
.nom small { font: 400 9.5px/1.4 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: rgba(246, 237, 222, .7); }
.nom b { font: 500 34px/1 var(--f-display); color: var(--cream); }
.nom span { font-size: 11.5px; color: rgba(246, 237, 222, .78); }
.nom.custom { background: var(--cream-2); color: var(--olive-deep); border: 1px dashed var(--olive); }
.nom.custom b { color: var(--olive-deep); font-size: 26px; }
.nom.custom small, .nom.custom span { color: var(--muted); }
.nom.custom::after { border-color: var(--line); }

.noms-3 { grid-template-columns: 1fr; }

/* Как получить */
.ways { display: grid; gap: 14px; }
.way { background: var(--cream-2); border-radius: 18px; padding: 22px 20px; display: grid; gap: 8px; border: 1px solid rgba(96, 105, 60, .1); }
.way h3 { font-size: 26px; text-transform: uppercase; }
.way p { font-size: 13.5px; color: var(--muted); }
.steps { counter-reset: s; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.steps li::before { content: "0" counter(s); font: 500 26px/1 var(--f-display); color: var(--gold); }

/* Форма */
.order { background: var(--cream-2); }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field > span, .legend { font: 400 10.5px/1.4 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--olive); }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 16px; font-size: 16px; outline: none; transition: border-color .2s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--olive); }
.field .help { font-size: 12px; color: var(--muted); }
.field.bad input, .field.bad textarea { border-color: var(--err); }
.field .err { font-size: 12px; color: var(--err); display: none; }
.field.bad .err { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: 400 13px/1 var(--f-ui); transition: all .2s var(--ease); }
.chip[aria-pressed="true"] { background: var(--olive); color: var(--cream); border-color: var(--olive); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg label { position: relative; display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .2s; }
.field .seg input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { border-color: var(--olive); box-shadow: inset 0 0 0 1px var(--olive); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.seg b { font: 500 20px/1.1 var(--f-display); color: var(--olive-deep); }
.seg small { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--olive); }
.check.bad { color: var(--err); }
.two { display: grid; gap: 22px; }

/* Превью сертификата */
.preview { background: var(--olive); color: var(--cream); border-radius: 20px; padding: 26px 22px; display: grid; gap: 12px; justify-items: center; text-align: center; position: relative; overflow: hidden; box-shadow: 0 20px 50px rgba(43, 44, 37, .18); }
.preview .logo-mark { background: var(--cream); width: 30px; height: 38px; }
.preview .logo-word { background: var(--gold); width: 128px; height: 36px; }
.preview .tiny { font: 400 9px/1.4 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: rgba(246, 237, 222, .7); }
.preview .amt { font: 500 46px/1 var(--f-display); color: var(--cream); margin-top: 6px; }
.preview .to { font-family: var(--f-script); font-size: 30px; line-height: 1.1; color: var(--gold); min-height: 1.1em; }
.preview .wish { font-size: 12px; color: rgba(246, 237, 222, .8); max-width: 30ch; min-height: 1em; white-space: pre-line; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.total b { font: 500 34px/1 var(--f-display); color: var(--olive-deep); }
.note { font-size: 12.5px; color: var(--muted); }
.done { display: none; background: #fff; border-radius: 18px; padding: 24px 20px; border: 1px solid var(--line); gap: 12px; }
.done.show { display: grid; }
.done h3 { font-size: 30px; text-transform: uppercase; }

/* Результат оплаты */
.result { background: #fff; border-radius: 20px; padding: 26px 22px; border: 1px solid var(--line); display: grid; gap: 14px; margin-bottom: 30px; }
.result h3 { font-size: clamp(30px, 7vw, 44px); text-transform: uppercase; }
.result .num { font: 500 32px/1.1 var(--f-display); letter-spacing: .06em; color: var(--olive-deep); }
.result .row { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-test { display: inline-block; background: #fbeed6; color: #7a5a1c; border-radius: 999px; padding: 6px 12px; font-size: 11px; letter-spacing: .06em; }
.err-box { color: var(--err); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--olive); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Условия, реквизиты */
.terms { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.terms li { padding-left: 22px; position: relative; font-size: 14px; }
.terms li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--gold); }
.req { display: grid; gap: 0; border-top: 1px solid var(--line); }
.req div { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.req dt { font: 400 10px/1.4 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.req dd { margin: 0; font-size: 14.5px; }
dl { margin: 0; }

/* Подвал */
.foot { background: var(--ink); color: #c9c5b8; padding: 40px 0 48px; font-size: 12px; }
.foot .wrap { display: grid; gap: 16px; }
.foot a { color: #e9e4d6; }
.foot .logo-mark, .foot .logo-word { background: var(--gold); }

/* Оферта */
.doc { padding: 40px 0 70px; }
.doc h1 { font-size: clamp(34px, 8vw, 56px); text-transform: uppercase; margin: 12px 0 10px; }
.doc h2 { font-size: 26px; margin: 34px 0 10px; text-transform: uppercase; }
.doc p, .doc li { font-size: 14px; color: #3d3e35; }
.doc p { margin: 0 0 10px; }
.doc ol { padding-left: 0; list-style: none; margin: 0; counter-reset: none; }
.doc ol li { margin-bottom: 8px; }

@media (min-width: 760px) {
  .wrap { padding: 0 36px; }
  .top-links .hide-s { display: inline; }
  .hero { padding: 48px 0 80px; }
  .hero-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
  .hero-photo { aspect-ratio: 1 / 1; }
  .noms { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .noms-3 { grid-template-columns: repeat(3, 1fr); }
  .ways { grid-template-columns: 1fr 1fr; }
  .order-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: start; }
  .order-side { position: sticky; top: 90px; display: grid; gap: 18px; }
  .two { grid-template-columns: 1fr 1fr; }
  .sec { padding: 90px 0; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
}
@media (max-width: 759px) {
  .split > div + div { margin-top: 56px; }
  .order-side { display: grid; gap: 18px; margin-bottom: 26px; }
  .order-grid { display: flex; flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Новый логотип ИЯ (золотой градиент). Форма — маска из оригинального PNG. */
.logo-h, .logo-v { display: block; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; background: linear-gradient(90deg, #D8BF8C 0%, #BFA273 50%, #9E7F59 100%); }
.logo-h { -webkit-mask-image: url(logo-h.png); mask-image: url(logo-h.png); height: 36px; aspect-ratio: 1676 / 404; }
.logo-v { -webkit-mask-image: url(logo-v.png); mask-image: url(logo-v.png); height: 88px; aspect-ratio: 850 / 900; }
.foot .logo-h, .foot .logo-v { background: linear-gradient(90deg, #F4E3B5 0%, #D6BC8E 50%, #B08E69 100%); }
@media (min-width: 760px) { .logo-h { height: 44px; } }
