/* =========================================
   FONT IMPORTS
========================================= */
/* @import url('https://fonts.googleapis.com/css2?family=Cardo:wght@400;700&family=Montserrat:wght@300;400;500;600;700&display=swap'); */

/* =========================================
   COLOR PALETTE
========================================= */
:root {
  --gold: #c6a667;
  --gold-light: #e4d3a3;
  --olive: #8a9970;
  --olive-light: #aebd94;
  --dark: #23241f;
  --light: #f7f7f2;
  --white: #ffffff;
  --shadow-soft: 0 10px 40px rgba(0,0,0,0.06);
  --radius: 14px;
}

/* =========================================
   GLOBAL RESET & TYPOGRAPHY
========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body {
  background: var(--light);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  user-select: none;
}

::-webkit-scrollbar{
width:8px;
}

::-webkit-scrollbar-track{
background:#111;
}

::-webkit-scrollbar-thumb{
background:#888;
border-radius:10px;
}

*{
scrollbar-width:thin;
scrollbar-color:#888 #111;
}

h1, h2, h3 {
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
}

h2 {
  font-size: 42px;
  margin-bottom: 30px;
}

img {
  max-width: 100%;
  display: block;
  user-select: none;
  pointer-events: none;
}

.subtitle, .hero-subtitle {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.4rem;
}

nav a,
.button {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =========================================
   CONTAINER
========================================= */
.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

/* =========================================
   HEADER (GLASS EFFECT)
========================================= */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 0;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-soft);
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */
.logo {
  font-family: "Cinzel", serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: 1px;
}

.logo a {
  text-decoration: none;
  color: var(--dark);
}

/* NAV */
.nav a {
  margin-left: 25px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: 0.25s;
}

.nav a:hover {
  color: var(--olive);
}

