/* =============================================
   CONCEPTE NOVA ÎN MIȘCARE — dispozitive premium cu clipuri reale
   Folosit pe prima pagină (#modele, rândul de concepte) și în /showcase (#galerie).

   .nd               un dispozitiv (container: totul se scalează cu lățimea lui, în cqi)
   .nd--laptop       laptop văzut din față: capac cu ramă subțire, bară de browser, bază din aluminiu
   .nd--phone        telefon: ramă de titan, insula din ecran, bara de stare, butoane laterale
   [data-tilt]       zona care se înclină la mouse (js/concepte.js, pe NovaTick, doar cât e hover)
   [data-tilt-body]  elementul rotit; .nd-glare = reflexia de pe sticlă, mutată odată cu înclinarea

   Prima pagină: PC (≥ 900px) = trei dispozitive pe aceeași „scenă” (laptop / laptop mare / telefon);
   telefon = carusel cu adâncime (motorul comun js/depth-carousel.js), doar clipul din față rulează.
   Doar transform și opacity în mișcare. Culorile temei: variabilele --nv-*.
   ============================================= */

/* ---------- dispozitivul: comun ---------- */
.nd {
  position: relative;
  container-type: inline-size;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.nd-body {
  position: relative;
  transform-origin: 50% 62%;
}
.nd-lid { position: relative; }
.nd-screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #050606;
}
.nd-view {
  position: relative;
  overflow: hidden;
  background: var(--nv-card);
}
.nd-poster, .nd-poster img, .nd-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  display: block;
}
.nd-video { opacity: 0; transition: opacity .6s ease; }
.has-played > .nd-video { opacity: 1; }

/* reflexia de pe sticlă: o rază foarte fină și foarte moale (alfa ≤ .04, fără muchii), mutată doar puțin de înclinare.
   Înainte era o bandă diagonală albă lată, care se plimba peste ecran: o jumătate a ecranului părea mai luminoasă
   (iar cealaltă „mai neagră”) când laptopul se înclina. Ecranul și rama rămân uniform luminate; doar raza se mișcă. */
.nd-glare {
  position: absolute;
  inset: -20% -20%;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse 34% 60% at 50% 50%,
    rgba(255, 255, 255, .04) 0,
    rgba(255, 255, 255, .018) 55%,
    rgba(255, 255, 255, 0) 100%);
  opacity: .8;
  transition: opacity .6s ease;
}
/* margine de sticlă: o linie fină de lumină pe conturul ecranului */
.nd-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

/* umbra de pe „podea” și lumina temei de sub dispozitiv (gradiente radiale, fără blur) */
.nd-floor {
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: -5cqi;
  height: 9cqi;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .62), rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, 0));
}
.nd-floor::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 10%;
  bottom: -60%;
  background: radial-gradient(closest-side, rgba(var(--nv-acc-rgb), .26), rgba(var(--nv-acc2-rgb), .07) 55%, transparent);
  opacity: .55;
  transition: opacity .6s ease, transform .6s var(--nv-ease, ease);
}

/* butonul pornește / oprește */
.nd-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(12, 14, 13, .74);
  color: #F2F4F3;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity .3s ease, transform .3s var(--nv-ease, ease), border-color .3s ease;
}
.nd-play::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; } /* zonă de atingere 46px */
.nd-play svg { width: 14px; height: 14px; grid-area: 1 / 1; }
.nd-play .nd-pause-i { display: none; }
.nd-play[data-on="true"] .nd-play-i { display: none; }
.nd-play[data-on="true"] .nd-pause-i { display: block; }
.nd-play:hover { border-color: rgba(var(--nv-acc-rgb), .7); }
.nd-play:focus-visible { outline: 2px solid var(--nv-acc-hi); outline-offset: 3px; opacity: 1; }

