/* Галерея концепций /refer/ — нейтральная кейс-страница. Шрифты: Geologica (текст, заголовки), Cormorant Garamond (курсивные акценты). */
:root {
  --bg: #F1EFEA;
  --ink: #121212;
  --ink-2: #3A3834;
  --muted: #6B675F;
  --line: #D6D2CA;
  --dark-text: #EDEAE4;
  --dark-muted: #A9A49B;
  --dark-line: rgba(237, 234, 228, .16);
  --sans: 'Geologica', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --pad: clamp(16px, 3.9vw, 56px);
  --top-h: 60px;
  --ease: cubic-bezier(.2, .7, .15, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
b { font-weight: 500; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
[id] { scroll-margin-top: calc(var(--top-h) + 16px); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nw { white-space: nowrap; }
.wrap { max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--bg); text-decoration: none; }
.skip:focus { left: 16px; }

.eyebrow, .label {
  font-size: 11.5px; line-height: 1.3; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* ——— шапка ——— */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(241, 239, 234, .94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) { .top { background: rgba(241, 239, 234, .82); backdrop-filter: saturate(1.4) blur(14px); } }
.top__in {
  max-width: 1440px; margin: 0 auto; padding-inline: var(--pad);
  height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.top__mark { font-size: 15px; font-weight: 500; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.top__mark i { font: italic 400 19px/1 var(--serif); color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.top__nav { display: flex; gap: clamp(16px, 2.6vw, 36px); font-size: 14px; }
.top__nav a { text-decoration: none; white-space: nowrap; padding-block: 8px; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 4px) / 0 1px no-repeat; transition: background-size .4s var(--ease); }
.top__nav a:hover { background-size: 100% 1px; }
.top__nav span { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }

/* ——— первый экран ——— */
.hero { padding-block: clamp(32px, 3.6vw, 52px) clamp(40px, 5vw, 80px); }
.hero .eyebrow { margin-bottom: clamp(20px, 2.4vw, 32px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px 56px; align-items: end; }
.hero__title {
  font-weight: 400; font-size: clamp(36px, 6vw, 88px); line-height: .98; letter-spacing: -.045em;
  text-wrap: balance;
}
.hero__title em { font: italic 400 1.14em/.8 var(--serif); letter-spacing: -.02em; }
.hero__lead { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; color: var(--ink-2); max-width: 28em; padding-bottom: .4em; }

.strip { display: grid; grid-template-columns: 1fr 1fr; gap: 24px clamp(24px, 3.4vw, 56px); margin-top: clamp(36px, 3.8vw, 52px); }
.strip__label { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--ink); font-size: 13px; color: var(--muted); }
.strip__label b { color: var(--ink); letter-spacing: .02em; }
.strip__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 24px); margin-top: clamp(16px, 1.6vw, 22px); }
.strip__item { container-type: inline-size; }
.strip__link { display: block; text-decoration: none; }
.strip__link:focus-visible { outline-offset: 6px; }
.strip__cap { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; font-size: 14px; line-height: 1.25; }
.strip__n { font: italic 400 22px/1 var(--serif); color: var(--muted); }
.strip__name { border-bottom: 1px solid transparent; transition: border-color .3s; }
.strip__link:hover .strip__name { border-color: currentColor; }

/* подборка одной марки (/refer/shoes/, /refer/cosmetics/): одна группа на всю ширину */
.strip--one { grid-template-columns: minmax(0, 1fr); }
.strip__ph { display: block; container-type: inline-size; width: 100%; max-width: 184px; }
.strip__tag, .strip__go { display: none; }
.strip--one .strip__cap { flex-wrap: wrap; }
.strip--one .strip__tag { display: block; flex-basis: 100%; font: italic 400 18px/1.2 var(--serif); color: var(--ink-2); }

/* ——— устройства ——— */
.phone { display: block; background: #0B0B0C; box-shadow: inset 0 0 0 1px #2C2C2E; }
.phone__screen { display: block; aspect-ratio: 390 / 844; overflow: hidden; background: #fff; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone--strip {
  width: 100%; max-width: 184px; padding: 3.4cqi; border-radius: 15cqi;
  box-shadow: inset 0 0 0 1px #2C2C2E, 0 18px 30px -18px rgba(18, 18, 18, .45);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.phone--strip .phone__screen { border-radius: 11.6cqi; }
.strip__link:hover .phone--strip { transform: translateY(-8px); box-shadow: inset 0 0 0 1px #2C2C2E, 0 30px 40px -22px rgba(18, 18, 18, .5); }

/* ——— бренды ——— */
.brand { padding-top: clamp(56px, 6.4vw, 96px); }
.brand__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 56px; align-items: end; padding-bottom: clamp(28px, 3.4vw, 48px); border-bottom: 1px solid var(--ink); }
.brand__head .eyebrow { grid-column: 1 / -1; }
/* имя бренда — его логотип (tools/build.mjs вставляет shared/brand/*.svg вместо <!--brand:…-->, имя читается из aria-label);
   высота букв у двух знаков одна: S☉LORO LAB — во всю строку, RIOFIORE (буквы — 0,64 высоты знака) — на 62 %, строго ЧБ */
.brand__name { grid-column: 1 / -1; line-height: 0; }
.brand__name svg { display: block; width: 100%; height: auto; }
.brand__name--rio svg { width: 62%; color: #000; }
.brand__lead { grid-column: 2; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; color: var(--ink-2); }

/* ——— концепция ——— */
.case { padding-block: clamp(44px, 5.6vw, 88px); }
.case + .case { border-top: 1px solid var(--line); }
.case__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: end; gap: 16px clamp(16px, 2.6vw, 40px); margin-bottom: clamp(20px, 2.4vw, 32px); }
.case__num { font: italic 400 clamp(60px, 7.4vw, 120px)/.72 var(--serif); letter-spacing: -.04em; }
.case__brand { margin-bottom: 10px; font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.case__name { font-weight: 400; font-size: clamp(30px, 4vw, 58px); line-height: 1; letter-spacing: -.04em; }
.case__ref { font-size: 14px; color: var(--muted); padding-bottom: 14px; text-align: right; }
.case__ref b { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 52px; padding: 0 26px 0 28px; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none;
  font-size: 15px; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
  transition: background-color .3s, color .3s;
}
.btn__arrow { display: inline-block; transition: transform .45s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }
.btn:hover { background: #2B2A27; }
.btn:focus-visible { outline-color: var(--ink); }

.stage {
  position: relative; isolation: isolate; display: block; overflow: hidden;
  background: var(--stage, #E4DFD5); border-radius: 6px;
  padding: 5.4% 0 4.6%;
  container-type: inline-size; text-decoration: none;
}
.devices { position: relative; }
.laptop { position: relative; width: 64cqi; margin-left: 12cqi; transition: transform .8s var(--ease); }
.laptop__lid { background: #0B0B0C; padding: 1.1cqi 1.1cqi 1.5cqi; border-radius: 1.4cqi 1.4cqi .5cqi .5cqi; box-shadow: inset 0 0 0 .12cqi #2E2E31; }
.laptop__screen { aspect-ratio: 16 / 10; overflow: hidden; background: #fff; border-radius: .2cqi; }
.laptop__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.laptop__base {
  position: relative; height: 1.25cqi; margin: 0 -5.6cqi;
  background: linear-gradient(180deg, #F4F4F5 0%, #CFCFD3 40%, #9A9AA0 100%);
  border-radius: .25cqi .25cqi 3cqi 3cqi / .25cqi .25cqi 1.25cqi 1.25cqi;
}
.laptop__base::before { content: ''; position: absolute; left: 50%; top: 0; width: 11cqi; height: .5cqi; transform: translateX(-50%); background: #B4B4BA; border-radius: 0 0 .8cqi .8cqi; }
.laptop::after {
  content: ''; position: absolute; z-index: -1; left: -4cqi; right: -4cqi; bottom: -1.8cqi; height: 3cqi;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .34), rgba(0, 0, 0, 0));
}
.stage .phone {
  position: absolute; left: 70.5cqi; bottom: -.2cqi; width: 16.4cqi;
  padding: .62cqi; border-radius: 2.7cqi;
  box-shadow: inset 0 0 0 .12cqi #2E2E31, 0 2.4cqi 3.6cqi -1.6cqi rgba(0, 0, 0, .5);
  transition: transform .8s var(--ease);
}
.stage .phone__screen { border-radius: 2.1cqi; }
.case--dark .laptop__lid, .case--dark .stage .phone { box-shadow: inset 0 0 0 .12cqi #3A3A3E, 0 0 0 .1cqi rgba(255, 255, 255, .08); }
.case--dark .laptop::after { background: radial-gradient(closest-side, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0)); }
.stage:hover .laptop { transform: translateY(-.5cqi); }
.stage:hover .phone { transform: translateY(-1.4cqi); }
.stage__cue {
  position: absolute; top: 2.2cqi; right: 2.2cqi;
  padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink);
  font-size: 13px; font-weight: 500; letter-spacing: .01em;
  opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .5s var(--ease);
}
.stage:hover .stage__cue { opacity: 1; transform: none; }

.case__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 36px clamp(24px, 3.6vw, 64px); margin-top: clamp(28px, 3.4vw, 48px); }
.case__tagline { font: italic 400 clamp(26px, 2.5vw, 36px)/1.08 var(--serif); letter-spacing: -.01em; margin-bottom: 18px; }
.case__text { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 34em; }
.case__features .label { margin-bottom: 12px; }
.feats { counter-reset: f; }
.feats li { counter-increment: f; position: relative; padding: 11px 0 12px 32px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.feats li:last-child { border-bottom: 1px solid var(--line); }
.feats li::before { content: counter(f, decimal-leading-zero); position: absolute; left: 0; top: 11px; font-size: 11.5px; line-height: 21px; color: var(--muted); font-variant-numeric: tabular-nums; }
.feats b { color: var(--ink); }
.case__system { display: grid; gap: 26px; align-content: start; }
.case__system .label { margin-bottom: 10px; }
.case__system dd { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches li { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(18, 18, 18, .14); }

/* ——— что внутри ——— */
.inside { margin-top: clamp(56px, 7vw, 112px); padding-block: clamp(72px, 9vw, 136px) clamp(48px, 6vw, 88px); background: var(--ink); color: var(--dark-text); }
.inside .eyebrow { color: var(--dark-muted); grid-column: 1 / -1; }
.inside__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 56px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.inside__title { font-weight: 400; font-size: clamp(38px, 6vw, 88px); line-height: .98; letter-spacing: -.045em; }
.inside__title em { font: italic 400 1.14em/.8 var(--serif); letter-spacing: -.02em; }
.inside__lead { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; color: var(--dark-muted); padding-bottom: .4em; }
.inside__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--dark-line); }
.inside__grid li { padding: 28px 28px 40px; border-bottom: 1px solid var(--dark-line); border-left: 1px solid var(--dark-line); }
.inside__grid li:nth-child(4n + 1) { border-left: 0; padding-left: 0; }
.inside__n { display: block; margin-bottom: clamp(24px, 3vw, 44px); font: italic 400 32px/1 var(--serif); color: var(--dark-muted); }
.inside__grid h3 { font-weight: 500; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; margin-bottom: 10px; }
.inside__grid p { font-size: 15px; line-height: 1.55; color: var(--dark-muted); }

.foot { background: var(--ink); color: var(--dark-text); padding-bottom: clamp(32px, 4vw, 56px); }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 40px; align-items: end; }
.foot__note { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.45; max-width: 44em; }
.foot__small { grid-row: 2; font-size: 13px; color: var(--dark-muted); }
.foot__up { grid-row: 1 / span 2; grid-column: 2; font-size: 14px; text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--dark-line); }
.foot__up:hover { border-color: currentColor; }

/* подборка одной марки на ПК: телефон слева, подпись с девизом и ссылкой справа */
@media (min-width: 1101px) {
  .strip--one .strip__link { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 28px; align-items: end; }
  .strip--one .strip__cap { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 10px; margin: 0 0 6px; }
  .strip--one .strip__name { font-size: 20px; }
  .strip--one .strip__tag { font-size: 20px; }
  .strip--one .strip__go { display: inline-block; margin-top: 8px; padding-bottom: 3px; font-size: 13px; border-bottom: 1px solid currentColor; }
}

/* ——— планшет ——— */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__lead { max-width: 36em; }
  .case__head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .case__ref { grid-column: 2 / 4; grid-row: 2; text-align: left; padding: 0; }
  .case__head .btn { grid-column: 3; grid-row: 1; }
  .case__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .case__idea { grid-column: 1 / -1; }
  .case__text { max-width: 44em; }
  .inside__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inside__grid li:nth-child(n) { border-left: 1px solid var(--dark-line); padding-left: 28px; }
  .inside__grid li:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
}

@media (max-width: 900px) {
  .strip { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

/* ——— телефон ——— */
@media (max-width: 700px) {
  :root { --top-h: 52px; }
  .top__mark { display: none; }
  .top__nav { width: 100%; justify-content: space-between; font-size: 13.5px; }
  .top__nav span { display: none; }
  .strip__cap { flex-direction: column; gap: 4px; margin-top: 12px; }
  .strip__n { font-size: 19px; }
  .strip--one .strip__tag { display: none; }
  .brand__head, .inside__head { grid-template-columns: minmax(0, 1fr); }
  .brand__lead { grid-column: 1; }
  .case__head { grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; }
  .case__ref { grid-column: 1 / -1; grid-row: 2; }
  .case__head .btn { grid-column: 1 / -1; grid-row: 3; width: 100%; height: 50px; margin-top: 4px; }
  .stage { margin-inline: calc(var(--pad) * -1); border-radius: 0; padding: 12% 0 7%; }
  .laptop { width: 72cqi; margin-left: 6cqi; }
  .laptop__lid { padding: 1.4cqi 1.4cqi 1.9cqi; }
  .laptop__base { height: 1.8cqi; margin: 0 -5cqi; }
  .stage .phone { left: 67cqi; width: 26cqi; padding: 1cqi; border-radius: 4.2cqi; }
  .stage .phone__screen { border-radius: 3.3cqi; }
  .stage__cue { display: none; }
  .case__body { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .inside__grid { grid-template-columns: minmax(0, 1fr); }
  .inside__grid li:nth-child(n) { display: grid; grid-template-columns: 44px minmax(0, 1fr); border-left: 0; padding: 20px 0 22px; }
  .inside__n { grid-row: 1 / span 2; margin: 0; font-size: 26px; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .foot__up { grid-row: auto; grid-column: 1; justify-self: start; margin-top: 16px; }
}
@media (hover: none) { .stage__cue { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* 320 px (проверка при закрытии): «интернет-магазина» без переноса помещается в ширину */
@media (max-width: 359px) { .hero__title { font-size: 31px; } }
