/* ====================================
   Kinna Studio — UI Effects
   ==================================== */

/* === PAGE TRANSITION === */
#kinna-transition {
  position: fixed;
  inset: 0;
  background: var(--cream, #fdfaf6);
  z-index: 99999;
  pointer-events: all;
  transform: scaleY(1);
  transform-origin: top;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}
#kinna-transition.out {
  transform: scaleY(0);
  pointer-events: none;
}

/* === TEXT REVEAL ON LOAD === */
.kinna-h1-reveal {
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
}
.kinna-h1-reveal.revealed {
  clip-path: inset(0 0% 0 0);
  transition: clip-path .9s cubic-bezier(0.16, 1, 0.3, 1);
}
.kinna-h1-reveal.revealed.d1 { transition-delay: .08s; }
.kinna-h1-reveal.revealed.d2 { transition-delay: .16s; }
.kinna-h1-reveal.revealed.d3 { transition-delay: .24s; }

/* === WORD REVEAL === */
.kinna-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.kinna-word.in {
  opacity: 1;
  transform: translateY(0);
}

/* === SCROLL FADE-UP === */
.kinna-fade {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}
.kinna-fade.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* === PROGRESS BAR (articles) === */
#kinna-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold, #a67828), var(--gold2, #c99840));
  z-index: 9998;
  pointer-events: none;
  transition: width .08s linear;
  will-change: width;
}

/* === CARD HOVER === */
.art-card,
.article-card,
.pilon-row {
  transition: transform .25s ease, filter .25s ease, border-color .25s ease;
}
.art-card:hover,
.article-card:hover,
.pilon-row:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 8px 20px rgba(166,120,40,.2));
  border-color: rgba(166,120,40,.35) !important;
}

/* === BUTTON GLOW ===
   Pseudo-element cu box-shadow static + animație pe opacity (GPU-only).
   box-shadow nu se animează — doar opacitatea stratului.
*/
@keyframes kinna-btn-pulse {
  0%, 100% { opacity: .4; }
  50%       { opacity: .85; }
}

.btn-gold {
  position: relative;
  overflow: visible;
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  box-shadow: 0 0 22px 6px rgba(166,120,40,.5), 0 4px 18px rgba(166,120,40,.25);
  animation: kinna-btn-pulse 3.2s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
  will-change: opacity;
}
.btn-gold:hover::after,
.btn-gold:focus-visible::after {
  animation: none;
  opacity: 1;
}

.nav-cta:hover,
.nav-cta:focus-visible,
.btn-ink:hover,
.btn-ink:focus-visible,
.btn-outline:hover,
.btn-outline:focus-visible {
  filter: drop-shadow(0 0 10px rgba(166,120,40,.4));
  transition: filter .25s ease;
}

