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

:root {
  --color-bg: #F1F5F5;
  --color-surface: #FFFFFF;
  --color-surface-alt: #E4EDED;
  --color-text: #1A2C2C;
  --color-muted: #5A7272;
  --color-primary: #6D8F8E;
  --color-primary-dark: #4A6A69;
  --color-accent: #4A6A69;
  --color-border: #CBD8D8;
  --shadow-soft: 0 14px 34px rgba(20, 35, 35, 0.10);
  --radius-sm: 0.5rem;
  --radius-md: 0.9rem;
  --radius-lg: 1.2rem;
  --container: 1120px;
  --font-title: "Cormorant Garamond", serif;
  --font-body: "Manrope", sans-serif;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    radial-gradient(circle at 18% 12%, rgba(109, 143, 142, 0.12), transparent 45%),
    radial-gradient(circle at 84% 84%, rgba(74, 106, 105, 0.10), transparent 50%),
    var(--color-bg);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-md);
}

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

ul {
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

main {
  padding-block: 2.5rem 4rem;
}

.home-main {
  padding-top: 0;
}

.section {
  margin-top: 2.8rem;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 1.2rem;
}

.section-title::before,
.section-title::after {
  content: none !important;
  display: none !important;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  background: var(--color-surface-alt);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background: rgba(109, 143, 142, 0.12);
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(241, 245, 245, 0.88);
  border-bottom: 1px solid var(--color-border);
}

.navbar {
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.logo-img {
  height: 2.8rem;
  width: auto;
  border-radius: var(--radius-sm);
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.15;
}

.logo-text em {
  font-style: normal;
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-item > a,
.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.82rem;
  border-radius: 999px;
  color: var(--color-muted);
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.nav-item > a:hover,
.dropdown-trigger:hover,
.nav-item > a.active {
  background: rgba(109, 143, 142, 0.14);
  color: var(--color-text);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 15rem;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  display: none;
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
}

.dropdown-menu a:hover {
  background: rgba(109, 143, 142, 0.14);
  color: var(--color-text);
}

.hamburger {
  display: none;
  border: 0;
  background: transparent;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 0.22rem auto;
  background: var(--color-text);
}

/* Hero */
.hero {
  min-height: calc(100vh - 4.4rem);
  display: grid;
  place-items: center;
}

.hero-shell {
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
}

.hero-copy {
  padding: 2rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.93), rgba(228, 237, 237, 0.85));
}

.hero-copy h1 {
  font-family: var(--font-title);
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.02;
  margin-bottom: 1.1rem;
}

.hero-highlights {
  margin-top: 1.75rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.hero-stat {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  padding: 0.65rem;
}

.hero-stat strong {
  display: block;
  font-size: 1.05rem;
}

.hero-image {
  min-height: 23rem;
  max-height: 50rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

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

/* Carousel */
.carousel {
  position: relative;
}

.carousel-track {
  position: relative;
  min-height: 350px;
}

.carousel-slide {
  display: none;
  height: 350px;
  object-fit: contain;
  width: 100%;
  cursor: pointer;
  border-radius: var(--radius-md);
}

.carousel-slide.active {
  display: block;
}

.carousel-controls {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.carousel-buttons {
  display: inline-flex;
  gap: 0.5rem;
}

.carousel-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.carousel-btn:hover {
  background: var(--color-surface-alt);
}

.carousel-indicators {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.carousel-indicators button {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 0;
  background: #A6BFBF;
  cursor: pointer;
}

.carousel-indicators button.active {
  background: var(--color-primary);
}

.feature-list {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.feature-list li {
  padding: 0.35rem 0.58rem;
  border: 1px dashed var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.anchor-nav {
  position: sticky;
  top: 5.15rem;
  z-index: 20;
  margin-bottom: 1rem;
  background: rgba(241, 245, 245, 0.95);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.55rem;
  overflow-x: auto;
}

.anchor-nav ul {
  display: flex;
  gap: 0.45rem;
  min-width: max-content;
}

.anchor-nav a {
  display: inline-block;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--color-muted);
  border: 1px solid transparent;
}

.anchor-nav a:hover {
  border-color: var(--color-border);
  color: var(--color-text);
}

.anchor-nav a.is-empty {
  opacity: 0.55;
  text-decoration: line-through;
}

.pieces-gallery-mode .section[id] {
  display: none;
}

.footer {
  margin-top: 3rem;
  padding: 1.1rem 0 2rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 550ms ease forwards;
}

.reveal.delay-1 {
  animation-delay: 100ms;
}

.reveal.delay-2 {
  animation-delay: 180ms;
}

.reveal.delay-3 {
  animation-delay: 260ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Breakpoints */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 4.4rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.7rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    margin-top: 0.2rem;
    box-shadow: none;
    border-style: dashed;
  }

  .hamburger {
    display: inline-block;
  }

  .hero {
    min-height: auto;
    padding-top: 1rem;
  }

  .hero-shell,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  main {
    padding-top: 1.7rem;
  }

  .section {
    margin-top: 2rem;
  }

  .card {
    padding: 0.95rem;
  }

  .section-title {
    font-size: 1.65rem;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.lightbox-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid white;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: all 0.2s;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    font-size: 1.5rem;
  }

  .lightbox-btn {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  .lightbox-counter {
    bottom: 0.75rem;
    font-size: 0.82rem;
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
