:root {
  --primary: #1a1a1a;
  --secondary: #f8f8f8;
  --accent: #9c8158;
  --accent-dark: #876e4a;
  --text: #333333;
  --light-gray: #e5e5e5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cormorant Garamond', serif;
}

body {
  color: var(--text);
  line-height: 1.6;
  background-color: var(--secondary);
}

/* ===== Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 2rem;
  gap: 2rem;
}

.logo {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 2px;
  text-decoration: none;
  white-space: nowrap;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  list-style: none;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  font-size: 1.1rem;
  transition: color 0.3s;
  letter-spacing: 1px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

@keyframes zoomEffect {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-bg--zoom {
  animation: zoomEffect 20s ease-in-out infinite alternate;
}

.hero-content {
  text-align: center;
  z-index: 2;
  color: white;
  padding: 2rem;
}

.hero-eyebrow {
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 3px;
  font-size: 1.1rem;
  transition: all 0.3s;
  border: 2px solid var(--accent);
}

.cta-button:hover {
  background: transparent;
  color: white;
}

.cta-button--ghost {
  background: transparent;
}

/* Scroll down indicator */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1.5rem;
  opacity: 0.7;
  z-index: 2;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* ===== Generic sections ===== */
section {
  padding: 6rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 400;
  color: var(--primary);
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 3rem;
  color: var(--text);
}

/* ===== Page hero (inner pages) ===== */
.page-title {
  text-align: center;
  padding: 10rem 2rem 4rem;
  background: var(--primary);
  color: white;
}

.page-title h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 400;
}

.page-title p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

.page-title .eyebrow {
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ===== Artwork grid (home) ===== */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.artwork-card {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  display: block;
}

.artwork-card:hover {
  transform: translateY(-5px);
}

.artwork-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.artwork-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 3rem 2rem 1.5rem;
  color: white;
  transform: translateY(35%);
  transition: transform 0.3s;
}

.artwork-card:hover .artwork-info {
  transform: translateY(0);
}

.artwork-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.artwork-artist {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ===== Grid page (expositions / artistes / collections) ===== */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  position: relative;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
}

.card-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-date {
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-title {
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.card-subtitle {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.card-description {
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  flex: 1;
}

.card-link {
  align-self: flex-start;
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.card-link:hover {
  color: var(--primary);
}

.card-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.status-current { background: #4caf50; color: white; }
.status-upcoming { background: var(--accent); color: white; }
.status-past { background: var(--light-gray); color: var(--text); }

.badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  background: rgba(26, 26, 26, 0.8);
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Portrait-style artist cards */
.card--portrait .card-image {
  height: 380px;
}

.card--portrait .card-content {
  text-align: center;
  align-items: center;
}

.card--portrait .card-description {
  text-align: center;
}

/* ===== About ===== */
.about-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  font-size: 1.15rem;
}

.about-heading {
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.about-text {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.value-item {
  margin-bottom: 2rem;
}

.value-title {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  margin-top: 2.5rem;
}

.team-member {
  text-align: center;
}

.member-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  background: var(--light-gray);
}

.member-name {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.member-position {
  color: var(--accent);
  font-style: italic;
  margin-bottom: 1rem;
}

/* ===== Contact ===== */
.contact-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-heading {
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.contact-text {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.info-item {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.info-icon {
  width: 24px;
  height: 24px;
  fill: var(--accent);
  flex-shrink: 0;
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.05rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}

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

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

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

.form-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #4caf50;
  min-height: 1.5rem;
}

/* ===== Virtual tour ===== */
.virtual-gallery {
  width: 100vw;
  height: 100vh;
  position: relative;
  perspective: 1000px;
  overflow: hidden;
}

.gallery-container {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1s ease;
}

.gallery-wall {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #faf7f2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  padding: 2rem;
  flex-wrap: wrap;
}

.north-wall { transform: translateZ(-50vw); }
.east-wall { transform: rotateY(90deg) translateZ(50vw); }
.south-wall { transform: rotateY(180deg) translateZ(50vw); }
.west-wall { transform: rotateY(-90deg) translateZ(50vw); }

.artwork-frame {
  width: 380px;
  height: 480px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.artwork-frame:hover {
  transform: scale(1.03);
}

.artwork-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artwork-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.artwork-frame:hover .artwork-info {
  transform: translateY(0);
}

.navigation-controls {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 100;
}

.nav-button {
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
  font-family: inherit;
}

.nav-button:hover {
  background: var(--primary);
}

.tour-hint {
  position: fixed;
  bottom: 7rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.6);
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  z-index: 100;
  white-space: nowrap;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.5s;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--light-gray);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Footer ===== */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 2rem;
  text-align: center;
}

.footer .logo {
  color: white;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

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

.footer-sub {
  font-size: 0.95rem;
  opacity: 0.7;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease-out;
}

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

/* ===== Responsive ===== */
@media (max-width: 968px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .page-title h1 {
    font-size: 2.2rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 260px;
    background: white;
    flex-direction: column;
    padding: 6rem 2rem;
    gap: 1.5rem;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

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

  .artwork-image {
    height: 320px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .artwork-frame {
    width: 80vw;
    height: auto;
    aspect-ratio: 4 / 5;
  }
}
