/* ============================================================================
   Casa Mimì — sito vetrina
   Foglio di stile condiviso da tutte le pagine.

   COME MODIFICARE I COLORI: cambia i valori qui sotto in :root — si aggiornano
   ovunque. I nomi seguono la palette del brand (Silvia Blazina, 06.2026).
   ========================================================================== */

:root {
  /* ---- Palette brand ---- */
  --bordeaux: #733f2f;        /* C3.38.25 — colore forte: titoli, bottoni, testo */
  --bordeaux-deep: #5f3228;   /* variante più scura per hover */
  --cream: #f2e1ce;           /* E3.08.86 — tono dominante */
  --porcelain: #f5f1eb;       /* sfondo chiaro di base */
  --blush: #cdb5ae;           /* rosa — colore firma / accenti */
  --blush-soft: #e6d8d2;      /* rosa schiarito per fondali morbidi */
  --sage: #979970;            /* verde salvia — accento secondario */
  --gold: #b08d57;            /* raw gold — dettagli sottili */
  --ink: #3a2a24;             /* testo di lettura, bruno caldo */
  --ink-soft: #6f5f57;        /* testo secondario */

  /* ---- Misure ---- */
  --max: 1120px;              /* larghezza massima dei contenuti */
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 24px 60px -34px rgba(90, 50, 40, 0.45);

  /* ---- Font ---- */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Reset leggero ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--porcelain);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; color: var(--bordeaux); margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
/* Aria fra un titolo e il paragrafo che lo segue subito. */
h2 + p, h3 + p { margin-top: 0.75rem; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 24px; }
.eyebrow {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--sage);
  margin: 0 0 0.9rem;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---- Bottoni ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: all 0.18s ease;
}
.btn-primary { background: var(--bordeaux); color: var(--porcelain); }
.btn-primary:hover { background: var(--bordeaux-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--bordeaux); color: var(--bordeaux); background: transparent; }
.btn-ghost:hover { background: var(--bordeaux); color: var(--porcelain); }

/* ============================================================================
   HEADER / NAVIGAZIONE
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--porcelain) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--bordeaux) 12%, transparent);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 1rem;
}
.brand { font-family: var(--serif); font-size: 1.5rem; color: var(--bordeaux); text-decoration: none; letter-spacing: 0.01em; display: inline-flex; align-items: center; }
.brand-logo { height: 64px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; text-decoration: none; color: var(--ink);
  padding-bottom: 2px; border-bottom: 1.5px solid transparent; transition: border-color 0.18s;
}
.nav-links a:hover { border-color: var(--blush); }
.nav-links a[aria-current='page'] { color: var(--bordeaux); border-color: var(--bordeaux); }
.nav-actions { display: flex; align-items: center; gap: 0.7rem; }
.nav-cta { margin-left: 0; }
/* Icona account: porta al login dell'app (my.spaziocasamimi.com/accedi). */
.nav-account {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; flex: 0 0 auto;
  color: var(--bordeaux); text-decoration: none;
  border: 1.5px solid color-mix(in srgb, var(--bordeaux) 22%, transparent);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.nav-account:hover, .nav-account:focus-visible {
  background: var(--bordeaux); color: var(--porcelain); border-color: var(--bordeaux);
}
.nav-account svg { width: 20px; height: 20px; display: block; }
/* Menu mobile: le voci si nascondono, resta il bottone Prenota. */
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ============================================================================
   SEZIONI
   ========================================================================== */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tint { background: var(--cream); }
.section-blush { background: var(--blush-soft); }

/* ---- Hero ---- */
.hero { padding-block: clamp(4rem, 10vw, 7rem); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.2rem; }
.hero .claim { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--bordeaux); margin-bottom: 0.6rem; }
.hero .descriptor { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Hero con foto di sfondo: velatura crema a sinistra per la leggibilità del testo. */
.hero--photo {
  display: flex; align-items: center;
  min-height: min(76vh, 620px);
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--porcelain) 92%, transparent) 0%,
      color-mix(in srgb, var(--porcelain) 80%, transparent) 42%,
      color-mix(in srgb, var(--porcelain) 34%, transparent) 74%,
      color-mix(in srgb, var(--porcelain) 8%, transparent) 100%),
    url('hero.jpg') center / cover no-repeat;
}
.hero-inner { width: 100%; }
.hero-copy { max-width: 40rem; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* Su mobile il testo occupa tutta la larghezza: velatura dall'alto verso il basso. */
  .hero--photo {
    min-height: min(80vh, 560px);
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--porcelain) 86%, transparent) 0%,
        color-mix(in srgb, var(--porcelain) 68%, transparent) 55%,
        color-mix(in srgb, var(--porcelain) 52%, transparent) 100%),
      url('hero.jpg') center / cover no-repeat;
  }
}

