/* ivaana.art — стили сайта. Направление B «Архитектоника» (design-directions/CHOICE.md) */
@font-face { font-family: 'Jost'; font-style: normal; font-display: swap; font-weight: 300 800; src: url(../fonts/jost-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Jost'; font-style: normal; font-display: swap; font-weight: 300 800; src: url(../fonts/jost-latin.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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- общие компоненты ---------- */
:root {
  --ivory: #ECE4D3;
  --cream: #F5EEE2;
  --gold: #C4A15A;
  --gold-hi: #D9BC7A;
  --gold-lo: #B8934A;
  --wine: #7A1F1B;
  --wine-hi: #8E2722;
  --cinnamon: #9C4F2E;
  --ink: #1E1512;
  --muted: #5E4F45;
  --err: #A3241B;
  --potal: linear-gradient(135deg, var(--gold-lo), var(--gold-hi));
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --pad: 20px;
}
@media (min-width: 900px) { :root { --pad: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: inherit; }
p { margin: 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
.text { max-width: 720px; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
[data-logo] { display: inline-block; line-height: 0; }
[data-logo] svg { height: 100%; width: auto; }

/* ---------- кнопки ---------- */
.btn { --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 28px; border: 0; border-radius: var(--radius); font: inherit; font-weight: 600; font-size: 16px; letter-spacing: .02em; cursor: pointer; text-decoration: none; transition: transform .22s var(--ease-spring), background-color .12s, box-shadow .15s, color .12s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.96); transition-duration: .08s; }
.btn--primary { background: var(--wine); color: var(--cream); }
.btn--primary:hover { background: var(--wine-hi); transform: translateY(-2px); box-shadow: 0 6px 16px -8px rgba(122, 31, 27, .55); }
.btn--primary:active { transform: scale(.96); box-shadow: none; }
.btn--primary:disabled { opacity: .7; cursor: progress; transform: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--ghost:hover { transform: translateY(-2px); color: var(--wine); }
.btn--ghost:active { transform: scale(.96); }
.btn--sm { --h: 44px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--gold); transition: gap .2s var(--ease-spring), color .12s; }
.link-arrow:hover { gap: 14px; color: var(--wine); }
.link-arrow::after { content: '→'; }

/* ---------- фильтр ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1.5px solid rgba(30, 21, 18, .2); background: transparent; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; transition: transform .2s var(--ease-spring), background .12s, border-color .12s; }
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---------- карточка работы ---------- */
.work-card { display: flex; flex-direction: column; }
.work-card__img { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--card-bg, var(--cream)); cursor: zoom-in; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; }
.work-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.work-card__img:hover img { transform: scale(1.03); }
.work-card__body { padding: 16px 0 0; display: grid; gap: 4px; }
.work-card__dir { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cinnamon); font-weight: 600; }
.work-card__title { font-size: 20px; font-weight: 600; }
.work-card__meta { font-size: 14px; color: var(--muted); }
.work-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.work-card__price { font-size: 20px; font-weight: 600; }

/* ---------- модалки ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(30, 21, 18, .55); opacity: 0; transition: opacity .18s; }
.modal__panel { position: relative; width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); overflow: auto; background: var(--cream); border-radius: var(--radius); padding: 32px 24px 24px; box-shadow: 0 24px 60px -20px rgba(30, 21, 18, .5); transform: translateY(16px) scale(.98); opacity: 0; transition: transform .25s var(--ease-spring), opacity .18s; }
.modal__panel--wide { max-width: 1080px; padding: 24px; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__panel { transform: none; opacity: 1; }
.modal__close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer; border-radius: var(--radius); transition: transform .2s var(--ease-spring); z-index: 2; }
.modal__close:active { transform: scale(.9); }
@media (max-width: 600px) { .modal { padding: 0; align-items: end; } .modal__panel { max-height: 94dvh; border-radius: var(--radius) var(--radius) 0 0; padding: 32px 20px 24px; } }

.wm { display: grid; gap: 24px; }
@media (min-width: 860px) { .wm { grid-template-columns: 1.1fr 1fr; gap: 40px; } }
.wm__main { width: 100%; max-height: 70vh; object-fit: contain; background: var(--ivory); border-radius: var(--radius); }
.wm__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wm__thumbs button { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: none; transition: transform .2s var(--ease-spring); }
.wm__thumbs button:active { transform: scale(.94); }
.wm__thumbs button[aria-current="true"] { border-color: var(--gold); }
.wm__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.wm__text { display: grid; gap: 12px; align-content: start; }
.wm__title { font-size: 32px; font-weight: 600; }
.wm__meta, .wm__materials { color: var(--muted); font-size: 15px; }
.wm__buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--gold); }
.wm__price { font-size: 24px; font-weight: 600; }

/* ---------- форма ---------- */
.order { display: grid; gap: 16px; }
.order__title { font-size: 28px; font-weight: 600; }
.order__lead { color: var(--muted); }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font-size: 14px; font-weight: 600; padding: 0; }
.field__opt { font-weight: 400; color: var(--muted); }
.field__input { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--ink); background: #fffaf2; border: 1.5px solid rgba(30, 21, 18, .25); border-radius: var(--radius); transition: border-color .12s, box-shadow .12s; }
.field__input:focus { outline: none; border-color: var(--gold-lo); box-shadow: 0 0 0 3px rgba(196, 161, 90, .3); }
textarea.field__input { resize: vertical; }
.field__error { display: none; font-size: 14px; color: var(--err); }
.field.is-invalid .field__input { border-color: var(--err); }
.field.is-invalid .field__error { display: block; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius); border: 1.5px solid rgba(30, 21, 18, .2); font-size: 15px; cursor: pointer; transition: transform .2s var(--ease-spring); }
.seg input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }
.seg span:active { transform: scale(.95); }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 0; accent-color: var(--wine); }
.field__error--consent { margin-top: -8px; }
.order.no-consent .field__error--consent { display: block; }
.order__alert { padding: 12px 14px; border-radius: var(--radius); border: 1.5px solid var(--err); color: var(--err); font-size: 15px; }
.order__hint { font-size: 12px; color: var(--muted); }
.order-ok { display: grid; gap: 16px; justify-items: start; }
.order-ok__mark { width: 56px; height: 56px; fill: none; stroke: var(--gold-lo); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.order-ok__mark circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .5s ease-out forwards; }
.order-ok__mark path { stroke: var(--wine); stroke-dasharray: 34; stroke-dashoffset: 34; animation: draw .3s .4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- cookie ---------- */
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; display: grid; gap: 12px; max-width: 560px; padding: 16px; background: var(--ink); color: var(--cream); border-radius: var(--radius); font-size: 14px; transition: transform .25s ease-in, opacity .2s; }
.cookie .btn--ghost { color: var(--cream); }
.cookie .btn--ghost:hover { color: var(--gold-hi); }
.cookie__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cookie.is-gone { transform: translateY(140%); opacity: 0; pointer-events: none; }

