:root {
  --cream: #faf8f3;
  --beige: #e8dcc4;
  --brown: #8b7355;
  --dark-brown: #5c4a3a;
  --charcoal: #2c2520;
  --gold: #c9a961;
  --text: #2c2520;
  --text-light: #6b5d52;
}

/* Space Mono Font */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(https://design.penpot.app/internal/gfonts/font/spacemono/v17/i7dPIFZifjKcF5UAWdDRYEF8RQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url(https://design.penpot.app/internal/gfonts/font/spacemono/v17/i7dNIFZifjKcF5UAWdDRYERMR3K_.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Ancient Medium Font - Custom */
@font-face {
  font-family: 'Ancient Medium';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('ancient/Ancient Medium.ttf') format('truetype');
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.8;
  overflow-x: hidden;
  font-size: 18px;
}

/* Animazioni */
.animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 {
  transition-delay: 0.15s;
}

.animate-delay-2 {
  transition-delay: 0.3s;
}

.animate-delay-3 {
  transition-delay: 0.45s;
}

/* Hero fullscreen */
.hero-fullscreen {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, 
    rgba(158, 97, 0, 0.91) 0%,
    rgba(154, 94, 6, 0.65) 54%,
    rgba(194, 149, 84, 0.15) 100%);
  text-align: center;
  overflow: hidden;
}

.hero-content {
  z-index: 2;
}

.hero-fullscreen .hero-title {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
  color: #2e1f12;
  font-family: 'Ancient Medium', 'Old English Text MT', 'Times New Roman', serif !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: fadeInUp 1.2s ease-out;
  line-height: 1.2;
}

.hero-by {
  font-size: clamp(1rem, 2vw, 1.8rem);
  color: #000;
  font-style: normal;
  font-weight: 400;
  margin: 0.3rem 0;
  letter-spacing: 0;
  animation: fadeInUp 1.2s ease-out 0.3s both;
  font-family: 'Space Mono', monospace;
}

.hero-name {
  font-size: clamp(1.1rem, 2.6vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #000;
  font-family: 'Arial Black', 'Helvetica', 'Arial', sans-serif;
  font-style: normal;
  text-transform: uppercase;
  line-height: 1.2;
  min-height: 1.5em;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #000;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s;
  animation: bounce 2s infinite;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-indicator span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

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

/* Container */
.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

/* Sezione Trattamenti */
.section-treatments {
  min-height: 100vh;
  max-height: 100vh;
  padding: 2rem 0 1rem;
  background: linear-gradient(to bottom, var(--cream), var(--beige));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 400;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
  font-family: 'Ancient Medium', serif;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 0.8rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--gold);
}

.treatments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  flex: 1;
  align-content: center;
}

.treatment-card {
  background: #fff;
  border: 1px solid rgba(139, 115, 85, 0.15);
  border-radius: 0;
  padding: 1.2rem 1.3rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 20px rgba(44, 37, 32, 0.08);
  display: flex;
  flex-direction: column;
}

.treatment-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--gold);
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.treatment-card:hover::before {
  height: 100%;
}

.treatment-card:hover {
  transform: translateX(8px);
  box-shadow: 0 12px 40px rgba(44, 37, 32, 0.12);
}

.treatment-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
  filter: grayscale(0.3);
}

.treatment-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--dark-brown);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.3;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

.treatment-card p {
  color: var(--text-light);
  line-height: 1.5;
  font-size: 0.88rem;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-weight: 400;
}

