/* Layouts shared by the MK and EN homepages. */

:is(.entry-content, .editor-styles-wrapper) .i26-pattern-home-hero h1 {
  font-size: clamp(2.65rem, 6vw, 5.35rem);
  line-height: 1.02;
  margin: 0 0 1.25rem;
  max-width: 13ch;
}

.i26-pattern-home-hero .i26-home-hero-layout {
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.75rem);
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.i26-pattern-home-hero .i26-home-hero-visual {
  min-width: 0;
  padding: 0 clamp(0.7rem, 1.5vw, 1.3rem) 1rem 0;
  position: relative;
}

:is(.entry-content, .editor-styles-wrapper) .i26-pattern-home-hero .i26-home-hero-photo {
  margin: 0;
  max-width: none;
  overflow: visible;
}

.i26-pattern-home-hero .i26-home-hero-photo img {
  aspect-ratio: 3 / 2;
  border-radius: clamp(2rem, 5vw, 4.6rem) 0.2rem 0.2rem 0.2rem;
  object-fit: cover;
  object-position: center;
}

:is(.entry-content, .editor-styles-wrapper) .i26-pattern-home-hero .i26-home-hero-inset {
  border: 0.4rem solid var(--pattern-background);
  border-radius: 0.25rem;
  bottom: 1.25rem;
  height: auto;
  margin: 0;
  max-width: 35%;
  position: absolute;
  right: 0;
  transform: none;
  width: clamp(7.5rem, 18vw, 12.5rem);
}

.i26-pattern-home-hero .i26-home-hero-inset img {
  aspect-ratio: 3 / 2;
  border-radius: 0.1rem;
  object-fit: cover;
}

:is(.entry-content, .editor-styles-wrapper) .i26-pattern .i26-home-hero-note {
  font-size: 0.75rem;
  margin: 0.7rem 0 0;
  max-width: 55%;
}

.i26-pattern :is(.i26-home-product-grid, .i26-home-guide-grid) {
  display: grid;
  gap: clamp(1rem, 2.3vw, 1.65rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.i26-pattern :is(.i26-home-product-card, .i26-home-guide-card) {
  --pattern-text: var(--pattern-ink);
  --pattern-copy: var(--pattern-muted);
  background: #fff;
  border: 1px solid var(--pattern-line);
  border-radius: 0.25rem;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
}

:is(.entry-content, .editor-styles-wrapper) .i26-pattern :is(.i26-home-product-image, .i26-home-guide-image) {
  height: auto;
  margin: 0;
}

.i26-pattern :is(.i26-home-product-image, .i26-home-guide-image) img {
  aspect-ratio: 4 / 3;
  border-radius: 0;
  height: auto;
  object-fit: cover;
}

.i26-pattern :is(.i26-home-product-copy, .i26-home-guide-copy) {
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 2.2vw, 1.55rem);
}

.i26-pattern .i26-home-product-card {
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.i26-pattern .i26-home-product-card:focus-within {
  border-color: var(--pattern-gold);
  box-shadow: 0 0 0 2px var(--pattern-accent);
}

.i26-pattern .i26-home-product-link {
  color: inherit;
  text-decoration: none;
}

.i26-pattern .i26-home-product-link span {
  color: var(--pattern-accent);
}

.i26-pattern .i26-home-product-link::after {
  content: '';
  inset: 0;
  position: absolute;
  z-index: 1;
}

@media (hover: hover) {
  .i26-pattern .i26-home-product-card:hover {
    border-color: var(--pattern-gold);
    box-shadow: 0 0.35rem 1rem rgb(20 43 67 / 12%);
    transform: translateY(-0.2rem);
  }
}

:is(.entry-content, .editor-styles-wrapper) .i26-pattern .i26-home-guide-footer {
  color: var(--pattern-ink);
  font-size: 0.9rem;
  font-weight: 650;
  margin-block: auto 0;
}

.i26-pattern .i26-home-guide-footer a {
  align-content: center;
  display: inline-block;
  min-height: 2.75rem;
  text-underline-offset: 0.22em;
}

.i26-pattern .i26-home-production-layout {
  align-items: center;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.i26-pattern .i26-home-capability-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.i26-pattern .i26-home-capability-card {
  --pattern-text: var(--pattern-ink);
  --pattern-copy: var(--pattern-muted);
  background: #fff;
  border: 1px solid var(--pattern-line);
  border-top: 2px solid var(--pattern-gold);
  border-radius: 0.2rem;
  min-width: 0;
  padding: clamp(0.72rem, 1.5vw, 1.2rem);
}

:is(.entry-content, .editor-styles-wrapper) .i26-pattern .i26-home-capability-card h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

:is(.entry-content, .editor-styles-wrapper) .i26-pattern .i26-home-capability-card p {
  font-size: 0.875rem;
}

.i26-pattern-home-examples .i26-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.i26-pattern-home-examples .i26-pattern-note {
  margin-block-end: 1rem;
}

.i26-pattern .i26-home-example-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

:is(.entry-content, .editor-styles-wrapper) .i26-pattern .i26-home-example-link {
  color: var(--pattern-text);
  font-weight: 650;
  margin: 0;
}

.i26-pattern .i26-home-group-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 2.25rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.i26-pattern .i26-home-group-card {
  border: 1px solid var(--pattern-divider);
  border-block-start: 2px solid var(--pattern-gold);
  border-radius: 0.2rem;
  padding: clamp(1.1rem, 3vw, 2rem);
}

.i26-pattern .i26-home-group-link a {
  color: var(--pattern-accent);
  font-weight: 650;
}

@media (max-width: 45rem) {
  .i26-pattern-home-hero .i26-home-hero-layout,
  .i26-pattern .i26-home-production-layout,
  .i26-pattern :is(.i26-home-product-grid, .i26-home-guide-grid, .i26-home-group-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  .i26-pattern-home-examples .i26-gallery-grid {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .i26-pattern .i26-home-guide-grid {
    gap: 0.8rem;
    grid-auto-columns: 80%;
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-block: 0.15rem 0.65rem;
    scroll-snap-type: x mandatory;
  }

  .i26-pattern .i26-home-guide-card {
    scroll-snap-align: start;
  }

  .i26-pattern .i26-home-guide-image img {
    aspect-ratio: 16 / 9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .i26-pattern .i26-home-product-card {
    transition: none;
  }

  .i26-pattern .i26-home-product-card:hover {
    transform: none;
  }
}
