/* ─────────────────────────────────────────────
   Footer — Chef to Chef
   ───────────────────────────────────────────── */

.ctc-footer {
  --ctc-footer-bg: var(--wp--preset--color--text-strong, #1f1a17);
  --ctc-footer-fg: rgba(255, 250, 247, 0.50);
  --ctc-footer-fg-strong: rgba(255, 250, 247, 0.70);
  --ctc-footer-accent: var(--wp--preset--color--primary, #b01362);
  --ctc-footer-border: rgba(255, 250, 247, 0.08);

  position: relative;
  background: var(--ctc-footer-bg);
  color: var(--ctc-footer-fg);
   overflow: hidden;
}

/* ── Brand watermark "ChefToChef" — flat & modern ── */

.ctc-footer__watermark-wrap {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  /* azzera padding che WordPress inietta sui blocchi allineati */
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.ctc-footer__watermark {
  margin: 0 !important;
  padding: 0 0.1em !important;
  color: var(--ctc-footer-fg-strong) !important;
  opacity: 0.055;
  font-family: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  font-size: clamp(7.5rem, 23.8vw, 24rem);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1;
  /* translateY gestisce l'allineamento inferiore; translateX compensa il bearing del font graziato */
  transform: translateY(0.20em) translateX(-0.06em);
  white-space: nowrap;
  user-select: none;
  max-width: 100vw !important;
  /* overflow: hidden; */
  display: flex;
  justify-content: center;
  /* flex-end: fondo di "to" allineato al fondo di "chef" */
  align-items: flex-end;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.ctc-footer__mark {
  display: block;
}

.ctc-footer__mark--start {
  /* margin-left: -0.05em; */
}

.ctc-footer__mark--to {
  font-size: 0.55em;
  align-self: flex-end;
  margin: 0 -0.01em 0 -0.04em;
  transform: translateY(-0.15em);
}

.ctc-footer__mark--end {
  /* margin-right: -0.04em; */
}

/* ── Main grid ── */

.ctc-footer__main {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: start;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-top: clamp(3.5rem, 6vw, 5.5rem);
  padding-bottom: 3.2rem;
}

.ctc-footer__col {
  margin-top: 0 !important;
}

/* ── Brand column ── */

.ctc-footer__logo {
  margin: 0 0 1rem !important;
}

.ctc-footer__logo img {
  display: block;
  max-height: 2.6rem;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  margin-left: 0;
}

.ctc-footer__tagline {
  margin: 0 !important;
  margin-bottom: 1rem !important;
  padding: 0 !important;
  color: var(--ctc-footer-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
  line-height: 1.2;
}

.ctc-footer__quote {
  position: relative;
  margin: 1rem 0 2rem 0 !important;
}

.ctc-footer__quote::before {
  content: "“";
  position: absolute;
  top: -0.22em;
  left: -0.1em;
  font-family: inherit;
  font-family: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  font-size: 6rem;
  color: var(--ctc-footer-accent);
  line-height: 1;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.ctc-footer__description {
  position: relative;
  z-index: 1;
  margin: 0 !important;
  margin-bottom: 0.75rem !important;
  max-width: 32ch;
  color: var(--ctc-footer-fg);
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: left;
  font-style: italic;
  font-family: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
}

.ctc-footer__description:last-child {
  margin-bottom: 0 !important;
}

.ctc-footer__social {
  margin: 0 !important;
}

.ctc-footer__social .wp-block-social-link {
  transition: transform 180ms ease;
}

.ctc-footer__social .wp-block-social-link:hover {
  transform: translateY(-2px);
}

.ctc-footer__social .wp-block-social-link svg {
  width: 2.5em !important;
  height: 2.5em !important;
  color: var(--ctc-footer-fg) !important;
  fill: var(--ctc-footer-fg) !important;
  transition: color 200ms ease, fill 200ms ease;
}

.ctc-footer__social .wp-block-social-link:hover svg {
  color: var(--ctc-footer-accent) !important;
  fill: var(--ctc-footer-accent) !important;
}

/* ── Column headings ── */

.ctc-footer__heading {
  margin: 0 !important;
  margin-bottom: 1rem !important;
  padding: 0 !important;
  color: var(--ctc-footer-fg-strong);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ── Lists ── */

.ctc-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.ctc-footer__list li {
  margin: 0;
  padding: 0;
}

.ctc-footer__list a {
  color: var(--ctc-footer-fg);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.ctc-footer__list a:hover,
.ctc-footer__list a:focus-visible {
  color: var(--ctc-footer-fg-strong);
}

/* ── Bottom bar ── */

.ctc-footer__bottom {
  position: relative;
  z-index: 1;
  padding-top: 1rem;
  padding-bottom: 2rem;
  gap: 1rem;
}

.ctc-footer__copy,
.ctc-footer__legal {
  margin: 0;
  color: rgba(255, 250, 247, 0.30);
  font-size: 0.75rem;
}

.ctc-footer__legal a {
  color: rgba(255, 250, 247, 0.30);
  text-decoration: none;
  transition: color 160ms ease;
}

.ctc-footer__legal a:hover,
.ctc-footer__legal a:focus-visible {
  color: var(--ctc-footer-fg-strong);
}

/* ── Responsive ── */

@media (max-width: 980px) {
  .ctc-footer__main {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 1.5rem;
  }

  .ctc-footer__col--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .ctc-footer__watermark-wrap {
    /* ancora al bordo destro, dal basso */
    left: auto;
    right: 0;
    bottom: 0;
    top: 0;
    width: auto;
    align-items: flex-end;
    justify-content: flex-end;
  }

  .ctc-footer__watermark {
    /* vertical-rl + rotate(180deg) = testo dal basso verso l'alto */
    writing-mode: vertical-rl;
    /* In vertical-rl + rotate(180deg):
       - align-items: flex-end = lato sinistro nel layout → bordo DESTRO visivo
         (garantisce che "to" sia allo stesso bordo destro di "chef")
       - translateX più aggressivo per annullare il gap residuo */
    align-items: flex-end;
    transform: rotate(180deg) translateX(-0.25em);
    font-size: clamp(7rem, 28vw, 24rem);
    line-height: 1;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ctc-footer__mark--start {
    margin-left: 0;
  }

  .ctc-footer__mark--to {
    margin: 0;
    transform: translateX(0.12em);
  }

  .ctc-footer__mark--end {
    margin: 0;
  }
}

@media (max-width: 640px) {
  .ctc-footer__main {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
  }

  .ctc-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 1.2rem;
    padding-bottom: 1.5rem;
  }
}
