/* =========================================================
   ARINNEA — design system & base styles
   Pure CSS, no build step. Tokens first, then base, then
   components, then page sections. Media queries at the end.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* colour */
  --c-bg: #F3F0E9;          /* warm ivory — page background          */
  --c-surface: #E9E3DA;     /* soft sand  — alternate light sections */
  --c-greige: #CFC4B8;      /* warm greige — neutral surface         */
  --c-taupe: #9B8F82;       /* muted taupe — supporting accent       */
  --c-text: #242321;        /* deep charcoal — text & dark sections  */
  --c-text-2: #6D6963;      /* warm gray — secondary text            */
  --c-light: #F7F5F0;       /* soft white — text on dark             */
  --c-line: #D8D2C8;        /* stone line — hairlines                */
  --c-dark: #242321;
  --c-dark-2: #2C2A27;      /* surface on dark                       */
  --c-line-dark: rgba(247, 245, 240, .14);
  --c-error: #A9463C;
  --c-success: #4F6B4E;

  /* type */
  --ff: "Inter", "Helvetica Neue", Arial, sans-serif;
  --ff-serif: "Tinos", "Times New Roman", Times, serif;
  --fs-h1: clamp(2.5rem, 1.1rem + 4.4vw, 4.875rem);     /* 40 → 78 */
  --fs-h2: clamp(2rem, 1.1rem + 3.1vw, 3.75rem);         /* 32 → 60 */
  --fs-h3: clamp(1.5rem, 1.2rem + 1vw, 2.125rem);        /* 24 → 34 */
  --fs-lead: clamp(1.125rem, 1rem + .5vw, 1.4375rem);    /* 18 → 23 */
  --fs-body: 1.0625rem;                                  /* 17 */
  --fs-small: .875rem;                                   /* 14 */
  --fs-micro: .75rem;                                    /* 12 */
  --lh-tight: 1.05;
  --lh-heading: 1.12;
  --lh-body: 1.6;
  --ls-heading: -0.022em;
  --ls-label: 0.14em;

  /* layout */
  --container: 1400px;
  --gutter: clamp(20px, 2.2vw + 12px, 72px);
  --grid-gap: clamp(16px, 2vw, 32px);
  --sect: clamp(72px, 6vw + 40px, 168px);   /* between big sections */
  --sect-sm: clamp(48px, 4vw + 24px, 96px);
  --header-h: 84px;

  /* spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px;
  --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-24: 96px; --s-32: 128px;

  /* shape & motion */
  --r-sm: 2px;
  --r-md: 4px;
  --t-fast: 320ms;
  --t-base: 480ms;
  --t-slow: 900ms;
  --ease: cubic-bezier(.45, .05, .25, 1);      /* hovers: accelerate, then settle */
  --ease-out: cubic-bezier(.16, 1, .3, 1);     /* small nudges (arrows) */
  --ease-reveal: cubic-bezier(.33, .02, .18, 1); /* content entrances */
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "ss01" 0, "cv11" 1;   /* Inter: single-storey a off, alt l */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
::selection { background: var(--c-greige); color: var(--c-text); }
:focus-visible { outline: 2px solid var(--c-text); outline-offset: 3px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--c-light); }
/* контейнеры, которым фокус ставит скрипт (попап, лайтбокс, блок «спасибо»),
   рамку фокуса не рисуют — Safari показывал её как чёрную обводку вокруг карточки */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible,
dialog:focus, dialog:focus-visible { outline: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 3. Typography ---------- */
.h1, .h2, .h3 { font-weight: 400; letter-spacing: var(--ls-heading); text-wrap: balance; }
.h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); }
.h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.012em; }
.lead { font-size: var(--fs-lead); line-height: 1.45; letter-spacing: -0.005em; }
.small { font-size: var(--fs-small); }
.muted { color: var(--c-text-2); }
.on-dark .muted { color: var(--c-greige); }
.label {
  display: inline-block;
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-text-2);
}
.on-dark .label { color: var(--c-greige); }
.tagline { font-family: var(--ff-serif); font-style: italic; letter-spacing: .02em; }
.measure { max-width: 60ch; }
.measure-sm { max-width: 44ch; }
.prose > * + * { margin-top: 1.1em; }
.prose p { text-wrap: pretty; }

