/* =====================================================
   OCCHINO.IT — Family Website Stylesheet
   Style: Mediterranean Elegance
   Fonts: Playfair Display (headings) · Lora (body)

   HOW TO CUSTOMIZE:
   ─ Colors  → Edit values in :root (Section 2)
   ─ Fonts   → Change Google Fonts URL in index.html
               and --font-display / --font-body below
   ─ Width   → --max-width controls page max-width
   ─ Spacing → --section-pad controls section height

   Last updated: 2025
   ===================================================== */


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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

ul {
  list-style: none;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}


/* -------------------------------------------------
   2. DESIGN TOKENS (CSS Custom Properties)
   Change these to restyle the entire site.
   ------------------------------------------------- */
:root {
  /* Palette */
  --cream: #F5F1E8;
  /* page background       */
  --terracotta: #C97C4D;
  /* primary brand color   */
  --sienna: #9B4423;
  /* darker terracotta     */
  --olive: #4A5D3A;
  /* checkmarks, accents   */
  --charcoal: #2C2C2C;
  /* dark backgrounds      */
  --warm-gray: #8A7F74;
  /* secondary text        */
  --white: #FFFFFF;
  --border: #E2DBCD;
  /* dividers, card edges  */

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;

  /* Layout */
  --max-width: 1140px;
  --section-pad: 5rem 0;
  --radius: 4px;
  --header-h: 72px;
}


/* -------------------------------------------------
   3. BASE STYLES
   ------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--charcoal);
  background-color: var(--cream);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  color: var(--charcoal);
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--sienna);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--terracotta);
}

strong {
  font-weight: 600;
}


/* -------------------------------------------------
   4. UTILITIES
   ------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-pad);
}

/* White background variant (email section) */
.section--alt {
  background-color: var(--white);
}

/* Uppercase label above headings */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.75rem;
}

.centered {
  text-align: center;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--warm-gray);
  max-width: 580px;
  margin: 0 auto 3rem;
  line-height: 1.75;
}

/* ----- Image placeholders ----- */
/* Remove these divs when you add real photos. */
.img-placeholder {
  background-color: var(--border);
  border: 2px dashed var(--warm-gray);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: 260px;
  text-align: center;
  color: var(--warm-gray);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.6;
}

.img-placeholder--tall {
  min-height: 400px;
}

.img-placeholder--card {
  min-height: 220px;
}

/* Class for real photos — add this to your <img> tags */
.img-full {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  display: block;
}

/* ----- Buttons ----- */
.button {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button--primary {
  background-color: var(--terracotta);
  color: var(--white);
  border: 2px solid var(--terracotta);
}

.button--primary:hover {
  background-color: var(--sienna);
  border-color: var(--sienna);
  color: var(--white);
}

.button--secondary {
  background-color: transparent;
  color: var(--terracotta);
  border: 2px solid var(--terracotta);
}

.button--secondary:hover {
  background-color: var(--terracotta);
  color: var(--white);
}

.button--outline-white {
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.75);
}

.button--outline-white:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}


/* -------------------------------------------------
   5. HEADER & NAVIGATION
   ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background-color: var(--cream);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo mark + wordmark */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-svg {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.logo-svg--footer {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* Animated X when open */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* -------------------------------------------------
   6. HERO
   ------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  padding-bottom: 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Placeholder gradient — warm Sicilian tones */
/* Delete when you add a real photo */
.hero-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg, #D4A675 0%, #9B6442 45%, #6B3D1F 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.6;
}

/* Real hero image — uncomment in HTML and use this class */
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

/* Dark gradient overlay for text legibility */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top,
      rgba(20, 12, 6, 0.78) 0%,
      rgba(20, 12, 6, 0.22) 55%,
      rgba(20, 12, 6, 0.05) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding-top: 2rem;
}

.hero-content .eyebrow {
  color: var(--terracotta);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 12vw, 9rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 0.75rem;
  margin-top: 0.25rem;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 2rem;
}


/* -------------------------------------------------
   7. ABOUT — Chi Siamo
   ------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--warm-gray);
  font-size: 1.05rem;
}


/* -------------------------------------------------
   8. ROOTS — Le Nostre Radici
   ------------------------------------------------- */
.roots {
  background-color: var(--charcoal);
}

.roots .eyebrow {
  color: var(--terracotta);
}

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

.roots .section-intro {
  color: rgba(245, 241, 232, 0.65);
}

.roots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.root-card {
  border-radius: var(--radius);
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.root-card-body {
  padding: 1.75rem;
}

.root-card-body h3 {
  font-size: 1.6rem;
  color: var(--terracotta);
  margin-bottom: 0.75rem;
}

.root-card-body p {
  color: rgba(245, 241, 232, 0.7);
  font-size: 0.95rem;
  line-height: 1.75;
}


/* -------------------------------------------------
   9. ACTIVITIES — Le Nostre Attività
   ------------------------------------------------- */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.activity-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  transition: box-shadow 0.2s ease;
}