/* ---------- LAPTOP ---------- */
.nd--laptop .nd-lid {
  margin: 0 6.4cqi;
  padding: 1.85cqi 1.85cqi 2.3cqi;
  border-radius: 3.1cqi 3.1cqi 1cqi 1cqi;
  background: #070808;
  box-shadow:
    0 0 0 .3cqi #2c312f,
    0 0 0 .42cqi rgba(255, 255, 255, .13),
    inset 0 0 0 .12cqi rgba(255, 255, 255, .05);
}
/* camera din ramă */
.nd--laptop .nd-lid::before {
  content: '';
  position: absolute;
  top: .62cqi;
  left: 50%;
  width: .62cqi;
  height: .62cqi;
  margin-left: -.31cqi;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #33454f, #0b1013 70%);
}
.nd--laptop .nd-screen { border-radius: .5cqi; }
.nd-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 2.85cqi;
  padding: 0 1.2cqi;
  background: linear-gradient(180deg, #202523, #171a19);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}
.nd-lights { display: flex; gap: .55cqi; flex: none; width: 9cqi; }
.nd-lights i { width: .82cqi; height: .82cqi; border-radius: 50%; background: #3a3f3d; }
.nd-lights i:nth-child(1) { background: #ff5f57; }
.nd-lights i:nth-child(2) { background: #febc2e; }
.nd-lights i:nth-child(3) { background: #28c840; }
.nd-url {
  flex: 0 1 46%;
  min-width: 0;
  margin: 0 auto;
  height: 1.8cqi;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5cqi;
  padding: 0 1cqi;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  color: rgba(236, 239, 234, .62);
  font: 500 max(7.5px, 1.05cqi)/1 var(--font-body);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
}
.nd-url svg { width: max(7px, 1cqi); height: max(7px, 1cqi); flex: none; opacity: .75; }
.nd-url span { overflow: hidden; text-overflow: ellipsis; }
.nd-bar::after { content: ''; flex: none; width: 9cqi; } /* echilibrează luminile, adresa rămâne centrată */
.nd--laptop .nd-view { aspect-ratio: 16 / 10; }
.nd--laptop .nd-play { right: 1.6cqi; bottom: 1.6cqi; }

/* baza din aluminiu, văzută din față, cu decupajul pentru deget */
.nd-base {
  position: relative;
  height: 2.35cqi;
  border-radius: .25cqi .25cqi 3.4cqi 3.4cqi / .25cqi .25cqi 2cqi 2cqi;
  background: linear-gradient(180deg, #737976 0%, #474c4a 12%, #2a2e2d 48%, #151817 86%, #0c0e0d 100%);
  box-shadow: inset 0 .1cqi 0 rgba(255, 255, 255, .42), inset 0 -.25cqi .3cqi rgba(0, 0, 0, .55);
}
.nd-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 15cqi;
  height: .85cqi;
  margin-left: -7.5cqi;
  border-radius: 0 0 1.4cqi 1.4cqi;
  background: linear-gradient(180deg, #1a1d1c, #303533);
}
/* balamaua: o fâșie închisă între capac și bază */
.nd-base::after {
  content: '';
  position: absolute;
  left: 7.2cqi;
  right: 7.2cqi;
  top: -.55cqi;
  height: .55cqi;
  background: linear-gradient(180deg, #050606, #1f2322);
}
.nd--laptop .nd-floor { bottom: -4.6cqi; height: 8cqi; }

/* ---------- TELEFON ---------- */
.nd--phone .nd-lid {
  aspect-ratio: 100 / 206;
  padding: 2.4cqi;
  border-radius: 15.5cqi;
  background: linear-gradient(148deg, #6a6f6d 0%, #2a2e2d 14%, #0d0f0e 46%, #151817 78%, #4d5250 100%);
  box-shadow:
    inset 0 0 0 .45cqi rgba(255, 255, 255, .18),
    inset 0 0 0 1.45cqi #040505,
    0 0 0 .3cqi rgba(0, 0, 0, .55);
}
/* butoanele laterale */
.nd--phone .nd-lid::before,
.nd--phone .nd-lid::after {
  content: '';
  position: absolute;
  width: 1cqi;
  border-radius: .6cqi;
  background: linear-gradient(90deg, #4a4f4d, #1a1d1c);
}
.nd--phone .nd-lid::before { left: -.85cqi; top: 21%; height: 10cqi; box-shadow: 0 13.5cqi 0 #2f3332; }
.nd--phone .nd-lid::after { right: -.85cqi; top: 29%; height: 17cqi; background: linear-gradient(270deg, #4a4f4d, #1a1d1c); }
.nd--phone .nd-screen {
  /* Safari: colțurile mari rămân tăiate și peste <video> (laptopul are colțuri de 0,5cqi: nu e nevoie de mască) */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 13.1cqi;
}
.nd-status {
  position: relative;
  z-index: 2;
  flex: none;
  height: 11cqi;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8cqi 8cqi 0 10cqi;
  background: #050606;
  color: #F2F4F3;
  font: 600 max(8px, 3.7cqi)/1 var(--font-body);
  letter-spacing: -.01em;
}
.nd-status i { display: flex; gap: 1.2cqi; align-items: center; }
.nd-status svg { width: 4.4cqi; height: 4.4cqi; }
.nd-status b {
  width: 6.4cqi;
  height: 3.1cqi;
  border-radius: .9cqi;
  border: .3cqi solid rgba(242, 244, 243, .55);
  box-shadow: inset 0 0 0 .35cqi #050606;
  background: #F2F4F3;
}
.nd-island {
  position: absolute;
  top: 2.6cqi;
  left: 50%;
  z-index: 5;
  width: 29cqi;
  height: 8.4cqi;
  margin-left: -14.5cqi;
  border-radius: 99px;
  background: #000;
}
.nd--phone .nd-view { flex: 1; min-height: 0; }
/* indicatorul de jos (home) */
.nd--phone .nd-view::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2cqi;
  z-index: 2;
  width: 34cqi;
  height: 1.25cqi;
  margin-left: -17cqi;
  border-radius: 99px;
  background: rgba(24, 26, 25, .55);
  box-shadow: 0 0 0 .25cqi rgba(255, 255, 255, .3);
  pointer-events: none;
}
.nd--phone .nd-glare { inset: -10% -60%; }
.nd--phone .nd-play { right: 5cqi; bottom: 6.5cqi; }
.nd--phone .nd-floor { left: -4%; right: -4%; bottom: -5.5cqi; height: 12cqi; }

/* stratul care întunecă vecinii din carusel (opacitatea o pune motorul) */
.nd-dim {
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--nv-bg-rgb), .5), rgba(var(--nv-bg-rgb), .8));
  opacity: 0;
}

/* hover: lumina de sub dispozitiv crește, reflexia se aprinde (doar opacity / transform) */
@media (hover: hover) and (pointer: fine) {
  [data-tilt].is-tilt .nd-glare { opacity: .8; }
  [data-tilt].is-tilt .nd-floor::after { opacity: 1; transform: scaleX(1.06); }
  .nd-play { opacity: 0; }
  .nd-play[data-on="true"] { opacity: .5; }
  [data-clip-card]:hover .nd-play,
  [data-clip-card]:focus-within .nd-play { opacity: 1; }
}

/* ---------- ecran tactil: fără buton de play peste poster (clipul pornește singur sau la primul gest); când rulează, un mic buton de pauză ---------- */
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .nd-play[data-on="false"] { opacity: 0; pointer-events: none; }
  .nd-play[data-on="true"] { opacity: .75; }
}

/* ---------- mișcare redusă: fără înclinare și fără tranziții; clipul pornește doar din buton ---------- */
@media (prefers-reduced-motion: reduce) {
  .nd-video, .nd-glare, .nd-floor::after, .nd-play { transition: none; }
  .nd-play { opacity: 1 !important; }
}

/* ---------- Halloween: lumina de sub dispozitive devine de lumânare ---------- */
html[data-sezon="halloween"] .nd-floor::after {
  background: radial-gradient(closest-side, rgba(var(--nv-acc-rgb), .3), rgba(var(--nv-acc2-rgb), .1) 55%, transparent);
}
