/*
 * Foglio di stile sorgente copiato dal mockup HTML dalla skill html-to-theme.
 * Servito in frontend via wp_enqueue_style e nell'editor via add_editor_style.
 * I design tokens :root{--*} sono preservati inline (in parallelo ai preset WP
 * di theme.json, che usano il namespace --wp--preset--*).
 */
/* ============================================================
   Domè Bistrot — Design Tokens (from Figma)
   ============================================================ */
:root {
  /* Colors */
  --color-primary:    #7e263f;
  --color-cream:      #e6e2dd;
  --color-dark:       #090808;
  --color-white:      #ffffff;

  /* Typography */
  --font-heading:     'Instrument Serif', Georgia, serif;
  --font-body:        'Inter', system-ui, sans-serif;
  --fw-light:         300;
  --fw-regular:       400;

  /* Font sizes */
  --fs-display:       64px;
  --fs-subheading:    40px;
  --fs-nav:           32px;
  --fs-cta:           24px;
  --fs-small:         16px;
  --fs-xs:            12px;

  /* Spacing */
  --section-min-h:    832px;
  --max-w:            1280px;
  --content-w:        958px;
  --radius-pill:      99px;
  --px-btn:           36px;
  --py-btn:           12px;

  /* Line heights */
  --lh-tight:         1.2;
  --lh-base:          1.4;

  /* Letter spacing */
  --ls-tight:         -0.32px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
html {  scroll-behavior: smooth;  }
body {
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  color: var(--color-dark);
  background: var(--color-cream);
  scroll-behavior: smooth;
}

/* ============================================================
   Shared: Button
   - .btn / .btn--primary       → markup custom dei blocchi del tema
   - .wp-block-button__link     → core/button di Gutenberg
   - .wp-element-button         → bottoni generati da WP (pagination, comments)
   ============================================================ */
.btn,
.btn--primary,
.wp-block-button .wp-block-button__link,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--py-btn) var(--px-btn);
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: var(--fs-cta);
  line-height: var(--lh-tight);
  background: var(--color-primary);
  color: var(--color-cream);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s ease;
}
.btn:hover,
.btn--primary:hover,
.wp-block-button .wp-block-button__link:hover,
.wp-element-button:hover {
  opacity: 0.85;
  color: var(--color-cream);
}
.btn--with-icon {
  gap: 8px;
}
.btn__icon {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 40px 40px 40px;
}
.site-nav a {
  font-family: var(--font-heading);
  font-size: var(--fs-nav);
  color: var(--color-cream);
  line-height: var(--lh-tight);
}
.site-nav a:hover { text-decoration: underline; }
.site-nav .btn { font-size: var(--fs-cta); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: var(--section-min-h);
  max-width: 1700px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__bg {
  position: absolute;
  inset: 0;
}
.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(142, 20, 24, 0.36);
  mix-blend-mode: luminosity;
  z-index: 1;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 2;
}
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__logo {
  position: relative;
  z-index: 3;
  width: 406px;
  max-width: 80%;
}
.hero__logo img { width: 100%; height: auto; }

/* ============================================================
   Menu Split (Body 1)
   ============================================================ */
.menu-split {
  position: relative;
  min-height: var(--section-min-h);
  background-color: var(--color-cream);
  overflow: hidden;
  padding: 100px 48px 120px;
}
.menu-split__inner {
  max-width: 1400px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 40px;
}
.menu-split__left,
.menu-split__right {
  position: relative;
}
.menu-split__title {
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  color: var(--color-primary);
  line-height: var(--lh-base);
  margin-bottom: 24px;
  text-align: center;
}
.menu-split__text {
  color: var(--color-primary);
  line-height: var(--lh-base);
  letter-spacing: var(--ls-tight);
}

.menu-split__right .menu-split__text { text-align: right; }
.menu-split__images {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35%;
  height: auto;
    max-height: 555px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;

}

.menu-split__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.menu-split__cta {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-cta);
  white-space: nowrap;
}

/* ============================================================
   Chi Siamo (Body 2)
   ============================================================ */
.chi-siamo {
  min-height: var(--section-min-h);
  background-color: var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 48px;
  gap: 26px;
}
.chi-siamo__title {
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  color: var(--color-white);
  line-height: var(--lh-base);
  max-width: var(--content-w);
}
.chi-siamo__divider {
  width: 284px;
  border: none;
  border-top: 1px solid var(--color-cream);
}
.chi-siamo__text {
  color: var(--color-white);
  line-height: var(--lh-base);
  max-width: var(--content-w);
}

/* ============================================================
   Gallery Carousel (Body 3) — powered by Swiper
   ============================================================ */
