/* ===========================================================
   SPAZIO SACRO · ESSENTHIA ART — styles.css
   Palette dal biglietto da visita: oro/sabbia + blu navy/indaco + crema
   =========================================================== */

:root {
  --color-gold: #B8A572;
  --color-gold-dark: #9A8A5C;
  --color-navy: #1F2D7C;
  --color-navy-dark: #15205A;
  --color-cream: #F5EFE3;
  --color-cream-soft: #FAF6EE;
  --color-text: #1A1A2E;
  --color-muted: #6B6B7B;
  --color-white: #FFFFFF;
  --color-dark: #0F1230;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --shadow-sm: 0 2px 8px rgba(31, 45, 124, 0.08);
  --shadow-md: 0 8px 24px rgba(31, 45, 124, 0.12);
  --shadow-lg: 0 16px 48px rgba(31, 45, 124, 0.18);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --max-width: 1200px;
  --header-height: 76px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-cream-soft);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: var(--color-navy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-gold); }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--color-navy);
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 600; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.4rem; font-weight: 600; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 1rem;
}
.eyebrow-dark { color: var(--color-gold-dark); }

.lead { font-size: 1.18rem; color: var(--color-text); margin: 1rem 0; }
.lead-center { font-size: 1.15rem; max-width: 760px; margin: 1.2rem auto 0; text-align: center; }
.muted { color: var(--color-muted); font-size: .9rem; }

/* ============ LAYOUT HELPERS ============ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-cream { background: var(--color-cream); }
.section-dark { background: var(--color-dark); color: var(--color-cream); }
.section-dark h2, .section-dark h3 { color: var(--color-cream); }
.section-head { text-align: center; max-width: 820px; margin: 0 auto 3rem; }
.section-head-light .eyebrow { color: var(--color-gold); }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(184, 165, 114, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: var(--header-height);
}

.logo-link { display: flex; align-items: center; gap: .6rem; }
.logo { width: 56px; height: 56px; object-fit: contain; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-navy);
  letter-spacing: .02em;
}

.nav { display: flex; gap: 2rem; }
.nav a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--color-navy);
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--color-gold);
  transition: width .25s ease;
}
.nav a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  width: 32px; height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  background: url('assets/hero.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  padding: 4rem 1.5rem;
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(15, 18, 48, 0.55) 0%,
    rgba(15, 18, 48, 0.35) 50%,
    rgba(15, 18, 48, 0.65) 100%);
}
.hero-content {
  position: relative;
  max-width: 820px;
  z-index: 1;
  animation: fadeUp 1s ease-out;
}
.hero h1 {
  color: var(--color-white);
  margin-bottom: 1rem;
  text-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.hero .eyebrow { color: var(--color-gold); }
.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  margin: 0 0 2.5rem;
  opacity: .95;
}

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

/* ============ BUTTONS ============ */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: .95rem 2.2rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: var(--color-gold);
  color: var(--color-navy);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--color-white);
  color: var(--color-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: var(--color-navy);
  color: var(--color-cream);
  margin-top: 1rem;
}
.btn-secondary:hover {
  background: var(--color-navy-dark);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* ============ SPLIT SECTIONS (Chi sono / Workshop) ============ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.section-split-reverse .split { direction: rtl; }
.section-split-reverse .split > * { direction: ltr; }

/* Research section: alternate background to break visual rhythm */
.section-research {
  background: linear-gradient(180deg, var(--color-cream-soft) 0%, var(--color-cream) 100%);
  border-top: 1px solid rgba(184, 165, 114, 0.18);
  border-bottom: 1px solid rgba(184, 165, 114, 0.18);
}
.section-split-reverse-content { direction: rtl; }
.section-split-reverse-content > * { direction: ltr; }
.section-research .split-image img {
  aspect-ratio: 5 / 4;
  filter: saturate(.85) contrast(1.02);
}

/* ============ CARDS (Metodo) ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.card {
  background: var(--color-white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
  border-top: 3px solid var(--color-gold);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  font-size: 2.6rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.card h3 { color: var(--color-navy); margin-bottom: .8rem; }
.card p { color: var(--color-text); margin: 0; font-size: .98rem; }

/* ============ METHOD JOURNEY (Cos'è Essenthia Art slides) ============ */
.method-journey {
  margin-top: 4.5rem;
  text-align: center;
}
.journey-eyebrow {
  margin-bottom: 1.5rem;
}
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0 auto;
}
.method-slide {
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--color-cream-soft);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4 / 5;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}
.method-slide:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.method-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.method-slide:hover img {
  transform: scale(1.04);
}
.journey-hint {
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--color-muted);
  font-size: .9rem;
}

