/* ============================================
   Дизайн: лёгкий галерейный стиль
   Персональная онлайн-выставка художника
   Референс: borsch.gallery
   ============================================ */

:root {
  --color-bg: #FAFAF8;
  --color-white: #FFFFFF;
  --color-text: #1C1C1C;
  --color-muted: #888888;
  --color-light: #E8E8E4;
  --color-accent: #6B7B5E;    /* приглушённый зелёный — природа, жизнь */
  --color-accent-hover: #4D5C43;
  --color-border: #E0E0DA;
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1320px;
  --radius: 2px;
  --gap: 24px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

/* === Шапка === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-header__logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

.site-nav {
  display: flex;
  gap: 36px;
  align-items: center;
}

.site-nav a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--color-text);
}

/* === Hero === */
.hero {
  padding: 80px 32px 56px;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero__eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 300;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 12px;
}

.hero__subtitle {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* === Фильтры === */
.filters {
  padding: 0 32px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.filters__form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filters__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-right: 4px;
}

.filters__select {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.filters__reset {
  font-size: 12px;
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filters__reset:hover {
  color: var(--color-text);
}

/* === Сетка галереи === */
.gallery-section {
  padding: 0 32px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* === Карточка картины === */
.painting-card {
  display: block;
  cursor: pointer;
}

.painting-card__image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--color-light);
  aspect-ratio: 4 / 5;
}

.painting-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s;
  filter: brightness(1);
}

.painting-card:hover .painting-card__image {
  transform: scale(1.04);
}

.painting-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.painting-card:hover .painting-card__overlay {
  background: rgba(0,0,0,0.08);
}

.painting-card__view {
  opacity: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.45);
  padding: 8px 18px;
  border-radius: 20px;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.painting-card:hover .painting-card__view {
  opacity: 1;
}

.painting-card__info {
  padding: 12px 4px 0;
}

.painting-card__title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 2px;
}

.painting-card__meta {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

/* === Страница картины === */
.painting-detail-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 32px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 40px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--color-text);
}

.painting-detail {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}

@media (max-width: 900px) {
  .painting-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.painting-detail__image-wrap {
  background: var(--color-light);
}

.painting-detail__image {
  width: 100%;
  object-fit: contain;
  max-height: 80vh;
}

.painting-detail__info {
  padding-top: 8px;
}

.painting-detail__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 24px;
  line-height: 1.15;
}

.painting-detail__meta {
  list-style: none;
  margin-bottom: 28px;
}

.painting-detail__meta li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.painting-detail__meta li:first-child {
  border-top: 1px solid var(--color-border);
}

.painting-detail__meta strong {
  font-weight: 400;
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.painting-detail__description {
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text);
  white-space: pre-line;
}

/* === Секция отзывов === */
.reviews-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px 80px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 32px;
  padding-top: 48px;
  border-top: 1px solid var(--color-border);
}

.page-subtitle {
  font-size: 13px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  margin-bottom: 40px;
  margin-top: -20px;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
  max-width: 660px;
}

.review-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.review-card:first-child {
  border-top: 1px solid var(--color-border);
}

.review-card__author {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 8px;
}

.review-card__content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-muted);
}

/* === Форма отзыва === */
.review-form {
  max-width: 520px;
}

.review-form__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 24px;
}

.review-form__message {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}

.review-form__message--success {
  background: #EAF4E8;
  color: #3D6B38;
}

.review-form__message--error {
  background: #FFF0EE;
  color: #C0392B;
}

.review-form__field {
  margin-bottom: 16px;
}

.review-form__label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.review-form__input,
.review-form__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color 0.2s;
}

.review-form__input:focus,
.review-form__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.review-form__textarea {
  min-height: 120px;
  resize: vertical;
}

/* === Кнопки === */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn--primary {
  background: var(--color-text);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-accent);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-text);
}

.btn--success {
  background: #3D6B38;
  color: #fff;
}

.btn--danger {
  background: transparent;
  color: #C0392B;
  border: 1px solid #C0392B;
}

.btn--danger:hover {
  background: #C0392B;
  color: #fff;
}

/* === Страница «Об художнике» === */
.about-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 32px 80px;
}

.about-header {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
}

.about-eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.about-name {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.1;
}

.about-bio {
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text);
}

.about-bio p {
  margin-bottom: 20px;
}

.about-bio p:last-child {
  margin-bottom: 0;
}

/* === 404 === */
.not-found-wrap {
  text-align: center;
  padding: 120px 32px;
}

.not-found__code {
  font-family: var(--font-heading);
  font-size: 120px;
  font-weight: 300;
  color: var(--color-light);
  line-height: 1;
  margin-bottom: 16px;
}

.not-found__text {
  font-size: 16px;
  color: var(--color-muted);
  margin-bottom: 32px;
}

/* === Пустое состояние === */
.empty-state {
  text-align: center;
  padding: 80px 32px;
  color: var(--color-muted);
  font-size: 15px;
}

/* === Футер === */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer__admin-link {
  color: var(--color-muted);
  transition: color 0.2s;
}

.site-footer__admin-link:hover {
  color: var(--color-text);
}

/* === Адаптив === */
@media (max-width: 768px) {
  .container,
  .site-header__inner {
    padding: 0 20px;
  }

  .hero {
    padding: 48px 20px 32px;
  }

  .hero__title {
    font-size: 36px;
  }

  .filters,
  .gallery-section,
  .reviews-wrap,
  .painting-detail-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-nav {
    gap: 20px;
  }

  .site-footer__inner {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .site-nav a:not(:last-child) {
    display: none;
  }
}
