/* =========================================================
   Dendria — Welcome (welcome.css)
   - Mobile-first
   - Brand header: [D-logo] + “endria” (nero, vicino, senza overlap)
   - Hero background migliorato su mobile (crop più coerente)
   - Ninfa più a sinistra + overlay meno coprente su mobile
   - CTA full-width su mobile
   ========================================================= */

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* -----------------------------
   Layout Wrapper + Card
----------------------------- */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background-color: #ffffff;
}

.main-card {
  width: 100%;
  max-width: 1280px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(107, 94, 82, 0.12),
              0 4px 16px rgba(107, 94, 82, 0.06);
  overflow: hidden;
  position: relative;
}

@media (min-width: 768px) {
  .page-wrapper { padding: 2rem; }

  .main-card {
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(107, 94, 82, 0.15),
                0 8px 24px rgba(107, 94, 82, 0.08);
  }
}

/* -----------------------------
   Header / Navigation
----------------------------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  position: relative;
  z-index: 100;
}

/* Brand: [D-logo] + endria */
.logo{
  display: flex;
  align-items: center;
  gap: 4px;                /* micro gap reale (safe su mobile) */
  letter-spacing: -0.02em;
  font-weight: 450;
  z-index: 101;
}

.logo-icon{
  height: 44px;            /* mobile */
  width: auto;
  display: block;
}

.logo-endria{
  font-size: 22px;         /* mobile */
  font-weight: 600;
  color: #111827;          /* NERO */
  letter-spacing: -0.5px;
  line-height: 1;
  margin-left: -2px;       /* vicino ma non collide */
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: #6B5E52;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Nav (mobile overlay) */
.nav {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.nav-link {
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: #6B5E52;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.nav-link:active {
  background-color: rgba(159, 184, 154, 0.15);
  transform: scale(0.95);
}

/* Desktop header/nav */
@media (min-width: 768px) {
  .logo-icon { height: 56px; }
   logo{
    gap: 13px;    /* desktop più arioso */
  }
  .logo-endria{
    font-size: 2.25rem;     /* segue la tua scala desktop */
    margin-left: -3px;     /* tuning ottico desktop */
  }

  .menu-toggle { display: none; }

  .nav {
    display: flex;
    position: static;
    inset: auto;
    flex-direction: row;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    gap: 3rem;
    opacity: 1;
    pointer-events: all;
    transition: none;
  }

  .nav-link {
    font-size: 1rem;
    padding: 0;
    min-height: auto;
  }

  .nav-link:hover { opacity: 0.7; }

  .nav-link:active {
    background-color: transparent;
    transform: none;
  }
}

/* -----------------------------
   HERO
----------------------------- */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 720px; /* mobile: più spazio verticale e crop più stabile */
  display: flex;
  align-items: stretch;
  padding: 1.5rem 1.25rem 2.25rem;
}

/* Background layer */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Mobile-first: ninfa più a sinistra + meno coperta */
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* sposta la ninfa più a sinistra (meno sotto al testo) */
  object-position: 18% 60%;

  /* zoom leggermente ridotto */
  transform: scale(1.12);
}

/* Overlay gradient (mobile) meno “lavato” in alto */
.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.62) 0%,
    rgba(255,255,255,0.82) 52%,
    rgba(255,255,255,0.95) 100%
  );
}

/* Content (sopra overlay) */
.content-column {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Typo */
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #362c26;
  margin-bottom: 1rem;
}

.headline {
  font-size: clamp(2.5rem, 12vw, 5.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #3D3229;
  margin-bottom: 1rem;
}

.description {
  font-size: 1rem;
  line-height: 1.7;
  color: #6B5E52;
  max-width: 100%;
  margin-bottom: 1.75rem;
}

/* CTA */
.cta-wrapper { padding-top: 0.25rem; }

.cta-button {
  padding: 1rem 2rem;
  background-color: #9FB89A;
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(159, 184, 154, 0.2);
  min-height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;

  /* mobile: bottone pieno */
  width: 100%;
  min-width: 0;
}

.cta-button:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(159, 184, 154, 0.3);
}

/* Desktop hero */
@media (min-width: 768px) {
  .hero-section {
    padding: 4rem 4rem;
    min-height: 560px;
  }

  .hero-bg img {
    object-position: left center;
    transform: scale(1.02);
  }

  .hero-section::after {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.00) 0%,
      rgba(255, 255, 255, 0.55) 45%,
      rgba(255, 255, 255, 0.88) 70%,
      rgba(255, 255, 255, 0.96) 100%
    );
  }

  .content-column {
    margin-left: auto;
    max-width: 520px;
  }

  .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    margin-bottom: 2rem;
  }

  .headline {
    font-size: clamp(3rem, 8vw, 5.5rem);
    margin-bottom: 2rem;
  }

  .description {
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 32rem;
    margin-bottom: 2rem;
  }

  .cta-wrapper { padding-top: 0.5rem; }

  .cta-button {
    width: auto;
    min-width: 180px;
  }

  .cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(159, 184, 154, 0.3);
  }

  .cta-button:active { transform: scale(0.98); }
}

/* -----------------------------
   Footer (se lo usi)
----------------------------- */
.footer {
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: #B39C8A;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .footer { padding: 1.5rem 4rem; }
}

/* -----------------------------
   Mobile touch targets
----------------------------- */
button, a { min-height: 44px; }

/* -----------------------------
   Reduced motion
----------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
}

/* -----------------------------
   Prevent body scroll when menu open
----------------------------- */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

@media (min-width: 768px) {
  body.menu-open {
    overflow: auto;
    position: static;
  }
}