/* === SCROLL-DRIVEN MARQUEE === */
.scroll-marquee {
  overflow: hidden;
  background: var(--ink, #1c1008);
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.scroll-marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  will-change: transform;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.22);
}
.sm-dot {
  color: var(--gold, #a67828);
  opacity: .5;
  flex-shrink: 0;
}

/* === TILT 3D CARDS ===
   Cardurile se înclină ușor după poziția cursorului.
   JS aplică transform inline. CSS gestionează transition + perspective + transform-style.
*/
.pilon-row,
.art-card,
.article-card {
  transform-style: preserve-3d;
  transform: perspective(900px);
}
/* Override existing hover translateY to avoid conflict — JS handles transform fully */
.pilon-row:hover,
.art-card:hover,
.article-card:hover {
  transform: perspective(900px) translateY(-4px);
}

/* === IMAGE REVEAL MASK ===
   Container .kinna-mask are o "perdea" gold care alunecă spre dreapta când imaginea intră în viewport.
   Imaginea în interior face un subtle zoom-out din scale(1.08) → scale(1) pentru senzație cinematică.
*/
.kinna-mask {
  position: relative;
  overflow: hidden;
}
.kinna-mask::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold, #a67828) 0%, var(--gold2, #c99840) 100%);
  transform: scaleX(1);
  transform-origin: right center;
  transition: transform 0.95s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 2;
  pointer-events: none;
}
.kinna-mask.revealed::after {
  transform: scaleX(0);
}
.kinna-mask img,
.kinna-mask picture {
  display: block;
  transform: scale(1.08);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.kinna-mask.revealed img,
.kinna-mask.revealed picture {
  transform: scale(1);
}

/* === LIQUID BLOBS ===
   Forme organice care se deformează și se "fuzionează" via SVG gooey filter.
   Blob solid color, opacity reglat la stage level. Pure CSS animation.
*/
.kinna-blob-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.kinna-blob-wrap {
  position: absolute;
  inset: -120px;
  filter: url(#kinna-goo);
}
.kinna-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform, border-radius;
  opacity: .9;
}
.kinna-blob--gold  { background: var(--gold,  #a67828); }
.kinna-blob--gold2 { background: var(--gold2, #c99840); }
.kinna-blob--cream { background: var(--cream2, #f5efe6); }

.kinna-blob--a {
  width: 360px; height: 360px;
  top: -40px; left: -80px;
  animation: kinna-blob-morph-a 18s ease-in-out infinite alternate;
}
.kinna-blob--b {
  width: 300px; height: 300px;
  bottom: -60px; right: -60px;
  animation: kinna-blob-morph-b 22s ease-in-out infinite alternate;
}
.kinna-blob--c {
  width: 220px; height: 220px;
  top: 40%; left: 40%;
  animation: kinna-blob-morph-c 26s ease-in-out infinite alternate;
}

@keyframes kinna-blob-morph-a {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0,0) rotate(0deg); }
  50%  { border-radius: 30% 70% 70% 30% / 50% 60% 40% 50%; transform: translate(60px, 40px) rotate(20deg); }
  100% { border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%; transform: translate(-30px, 70px) rotate(-15deg); }
}
@keyframes kinna-blob-morph-b {
  0%   { border-radius: 50% 50% 60% 40% / 60% 40% 50% 50%; transform: translate(0,0) rotate(0deg); }
  50%  { border-radius: 70% 30% 50% 60% / 40% 70% 30% 60%; transform: translate(-60px, -40px) rotate(-18deg); }
  100% { border-radius: 40% 60% 70% 40% / 50% 50% 60% 40%; transform: translate(40px, -70px) rotate(12deg); }
}
@keyframes kinna-blob-morph-c {
  0%   { border-radius: 40% 60% 50% 50% / 50% 50% 60% 40%; transform: translate(0,0) scale(1); }
  50%  { border-radius: 60% 40% 70% 30% / 40% 60% 30% 70%; transform: translate(-40px, 30px) scale(1.15); }
  100% { border-radius: 50% 50% 40% 60% / 60% 40% 50% 50%; transform: translate(30px, -40px) scale(.92); }
}

/* Stage opacity tuning — dark backgrounds need more, light backgrounds less */
.kinna-blob-stage--dark  { opacity: .22; }
.kinna-blob-stage--light { opacity: .14; mix-blend-mode: multiply; }

/* === LIQUID GRADIENT BUTTON ===
   Radial gradient care urmărește cursorul peste .btn-gold.
   JS setează --mx/--my pe mousemove.
*/
.btn-gold {
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 120px at var(--mx) var(--my),
    rgba(255, 232, 170, .85) 0%,
    rgba(255, 220, 130, .35) 35%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: screen;
}
.btn-gold:hover::before,
.btn-gold:focus-visible::before {
  opacity: 1;
}

/* === FROSTED GLASS ===
   Sticlă mată — funcționează cel mai bine peste blob-uri sau imagini.
*/
.kinna-glass {
  background: rgba(255, 255, 255, .07) !important;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .14) !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(255, 255, 255, .15);
}
.kinna-glass--dark {
  background: rgba(28, 16, 8, .35) !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(166, 120, 40, .22) !important;
}

/* === GRAIN TEXTURE === */
#kinna-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  background-repeat: repeat;
}

/* === LIQUID GLASS BUTTON ===
   Frosted glass cu shimmer animat.
   Distorsie SVG activă în Firefox (backdrop-filter: url).
   Chrome/Safari primesc blur fallback — tot arată bine.
*/
.btn-liquid-glass {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .25s ease;
  background: rgba(253, 250, 246, .18);
  border: 1px solid rgba(255, 255, 255, .55);
  border-bottom-color: rgba(200, 180, 150, .3);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, .07),
    inset 0 1px 0 rgba(255, 255, 255, .8),
    inset 0 -1px 0 rgba(0, 0, 0, .05),
    0 0 20px rgba(166, 120, 40, .08);
}
/* Glass blur layer */
.btn-liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  z-index: -1;
}
/* SVG distortion pentru Firefox */
@supports (backdrop-filter: url('#x')) {
  .btn-liquid-glass::before {
    backdrop-filter: url('#kinna-liquid-glass');
  }
}
/* Top edge — lumina prinsă de sticlă */
.btn-liquid-glass::after {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .92), transparent);
  pointer-events: none;
}
.btn-liquid-glass:hover {
  transform: scale(1.04);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, .1),
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 0 28px rgba(166, 120, 40, .18);
}
.btn-liquid-glass:active {
  transform: scale(.97);
}

