/* Mobile-first base styles. Breakpoints layer on top as the viewport grows. */

:root {
  --color-bg: #f7f2e7;
  --color-bg-card: #fffdf8;
  --color-bg-alt: #e7ecdd;
  --color-text: #2a2620;
  --color-muted: #6c6455;
  --color-accent: #b9924f;
  --color-accent-dark: #8f6f39;
  --color-accent-light: #dcbd85;
  --color-sage: #8a9a71;
  --color-sage-deep: #556140;
  --color-border: rgba(42, 38, 32, 0.14);
  --color-dark-bg: #2c2418;
  --color-dark-text: #f7f2e7;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --container-width: 1100px;
  --radius: 4px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

p {
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
}

a {
  color: inherit;
}

ul {
  padding-left: 1.2rem;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

/* Scroll reveal — elements fade/slide in as they enter the viewport (see js/reveal.js) */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@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;
  }
}

/* Buttons */

.button {
  display: inline-block;
  padding: 0.85rem 1.85rem;
  border-radius: var(--radius);
  background: var(--color-dark-bg);
  color: var(--color-bg);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-size: 0.92rem;
  transition: background 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.button:hover {
  background: var(--color-sage-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -16px rgba(36, 31, 28, 0.45);
}

.button-outline {
  background: transparent;
  border: 1.5px solid var(--color-dark-bg);
  color: var(--color-dark-bg);
}

.button-outline:hover {
  background: rgba(44, 36, 24, 0.08);
  transform: translateY(-2px);
  box-shadow: none;
}

.button-outline.on-dark {
  border-color: rgba(247, 242, 231, 0.75);
  color: var(--color-bg);
}

.button-outline.on-dark:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Header / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s ease;
}

/* Blur lives on a pseudo-element (not on .site-header itself) so the header
   doesn't become a containing block for its position:fixed nav descendant —
   backdrop-filter on an ancestor otherwise traps the fixed mobile nav panel
   inside the header's box instead of the viewport. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 242, 231, 0.92);
  backdrop-filter: blur(8px);
}

.site-header.scrolled {
  box-shadow: 0 8px 24px -16px rgba(36, 31, 28, 0.25);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--color-text);
  text-decoration: none;
}

.logo-icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lang-switch {
  display: flex;
  border: 1px solid var(--color-text);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn.active {
  background: var(--color-dark-bg);
  color: var(--color-bg);
}

.nav-toggle {
  position: relative;
  z-index: 70;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  /* Must stay below .site-header's z-index (40): .primary-nav is nested
     inside the header, so its own z-index only ranks within the header's
     stacking context — a higher value here would still cover the header
     (and the nav panel inside it) at the root stacking level. */
  z-index: 35;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.primary-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 82%);
  background: var(--color-bg-card);
  padding: calc(var(--space-4) + 1.5rem) var(--space-3) var(--space-3);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -16px 0 40px -20px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
  z-index: 60;
}

.primary-nav.open {
  transform: translateX(0);
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav li + li {
  margin-top: var(--space-2);
}

.primary-nav a {
  position: relative;
  text-decoration: none;
  font-size: 1.15rem;
  transition: color 0.2s ease;
}

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

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

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

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 70vh;
  padding: 150px 0 70px;
  color: var(--color-dark-text);
  background: url("../assets/gallery/entrance-01.jpg") center 32% / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 24, 15, 0.25) 0%, rgba(30, 24, 15, 0.6) 65%, rgba(20, 16, 10, 0.9) 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero .eyebrow {
  color: var(--color-accent-light);
}

.hero h1,
.hero p,
.hero .hero-ctas {
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards;
}

.hero h1 {
  animation-delay: 0.1s;
}

.hero p {
  animation-delay: 0.3s;
}

.hero .hero-ctas {
  animation-delay: 0.5s;
}

.hero h1 {
  font-style: italic;
  font-size: clamp(2rem, 6vw, 3.4rem);
  color: #fff;
}

.hero p {
  color: #ece4d2;
  max-width: 480px;
  font-size: 1.02rem;
}

.hero-ctas {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-hero {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-bg));
  text-align: center;
}

.page-hero h1 {
  font-style: italic;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.page-hero p {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Generic content sections */

.section {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
}

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

.section.dark {
  background: var(--color-dark-bg);
  color: var(--color-dark-text);
  border-top-color: transparent;
}

.section.dark p {
  color: #c9c1ae;
}

.section-head {
  max-width: 620px;
  margin: 0 auto var(--space-4);
  text-align: center;
}

.section-head h2 {
  font-style: italic;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
}

.prose {
  max-width: 65ch;
}

/* Why-us (dark, numbered) */

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.why-item {
  text-align: center;
}

.why-item .why-num {
  display: block;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-accent-light);
  font-size: 1.6rem;
  margin-bottom: var(--space-1);
}

.why-item h3 {
  color: var(--color-dark-text);
  font-size: 1.05rem;
}

.why-item p {
  font-size: 0.92rem;
  margin: 0;
}

/* CTA banner */

.cta-banner {
  text-align: center;
  padding: var(--space-5) 0;
  background: var(--color-sage-deep);
  color: var(--color-dark-text);
}

.cta-banner h2 {
  font-style: italic;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  max-width: 620px;
  margin: 0 auto var(--space-2);
}

.cta-banner p {
  max-width: 480px;
  margin: 0 auto var(--space-3);
  color: #e2e6d8;
}

/* Cards / grids */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.card {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 20px 36px -20px rgba(36, 31, 28, 0.25);
  border-color: var(--color-accent-light);
}

.card h3 {
  font-style: italic;
  font-size: 1.1rem;
}

.teaser-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--color-sage-deep);
  font-weight: 500;
}

