/* ЧайВсем — calm, responsive interface
   Принципы: мгновенная обратная связь, ясная иерархия,
   сдержанное движение, доступность и адаптивность. */

:root {
  --ink: #08170f;
  --forest: #0f2a1c;
  --moss: #1c4230;
  --jade: #8fb3a0;
  --paper: #faf7f0;
  --paper-2: #f2ede1;
  --gold: #c2a86a;
  --text: #12241b;
  --muted: #5a6e62;
  --muted-dark: rgba(238, 232, 216, .7);
  --line: rgba(15, 42, 28, .14);
  --line-dark: rgba(238, 232, 216, .16);
  --shell: clamp(20px, 5vw, 80px);
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Switzer", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --press: 100ms ease-out;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { border: 0; }
.nowrap { white-space: nowrap; }

/* Клавиатурная навигация видна всегда, но не мешает мыши. */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

/* ---------- Верхняя панель: лёгкий материал, а не непрозрачная полоса ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px var(--shell);
  border-bottom: 1px solid transparent;
  color: var(--paper);
  transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out), border-color 240ms var(--ease-out), padding 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.topbar.is-stuck {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom-color: rgba(255,255,255,.38);
  background: rgba(250,247,240,.78);
  box-shadow: 0 8px 28px -22px rgba(8,23,15,.45);
  color: var(--text);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.brand { display: flex; flex: none; align-items: center; gap: 10px; }
.brand__mark { flex: none; color: var(--gold); }
.brand__name { font-family: var(--font-display); font-size: 22px; letter-spacing: .06em; }
.topnav { display: flex; align-items: center; gap: 28px; font-size: 14px; letter-spacing: .02em; }
.topnav a { opacity: .84; transition: opacity 160ms ease-out, color 160ms ease-out; }
.topnav a:hover, .topnav a:focus-visible { opacity: 1; }
.topnav__cta {
  min-height: 40px;
  padding: 7px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 1 !important;
  transition: transform var(--press), background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.topbar .topnav__cta:hover { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.topbar .topnav__cta:active { transform: scale(.97); }

/* ---------- Типографика и базовые компоненты ---------- */
.eyebrow { margin: 0 0 18px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .18em; line-height: 1.35; text-transform: uppercase; }
.eyebrow--gold, .section--dark .eyebrow { color: var(--gold); }
.section { padding: clamp(72px, 10vw, 140px) var(--shell); }
.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section__title { margin: 0 0 16px; font-family: var(--font-display); font-size: clamp(38px, 6vw, 72px); font-weight: 400; line-height: 1.02; letter-spacing: -.018em; text-wrap: balance; font-optical-sizing: auto; }
.section__note { max-width: 56ch; margin: 0; color: var(--muted); font-size: 15px; }
.section--dark { background: var(--forest); color: var(--paper); }
.section--dark .section__note { color: var(--muted-dark); }
.section--light { background: var(--paper); }
.section--about { background: var(--paper-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: .035em;
  transition: transform var(--press), background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }
.btn--solid { background: var(--gold); color: var(--ink); box-shadow: 0 8px 18px -14px rgba(0,0,0,.6); }
.btn--solid:hover { background: var(--paper); box-shadow: 0 12px 22px -16px rgba(0,0,0,.55); }
.btn--ghost { border-color: rgba(250,247,240,.52); color: var(--paper); }
.btn--ghost:hover { border-color: var(--paper); background: rgba(250,247,240,.1); }

/* ---------- Hero: фон всегда занимает весь контейнер ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  object-position: center;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8,23,15,.56) 0%, rgba(8,23,15,.25) 38%, rgba(8,23,15,.52) 64%, rgba(15,42,28,.92) 87%, var(--forest) 100%), radial-gradient(64% 62% at 22% 38%, rgba(8,23,15,.08), rgba(8,23,15,.72) 100%);
}
/* Декоративный свет статичен: спокойнее, дешевле для батареи и безопаснее для motion-sensitive людей. */
.hero__glow { position: absolute; inset: -15%; z-index: 1; pointer-events: none; opacity: .65; background: radial-gradient(45% 48% at 22% 35%, rgba(46,104,74,.42), transparent 70%), radial-gradient(34% 40% at 90% 16%, rgba(194,168,106,.18), transparent 72%); }
.hero__line { position: absolute; top: 0; bottom: 0; left: var(--shell); z-index: 2; width: 1px; background: linear-gradient(to bottom, transparent, rgba(194,168,106,.35), transparent); }
.hero__line i { position: absolute; top: 30%; left: -1px; width: 3px; height: 22%; border-radius: 2px; background: linear-gradient(to bottom, transparent, var(--gold), transparent); }
.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 620px;
  max-width: 900px;
  margin-inline: var(--shell);
  padding: clamp(118px,15vh,170px) 0 clamp(52px,8vh,96px) clamp(0px,6vw,120px);
}
.hero .eyebrow { color: var(--gold); }
.hero__title { max-width: 10ch; margin: 0 0 24px; font-family: var(--font-display); font-size: clamp(52px,9vw,132px); font-weight: 300; line-height: .94; letter-spacing: -.025em; text-wrap: balance; font-optical-sizing: auto; }
.hero__title em { display: inline-block; padding-left: .06em; color: var(--jade); font-style: italic; }
.hero__sub { max-width: 44ch; margin: 0 0 36px; color: rgba(250,247,240,.86); font-size: clamp(16px,1.35vw,19px); font-weight: 300; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: clamp(24px,6vw,80px); width: min(100% - (2 * var(--shell)),1440px); margin: 0 auto; padding: 24px 0 max(28px,env(safe-area-inset-bottom)) clamp(0px,6vw,120px); border-top: 1px solid var(--line-dark); }
.hero__meta div { display: flex; flex-direction: column; gap: 2px; }
.hero__meta strong { font-family: var(--font-display); font-size: clamp(28px,3vw,34px); font-weight: 400; line-height: 1; }
.hero__meta span { color: var(--muted-dark); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Бестселлеры ---------- */
.best-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 1px; border: 1px solid var(--line-dark); background: var(--forest); }
.best { display: flex; flex-direction: column; min-height: 230px; padding: 30px 28px 26px; background: var(--forest); transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out); }
.best:hover { background: var(--moss); }
.best:active { transform: scale(.995); }
.best__idx { color: var(--gold); font-size: 12px; letter-spacing: .18em; }
.best__name { margin: 12px 0 0; font-family: var(--font-display); font-size: 29px; font-weight: 400; line-height: 1.1; letter-spacing: -.01em; }
.best__desc { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted-dark); font-size: 14px; font-weight: 300; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.best__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-dark); }
.best__price { color: var(--gold); font-family: var(--font-display); font-size: 26px; }
.best__cat { color: var(--muted-dark); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Поиск и фильтры ---------- */
.toolbar { position: sticky; top: 64px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 34px; padding: 14px 0; border-bottom: 1px solid rgba(15,42,28,.08); background: rgba(250,247,240,.78); box-shadow: 0 9px 18px -20px rgba(8,23,15,.4); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.search { display: flex; flex: 1 1 300px; align-items: center; gap: 10px; max-width: 400px; min-height: 46px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.92); transition: border-color 160ms ease-out, box-shadow 160ms ease-out; }
.search:focus-within { border-color: var(--moss); box-shadow: 0 0 0 4px rgba(28,66,48,.1); }
.search svg { flex: none; color: var(--muted); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { display: none; appearance: none; -webkit-appearance: none; }
.search__clear { min-width: 32px; min-height: 32px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; transition: background-color var(--press), transform var(--press); }
.search__clear:hover { background: var(--paper-2); }.search__clear:active { transform: scale(.92); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; white-space: nowrap; transition: transform var(--press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.chip:hover { border-color: var(--moss); color: var(--text); }.chip:active { transform: scale(.97); }
.chip.is-active { border-color: var(--forest); background: var(--forest); color: var(--paper); }
.toolbar__status { margin: 0 0 0 auto; color: var(--muted); font-size: 13px; }

/* ---------- Каталог ---------- */
.cat-block { margin-bottom: clamp(52px,7vw,90px); }
.cat-block__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cat-block__title { margin: 0; font-family: var(--font-display); font-size: clamp(30px,4vw,46px); font-weight: 400; line-height: 1; letter-spacing: -.015em; }
.cat-block__count { color: var(--muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.sub-block { margin-bottom: 38px; }.sub-block__title { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--moss); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }.sub-block__title::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 220px; padding: 24px 24px 20px; border: 1px solid var(--line); border-radius: 4px; background: #fff; transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), border-color 180ms var(--ease-out); }
.card:hover { border-color: rgba(28,66,48,.35); box-shadow: 0 18px 40px -28px rgba(8,23,15,.45); transform: translateY(-3px); }.card:active { transform: scale(.99); }
.card__name { margin: 0; font-family: var(--font-display); font-size: 25px; font-weight: 400; line-height: 1.15; letter-spacing: -.01em; }.card__desc { margin: 0; color: var(--muted); font-size: 14px; font-weight: 300; line-height: 1.6; }.card__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }.card__price { color: var(--forest); font-family: var(--font-display); font-size: 24px; }.card__price span { margin-left: 6px; color: var(--muted); font-family: var(--font-body); font-size: 12px; letter-spacing: .04em; }.card__badge,.card__sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }.card__badge { color: var(--gold); }.card__badge--popular { color: var(--moss); }.card__sub { color: var(--muted); }

/* ---------- Состояния, информация, footer ---------- */
.skeleton { min-height: 200px; padding: 24px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }.skeleton div { height: 12px; margin-bottom: 12px; border-radius: 3px; background: linear-gradient(90deg,var(--paper-2) 25%,#fff 50%,var(--paper-2) 75%); background-size: 200% 100%; }.skeleton div:first-child { width: 70%; height: 26px; }.skeleton div:last-child { width: 40%; margin-bottom: 0; }.skeleton--dark { border-color: var(--line-dark); background: var(--forest); }.skeleton--dark div { background: linear-gradient(90deg,rgba(255,255,255,.05) 25%,rgba(255,255,255,.12) 50%,rgba(255,255,255,.05) 75%); background-size: 200% 100%; }
.state { padding: 44px 28px; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); text-align: center; }.state h3 { margin: 0 0 8px; color: var(--text); font-family: var(--font-display); font-size: 26px; font-weight: 400; }.state code { display: block; margin-top: 14px; color: #8a3b3b; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 12px; overflow-wrap: anywhere; }.section--dark .state { border-color: var(--line-dark); color: var(--muted-dark); }.section--dark .state h3 { color: var(--paper); }
.about { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); align-items: start; gap: clamp(28px,5vw,80px); }.about__text { max-width: 52ch; color: var(--muted); font-size: 17px; font-weight: 300; }.about__text p { margin: 0 0 18px; }
.section--contacts { background: var(--ink); color: var(--paper); }.contacts { max-width: 820px; }.contacts__title { margin: 0 0 32px; font-family: var(--font-display); font-size: clamp(38px,6vw,74px); font-weight: 300; line-height: 1.02; letter-spacing: -.018em; text-wrap: balance; }.contacts__links { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-bottom: 22px; }.contacts__links a { padding-bottom: 4px; border-bottom: 1px solid rgba(194,168,106,.35); color: var(--gold); font-family: var(--font-display); font-size: clamp(24px,3vw,34px); transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out); }.contacts__links a:hover { border-color: var(--paper); color: var(--paper); }.contacts__note { max-width: 48ch; margin: 0; color: var(--muted-dark); font-size: 15px; font-weight: 300; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 26px var(--shell); border-top: 1px solid var(--line-dark); background: var(--ink); color: rgba(238,232,216,.5); font-size: 12px; letter-spacing: .04em; }

/* ---------- Появление секций: только opacity + transform ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton div { animation: shimmer 1.5s linear infinite; }
  .reveal { opacity: 0; transform: translateY(12px); transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out); }
  .reveal.is-in { opacity: 1; transform: none; }
  @keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
}

/* ---------- Адаптивность ---------- */
@media (max-width: 1024px) { .hero__inner { min-height: 680px; padding-left: clamp(0px,3vw,40px); }.hero__title { max-width: 11ch; font-size: clamp(58px,8.5vw,92px); }.hero__bg { object-position: 58% center; }.hero__meta { padding-left: clamp(0px,3vw,40px); } }
@media (max-width: 900px) { .hero__line { display: none; } }
@media (max-width: 768px) { .hero { min-height: 760px; }.hero__inner { min-height: 620px; padding-top: 120px; padding-bottom: 44px; }.hero__title { max-width: 10ch; font-size: clamp(54px,10vw,76px); }.hero__bg { object-position: 62% center; }.hero__meta { gap: 24px 42px; } }
@media (max-width: 720px) {
  /* На мобильном остаются логотип и CTA, три навигационные ссылки скрыты. */
  .topnav { gap: 0; }.topnav a:not(.topnav__cta) { display: none; }.topnav__cta { padding: 8px 14px; }
  .hero { min-height: max(680px,100svh); min-height: max(680px,100dvh); }.hero__bg { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }.hero__scrim { background: linear-gradient(180deg,rgba(8,23,15,.58) 0%,rgba(8,23,15,.4) 32%,rgba(8,23,15,.78) 64%,var(--forest) 100%),radial-gradient(100% 62% at 42% 30%,rgba(8,23,15,.08),rgba(8,23,15,.68) 100%); }.hero__glow { display: none; }.hero__inner { min-height: 0; margin-inline: var(--shell); padding: max(104px,env(safe-area-inset-top)) 0 48px; }.hero__title { max-width: 9ch; font-size: clamp(52px,15vw,76px); }.hero__sub { max-width: 33ch; margin-bottom: 30px; font-size: 16px; }.hero__actions { width: 100%; }.hero__actions .btn { flex: 1 1 220px; }.hero__meta { gap: 22px 28px; padding-left: 0; }
  .toolbar { top: 57px; background: rgba(250,247,240,.94); }.toolbar__status { width: 100%; margin-left: 0; }.chips { flex-wrap: nowrap; width: calc(100% + 2 * var(--shell)); margin: 0 calc(-1 * var(--shell)); padding: 2px var(--shell) 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }.chips::-webkit-scrollbar { display: none; }.chip { flex: 0 0 auto; }.grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) { .hero { min-height: max(700px,100svh); min-height: max(700px,100dvh); }.hero__title { font-size: clamp(50px,15vw,64px); }.hero__meta { display: grid; grid-template-columns: repeat(2,1fr); }.hero__meta div:last-child { grid-column: 1 / -1; }.hero__meta span { font-size: 10px; letter-spacing: .11em; } }

/* Пользовательские системные настройки важнее декоративных эффектов. */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } .reveal { opacity: 1; transform: none; } }
@media (prefers-reduced-transparency: reduce) { .topbar.is-stuck,.toolbar { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (prefers-contrast: more) { .topbar.is-stuck,.toolbar { border-bottom-color: var(--text); background: var(--paper); }.search,.chip,.card { border-color: currentColor; }.hero__scrim { background: linear-gradient(180deg,rgba(8,23,15,.8),rgba(8,23,15,.92) 70%,var(--forest)); } }
