/* Дикоросы — atmospheric site */

:root {
  --bg-deep: #141810;
  --bg-warm: #1c2118;
  --bg-card: #242a1f;
  --text-primary: #f4efe6;
  --text-muted: #b8b0a0;
  --text-soft: #8a8278;
  --accent-pine: #3d5a45;
  --accent-pine-light: #5a7d63;
  --accent-ember: #c45c3a;
  --accent-berry: #8b3a3a;
  --accent-gold: #c4a35a;
  --accent-birch: #d4c4a0;
  --border: rgba(196, 163, 90, 0.15);
  --shadow: rgba(0, 0, 0, 0.45);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --header-h: 72px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --page-width: 1120px;
  --page-width-wide: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(20, 24, 16, 0.95) 0%, rgba(20, 24, 16, 0) 100%);
  transition: background 0.4s var(--ease);
}

.header.scrolled {
  background: rgba(20, 24, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo__mark {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

.logo__text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1.75rem);
}

.nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.3s;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.3s var(--ease);
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
}

.nav a.active::after,
.nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.3s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 2rem) clamp(1.5rem, 5vw, 4rem) 4rem;
  background: var(--bg-deep) center/cover no-repeat;
  background-image: var(--hero-image);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 24, 16, 0.35) 0%, rgba(20, 24, 16, 0.15) 40%, rgba(20, 24, 16, 0.75) 75%, rgba(20, 24, 16, 0.95) 100%),
    linear-gradient(90deg, rgba(20, 24, 16, 0.5) 0%, transparent 50%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--page-width);
  animation: fadeUp 1.2s var(--ease) both;
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 500;
  line-height: 1.05;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
}

.hero__tagline {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 480px;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  right: clamp(1.5rem, 5vw, 4rem);
  z-index: 1;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-soft);
  animation: pulse 2.5s ease-in-out infinite;
}

.hero__scroll span {
  display: block;
  writing-mode: vertical-rl;
}

/* Page header (inner pages — no photos) */
.page-header {
  padding: calc(var(--header-h) + 3rem) clamp(1.5rem, 5vw, 2.5rem) 2.5rem;
  max-width: var(--page-width);
  margin: 0 auto;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-header__eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 1rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

.page-header__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
}

.page-header__tagline {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.page-extra-link {
  margin: 1.25rem 0 0;
}

.page-extra-link a {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--accent-gold);
  border-bottom: 1px solid rgba(196, 163, 90, 0.35);
  transition: color 0.25s, border-color 0.25s;
}

.page-extra-link a:hover {
  color: var(--text-primary);
  border-color: var(--accent-gold);
}

/* Text-only navigation cards */
.cards--text {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card--text {
  min-height: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.card--text .card__body {
  position: relative;
  padding: 1.75rem;
}

.card--text:hover {
  border-color: rgba(196, 163, 90, 0.35);
  transform: translateY(-2px);
}

.card--text .card__overlay,
.card--text .card__bg {
  display: none;
}

.hero__credit {
  position: absolute;
  bottom: 1.5rem;
  left: clamp(1.5rem, 5vw, 4rem);
  z-index: 1;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  max-width: 280px;
  font-style: italic;
}

.hero--home .hero__credit {
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

/* Home hero variant */
.hero--home {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero--home .hero__content {
  max-width: calc(var(--page-width) + 80px);
  margin: 0 auto;
}

.hero--home .hero__overlay {
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(20, 24, 16, 0.4) 60%, rgba(20, 24, 16, 0.88) 100%);
}

.hero--home h1 {
  font-size: clamp(3.5rem, 12vw, 7rem);
}

/* Content prose */
.content {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 5vw, 2.5rem);
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

.prose h1 { font-size: 2rem; margin: 2.5rem 0 1rem; }
.prose h2 {
  font-size: 1.65rem;
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.prose h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.prose h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; color: var(--accent-birch); }
.prose h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

.prose p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose em { color: var(--accent-birch); }

.prose ul, .prose ol {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--accent-gold); }

.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 2.5rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.9rem;
}

.prose th, .prose td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.prose th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent-gold);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.prose td { color: var(--text-muted); }

.prose a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Gallery */
.gallery {
  padding: 0 clamp(1rem, 3vw, 2rem) clamp(4rem, 10vw, 8rem);
}

.gallery__intro {
  text-align: center;
  max-width: 520px;
  margin: 0 auto 2rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  max-width: var(--page-width-wide);
  margin: 0 auto;
}

.gallery__item {
  position: relative;
  margin: 0;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 2px;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.gallery__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 24, 16, 0.5), transparent);
  pointer-events: none;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 2rem 1rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-primary);
  background: linear-gradient(to top, rgba(20, 24, 16, 0.92), transparent);
}

/* Inline figures in long reads */
.inline-figure {
  margin: 1.5rem 0 2.5rem;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.inline-figure img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.inline-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  background: var(--bg-card);
  font-style: italic;
}

.showcase__image {
  position: relative;
  min-height: 400px;
  overflow: hidden;
}

/* Home sections */
.sections {
  padding: clamp(4rem, 10vw, 8rem) clamp(1.5rem, 5vw, 3rem);
  background: var(--bg-warm);
}

.sections__header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 4rem;
}

.sections__header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  margin: 0 0 1rem;
}

.sections__header p {
  color: var(--text-muted);
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  max-width: var(--page-width-wide);
  margin: 0 auto;
}

.card {
  position: relative;
  display: block;
  min-height: 360px;
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  group: card;
}

.card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s var(--ease);
}

.card:hover .card__bg {
  transform: scale(1.06);
}

.card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 24, 16, 0.92) 0%, rgba(20, 24, 16, 0.3) 55%, rgba(20, 24, 16, 0.15) 100%);
  transition: background 0.4s;
}

.card:hover .card__overlay {
  background: linear-gradient(to top, rgba(20, 24, 16, 0.95) 0%, rgba(20, 24, 16, 0.45) 60%, rgba(20, 24, 16, 0.2) 100%);
}

.card__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  z-index: 1;
}

.card__num {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Quote block on home */
.manifesto {
  position: relative;
  padding: clamp(5rem, 12vw, 10rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  background: var(--bg-warm);
}

.manifesto blockquote {
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  border: none;
}

.manifesto p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0 0 1.5rem;
}

.manifesto cite {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

/* Interior showcase */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
}

.showcase__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 1.5rem 1.25rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: linear-gradient(to top, rgba(20, 24, 16, 0.85), transparent);
  font-style: italic;
}

.showcase__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
  background: var(--bg-card);
}

.showcase__text h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 1.25rem;
}

.showcase__text p {
  color: var(--text-muted);
  margin: 0 0 1rem;
  max-width: 560px;
}

.showcase__pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pillar {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  color: var(--accent-birch);
  border-radius: 100px;
}

/* Footer */
.footer {
  padding: 3rem clamp(1.5rem, 5vw, 3rem);
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  text-align: center;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.footer__tagline {
  color: var(--accent-gold);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  margin: 0 0 0.75rem;
}

.footer__loc {
  color: var(--text-soft);
  font-size: 0.8rem;
  margin: 0;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase__image { min-height: 50vw; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(20, 24, 16, 0.98);
    backdrop-filter: blur(16px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.4s var(--ease), opacity 0.4s;
    pointer-events: none;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 1rem 2rem;
    font-size: 0.85rem;
  }

  .nav a::after { display: none; }

  .hero__scroll { display: none; }
}
