/* РАМИЛЬ — каталог мягкой мебели. Тёплый текстильный минимализм. */

:root {
  --linen: #f5efe6;
  --linen-deep: #ece3d4;
  --card: #fffdf9;
  --ink: #241c15;
  --ink-soft: #6b5c4f;
  /* фирменное золото RAMILIER (по логотипу RML) */
  --clay: #a6874f;
  --clay-dark: #85683a;
  --rose: #c9b07e;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(70, 50, 30, .10);
  --shadow-lift: 0 18px 44px rgba(70, 50, 30, .16);
  --font-display: 'Prata', Georgia, serif;
  --font-body: 'Onest', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--linen);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* лёгкое льняное зерно */
  background-image:
    radial-gradient(rgba(180, 100, 60, .045) 1px, transparent 1px),
    radial-gradient(rgba(120, 90, 60, .03) 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
}

img { display: block; max-width: 100%; }

/* ── Интро-заставка логотипа ───────────────────── */
.intro {
  position: fixed; inset: 0; z-index: 200;
  background: #1d1712;
  background-image: radial-gradient(ellipse 90% 60% at 50% 38%, rgba(166, 135, 79, .16), transparent 65%);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .65s ease, visibility .65s;
}
.intro.done { opacity: 0; visibility: hidden; }
.intro[hidden] { display: none; }
.intro-inner { text-align: center; padding: 24px; }
.intro-badge { width: clamp(150px, 34vw, 220px); height: auto; display: block; margin: 0 auto; }

.i-ring {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: iRing 1.3s .1s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes iRing { to { stroke-dashoffset: 0; } }

.i-r, .i-m, .i-l { opacity: 0; }
.i-r { animation: iLetter .7s .35s ease forwards; }
.i-m { animation: iLetter .7s .65s ease forwards; }
.i-l { animation: iLetter .7s .95s ease forwards; }
@keyframes iLetter {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}

.intro-name {
  margin-top: 26px;
  font-family: var(--font-display);
  font-size: clamp(26px, 5.5vw, 40px);
  color: #f5efe6;
  letter-spacing: .55em; text-indent: .55em; /* центрируем разрядку */
  opacity: 0;
  animation: iName 1s 1.25s cubic-bezier(.2, .6, .2, 1) forwards;
}
@keyframes iName {
  from { opacity: 0; letter-spacing: .8em; text-indent: .8em; filter: blur(4px); }
  to   { opacity: 1; letter-spacing: .3em; text-indent: .3em; filter: blur(0); }
}
.intro-sub {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(12px, 2vw, 15px);
  color: #a6874f; letter-spacing: .5em; text-indent: .5em;
  text-transform: uppercase;
  opacity: 0; animation: iFade .8s 1.75s ease forwards;
}
.intro-tag {
  margin-top: 20px;
  font-family: var(--font-body); font-weight: 300;
  font-size: clamp(13px, 2.2vw, 15.5px);
  color: rgba(245, 239, 230, .65); letter-spacing: .06em;
  opacity: 0; animation: iFade .8s 2.1s ease forwards;
}
@keyframes iFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Шапка ─────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(245, 239, 230, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(120, 90, 60, .12);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-badge { width: 46px; height: 46px; display: block; }
.brand-text { font-family: var(--font-display); font-size: 19px; letter-spacing: .06em; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--font-body); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
.nav { display: flex; gap: clamp(10px, 2.5vw, 28px); }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500;
  font-size: 14.5px; letter-spacing: .02em; padding: 6px 2px;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--clay-dark); border-color: var(--clay); }