.photo-card {
  padding: 0;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: saturate(0.94) contrast(1.02);
}

.photo-card h3,
.photo-card p,
.photo-card .card-link,
.photo-card .button {
  margin-left: var(--space-3);
  margin-right: var(--space-3);
}

.photo-card h3 {
  margin-top: var(--space-2);
}

.photo-card p:last-of-type {
  margin-bottom: var(--space-1);
}

.photo-card .card-link {
  display: block;
  margin-bottom: var(--space-3);
}

.photo-card .button {
  margin-bottom: var(--space-3);
}

.price-unit {
  font-size: 0.7em;
  font-weight: 500;
  color: var(--color-muted);
}

/* Pricing */

.pricing-card .price {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--color-sage-deep);
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.prahova-map {
  height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  margin-bottom: var(--space-4);
  font-size: 0.9rem;
}

.map-legend-swatch {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 3px;
  background: rgba(138, 154, 113, 0.25);
  border: 2px solid var(--color-sage);
  flex-shrink: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  font-size: 0.96rem;
  padding: 0.7rem 0.75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  transition: border-color 0.3s ease;
  resize: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form button {
  align-self: flex-start;
  margin-top: var(--space-1);
}

#contactStatus {
  color: var(--color-sage-deep);
  font-weight: 600;
  min-height: 1.2em;
}

.contact-info {
  background: var(--color-dark-bg);
  color: var(--color-dark-text);
  border-radius: var(--radius);
  padding: var(--space-3);
  height: fit-content;
}

.contact-info h2 {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-dark-text);
}

.contact-info p {
  color: #e6e0d0;
}

.contact-info a {
  color: var(--color-accent-light);
}

/* Gallery */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.filter-btn {
  border: 1px solid var(--color-border);
  background: transparent;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--color-dark-bg);
  border-color: var(--color-dark-bg);
  color: var(--color-bg);
}

.gallery-category-title {
  font-style: italic;
  text-align: center;
  margin-top: var(--space-4);
  scroll-margin-top: calc(var(--space-4) + 60px);
}

.gallery-category-title:first-of-type {
  margin-top: var(--space-3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.gallery-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  margin: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.94) contrast(1.02);
  transition: transform 0.5s ease;
}

.gallery-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(36, 31, 28, 0.35);
}

.gallery-tile:hover img {
  transform: scale(1.07);
}

.gallery-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-2);
  background: linear-gradient(0deg, rgba(20, 16, 10, 0.8), transparent);
  color: #fff;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-tile:hover .gallery-cap {
  opacity: 1;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  background: rgba(20, 16, 10, 0.92);
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
}

.lightbox-inner img {
  display: block;
  max-height: 76vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 2px;
}

.lb-caption {
  color: var(--color-dark-text);
  text-align: center;
  font-family: var(--font-heading);
  font-style: italic;
  margin: var(--space-2) 0 0;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.2s ease;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lb-close {
  top: -52px;
  right: 0;
}

.lb-prev {
  left: -52px;
  top: 40%;
}

.lb-next {
  right: -52px;
  top: 40%;
}

@media (max-width: 880px) {
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-close { top: 6px; right: 6px; }
}

/* Footer */

.site-footer {
  padding: var(--space-4) 0 var(--space-3);
  background: var(--color-dark-bg);
  color: #c9c1ae;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--color-dark-text);
  text-decoration: none;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #c9c1ae;
  margin: 0;
}

.footer-content p {
  color: #c9c1ae;
  opacity: 0.8;
  margin: 0;
}

.footer-links,
.footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.footer-links a,
.footer-social a {
  text-decoration: none;
  color: var(--color-dark-text);
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-links a:hover,
.footer-social a:hover {
  opacity: 1;
  color: var(--color-accent-light);
}

/* Tablet and up */
@media (min-width: 640px) {
  .header-bar {
    flex-wrap: wrap;
  }

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

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

  .contact-layout {
    grid-template-columns: 3fr 2fr;
  }

  .contact-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop and up */
@media (min-width: 960px) {
  .header-bar {
    justify-content: flex-start;
    gap: var(--space-3);
  }

  .nav-toggle {
    display: none;
  }

  .nav-overlay {
    display: none;
  }

  .primary-nav {
    order: 2;
    margin-left: auto;
    position: static;
    width: auto;
    background: transparent;
    padding: 0;
    transform: none;
    box-shadow: none;
    overflow: visible;
    z-index: auto;
  }

  .header-actions {
    order: 3;
  }

  .primary-nav ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    gap: var(--space-3);
  }

  .primary-nav li + li {
    margin-top: 0;
  }

  .primary-nav a {
    font-size: 0.95rem;
  }

  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .hero h1 {
    font-size: 3.4rem;
  }
}
