/* Home 3D scenes (js/hero-seam/).
   1. First screen: the turning cartridge (hero-tube.js). The photo stays underneath as the poster
      and the dark stage fades in over it once the label has loaded.
   2. «Шов в цвет плитки» block below the key-facts strip (hero-seam.js). Hidden without WebGL. */

/* ---------- 1. first screen ---------- */
.hero-visual .hero-tube-canvas {
  position: absolute; inset: 0; z-index: 1;
  display: block; width: 100%; height: 100%;
  background:
    radial-gradient(60% 70% at 55% 45%, #0e5b5f 0%, rgba(11, 82, 86, 0) 70%),
    radial-gradient(90% 80% at 20% 100%, #06393d 0%, rgba(6, 57, 61, 0) 60%),
    linear-gradient(180deg, #042b2f 0%, #032326 100%);
  opacity: 0; transition: opacity 1s ease;
  touch-action: pan-y; cursor: grab;
}
.hero-visual .hero-tube-canvas:active { cursor: grabbing; }
.hero-visual.tube-ready .hero-tube-canvas { opacity: 1; }

/* ---------- 2. seam block ---------- */
.seam-block { display: none; padding: 64px 0; }
.seam-block.is-on { display: block; }
.seam-block .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.seam-block-head { display: grid; gap: 10px; max-width: 720px; }
.seam-block-head h2, .seam-block-head p { margin: 0; }
.seam-stage {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 7.5; max-width: 100%;
  background: #efebe3; border: 1px solid var(--line, #ded8cd);
}
.seam-stage .hero-seam-canvas {
  position: absolute; inset: 0; z-index: 1;
  display: block; width: 100%; height: 100%;
  opacity: 0; transition: opacity .9s ease;
  touch-action: pan-y; cursor: grab;
}
.seam-stage .hero-seam-canvas:active { cursor: grabbing; }
.seam-stage.seam-ready .hero-seam-canvas { opacity: 1; }

/* the panel is a strip right under the scene (hero-seam.js inserts it after .seam-stage) */
.seam-controls {
  margin-top: -24px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
  padding: 14px 16px 16px;
  background: #f7f4ee; border: 1px solid var(--line, #ded8cd); border-top: 0;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .6s ease .3s, transform .6s ease .3s;
}
.seam-controls.seam-ready { opacity: 1; pointer-events: auto; transform: none; }

.seam-now { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--text, #4b5150); }
.seam-now i { flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); transition: background .4s; }
.seam-now > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seam-now b { color: #173c3f; font-variant-numeric: tabular-nums; }
.seam-now a { margin-left: auto; flex: none; color: var(--teal, #006c70); font-weight: 600; font-size: 13px; }

/* every tile and all 57 shades are visible at once, wrapped onto several lines */
.seam-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; margin: -4px; }
.seam-tiles button {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 4px 9px 4px 5px;
  border: 1px solid var(--line, #ded8cd); border-radius: 3px; background: #fff;
  font: inherit; font-size: 13px; font-weight: 600; color: #173c3f; cursor: pointer;
}
.seam-tiles button small { font-weight: 400; color: var(--text, #4b5150); }
.seam-tiles button i { width: 16px; height: 16px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.seam-tiles button[aria-pressed="true"] { border-color: var(--teal, #006c70); box-shadow: inset 0 0 0 1px var(--teal, #006c70); }
.seam-colors button {
  flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14);
}
.seam-colors button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2), 0 0 0 2px #f7f4ee, 0 0 0 4px var(--teal, #006c70); }
.seam-controls button:focus-visible, .seam-controls a:focus-visible { outline: 2px solid var(--copper, #916136); outline-offset: 2px; }

@media (max-width: 760px) {
  .home-v2 .hero-visual.has-tube { aspect-ratio: 1 / 1; }
  .seam-block { padding: 44px 0; }
  .seam-stage { aspect-ratio: 4 / 5; max-width: none; margin: 0 -16px; border-left: 0; border-right: 0; }
  .seam-controls { margin: -24px -16px 0; padding: 12px 16px 14px; border-left: 0; border-right: 0; }
  .seam-tiles button small { display: none; }
  .seam-colors button { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual .hero-tube-canvas, .seam-stage .hero-seam-canvas, .seam-controls, .seam-now i { transition: none; }
}