/* ── Hero ──────────────────────────────────────── */
.hero { padding: clamp(48px, 9vw, 110px) clamp(16px, 4vw, 48px) clamp(28px, 4vw, 56px); }
.hero-inner { max-width: 1080px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--clay-dark);
  border: 1px solid rgba(180, 100, 60, .4); border-radius: 100px;
  padding: 6px 16px; margin-bottom: 26px;
  animation: rise .7s ease both;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(38px, 7.2vw, 84px); line-height: 1.06; letter-spacing: .01em;
  animation: rise .7s .08s ease both;
}
.hero h1 em { font-style: italic; color: var(--clay); }
.hero-sub {
  max-width: 560px; margin-top: 22px; color: var(--ink-soft);
  font-size: clamp(15px, 1.6vw, 17.5px); font-weight: 300;
  animation: rise .7s .16s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* карточки категорий в hero */
.hero-cats {
  display: grid; gap: 16px; margin-top: clamp(32px, 5vw, 56px);
  grid-template-columns: repeat(3, 1fr);
  animation: rise .7s .24s ease both;
}
.hero-cat {
  position: relative; display: block; text-decoration: none;
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  box-shadow: var(--shadow); transform: translateZ(0);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.hero-cat:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.hero-cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-cat:hover img { transform: scale(1.05); }
.hero-cat .hc-label {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 14px;
  background: linear-gradient(transparent, rgba(35, 22, 12, .72));
  color: #fff; display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.hero-cat .hc-name { font-family: var(--font-display); font-size: clamp(16px, 1.9vw, 22px); }
.hero-cat .hc-n { font-size: 12.5px; opacity: .85; white-space: nowrap; }

/* ── Секции категорий ──────────────────────────── */
.cat-section { padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 48px); }
.cat-section:nth-of-type(odd) { background: linear-gradient(rgba(120,90,60,.05), rgba(120,90,60,0) 140px); }
.cat-head { max-width: 1080px; margin: 0 auto 26px; position: relative; }
.cat-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(28px, 4.4vw, 46px); line-height: 1.15;
}
.cat-head h2::after {
  content: ""; display: block; width: 64px; height: 3px; margin-top: 12px;
  background: var(--clay); border-radius: 2px;
}
.cat-desc { max-width: 640px; margin-top: 14px; color: var(--ink-soft); font-size: 15.5px; font-weight: 300; }
.cat-link { color: var(--clay-dark); font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(166,135,79,.4); }
.cat-link:hover { color: var(--clay); border-color: var(--clay); }
.cat-count {
  position: absolute; top: 6px; right: 0; font-size: 13px; color: var(--ink-soft);
  background: var(--card); border: 1px solid rgba(120,90,60,.15);
  padding: 5px 14px; border-radius: 100px; white-space: nowrap;
}

/* грид работ */
.works {
  max-width: 1080px; margin: 0 auto;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.work {
  position: relative; border-radius: var(--radius); overflow: hidden;
  cursor: pointer; border: 0; padding: 0; background: var(--linen-deep);
  box-shadow: var(--shadow); text-align: left;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
}
.work:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.work img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; transition: transform .5s ease; }
.work:hover img { transform: scale(1.04); }
.work .w-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(35, 22, 12, .55); color: #fff; font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: 100px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; gap: 5px;
}
.work .w-badge svg { width: 12px; height: 12px; }
.works .more {
  grid-column: 1 / -1; justify-self: center; margin-top: 6px;
  font: 500 14.5px var(--font-body); color: var(--clay-dark);
  background: none; border: 1.5px solid var(--clay); border-radius: 100px;
  padding: 11px 30px; cursor: pointer; letter-spacing: .03em;
  transition: background .2s, color .2s;
}
.works .more:hover { background: var(--clay); color: #fff; }

/* ── Тизер тканей ─────────────────────────────── */
.fabric-teaser { padding: clamp(10px, 2vw, 20px) clamp(16px, 4vw, 48px) 0; }
.ft-card {
  max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: clamp(16px, 3vw, 36px);
  background: var(--card); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  padding: clamp(16px, 2.5vw, 26px);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
}
.ft-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.ft-imgs { display: flex; flex-shrink: 0; }
.ft-imgs img {
  width: clamp(72px, 9vw, 110px); height: clamp(72px, 9vw, 110px);
  object-fit: cover; border-radius: 50%; border: 3px solid var(--card);
  margin-left: -22px; box-shadow: 0 4px 12px rgba(70,50,30,.18);
}
.ft-imgs img:first-child { margin-left: 0; }
.ft-text h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(19px, 2.6vw, 26px); margin-bottom: 6px; }
.ft-text p { color: var(--ink-soft); font-size: 14.5px; font-weight: 300; margin-bottom: 10px; }
.ft-btn { color: var(--clay-dark); font-weight: 600; font-size: 14.5px; border-bottom: 1.5px solid var(--clay); padding-bottom: 2px; }
@media (max-width: 620px) {
  .ft-card { flex-direction: column; text-align: center; }
  .ft-imgs { justify-content: center; }
}

/* ── Как заказать ─────────────────────────────── */
.how { padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 48px); }
.how-steps {
  max-width: 1080px; margin: 26px auto 0; padding: 0; list-style: none;
  display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr);
}
.how-steps li {
  background: var(--card); border: 1px solid rgba(120, 90, 60, .12);
  border-radius: var(--radius); padding: 24px 20px;
  box-shadow: var(--shadow);
}
.hs-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--clay); color: var(--clay-dark);
  font-family: var(--font-display); font-size: 19px;
  margin-bottom: 14px;
}
.how-steps h3 { font-family: var(--font-display); font-weight: 400; font-size: 18.5px; margin-bottom: 8px; }
.how-steps p { color: var(--ink-soft); font-size: 14px; font-weight: 300; line-height: 1.55; }
@media (max-width: 980px) { .how-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .how-steps { grid-template-columns: 1fr; } }

