/* MAP
 * §1 hero: asezare si text
 * §2 hero: scena cu desenul
 * §3 hero: straturile desenului (miscarea)
 * §4 sectiunea 2: dovezi si pasi
 * §5 ecrane mici
 * §6 miscare redusa
 *
 * Doar pentru prima pagina (_hero.php, _dovezi.php). Culorile vin din tokenii din site.css,
 * deci merg si pe tema inchisa. Caracterul miscarii: precis si sigur, ca o masina din fabrica:
 * pornire rapida, oprire moale, un singur „pop" cand se imprima marca.
 */

/* §1 hero: asezare si text */
/* Fundal reconturat si recolorat (19 noiembrie 2026) cu tipar vectorial de schite mici de ambalaje. */
section.ph {
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(50% 72% at 86% 24%, rgba(201, 30, 58, .11), transparent 68%),
    radial-gradient(46% 68% at 10% 88%, rgba(30, 48, 84, .09), transparent 68%),
    linear-gradient(155deg, #e8ecf4 0%, #f5f7fb 48%, #e4e9f2 100%);
  border-bottom: 2px solid var(--border-strong);
  box-shadow: inset 0 12px 24px -16px rgba(15, 18, 28, .22);
}
section.ph::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-color: rgba(28, 36, 56, .11);
  -webkit-mask-image: url('/assets/hero-pattern.svg');
  mask-image: url('/assets/hero-pattern.svg');
  -webkit-mask-size: 250px 250px;
  mask-size: 250px 250px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}
section.ph::after {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(62% 76% at 24% 48%, rgba(245, 247, 251, .76) 0%, rgba(245, 247, 251, .16) 72%, transparent 100%);
}
@media (prefers-color-scheme: dark) {
  section.ph {
    background:
      radial-gradient(50% 72% at 86% 24%, rgba(239, 90, 114, .16), transparent 68%),
      radial-gradient(46% 68% at 10% 88%, rgba(84, 122, 198, .12), transparent 68%),
      linear-gradient(155deg, #141720 0%, #1d212d 50%, #13161f 100%);
    box-shadow: inset 0 12px 24px -16px rgba(0, 0, 0, .55);
  }
  section.ph::before { background-color: rgba(226, 234, 248, .10); }
  section.ph::after {
    background: radial-gradient(62% 76% at 24% 48%, rgba(23, 27, 37, .72) 0%, rgba(23, 27, 37, .14) 72%, transparent 100%);
  }
}
.ph-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px; align-items: center; padding-top: 40px; padding-bottom: 40px;
}
.ph-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 14px;
  font-size: 13px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--accent);
}
.ph-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ph-h { margin: 0 0 16px; font-size: clamp(30px, 3.3vw, 46px); line-height: 1.1; letter-spacing: -.4px; font-weight: 800; }
.ph-l1, .ph-l2 { display: block; }
/* „Ambalaje pentru" sta mereu singur pe primul rand: altfel ruperea randului se schimba cu lungimea
   cuvantului si titlul sare la fiecare produs. */
.ph-pre { display: block; }
.ph-l2 { margin-top: 8px; font-size: .7em; line-height: 1.2; color: var(--text-2); font-weight: 700; letter-spacing: 0; }
/* Cuvantul care se schimba. Spatiul de sus si de jos tine loc pentru diacritice (ă, ș, ț),
   altfel taietura le-ar ciunti cand cuvantul aluneca. */
.ph-rot { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .08em 0 .12em; margin: -.08em 0 -.12em; }
.ph-w { display: inline-block; color: var(--accent); }
.ph-p { margin: 0 0 18px; font-size: 18px; color: var(--text-2); max-width: 50ch; }
.ph-bife { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 9px; }
.ph-bife li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ph-bife .ico {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 4px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.ph-btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ph-btns .btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; font-size: 16px; cursor: pointer; font-family: inherit; }
.ph-cta .ico { transition: transform .15s ease-out; }
.ph-cta:hover .ico { transform: translateX(3px); }
.ph-nota { margin: 12px 0 0; font-size: 14px; color: var(--text-3); }

/* §2 hero: scena cu desenul */
.ph-scena {
  display: grid; gap: 8px; padding: 14px 14px 16px;
  background-color: var(--surface);
  background-image: radial-gradient(var(--border) 1px, transparent 1.2px);
  background-size: 18px 18px;
  border: 1.5px solid var(--border-strong); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(16, 20, 34, .15);
}
.ph-pasi { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ph-pasi li {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-3); font-size: 13px; font-weight: 600;
  transition: background-color .25s, color .25s;
}
.ph-pasi b {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--border); color: var(--text-2); font-size: 11.5px; transition: background-color .25s, color .25s;
}
.ph-pasi li.on { background: var(--accent-soft); color: var(--accent); }
.ph-pasi li.on b { background: var(--accent); color: var(--on-accent); }
.ph-svg { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; aspect-ratio: 380 / 304; }