/* ---------- 4. Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--grid-gap); }
.sect { padding-block: var(--sect); }
/* two sections of the same colour shouldn't stack their paddings —
   without a colour change the doubled gap reads as a hole */
.sect:not(.on-surface):not(.on-dark) + .sect:not(.on-surface):not(.on-dark),
.sect.on-surface + .sect.on-surface,
.sect.on-dark + .sect.on-dark { padding-top: 0; }
.sect-top { padding-top: var(--sect); }
.sect-bottom { padding-bottom: var(--sect); }
.sect-sm { padding-block: var(--sect-sm); }
.on-dark { background: var(--c-dark); color: var(--c-light); }
.on-surface { background: var(--c-surface); }
.sect--line { border-top: 1px solid var(--c-line); }
.sect-index {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: clamp(28px, 4vw, 56px);
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--c-text-2);
}
.sect-index span:first-child::after { content: ""; display: inline-block; width: 40px; height: 1px; background: currentColor; margin-left: 14px; vertical-align: middle; opacity: .5; }
.on-dark .sect-index { color: var(--c-greige); }
.space__grid .sect-index, .approach__grid .sect-index, .about__grid .sect-index, .cta__grid .sect-index { grid-column: 1 / -1; margin-bottom: 0; }
.sect-head { margin-bottom: clamp(32px, 4vw, 64px); }
.sect-head .lead { margin-top: var(--s-6); }
.sect-head--split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: start; }
.sect-head--split > .h2 { grid-column: 1 / 7; }
.sect-head--split > .lead { grid-column: 7 / 12; margin-top: .35em; }
.sect-head--split > .link-arrow { grid-column: 1 / -1; margin-top: var(--s-4); }
.hr { border: 0; border-top: 1px solid var(--c-line); margin: 0; }
.on-dark .hr { border-color: var(--c-line-dark); }

/* image frames: fixed ratios reserve space (no CLS) */
.frame { position: relative; overflow: hidden; background: var(--c-greige); border-radius: var(--r-sm); }
.frame > img, .frame > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame--3x2 { aspect-ratio: 3 / 2; }
.frame--4x3 { aspect-ratio: 4 / 3; }
.frame--4x5 { aspect-ratio: 4 / 5; }
.frame--1x1 { aspect-ratio: 1; }
.frame--wide { aspect-ratio: 21 / 9; }
.frame--arch { border-radius: 999px 999px var(--r-sm) var(--r-sm); }   /* brand arch motif */
.frame--fill { position: absolute; inset: 0; }
.frame-hover { --scale: 1; }
.frame-hover > img { transition: transform var(--t-slow) var(--ease); }
@media (hover: hover) { .frame-hover:hover > img, a:hover .frame-hover > img { transform: scale(1.05); } }

