/* ============================================================
   IL MULINO DEL TEMPO — stylesheet
   Palette: bosco notturno / noce / farina / muschio / rame
   ============================================================ */

@font-face {
  font-family: "Caroline";
  src: url("../fonts/Caroline.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #1b211c;   /* verde bosco quasi nero */
  --bg-soft:   #232a23;
  --wood:      #2e2419;   /* legno di noce */
  --wood-soft: #3a2f22;
  --cream:     #ede4d3;   /* farina calda */
  --cream-dim: #cfc4ac;
  --moss:      #6b7d63;   /* muschio */
  --copper:    #a8763e;   /* rame ossidato */
  --copper-soft: rgba(168,118,62,0.35);

  --display: "Caroline", cursive;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------- ripple divider (signature element) ---------------- */

.ripple-divider {
  position: relative;
  height: 46px;
  width: 100%;
  overflow: hidden;
}
.ripple-divider svg {
  position: absolute;
  top: 0; left: 0;
  width: 200%;
  height: 100%;
  animation: ripple-drift 22s linear infinite;
}
@keyframes ripple-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------------- nav ---------------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  transition: background .4s ease, padding .4s ease, box-shadow .4s ease;
}
.site-nav.scrolled {
  background: rgba(27,33,28,0.92);
  backdrop-filter: blur(6px);
  padding: 12px 32px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.site-nav .brand {
  font-family: var(--display);
  font-size: 1.9rem;
  letter-spacing: .5px;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-nav .brand img { height: 34px; width: auto; }

.nav-links {
  display: flex;
  gap: 30px;
  font-family: var(--sans);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-links a { position: relative; padding-bottom: 4px; opacity: .85; }
.nav-links a:hover { opacity: 1; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--copper);
  transition: width .3s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none; border: none; color: var(--cream);
  font-size: 1.6rem; cursor: pointer;
}

@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    height: 100vh;
    width: 78%;
    max-width: 320px;
    background: var(--wood);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 26px;
    padding: 32px;
    transition: right .4s ease;
  }
  .nav-links.open { right: 0; }
  .nav-toggle { display: block; z-index: 110; }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  background: url("../img/hero.jpg") center 32% / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,18,15,.35) 0%, rgba(15,18,15,.25) 40%, rgba(15,18,15,.88) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 32px 92px;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.hero-eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .75rem;
  color: var(--cream-dim);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.4rem);
  line-height: .95;
  margin: 0 0 22px;
  color: var(--cream);
  max-width: 14ch;
}
.hero p {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 46ch;
  color: var(--cream-dim);
  line-height: 1.6;
}
.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 1px; height: 46px;
  background: linear-gradient(to bottom, transparent, var(--copper) 60%, transparent);
}
.scroll-cue::after {
  content: "";
  position: absolute; left: -3px; top: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--copper);
  animation: drip 2.6s ease-in-out infinite;
}
@keyframes drip {
  0% { top: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 40px; opacity: 0; }
}

/* ---------------- section basics ---------------- */

section { position: relative; padding: 110px 0; }
.section-tight { padding: 70px 0; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .75rem;
  color: var(--copper);
  margin: 0 0 14px;
}
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin: 0 0 28px;
  color: var(--cream);
  line-height: 1;
}
.lede {
  font-size: 1.05rem;
  color: var(--cream-dim);
  line-height: 1.8;
  max-width: 62ch;
}

/* ---------------- storia ---------------- */

.storia { background: var(--wood); }
.storia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
}
.storia-mark {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}
.storia-mark img {
  width: 100%;
  max-width: 320px;
  border-radius: 4px;
  filter: sepia(.15) saturate(1.05);
}
.storia-text p {
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--cream-dim);
  margin: 0 0 26px;
}
.storia-text p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 3.6rem;
  line-height: .7;
  float: left;
  padding: 8px 12px 0 0;
  color: var(--copper);
}
.moments {
  list-style: none;
  margin: 46px 0 0;
  padding: 0;
  border-top: 1px solid rgba(237,228,211,.15);
}
.moments li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(237,228,211,.15);
}
.moments .when {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--copper);
  padding-top: 3px;
}
.moments .what {
  color: var(--cream-dim);
  line-height: 1.7;
  font-size: .98rem;
}

@media (max-width: 900px) {
  .storia-grid { grid-template-columns: 1fr; gap: 40px; }
  .storia-mark { position: static; }
  .moments li { grid-template-columns: 100px 1fr; }
}

/* ---------------- gallery sections ---------------- */

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 46px;
  flex-wrap: wrap;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}
.gallery figure { margin: 0; overflow: hidden; position: relative; border-radius: 3px; }
.gallery img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s ease;
}
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(27,33,28,.55);
  padding: 5px 10px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity .3s ease;
}
.gallery figure:hover figcaption { opacity: 1; }

.g-a { grid-column: span 3; grid-row: span 2; }
.g-b { grid-column: span 3; grid-row: span 1; }
.g-c { grid-column: span 2; grid-row: span 1; }
.g-wide { grid-column: span 6; grid-row: span 2; }

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .g-a, .g-b, .g-c, .g-wide { grid-column: span 2; grid-row: span 1; }
}

.bosco { background: var(--bg-soft); }

.tag-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.tag {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--moss);
  color: var(--cream-dim);
  padding: 7px 14px;
  border-radius: 30px;
}

/* ---------------- valle ---------------- */

.valle {
  background: var(--wood);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
}
.valle-copy { padding: 100px 60px; align-self: center; }
.valle-copy .lede { margin-bottom: 30px; }
.valle-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.valle-stats div strong {
  display: block;
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--copper);
}
.valle-stats div span {
  font-family: var(--sans);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cream-dim);
}
.valle-img { min-height: 420px; background: url("../img/bosco-2.jpg") center/cover; }

@media (max-width: 900px) {
  .valle { grid-template-columns: 1fr; }
  .valle-copy { padding: 60px 32px; }
  .valle-img { min-height: 300px; }
}

/* ---------------- prenota / cta ---------------- */

.prenota {
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--bg-soft), var(--bg) 70%);
}
.prenota h2 { font-size: clamp(2.4rem, 6vw, 4rem); }
.prenota .lede { margin: 0 auto 40px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .82rem;
  padding: 16px 34px;
  border: 1px solid var(--copper);
  border-radius: 2px;
  color: var(--cream);
  transition: background .3s ease, color .3s ease;
}
.btn:hover { background: var(--copper); color: var(--wood); }

/* ---------------- footer ---------------- */

footer {
  background: var(--wood);
  padding: 54px 0 36px;
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--cream-dim);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(237,228,211,.12);
  margin-bottom: 24px;
}
.footer-brand { font-family: var(--display); font-size: 1.6rem; color: var(--cream); }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-links h4 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--copper); margin: 0 0 12px;
}
.footer-links a { display: block; margin-bottom: 8px; opacity: .85; }
.footer-links a:hover { opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; opacity: .7; }