@media (max-width: 900px) {
    .header .nav {
        display: none;
    }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-link {
  width: 22px;
  height: 22px;
  color: #23241f;
  opacity: 0.8;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.icon-link svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.icon-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.icon-link.facebook {
  margin-top: -3px;
}

.icon-link.phone {
  margin-left: 6px;
}


/* Animation */
.reveal {
  opacity: 0;
  transition:
    opacity .9s cubic-bezier(.22,.61,.36,1),
    transform .9s cubic-bezier(.22,.61,.36,1);
}

.reveal.left {
  transform: translateX(-60px);
}

.reveal.right {
  transform: translateX(60px);
}

.reveal.visible {
  opacity: 1;
  transform: translateX(0);
}


.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-left: 8%;
  padding-right: 8%;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.95;          
  filter: contrast(0.9) brightness(1.05);
  z-index: -1;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CONTENT BLOCK */
.hero-content {
  text-align: center;
  max-width: 708px;
  width: 100%;
  padding: 40px 50px;
  /* background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 22px;
  box-shadow: 0 25px 70px rgba(0,0,0,0.13);
  animation: fadeInUp 1s ease forwards; */
}

.hero h1 {
  font-size: 82px;
  font-family: "Cinzel", serif;
  margin-bottom: 20px;
  letter-spacing: 1px;
  line-height: normal;
  color: #2a2a29;
}

.hero h1 span {
  color: var(--olive);
  font-weight: 700;
}

.hero p {
  font-size: 22px;
  color: #4a4a44;
  margin-bottom: 25px;
}

.hero h1,
.hero p {
  text-shadow:
    0 2px 12px rgba(0,0,0,0.45),
    0 1px 2px rgba(0,0,0,0.3);
}

/* BUTTON */
.btn.primary {
  padding: 14px 36px;
  font-size: 16px;
  display: inline-block;
  background: var(--olive);
  color: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(138,153,112,0.28);
  transition: 0.3s ease;
}

.btn.primary:hover {
  background: var(--gold);
  transform: translateY(-3px);
}

.hero-title,
.hero-text,
.hero-btn {
  opacity: 0;
}

/* ANIMATION */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title.visible {
  opacity: 1;
  animation:
    fadeIn .3s ease forwards,
    typeIn 1.2s steps(30, end) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-text.visible,
.hero-btn.visible {
  opacity: 1;
  transform: translateY(0);
  transition: .9s ease;
}

@keyframes typeIn {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* BUTTONS */
.btn {
  padding: 12px 26px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: 0.3s;
  text-decoration: none;
  display: inline-block;
}

.primary {
  background: var(--olive);
  color: var(--white);
}

.primary:hover {
  background: var(--gold);
}

.secondary {
  background: var(--white);
  color: var(--dark);
  border: 2px solid var(--olive);
}

.secondary:hover {
  background: var(--olive-light);
}

.center {
  display: block;
  width: fit-content;
  margin: 0 auto;
  text-align: center;
}

/* =========================
   ABOUT SECTION
========================= */
.about {
  padding: 120px 0;
}

.about-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 120px;
}

.about-row:last-child {
  margin-bottom: 0;
}

/* TEXT */
.about-text {
  text-align: left;
}

.about-text h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin-bottom: 24px;
}

.about-text h2 span {
  color: var(--olive);
}

.about-text p {
  margin-bottom: 20px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* IMAGE */
.about-image {
  width: 100%;
}

.about-image-box {
  width: 100%;
  height: 420px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.about-row.reverse .about-text {
  order: 2;
}

.about-row.reverse .about-image {
  order: 1;
}

.reveal.left {
  transform: translateX(-60px);
}

.reveal.right {
  transform: translateX(60px);
}

.reveal.visible {
  opacity: 1;
  transform: translateX(0);
}

.about-text.reveal {
  transition:
    opacity 1.8s ease,
    transform 1.6s ease;
}

.about-image.reveal {
  transition:
    opacity 1.8s ease,
    transform 1.6s ease;
}

.btn.secondary {
  transition: 0.8s ease;
  margin-top: 10px;
}

.btn.secondary:hover {
  transform: translateY(-3px);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
  .about {
    padding: 60px 0;
  }
  .about-row {
    gap: 20px;
  }

  .about-row {
    grid-template-columns: 1fr;
    margin-bottom: 80px;
  }

  .about-text {
    text-align: center;
    margin: 0 auto;
  }

  .about-image-box {
    max-width: 576px;
    margin: 0 auto;
    height: 500px;
  }

  .about-row.reverse .about-text,
  .about-row.reverse .about-image {
    order: unset;
  }
}

/* =========================================
   STORY (TIMELINE)
========================================= */
.story {
  padding: 120px 0;
  background-color: #EDEAEA;
}

.story h2 {
  text-align: center;
}

.story p {
  text-align: center;
}

.story-wrap {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
}

/* AUTHOR PHOTO FIX */
.author-photo {
  flex: 0 0 408px;
  min-width: 408px;
}

.author-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* TIMELINE LIST */
.timeline {
  flex: 1;
  position: relative;
}

.timeline .item {
  padding: 20px 25px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
  margin-bottom: 25px;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity .9s ease,
    transform .9s ease;
}

.timeline .item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline .item.left {
  border-left: 5px solid var(--olive);
}

.timeline .item.right {
  border-left: 5px solid var(--gold);
}

.highlight {
  background: var(--gold-light) !important;
}

/* DIVIDER BETWEEN PARAGRAPHS */
.timeline .item:after {
  content: "✦";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--olive);
}

.timeline .item,
.story-full .item {
  position: relative;
}

.timeline .item::before,
.story-full .item::before {
  content: attr(data-year);
  position: absolute;
  top: -33px;
  left: 8px;
  font-size: 42px;
  font-weight: 600;
  opacity: 0.18;
  pointer-events: none;
}

.btn.show-more {
  transition: 0.8s ease;
  text-align: center;
  margin-top: 35px;
  font-size: 16px;
  min-width: 161px;
}

.btn.show-more:hover {
  transform: translateY(-3px);
}

@media (min-width: 1601px) {
    .story {
        padding: 120px 0;
        background-color: #EAE2D9;
        }
}

.story-full {
  position: absolute;
  left: -9999px;
  top: 0;

  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

@media (max-width: 1216px) {
  .hide-after-1216 {
    display: none;
  }

  .timeline {
    margin-top: 60px;
  }

  .story-full {
    position: static;
    left: auto;

    display: grid;
    gap: 25px;
    margin-top: 40px;

    opacity: 1;
    pointer-events: auto;
    overflow: visible;
  }

  .story-full .item {
    padding: 20px 25px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius);
    margin-bottom: 25px;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition:
      opacity .9s ease,
      transform .9s ease;
  }

  .story-full .item.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .story-full .item.left {
    border-left: 5px solid var(--olive);
  }

  .story-full .item.right {
    border-left: 5px solid var(--gold);
  }
}

/* =========================================
   GALLERY
========================================= */
.works {
  padding: 120px 0;
  text-align: center;
}

.gallery {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.card {
  height: 425px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease;

  background-size: cover;
  background-position: 50% 30%;
}

/* светлая подсветка сверху */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.15), rgba(255,255,255,0.15));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card:hover::after {
  opacity: 1;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  background-size: cover;
  background-position: center;

  transition:
    opacity .85s cubic-bezier(.22,.61,.36,1),
    transform .85s cubic-bezier(.22,.61,.36,1),
    box-shadow .5s ease,
    background-position .3s ease;
}

.gallery-item:active {
  transform: scale(0.97);
}

/* появляется в сетке, но ещё скрыта */
.gallery-item.pre-visible {
  display: block;
  opacity: 0;
  transform: translateY(20px);
}

/* финальная фаза */
.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
  /* transition:
    opacity .85s cubic-bezier(.22,.61,.36,1),
    transform .85s cubic-bezier(.22,.61,.36,1); */
}

.gallery-item:nth-child(4) {
  background-position: 50% 20%;
}
.gallery-item:nth-child(7) {
  background-position: 100% 10%;
}
.gallery-item:nth-child(12) {
  background-position: 100% 3%;
}
.gallery-item:nth-child(18) {
  background-position: 11% 100%;
}
.gallery-item:nth-child(20) {
  background-position: 100% 10%;
}
.gallery-item:nth-child(33) {
  background-position: 100% 20%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.show-more {
  background: var(--olive);
  color: var(--white);
  /* margin: 40px auto 0; */
  text-align: center;
  padding: 16px 30px;
  appearance: none;
  border: none;
}

.show-more:active,
.show-more:focus {
  background: var(--olive);
  color: var(--white);
  outline: none;
}

.show-more:hover {
  background: var(--gold);
}

@media (hover: hover) {
  .gallery-item:hover {
    transform: scale(1.04);
    box-shadow:
      0 25px 50px rgba(0,0,0,.35);
  }
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
}

.modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  cursor: pointer;
  z-index: 1;
}

.modal-content {
  position: relative;
  z-index: 2;
}

/* =========================================
   FOOTER
========================================= */
.footer {
  background: var(--olive-light);
}

.footer h2 {
  text-align: center;
  padding-top: 30px;
  margin-bottom: 15px;
}

.footer p {
  text-align: center;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

.footer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.media-box {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2; /* можно 16/9 или 4/3 */
  border-radius: var(--radius);
  overflow: hidden;
}

.media-box img,
.media-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.map-wrapper iframe {
  width: 100%;
  height: 220px;
  border-radius: var(--radius);
}

.map-address {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(255,255,255,0.9);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.footer-subscribe {
  margin-top: 80px;
  text-align: center;
  padding-bottom: 30px;
}

.footer-subscribe h4 {
  margin-bottom: 20px;
  font-size: 20px;
}

.subscribe-form {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  padding: 0 16px; /* ВАЖНО */
}

.subscribe-form input {
  flex: 1;
  min-width: 0; /* ключевая строка */
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid #ccc;
  font-size: 16px;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 28px;
}

.footer-socials .icon-link {
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.05);
}

.footer-socials .icon-link.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .6s ease,
    transform .6s ease;
}

.footer-socials .icon-link.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-socials .icon-link.visible {
  opacity: 1;
}


@media (max-width: 420px) {
  .subscribe-form {
    flex-direction: column;
    text-align: center;
  }

  .subscribe-form button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .footer-subscribe {
    padding-bottom: 20px;
  }

  .footer-socials {
    margin-top: 36px;
  }
}

/* =========================================
   ANIMATIONS
========================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 1600px) {
    .hero-content {
      margin-top: 60px;
    }
    .hero h1 {
      font-size: 58px;
      margin-bottom: 20px;
      letter-spacing: 1px;
      line-height: normal;
      color: #2a2a29;
    }

    .hero h1 span {
      color: var(--olive);
      font-weight: 700;
    }

    .hero p {
      font-size: 19px;
      color: #4a4a44;
      margin-bottom: 25px;
    }
}
/* Small desktop */
@media (max-width: 1280px) {
    .hero {
      padding-left: 5%;
      padding-right: 5%;
    }
    .hero-content {
      padding: 0;
      max-width: 520px;
    }
    .hero h1 {
      font-size: 53px;
      margin-bottom: 20px;
      letter-spacing: 1px;
      line-height: normal;
      color: #2a2a29;
    }

    .hero h1 span {
      color: var(--olive);
      font-weight: 700;
    }

    .hero p {
      font-size: 19px;
      color: #4a4a44;
      margin-bottom: 25px;
    }

    .hero h1,
    .hero p {
      color: #f5f5f0;
      text-shadow:
        0 2px 12px rgba(0,0,0,1.45),
        0 1px 2px rgba(0,0,0,0.6);
    }
  
    .hero-img img {
      object-position: 88% center;
  }
}

@media (max-width: 1250px) {
  .author-photo {
    flex: 0 0 300px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .hero-img img {
    object-position: 60% center;
  }
}

@media (max-width: 900px) {
  .hero-img img {
    object-position: 63% center;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .story-wrap {
    flex-direction: column;
  }

  .timeline {
    margin-top: 0;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .author-photo {
    flex: 0 0 100%;
  }
  .author-photo img {
    width: 100%;
    height: auto;
  }
  .story-full {
    display: grid;
    gap: 25px;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  .logo {
    font-size: 20px;
  }
  .hero {
    display: flex;
    align-items: center;
    padding-left: 4%;
    padding-right: 4%;
    padding-top: 50px;
  }
  .hero-content {
    text-align: center;
    max-width: 550px;
    margin: 0 auto;
    width: 100%;
    padding: 40px 0px;
    animation: fadeInUp 1s ease forwards;
  }
  .hero-text {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
    border-radius: var(--radius);
    box-shadow: 0 25px 70px rgba(0,0,0,0.13);
  }
  .hero-img {
    object-fit: cover;
    object-position: left center;
  }

  .hero-img img {
    object-position: 31% center;
  }
  .hero h1 {
    font-size: 29px;
  }
  .btn.primary {
    font-size: 15px;
    min-width: 170px;
    padding: 12px 25px;
  }
  h2 {
    font-size: 25px;
  }
  h4 {
    font-size: 19px;
  }
  .about {
    padding: 60px 0;
  }

  .btn.center {
    font-size: 15px;
  }

  .btn.show-more {
    font-size: 15px;
  }

  .story {
    padding: 60px 0;
  }

  .works {
    padding: 60px 0;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .gallery-item {
    width: 100%;
    max-width: 376px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .hero-img img {
    object-position: 18% center;
  }

  .author-photo {
    min-width: 300px;
  }
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  animation: zoomIn 0.35s ease;
}

/* NAV */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 44px;
  cursor: pointer;
  transition: 0.25s;
}

.modal-nav:hover {
  background: transparent;
}

.modal-nav.prev { left: 40px; }
.modal-nav.next { right: 40px; }

/* CLOSE */
.modal-close {
  position: absolute;
  top: 60px;
  right: 8px;
  background: transparent;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {
  .modal-nav.prev { left: 15px; }
  .modal-nav.next { right: 15px; }
}

/* ANIMATION */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;

  background: radial-gradient(
    circle,
    rgba(160,170,120,0.35) 0%,
    rgba(160,170,120,0.18) 30%,
    rgba(160,170,120,0.08) 55%,
    rgba(160,170,120,0.02) 75%,
    transparent 80%
  );

  filter: blur(25px);
  mix-blend-mode: multiply;

  transform: translate(-50%, -50%);
}