/* ---------- 5. Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px;
  border: 1px solid var(--c-text); border-radius: var(--r-md);
  background: var(--c-text); color: var(--c-light);
  font-size: 15px; font-weight: 500; letter-spacing: .01em; line-height: 1;
  white-space: nowrap;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.btn:hover { background: #3A3835; border-color: #3A3835; }
.btn:active { background: #1A1917; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn--secondary { background: transparent; color: var(--c-text); }
.btn--secondary:hover { background: var(--c-text); color: var(--c-light); }
.btn--light { background: var(--c-light); border-color: var(--c-light); color: var(--c-text); }
.btn--light:hover { background: #E4DED4; border-color: #E4DED4; }
.btn--outline-light { background: transparent; border-color: rgba(247,245,240,.5); color: var(--c-light); }
.btn--outline-light:hover { background: var(--c-light); border-color: var(--c-light); color: var(--c-text); }
.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn .arrow { transition: transform var(--t-base) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; letter-spacing: .005em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.link-arrow .arrow { flex: none; transition: transform var(--t-base) var(--ease-out); }
.link-arrow:hover { border-color: currentColor; }
.link-arrow:hover .arrow { transform: translateX(5px); }
.arrow { width: 18px; height: 18px; }
.link-u { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; text-decoration-color: var(--c-greige); transition: text-decoration-color var(--t-base) var(--ease); }
.link-u:hover { text-decoration-color: currentColor; }

/* ---------- 6. Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
  transition: border-color var(--t-base) var(--ease), background var(--t-base), color var(--t-base);
}
main { padding-top: var(--header-h); }
/* overlay variant: transparent over a full-bleed hero, becomes solid on scroll */
.header--overlay + .menu + main, .has-hero-full main { padding-top: 0; }
.header--overlay:not(.is-scrolled) {
  background: transparent; border-color: transparent; color: var(--c-light);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.header--overlay:not(.is-scrolled) .btn--secondary { border-color: rgba(247,245,240,.55); color: var(--c-light); }
.header--overlay:not(.is-scrolled) .btn--secondary:hover { background: var(--c-light); color: var(--c-text); border-color: var(--c-light); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); height: var(--header-h); }
.header__logo { display: flex; align-items: center; gap: 14px; }
.header__logo svg { display: block; }
.header__mark { width: 27px; height: 34px; }
.header__word { width: 112px; height: 12.7px; }
.nav { align-self: stretch; display: flex; align-items: stretch; gap: clamp(20px, 2.4vw, 40px); }
.nav a {
  position: relative; display: flex; align-items: center; padding: 0;
  font-size: 14px; font-weight: 500; letter-spacing: .02em;
  transition: opacity var(--t-base) var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.header__cta { display: inline-flex; }
.burger { display: none; width: 44px; height: 44px; margin-right: -10px; align-items: center; justify-content: center; }
.burger span { position: relative; display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease); }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform var(--t-base) var(--ease), top var(--t-base) var(--ease); }
.burger span::before { top: -7px; } .burger span::after { top: 7px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* mobile menu panel */
.menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
  /* dvh: мобильные панели браузера не должны срезать низ меню */
  height: calc(100dvh - var(--header-h));
  background: var(--c-bg);
  padding: var(--s-8) var(--gutter) calc(var(--s-12) + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-12);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s linear var(--t-base);
  overflow-y: auto;
}
.menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.menu__list a { display: block; padding: 14px 0; font-size: 26px; letter-spacing: -0.015em; border-bottom: 1px solid var(--c-line); }
.menu__list a[aria-current="page"] { color: var(--c-text-2); }
.menu__foot { display: grid; gap: var(--s-4); }
.menu__contacts { display: grid; gap: 6px; font-size: 15px; }

/* ---------- 7. Breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--c-text-2); }
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--c-greige); }
.crumbs a:hover { color: var(--c-text); }
.crumbs [aria-current] { color: var(--c-text); }

/* ---------- 8. Cards (product / project / article) ---------- */
.card { display: block; }
.card__body { padding-top: var(--s-4); }
.card__title { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; font-weight: 500; margin-top: 6px; }
.card__meta { font-size: var(--fs-small); color: var(--c-text-2); }
.card__meta + .card__meta { margin-top: 2px; }
.card .link-arrow { margin-top: var(--s-3); }
.card:hover .link-arrow { border-color: currentColor; }
.card:hover .link-arrow .arrow { transform: translateX(5px); }