/* ── Кнопки связи ─────────────────────────────── */
.btn-wa, .btn-tg, .btn-call, .btn-max { display: inline-flex; align-items: center; gap: 9px; }
.cta-actions .btn-wa { background: #23a95c; }
.cta-actions .btn-wa:hover { background: #1d8f4e; }
.cta-actions .btn-tg { background: #2a9fd8; }
.cta-actions .btn-tg:hover { background: #2489bb; }
.cta-actions .btn-max { background: #6c5ce7; }
.cta-actions .btn-max:hover { background: #5a4bd1; }
.cta-actions .btn-call { background: transparent; border: 1.5px solid rgba(245,239,230,.5); }
.cta-actions .btn-call:hover { background: rgba(245,239,230,.12); transform: translateY(-2px); }

.wa-float {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 90; width: 56px; height: 56px; border-radius: 50%;
  background: #23a95c; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(20, 90, 45, .4);
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 12px 30px rgba(20, 90, 45, .5); }

.lb-bar { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.lb-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lb-want-max { background: #6c5ce7; }
.lb-want-max:hover { background: #5a4bd1; }
.lb-want {
  display: inline-block; text-decoration: none;
  background: var(--clay); color: #fff; font-size: 14px; font-weight: 600;
  padding: 9px 22px; border-radius: 100px;
  transition: background .2s;
}
.lb-want:hover { background: var(--clay-dark); }

/* ── SEO-текст ────────────────────────────────── */
.seo-note { padding: clamp(28px, 4vw, 48px) clamp(16px, 4vw, 48px) 0; }
.seo-note h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(20px, 2.6vw, 26px); max-width: 1080px; margin: 0 auto 14px;
}
.seo-note p {
  max-width: 1080px; margin: 0 auto 12px; color: var(--ink-soft);
  font-size: 14.5px; font-weight: 300; line-height: 1.65;
}

/* ── CTA ───────────────────────────────────────── */
.cta {
  margin: clamp(30px, 6vw, 70px) clamp(16px, 4vw, 48px);
  padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 56px);
  max-width: 1080px; margin-left: auto; margin-right: auto;
  background: var(--ink); color: var(--linen);
  border-radius: calc(var(--radius) + 8px); text-align: center;
  background-image: radial-gradient(ellipse at 20% 0%, rgba(180,100,60,.35), transparent 55%),
                    radial-gradient(ellipse at 90% 100%, rgba(200,142,126,.22), transparent 50%);
}
.cta h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 3.6vw, 40px); }
.cta p { margin-top: 12px; color: rgba(245,239,230,.75); font-weight: 300; }
.cta-actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-actions a {
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 13px 30px; border-radius: 100px;
  background: var(--clay); color: #fff; transition: background .2s, transform .2s;
}
.cta-actions a:hover { background: var(--clay-dark); transform: translateY(-2px); }

.footer {
  padding: 26px clamp(16px, 4vw, 48px) calc(26px + env(safe-area-inset-bottom));
  text-align: center; color: var(--ink-soft); font-size: 13px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.footer-logo {
  font-family: var(--font-display); font-size: 19px; letter-spacing: .28em;
  color: var(--ink); text-transform: uppercase;
}
.footer-logo em {
  display: block; font-size: 11px; letter-spacing: .5em; font-style: normal;
  color: var(--clay-dark); margin-top: 3px;
}
.staff-link a {
  color: rgba(107, 92, 79, .55); font-size: 11.5px; text-decoration: none;
  border-bottom: 1px dotted rgba(107, 92, 79, .35);
}
.staff-link a:hover { color: var(--clay-dark); }

/* ── Лайтбокс ─────────────────────────────────── */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 16, 10, .94);
  display: flex; align-items: center; justify-content: center;
  animation: lbIn .25s ease;
  touch-action: pan-y;
}
@keyframes lbIn { from { opacity: 0; } }
.lb[hidden] { display: none; }
.lb-stage { max-width: min(1400px, 94vw); max-height: 86vh; }
.lb-stage img {
  max-width: 94vw; max-height: 86vh; width: auto; height: auto;
  margin: 0 auto; border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  user-select: none; -webkit-user-drag: none;
}
.lb button {
  position: absolute; z-index: 2; border: 0; cursor: pointer;
  background: rgba(245, 239, 230, .12); color: #f5efe6;
  width: 46px; height: 46px; border-radius: 50%;
  font-size: 26px; line-height: 1; display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s;
}
.lb button:hover { background: rgba(180, 100, 60, .55); }
.lb-close { top: 14px; right: 14px; font-size: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); padding-bottom: 4px; }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); padding-bottom: 4px; }
.lb-bar {
  position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0;
  text-align: center; color: rgba(245,239,230,.8); font-size: 13.5px; letter-spacing: .06em;
}

/* ── Мобильный ────────────────────────────────── */
@media (max-width: 760px) {
  .brand-text { font-size: 16px; }
  .brand-text small { font-size: 9.5px; }
  .nav a { font-size: 12.5px; }
  .hero-cats { grid-template-columns: 1fr; }
  .hero-cat { aspect-ratio: 16 / 9; }
  .works { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-count { position: static; display: inline-block; margin-top: 10px; }
  /* на телефоне работает свайп, но стрелки оставляем — компактные, у краёв */
  .lb button.lb-prev, .lb button.lb-next {
    width: 38px; height: 38px; font-size: 20px;
    background: rgba(245, 239, 230, .10);
  }
  .lb button.lb-prev { left: 6px; }
  .lb button.lb-next { right: 6px; }
}
@media (max-width: 400px) {
  .nav { display: none; }
}
