/* ====================================================
   HOME
   Homepage styles for Gutenberg-built front page
   ==================================================== */


/* ====================================================
   Hero
   ==================================================== */

.home-grp-hero {
  position: relative;
  overflow: hidden;
  width: 95%;
  font-size: 0;
  margin-inline: auto;
}

.home-grp-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2vw;
}

/* texts */
.home-grp-hero .over-uptext,
.home-grp-hero .over-downtext {
  position: absolute;
  z-index: 2;
  margin: 0;

  /* try better text contrast on image */
  color: rgb(255 255 255 / 0.9) !important;

  text-shadow:
    0 2px 4px rgb(0 0 0 / 0.80),
    0 6px 18px rgb(0 0 0 / 0.3) !important;
}

/* up title */
.home-grp-hero .over-uptext {
  font-size: clamp(1.75rem, 5.6vw, 5.6rem);
  text-align: center;
  inset: 0;
  padding-top: 1vw;
  line-height: 0.96;
  letter-spacing: -0.025em !important;
}

/* down text */
.home-grp-hero .over-downtext {
  font-size: clamp(1rem, 4vw, 4rem);
  bottom: 1vw;
  left: clamp(14px, 3.4vw, 32px);
  right: clamp(14px, 3vw, 32px);
  max-width: 50ch;
  line-height: 1.16;
}

/* ====================================================
   Shared section titles / links
   ==================================================== */

.wp-block-group.alignwide > .wp-block-heading:first-child,
.wp-block-group.alignwide > h2.wp-block-heading:first-child {
  margin-bottom: 10px;
}


/* ====================================================
   Collections group and More creations group
   ==================================================== */

.collections-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.morecreations-group {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.collections-group > .wp-block-group,
.morecreations-group > .wp-block-group {
  background: var(--yrk-clr-surface-1);
  box-shadow: var(--yrk-shadow-soft);
  font-size: 0; /* avoid empty baseline/line-box space (fr/uk) */
  transition:
    transform var(--yrk-transition-fast),
    box-shadow var(--yrk-transition-fast),
    background-color var(--yrk-transition-fast);
}

.collections-group > .wp-block-group:hover,
.morecreations-group > .wp-block-group:hover {
  transform: translateY(-2px);
  background: var(--yrk-clr-surface-2);
}

.collections-group p,
.morecreations-group p {
  margin: 0;
  padding: 6px 8px 5px;
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--yrk-clr-text);
}

.collections-group .wp-block-image,
.morecreations-group .wp-block-image {
  line-height: 0;
}


/* ====================================================
   Section displaying "H2/text / image" or "image / H2/text"
   according to:
   - section-alt section-alt-right
   - section-alt section-alt-left
   ==================================================== */

.section-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--yrk-clr-border);
  border-radius: var(--yrk-border-radius);
  background: var(--yrk-clr-surface-1);
  overflow: hidden;
  min-height: clamp(220px, 30vw, 320px);
  box-shadow: var(--yrk-shadow-soft);
  cursor: pointer;
}

/* Text on left, image on right */
.section-alt-right {
  grid-template-areas:
    "title image"
    "text image";
}

/* Text on right, image on left */
.section-alt-left {
  grid-template-areas:
    "image title"
    "image text";
}

.section-alt-title {
  grid-area: title;
  margin: 0;
  align-self: end;
  padding: clamp(20px, 3vw, 34px) clamp(18px, 3vw, 32px) 8px;
}

.section-alt a {
  position: relative;
  z-index: 2;
}

.section-alt-image {
  grid-area: image;
  min-height: 100%;
}

.section-alt-image img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
}

.section-alt-text,
.section-alt > p.has-text-align-center {
  grid-area: text;
  margin: 0;
  align-self: start;
  padding: 0 clamp(18px, 3vw, 32px) clamp(22px, 3vw, 34px);
  line-height: 1.55;
  color: var(--yrk-clr-text);
}


/****************************************************
Other device size
****************************************************/


/* Tablet landscape (and less)
@media (max-width: 1100px) {
}
*/


/* Tablet portrait and mobile landscape (and less) */
@media (max-width: 768px) {

  .collections-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .morecreations-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .collections-group > .wp-block-group,
  .morecreations-group > .wp-block-group {
    box-shadow: none;
  }

  .section-alt {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "image"
      "text";
    min-height: 0;
  }

  .section-alt-title {
    padding: 16px 14px 8px;
  }

  .section-alt-text,
  .section-alt > p.has-text-align-center {
    padding: 0 14px 18px;
    line-height: 1.5;
  }
}


/* Smartphones portrait (and less)
@media (max-width: 640px) {
}
*/