/* Variables */
:root {
  --neutral-100: #f5f5f5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a4;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
}

/* Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  /* Однакова ширина контенту з Live Server і PHP: резервуємо місце під скролбар */
  scrollbar-gutter: stable;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--neutral-900);
  color: var(--neutral-100);
  overflow-x: hidden;
  min-height: 100vh;
}

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

@keyframes fadeInImg {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Layout */
.site {
  min-height: 100vh;
}

.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition: all 0.5s ease;
  padding: 1.5rem 1.5rem;
}

.navbar.scrolled {
  background: rgba(23, 23, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--neutral-800);
}

.navbar-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  margin-right: 0.6rem;
  background: var(--amber-500);
  border-radius: 2px;
  transform: rotate(45deg);
}

.logo-icon-sm {
  width: 1.5rem;
  height: 1.5rem;
}

.logo-text {
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 3rem;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neutral-300);
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--amber-500);
}

.nav-cta {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--amber-500);
  color: var(--amber-500);
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  transition: all 0.3s;
}

.nav-cta:hover {
  background: var(--amber-500);
  color: var(--neutral-900);
}

@media (min-width: 768px) {
  .navbar {
    padding: 1.5rem 3rem;
  }
  .navbar.scrolled {
    padding: 0.75rem 3rem;
  }
  .nav-links {
    display: flex;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--neutral-800);
  padding-top: 6rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.4);
  transform: scale(1.05);
  transition: transform 10s ease;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 64rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-subtitle {
  font-size: 1rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--amber-500);
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

.hero-title {
  font-family: "Cinzel", serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.3s forwards;
}

.hero-title .accent {
  color: var(--amber-500);
}

.hero-desc {
  color: var(--neutral-300);
  font-size: 1.225rem;
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  font-weight: 300;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.6s forwards;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.9s forwards;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero-title {
    font-size: 5rem;
  }
  .hero-desc {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 6rem;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--amber-500);
  color: var(--neutral-900);
}

.btn-primary:hover {
  background: var(--amber-600);
}

.btn-outline {
  border: 1px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--neutral-900);
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-line {
  width: 1px;
  height: 4rem;
  background: linear-gradient(to bottom, var(--amber-500), transparent);
}

/* Section About */
.section-about {
  padding: 6rem 1.5rem;
  background: var(--neutral-900);
}

.section-about-inner {
  text-align: center;
}

.section-label {
  font-size: 0.875rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--amber-500);
  margin-bottom: 1rem;
}

.section-about-text {
  font-family: "Cinzel", serif;
  font-size: 1.675rem;
  line-height: 1.2;
  max-width: 56rem;
  margin: 0 auto 2rem;
}

.section-divider {
  width: 6rem;
  height: 1px;
  background: var(--amber-500);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .section-about-text {
    font-size: 3rem;
  }
}

/* Feature sections */
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-reverse {
  flex-direction: column;
}

.feature-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  flex-shrink: 0;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 1s ease;
}

.feature:hover .feature-image img {
  transform: scale(1.1);
}

.feature-content {
  width: 100%;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-content h3 {
  font-family: "Cinzel", serif;
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.feature-content p {
  color: var(--neutral-400);
  font-size: 1.225rem;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 2rem;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--amber-500);
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.feature-link span {
  transition: transform 0.2s;
}

.feature:hover .feature-link span {
  transform: translateX(0.5rem);
}

@media (min-width: 768px) {
  .feature-image {
    height: 450px;
  }
  .feature-content {
    padding: 6rem 3rem;
  }
  .feature-content h3 {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .feature {
    flex-direction: row;
    align-items: stretch;
  }
  .feature-normal .feature-image,
  .feature-normal .feature-content,
  .feature-reverse .feature-image,
  .feature-reverse .feature-content {
    width: 50%;
    flex: 0 0 50%;
  }
  .feature-reverse {
    flex-direction: row-reverse;
  }
  .feature-image {
    height: 500px;
    flex-shrink: 0;
  }
}

/* Gallery */
.section-gallery {
  background: var(--neutral-800);
  padding: 6rem 1.5rem;
}

.gallery-inner {
  max-width: 80rem;
  margin: 0 auto;
}

.gallery-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4rem;
}

.gallery-title {
  font-family: "Cinzel", serif;
  font-size: 2.25rem;
  font-weight: 700;
}

.gallery-desc {
  max-width: 28rem;
  color: var(--neutral-400);
  font-weight: 300;
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  min-height: 0;
  background: var(--neutral-700);
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s ease;
  opacity: 0;
}

.gallery-item img.loaded {
  opacity: 1;
  animation: fadeInImg 0.5s ease-out forwards;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 23, 0.8);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-category {
  color: var(--amber-500);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.gallery-overlay h4 {
  font-family: "Cinzel", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.gallery-line {
  width: 2.5rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .gallery-title {
    font-size: 3rem;
  }
  .gallery-header {
    flex-direction: row;
    align-items: flex-end;
  }
  .gallery-desc {
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Contact */
.section-contact {
  padding: 6rem 1.5rem;
  background: var(--neutral-900);
}

.contact-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

.contact-title {
  font-family: "Cinzel", serif;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.contact-desc {
  color: var(--neutral-400);
  margin-bottom: 3rem;
  max-width: 28rem;
  font-size: 1.1;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--neutral-800);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--amber-500);
}

.contact-item h4 {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--neutral-400);
}

.contact-form-wrap {
  background: var(--neutral-800);
  padding: 2rem;
  border: 1px solid var(--neutral-700);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neutral-500);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--neutral-900);
  border: 1px solid var(--neutral-700);
  padding: 0.75rem 1rem;
  color: var(--neutral-100);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--neutral-500);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--amber-500);
}

.form-group-error input,
.form-group-error textarea {
  border-color: #dc2626;
}

.form-group-error input:focus,
.form-group-error textarea:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.form-group textarea {
  resize: none;
}

.form-submit {
  width: 100%;
  background: var(--amber-500);
  color: var(--neutral-900);
  padding: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.form-submit:hover {
  background: var(--amber-600);
}

@media (min-width: 768px) {
  .contact-form-wrap {
    padding: 3rem;
  }
  .contact-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .contact-inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* Footer */
.footer {
  background: var(--neutral-950);
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--neutral-800);
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo .logo-text {
  font-size: 1.5rem;
}

.footer-copy {
  color: var(--neutral-500);
  font-size: 0.875rem;
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--neutral-400);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--amber-500);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
  }
}

/* Form success toast (simulated submit) */
.form-success-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1.5rem);
  background: var(--neutral-900);
  color: var(--amber-400);
  padding: 1.25rem 2.25rem;
  min-width: 18rem;
  max-width: min(22rem, calc(100vw - 2rem));
  border-radius: 0.75rem;
  border: 1px solid var(--amber-500);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(254, 243, 199, 0.08);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.form-toast-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--amber-400);
}

.form-toast-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.form-toast-text {
  flex: 1;
}

.form-success-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.form-error-toast {
  color: #fca5a5;
  border-color: #dc2626;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(220, 38, 38, 0.15);
}
