:root {
  --bg: #fafafa;
  --text: #111111;
  --text-soft: rgba(17, 17, 17, 0.72);
  --accent: #132c2a;
  --gold: #c49b66;
  --surface: #ffffff;
  --border: rgba(17, 17, 17, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-soft: 0 28px 70px -40px rgba(17, 17, 17, 0.55);
  --shadow-hover: 0 36px 90px -48px rgba(17, 17, 17, 0.6);
  --header-height: 72px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

/* Убираем любые отступы сверху у body */
html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: 'Raleway', 'Inter', 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body,
p,
li,
a {
  font-family: 'Raleway', 'Inter', 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

/* Убираем нижний отступ у header */
header {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

/* Убираем верхний отступ у hero */
.hero,
.hero-block,
section:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

h1 {
  font-size: clamp(2.4rem, 2rem + 2vw, 3.6rem);
}

h2 {
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.6rem);
}

h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem);
}

section h2 {
  margin-bottom: 32px;
}

#about h2,
#contacts h2 {
  margin-bottom: 40px;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s ease;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.site-nav {
  max-width: min(1180px, 94vw);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.55rem, 1vw, 0.85rem) clamp(0.9rem, 1.4vw, 1.4rem);
  border-radius: var(--radius-lg);
  color: var(--accent);
  background: none !important;
  text-decoration: none;
}

.logo:hover,
.logo:focus-visible {
  color: var(--accent);
}

.menu {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.6vw, 3rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(19, 44, 42, 0.22);
  border-radius: 999px;
  background: rgba(250, 250, 250, 0.92);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.nav-toggle__line {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle__line + .nav-toggle__line {
  margin-top: 5px;
}

.nav-toggle.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}

.nav-toggle.is-active .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

.menu a {
  position: relative;
  font-weight: 500;
  padding-block: 0.25rem;
}

.menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu a:hover::after,
.menu a:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}