/* editorial product card — one large split block */
.product-feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--s-8); align-items: center; }
.product-feature__media { grid-column: 1 / 8; }
.product-feature__body { grid-column: 9 / 13; }
.product-feature__title { margin-top: var(--s-4); }
.product-feature__price { margin-top: var(--s-6); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.product-feature__price small { display: block; font-size: var(--fs-small); font-weight: 400; color: var(--c-text-2); margin-top: 4px; }
.product-feature .prose { margin-top: var(--s-6); }
.product-feature .link-arrow, .product-feature .btn { margin-top: var(--s-8); }

.swatches { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.swatches img { width: 44px; height: 44px; border-radius: var(--r-sm); }
.swatches__note { margin-left: 10px; font-size: 13px; color: var(--c-text-2); }

/* ---------- 9. Forms ---------- */
.form { display: grid; gap: var(--s-6); }
.form__row { display: grid; gap: var(--s-6); grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 8px; }
.field__label { font-size: .9375rem; color: var(--c-text-2); }
.on-dark .field__label { color: var(--c-greige); }
.field__label .opt { opacity: .6; }
.field__input {
  width: 100%; min-height: 58px; padding: 14px 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--c-greige);
  border-radius: 0; color: inherit; font-size: 1.25rem; line-height: 1.35;
  transition: border-color var(--t-base) var(--ease);
}
.field__input::placeholder { color: var(--c-taupe); opacity: 1; }
.field__input:hover { border-bottom-color: var(--c-taupe); }
/* a filled field keeps the bright underline, same as focus */
.field__input:focus, .field__input.is-filled { outline: none; border-bottom-color: var(--c-text); }
.on-dark .field__input { border-bottom-color: rgba(247,245,240,.28); }
.on-dark .field__input:hover { border-bottom-color: rgba(247,245,240,.5); }
.on-dark .field__input:focus, .on-dark .field__input.is-filled { border-bottom-color: var(--c-light); }
.on-dark .field__input::placeholder { color: rgba(247,245,240,.4); }
textarea.field__input { resize: vertical; min-height: 52px; }
.field.is-error .field__input { border-bottom-color: var(--c-error); }
.field__error { display: none; font-size: 13px; color: var(--c-error); }
.on-dark .field__error { color: #D99A92; }
.field.is-error .field__error { display: block; }
.field__input:disabled { opacity: .45; }
/* button stretches across the whole field grid, the note sits under it */
.form__actions { display: grid; gap: var(--s-4); margin-top: var(--s-2); }
.form__actions > .btn { width: 100%; }
.form__note { text-align: left; }
.form__note { font-size: 13px; line-height: 1.5; color: var(--c-text-2); text-wrap: pretty; }
.on-dark .form__note { color: var(--c-greige); }
.form__success {
  display: none; padding: var(--s-8) 0; border-top: 1px solid var(--c-line);
}
.on-dark .form__success { border-color: var(--c-line-dark); }
.form.is-sent .form__fields, .form.is-sent .form__actions { display: none; }
.form.is-sent .form__success { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- 10. FAQ (native details) ---------- */
.faq { border-top: 1px solid var(--c-line); }
.faq__item { border-bottom: 1px solid var(--c-line); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6);
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 1.125rem; font-weight: 500; letter-spacing: -0.005em;
  transition: color var(--t-base) var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--c-text-2); }
.faq__icon { flex: none; width: 20px; height: 20px; position: relative; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: currentColor; transition: transform var(--t-base) var(--ease); }
.faq__icon::before { left: 0; right: 0; top: 50%; height: 1px; }
.faq__icon::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.faq__item[open] .faq__icon::after { transform: rotate(90deg); }
/* the answer slides open: the row animates its own height */
.faq__item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size var(--t-base) var(--ease), content-visibility var(--t-base) allow-discrete;
  transition-behavior: allow-discrete;
}
.faq__item[open]::details-content { block-size: auto; }
@supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } }
/* когда высоту ведёт JS, собственный переход контента только мешает */
.js-faq .faq__item::details-content { transition: none; }
/* где высоту анимирует JS — ответ просто проявляется */
.faq__a { padding: 0 0 26px; max-width: 64ch; color: var(--c-text-2); animation: faq-in var(--t-base) var(--ease) both; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq__a > * + * { margin-top: .8em; }
.faq__a strong { color: var(--c-text); font-weight: 500; }

/* ---------- 11. Tables ---------- */
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { padding: 16px 0; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; font-weight: 400; }
.spec th { color: var(--c-text-2); width: 44%; padding-right: var(--s-6); }
.spec tr:first-child th, .spec tr:first-child td { border-top: 1px solid var(--c-line); }

/* ---------- 12. Dialog (policy / legal / request) ----------
   Modal: above everything, page blurred behind. Panel carries the brand's
   offset line frame; it zooms in from its own centre. */
.dialog {
  width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: clamp(20px, 4vh, 64px) var(--gutter);
  border: 0; background: transparent;
  overflow-y: auto; overscroll-behavior: contain;
  display: none;
}
.dialog[open] { display: grid; justify-items: center; align-content: safe center; }
.dialog::backdrop {
  background: rgba(36, 35, 33, .62);
  -webkit-backdrop-filter: blur(14px) saturate(.9);
  backdrop-filter: blur(14px) saturate(.9);
}
.dialog__frame {
  position: relative;
  width: min(780px, 100%);
  padding: 0 0 20px 20px;                      /* room for the offset line */
  animation: dialog-zoom var(--t-base) var(--ease-out) both;
}
.dialog__frame::before {
  content: ""; position: absolute; z-index: -1;
  top: 20px; left: 0; right: 20px; bottom: 0;
  border: 1px solid rgba(247, 245, 240, .55);
  pointer-events: none;
}
.dialog__inner {
  position: relative;
  padding: clamp(28px, 4vw, 56px);
  background: var(--c-bg); color: var(--c-text);
}
.dialog--sm .dialog__frame { width: min(560px, 100%); }
.dialog__inner > * + * { margin-top: 1em; }
.dialog__inner h2 { margin-bottom: .6em; }
.dialog__inner h3 { font-size: 1.125rem; font-weight: 500; margin-top: 1.6em; }
.dialog__close {
  position: fixed; top: 24px; right: 24px; z-index: 2;
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 50%; background: var(--c-bg); color: var(--c-text);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.dialog__close svg { width: 20px; height: 20px; }
.dialog__close:hover { background: var(--c-text); color: var(--c-light); transform: rotate(90deg); }
@keyframes dialog-zoom { from { transform: scale(.9); } to { transform: none; } }
@media (max-width: 900px) {
  .dialog__frame { padding: 0 0 14px 14px; }
  .dialog__frame::before { top: 14px; right: 14px; }
  /* крестик прижат к правому краю самой карточки, а не к краю экрана */
  .dialog__close {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(var(--gutter) + 10px);
    width: 44px; height: 44px;
    box-shadow: 0 0 0 1px var(--c-line);
  }
}

/* ---------- 13. Reveal animations (Fulgor-style: 1s, long travel, stagger) ---------- */
:root { --reveal-dur: 1.6s; --reveal-travel: 130px; --reveal-stagger: 200ms; }

[data-animate] { opacity: 0; }
[data-animate].is-in { animation: fadeUp var(--reveal-dur) var(--ease-reveal) both; animation-delay: var(--delay, 0ms); }
[data-animate="fade"].is-in  { animation-name: fadeOnly; }
[data-animate="left"].is-in  { animation-name: fadeLeft; }
[data-animate="right"].is-in { animation-name: fadeRight; }
[data-animate="down"].is-in  { animation-name: fadeDown; }
[data-animate="scale"].is-in { animation-name: zoomIn; }

[data-animate-children] > * { opacity: 0; }
[data-animate-children].is-in > * { animation: fadeUp var(--reveal-dur) var(--ease-reveal) both; }
[data-animate-children].is-in > :nth-child(1) { animation-delay: 0ms; }
[data-animate-children].is-in > :nth-child(2) { animation-delay: calc(var(--reveal-stagger) * 1); }
[data-animate-children].is-in > :nth-child(3) { animation-delay: calc(var(--reveal-stagger) * 2); }
[data-animate-children].is-in > :nth-child(4) { animation-delay: calc(var(--reveal-stagger) * 3); }
[data-animate-children].is-in > :nth-child(5) { animation-delay: calc(var(--reveal-stagger) * 4); }
[data-animate-children].is-in > :nth-child(6) { animation-delay: calc(var(--reveal-stagger) * 5); }
[data-animate-children].is-in > :nth-child(7) { animation-delay: calc(var(--reveal-stagger) * 6); }

@keyframes fadeUp    { from { opacity: 0; transform: translate3d(0, var(--reveal-travel), 0); } to { opacity: 1; transform: none; } }
@keyframes fadeOnly  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeLeft  { from { opacity: 0; transform: translate3d(calc(var(--reveal-travel) * -1), 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeRight { from { opacity: 0; transform: translate3d(var(--reveal-travel), 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeDown  { from { opacity: 0; transform: translate3d(0, calc(var(--reveal-travel) * -1), 0); } to { opacity: 1; transform: none; } }
@keyframes zoomIn    { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

.no-js [data-animate], .no-js [data-animate-children] > * { opacity: 1; animation: none; }
@media (prefers-reduced-motion: reduce) {
  [data-animate], [data-animate-children] > * { opacity: 1 !important; animation: none !important; }
}

/* ---------- 14. Footer ---------- */
.footer { background: var(--c-dark); color: var(--c-light); padding: var(--sect-sm) 0 var(--s-8); border-top: 1px solid var(--c-line-dark); }
.footer__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--s-12); padding-bottom: var(--s-12); border-bottom: 1px solid var(--c-line-dark); }
.footer__brand { grid-column: 1 / 5; }
.footer__brand svg { width: 190px; height: auto; }
.footer__brand .tagline { margin-top: var(--s-4); color: var(--c-greige); font-size: 1.0625rem; }
.footer__col--menu { grid-column: 6 / 10; }
.footer__col--contacts { grid-column: 10 / 13; }
/* ссылки меню — в две колонки под одним заголовком */
.footer__menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap); }
.footer__col .label { display: block; margin-bottom: var(--s-4); color: var(--c-taupe); }
.footer__col li { font-size: 15px; }
.footer__col li + li { margin-top: 10px; }
.footer__col li .footer__ig { line-height: 1.27; }
.footer a, .footer button { transition: color var(--t-base) var(--ease), opacity var(--t-base) var(--ease), text-decoration-color var(--t-base) var(--ease); }
.footer__col a { font-size: 15px; }
.footer__col a:hover { opacity: .6; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-8); padding-top: var(--s-6); font-size: 13px; color: var(--c-taupe); }
.footer__bottom a:hover { color: var(--c-light); }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); }
.footer__legal button { font-size: inherit; color: inherit; }
.footer__legal button:hover { color: var(--c-light); }

/* =========================================================
   PAGE SECTIONS
   ========================================================= */

/* ---------- Home hero: full-bleed image, header overlays it ---------- */
.hero-full {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: var(--hero-min, 100svh); color: var(--c-light);
  background: var(--c-dark); overflow: hidden;
}
.hero-full__media { position: absolute; inset: 0; }
.hero-full__media img { width: 100%; height: 100%; object-fit: cover; }
.hero-full__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(36,35,33,.42) 0%, rgba(36,35,33,0) 28%),
    linear-gradient(to top, rgba(36,35,33,.78) 0%, rgba(36,35,33,.35) 45%, rgba(36,35,33,0) 75%);
}
.hero-full__content {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap);
  align-items: end; padding-top: calc(var(--header-h) + 48px); padding-bottom: clamp(48px, 7vh, 96px);
}
.hero-full__title { grid-column: 1 / 9; max-width: 20ch; }
.hero-full__aside { grid-column: 9 / 13; padding-bottom: 8px; }
.hero-full__aside .lead { color: var(--c-greige); max-width: 32ch; }
.hero-full__aside .btn { margin-top: var(--s-6); }
.hero-full__caption {
  position: absolute; right: var(--gutter); top: calc(var(--header-h) + 24px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: rgba(247,245,240,.75);
}

/* ---------- Material / space (dark editorial) ---------- */
.space__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--s-12); }
.space__title { grid-column: 1 / 6; }
.space__text { grid-column: 7 / 12; }
.space__text .prose { color: var(--c-greige); font-size: var(--fs-lead); line-height: 1.5; }
.space__media { grid-column: 1 / 13; margin-top: var(--s-8); }
.space__media .frame { aspect-ratio: 21 / 9; }