/* ---- Griglie di card ---- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--porcelain); border: 1px solid color-mix(in srgb, var(--bordeaux) 10%, transparent);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.section-tint .card, .section-blush .card { background: #fff; }
.card-body { padding: 1.4rem 1.5rem 1.6rem; }
.card h3 { margin-bottom: 0.15rem; }
.card .role { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; color: var(--sage); text-transform: uppercase; margin-bottom: 0.7rem; }
.card p { font-size: 0.96rem; color: var(--ink-soft); margin-bottom: 0; }
.price { display: inline-block; margin-top: 1rem; font-weight: 600; color: var(--bordeaux); }

/* ---- Team (card generate dall'app) ---- */
.team-photo { width: 100%; height: 230px; object-fit: cover; object-position: center 25%; display: block; }
.team-technique { font-size: 0.9rem; font-style: italic; color: var(--sage); margin-bottom: 0.6rem; }
.card .team-technique + p { margin-top: 0; }
.team-state { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); padding: 2.5rem 0; }

/* ---- Countdown inaugurazione ---- */
.countdown-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.countdown-copy { min-width: 240px; }
.countdown-title { margin: 0.2rem 0 0.3rem; }
.countdown-sub { color: var(--ink-soft); margin: 0; }
.cd { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.cd-box {
  min-width: 74px; text-align: center; background: #fff;
  border: 1px solid color-mix(in srgb, var(--bordeaux) 12%, transparent);
  border-radius: 14px; padding: 0.9rem 0.7rem; box-shadow: var(--shadow);
}
.cd-box b { display: block; font-family: var(--serif); font-weight: 500; font-size: 2rem; line-height: 1; color: var(--bordeaux); font-variant-numeric: tabular-nums; }
.cd-box small { display: block; margin-top: 0.5rem; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); }
.cd-done { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--bordeaux); margin: 0; }
@media (max-width: 640px) { .countdown-inner { justify-content: center; text-align: center; } .countdown-copy { min-width: 0; } }

/* ---- Team: card cliccabile + ruolo + chip ---- */
.team-card { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.team-card:hover { transform: translateY(-3px); box-shadow: 0 30px 70px -34px rgba(90, 50, 40, 0.55); }
.team-card:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; }
/* Corpo in colonna: ogni elemento sulla propria riga, "Scopri di più" in fondo. */
.team-card .card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; gap: 0; padding: 1.2rem 1.3rem 1.3rem; }
.team-card h3 { margin-bottom: 0.5rem; }
.team-role {
  align-self: flex-start; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bordeaux);
  background: color-mix(in srgb, var(--blush) 45%, transparent);
  padding: 0.24rem 0.66rem; border-radius: 999px; margin-bottom: 1rem;
}
/* Vince su `.card p { margin-bottom: 0 }`: dà aria tra badge ruolo e chip. */
.team-card .card-body .team-role { margin-bottom: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.2rem; }
.chip {
  font-size: 0.76rem; color: var(--ink-soft); background: color-mix(in srgb, var(--sage) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sage) 26%, transparent);
  padding: 0.18rem 0.55rem; border-radius: 999px; line-height: 1.3;
}
.chip-more { color: var(--bordeaux); background: color-mix(in srgb, var(--bordeaux) 8%, transparent); border-color: transparent; font-weight: 600; }
.team-more { margin-top: auto; padding-top: 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--bordeaux); }

/* Placeholder foto senza immagine: stessa altezza fissa delle foto, tono brand. */
.team-card .ph-portrait { aspect-ratio: auto; height: 230px; }