/* Varianta gold solid — primary CTA */
.btn-liquid-glass.lg-gold {
  background: linear-gradient(160deg, #c99840 0%, #a67828 100%);
  color: #fdfaf6;
  border-color: rgba(255, 220, 100, .45);
  border-bottom-color: rgba(80, 50, 0, .5);
  box-shadow:
    0 2px 12px rgba(166, 120, 40, .4),
    0 6px 24px rgba(166, 120, 40, .22),
    inset 0 1px 0 rgba(255, 242, 160, .45),
    inset 0 -1px 0 rgba(80, 50, 0, .3);
}
/* Dezactivează blur-ul pe gold — ar spăla culoarea */
.btn-liquid-glass.lg-gold::before {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
}
.btn-liquid-glass.lg-gold::after {
  background: linear-gradient(90deg, transparent, rgba(255, 248, 190, .75), transparent);
}
.btn-liquid-glass.lg-gold:hover {
  filter: brightness(1.1);
  box-shadow:
    0 4px 20px rgba(166, 120, 40, .55),
    0 8px 32px rgba(166, 120, 40, .3),
    inset 0 1px 0 rgba(255, 248, 200, .55);
}
.btn-liquid-glass.lg-gold .lg-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 248, 180, .6), transparent);
}

/* Varianta brown/marou — CTA secundare */
.btn-liquid-glass.lg-brown {
  background: linear-gradient(160deg, #3d2010 0%, #1c1008 100%);
  color: #fdfaf6;
  border-color: rgba(255, 200, 150, .14);
  border-bottom-color: rgba(0, 0, 0, .5);
  box-shadow:
    0 2px 12px rgba(28, 16, 8, .4),
    0 6px 24px rgba(28, 16, 8, .2),
    inset 0 1px 0 rgba(255, 200, 150, .2),
    inset 0 -1px 0 rgba(0, 0, 0, .4);
}
.btn-liquid-glass.lg-brown::before {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
}
.btn-liquid-glass.lg-brown::after {
  background: linear-gradient(90deg, transparent, rgba(255, 200, 150, .32), transparent);
}
.btn-liquid-glass.lg-brown:hover {
  filter: brightness(1.2);
  box-shadow:
    0 4px 20px rgba(28, 16, 8, .55),
    0 8px 32px rgba(28, 16, 8, .28),
    inset 0 1px 0 rgba(255, 200, 150, .28);
}
.btn-liquid-glass.lg-brown .lg-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 200, 150, .28), transparent);
}
/* Waitlist button e full-width — override display */
.wl-btn.btn-liquid-glass {
  display: flex;
  width: 100%;
  border-radius: 8px;
}

/* Varianta gold outline — secondary CTA */
.btn-liquid-glass.lg-gold-outline {
  background: rgba(166, 120, 40, .08);
  color: var(--ink);
  border-color: rgba(166, 120, 40, .6);
  border-bottom-color: rgba(166, 120, 40, .35);
  box-shadow:
    0 2px 8px rgba(166, 120, 40, .08),
    inset 0 1px 0 rgba(255, 255, 255, .5),
    0 0 16px rgba(166, 120, 40, .06);
}
.btn-liquid-glass.lg-gold-outline::after {
  background: linear-gradient(90deg, transparent, rgba(255, 220, 120, .6), transparent);
}
.btn-liquid-glass.lg-gold-outline:hover {
  box-shadow:
    0 4px 16px rgba(166, 120, 40, .18),
    inset 0 1px 0 rgba(255, 255, 255, .6),
    0 0 28px rgba(166, 120, 40, .2);
}
.btn-liquid-glass.lg-gold-outline .lg-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 210, 100, .45), transparent);
}

/* Shimmer sweep animat */
.lg-shimmer {
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-15deg);
  animation: kinna-glass-sweep 4.5s cubic-bezier(.4, 0, .6, 1) infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes kinna-glass-sweep {
  0%, 55%, 100% { left: -60%; opacity: 0; }
  58%            { opacity: 1; }
  88%            { left: 140%; opacity: .55; }
  95%, 100%      { opacity: 0; }
}

/* === PREFERS REDUCED MOTION ===
   Dezactivează toate animațiile pentru utilizatorii care preferă mai puțin mișcare.
*/
@media (prefers-reduced-motion: reduce) {
  .btn-gold::after           { animation: none !important; }
  .btn-gold::before          { opacity: 0 !important; }
  .kinna-h1-reveal           { clip-path: none !important; transition: none !important; }
  .kinna-fade                { opacity: 1 !important; transform: none !important; transition: none !important; }
  .kinna-word                { opacity: 1 !important; transform: none !important; transition: none !important; }
  #kinna-transition          { transition: none !important; }
  .art-card, .article-card,
  .pilon-row                 { transition: none !important; }
  .kinna-blob                { animation: none !important; }
  .kinna-mask::after         { transform: scaleX(0) !important; transition: none !important; }
  .kinna-mask img,
  .kinna-mask picture        { transform: none !important; transition: none !important; }
  .btn-liquid-glass          { transition: none !important; }
  .lg-shimmer                { animation: none !important; }
}