/* ---------- Projects ---------- */
.projects__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) var(--grid-gap); }
.projects__grid .card .frame { aspect-ratio: 3 / 2; }
.projects__more { margin-top: clamp(40px, 5vw, 72px); }

/* ---------- Approach (numbered principles) ---------- */
.approach__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--s-12); }
.approach__intro { grid-column: 1 / 6; }
.approach__intro .lead { margin-top: var(--s-6); color: var(--c-text-2); }
.approach__list { grid-column: 7 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12) var(--grid-gap); }
.principle { padding-top: var(--s-4); border-top: 1px solid var(--c-line); }
.principle__num { font-size: 1.75rem; line-height: 1; letter-spacing: -0.02em; color: var(--c-taupe); }
.principle__title { margin-top: var(--s-4); font-size: 1.375rem; font-weight: 500; letter-spacing: -0.01em; }
.principle__text { margin-top: var(--s-3); color: var(--c-text-2); }

/* ---------- Articles ---------- */
.articles__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-12) var(--grid-gap); }
.article-card .frame { aspect-ratio: 4 / 3; }
.article-card { position: relative; }
.article-card__num { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 8px; border-radius: var(--r-sm); background: var(--c-bg); font-size: 12px; font-weight: 500; letter-spacing: .08em; }
.article-card__cat { margin-bottom: 2px; }

