/* ==========================================================================
   Ofisimiz sayfası (/sanal-ofis, /en/virtual-office). Düz zeminler, tek vurgu (kobalt).
   İlk ekranda 3B sanal ofis çerçevede (panel/ofis/demo.php?gomulu=1); sayfa ofisle konuşur:
   "Şu an ofiste" şeridi ve kadro kartları ofisteki işlerle canlanır (js/ofis-sayfa.js).
   Kadro işaretlemesi build.php ofisKadroDoldur() üretir (kaynak: panel-app/ofis-ekibimiz.php).
   ========================================================================== */

.vo-hero, #kadro, #akis { --vo-tint: color-mix(in srgb, var(--sa-accent) 12%, var(--sa-surface)); }

/* --- Açılış: başlık solda, açıklama, düğme ve ekip sağda; altında ofisin kendisi ---------------- */
.vo-hero { padding: calc(var(--nav-h) + clamp(28px, 5vh, 64px)) 0 clamp(56px, 8vh, 96px); }
.vo-hero__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 24px; align-items: end; margin-bottom: clamp(28px, 4vh, 44px); }
.vo-hero__head h1 { grid-column: 1 / span 6; font-size: clamp(44px, 5.6vw, 84px); line-height: .98; letter-spacing: -0.045em; max-width: 11ch; }
.vo-hero__side { grid-column: 8 / -1; display: grid; gap: 24px; min-width: 0; }
.vo-hero__side .lead { max-width: 44ch; }
.vo-hero__side .actions { align-items: center; gap: 14px 20px; }

/* Ekip: üst üste binen baş harfler; üstüne gelince sırayla el sallar */
.vo-crew { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 48px; text-decoration: none; color: var(--sa-ink); font-weight: 500; }
.vo-crew__avs { display: inline-flex; }
.vo-crew__av {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: -10px; border-radius: 50%;
  border: 2px solid var(--sa-canvas); background: var(--sa-sunken); color: var(--sa-ink);
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em; line-height: 1;
  transition: transform .35s var(--sa-ease); transition-delay: calc(var(--k, 0) * 28ms);
}
.vo-crew__av:first-child { margin-left: 0; }
.vo-crew__av:nth-child(4n + 1) { background: var(--sa-accent); color: var(--sa-accent-ink); }
.vo-crew__av:nth-child(4n + 2) { background: var(--sa-ink); color: var(--sa-canvas); }
.vo-crew__av:nth-child(4n + 3) { background: var(--vo-tint); color: var(--sa-accent); }
.vo-crew__av.vo-crew__more { background: var(--sa-surface); color: var(--sa-ink-soft); box-shadow: inset 0 0 0 1px var(--sa-line); }
.vo-crew__t { white-space: nowrap; text-decoration: underline; text-decoration-color: var(--sa-line); text-underline-offset: 5px; transition: text-decoration-color .2s var(--sa-ease); }
.vo-crew:hover .vo-crew__t { text-decoration-color: currentColor; }
.vo-crew:hover .vo-crew__av { transform: translateY(-5px); }
.js .vo-crew__av { animation: voPop .55s var(--sa-ease) both; animation-delay: calc(.55s + var(--k, 0) * 70ms); }
@keyframes voPop { from { opacity: 0; transform: translateY(8px) scale(.6); } }

/* Sahne */
.vo-stage {
  position: relative; height: clamp(440px, 74svh, 820px); overflow: hidden;
  border: 1px solid var(--sa-line); border-radius: var(--sa-radius-l); background: var(--sa-sunken);
}
.vo-stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.js .vo-stage { animation: voIn 1s var(--sa-ease) .2s both; }
@keyframes voIn { from { opacity: 0; translate: 0 24px; } }

