/* Vivaio Ravasini — design system */
:root {
  --soil: #1a2218;
  --moss: #2f4a34;
  --leaf: #4a6b4e;
  --sage: #8fad8a;
  --mist: #e8efe4;
  --cream: #f7f4ec;
  --amber: #c4893a;
  --amber-deep: #9a6828;
  --ink: #121812;
  --muted: #5a6a58;
  --white: #ffffff;
  --glass: rgba(26, 34, 24, 0.72);
  --radius: 2px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --max: 1120px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(143, 173, 138, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(196, 137, 58, 0.08), transparent 50%),
    linear-gradient(180deg, var(--cream) 0%, #eef2ea 40%, var(--mist) 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--moss);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--amber-deep);
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(247, 244, 236, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(47, 74, 52, 0.12);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(247, 244, 236, 0.96);
  box-shadow: 0 8px 24px rgba(18, 24, 18, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--soil);
  text-decoration: none;
  line-height: 1.1;
}

.brand-logo {
  width: auto;
  height: calc(1.1em + 0.65rem + 0.15rem); /* titolo + tagline */
  min-height: 1.1em; /* almeno quanto il titolo */
  flex-shrink: 0;
  object-fit: contain;
  background: transparent !important;
  background-color: transparent !important;
  mix-blend-mode: normal;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-tagline {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf);
  margin-top: 0.15rem;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(47, 74, 52, 0.25);
  background: transparent;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  height: 2px;
  background: var(--soil);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle span {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  left: 0;
  right: 0;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--soil);
  text-decoration: none;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--moss);
}

/* ——— Hero / Slider ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 1.35s var(--ease);
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.hero-slide.is-leaving {
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-slide-media {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  transform: scale(1.12);
  will-change: transform;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(18, 24, 18, 0.35) 0%, rgba(18, 24, 18, 0.15) 35%, rgba(18, 24, 18, 0.78) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) 0 4.5rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  animation: rise 1s var(--ease) both;
}

.hero-brand em {
  display: inline-block;
  font-style: italic;
  font-weight: 500;
  color: var(--sage);
  animation: brand-float 5.5s ease-in-out 1s infinite;
}

@keyframes brand-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero-slogans {
  position: relative;
  width: 80%;
  max-width: 80%;
  min-height: clamp(5rem, 12vw, 8rem);
  margin-bottom: 1.35rem;
  overflow: hidden;
}

.hero-slogan {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 3.4rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(12vw);
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}

.hero-slogan.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
}

.hero-lead {
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.75rem;
  animation: rise 0.9s 0.15s var(--ease) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: rise 0.9s 0.28s var(--ease) both;
}

.hero-actions .btn {
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.35s var(--ease);
}

.hero-actions .btn:hover {
  transform: translateY(-3px);
}

.hero-dots {
  position: absolute;
  right: max(1.25rem, calc((100% - var(--max)) / 2));
  bottom: 2rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s, height 0.35s var(--ease);
}

.hero-dot.is-active {
  background: var(--amber);
  border-color: var(--amber);
  height: 1.35rem;
  border-radius: 999px;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.45rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.25s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--amber-deep);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn-solid {
  background: var(--moss);
  color: var(--white);
}

.btn-solid:hover {
  background: var(--soil);
  color: var(--white);
}

/* ——— Sections ——— */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leaf);
  margin-bottom: 0.65rem;
}

.section-head h2,
.page-hero h1,
.content-block h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--soil);
  margin-bottom: 0.75rem;
}

.section-head p,
.lede {
  color: var(--muted);
  font-size: 1.08rem;
}

.page-hero {
  padding: calc(var(--header-h) + 3.5rem) 0 2.5rem;
  background:
    linear-gradient(135deg, rgba(47, 74, 52, 0.09), transparent 55%),
    linear-gradient(180deg, #e4ebe0, var(--cream));
  border-bottom: 1px solid rgba(47, 74, 52, 0.1);
}

.page-hero .container {
  max-width: 40rem;
}

/* ——— Services preview (home) ——— */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
  list-style: none;
}

.service-item {
  position: relative;
  padding-top: 0.25rem;
}

.service-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.85rem;
  display: block;
}

.service-item::before {
  content: none;
}

.service-item h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--soil);
  margin-bottom: 0.5rem;
}

.service-item p {
  color: var(--muted);
  font-size: 0.98rem;
}

@keyframes grow-line {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.section-cta {
  margin-top: 2.75rem;
}

/* ——— About strip ——— */
.about-strip {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.about-visual {
  min-height: 28rem;
  position: relative;
  overflow: hidden;
}

.about-visual-media {
  position: absolute;
  inset: -12%;
  background-size: cover;
  background-position: center;
  transform: scale(1.1);
  animation: about-pan 18s ease-in-out infinite alternate;
  will-change: transform;
}

.about-visual.is-inview .about-visual-media {
  animation-play-state: running;
}

.about-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  z-index: 1;
  background: linear-gradient(transparent, rgba(26, 34, 24, 0.45));
  pointer-events: none;
}

@keyframes about-pan {
  from {
    transform: scale(1.15) translate(-3%, 2%);
  }
  to {
    transform: scale(1.15) translate(3%, -2%);
  }
}

.about-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--soil);
  margin-bottom: 1rem;
}

