/* dabest.ru — визуальный язык в духе House of Hype */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Syne:wght@700;800&display=swap');

:root {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: rgba(0, 0, 0, 0.08);
  --blue: #3b42e1;
  --blue-hover: #2f35c4;
  --dark: #0d0d0d;
  --dark-2: #161616;
  --radius: 28px;
  --radius-sm: 18px;
  --radius-pill: 999px;
  --header-h: 72px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  --font: 'Outfit', system-ui, sans-serif;
  --display: 'Syne', 'Outfit', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  padding-top: var(--header-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* —— Header —— */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header__brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  letter-spacing: -0.03em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink);
}
.site-header__brand span { opacity: 0.35; font-weight: 700; }
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--blue-hover); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { background: #f5f5f5; }
.btn--light {
  background: #fff;
  color: var(--ink);
}
.btn--light:hover { background: #f0f0f0; }
.menu-toggle {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 190;
  background: var(--dark);
  color: #fff;
  padding: clamp(2rem, 6vw, 4rem);
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  overflow: auto;
}
body.menu-open .site-menu { display: flex; }
.site-menu a {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.03em;
  opacity: 0.9;
  transition: opacity .15s;
}
.site-menu a:hover { opacity: 1; }
.site-menu__meta {
  margin-top: auto;
  color: rgba(255,255,255,0.45);
  font-size: 0.95rem;
}

/* —— Hero —— */
.hoh-hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: #111;
}
.hoh-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hoh-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.75) 100%);
}
.hoh-hero__content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  padding: 3rem 1.25rem 4rem;
}
.hoh-hero__content h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.hoh-hero__content p {
  margin: 0 auto 1.75rem;
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
}
.hoh-hero__content .btn { min-width: 180px; padding: 0.95rem 1.8rem; font-size: 1rem; }

/* —— Sections —— */
.band {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem);
}
.band--dark {
  background: var(--dark);
  color: #fff;
}
.band--light { background: var(--bg); color: var(--ink); }
.band--white { background: #fff; color: var(--ink); }
.band__inner {
  max-width: 1280px;
  margin: 0 auto;
}
.band__intro {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.band__intro h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.band__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.band--dark .band__intro p { color: rgba(255,255,255,0.65); }

/* —— Pillar cards (Explore / Experience) —— */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 720px) {
  .pillar-grid { grid-template-columns: 1fr; }
}
.pillar-card {
  position: relative;
  display: block;
  min-height: clamp(220px, 32vw, 340px);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
}
.pillar-card img,
.pillar-card .pillar-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.pillar-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55));
  z-index: 1;
}
.pillar-card:hover img,
.pillar-card:hover .pillar-card__bg { transform: scale(1.06); }
.pillar-card__label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  text-align: center;
}

/* —— Experience / topic rail —— */
.xp-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.xp-card {
  position: relative;
  flex: 0 0 min(78vw, 300px);
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
}
.xp-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}
.xp-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.78) 100%);
  z-index: 1;
}
.xp-card:hover img { transform: scale(1.05); }
.xp-card__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 1.25rem 1.2rem 1.4rem;
}
.xp-card__body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.xp-card__body p {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xp-card__count {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  opacity: 0.7;
}

/* —— Library / article grid (HoH style image cards) —— */
.xp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1100px) {
  .xp-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .xp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .xp-grid { grid-template-columns: 1fr; }
}
.xp-grid .xp-card {
  flex: none;
  width: 100%;
  aspect-ratio: 3 / 4;
}

/* —— Featured main —— */
.featured-hero {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: clamp(280px, 48vw, 480px);
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  margin-bottom: 1rem;
}
.featured-hero img,
.featured-hero .featured-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.25) 70%);
  z-index: 1;
}
.featured-hero__content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: inherit;
}
.featured-hero__content h2 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.featured-hero__content p {
  margin: 0 0 1rem;
  opacity: 0.88;
  font-size: 1rem;
}
.featured-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 800px) {
  .featured-row { grid-template-columns: 1fr; }
}

/* —— Cluster chips —— */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin: 0 0 2rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: #bbb; }
.chip.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.chip__count {
  opacity: 0.55;
  font-weight: 500;
  font-size: 0.8rem;
}
.chip.is-active .chip__count { opacity: 0.8; }

/* —— FAQ —— */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.faq-item {
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.band--dark .faq-item {
  background: var(--dark-2);
  border-color: rgba(255,255,255,0.08);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 1.35rem;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  opacity: 0.5;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item__body {
  padding: 0 1.35rem 1.25rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.band--dark .faq-item__body { color: rgba(255,255,255,0.65); }

/* —— CTA band —— */
.cta-band {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 6rem) 1.25rem;
  background: var(--dark);
  color: #fff;
}
.cta-band h2 {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* —— Pagination —— */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.9rem;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.pagination a.is-current,
.pagination a:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* —— Footer —— */
.site-footer {
  margin-top: auto;
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 2rem;
}
.site-footer__grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}
@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.site-footer__brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.site-footer h4 {
  margin: 0 0 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.site-footer a {
  display: block;
  text-decoration: none;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
  opacity: 0.75;
}
.site-footer a:hover { opacity: 1; color: #fff; }
.site-footer__copy {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  opacity: 0.5;
}

/* —— Article page —— */
.article-hero {
  position: relative;
  min-height: clamp(320px, 55vw, 520px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #111;
}
.article-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  transform: scale(1.04);
}
.article-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.78) 100%);
}
.article-hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2.5rem;
  width: 100%;
}
.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.85rem;
}
.article-hero__meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.article-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.article-shell {
  max-width: 780px;
  margin: -2.5rem auto 0;
  position: relative;
  z-index: 3;
  padding: 0 1rem 3rem;
}
.article-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}
.article-panel .article-cover {
  display: none; /* cover already in hero */
}
.article-panel h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
  font-size: 1.45rem;
}
.article-panel p { margin: 0 0 1rem; color: #222; }
.article-panel ul, .article-panel ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.article-panel li + li { margin-top: 0.35rem; }
.article-disclaimer {
  margin-top: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: #f5f5f5;
  color: #666;
  font-size: 0.85rem;
}
.article-toc {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.25rem;
  background: #f7f7f7;
  border-radius: var(--radius-sm);
}
.article-toc__title { margin: 0 0 0.6rem; font-weight: 800; }
.article-toc__list { margin: 0; padding-left: 1.1rem; }
.article-toc a { text-decoration: none; color: var(--blue); font-weight: 600; }
.article-byline {
  display: none;
}

/* Story slides on article — keep but restyle lightly */
.story-stage {
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

/* About page */
.about-panel {
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}
.about-panel h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}
.about-panel p { color: #333; }

/* Search */
.search-bar {
  max-width: 560px;
  margin: 1.5rem auto 0;
  display: flex;
  gap: 0.5rem;
}
.search-bar input {
  flex: 1;
  height: 52px;
  border-radius: var(--radius-pill);
  border: none;
  padding: 0 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
}
.search-bar button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .pillar-card, .xp-card, .featured-hero {
    transition: transform .25s ease;
  }
}