/* "Şu an ofiste": sahnenin alt kenarına oturan koyu şerit; cümleler aşağıdan kayarak gelir */
.vo-live {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 12px;
  width: fit-content; max-width: calc(100% - 32px); min-height: 48px; margin: -24px auto 0; padding: 0 20px 0 16px;
  border-radius: 999px; background: var(--sa-dark); color: var(--sa-dark-ink); font-size: 15px;
  box-shadow: 0 10px 30px -12px rgb(12 12 14 / .45);
}
.vo-live__dot { position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--sa-dark-accent); }
.vo-live__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--sa-dark-accent); animation: voPing 1.8s var(--sa-ease) infinite; }
@keyframes voPing { to { transform: scale(3); opacity: 0; } }
.vo-live__label { flex: none; color: var(--sa-dark-ink-soft); }
.vo-live__text { display: grid; min-width: 0; overflow: hidden; }
.vo-live__item {
  grid-area: 1 / 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 62ch;
  animation: voUp .45s var(--sa-ease) both;
}
.vo-live__item b { font-weight: 600; color: #fff; }
.vo-live__item.is-out { animation: voOut .45s var(--sa-ease) both; }
@keyframes voUp { from { opacity: 0; transform: translateY(110%); } }
@keyframes voOut { to { opacity: 0; transform: translateY(-110%); } }

/* --- Kadro: her oda bir kart; kişi açılınca yaptığı işler ---------------------------------------- */
.vo-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.vo-room {
  display: grid; gap: 14px; align-content: start; padding: 22px 22px 12px;
  border: 1px solid var(--sa-line); border-radius: var(--sa-radius-l); background: var(--sa-surface);
  transition: transform .3s var(--sa-ease), box-shadow .3s var(--sa-ease), border-color .3s var(--sa-ease);
}
.vo-room:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--sa-accent) 30%, var(--sa-line)); box-shadow: 0 18px 40px -24px rgb(17 17 19 / .35); }
.vo-room__h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.vo-room__h h3 { font-size: 20px; }
.vo-room__h p { font-size: 14px; color: var(--sa-ink-soft); }
.vo-room__ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--vo-tint); color: var(--sa-accent); transition: transform .45s var(--sa-ease); }
.vo-room__ic svg { width: 22px; height: 22px; }
.vo-room:hover .vo-room__ic { transform: rotate(-8deg) scale(1.06); }
.vo-room__people { display: grid; border-top: 1px solid var(--sa-line); }

.vo-p + .vo-p { border-top: 1px solid var(--sa-line); }
.vo-p summary { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 28px 14px 0; cursor: pointer; list-style: none; }
.vo-p summary::-webkit-details-marker { display: none; }
.vo-p summary::after {
  content: ""; position: absolute; right: 6px; top: 26px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--sa-ink-soft); border-bottom: 1.5px solid var(--sa-ink-soft); transform: rotate(45deg);
  transition: transform .2s var(--sa-ease);
}
.vo-p[open] summary::after { transform: translate(0, 3px) rotate(225deg); }
.vo-p__av {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--sa-sunken); color: var(--sa-ink); font-size: 13px; font-weight: 600; line-height: 1;
  transition: background .3s var(--sa-ease), color .3s var(--sa-ease), transform .3s var(--sa-ease);
}
.vo-p summary:hover .vo-p__av { transform: scale(1.06); }
.vo-p__txt { display: grid; gap: 2px; min-width: 0; }
.vo-p__name { font-weight: 500; }
.vo-p summary:hover .vo-p__name { color: var(--sa-accent); }
.vo-p__desc { font-size: 15px; line-height: 1.45; color: var(--sa-ink-soft); }
.vo-p__now { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--sa-accent); animation: voUp .4s var(--sa-ease) both; }
/* ofiste çalışan kişi: avatar kobalt, köşesinde atan nokta */
.vo-p.is-busy .vo-p__av { background: var(--sa-accent); color: var(--sa-accent-ink); }
.vo-p.is-busy .vo-p__av::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--sa-accent); border: 2px solid var(--sa-surface); animation: voBeat 1.4s ease-in-out infinite;
}
@keyframes voBeat { 50% { transform: scale(1.35); } }
.vo-p__body { display: grid; gap: 12px; justify-items: start; padding: 0 0 16px 52px; }
.vo-p__jobs { display: grid; gap: 7px; padding-left: 1.1em; list-style: disc; font-size: 15px; color: var(--sa-ink-soft); }
.vo-p__jobs li::marker { color: var(--sa-accent); }
.vo-p[open] .vo-p__body { animation: voUp .35s var(--sa-ease) both; }
.vo-p__show {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--sa-line); border-radius: 999px;
  background: transparent; color: var(--sa-ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: border-color .2s var(--sa-ease), background .2s var(--sa-ease), transform .15s var(--sa-ease);
}
.vo-p__show::before { content: "↑"; color: var(--sa-accent); transition: transform .25s var(--sa-ease); }
.vo-p__show:hover { border-color: var(--sa-ink); }
.vo-p__show:hover::before { transform: translateY(-3px); }
.vo-p__show:active { transform: scale(.97); }