/* Sezione Gallery */
.section-gallery {
  min-height: 100vh;
  max-height: 100vh;
  padding: 1.4rem 0 0.8rem;
  background: linear-gradient(to bottom, var(--beige), var(--cream));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.section-gallery .container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.section-gallery .section-title {
  margin-bottom: 0.9rem;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

/* Gallery Container - Collage + Buttons Layout */
.gallery-container {
  display: grid;
  grid-template-columns: 4fr 1fr;
  gap: 2rem;
  flex: 1;
  min-height: 0;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* Collage Layout - 4 overlapping photos with rotation */
.gallery-collage {
  position: relative;
  width: 90%;
  height: 85%;
  max-width: 900px;
  max-height: 650px;
  background: transparent;
  overflow: hidden;
  justify-self: center;
  align-self: center;
}

.collage-photo {
  position: absolute;
  width: 50%;
  height: 50%;
  object-fit: cover;
  border: 2px solid var(--dark-brown);
  box-shadow: 0 8px 32px rgba(44, 37, 32, 0.25);
  transition: transform 0.4s ease, z-index 0.2s ease;
}

.collage-photo:hover {
  transform: scale(1.08) translateZ(0);
  box-shadow: 0 12px 48px rgba(44, 37, 32, 0.35);
  z-index: 10 !important;
}

/* Position and rotation for each photo */
.collage-1 {
  top: 2%;
  left: -5%;
  width: 52%;
  height: 60%;
  transform: rotate(-3deg);
  z-index: 4;
}

.collage-2 {
  top: 5%;
  right: 2%;
  width: 55%;
  height: 58%;
  transform: rotate(2deg);
  z-index: 3;
}

.collage-3 {
  bottom: 5%;
  left: 10%;
  width: 48%;
  height: 56%;
  transform: rotate(1deg);
  z-index: 2;
}

.collage-4 {
  bottom: 2%;
  right: -2%;
  width: 50%;
  height: 54%;
  transform: rotate(-2deg);
  z-index: 1;
}

/* Gallery Buttons - Right side vertical stack */
.gallery-buttons {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-self: center;
  align-self: center;
  width: 80%;
  max-width: 400px;
}

.gallery-btn {
  display: block;
  padding: 1.8rem 2.5rem;
  background: #fff;
  color: var(--dark-brown);
  text-decoration: none;
  border: 2px solid var(--dark-brown);
  border-radius: 0;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s ease;
}

.gallery-btn:hover {
  background: var(--dark-brown);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44, 37, 32, 0.25);
}

/* Sezione Contatti */
.section-contacts {
  min-height: 100vh;
  max-height: 100vh;
  padding: 2rem 0 1.5rem;
  background: var(--cream);
  border-top: 1px solid rgba(139, 115, 85, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.contact-info {
  margin-bottom: 1.2rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  background: #fff;
  color: var(--dark-brown);
  text-decoration: none;
  border: 2px solid var(--brown);
  border-radius: 0;
  transition: all 0.4s ease;
  font-weight: 400;
  font-family: 'Arial', 'Helvetica', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.social-btn:hover {
  background: var(--dark-brown);
  color: #fff;
  border-color: var(--dark-brown);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44, 37, 32, 0.2);
}

.social-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.contact-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 1.2rem;
}

.contact-form {
  background: #fff;
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: 0 4px 20px rgba(44, 37, 32, 0.08);
}

.contact-form h3 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  color: var(--dark-brown);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-family: 'Ancient Medium', serif;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 2px solid rgba(139, 115, 85, 0.3);
  border-radius: 0;
  padding: 0.6rem 0.9rem;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-light);
  font-style: italic;
}

.btn-submit {
  border: 2px solid var(--dark-brown);
  background: var(--dark-brown);
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: 0;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.4s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

.btn-submit:hover {
  background: transparent;
  color: var(--dark-brown);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(44, 37, 32, 0.15);
}

.map-container {
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(139, 115, 85, 0.2);
  height: 100%;
  min-height: 350px;
  box-shadow: 0 4px 20px rgba(44, 37, 32, 0.08);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.8) contrast(1.05);
}

.section-scroll-indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--dark-brown);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.3s;
  animation: bounce 2s infinite;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  z-index: 10;
  pointer-events: none;
}

.section-scroll-indicator.visible-indicator {
  opacity: 0.7;
  pointer-events: auto;
}

.section-scroll-indicator.visible-indicator:hover {
  opacity: 1;
}

.section-scroll-indicator span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 1200px) {
  .treatments-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    gap: 1.5rem;
  }

  .gallery-collage {
    aspect-ratio: 4 / 3;
  }

  .gallery-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }

  .gallery-btn {
    flex: 1;
    max-width: 180px;
  }
}

@media (max-width: 768px) {
  .hero-fullscreen {
    background-attachment: scroll;
  }
  
  .treatments-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
  }
  
  .social-links {
    flex-direction: column;
  }
  
  .section-treatments,
  .section-gallery,
  .section-contacts {
    padding: 2.6rem 0;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

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

  .gallery-collage {
    aspect-ratio: 3 / 4;
    min-height: 350px;
  }

  .gallery-buttons {
    flex-direction: column;
  }

  .gallery-btn {
    max-width: none;
  }
}
