/* ══════════════════════════════════════════════════════════════
   Enoteca Amici Miei — production stylesheet
   Dark, editorial, logo-led. No border-radius anywhere. No emoji.
   ══════════════════════════════════════════════════════════════ */

:root {
  /* Tricolore intensity — design-time variable, hardcoded ≈0.57 for production.
     (0.12 + 0.75 * 0.6 = 0.57 fill; 0.4 + 0.75 * 0.5 = 0.775 text tint) */
  --ea-flag: 0.57;
  --ea-flag-text: 0.775;

  /* Palette */
  --ground: #131110;      /* near-black espresso */
  --bone: #EDE7DC;        /* primary text */
  --bone-2: #C9C1B3;      /* secondary text */
  --muted: #877F73;       /* muted / eyebrows on dark */
  --body-dim: #A79E90;    /* dim body on dark */
  --terracotta: #C08A6B;  /* accent */
  --light: #F7F4EE;       /* warm white section */
  --ink: #1C1915;         /* ink on light */
  --ink-muted: #8B8478;   /* muted on light */
  --ink-body: #453F36;    /* body on light */

  /* Tricolore hairline stops */
  --verde: rgba(100, 121, 95, var(--ea-flag));
  --bianco: rgba(237, 231, 220, var(--ea-flag));
  --rosso: rgba(164, 83, 72, var(--ea-flag));
}

/* Self-hosted fonts are loaded via an explicit <link> to fonts.css in each
   page <head> (an @import here would have to precede :root to be valid). */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--bone);
  font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--bone); color: var(--ground); }

img { display: block; }
a { color: inherit; }

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── Entry animations ─────────────────────────────────────────── */
@keyframes eaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes eaFadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes eaBannerIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ── Shared bits ──────────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; }

/* Tricolore hairline tick (60px wide, 1px tall) */
.tricolore-tick { display: flex; width: 60px; height: 1px; }
.tricolore-tick span { flex: 1; }
.tricolore-tick span:nth-child(1) { background: var(--verde); }
.tricolore-tick span:nth-child(2) { background: var(--bianco); }
.tricolore-tick span:nth-child(3) { background: var(--rosso); }

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Scroll-reveal initial state is applied inline by JS only when below the fold. */

/* ══ MAIN PAGE ══════════════════════════════════════════════════ */
.page-main { background: var(--ground); color: var(--bone); overflow: clip; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh; /* small viewport height: stable, never resizes on scroll */
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px clamp(24px, 5vw, 64px) 90px;
}
.hero__tricolore {
  position: absolute;
  left: clamp(24px, 5vw, 64px);
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--verde) 14%,
    var(--verde) 30%,
    var(--bianco) 46%,
    var(--bianco) 54%,
    var(--rosso) 70%,
    var(--rosso) 86%,
    transparent 100%
  );
}
.hero__eyebrow {
  position: absolute;
  top: 110px;
  right: clamp(24px, 5vw, 64px);
  text-align: right;
  line-height: 2.2;
  animation: eaFade 1.1s .15s ease both;
}
.hero__logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(16px, 4vw, 56px);
  pointer-events: none;
  animation: eaFadeUp 1.3s .3s cubic-bezier(.22, .61, .36, 1) both;
  /* No permanent will-change: a persistent composite layer rasterizes the logo
     at a fractional device-pixel offset and renders it blurry on some DPRs.
     The parallax script manages the transform and clears it at the top. */
}
.hero__logo img { width: min(78vw, 940px); height: auto; }
.hero__bottom {
  position: absolute;
  bottom: 90px;
  left: calc(clamp(24px, 5vw, 64px) + 28px);
  right: clamp(24px, 5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  animation: eaFade 1.1s .7s ease both;
}
.hero__quote {
  margin: 0 0 4px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.45;
  color: var(--bone-2);
}
.hero__quote-sub { margin: 0; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.hero__triad {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Image band ───────────────────────────────────────────────── */
.band { padding: 0 clamp(24px, 5vw, 64px); }
.band__grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: end;
}
.band__photo {
  width: 100%;
  height: clamp(280px, 44vh, 460px);
  object-fit: cover;
  background: rgba(237, 231, 220, 0.06);
}
.band__caption { display: flex; flex-direction: column; gap: 16px; padding-bottom: 6px; }
.band__caption p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 2;
  color: var(--muted);
}

/* ── Storia (two-column editorial spread) ─────────────────────── */
.storia { padding: clamp(120px, 17vh, 220px) clamp(24px, 5vw, 64px); }
.storia__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.storia__text {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vh, 40px);
}
.storia__h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.24;
  color: var(--bone);
  text-wrap: balance;
}
.storia__h2 em { font-style: italic; color: var(--terracotta); }
.storia__para {
  margin: 0;
  max-width: 480px;
  font-size: 14px;
  line-height: 2;
  color: var(--body-dim);
  text-wrap: pretty;
}
.storia__media { display: flex; flex-direction: column; gap: 14px; }
.storia__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: rgba(237, 231, 220, 0.06);
}
.storia__caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.storia__word {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: rgba(237, 231, 220, 0.85);
}
.storia__label {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Carta row ────────────────────────────────────────────────── */
.carta { padding: 0 clamp(24px, 5vw, 64px); }
.carta__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(40px, 7vh, 72px) 0;
  border-top: 1px solid rgba(237, 231, 220, 0.14);
  border-bottom: 1px solid rgba(237, 231, 220, 0.14);
  text-decoration: none;
  color: var(--bone);
}
/* The whole row stays put on hover; only the "PDF ansehen" action nudges. */
.carta__label { display: flex; flex-direction: column; gap: 14px; }
.carta__eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}
.carta__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1;
  color: var(--bone);
}
.carta__title em { font-style: italic; }
.carta__action {
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
  transition: transform 300ms cubic-bezier(.22, .61, .36, 1);
}
.carta__row:hover .carta__action { transform: translateX(8px); }
.carta__action-text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #FFFFFF;
}
.carta__arrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  color: var(--terracotta);
  transition: transform 300ms cubic-bezier(.22, .61, .36, 1);
}
/* Arrow slides a touch further than the label for a gentle lead. */
.carta__row:hover .carta__arrow { transform: translateX(4px); }