/* --- Bir iş ofiste nasıl ilerler: "Cuma gönderisi" masadan masaya yürür ------------------------- */
.vo-flowwrap { position: relative; padding-top: 34px; }
.vo-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--sa-ink); }
.vo-flow li { display: grid; gap: 10px; align-content: start; justify-items: start; padding: 24px 24px 8px 0; }
.vo-flow li + li { padding-left: 24px; border-left: 1px solid var(--sa-line); }
.vo-flow__n { font-size: clamp(28px, 2.6vw, 40px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--sa-accent); transition: color .3s var(--sa-ease); }
.vo-flow p:not(.vo-flow__n) { color: var(--sa-ink-soft); }
.vo-flow__tag {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; padding: 5px 11px; border-radius: 999px;
  background: var(--vo-tint); color: var(--sa-accent); font-size: 13px; font-weight: 500; opacity: 0;
}
.vo-flow li:nth-child(3) .vo-flow__tag::before { content: "✓"; margin-right: 3px; }
.vo-flow li:nth-child(4) .vo-flow__tag { background: var(--sa-accent); color: var(--sa-accent-ink); }
.vo-flow__tag i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: voDot 1s ease-in-out infinite; }
.vo-flow__tag i:first-of-type { margin-left: 3px; }
.vo-flow__tag i:nth-of-type(2) { animation-delay: .15s; }
.vo-flow__tag i:nth-of-type(3) { animation-delay: .3s; }
@keyframes voDot { 50% { transform: translateY(-3px); opacity: .4; } }
.vo-flow__job {
  position: absolute; z-index: 1; top: 34px; left: 0; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px 7px 9px; border-radius: 999px; background: var(--sa-ink); color: var(--sa-canvas);
  font-size: 13px; font-weight: 500; white-space: nowrap; transform: translateY(-50%); opacity: 0;
}
.vo-flow__job svg { width: 17px; height: 17px; }

/* Bölüm görünürken 10 sn'lik döngü: her masa 2,5 sn'de bir sırayla yanar */
.vo-flowwrap.is-on .vo-flow__n { color: var(--sa-ink-soft); }
.vo-flowwrap.is-on .vo-flow li:nth-child(1) { --s: 0s; }
.vo-flowwrap.is-on .vo-flow li:nth-child(2) { --s: 2.5s; }
.vo-flowwrap.is-on .vo-flow li:nth-child(3) { --s: 5s; }
.vo-flowwrap.is-on .vo-flow li:nth-child(4) { --s: 7.5s; }
.vo-flowwrap.is-on .vo-flow__n { animation: voNum 10s var(--s) infinite; }
.vo-flowwrap.is-on .vo-flow__tag { animation: voTag 10s var(--s) infinite; }
.vo-flowwrap.is-on .vo-flow__job { animation: voJob 10s infinite; }
@keyframes voNum { 0% { color: var(--sa-ink-soft); } 3%, 22% { color: var(--sa-accent); } 26%, 100% { color: var(--sa-ink-soft); } }
@keyframes voTag { 0% { opacity: 0; transform: translateY(6px); } 6%, 22% { opacity: 1; transform: none; } 26%, 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes voJob {
  0% { left: 0; opacity: 0; transform: translateY(-50%) scale(.8); }
  4% { opacity: 1; transform: translateY(-50%) scale(1); }
  21% { left: 0; transform: translateY(-50%); }
  25%, 46% { left: calc(25% + 24px); transform: translateY(-50%); }
  50%, 71% { left: calc(50% + 24px); transform: translateY(-50%); }
  75%, 94% { left: calc(75% + 24px); opacity: 1; transform: translateY(-50%); }
  100% { left: calc(75% + 24px); opacity: 0; transform: translateY(-80%); }
}

/* --- Dar ekranlar ------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .vo-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .vo-hero__head h1, .vo-hero__side { grid-column: 1 / -1; }
  .vo-hero__head h1 { max-width: 14ch; }
  .vo-flowwrap { padding-top: 0; }
  .vo-flow__job { display: none; }
  .vo-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vo-flow li:nth-child(3) { padding-left: 0; border-left: 0; }
  .vo-flow li:nth-child(n + 3) { border-top: 1px solid var(--sa-line); }
}
@media (max-width: 600px) {
  .vo-stage { height: clamp(420px, 68svh, 620px); border-radius: var(--sa-radius-m); }
  .vo-live { width: calc(100% - 24px); padding: 0 16px 0 14px; font-size: 14px; }
  .vo-live__label { display: none; }
  .vo-crew__av { width: 32px; height: 32px; margin-left: -9px; font-size: 11px; }
  .vo-rooms { grid-template-columns: minmax(0, 1fr); }
  .vo-flow { grid-template-columns: minmax(0, 1fr); }
  .vo-flow li, .vo-flow li + li { padding-left: 0; border-left: 0; }
  .vo-flow li + li { border-top: 1px solid var(--sa-line); }
}
@media (prefers-reduced-motion: reduce) {
  .js .vo-stage, .js .vo-crew__av, .vo-live__item, .vo-live__dot::after, .vo-p__now, .vo-p.is-busy .vo-p__av::after, .vo-p[open] .vo-p__body, .vo-flow__tag i { animation: none; }
  .vo-crew__av, .vo-room, .vo-room__ic, .vo-p__av, .vo-p summary::after { transition: none; }
}