.about-copy p + p {
  margin-top: 1rem;
}

.about-copy p {
  color: var(--muted);
}

/* ——— Inner pages content ——— */
.content-block {
  max-width: 42rem;
}

.content-block p + p {
  margin-top: 1rem;
}

.content-block p {
  color: var(--muted);
}

.prose-wide {
  max-width: 48rem;
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  list-style: none;
}

.values li {
  border-top: 1px solid rgba(47, 74, 52, 0.2);
  padding-top: 1.1rem;
}

.values h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
  color: var(--soil);
}

.values p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ——— Services page ——— */
.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.services-list li {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1.35rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(47, 74, 52, 0.15);
  align-items: start;
}

.services-list .service-icon {
  width: 3rem;
  height: 3rem;
  margin: 0.15rem 0 0;
}

.services-list .num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--sage);
  line-height: 1;
}

.services-list h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--soil);
  margin-bottom: 0.45rem;
}

.services-list p {
  color: var(--muted);
  max-width: 40rem;
}

/* ——— Contact ——— */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.contact-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.contact-details li {
  display: grid;
  gap: 0.2rem;
}

.contact-details dt,
.contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--leaf);
}

.contact-details a {
  color: var(--soil);
  text-decoration: none;
  font-weight: 500;
}

.contact-details a:hover {
  color: var(--amber-deep);
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(47, 74, 52, 0.12);
}

.form-row {
  display: grid;
  gap: 0.35rem;
}

.form-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--soil);
}

.form-row input,
.form-row textarea,
.form-row select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(47, 74, 52, 0.25);
  background: var(--white);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(74, 107, 78, 0.15);
}

.form-row textarea {
  min-height: 9rem;
  resize: vertical;
}

.captcha-row {
  margin-top: 0.25rem;
}

.turnstile-widget {
  width: 100%;
  min-height: 65px;
}

.turnstile-error {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: #8b2e2e;
  line-height: 1.45;
}

.form-status {
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: rgba(74, 107, 78, 0.12);
  color: var(--moss);
}

.form-status.is-error {
  background: rgba(154, 40, 40, 0.1);
  color: #7a2222;
}

.map-wrap {
  margin-top: 3.5rem;
}

.map-wrap h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--soil);
  margin-bottom: 1rem;
}

.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(47, 74, 52, 0.15);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ——— Privacy ——— */
.policy {
  max-width: 44rem;
}

.policy h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: var(--soil);
  margin: 2rem 0 0.75rem;
}

.policy h3 {
  font-size: 1.05rem;
  margin: 1.35rem 0 0.5rem;
  color: var(--moss);
}

.policy p,
.policy li {
  color: var(--muted);
}

.policy ul {
  margin: 0.5rem 0 0 1.25rem;
}

.policy li + li {
  margin-top: 0.35rem;
}

/* ——— Footer ——— */
.site-footer {
  background: var(--soil);
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.site-footer .brand {
  color: var(--white);
}

.site-footer .brand-tagline {
  color: var(--sage);
}

.site-footer h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.site-footer ul {
  list-style: none;
}

.site-footer li + li {
  margin-top: 0.4rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--amber);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.88rem;
}

/* ——— Cookie banner ——— */
.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 200;
  max-width: 26rem;
  background: var(--soil);
  color: rgba(255, 255, 255, 0.9);
  padding: 1.35rem 1.4rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner p {
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.cookie-banner a {
  color: var(--sage);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cookie-actions .btn {
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
}

.btn-reject {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-reject:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

/* ——— Reveal on scroll ——— */
.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition:
    opacity 0.95s var(--ease),
    transform 0.95s var(--ease);
}

.reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
}

.service-item.reveal:nth-child(1) {
  transition-delay: 0.05s;
  transform: translateX(-2rem) translateY(1.5rem);
}

.service-item.reveal:nth-child(2) {
  transition-delay: 0.18s;
}

.service-item.reveal:nth-child(3) {
  transition-delay: 0.3s;
  transform: translateX(2rem) translateY(1.5rem);
}

.service-item.reveal.is-inview {
  transform: translateX(0) translateY(0);
}

.about-visual.reveal {
  transform: translateX(3rem) scale(1.04);
}

.about-visual.reveal.is-inview {
  transform: translateX(0) scale(1);
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .services-grid,
  .values,
  .footer-grid,
  .about-strip,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .about-visual {
    min-height: 18rem;
    order: -1;
  }

  .hero-dots {
    flex-direction: row;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.25rem;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    background: rgba(247, 244, 236, 0.98);
    border-bottom: 1px solid rgba(47, 74, 52, 0.12);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .services-list li {
    grid-template-columns: 2.75rem 1fr;
    gap: 0.85rem;
  }

  .services-list .service-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .cookie-banner {
    inset: auto 0.75rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-slide,
  .hero-slide-media,
  .hero-slogan,
  .about-visual-media {
    transition-duration: 1.1s !important;
    animation-duration: 1.1s !important;
  }

  .hero-brand {
    animation: rise 0.9s var(--ease) both !important;
  }
}
