/* ================================================================
   CAFFÈ FAPPANI — style.css
   Variabili globali, reset, tipografia, layout, hero, utilità
   ================================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --color-white: #FFFFFF;
  --color-cream: #FAF8F4;
  --color-black: #1A1A1A;
  --color-gold: #C9A96E;
  --color-gray: #6B6560;
  --color-gray-light: #E8E4DE;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --spacing-xxl: 8rem;

  --max-width: 1200px;
  --border-radius: 3px;

  --transition-fast: 0.2s ease;
  --transition-base: 0.4s ease;
  --transition-slow: 0.6s ease;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.11);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-black);
  background-color: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
}

/* ---- Tipografia ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-black);
}

h1 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.8rem); font-weight: 400; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); font-weight: 400; }
h4 { font-size: 1rem; font-weight: 700; letter-spacing: 0.05em; }

p {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-gray);
  font-size: 1rem;
  max-width: 65ch;
  line-height: 1.8;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section--cream {
  background-color: var(--color-cream);
}

.section--dark {
  background-color: var(--color-black);
}

/* ---- Utilità ---- */
.text-center { text-align: center; }
.text-gold    { color: var(--color-gold); }
.text-white   { color: var(--color-white); }
.text-gray    { color: var(--color-gray); }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
  display: block;
}

.divider {
  width: 52px;
  height: 2px;
  background-color: var(--color-gold);
  margin: 1.25rem auto;
}

.divider--left { margin-left: 0; }

/* ---- Hero Homepage ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 12s ease;
  will-change: transform;
}

.hero:hover .hero__bg {
  transform: scale(1.03);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.50) 60%,
    rgba(0, 0, 0, 0.65) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  padding: 0 var(--spacing-md);
  max-width: 860px;
}

.hero__content h1 {
  color: var(--color-white);
  font-style: italic;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.hero__subtitle {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 2.8rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 44ch;
  font-weight: 300;
}

/* Freccia scroll */
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.45);
  animation: heroScrollBounce 2.5s ease-in-out infinite;
}

.hero__scroll span {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__scroll svg {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 255, 255, 0.45);
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ---- Page Hero (pagine interne) ---- */
.page-hero {
  position: relative;
  height: 58vh;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 0;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 10s ease;
}

.page-hero:hover .page-hero__bg {
  transform: scale(1.02);
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.page-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  padding: 0 var(--spacing-md);
}

.page-hero__content h1 {
  color: var(--color-white);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.page-hero__content p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  max-width: 48ch;
  margin: 0 auto;
}

/* ---- Page header senza immagine (es. menu, contatti) ---- */
.page-header {
  padding: calc(var(--spacing-xl) + 80px) 0 var(--spacing-xl);
  background-color: var(--color-cream);
  text-align: center;
}

.page-header h1 {
  font-style: italic;
  margin-bottom: 0.5rem;
}

.page-header p {
  margin: 0 auto;
  font-size: 1.05rem;
}