.menu a.menu-highlight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 18px 40px -28px rgba(19, 44, 42, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.menu a.menu-highlight::after {
  display: none;
}

.menu a.menu-highlight:hover,
.menu a.menu-highlight:focus-visible {
  transform: translateY(-1px);
  background: #0e211f;
  color: #ffffff;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: 0 18px 40px -28px rgba(19, 44, 42, 0.6);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-1px);
  background: #0e211f;
}

.nav-cta.is-active {
  background: #0e211f;
}

main {
  padding-top: var(--header-height);
}

.section {
  padding-block: clamp(3.5rem, 4vw + 2rem, 6rem);
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.section-primary {
  background: var(--bg);
}

.section-alt {
  background: #f1f1f4;
}

.about {
  margin-top: clamp(3rem, 5vw, 4.5rem);
}

.section-header {
  max-width: min(820px, 92vw);
  margin: 0 auto clamp(2.5rem, 3vw + 1.5rem, 3.5rem);
  text-align: center;
  display: grid;
  gap: 1.2rem;
}

#painting-title,
#drawing-title,
#pleinair-title {
  font-weight: 700;
}

.section-lead {
  color: var(--text-soft);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(520px, 85vh, 900px);
  padding-block: clamp(4rem, 8vw, 8rem);
  color: #ffffff;
  background-image: url('/painting/IMG_20240916_231826.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}


.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.hero::after {
  content: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-inner {
  width: min(720px, 92vw);
  display: grid;
  gap: 1.5rem;
  text-align: left;
  top: 7mm;
}

@media (min-width: 768px) {
  .hero {
    background-image: url('/images/IMG_20251004_13431397.jpg');
  }

  .hero::before {
    background: rgba(0, 0, 0, 0.35);
  }
}

.hero-eyebrow {
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.24em;
  font-weight: 400;
  color: #fafafa;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-lead {
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.25rem);
  font-weight: 500;
}

.hero h1 {
  font-weight: 700;
}

.hero h1,
.hero .hero-lead,
.hero p {
  color: #ffffff;
  background: transparent !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.hero__title {
  color: #ffffff;
  background: transparent !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}

.hero-cta {
  justify-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 2.3rem;
  border-radius: 999px;
  background: #716a86;
  color: #ffffff;
  font-weight: 400;
  box-shadow: 0 16px 34px -28px rgba(74, 58, 112, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px -30px rgba(66, 52, 102, 0.46);
  background: #5f5674;
}

.gallery {
  width: min(1180px, 94vw);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-flow: dense;
  justify-items: center;
  align-items: center;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.gallery-item[data-hidden='true'] {
  display: none;
}

.gallery-item--wide {
  grid-column: 1 / -1;
}

@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: auto;
    padding-block: clamp(0.75rem, 1vw + 0.5rem, 1rem);
    background: rgba(250, 250, 250, 0.94);
    backdrop-filter: blur(16px);
  }

  .site-nav {
    max-width: none;
    margin: 0;
    padding-inline: clamp(1rem, 4vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 3vw, 1.25rem);
  }

  .logo {
    text-align: left;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.95rem;
    margin-top: clamp(0.75rem, 2vw, 1rem);
    padding: 1.4rem clamp(1.1rem, 3vw, 1.6rem);
    background: rgba(250, 250, 250, 0.98);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
  }

  .menu li {
    width: 100%;
  }

  .menu a {
    display: block;
    width: 100%;
    font-size: 1.05rem;
    padding-block: 0.35rem;
  }

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

  .menu a.menu-highlight {
    width: 100%;
  }

  .nav-cta {
    display: none;
    width: 100%;
    justify-content: center;
    margin-top: 0.75rem;
  }

  .site-nav.is-open {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open .nav-toggle {
    align-self: flex-end;
  }

  .site-nav.is-open .menu {
    display: flex;
  }

  .site-nav.is-open .nav-cta {
    display: inline-flex;
  }

  main {
    padding-top: calc(var(--header-height) + 1.5rem);
  }
}

.gallery-item a {
  display: block;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.gallery-item figcaption {
  padding: 0;
  font-size: 1.1rem;
  color: var(--text);
  text-align: center;
}

.gallery-controls {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
}

.gallery-toggle {
  border: 1px solid rgba(19, 44, 42, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2.1rem;
  border-radius: 999px;
  background: rgba(19, 44, 42, 0.92);
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 12px 28px -24px rgba(19, 44, 42, 0.55);
  position: relative;
  animation: gallery-gentle-bounce 3.4s ease-in-out infinite;
}

.gallery-toggle:hover,
.gallery-toggle:focus-visible {
  background: var(--accent);
  border-color: rgba(19, 44, 42, 0.28);
  box-shadow: 0 16px 34px -26px rgba(19, 44, 42, 0.6);
}

.gallery-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.gallery-toggle::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(19, 44, 42, 0.12);
  opacity: 0;
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.gallery-toggle:hover::after,
.gallery-toggle:focus-visible::after {
  opacity: 1;
  box-shadow: 0 0 0 8px rgba(19, 44, 42, 0.08);
}

@keyframes gallery-gentle-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-7px) scale(1.03);
  }
  55% {
    transform: translateY(-3px) scale(1.01);
  }
}

@media (max-width: 640px) {
  .gallery-toggle {
    width: auto;
    min-width: 70%;
    align-self: center;
    padding-inline: 2.1rem;
  }
}

.section-divider {
  width: min(1480px, 100vw);
  height: 1px;
  margin: clamp(2.5rem, 4vw, 3.5rem) auto;
  background: linear-gradient(90deg, rgba(19, 44, 42, 0), rgba(19, 44, 42, 0.85), rgba(19, 44, 42, 0));
  border-radius: 999px;
}

.gallery-item:hover img,
.gallery-item:focus-within img {
  transform: scale(1.05);
}

.contact-icons {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.65rem, 1.4vw, 1.1rem);
  flex-wrap: nowrap;
}

.contact-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0e211f;
  box-shadow: 0 16px 32px -28px rgba(19, 44, 42, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.contact-icon-link:hover,
.contact-icon-link:focus-visible {
  transform: translateY(-4px);
  background: var(--accent);
  box-shadow: 0 24px 48px -28px rgba(19, 44, 42, 0.85);
}

.contact-icon-link[data-brand='telegram'] {
  background: #27a7e3;
}

.contact-icon-link[data-brand='vk'] {
  background: #2787f5;
}

.contact-icon-link[data-brand='telegram']:hover,
.contact-icon-link[data-brand='telegram']:focus-visible {
  background: #1d8ecc;
}

.contact-icon-link[data-brand='vk']:hover,
.contact-icon-link[data-brand='vk']:focus-visible {
  background: #1d6ee0;
}

.contact-icon {
  width: 28px;
  height: 28px;
  display: block;
}

#about .about-grid {
  width: min(1180px, 94vw);
  margin: 0 auto;
  display: grid;
  /* Первая карточка шире (2 доли), две остальные занимают по одной */
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  /* Все карточки вытягиваются по одной высоте */
  align-items: stretch;
}

#about .about-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-soft);
  text-align: left;
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#about .about-card h3 {
  color: var(--text);
  margin: 0;
}

#about .about-card p {
  margin: 0;
}

#about .about-card ul {
  color: var(--text-soft);
  padding-left: 1.2rem;
  margin: 0;
}

#about .about-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

/* Иконки внутри карточек: круглое поле с контрастным знаком */
.about-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  margin-right: 0.75rem;
}

.about-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.study-contacts {
  margin: clamp(1.6rem, 2.4vw, 2.2rem) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.study-contacts li {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
  font-weight: 500;
  color: var(--text);
  font-size: 1rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(19, 44, 42, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px -36px rgba(19, 44, 42, 0.28);
}

.study-contact-label {
  display: block;
  font-family: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--accent);
}

.study-contacts a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(19, 44, 42, 0.2);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.study-contacts a:hover,
.study-contacts a:focus-visible {
  color: #0e211f;
  border-color: #0e211f;
}

.site-footer {
  background: var(--accent);
  color: #ffffff;
  padding: 1.5rem clamp(1.5rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-left {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

.footer-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.footer-right a {
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1024px) {
  .site-nav {
    gap: 1rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  main {
    padding-top: calc(var(--header-height) + 1.5rem);
  }

  .section-divider {
    width: min(560px, 92vw);
    background: linear-gradient(90deg, rgba(19, 44, 42, 0), rgba(19, 44, 42, 0.85), rgba(19, 44, 42, 0));
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #about .about-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.2rem, 4vw, 2rem);
  }

  #about .about-card {
    padding: clamp(1.6rem, 2.5vw, 2rem);
    flex: none;
  }

  .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
  }

  .contact-icons {
    flex-wrap: wrap;
  }

  .hero-inner {
    text-align: left;
    gap: 1.3rem;
  }
}

@media (max-width: 600px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    min-height: 520px;
  }

  .hero-eyebrow {
    font-size: 0.8rem;
  }
}