/* ---------- About (brand) ---------- */
.about__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--s-12); align-items: center; }
.about__media { grid-column: 1 / 5; }
.about__media .frame { aspect-ratio: 4 / 5; }
.about__body { grid-column: 6 / 12; }
.about__body .h2 { margin-bottom: var(--s-8); }
.about__body .prose { font-size: var(--fs-lead); line-height: 1.5; }
.about__body .prose p + p { color: var(--c-text-2); font-size: var(--fs-body); }
.about__body .link-arrow { margin-top: var(--s-8); }

/* ---------- CTA (form) ---------- */
.cta__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--s-12); }
.cta__text { grid-column: 1 / 6; }
.cta__text .lead { margin-top: var(--s-6); color: var(--c-greige); }
.cta__text .wa { margin-top: var(--s-8); }
.cta__form { grid-column: 7 / 13; }

/* WhatsApp text link with mark */
.wa { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; transition: opacity var(--t-base) var(--ease); }
.wa svg { width: 20px; height: 20px; }
.wa:hover { opacity: .7; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: clamp(28px, 4vw, 56px); }
.page-hero .crumbs { margin-bottom: clamp(28px, 4vw, 56px); }
.page-hero .h1 { max-width: 16ch; }
.page-hero .lead { margin-top: var(--s-6); max-width: 46ch; color: var(--c-text-2); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .product-feature__media { grid-column: 1 / 8; }
  .product-feature__body { grid-column: 8 / 13; }
  .approach__intro { grid-column: 1 / 13; }
  .approach__list { grid-column: 1 / 13; }
  .about__media { grid-column: 1 / 6; }
  .about__body { grid-column: 7 / 13; }
  /* строки заданы явно — колонки не разъезжаются по разным рядам */
  .footer__brand { grid-column: 1 / 13; grid-row: 1; }
  .footer__col--menu { grid-column: 1 / 7; grid-row: 2; }
  .footer__col--contacts { grid-column: 8 / 13; grid-row: 2; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .nav, .header__actions { display: none; }
  .burger { display: inline-flex; }
  .hero-full__content { grid-template-columns: 1fr; row-gap: var(--s-8); padding-top: calc(var(--header-h) + 96px); }
  .hero-full__title, .hero-full__aside { grid-column: 1; max-width: none; }
  .hero-full__caption { top: auto; bottom: 16px; right: auto; left: var(--gutter); align-items: flex-start; display: none; }
  .sect-head--split > .h2, .sect-head--split > .lead { grid-column: 1 / -1; }
  .sect-head--split > .lead { margin-top: var(--s-4); }
  .product-feature__media, .product-feature__body { grid-column: 1 / 13; }
  .space__title, .space__text { grid-column: 1 / 13; }
  .space__media .frame { aspect-ratio: 4 / 3; }
  .projects__grid { grid-template-columns: 1fr; }
  .articles__grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .article-card { display: grid; grid-template-columns: 38% 1fr; gap: var(--s-4); align-items: start; }
  .article-card .card__body { padding-top: 0; }
  .about__media, .about__body { grid-column: 1 / 13; }
  .about__media { max-width: 70%; }
  .cta__text, .cta__form { grid-column: 1 / 13; }
  .form__row { grid-template-columns: 1fr; }
  .approach__list { grid-template-columns: 1fr; gap: var(--s-8); }
  .footer__col--menu { grid-column: 1 / 13; grid-row: 2; }
  .footer__col--contacts { grid-column: 1 / 13; grid-row: 3; }
}

@media (max-width: 560px) {
  .btn { width: 100%; }
  .btn--sm { width: auto; }
  .article-card { grid-template-columns: 1fr; }
  .swatches img { width: 36px; height: 36px; }
  .swatches__note { display: none; }
  .article-card .card__body { padding-top: var(--s-3); }
  .about__media { max-width: 85%; }
  .spec th { width: 50%; }
  .menu__list a { padding: 12px 0; font-size: 22px; }
}