/* ---------- подвал ---------- */
.footer { padding: 40px 0; font-size: 14px; color: var(--muted); }
.footer__row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- кубистические элементы ---------- */
.dots { height: 6px; background-image: radial-gradient(circle, var(--gold) 1.6px, transparent 2px); background-size: 8px 6px; background-repeat: repeat-x; }
.potal-sq { width: 24px; height: 24px; background: var(--potal); flex: none; }

/* ---------- направление B ---------- */
  :root { --bg: var(--ivory); --font: 'Jost', system-ui, sans-serif; --radius: 0px; }
  .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--cinnamon); }
  .h2 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 600; letter-spacing: -.01em; text-transform: uppercase; line-height: 1; }
  section { position: relative; padding: 64px 0; }
  @media (min-width: 900px) { section { padding: 112px 0; } }
  .btn { text-transform: uppercase; letter-spacing: .1em; font-size: 15px; }
  .btn--sm { font-size: 13px; }

  /* шапка */
  .hdr { position: sticky; top: 0; z-index: 50; background: rgba(122, 31, 27, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--cream); }
  .hdr__in { display: flex; align-items: center; gap: 24px; height: 64px; }
  .hdr [data-logo] { height: 26px; color: var(--gold-hi); }
  .hdr nav { display: none; gap: 28px; margin-left: auto; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
  .hdr nav a { text-decoration: none; padding: 8px 0; border-bottom: 1.5px solid transparent; }
  .hdr nav a:hover { border-color: var(--gold-hi); }
  .hdr .btn { margin-left: auto; color: var(--cream); }
  .hdr .btn:hover { color: var(--gold-hi); }
  @media (min-width: 900px) { .hdr nav { display: flex; } .hdr .btn { margin-left: 0; } .hdr__in { height: 76px; } .hdr [data-logo] { height: 30px; } }

  /* первый экран: наложенные плоскости */
  .hero { background: var(--wine); color: var(--cream); overflow: hidden; padding: 40px 0 48px; }
  .planes { position: absolute; inset: 0; pointer-events: none; }
  .planes i { position: absolute; display: block; }
  .p1 { inset: 0 0 0 45%; background: var(--ink); clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); }
  .p2 { left: 38%; top: 0; width: 34%; height: 70%; background: var(--cinnamon); opacity: .85; clip-path: polygon(0 0, 100% 0, 40% 100%); }
  .p3 { right: 0; bottom: 0; width: 30%; height: 46%; background: var(--gold); opacity: .9; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
  .p4 { left: 0; bottom: 0; width: 26%; height: 30%; background: rgba(245, 238, 226, .08); clip-path: polygon(0 0, 100% 100%, 0 100%); }
  .hero__grid { position: relative; display: grid; gap: 32px; }
  .hero__text { display: grid; gap: 20px; align-content: center; padding-bottom: 8px; }
  .hero .eyebrow { color: var(--gold-hi); }
  .hero h1 { font-size: clamp(40px, 5.2vw, 76px); font-weight: 700; line-height: .95; text-transform: uppercase; letter-spacing: -.01em; }
  .hero h1 span { display: block; }
  .hero h1 .g { color: var(--gold-hi); }
  .hero__lead { font-size: 18px; color: rgba(245, 238, 226, .86); max-width: 500px; }
  .hero .btn--primary { background: var(--gold); color: var(--ink); width: 100%; }
  .hero .btn--primary:hover { background: var(--gold-hi); }
  .hero__tg { font-size: 15px; color: rgba(245, 238, 226, .8); }
  .hero__tg a { color: var(--cream); font-weight: 600; }
  .hero__art { position: relative; margin: 0; }
  .hero__art .work-card__img { aspect-ratio: auto; background: transparent; }
  .hero__art .work-card__img { display: flex; justify-content: center; align-items: flex-end; }
  .hero__art .work-card__img::before { display: none; }
  .hero__art img { width: auto; max-width: 100%; max-height: 600px; height: auto; background: none !important; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .35)); }
  .hero__art .work-card__img:hover img { transform: none; }
  @media (min-width: 900px) {
    .hero { padding: 56px 0 64px; }
    .hero__grid { grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
    .hero__text { padding-bottom: 0; }
    .hero .btn--primary { width: auto; justify-self: start; }
    .hero__art { margin: 0; }
  }
  @media (max-width: 899px) { .p1 { inset: 50% 0 0 0; clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%); } .p2 { left: 50%; top: 40%; width: 60%; height: 30%; } }

  /* направления: фото целиком + плоскость со срезом под ним */
  .dirs { background: var(--ivory); }
  .dirs__grid { display: grid; gap: 40px; margin-top: 40px; }
  .dir { display: grid; align-content: start; }
  .dir__img { display: block; width: 100%; aspect-ratio: 60 / 85; padding: 0; border: 0; cursor: zoom-in; background: var(--cream); overflow: hidden; }
  .dir__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
  .dir__img:hover img { transform: scale(1.03); }
  .dir__panel { position: relative; z-index: 1; display: grid; gap: 12px; margin-top: -48px; padding: 72px 24px 32px; background: var(--tint); color: var(--cream); clip-path: polygon(0 48px, 100% 0, 100% 100%, 0 100%); }
  .dir--a { --tint: var(--wine); } .dir--b { --tint: var(--cinnamon); } .dir--c { --tint: var(--ink); }
  .dir__num { font-size: 13px; letter-spacing: .2em; color: var(--gold-hi); }
  .dir h3 { font-size: 30px; font-weight: 600; text-transform: uppercase; line-height: 1; }
  .dir p { color: rgba(245, 238, 226, .88); }
  .dir .link-arrow { border-color: var(--gold-hi); color: var(--cream); justify-self: start; }
  .dir .link-arrow:hover { color: var(--gold-hi); }
  @media (min-width: 900px) { .dirs__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } .dir__panel { padding: 80px 32px 40px; } .dir--b { margin-top: 64px; } .dir--c { margin-top: 128px; } }

  /* каталог */
  .cat__head { display: grid; gap: 16px; margin-bottom: 32px; }
  .cat__head p { color: var(--muted); font-size: 18px; }
  #catalog-grid { display: grid; gap: 48px 32px; margin-top: 40px; }
  @media (min-width: 640px) { #catalog-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 1000px) { #catalog-grid { grid-template-columns: repeat(3, 1fr); } }
  .work-card__img { overflow: visible; background: transparent; }
  .work-card__img::before { content: ''; position: absolute; inset: 14px -10px -10px 14px; background: var(--plane, var(--wine)); clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); }
  .work-card--interior .work-card__img::before { --plane: var(--cinnamon); }
  .work-card--mandala .work-card__img::before { --plane: var(--gold); }
  .work-card__img img { position: relative; background: var(--cream); }
  .work-card__img:hover img { transform: translate(-4px, -4px); }
  .work-card__title { font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
  .work-card__body { padding-top: 24px; }

  /* автор */
  .about__grid { display: grid; gap: 40px; }
  .about__photo { position: relative; width: 100%; max-width: 280px; margin: 16px 0 0 16px; }
@media (min-width: 900px) { .about__photo { max-width: 360px; margin: 16px 0 0 16px; justify-self: end; } }
  .about__photo::before { content: ''; position: absolute; inset: -16px 32px 32px -16px; background: var(--cinnamon); clip-path: polygon(0 0, 100% 0, 100% 60%, 0 100%); }
  .about__photo::after { content: ''; position: absolute; right: -12px; bottom: -12px; width: 40%; height: 30%; background: var(--gold); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
  .about__photo img { position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: center 20%; }
  .about__text { display: grid; gap: 20px; align-content: center; }
  .about__text p { font-size: 17px; }
  .about__quote { font-size: 22px !important; font-weight: 500; color: var(--wine); }
  @media (min-width: 900px) { .about__grid { grid-template-columns: 5fr 7fr; gap: 96px; } }

  /* на заказ */
  .custom { background: var(--cinnamon); color: var(--cream); overflow: hidden; }
  .custom::after { content: ''; position: absolute; right: 0; top: 0; width: 40%; height: 100%; background: var(--wine); clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%); opacity: .9; }
  .custom .wrap { position: relative; z-index: 1; }
  .custom .eyebrow { color: var(--gold-hi); }
  .custom__kinds { display: grid; gap: 32px; margin: 40px 0 48px; }
  .kind { display: grid; gap: 12px; }
  .kind h3 { font-size: 26px; font-weight: 600; text-transform: uppercase; color: var(--cream); }
  .kind p { color: rgba(245, 238, 226, .9); }
  .steps { display: grid; gap: 24px; counter-reset: s; list-style: none; padding: 0; margin: 0 0 40px; }
  .steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; counter-increment: s; }
  .steps li::before { content: counter(s); display: grid; place-items: center; width: 56px; height: 56px; background: var(--ink); color: var(--gold-hi); font-weight: 700; font-size: 24px; clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
  .steps b { display: block; font-size: 18px; }
  .steps span { color: rgba(245, 238, 226, .85); }
  .custom .btn--primary { background: var(--ink); width: 100%; }
  .custom .btn--primary:hover { background: #000; }
  @media (min-width: 900px) { .custom__kinds { grid-template-columns: 1fr 1fr; gap: 64px; } .steps { grid-template-columns: repeat(3, 1fr); } .custom .btn--primary { width: auto; } }

  /* финал */
  .final__box { display: grid; gap: 24px; }
  .final__contacts { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 20px; font-weight: 600; }
  .final__contacts a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; border-bottom: 2px solid var(--wine); }
  .final .btn--primary { width: 100%; }
  @media (min-width: 900px) { .final__box { grid-template-columns: 1.3fr 1fr; align-items: end; gap: 64px; } .final .btn--primary { width: auto; } }
  .footer { background: var(--ink); color: rgba(245, 238, 226, .7); }
  .cookie { background: var(--cream); color: var(--ink); box-shadow: 0 12px 40px -12px rgba(30,21,18,.5); }
  .cookie .btn--ghost { color: var(--ink); }

/* ---------- дополнения боевой версии ---------- */
.cat__note { margin-top: 48px; font-size: 14px; color: var(--muted); max-width: 720px; }
.field__hint { font-size: 13px; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer button.linklike { min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.footer a, .footer button.linklike { color: rgba(245, 238, 226, .85); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; padding: 12px 16px; background: var(--cream); color: var(--ink); }
.skip:focus { left: 8px; }
.noscript { padding: 16px var(--pad); background: var(--cream); }

/* юридические страницы */
.legal { padding: 48px 0 80px; }
.legal .text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; overflow-wrap: break-word; hyphens: auto; }
.legal h1 { font-size: clamp(26px, 6.6vw, 52px); font-weight: 600; text-transform: uppercase; line-height: 1; margin-bottom: 8px; }
.legal h2 { font-size: 22px; font-weight: 600; margin-top: 24px; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal .meta { color: var(--muted); font-size: 14px; }
.legal a { color: var(--wine); }