.activity-card:hover {
  box-shadow: 0 4px 20px rgba(44, 44, 44, 0.08);
}

.activity-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  display: block;
}

.activity-card h4 {
  font-size: 1.15rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.activity-card p {
  font-size: 0.9rem;
  color: var(--warm-gray);
  line-height: 1.65;
}


/* -------------------------------------------------
   10. EMAIL SERVICE
   ------------------------------------------------- */
.email-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
  align-items: start;
}

.email-panel h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  margin-bottom: 1rem;
}

.email-panel>p {
  color: var(--warm-gray);
  font-size: 1rem;
}

.feature-list {
  margin: 1.5rem 0 0.5rem;
}

.feature-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--charcoal);
}

.feature-list li::before {
  content: '✓  ';
  color: var(--olive);
  font-weight: 700;
}

/* ----- Fillable form ----- */
.email-form {
  margin-top: 1.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
}

.form-input {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  background-color: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: rgba(138, 127, 116, 0.55);
}

.form-input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(201, 124, 77, 0.15);
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--warm-gray);
  font-style: italic;
}

/* ----- Live preview aside ----- */
.email-examples {
  background-color: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.sample-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 1rem;
}

/* Preview card — the big live address box */
.email-preview-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.email-preview-address {
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 1.8vw, 1.1rem);
  word-break: break-all;
  line-height: 1.3;
}

.preview-placeholder {
  color: rgba(138, 127, 116, 0.5);
  font-style: italic;
}

.preview-live {
  color: var(--sienna);
  font-weight: 600;
}

.email-preview-name {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--warm-gray);
}

.preview-hint {
  font-size: 0.78rem;
  color: var(--warm-gray);
  font-style: italic;
  margin-bottom: 0;
}

.sample-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0 1.25rem;
}

/* Static examples (below divider) */
.sample-address {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--sienna);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.sample-address:last-of-type {
  margin-bottom: 0;
}

.email-examples>p {
  font-size: 0.88rem;
  color: var(--warm-gray);
  font-style: italic;
  margin-top: 1.25rem;
}


/* -------------------------------------------------
   11. CONTACT — Contattaci
   ------------------------------------------------- */
.contact-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-align: center;
  min-width: 180px;
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.contact-card h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 0.5rem;
}

.contact-card a,
.contact-card span {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--sienna);
}


/* -------------------------------------------------
   12. FOOTER
   ------------------------------------------------- */
.site-footer {
  background-color: var(--charcoal);
  color: var(--cream);
  padding: 3rem 0 2.5rem;
}

.footer-inner {
  text-align: center;
}

.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: rgba(245, 241, 232, 0.65);
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(245, 241, 232, 0.35);
}

.logo-svg--footer {
  cursor: default;
  transition: filter 0.3s ease;
}

@keyframes logo-pulse {
  0% {
    filter: drop-shadow(0 0 4px #C97C4D80);
  }

  50% {
    filter: drop-shadow(0 0 14px #C97C4D) drop-shadow(0 0 28px #C97C4D99);
  }

  100% {
    filter: drop-shadow(0 0 4px #C97C4D80);
  }
}

.logo-svg--footer:hover {
  animation: logo-pulse 1.5s ease-in-out;
  animation-iteration-count: 6;
  /* ~9s, close enough to 10s */
  animation-fill-mode: forwards;
}


/* -------------------------------------------------
   13. RESPONSIVE — Tablet & Mobile
   ------------------------------------------------- */
@media (max-width: 768px) {

  :root {
    --section-pad: 3.5rem 0;
  }

  /* -- Navigation -- */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--cream);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 1.5rem;
    border-bottom: none;
    width: 100%;
  }

  .nav-links a:hover {
    background-color: rgba(201, 124, 77, 0.06);
  }

  /* -- Hero -- */
  .hero {
    min-height: 85vh;
    padding-bottom: 3.5rem;
    align-items: flex-end;
  }

  /* -- About -- */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-image {
    order: -1;
    /* image above text on mobile */
  }

  /* -- Roots -- */
  .roots-grid {
    grid-template-columns: 1fr;
  }

  /* -- Email -- */
  .email-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* -- Buttons -- */
  .button-group {
    flex-direction: column;
  }

  .button-group .button {
    width: 100%;
    text-align: center;
  }

  /* -- Contact -- */
  .contact-cards {
    flex-direction: column;
    align-items: center;
  }

  .contact-card {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(3rem, 20vw, 4.5rem);
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }
}