/*
 * «Налий шар» — the resin game (inc/resin-pour.php, assets/js/resin-pour.js).
 * Owner-approved 22 Oct 2026. Resin root hero and the homepage resin card.
 * The server prints the rest state at its final size, so nothing shifts on load.
 */

/* ---------- component ---------- */

.em26-pour { position: relative; z-index: 2; }

.em26-pour__mold {
  position: relative;
  display: block;
  width: 100%;
  height: 156px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  /* no double-tap zoom on quick taps; pan-y where supported so a vertical swipe still scrolls the page */
  touch-action: manipulation;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
div.em26-pour__mold { cursor: default; }
.em26-pour__mold:focus-visible { outline: 3px solid #1d5dbb; outline-offset: 4px; }
.em26-pour__mold svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Rest state before JavaScript (and without it): glass with a 2 cm layer. */
.em26-pour__rest {
  position: absolute;
  inset: 18px 4px 6px;
  overflow: hidden;
  border: 1.5px solid rgba(22, 53, 61, 0.3);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: rgba(255, 255, 255, 0.6);
}
.em26-pour__rest::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: 43%;
  border-radius: 0 0 13px 13px;
  background: linear-gradient(180deg, rgba(64, 141, 196, 0.82), #155d84);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.9);
}

.em26-pour__out { min-height: 64px; margin-top: 8px; }
.em26-pour__names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 18px;
  min-height: 52px;
  max-height: 52px;
  /* 4 px of air keeps focus rings inside the clip; the negative margin keeps the text where it was */
  margin: -4px;
  padding: 4px;
  overflow: hidden;
}
.em26-pour__name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #16353d;
  font: 700 15px/1.2 Manrope, system-ui, sans-serif;
  text-decoration: underline;
  text-decoration-color: var(--c, #1d5dbb);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  white-space: nowrap;
}
.em26-pour__name:hover { text-decoration-thickness: 3px; }
.em26-pour__name:focus-visible { outline: 3px solid #1d5dbb; outline-offset: 2px; border-radius: 3px; }
.em26-pour__name--ext { text-decoration-style: dashed; }
.em26-pour__more { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; color: #3d5a63; font: 600 13px/1 "IBM Plex Mono", ui-monospace, monospace; text-decoration: underline; text-decoration-color: #c9c2b3; text-underline-offset: 6px; }
.em26-pour__more:hover { color: #16353d; text-decoration-color: currentColor; }
.em26-pour__more:focus-visible { outline: 3px solid #1d5dbb; outline-offset: 2px; border-radius: 3px; }
.em26-pour__names--warn { color: #8a0f50; font: 700 15px/1.3 Manrope, system-ui, sans-serif; max-height: none; }
.em26-pour__note { margin: 2px 0 0; color: #5a6b6f; font: 500 12px/1.45 "IBM Plex Mono", ui-monospace, monospace; }
.em26-pour__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.em26-pour__out.is-new > * { animation: em26-pour-in 0.35s ease-out both; }
.em26-pour__out.is-new > * + * { animation-delay: 0.08s; }
/* Press cue ripple: pure CSS, no JavaScript per frame. */
.em26-pour__ripple { transform-box: fill-box; transform-origin: center; opacity: 0; animation: em26-pour-ripple 2.6s ease-out 0.4s infinite; }
@keyframes em26-pour-ripple {
  0% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0; transform: scale(4.3); }
  100% { opacity: 0; transform: scale(4.3); }
}
@keyframes em26-pour-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- resin root hero ---------- */

/* Phones and tablets: a wide mold right under the H1, results below it. */
.em26-pour--hero { max-width: 34rem; margin: 1.25rem 0 0.25rem; }

/*
 * Laptops: the mold is part of the heading grid. The text column keeps its rows
 * (eyebrow, H1, lead, trust); the mold spans exactly from the top of the eyebrow
 * to the bottom of the lead, the RESIN PRO mark sits on the trust row. Nothing floats.
 */
@media (min-width: 64rem) {
  .em26-category--resin .em26-category-hero--resin:has(.em26-pour) {
    overflow: visible;
    grid-template-columns: minmax(0, 40rem) minmax(15rem, 1fr);
    grid-template-rows: auto auto auto auto;
    align-items: start;
    column-gap: clamp(2.5rem, 5vw, 5rem);
    row-gap: 0;
  }
  .em26-category--resin .em26-category-hero--resin:has(.em26-pour) .em26-category-hero__content { display: contents; }
  .em26-category--resin .em26-category-hero--resin:has(.em26-pour) .em26-eyebrow { grid-column: 1; grid-row: 1; }
  .em26-category--resin .em26-category-hero--resin:has(.em26-pour) h1 { grid-column: 1; grid-row: 2; }
  .em26-category--resin .em26-category-hero--resin:has(.em26-pour) .em26-category-hero__lead { grid-column: 1; grid-row: 3; }
  .em26-category--resin .em26-category-hero--resin:has(.em26-pour) .em26-category-hero__trust { grid-column: 1; grid-row: 4; }
  .em26-category--resin .em26-category-hero--resin:has(.em26-pour) .em26-resin-pro-mark { grid-column: 2; grid-row: 4; align-self: end; justify-self: end; }
  .em26-pour--hero {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    max-width: none;
    margin: 0;
  }
  .em26-pour--hero .em26-pour__mold { flex: 1 1 auto; height: auto; min-height: 0; }
}

/* ---------- homepage resin card ---------- */

.em26-home-real .em26-home-real-root-grid .em26-home-real-root--pour { container-type: inline-size; }
.em26-home-real .em26-home-real-root--pour .em26-home-real-root__number {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 22px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 254, 250, 0.9);
  color: var(--em26-home-card-accent, #1d5dbb);
  font: 600 13px/1 "IBM Plex Mono", ui-monospace, monospace;
}
.em26-home-real .em26-home-real-root--pour .em26-home-real-root__in { display: flex; flex-direction: column; height: 100%; }
.em26-home-real .em26-home-real-root-grid .em26-home-real-root--pour h3 { margin: 6px 0 6px; padding-right: 48px; font-size: 30px; line-height: 1.02; }
.em26-home-real .em26-home-real-root--pour .em26-home-real-root__meta { margin: 0; color: #3d5a63; font: 500 12px/1.4 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0.02em; }
.em26-home-real .em26-home-real-root-grid .em26-home-real-root--pour h3 a { text-decoration: none; }
.em26-pour--card { margin: 16px 0 0; }
.em26-pour--card .em26-pour__mold { height: 118px; }

.em26-pour__result {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  min-height: 52px;
  margin: 14px 0 16px;
}
.em26-pour__big { min-width: 2.6ch; color: #16353d; font: 800 42px/1 Manrope, system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.em26-pour__big small { margin-left: 5px; color: #3d5a63; font: 600 17px/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0; }
.em26-pour__route { display: inline-flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 44px; color: #16353d; font-size: 15px; font-weight: 700; line-height: 1.25; text-decoration: none; transition: opacity 0.2s; }
.em26-pour__route span:not(.em26-pour__sr) { align-self: flex-start; border-bottom: 2px solid var(--em26-pour-c, #1d5dbb); }
.em26-pour__route small { color: #5a6b6f; font: 500 12px/1.3 "IBM Plex Mono", ui-monospace, monospace; }
.em26-pour__route.is-pouring { opacity: 0.35; }
.em26-pour__route.is-warn span:not(.em26-pour__sr) { border-color: #b31368; }
.em26-pour__route:hover span:not(.em26-pour__sr) { border-bottom-width: 3px; }
.em26-pour__route:focus-visible { outline: 3px solid #1d5dbb; outline-offset: 3px; border-radius: 4px; }
.em26-home-real .em26-home-real-root--pour footer { margin-top: auto; }

@container (min-width: 30rem) {
  .em26-home-real .em26-home-real-root--pour .em26-home-real-root__in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42%;
    grid-template-rows: auto auto 1fr auto auto;
    column-gap: 22px;
  }
  .em26-home-real .em26-home-real-root-grid .em26-home-real-root--pour h3 { grid-column: 1; margin-top: 8px; padding-right: 0; font-size: 34px; }
  .em26-home-real .em26-home-real-root--pour .em26-home-real-root__meta { grid-column: 1; }
  .em26-pour--card { grid-column: 2; grid-row: 1 / 5; margin: 30px 0 0; }
  .em26-pour--card .em26-pour__mold { height: 100%; min-height: 230px; }
  .em26-pour__result { grid-column: 1; grid-row: 4; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 18px; }
  .em26-pour__big { font-size: 60px; }
  .em26-home-real .em26-home-real-root--pour footer { grid-column: 1 / -1; grid-row: 5; }
}

/* ---------- other homepage cards: every named sub-section is a real link ---------- */

.em26-home-real .em26-home-real-root li a,
.em26-home-real .em26-home-real-nav-route li a {
  position: relative;
  z-index: 2;
  color: inherit;
  text-decoration: none;
}
.em26-home-real .em26-home-real-root li a:hover,
.em26-home-real .em26-home-real-nav-route li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.em26-home-real .em26-home-real-root li a:focus-visible,
.em26-home-real .em26-home-real-nav-route li a:focus-visible { outline: 3px solid #1d5dbb; outline-offset: 2px; border-radius: 3px; }
@media (pointer: coarse) {
  .em26-home-real .em26-home-real-root li a,
  .em26-home-real .em26-home-real-nav-route li a { display: inline-flex; align-items: center; min-height: 44px; }
  .em26-home-real .em26-home-real-root ul { row-gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .em26-pour__out.is-new > * { animation: none; }
  .em26-pour__ripple { display: none; }
  .em26-pour__route { transition: none; }
}

/* Pill-shaped items (filament card): the link fills the whole pill. */
.em26-home-real .em26-home-real-root-grid .em26-home-real-root--printing li { padding: 0; }
.em26-home-real .em26-home-real-root-grid .em26-home-real-root--printing li a { display: flex; align-items: center; min-height: 32px; padding: 5px 12px; border-radius: inherit; }
@media (pointer: coarse) {
  .em26-home-real .em26-home-real-root-grid .em26-home-real-root--printing li a { min-height: 44px; }
}

/* Desktop affordance: the glass lifts a little under the pointer. */
@media (hover: hover) {
  .em26-pour__mold svg { transition: transform 0.2s ease, filter 0.2s ease; }
  .em26-pour__mold:hover svg { transform: translateY(-2px); filter: drop-shadow(0 10px 14px rgba(22, 53, 61, 0.12)); }
}
@media (hover: hover) and (prefers-reduced-motion: reduce) {
  .em26-pour__mold svg { transition: none; }
  .em26-pour__mold:hover svg { transform: none; }
}
