/* Eli Geo Art: stilurile pentru animatii.js. Folosesc doar culorile din style.css. */
:root { --ease-long: cubic-bezier(.16, 1, .3, 1); }

/* Titlurile care urcă rând cu rând */
.ln-wait { visibility: hidden; animation: ln-failsafe 0s 2.5s forwards; }
.ln-wait.ln-ready { visibility: visible; animation: none; }
@keyframes ln-failsafe { to { visibility: visible; } }
.ln-w { display: inline-block; }
.ln { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.ln > span { display: inline-block; }
.ln-ready .ln > span {
  transform: translateY(112%) rotate(2deg); transform-origin: 0 0;
  transition: transform 1.3s var(--ease-long) var(--d, 0s);
}
.ln-ready.ln-in .ln > span { transform: none; }

/* Arborele Vieții din particule, în subsol */
.tree-field { position: relative; width: clamp(150px, 16vw, 220px); aspect-ratio: 164 / 168; max-width: 100%; margin-bottom: 8px; }
.tree-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer-mark.tree-live { display: none; }

/* Mandala pictată punct cu punct (pagina „Povestea”) */
.dot-mandala-section { display: grid; justify-items: center; gap: 28px; text-align: center; }
.dot-mandala { position: relative; width: min(78vw, 460px); aspect-ratio: 1; max-width: 100%; }
.dot-mandala canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dot-mandala-note { color: var(--muted); max-width: 36ch; }

/* Butoanele se apropie ușor de cursor, cresc puțin și capătă o lumină caldă în jur.
   „translate” e pentru efectul magnetic, „scale” pentru mărire: proprietăți separate, nu se încurcă. */
.btn {
  transition:
    background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease),
    box-shadow .5s var(--ease-long), scale .5s var(--ease-long), translate .6s var(--ease-long);
}
@media (hover: hover) {
  .btn:hover { scale: 1.035; }
  .btn-primary:hover { box-shadow: 0 10px 28px -10px rgba(19, 52, 25, .55), 0 0 0 6px rgba(19, 52, 25, .08); }
  .btn-outline:hover { box-shadow: 0 10px 28px -12px rgba(19, 52, 25, .45), 0 0 0 6px rgba(19, 52, 25, .07); }
  .btn-cream:hover { box-shadow: 0 0 0 6px rgba(253, 254, 236, .16), 0 0 34px 2px rgba(243, 201, 139, .45); }
  .btn-outline-light:hover { box-shadow: 0 0 0 6px rgba(253, 254, 236, .1), 0 0 30px rgba(243, 201, 139, .3); }
}
.btn:active { scale: .98; transition-duration: .12s; }

/* Butoanele mici primesc același limbaj, mai discret */
.copy-btn, .filter-btn, .video-btn {
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .4s var(--ease-long), scale .4s var(--ease-long);
}
@media (hover: hover) {
  .copy-btn:hover, .filter-btn:hover { scale: 1.04; box-shadow: 0 6px 18px -8px rgba(19, 52, 25, .45); }
  .video-btn:hover { scale: 1.08; box-shadow: 0 0 24px rgba(243, 201, 139, .35); }
}
.copy-btn:active, .filter-btn:active, .video-btn:active { scale: .96; }

/* Linkurile cu săgeată: săgeata pleacă spre dreapta, linia se colorează */
.link-arrow { transition: color .35s var(--ease), border-color .35s var(--ease); }
.link-arrow:hover { color: var(--clay); }

/* Apariția la derulare: ce intră împreună pe ecran vine pe rând (--rd, setat în script.js) */
.js .reveal { transition-delay: var(--rd, 0s); }
.js .reveal.reveal-soft:not(.in) { transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active, .copy-btn:hover, .filter-btn:hover, .video-btn:hover { scale: none; transition: none; }
}

/* Paralaxă pe pozele mari */
.plx > canvas, .plx > img { transform: translate3d(0, var(--py, 0), 0) scale(1.12); will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .ln-ready .ln > span { transform: none; transition: none; }
  .plx > canvas, .plx > img { transform: none; }
}

/* ---------- Tranziție între pagini ----------
   O cortină bej, cu Arborele Vieții în mijloc. La deschiderea paginii se ridică încet;
   la click pe un link către altă pagină, coboară înapoi (clasa .is-leaving, din animatii.js).
   E desenată doar din CSS, deci apare din prima clipă, înainte de orice script. */