.gallery-carousel {
  position: relative;
  min-height: var(--section-min-h);
  background-color: var(--color-primary);
  overflow: hidden;
}

/* Swiper container sizing */
.gallery-carousel__swiper {
  height: var(--section-min-h);
  padding: 62px 0;
}

/* Slide dimensions */
.gallery-carousel__swiper .swiper-slide {
  width: 332px;
  height: 544px;
  overflow: hidden;
}
.gallery-carousel__swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Navigation arrows — theme colours */
.gallery-carousel__swiper .swiper-button-prev,
.gallery-carousel__swiper .swiper-button-next {
  top: 18px;
  bottom: auto;
  color: var(--color-cream);
}
.gallery-carousel__swiper .swiper-button-prev { left: auto; right: 80px; }
.gallery-carousel__swiper .swiper-button-next { right: 28px; }

/* ============================================================
   Team (Body 4)
   ============================================================ */
.team {
  min-height: var(--section-min-h);
  background-color: var(--color-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 48px;
  gap: 26px;
}
.team__title {
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  color: var(--color-primary);
  line-height: var(--lh-base);
  max-width: var(--content-w);
  margin-left: auto;
  margin-right: auto;
}
.team__divider {
  width: 284px;
  border: none;
  border-top: 1px solid var(--color-primary);
}
.team__text {
  color: var(--color-primary);
  line-height: var(--lh-base);
  max-width: var(--content-w);
}

/* ============================================================
   Footer (Body 5)
   ============================================================ */
.site-footer {
  min-height: var(--section-min-h);
  background-color: var(--color-dark);
  color: var(--color-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 48px 56px;
  position: relative;
  overflow: hidden;
  gap: 0;
}
.site-footer__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.site-footer__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}
.site-footer__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.site-footer__logo {
  width: 218px;
  margin-bottom: 48px;
  position: relative;
  z-index: 2;
}
.site-footer__logo img { width: 100%; height: auto; }

.site-footer__content {
  width: 100%;
  max-width: 580px;
  position: relative;
  z-index: 2;
}
.site-footer__content .wp-block-heading {
  font-family: var(--font-heading);
  font-size: var(--fs-subheading);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
  margin-top: 32px;
  margin-bottom: 12px;
}
.site-footer__content .wp-block-heading:first-child {
  margin-top: 0;
}
.site-footer__content .wp-block-paragraph {
  line-height: var(--lh-base);
}
.site-footer__content a {
  color: var(--color-cream);
  text-decoration: underline ;
}
.site-footer__legal {
  position: absolute;
  bottom: 17px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  white-space: nowrap;
  z-index: 2;
}
.site-footer__legal a {
  font-size: var(--fs-xs);
  color: var(--color-cream);
  font-weight: var(--fw-regular);
}
.site-footer__back-to-top {
  position: absolute;
  bottom: 8px;
  right: 48px;
  font-size: var(--fs-small);
  z-index: 2;
}

/* ============================================================
   Inner pages — header sticky
   ============================================================ */
.inner-header {
  position: sticky;
  top: 0;
  z-index: 100;
}
.inner-header .wp-block-navigation a,
.inner-header .wp-block-navigation .wp-block-navigation-item__content {
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  color: var(--color-cream) !important;
  line-height: var(--lh-tight);
}
.inner-header .wp-block-site-logo img {
  max-height: 60px;
  width: auto;
}

/* ============================================================
   Inner pages — content area
   ============================================================ */
.page-content .wp-block-post-title {
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  color: var(--color-primary);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
}
.page-content .wp-block-post-date {
  color: var(--color-dark);
  opacity: 0.6;
}
.page-content .wp-block-post-featured-image img {
  width: 100%;
  object-fit: cover;
}

/* ============================================================
   Archive — post grid
   ============================================================ */
.archive-post .wp-block-post-title a {
  font-family: var(--font-heading);
  font-size: var(--fs-cta);
  color: var(--color-primary);
  font-weight: var(--fw-regular);
  text-decoration: none;
}
.archive-post .wp-block-post-title a:hover {
  text-decoration: underline;
}
.archive-post .wp-block-post-excerpt__excerpt {
  line-height: var(--lh-base);
}
.archive-post .wp-block-post-excerpt__more-link {
  font-family: var(--font-heading);
  color: var(--color-primary);
}

/* ============================================================
   404
   ============================================================ */
.page-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Scroll fade
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .fade-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .fade-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Mobile — ≤ 768px
   ============================================================ */
@media (max-width: 768px) {

  :root {
    --fs-display:    40px;
    --fs-subheading: 28px;
    --fs-nav:        24px;
    --fs-cta:        18px;
    --fs-small:      20px;
    --section-min-h: auto;
    --px-btn:        24px;
    --py-btn:        10px;
  }

  /* Navigation */
  .site-nav {
    padding: 16px 20px;
    gap: 12px;
    flex-direction: column;
  }
  .site-nav a {
    font-size: var(--fs-nav);
    display: block;
    margin-bottom: 10px;
  }
  .site-nav .btn {
    font-size: var(--fs-small);
    padding: 8px 16px;
  }

  /* Hero */
  .hero {
    min-height: 90svh;
  }
  .hero__logo {
    width: 240px;
  }

  /* Menu Split */
  .menu-split {
    padding: 40px 24px 48px;
  }
  .menu-split__inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .menu-split__left,
  .menu-split__right {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .menu-split__title {
    font-size: var(--fs-display);
    margin-bottom: 0;
  }
 .menu-split__left .menu-split__text,
  .menu-split__right .menu-split__text {
    text-align: center;
  }

  .menu-split__images {
    display: none;
  }
  .menu-split__cta {
    position: static;
    transform: none;
    display: block;
    text-align: center;
    margin-top: 24px;
     max-width: 200px;
    margin-left: auto;  
    margin-right: auto;
  }

  /* Chi Siamo */
  .chi-siamo {
    padding: 48px 24px;
    gap: 18px;
  }
  .chi-siamo__title {
    font-size: var(--fs-display);
  }

  /* Gallery Carousel */
  .gallery-carousel__swiper {
    height: auto;
    padding: 72px 0 24px;
  }
  .gallery-carousel__swiper .swiper-slide {
    height: auto;
    aspect-ratio: 332 / 544;
  }
  .gallery-carousel__swiper .swiper-button-prev,
  .gallery-carousel__swiper .swiper-button-next {
    top: 26px;
  }
  .gallery-carousel__swiper .swiper-button-prev { right: 64px; }
  .gallery-carousel__swiper .swiper-button-next { right: 16px; }

  /* Team */
  .team {
    padding: 48px 32px;
    gap: 18px;
  }
  .team__title {
    font-size: var(--fs-display);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
  .team__text {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Inner header */
  .inner-header {
    padding: 12px 20px !important;
  }
  .inner-header .wp-block-site-logo img {
    max-height: 44px;
  }

  /* Page / single content */
  .page-content {
    padding: 48px 24px !important;
  }

  /* Archive grid: single column */
  .wp-block-post-template.is-flex-container {
    grid-template-columns: 1fr !important;
  }

  /* 404 */
  .page-404 {
    padding: 80px 24px !important;
    min-height: 50vh;
  }

  /* Footer */
  .site-footer {
    padding: 40px 24px 72px;
  }
  .site-footer__logo {
    width: 140px;
    margin-bottom: 24px;
  }
  .site-footer__content .wp-block-heading {
    margin-top: 24px;
  }
  .site-footer__back-to-top {
    right: 16px;
    bottom: 12px;
    font-size: var(--fs-xs);
    padding: 6px 14px;
  }
  .site-footer__legal {
    flex-direction: column;
    gap: 8px;
    align-items: center;
    white-space: normal;
    text-align: center;
  }
}

/* ============================================================
   Tablet — 769px – 1024px
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {

  :root {
    --fs-display:    52px;
    --fs-nav:        24px;
    --section-min-h: auto;
  }

  .site-nav {
    padding: 16px 32px;
  }

  /* Hero */
  .hero {
    min-height: 80svh;
  }
  .hero__logo {
    width: 320px;
  }

  .menu-split {
    padding: 48px 32px 56px;
  }
  .menu-split__inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .menu-split__left,
  .menu-split__right {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .menu-split__title {
    margin-bottom: 0;
  }
  .menu-split__right .menu-split__text {
    text-align: left;
  }
  .menu-split__images {
    display: none;
  }
  .menu-split__cta {
    position: static;
    transform: none;
    display: block;
    text-align: center;
    margin-top: 24px;
  }

  .chi-siamo {
    padding: 56px 48px;
    gap: 20px;
  }
  .chi-siamo__title,
  .chi-siamo__text {
    max-width: 600px;
  }

  .team {
    padding: 56px 48px;
    gap: 20px;
  }
  .team__title,
  .team__text {
    max-width: 600px;
  }

  .site-footer {
    padding: 40px 32px 72px;
  }

  /* Inner pages tablet */
  .inner-header {
    padding: 16px 32px !important;
  }
  .page-content {
    padding: 64px 32px !important;
  }
  .wp-block-post-template.is-flex-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
