/* TheWinary — sito di presentazione. Palette identica all'app (iOS/Android),
   cosi' chi arriva dal sito riconosce subito l'app quando la scarica. */

:root {
  --wine-red: #7D1F3B;
  --wine-dark: #4D1024;
  --paper: #F8F4EE;
  --surface: #FFFDFA;
  --ink: #312725;
  --muted: #786A63;
  --gold: #B8874D;
  --straw: #D1B038;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 12px 30px rgba(77, 16, 36, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
}

p { margin: 0 0 1em; color: var(--muted); }

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 135, 77, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--wine-red);
}

.logo-mark { font-size: 1.4rem; }
.logo-text strong { color: var(--wine-dark); }

.logo-text-group { display: flex; flex-direction: column; line-height: 1.15; }
.logo-tagline {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--wine-red); }

.nav-cta {
  background: var(--wine-red);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--wine-dark); }

.nav-toggle { display: none; }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav-burger span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--wine-red);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--wine-dark); }

.btn-outline {
  border: 1.5px solid var(--wine-red);
  color: var(--wine-red);
  background: transparent;
}
.btn-outline:hover { background: rgba(125, 31, 59, 0.06); }

.btn-light {
  background: var(--surface);
  color: var(--wine-dark);
  box-shadow: var(--shadow-soft);
}
.btn-light:hover { background: #fff; }

.btn-large { padding: 18px 34px; font-size: 1.05rem; }

/* ---------- Eyebrow / titles ---------- */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}
.eyebrow-light { color: rgba(255,255,255,0.75); }
.eyebrow.center { text-align: center; }