html { background: var(--paper); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  background: var(--paper) url("images/logo-mark.png") center / clamp(56px, 7vw, 84px) no-repeat;
  animation: curtain-out .75s var(--ease-long) .08s both;
}
@keyframes curtain-out {
  from { opacity: 1; background-size: clamp(56px, 7vw, 84px); }
  to   { opacity: 0; visibility: hidden; background-size: clamp(64px, 8vw, 96px); }
}
html.is-leaving body::before {
  visibility: visible;
  animation: curtain-in .38s var(--ease) both;
}
@keyframes curtain-in {
  from { opacity: 0; background-size: clamp(48px, 6vw, 72px); }
  to   { opacity: 1; background-size: clamp(56px, 7vw, 84px); }
}
/* Conținutul urcă puțin când se ridică cortina. „backwards”: după animație nu rămâne nicio
   deplasare pe <main>, ca elementele fixe din el (panoul de filtre, bara lipicioasă) să stea la locul lor. */
body > main, body > .site-footer { animation: page-rise .9s var(--ease-long) .08s backwards; }
@keyframes page-rise { from { translate: 0 14px; } to { translate: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  body::before, html.is-leaving body::before { animation: none; opacity: 0; visibility: hidden; }
  body > main, body > .site-footer { animation: none; }
}

/* ---------- Butoane vii (animatii.js adaugă .fx, .btn-fill și .btn-roll) ---------- */
.btn.fx { position: relative; overflow: hidden; isolation: isolate; }

/* 1. Cercul de culoare care crește din punctul pe unde intră cursorul */
.btn-fill {
  position: absolute; z-index: -1; pointer-events: none;
  left: var(--fx, 50%); top: var(--fy, 50%);
  width: var(--fd, 300px); height: var(--fd, 300px);
  border-radius: 50%; translate: -50% -50%; scale: 0;
  background: var(--fill, var(--clay));
  transition: scale .6s var(--ease-long);
}
.btn.fx:hover .btn-fill, .btn.fx:focus-visible .btn-fill { scale: 1; }

/* Ce culoare umple fiecare tip de buton; fundalul vechi de la hover nu mai sare peste cerc */
.btn-primary.fx { --fill: var(--clay); }
.btn-primary.fx:hover { background: var(--forest); color: #fff; }
.btn-outline.fx { --fill: var(--forest); }
.btn-outline.fx:hover { background: transparent; color: var(--cream); border-color: var(--forest); }
.btn-cream.fx { --fill: var(--warm); }
.btn-cream.fx:hover { background: var(--cream); color: var(--forest-deep); }
.btn-outline-light.fx { --fill: var(--cream); }
.btn-outline-light.fx:hover { background: transparent; color: var(--forest); border-color: var(--cream); }

/* 2. Literele care se rostogolesc: rândul de sus pleacă în sus, copia vine de jos, literă cu literă */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* .roll-host = elementul care pornește efectul (butonul, linkul sau eticheta de cadou întreagă).
   Spațiul de sus și de jos lasă loc diacriticelor (Ă, Î, ș, ț) să nu fie tăiate. */
.btn-roll { position: relative; display: inline-block; overflow: hidden; padding-block: .2em; margin-block: -.2em; vertical-align: bottom; white-space: nowrap; }
.btn-roll .r2 { position: absolute; left: 0; top: .2em; }
.btn-roll .ch {
  display: inline-block;
  transition: translate .55s var(--ease-long);
  transition-delay: calc(var(--i) * 18ms);
}
.btn-roll .r2 .ch { translate: 0 140%; }
.roll-host:hover .btn-roll .r1 .ch, .roll-host:focus-visible .btn-roll .r1 .ch { translate: 0 -140%; }
.roll-host:hover .btn-roll .r2 .ch, .roll-host:focus-visible .btn-roll .r2 .ch { translate: 0 0; }

/* Sublinierea fuge spre dreapta și revine din stânga (linkurile de sub videoclip, cele cu săgeată,
   „Vezi cadourile”). --uy = la ce înălțime stă linia. */
.hero-links a { --uy: calc(100% - 10px); }
.link-arrow.line-fx {
  --uy: 100%;
  border-bottom-color: transparent;
  background: linear-gradient(currentColor, currentColor) 0 var(--uy) / 100% 1px no-repeat;
}
.tag-link.line-fx { --uy: 100%; }
@keyframes line-wipe {
  0%   { background-size: 100% 1px; background-position: 100% var(--uy); }
  45%  { background-size: 0 1px;    background-position: 100% var(--uy); }
  46%  { background-size: 0 1px;    background-position: 0 var(--uy); }
  100% { background-size: 100% 1px; background-position: 0 var(--uy); }
}
.hero-links a.line-fx:hover, .link-arrow.line-fx:hover, .gift-tag:hover .tag-link.line-fx {
  animation: line-wipe .8s var(--ease) both;
}

/* 3. Cioburile de pietre de la click */
.stone-chip { position: fixed; z-index: 990; pointer-events: none; will-change: transform, opacity; }
