/*
 * Front page (Naslovna): the hero as a core Cover block Tanja edits in the
 * page editor, the section groups and the core button variants the page uses.
 * Copied from the shop (design/shop/Main.dc.html .hero); the landing sections
 * the shop lacks are in landing.css.
 */

/* --- Full-bleed screens: no page container ------------------------------- */
.tt-bleed .wd-content-layout.container {
  max-width: none;
  padding: 0;
}

.tt-bleed .wd-content-area,
.tt-bleed .entry-content {
  padding-bottom: 0;
}

.tt-bleed .wd-page-content > .container {
  max-width: none;
  padding: 0;
}

/* --- Hero (core Cover block with the tt-hero class) ----------------------- */
.wp-block-cover.tt-hero {
  min-height: clamp(640px, 85vh, 780px);
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  background: var(--tt-forest-2);
  color: var(--tt-cream-hi);
}

.wp-block-cover.tt-hero .wp-block-cover__image-background {
  object-position: center 35%;
}

/* The two scrims of the design, instead of the block's single dim. */
.wp-block-cover.tt-hero .wp-block-cover__background {
  background: var(--tt-scrim-hero);
  /* Keep the custom scrim visible over Gutenberg's dimRatio: 0 rule. */
  opacity: 1 !important;
}

.wp-block-cover.tt-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tt-scrim-hero-2);
  z-index: 1;
  pointer-events: none;
}

.wp-block-cover.tt-hero .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  margin: 0;
  /* Match the centered section container while preserving the copy measure. */
  margin-inline-end: max(0px, calc((100% - var(--tt-container)) / 2 - var(--tt-section-x)));
  padding: 120px var(--tt-section-x) 72px;
  color: var(--tt-cream-hi);
}

.wp-block-cover.tt-hero .tt-kicker {
  font-size: var(--tt-size-kicker-hero);
  letter-spacing: var(--tt-tracking-hero-kicker);
  color: var(--tt-sage-2);
}

.wp-block-cover.tt-hero h1 {
  font-size: var(--tt-size-display-hero);
  line-height: var(--tt-lh-display);
  letter-spacing: var(--tt-tracking-display);
  margin: 22px 0 0;
  color: var(--tt-cream-hi);
}

.wp-block-cover.tt-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--tt-sage-3);
}

.wp-block-cover.tt-hero .tt-lede {
  color: var(--tt-hero-lede);
  margin-top: 26px;
  /* Core's constrained layout centers narrower children with !important. */
  margin-inline: 0 !important;
}

.wp-block-cover.tt-hero .tt-buttons {
  margin-top: 34px;
}

.tt-hero__stat {
  margin: 40px 0 0;
  font-family: var(--tt-sans);
  font-size: var(--tt-size-caption);
  letter-spacing: 0.02em;
  color: var(--tt-footer-muted);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-weight: 400;
}

.tt-hero__stat b,
.tt-hero__stat strong {
  font-weight: 400;
  color: var(--tt-sage-3);
}

/* --- Hero, split variant (tt-hero tt-hero--split) ----------------------------
 * For a photo whose faces fill the frame, the copy gets its own forest column
 * beside the photo instead of a scrim over it, as the main site's about intro
 * sets text beside a portrait. Two columns from an intrinsic grid; when they no
 * longer fit, the photo stacks above the copy. The grid runs right to left so
 * the photo, first in the block's markup, lands in the right-hand column.
 */
.wp-block-cover.tt-hero.tt-hero--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tt-hero-split-min)), 1fr));
  align-items: stretch;
  direction: rtl;
  background: var(--tt-forest-1);
}

.wp-block-cover.tt-hero--split > * {
  direction: ltr;
}

.wp-block-cover.tt-hero--split::after,
.wp-block-cover.tt-hero--split .wp-block-cover__background {
  display: none;
}

.wp-block-cover.tt-hero--split img.wp-block-cover__image-background {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.wp-block-cover.tt-hero--split .wp-block-cover__inner-container {
  align-self: center;
  max-width: none;
  margin: 0;
  /* The copy lines up with the 1400 grid of the sections below on wide screens. */
  padding: var(--tt-section-y-intro) var(--tt-section-x);
  padding-inline-start: max(var(--tt-section-x), calc(100% - var(--tt-container) / 2));
}

/* --- Core button variants used in page content -----------------------------
 * The variant class sits on the block's wrapper, where base.css's .tt-pill--*
 * rules would paint a square box behind the pill; only the link is the pill.
 */
.wp-block-button:is(.tt-pill--cream, .tt-pill--outline-cream, .tt-pill--forest, .tt-pill--outline, .tt-pill--wide) {
  padding: 0;
  border: 0;
  background: transparent;
}

.wp-block-button.tt-pill--wide > .wp-block-button__link {
  padding: 16px 38px;
}

.wp-block-button.tt-pill--cream > .wp-block-button__link {
  background: var(--tt-cream);
  color: var(--tt-ink);
}

.wp-block-button.tt-pill--cream > .wp-block-button__link:hover,
.wp-block-button.tt-pill--cream > .wp-block-button__link:focus-visible {
  background: var(--tt-white);
  color: var(--tt-ink);
}

.wp-block-button.tt-pill--outline-cream > .wp-block-button__link {
  background: transparent;
  border-color: var(--tt-outline-cream-55);
  color: var(--tt-cream);
}

.wp-block-button.tt-pill--outline-cream > .wp-block-button__link:hover,
.wp-block-button.tt-pill--outline-cream > .wp-block-button__link:focus-visible {
  background: transparent;
  border-color: var(--tt-cream);
  color: var(--tt-cream);
}

.wp-block-buttons.tt-buttons {
  gap: var(--tt-gap-buttons);
}

/* --- Section groups in page content ---------------------------------------- */
.entry-content .tt-section > .tt-wrap,
.entry-content .tt-section > .tt-wrap > * {
  max-width: none;
}

.entry-content .tt-section > .tt-wrap {
  max-width: var(--tt-container);
}

.entry-content .tt-head > .wp-block-group {
  margin: 0;
}

.entry-content .tt-head .tt-lede {
  margin-top: 0;
}

.entry-content .tt-kicker,
.entry-content .tt-h2 {
  margin-bottom: 0;
}