.section-title { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-title.center { text-align: center; margin-bottom: 48px; }

/* ---------- Hero ---------- */

.hero { padding: 88px 0 64px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  color: var(--wine-dark);
}

.hero-subtitle {
  font-size: 1.08rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 24px;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  background: var(--surface);
  border: 1px solid rgba(184, 135, 77, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
}

.store-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-badge-img {
  height: 44px;
  width: auto;
  border-radius: 8px;
}

.privacy-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Hero visual: phone mockup ----------
   Cornice generica "da smartphone moderno" (fotocamera a foro invece di un
   notch specifico) per non richiamare la sagoma di un singolo modello/marca:
   l'app e' per iOS e Android, la cornice resta neutra per entrambi. */

.hero-visual { display: flex; justify-content: center; padding: 10px 0; }

.phone-frame {
  width: 226px;
  background: linear-gradient(170deg, #431129, var(--wine-dark) 55%, #33091b);
  border-radius: 48px;
  padding: 9px 7px;
  box-shadow:
    0 34px 54px -18px rgba(77, 16, 36, 0.38),
    0 8px 16px rgba(77, 16, 36, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
}

.phone-camera {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  background: #0d0206;
  border-radius: 50%;
  z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.phone-button {
  position: absolute;
  background: #33091b;
  z-index: 1;
}
.phone-button-power {
  right: -1.5px; top: 108px;
  width: 2.5px; height: 40px;
  border-radius: 0 2px 2px 0;
}
.phone-button-volume-up {
  left: -1.5px; top: 96px;
  width: 2.5px; height: 26px;
  border-radius: 2px 0 0 2px;
}
.phone-button-volume-down {
  left: -1.5px; top: 130px;
  width: 2.5px; height: 26px;
  border-radius: 2px 0 0 2px;
}

.phone-screen {
  background: var(--paper);
  border-radius: 40px;
  padding: 32px 13px 16px;
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

.phone-screen-gloss {
  position: absolute;
  top: -40%; left: -60%;
  width: 90%; height: 220%;
  background: linear-gradient(115deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 35%);
  transform: rotate(8deg);
  pointer-events: none;
}

.mock-header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 10px;
}

.mock-search {
  height: 30px;
  background: var(--surface);
  border: 1px solid rgba(184,135,77,0.25);
  border-radius: 8px;
  margin-bottom: 12px;
}

.mock-card {
  background: var(--surface);
  border: 1px solid rgba(184,135,77,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.mock-card.highlight { border-color: var(--gold); background: #FBF3E4; }

.mock-card-title { font-size: 0.8rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }

.mock-card-line {
  height: 6px;
  background: rgba(120, 106, 99, 0.25);
  border-radius: 4px;
  margin-bottom: 5px;
  width: 100%;
}
.mock-card-line.short { width: 55%; }

/* ---------- Features ---------- */

.features { padding: 64px 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.features-grid-3 { grid-template-columns: repeat(3, 1fr); }

.feature-card {
  background: var(--surface);
  border: 1px solid rgba(184, 135, 77, 0.22);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.feature-card-accent {
  background: linear-gradient(155deg, #FBF3E4, var(--surface));
  border-color: var(--gold);
}

.feature-icon { font-size: 1.8rem; margin-bottom: 12px; }

.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Spotlight (InCantina banner) ---------- */

.spotlight {
  background: linear-gradient(135deg, var(--wine-dark), var(--wine-red));
  padding: 72px 0;
}

.spotlight-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.spotlight-copy h2 { color: #fff; }
.spotlight-copy p { color: rgba(255,255,255,0.85); max-width: 520px; }

.spotlight-inner-center {
  grid-template-columns: 1fr;
  text-align: center;
}
.spotlight-copy-center { margin: 0 auto; }
.spotlight-copy-center p { margin-left: auto; margin-right: auto; }

.spotlight-visual { display: flex; justify-content: center; }

.qr-mock {
  width: 160px; height: 160px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.25);
}
.qr-mock-large { width: 200px; height: 200px; }

.qr-mock-img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- How it works ---------- */

.how { padding: 64px 0; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.how-grid-4 { grid-template-columns: repeat(4, 1fr); }

.how-step { text-align: center; padding: 0 8px; }

.how-number {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  background: var(--wine-red);
  color: #fff;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
}

.how-step h3 { font-size: 1.05rem; }
.how-step p { font-size: 0.92rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--wine-dark);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 28px;
  text-align: center;
}

.footer-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 6px;
}

/* .logo-text strong e' scuro per leggersi sull'header (sfondo chiaro): nel
   footer lo sfondo e' scuro quanto lui, quindi qui va sovrascritto per non
   restare invisibile. */
.footer-brand .logo-text strong { color: var(--gold); }
.footer-brand .logo-tagline { color: rgba(255,255,255,0.55); }

.footer-tagline { color: rgba(255,255,255,0.65); margin-bottom: 18px; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 22px;
  font-weight: 500;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin: 0; }

/* ---------- Animazioni ----------
   Tutto chiuso in prefers-reduced-motion: no-preference, cosi' chi ha
   disattivato le animazioni nel sistema vede subito il contenuto, senza
   restare con elementi invisibili in attesa di un'animazione che non parte. */

@media (prefers-reduced-motion: no-preference) {

  .hero-copy > * {
    opacity: 0;
    animation: hero-fade-up 1.1s ease forwards;
  }
  .hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.22s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.39s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.56s; }
  .hero-copy > *:nth-child(5) { animation-delay: 0.73s; }
  .hero-copy > *:nth-child(6) { animation-delay: 0.9s; }

  @keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hero-visual {
    opacity: 0;
    animation: hero-fade-in 1.3s ease 0.4s forwards;
  }
  @keyframes hero-fade-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  .phone-frame {
    animation: phone-float 7.5s ease-in-out 1.7s infinite;
  }
  @keyframes phone-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  .qr-mock {
    animation: qr-glow 4.6s ease-in-out infinite;
  }
  @keyframes qr-glow {
    0%, 100% { box-shadow: 0 20px 45px rgba(0,0,0,0.25); }
    50% { box-shadow: 0 20px 52px rgba(184,135,77,0.4); }
  }

  /* Comparsa "al passaggio dello scroll" per le sezioni sotto la piega:
     partono invisibili/leggermente piu' in basso, JS (script.js) aggiunge
     .is-visible quando entrano nello schermo. */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s ease, transform 0.9s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .features-grid .reveal:nth-child(1) { transition-delay: 0s; }
  .features-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
  .features-grid .reveal:nth-child(3) { transition-delay: 0.24s; }
  .features-grid .reveal:nth-child(4) { transition-delay: 0.36s; }
  .features-grid .reveal:nth-child(5) { transition-delay: 0.48s; }
  .features-grid .reveal:nth-child(6) { transition-delay: 0.6s; }

  .how-grid .reveal:nth-child(1) { transition-delay: 0s; }
  .how-grid .reveal:nth-child(2) { transition-delay: 0.15s; }
  .how-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
  .how-grid .reveal:nth-child(4) { transition-delay: 0.45s; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-inner, .spotlight-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .how-grid, .how-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .features-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 24px;
    border-bottom: 1px solid rgba(184,135,77,0.18);
    display: none;
  }
  .site-nav a { width: 100%; padding: 10px 0; }
  .nav-cta { width: 100%; text-align: center; margin-top: 6px; }
  .nav-burger { display: flex; }
  .nav-toggle:checked ~ .site-nav { display: flex; }

  .how-grid, .how-grid-4 { grid-template-columns: 1fr; }
  .features-grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
}