/* ── Triptych ─────────────────────────────────────────────────── */
.tri { padding: clamp(120px, 17vh, 220px) clamp(24px, 5vw, 64px); }
.tri__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(14px, 2vw, 28px);
  align-items: start;
}
.tri__col { display: flex; flex-direction: column; gap: 14px; }
.tri__col--mid { margin-top: clamp(40px, 7vw, 96px); }
.tri__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(237, 231, 220, 0.06);
}
/* flex-wrap lets a long label (e.g. "Von unseren Freunden") drop below the word
   in the narrow band just above the mobile breakpoint instead of being clipped. */
.tri__caption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.tri__word {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
}
.tri__word--verde { color: rgba(122, 146, 115, var(--ea-flag-text)); }
.tri__word--bianco { color: rgba(237, 231, 220, 0.85); }
.tri__word--rosso { color: rgba(178, 101, 84, var(--ea-flag-text)); }
.tri__label {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Visita (light) ───────────────────────────────────────────── */
.visita {
  background: var(--light);
  color: var(--ink);
  padding: clamp(110px, 16vh, 200px) clamp(24px, 5vw, 64px);
}
.visita__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.visita__eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 26px;
}
.visita__h2 {
  margin: 0 0 clamp(44px, 7vh, 72px);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.15;
  color: var(--ink);
  max-width: 720px;
  text-wrap: balance;
}
.visita__h2 em { font-style: italic; }
.visita__cols {
  display: flex;
  align-items: stretch;
  gap: clamp(36px, 5vw, 72px);
  margin-bottom: clamp(44px, 7vh, 72px);
}
.visita__col-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.visita__col-body {
  font-size: 14px;
  line-height: 2.1;
  color: var(--ink-body);
  white-space: nowrap;
}
.visita__col-body .dim { color: var(--ink-muted); }
.visita__divider { width: 1px; background: rgba(28, 25, 21, 0.12); }
.visita__cta {
  display: inline-flex;
  align-items: center;
  padding: 20px 48px;
  background: var(--ink);
  color: var(--light);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: opacity 300ms ease, transform 300ms ease;
}
.visita__cta:hover { opacity: 0.85; transform: translateY(-2px); }
.visita__phone { margin: 22px 0 0; font-size: 12px; letter-spacing: 0.06em; color: var(--ink-muted); }
.visita__phone a {
  color: var(--ink-body);
  text-decoration: none;
  border-bottom: 1px solid rgba(28, 25, 21, 0.25);
  padding-bottom: 1px;
  transition: border-color 300ms ease;
}
.visita__phone a:hover { border-color: var(--ink); }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer { padding: clamp(56px, 8vh, 90px) clamp(24px, 5vw, 64px) 40px; }
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.site-footer__logo { height: clamp(88px, 11vw, 120px); width: auto; }
.site-footer__tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: rgba(237, 231, 220, 0.92);
}
.site-footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(237, 231, 220, 0.68);
  transition: color 300ms ease;
}
.site-footer__social:hover { color: #FFFFFF; }
.site-footer__contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(237, 231, 220, 0.68);
}
.site-footer__nav { display: flex; gap: 28px; margin-top: 4px; }
.site-footer__nav a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(237, 231, 220, 0.68);
  text-decoration: none;
  transition: color 300ms ease;
}
.site-footer__nav a:hover { color: #FFFFFF; }

/* ── Cookie banner ────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: var(--light);
  color: var(--ink);
  padding: 16px clamp(24px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  animation: eaBannerIn 550ms .6s cubic-bezier(.22, .61, .36, 1) both;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__flag {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  height: 2px;
}
.cookie-banner__flag span:nth-child(1) { flex: 1; background: rgba(100, 121, 95, 0.65); }
.cookie-banner__flag span:nth-child(2) { flex: 1; background: rgba(28, 25, 21, 0.18); }
.cookie-banner__flag span:nth-child(3) { flex: 1; background: rgba(164, 83, 72, 0.65); }
.cookie-banner__text { margin: 0; min-width: 0; font-size: 12.5px; line-height: 1.6; color: #5B544A; }
.cookie-banner__text a { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(28, 25, 21, 0.3); }
.cookie-banner__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.cookie-banner__actions button {
  padding: 11px 24px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-solid {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--light);
  transition: opacity 300ms ease;
}
.btn-solid:hover { opacity: 0.85; }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(28, 25, 21, 0.3);
  color: var(--ink);
  transition: border-color 300ms ease;
}
.btn-outline:hover { border-color: var(--ink); }

/* ══ LEGAL PAGES ════════════════════════════════════════════════ */
.legal {
  min-height: 100svh;
  background: var(--ground);
  color: var(--bone);
  display: flex;
  flex-direction: column;
}
.legal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 5vw, 64px);
}
.legal__mark { height: 26px; width: auto; }
.legal__back {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 300ms ease;
}
.legal__back:hover { color: var(--bone); }
.legal__main { flex: 1; padding: clamp(60px, 10vh, 120px) clamp(24px, 5vw, 64px); }
.legal__col { max-width: 620px; margin: 0 auto; }
.legal__h1 {
  margin: 0 0 clamp(40px, 7vh, 64px);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
}
.legal__h1--tight { margin-bottom: 12px; }
.legal__date { margin: 0 0 clamp(40px, 7vh, 64px); font-size: 12px; color: var(--muted); }
.legal__sections { display: flex; flex-direction: column; gap: 36px; }
.legal__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.legal__body { margin: 0; font-size: 14px; line-height: 2; color: var(--bone-2); }
.legal__body .dim { color: var(--muted); }
.legal__body a { color: var(--bone); text-decoration: none; border-bottom: 1px solid rgba(237, 231, 220, 0.3); }
.legal__btn {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  background: transparent;
  border: 1px solid rgba(237, 231, 220, 0.35);
  color: var(--bone);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 300ms ease;
}
.legal__btn:hover { border-color: var(--bone); }
.legal__note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.legal__footer {
  border-top: 1px solid rgba(237, 231, 220, 0.1);
  padding: 28px clamp(24px, 5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.legal__footer-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(237, 231, 220, 0.68);
}
.legal__footer nav { display: flex; gap: 28px; }
.legal__footer nav a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(237, 231, 220, 0.68);
  text-decoration: none;
  transition: color 300ms ease;
}
.legal__footer nav a:hover { color: #FFFFFF; }

/* ══ RESPONSIVE (≤720px) ════════════════════════════════════════ */
@media (max-width: 720px) {
  .hero { padding: 84px 24px 48px; }
  .hero__eyebrow { top: 28px; }
  /* A touch larger on phones (source is high-res, so this stays crisp). */
  .hero__logo { padding: 0 12px; }
  .hero__logo img { width: min(86vw, 940px); }
  .hero__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    bottom: 36px;
  }
  .band__grid,
  .storia__grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .carta__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
  .tri__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .tri__col--mid { margin-top: 0; }
  /* Keep Orari and Indirizzo side by side on mobile (with the divider);
     tighten the gap on very narrow screens so the nowrap times don't overflow. */
  .visita__cols { gap: clamp(16px, 4vw, 28px); justify-content: center; }
  /* Stack the footer contact parts on their own lines; drop the · separators. */
  .site-footer__contact { flex-direction: column; gap: 6px; }
  .site-footer__sep { display: none; }
  .cookie-banner { padding: 16px 20px; gap: 14px; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions button { flex: 1; }
}