.ph-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ph-chips a {
  position: relative; overflow: hidden; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 14px; font-weight: 600; transition: border-color .2s, color .2s;
}
.ph-chips a:hover, .ph-chips a:focus-visible { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.ph-chips a.on { border-color: var(--accent); color: var(--accent); }
/* Bara din chip-ul activ arata cat mai sta scena pe ecran. */
.ph-chips i {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
}
.ph-chips a.on.curge i { transform: scaleX(1); transition: transform var(--ph-dur, 4s) linear; }

/* §3 hero: straturile desenului */
.hs { opacity: 0; visibility: hidden; }
.hs.on { opacity: 1; visibility: visible; }
.hs.on.x { opacity: 0; transform: translateX(-26px); transition: opacity .28s ease-in, transform .28s ease-in; }
.hs-prod, .hs-tray, .hs-logo, .hs-ring { transform-box: fill-box; transform-origin: center; }

.hs-prod { opacity: 0; transform: scale(.9); }
.hs.on .hs-prod { opacity: 1; transform: none; transition: opacity .3s ease-out, transform .45s cubic-bezier(.2, .8, .2, 1); }

/* Folia calda coboara, apoi se lipeste in forma tavii: termoformarea, spusa intr-o jumatate de secunda. */
.hs-tray { opacity: 0; transform: scale(1.07); }
.hs.f .hs-tray { opacity: 1; transform: none; transition: opacity .3s ease-out .12s, transform .5s cubic-bezier(.2, .8, .2, 1) .12s; }
.hs-sheet { fill: #fff; stroke: #fff; opacity: 0; pointer-events: none; }
.hs.f .hs-sheet { animation: hs-sheet .6s ease-out; }
@keyframes hs-sheet {
  0%   { opacity: 0;   transform: translateY(-34px); }
  40%  { opacity: .85; transform: none; }
  100% { opacity: 0;   transform: none; }
}

.hs-lid { opacity: 0; transform: translateY(-64px); }
.hs.l .hs-lid { opacity: 1; transform: none; transition: opacity .18s ease-out, transform .5s cubic-bezier(.25, 1.2, .4, 1); }

.hs-logo { opacity: 0; transform: scale(1.6); }
.hs.g .hs-logo { opacity: 1; transform: none; transition: opacity .15s ease-out, transform .38s cubic-bezier(.3, 1.5, .5, 1); }
.hs-ring { opacity: 0; }
.hs.g .hs-ring { animation: hs-ring .7s ease-out .1s; }
@keyframes hs-ring {
  0%   { opacity: .7; transform: scale(.75); }
  100% { opacity: 0;  transform: scale(1.3); }
}

/* §4 sectiunea 2: dovezi si pasi */
section.pd { padding: 46px 0 50px; background: var(--surface-2); border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.pd-t, .pd-t2 { margin: 0 0 22px; font-size: 28px; line-height: 1.2; }
.pd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pd-c { padding: 22px 20px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; }
.pd-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.pd-c h3 { margin: 14px 0 6px; font-size: 17px; line-height: 1.3; }
.pd-c p { margin: 0; font-size: 15px; color: var(--text-2); }

.pd-lucru { margin-top: 42px; }
.pd-pasi { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.pd-pasi li { position: relative; }
.pd-pasi li:not(:last-child)::after {
  content: ""; position: absolute; top: 20px; left: 56px; right: -16px; border-top: 2px dashed var(--border-strong);
}
.pd-nr {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 17px;
}
.pd-pasi h3 { margin: 12px 0 6px; font-size: 17px; }
.pd-pasi p { margin: 0; font-size: 15px; color: var(--text-2); max-width: 36ch; }
.pd-cta { margin: 28px 0 0; }
.pd-cta .btn { cursor: pointer; font-family: inherit; font-size: 16px; padding: 12px 24px; }

/* §5 ecrane mici */
/* Pe telefon si tableta desenul urca imediat sub titlu: altfel omul vede doar text in primul ecran
   si animatia, care e carligul, ramane sub butoane. */
@media (max-width: 980px) {
  .ph-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-top: 26px; padding-bottom: 30px; }
  .ph-txt { display: contents; }
  .ph-eyebrow { order: 1; align-self: flex-start; }
  .ph-h { order: 2; }
  .ph-scena { order: 3; max-width: 620px; width: 100%; margin: 4px auto 22px; }
  .ph-p { order: 4; }
  .ph-bife { order: 5; }
  .ph-btns { order: 6; }
  .ph-nota { order: 7; }
  .pd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pd-pasi { grid-template-columns: 1fr; gap: 20px; }
  .pd-pasi li:not(:last-child)::after { display: none; }
}
@media (max-width: 560px) {
  .ph-p { font-size: 16.5px; }
  .ph-btns .btn { width: 100%; justify-content: center; }
  .ph-scena { padding: 10px 8px 12px; }
  .ph-pasi li { font-size: 12px; }
  .pd-grid { grid-template-columns: 1fr; }
  .pd-t, .pd-t2 { font-size: 24px; }
}

/* §6 miscare redusa */
/* Desenul ramane, gata ambalat; nu mai curge nimic singur langa text. */
@media (prefers-reduced-motion: reduce) {
  .ph *, .ph *::before, .ph *::after { transition: none !important; animation: none !important; }
}