/* ============ CHECK LIST (Workshop) ============ */
.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.check-list li {
  position: relative;
  padding: .4rem 0 .4rem 1.8rem;
}
.check-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-size: 1.1rem;
  top: .5rem;
}

/* ============ GALLERY ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.gallery-three {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.gallery-item {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: zoom-in;
  background: #1a1a2e;
  aspect-ratio: 4 / 3;
}
.gallery-three .gallery-item {
  aspect-ratio: 4 / 5;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .3s ease;
}
.gallery-item:hover img {
  transform: scale(1.05);
  opacity: .85;
}
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem 1rem .9rem;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: var(--color-cream);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  text-align: center;
  pointer-events: none;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 48, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
  animation: fadeIn .25s ease;
}
.lightbox[hidden] { display: none; }
.lightbox figure {
  max-width: 90vw;
  max-height: 90vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.lightbox figcaption {
  color: var(--color-cream);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  font-size: 2.2rem;
  color: var(--color-cream);
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }

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

/* ============ CONTATTI ============ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  border: 1px solid rgba(184, 165, 114, 0.25);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gold);
  color: var(--color-text);
}
.contact-icon { font-size: 2rem; margin-bottom: .8rem; }
.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-gold-dark);
}
.contact-card p {
  margin: 0;
  font-size: .98rem;
  line-height: 1.5;
  color: var(--color-text);
}

.map-wrapper {
  margin-top: 3rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 9;
  max-height: 460px;
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--color-navy);
  color: var(--color-cream);
  padding: 3rem 0 2.5rem;
  text-align: center;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.footer-logo {
  width: 64px;
  height: 64px;
  margin-bottom: .5rem;
  opacity: .95;
}
.site-footer p { margin: 0; }
.footer-tag {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-gold);
  letter-spacing: .15em;
  font-size: .9rem;
  margin-top: .3rem;
}

/* =====================================================
   RESPONSIVE — TABLET
   ===================================================== */
@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .section-split-reverse .split { direction: ltr; }
  .section-split-reverse-content { direction: ltr; }
  .split-image img { aspect-ratio: 16 / 10; }
  .method-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-three { grid-template-columns: repeat(3, 1fr); }
  .nav { gap: 1.4rem; }
  .nav a { font-size: .9rem; }
}

/* =====================================================
   RESPONSIVE — MOBILE
   ===================================================== */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 3.5rem 0; }
  .section-head { margin-bottom: 2rem; }

  .menu-toggle { display: flex; }

  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-cream-soft);
    border-bottom: 1px solid rgba(184, 165, 114, 0.25);
    transform: translateY(-110%);
    transition: transform .3s ease;
    box-shadow: var(--shadow-md);
  }
  .nav.open { transform: translateY(0); }
  .nav a {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(184, 165, 114, 0.15);
  }
  .nav a::after { display: none; }

  .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .logo-text { font-size: 1.15rem; }
  .logo { width: 46px; height: 46px; }

  .hero { min-height: 80vh; }

  .gallery, .gallery-three { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .method-journey { margin-top: 3rem; }

  .container { padding: 0 1.2rem; }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}
