:root {
  --ink: #141210;
  --mute: #7a746c;
  --paper: #ffffff;
  --glass: rgba(255, 255, 255, .42);
  --glass-line: rgba(255, 255, 255, .65);
  --gap: 10px;
  --radius: 18px;
  --band: 48px;
  --side: 64px;
  --side-open: 400px;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", "Times New Roman", serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

* { box-sizing: border-box; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #e4e1dc;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* fundal neutru, cald, cu o lumina discreta sus-stanga; poza curenta abia se ghiceste */
.bg {
  position: fixed; inset: -12%; z-index: 0; overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 10%, #f3f1ee 0%, rgba(243,241,238,0) 60%),
    radial-gradient(90% 80% at 85% 95%, #d6d2cc 0%, rgba(214,210,204,0) 60%),
    #e4e1dc;
}
.bg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(90px) saturate(0.35) brightness(1.08);
  opacity: 0; transition: opacity 1.6s ease;
}
.bg img.on { opacity: .28; }

/* ---------- loader: doar numele, pe centru, cu o linie de incarcare ---------- */

.loader {
  position: fixed; inset: 0; z-index: 50;
  background: #e4e1dc;
  display: grid; place-items: center;
  transition: opacity .9s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader-name, .name {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 24;
  letter-spacing: .34em;
  text-transform: uppercase;
  text-indent: .34em;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
}
.loader-name {
  font-size: clamp(22px, 3.6vw, 44px);
  transform-origin: top left;
  will-change: transform;
}
.loader-name.fly { transition: transform 1s var(--ease); }
.loader-bar {
  position: absolute; left: 50%; top: calc(50% + clamp(40px, 6vh, 64px));
  width: 140px; height: 1px;
  background: rgba(20,18,16,.14);
  transform: translateX(-50%);
  transition: opacity .4s ease;
}
.loader-bar i {
  display: block; width: 100%; height: 100%;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.loader-bar.gone { opacity: 0; }
.name.hold { visibility: hidden; }
.loader-name.swapped { visibility: hidden; }
.bento { opacity: 0; transition: opacity .8s ease; }
body.ready .bento { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .loader-name.fly, .loader, .bento { transition: none; } }

/* ---------- bento ---------- */

.bento {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  gap: var(--gap);
  padding: var(--gap);
  grid-template-rows: var(--band) 1fr var(--band);
  grid-template-columns: var(--side) minmax(0, 1fr) var(--photo-w, 50%);
  grid-template-areas:
    "top  top   top"
    "side grid photo"
    "bot  bot   bot";
  transition: grid-template-columns .9s var(--ease), opacity .8s ease;
}
.bento.open { grid-template-columns: var(--side-open) minmax(0, 1fr) var(--photo-w, 50%); }

.band, .side, .photo, .grid {
  border-radius: var(--radius);
  min-width: 0;
  min-height: 0;
}

.band, .side {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 40px -20px rgba(0,0,0,.25);
}

/* ---------- benzi ---------- */

.band {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 22px;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--ink);
}
.band-top { grid-area: top; }
.band-bottom { grid-area: bot; }
.band-side { white-space: nowrap; }
.band-side:last-child { text-align: right; }

.name { margin: 0; font-size: 14px; }
.counter { font-variant-numeric: tabular-nums; }
.counter .slash { margin: 0 .5em; opacity: .5; }

.credit { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s; }
.credit:hover, .credit:focus-visible { border-color: var(--ink); outline: none; }
.credit em { font-style: normal; font-family: var(--serif); font-size: 1.25em; line-height: 0; }

/* ---------- banda laterala / meniu ---------- */

.side {
  grid-area: side;
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}
.side-toggle {
  position: absolute;
  left: 0; top: 0;
  width: var(--side);
  height: 100%;
  padding: 22px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}
.side-toggle:focus-visible { outline: 1px solid var(--ink); outline-offset: -6px; border-radius: var(--radius); }
.side-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lbl-close { display: none; }
.open .lbl-open { display: none; }
.open .lbl-close { display: inline; }
.side-plus {
  position: relative; width: 14px; height: 14px; margin-bottom: 96px;
  transition: transform .6s var(--ease);
}
.side-plus::before, .side-plus::after {
  content: ""; position: absolute; background: var(--ink); left: 50%; top: 50%;
}
.side-plus::before { width: 14px; height: 1px; margin: 0 0 0 -7px; }
.side-plus::after { width: 1px; height: 14px; margin: -7px 0 0 0; }
.open .side-plus { transform: rotate(45deg); }

.side-body {
  grid-row: 1;
  padding: 22px 26px 18px calc(var(--side) + 10px);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .5s ease .1s, transform .7s var(--ease) .1s;
  overflow-y: auto;
  pointer-events: none;
}
.open .side-body { opacity: 1; transform: none; pointer-events: auto; transition-delay: .25s; }

.side-inner { width: calc(var(--side-open) - var(--side) - 42px); }
.side h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.01em;
}
.side h2 + * { margin-top: 0; }
.side h2:not(:first-child) { margin-top: 22px; }
.services { list-style: none; margin: 0; padding: 0; }
.services li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 0;
  border-top: 1px solid rgba(20,18,16,.12);
}
.services li:last-child { border-bottom: 1px solid rgba(20,18,16,.12); }
.s-name { font-size: 14px; }
.s-meta { color: var(--mute); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.c-tel {
  display: block;
  font-family: var(--serif);
  font-variation-settings: "opsz" 72;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.c-mail, .c-ig { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(20,18,16,.3); }
.c-ig { display: inline-block; margin-top: 10px; }
.c-mail:hover, .c-ig:hover, .c-tel:hover { border-color: var(--ink); }
.c-note { color: var(--mute); margin: 14px 0 0; font-size: 12.5px; max-width: 30ch; }

.call {
  grid-row: 2;
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid; place-items: center;
  text-decoration: none;
  z-index: 3;
  transition: transform .4s var(--ease), width .5s var(--ease), border-radius .5s var(--ease);
}
.call svg { width: 17px; height: 17px; }
.call span { display: none; }
.call:hover, .call:focus-visible { transform: translateX(-50%) scale(1.08); outline: none; }
.open .call { left: calc(var(--side) / 2); }

/* ---------- poza ---------- */

.photo {
  grid-area: photo;
  position: relative;
  overflow: hidden;
  background: #111;
  border-radius: var(--radius);
}
#stage {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  cursor: none;
}
.credit-tag {
  position: absolute;
  left: 14px; bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--ink);
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  text-decoration: none;
  opacity: 1;
  transition: opacity .6s ease, background-color .3s;
  z-index: 2;
}
.credit-tag.fade { opacity: 0; }
.credit-tag.plain { pointer-events: none; }
.credit-tag:hover, .credit-tag:focus-visible { background: rgba(255,255,255,.8); outline: none; }

.tabbar, .viewer-close, .side-foot { display: none; }

/* ---------- grid instagram ---------- */

.grid {
  grid-area: grid;
  background: var(--paper);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 0;
}
.grid::-webkit-scrollbar { display: none; }
.grid-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0;
  background: #ddd9d3;
  padding: 0; border: 0;
  cursor: pointer;
}
.tile img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease), filter .4s ease;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
.tile:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.tile.is-current::after {
  content: ""; position: absolute; left: 50%; bottom: 8px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.tile .mark {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}
.tile .mark svg { width: 100%; height: 100%; }
.tile.pinned img { filter: grayscale(1) contrast(1.04); }

.bio {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  hyphens: auto;
  -webkit-hyphens: auto;
  text-align: justify;
}
.nb { hyphens: none; -webkit-hyphens: none; white-space: nowrap; }

/* ---------- cursor ---------- */

.cursor {
  position: fixed; top: -20px; left: -20px;
  width: 40px; height: 40px;
  border: 1px solid rgba(20,18,16,.9);
  border-radius: 50%;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity .4s ease, width .35s ease, height .35s ease, top .35s ease, left .35s ease, border-color .35s;
  will-change: transform;
}
.cursor i { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #fff; border-radius: 50%; }
.cursor.on { opacity: 1; }
.cursor.link { width: 12px; height: 12px; top: -6px; left: -6px; border-color: transparent; }
.cursor, .cursor i { border-color: #fff; }
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor { display: none; }
  #stage { cursor: crosshair; }
}

/* ---------- fallback / nojs ---------- */

.nogl #stage { display: none; }
.fb-img { position: absolute; inset: 0; background: #111 center/cover no-repeat; cursor: pointer; }
.nojs { position: fixed; inset: auto 0 0 0; margin: 0; padding: 16px; text-align: center; background: var(--paper); z-index: 30; }

@media (prefers-reduced-motion: reduce) {
  .bento, .side-body, .side-plus, .call, .bg img { transition: none; }
}

/* ---------- telefon / tableta: logica separata, tot fixed, ca un instagram ----------
   Banda sus (nume + contor), grid 3 pe rand derulabil, bara de tab-uri jos
   (Lucrari · Info · Suna). O poza din grid se deschide in vizualizator, cu acelasi
   efect de nor; Info e o foaie peste grid. */

@media (max-width: 899px) {
  :root { --band: 44px; --tab: 58px; --gap: 8px; --radius: 14px; }
  html, body { overflow: hidden; height: 100%; }
  .bento {
    grid-template-rows: var(--band) minmax(0, 1fr) var(--tab);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "grid" "tab";
    padding: var(--gap);
    padding-bottom: max(var(--gap), env(safe-area-inset-bottom));
  }
  .bento.open { grid-template-columns: minmax(0, 1fr); }

  .band { padding: 0 14px; }
  /* dreapta: "Make-up artist"; in vizualizator, in acelasi loc, contorul */
  .band-top { grid-template-columns: auto 1fr auto; }
  .name { grid-column: 1; grid-row: 1; justify-self: start; font-size: 12px; letter-spacing: .24em; text-indent: 0; }
  .loader-name { letter-spacing: .24em; text-indent: 0; }
  .band-top .band-side:first-child { display: block; grid-column: 3; grid-row: 1; text-align: right; font-size: 10.5px; letter-spacing: .06em; transition: opacity .4s; }
  .counter { grid-column: 3; grid-row: 1; justify-self: end; font-size: 11px; opacity: 0; transition: opacity .4s; }
  .viewing .counter { opacity: 1; }
  .viewing .band-top .band-side:first-child { opacity: 0; }
  .band-bottom { display: none; }

  /* bara de jos */
  .tabbar {
    grid-area: tab;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; padding: 0;
    color: var(--mute);
    text-decoration: none;
    font: inherit; font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
  }
  .tab svg { width: 20px; height: 20px; }
  .tab.active { color: var(--ink); }

  /* grid: umple tot */
  .grid { grid-area: grid; -webkit-overflow-scrolling: touch; }

  /* info: foaie peste grid */
  .side {
    position: fixed;
    left: var(--gap); right: var(--gap);
    top: calc(var(--band) + 2 * var(--gap));
    bottom: calc(var(--tab) + 2 * var(--gap));
    z-index: 12;
    display: none;
    grid-template-rows: 1fr;
  }
  .open .side { display: block; }
  .side-toggle, .call { display: none; }
  .side-body {
    position: static; height: 100%;
    opacity: 1; transform: none; pointer-events: auto; transition: none;
    padding: 22px 20px 18px;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .side-inner { width: auto; }
  .bio { font-size: 13.5px; }
  .c-ig { display: block; margin-top: 12px; }
  .side-foot {
    display: block; margin: 26px 0 0; font-size: 11px; color: var(--mute);
  }
  .side-foot a { color: var(--ink); text-decoration: none; }
  .side-foot em { font-style: normal; font-family: var(--serif); font-size: 1.25em; line-height: 0; }

  /* vizualizator: celula foto devine overlay */
  .photo {
    position: fixed;
    left: var(--gap); right: var(--gap);
    top: calc(var(--band) + 2 * var(--gap));
    bottom: calc(var(--tab) + 2 * var(--gap));
    z-index: 11;
    display: none;
    background: #121110;
  }
  .viewing .photo { display: block; }
  #stage {
    position: absolute; inset: auto;
    left: 50%; top: 50%;
    width: var(--photo-w, 100%); height: var(--photo-h, 100%);
    transform: translate(-50%, -50%);
  }
  .viewer-close {
    display: grid; place-items: center;
    position: absolute; top: 10px; right: 10px; z-index: 3;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.7);
    background: rgba(255,255,255,.5); color: var(--ink);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    font: 22px/1 var(--sans); padding: 0 0 2px;
  }
  .credit-tag { left: 10px; bottom: 10px; }
}