/* ---- Team: modale di dettaglio ---- */
.tm-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(45, 25, 20, 0.5); padding: 1rem;
}
.tm-overlay[hidden] { display: none; }
.tm-dialog {
  position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.tm-close {
  position: absolute; top: 0.8rem; right: 0.9rem; z-index: 2; width: 34px; height: 34px;
  border: none; border-radius: 999px; background: rgba(255, 255, 255, 0.85); color: var(--ink);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.tm-close:hover { background: #fff; }
.tm-content { padding: 1.6rem; }
.tm-head { display: flex; gap: 1.1rem; align-items: flex-start; margin-bottom: 1rem; }
.tm-photo { width: 120px; height: 150px; object-fit: cover; border-radius: 14px; flex: 0 0 auto; }
.ph-portrait.tm-photo { display: grid; }
.tm-head-text { min-width: 0; padding-top: 0.2rem; }
.tm-head-text h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.tm-bio { color: var(--ink-soft); margin-bottom: 1rem; }
.tm-bio p { font-size: 0.96rem; margin-bottom: 0.7rem; }
.tm-section { margin-bottom: 1rem; }
.tm-section-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--sage); margin-bottom: 0.4rem; }
.tm-cta { width: 100%; text-align: center; margin-top: 0.4rem; }
@media (max-width: 480px) {
  .tm-head { flex-direction: column; }
  .tm-photo { width: 100%; height: 220px; }
}

/* ---- Placeholder foto (sostituisci con <img class="..."> mantenendo la classe) ---- */
.ph {
  display: grid; place-items: center; background: linear-gradient(135deg, var(--blush) 0%, var(--sage) 140%);
  color: color-mix(in srgb, #fff 82%, transparent); font-family: var(--sans); font-size: 0.78rem;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.ph-portrait { aspect-ratio: 4 / 5; }
.ph-wide { aspect-ratio: 16 / 10; }
/* Foto reali dentro le card (es. anteprima servizi in home): riempiono il
   riquadro con il ritaglio, senza deformarsi. */
.card > img.ph-wide, .card > img.ph-portrait { width: 100%; object-fit: cover; }
.ph-hero { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.ph-round { aspect-ratio: 1; border-radius: 999px; }

/* ---- Blocco storia ---- */
.story { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.story + .story { margin-top: clamp(2.5rem, 6vw, 4rem); }
.story.reverse { grid-template-columns: 1.2fr 0.8fr; }
.story.reverse .story-media { order: 2; }
/* Foto reali nei blocchi storia: riempiono il riquadro con angoli e ombra. */
.story-media img { width: 100%; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.story-media img.ph-portrait { aspect-ratio: 4 / 5; }
.story-media img.ph-wide { aspect-ratio: 16 / 10; }
@media (max-width: 820px) {
  .story, .story.reverse { grid-template-columns: 1fr; }
  .story.reverse .story-media { order: 0; }
}
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.5rem; list-style: none; padding: 0; }
.values li { background: #fff; border-radius: var(--radius); padding: 1.3rem; border: 1px solid color-mix(in srgb, var(--bordeaux) 10%, transparent); }
.values h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.values p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 720px) { .values { grid-template-columns: 1fr; } }

/* ---- CTA a tutta larghezza ---- */
.cta-band { background: var(--bordeaux); color: var(--cream); border-radius: var(--radius-lg); padding: clamp(2.5rem, 6vw, 4rem); text-align: center; }
.cta-band h2 { color: var(--cream); margin-bottom: 0; }
.cta-band p { color: color-mix(in srgb, var(--cream) 85%, transparent); max-width: 48ch; margin-inline: auto; margin-bottom: 1.8rem; }
.cta-band .btn-primary { background: var(--cream); color: var(--bordeaux); }
.cta-band .btn-primary:hover { background: #fff; }

/* ============================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--bordeaux); color: color-mix(in srgb, var(--cream) 90%, transparent); padding-block: 3.5rem 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blush); margin: 0 0 1rem; }
.site-footer .brand { color: var(--cream); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.6rem; }
.site-footer a { color: color-mix(in srgb, var(--cream) 88%, transparent); text-decoration: none; font-size: 0.95rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--cream) 22%, transparent); font-size: 0.82rem; color: color-mix(in srgb, var(--cream) 70%, transparent); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }

/* ============================================================================
   BANNER (gestito da my/admin, letto da /api/banner)
   ========================================================================== */
.site-banner {
  position: relative;
  width: 100%;
  padding: 0.6rem 2.6rem;
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
}
.site-banner[hidden] { display: none; }
.site-banner.info { background: var(--cream); color: var(--ink); }
.site-banner.promo { background: var(--bordeaux); color: var(--cream); }
.site-banner.warn { background: var(--blush-soft); color: var(--ink); }
.site-banner-link { font-weight: 600; text-decoration: underline; margin-left: 0.5rem; color: inherit; }
.site-banner-close {
  position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: inherit; font-size: 1.2rem; line-height: 1;
  cursor: pointer; opacity: 0.65; padding: 0.2rem 0.4rem;
}
.site-banner-close:hover { opacity: 1; }

/* Rispetta chi preferisce meno animazioni */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover { transform: none; } }
