/*
 * Tchibo landing page (page-tchibo.php, TCK-0061 / TCK-0062).
 *
 * The content is Parasol blocks and the woogency discount code block, styled
 * by main.css like every other page. This file only styles what the template
 * owns: the header without navigation (Tchibo back link left, Roncalli logo
 * centred, both visible without scrolling) and the slim footer.
 * Scoped to body.woogency-tchibo with two classes: main.css resets elements
 * with the weight of one class.
 */

.woogency-tchibo {
  --tc-beige: #faf1e0;
  --tc-white: #fff;
  --tc-blue-dark: #00364e;
  --tc-red: #c02b3e;
  --tc-sky: #bdd4e2;
  --tc-r-pill: 999px;
  --tc-container: 1216px;
  --tc-gutter: clamp(20px, 5vw, 64px);
  --tc-header-h: clamp(68px, 9vw, 92px);
}

/* Jump targets (e.g. #rabatt) land below the sticky header. */
html:has(.woogency-tchibo) {
  scroll-padding-block-start: calc(var(--tc-header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.woogency-tchibo) {
    scroll-behavior: smooth;
  }
}

.woogency-tchibo .woogency-tchibo-skip-link {
  position: absolute;
  inset-inline-start: 16px;
  inset-block-start: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--tc-r-pill);
  background: var(--tc-blue-dark);
  color: var(--tc-white);
}

/* :focus, not :focus-visible — a focused skip link that stays off-screen is
   worse than one that also shows after a click. */
.woogency-tchibo .woogency-tchibo-skip-link:focus {
  inset-block-start: 16px;
}

/* ---------- Header ---------- */

.woogency-tchibo .woogency-tchibo-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: var(--tc-beige);
  border-block-end: 1px solid rgba(0, 54, 78, .08);
}

/* Three columns keep the logo on the page's centre line. The first column never
   shrinks below the Tchibo graphic, so on a narrow phone the logo moves right
   just enough not to overlap instead of covering it. */
.woogency-tchibo .woogency-tchibo-header__inner {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  max-inline-size: var(--tc-container);
  min-block-size: var(--tc-header-h);
  margin-inline: auto;
  padding: 8px var(--tc-gutter);
}

.woogency-tchibo .woogency-tchibo-header__back {
  justify-self: start;
}

.woogency-tchibo .woogency-tchibo-header__logo img {
  display: block;
  inline-size: auto;
  block-size: clamp(48px, 7vw, 72px);
}

/* Tchibo's own graphic (230 × 100, logo + "Zurück zum Tchibo Sortiment").
   Shown near its native size: scaled down further the caption stops being
   readable, and Tchibo requires it to be recognisable without scrolling. */
.woogency-tchibo .woogency-tchibo-header__back img {
  display: block;
  inline-size: clamp(150px, 16vw, 184px);
  block-size: auto;
}

.woogency-tchibo a.woogency-tchibo-header__back:hover img {
  opacity: .8;
}

/* Text fallback until the graphic is set in the Customizer. */
.woogency-tchibo .woogency-tchibo-button--ghost {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: 10px 20px;
  border: 2px solid rgba(0, 54, 78, .25);
  border-radius: var(--tc-r-pill);
  color: var(--tc-blue-dark);
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.woogency-tchibo .woogency-tchibo-button--ghost:hover {
  border-color: var(--tc-blue-dark);
  background: var(--tc-blue-dark);
  color: var(--tc-white);
}

/* ---------- Footer ---------- */

.woogency-tchibo .woogency-tchibo-footer {
  background: var(--tc-sky);
  color: var(--tc-blue-dark);
}

.woogency-tchibo .woogency-tchibo-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 40px;
  align-items: center;
  max-inline-size: var(--tc-container);
  margin-inline: auto;
  padding: 48px var(--tc-gutter) 28px;
}

.woogency-tchibo .woogency-tchibo-footer__logo img {
  display: block;
  inline-size: auto;
  block-size: 84px;
}

.woogency-tchibo .woogency-tchibo-footer__claim {
  margin: 0;
  max-inline-size: 44ch;
  font-size: .9375rem;
  line-height: 1.6;
}

.woogency-tchibo .woogency-tchibo-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  grid-column: 1 / -1;
  margin-block-start: 20px;
  padding-block-start: 20px;
  border-block-start: 1px solid rgba(0, 54, 78, .15);
  color: #2f566c; /* 5.1:1 on the sky footer; #3a6076 missed AA at 4.39:1 */
  font-size: .8125rem;
}

.woogency-tchibo .woogency-tchibo-footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woogency-tchibo .woogency-tchibo-footer a {
  display: inline-block;
  min-block-size: 24px;
  color: #244a5e;
  text-decoration: none;
}

.woogency-tchibo .woogency-tchibo-footer a:hover {
  color: var(--tc-red);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .woogency-tchibo .woogency-tchibo-footer__inner {
    grid-template-columns: 1fr;
  }
}
