/* ==========================================================================
   Mentis — Yaşayan stüdyo (mentis-live.js ile)
   Günün saati, stüdyo durumu, ses düğmesi, gizli sürprizler,
   ana sayfadaki "disiplinler" listesi ve marka şeridi
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Günün saati: ana sayfa kapağının ışığı İstanbul saatine göre değişir
   -------------------------------------------------------------------------- */
[data-daypart="sabah"] .x-hero .m-hero__img { filter: grayscale(0.55) sepia(0.45) saturate(1.2) contrast(1.05); }
[data-daypart="aksam"] .x-hero .m-hero__img { filter: grayscale(0.5) sepia(0.35) hue-rotate(-18deg) saturate(1.4) contrast(1.1); }
/* Gece: kapak karanlık, imleç el feneri gibi daha geniş bir alanı aydınlatır, noktalar yıldıza döner */
[data-daypart="gece"] .x-hero .m-hero__img { filter: grayscale(1) brightness(0.35) contrast(1.1); }
[data-daypart="gece"] .x-hero { --sr: 300px; }
[data-daypart="gece"] .x-hero.is-lit .x-hero__spot { opacity: 1; }

/* Stüdyo durumu: açık yeşil, kapalı kehribar, hafta sonu gri */
[data-studio="kapali"] .x-live__dot { background: #f5a524; }
[data-studio="kapali"] .x-live__dot::after { border-color: #f5a524; }
[data-studio="haftasonu"] .x-live__dot { background: #8d8c86; }
[data-studio="haftasonu"] .x-live__dot::after { display: none; }
.x-live { text-transform: none; letter-spacing: 0.01em; }

/* --------------------------------------------------------------------------
   2. Ses düğmesi (arama düğmesinin yanında)
   -------------------------------------------------------------------------- */
.x-sound-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 0 0 6px;
  padding: 0;
  border: 1px solid var(--m-line-dark-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--m-white);
  cursor: pointer;
  transition: border-color 0.3s var(--m-ease), background-color 0.3s var(--m-ease);
}
.x-sound-btn:hover, .x-sound-btn:focus-visible { border-color: var(--m-white); background: rgba(253, 253, 247, 0.08); }
.x-sound-btn:focus-visible { outline: 2px solid var(--m-red); outline-offset: 2px; }
.x-sound-btn__bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.x-sound-btn__bars i { display: block; width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height 0.3s var(--m-ease); }
.x-sound-on .x-sound-btn__bars i { animation: xBars 1s var(--m-ease-in-out) infinite; }
.x-sound-on .x-sound-btn__bars i:nth-child(2) { animation-delay: -0.35s; }
.x-sound-on .x-sound-btn__bars i:nth-child(3) { animation-delay: -0.7s; }
.x-sound-on .x-sound-btn__bars i:nth-child(4) { animation-delay: -0.2s; }
.x-sound-on .x-sound-btn { border-color: var(--m-red); }
@keyframes xBars { 0%, 100% { height: 3px; } 50% { height: 14px; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .x-sound-btn { display: none; } }

/* --------------------------------------------------------------------------
   3. Gizli sürprizler
   -------------------------------------------------------------------------- */
.x-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 2004;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--m-black);
  color: var(--m-white);
  font-size: var(--m-fs-sm);
  line-height: 1.5;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, 24px);
  opacity: 0;
  transition: transform 0.45s var(--m-ease-out), opacity 0.45s var(--m-ease);
}
.x-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.x-toast a { color: var(--m-white); text-decoration: underline; text-decoration-color: var(--m-red); text-underline-offset: 3px; }

.x-rain { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 2004; pointer-events: none; }

.x-credits {
  position: fixed;
  inset: 0;
  z-index: 2005;
  overflow: hidden;
  background: #000;
  color: var(--m-white);
  opacity: 0;
  transition: opacity 0.5s var(--m-ease);
}
.x-credits.is-in { opacity: 1; }
.x-credits__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--m-line-dark-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--m-white);
  font: 500 var(--m-fs-sm)/1 var(--m-font);
  cursor: pointer;
}
.x-credits__close span { opacity: 0.5; font-size: var(--m-fs-xs); }
.x-credits__roll {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  text-align: center;
  animation: xRoll 22s linear forwards;
}
.x-credits__roll p { margin: 0 0 56px; }
.x-credits__roll span { display: block; font-size: var(--m-fs-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--m-on-dark-3); margin-bottom: 8px; }
.x-credits__roll strong { font: italic 400 clamp(1.6rem, 1rem + 2.4vw, 2.8rem)/1.15 var(--m-serif); }
.x-credits__end { font: 500 clamp(3rem, 2rem + 6vw, 7rem)/1 var(--m-font); letter-spacing: -0.05em; padding-top: 30vh; }
.x-credits__end span { color: var(--m-red); }
@keyframes xRoll { from { transform: translateY(0); } to { transform: translateY(calc(-100% - 60vh)); } }
@media (prefers-reduced-motion: reduce) {
  .x-credits__roll { top: 10vh; animation: none; }
}

/* Konami kodu: negatif mod */
html.x-negative { filter: invert(1) hue-rotate(180deg); }
.x-negative img, .x-negative video, .x-negative iframe, .x-negative canvas { filter: invert(1) hue-rotate(180deg); }

/* --------------------------------------------------------------------------
   4. Ana sayfa: disiplinler (eski "Neden Mentis" kartlarının yerine)
   -------------------------------------------------------------------------- */
.x-disc { list-style: none; margin: clamp(32px, 5vw, 64px) 0 0; padding: 0; border-top: 1px solid var(--m-line-dark); counter-reset: disc; }
.x-disc__item { border-bottom: 1px solid var(--m-line-dark); }
.x-disc__h { margin: 0; font: inherit; }
.x-disc__head {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: clamp(18px, 2.6vw, 34px) 0;
  border: 0;
  background: none;
  color: var(--m-white);
  text-align: left;
  cursor: pointer;
}
.x-disc__no { font-size: var(--m-fs-sm); color: var(--m-on-dark-3); font-variant-numeric: tabular-nums; }
.x-disc__title {
  font: 500 clamp(2.2rem, 1rem + 5vw, 6.2rem)/0.95 var(--m-font);
  letter-spacing: -0.045em;
  transition: transform 0.6s var(--m-ease-out), color 0.4s var(--m-ease);
}
.x-disc__plus {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--m-line-dark-strong);
  border-radius: 50%;
  transition: transform 0.5s var(--m-ease-out), background 0.3s var(--m-ease), border-color 0.3s var(--m-ease);
}
.x-disc__plus::before, .x-disc__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  margin: -0.75px 0 0 -7px;
  background: currentColor;
}
.x-disc__plus::after { transform: rotate(90deg); transition: transform 0.4s var(--m-ease-out); }
.x-disc__head:hover .x-disc__title, .x-disc__item.is-open .x-disc__title { transform: translateX(clamp(6px, 1.5vw, 24px)); }
.x-disc__item.is-open .x-disc__plus { background: var(--m-red); border-color: var(--m-red); transform: rotate(180deg); }
.x-disc__item.is-open .x-disc__plus::after { transform: rotate(0deg); }
.x-disc__head:focus-visible { outline: 2px solid var(--m-red); outline-offset: 4px; }

.x-disc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--m-ease-out); }
.x-disc__item.is-open .x-disc__panel { grid-template-rows: 1fr; }
.x-disc__inner { overflow: hidden; }
.x-disc__body {
  display: grid;
  grid-template-columns: 64px 1fr minmax(220px, 34%);
  gap: 16px clamp(20px, 4vw, 64px);
  align-items: center;
  padding-bottom: clamp(24px, 3vw, 40px);
}
.x-disc__text { grid-column: 2; margin: 0; max-width: 52ch; font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem); line-height: 1.6; color: var(--m-on-dark-2); }
.x-disc__art { grid-column: 3; position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--m-ink-2); }
@media (max-width: 760px) {
  .x-disc__head { grid-template-columns: 36px 1fr auto; }
  .x-disc__plus { width: 40px; height: 40px; }
  .x-disc__body { grid-template-columns: 1fr; }
  .x-disc__text, .x-disc__art { grid-column: 1; }
}

/* Disiplin görselleri: yalnızca CSS ile çizilen küçük hareketli sahneler */
.x-art-code { padding: 18px 20px; font: 500 0.875rem/1.7 ui-monospace, "SF Mono", Menlo, monospace; color: var(--m-on-dark-2); }
.x-art-code b { color: var(--m-red); font-weight: 500; }
.x-art-code i { font-style: normal; color: #7ee0a1; }
.x-art-code span { display: block; white-space: nowrap; overflow: hidden; width: 0; animation: xType 0.9s steps(28, end) forwards; }
.x-art-code span:nth-child(2) { animation-delay: 0.9s; }
.x-art-code span:nth-child(3) { animation-delay: 1.8s; }
.x-art-code span:nth-child(4) { animation-delay: 2.7s; }
.x-art-code span:last-child::after { content: "▍"; color: var(--m-red); animation: xBlink 1s steps(1) infinite; }
@keyframes xType { to { width: 100%; } }
@keyframes xBlink { 50% { opacity: 0; } }

/* --- Prodüksiyon: kamera vizörü ------------------------------------------ */
.x-art-lens {
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(226, 6, 18, 0.18), transparent 55%),
    radial-gradient(90% 80% at 85% 90%, rgba(59, 108, 246, 0.16), transparent 60%),
    #0d0d10;
  font: 500 0.6875rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  color: rgba(253, 253, 247, 0.82);
  letter-spacing: 0.04em;
}
/* Bulanık ışıklar (bokeh) yavaşça süzülür */
.xv-bokeh i {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0.55;
  animation: xvDrift 9s var(--m-ease-in-out) infinite alternate;
}
.xv-bokeh i:nth-child(1) { width: 26%; aspect-ratio: 1; left: 8%; top: 18%; background: rgba(226, 6, 18, 0.55); }
.xv-bokeh i:nth-child(2) { width: 16%; aspect-ratio: 1; left: 62%; top: 12%; background: rgba(245, 165, 36, 0.5); animation-delay: -3s; }
.xv-bokeh i:nth-child(3) { width: 20%; aspect-ratio: 1; left: 70%; top: 55%; background: rgba(59, 108, 246, 0.45); animation-delay: -5s; }
.xv-bokeh i:nth-child(4) { width: 12%; aspect-ratio: 1; left: 30%; top: 62%; background: rgba(253, 253, 247, 0.35); animation-delay: -1.5s; }
.xv-bokeh i:nth-child(5) { width: 9%; aspect-ratio: 1; left: 45%; top: 25%; background: rgba(253, 253, 247, 0.28); animation-delay: -7s; }
@keyframes xvDrift { from { transform: translate(0, 0) scale(1); } to { transform: translate(14px, -10px) scale(1.15); } }
/* Üçler kuralı ızgarası */
.xv-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(253, 253, 247, 0.12) 33.33%, transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(253, 253, 247, 0.12) 66.66%, transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(253, 253, 247, 0.12) 33.33%, transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(253, 253, 247, 0.12) 66.66%, transparent calc(66.66% + 0.5px));
}
/* Kadraj köşeleri */
.xv-corners i { position: absolute; width: 16px; height: 16px; border: 0 solid rgba(253, 253, 247, 0.9); }
.xv-corners i:nth-child(1) { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; }
.xv-corners i:nth-child(2) { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; }
.xv-corners i:nth-child(3) { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; }
.xv-corners i:nth-child(4) { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; }
/* REC + zaman kodu (saniye ve kare sayıları kayarak ilerler) */
.xv-rec { position: absolute; top: 16px; left: 34px; display: flex; align-items: center; gap: 6px; }
.xv-rec b { width: 7px; height: 7px; border-radius: 50%; background: var(--m-red); box-shadow: 0 0 8px rgba(226, 6, 18, 0.9); animation: xBlink 1s steps(1) infinite; }
.xv-tc { display: inline-flex; margin-left: 6px; color: var(--m-white); font-variant-numeric: tabular-nums; }
.xv-s, .xv-f { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; }
.xv-s > span, .xv-f > span { display: block; line-height: 1em; }
.xv-s > span { animation: xvSec 12s steps(12) infinite; }
.xv-f > span { animation: xvFrame 1s steps(6) infinite; }
@keyframes xvSec { to { transform: translateY(-12em); } }
@keyframes xvFrame { to { transform: translateY(-6em); } }
.xv-spec { position: absolute; top: 16px; right: 34px; color: rgba(253, 253, 247, 0.75); }
.xv-spec small { font-size: 0.8em; margin-left: 1px; }
/* Netleme karesi: daralır, yeşile döner (odak kilidi), tekrar açılır */
.xv-focus {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  aspect-ratio: 4 / 3;
  border: 1.5px solid rgba(253, 253, 247, 0.85);
  transform: translate(-50%, -50%);
  animation: xvFocus 4s var(--m-ease-in-out) infinite;
}
.xv-focus::before, .xv-focus::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; }
.xv-focus::before { width: 8px; height: 1.5px; margin: -0.75px 0 0 -4px; }
.xv-focus::after { width: 1.5px; height: 8px; margin: -4px 0 0 -0.75px; }
@keyframes xvFocus {
  0%, 18% { width: 40%; border-color: rgba(253, 253, 247, 0.6); color: rgba(253, 253, 247, 0.6); }
  38%, 78% { width: 24%; border-color: #4ade80; color: #4ade80; }
  100% { width: 40%; border-color: rgba(253, 253, 247, 0.6); color: rgba(253, 253, 247, 0.6); }
}
.xv-meta { position: absolute; left: 34px; bottom: 16px; color: rgba(253, 253, 247, 0.72); }
/* Ses seviyesi çubukları */
.xv-audio { position: absolute; right: 34px; bottom: 15px; display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.xv-audio i { width: 3px; height: 30%; border-radius: 1px; background: #4ade80; animation: xvAudio 0.9s var(--m-ease-in-out) infinite alternate; }
.xv-audio i:nth-child(2) { animation-delay: -0.2s; }
.xv-audio i:nth-child(3) { animation-delay: -0.5s; }
.xv-audio i:nth-child(4) { animation-delay: -0.1s; background: #a3e635; }
.xv-audio i:nth-child(5) { animation-delay: -0.7s; background: #a3e635; }
.xv-audio i:nth-child(6) { animation-delay: -0.35s; background: #facc15; }
.xv-audio i:nth-child(7) { animation-delay: -0.6s; background: #f5a524; }
.xv-audio i:nth-child(8) { animation-delay: -0.15s; background: var(--m-red); }
@keyframes xvAudio { from { height: 15%; } to { height: 100%; } }

/* --- Tasarım: vektör tuvali ----------------------------------------------- */
.x-art-palette { background: #121215; }
.x-art-palette .xd-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.xd-tools rect:first-child { fill: rgba(253, 253, 247, 0.06); stroke: rgba(253, 253, 247, 0.12); stroke-width: 0.6; }
.xd-tool { fill: none; stroke: rgba(253, 253, 247, 0.55); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.xd-tool--on { fill: rgba(226, 6, 18, 0.25); stroke: var(--m-red); }
.xd-board { fill: rgba(253, 253, 247, 0.03); stroke: rgba(253, 253, 247, 0.18); stroke-width: 0.6; stroke-dasharray: 2 2; }
.xd-guide { stroke: rgba(59, 108, 246, 0.6); stroke-width: 0.5; stroke-dasharray: 1.5 1.5; }
/* Kalem "m" harfini çizer */
.xd-path {
  fill: none;
  stroke: var(--m-white);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: xdDraw 7s var(--m-ease-in-out) infinite;
}
@keyframes xdDraw { 0% { stroke-dashoffset: 1; } 38%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
/* Bağlantı noktaları ve tutamaçlar çizim bitince belirir */
.xd-anchors rect { fill: #121215; stroke: #3b6cf6; stroke-width: 0.9; }
.xd-handles path { stroke: #3b6cf6; stroke-width: 0.6; fill: none; }
.xd-handles circle { fill: #3b6cf6; }
.xd-anchors, .xd-handles { opacity: 0; animation: xdShow 7s steps(1) infinite; }
@keyframes xdShow { 0%, 40% { opacity: 0; } 41%, 70% { opacity: 1; } 71%, 100% { opacity: 0; } }
/* Kırmızı nokta yerine "pıt" diye oturur */
.xd-dot { fill: var(--m-red); transform-box: fill-box; transform-origin: center; transform: scale(0); animation: xdPop 7s var(--m-ease-out) infinite; }
@keyframes xdPop { 0%, 44% { transform: scale(0); } 50% { transform: scale(1.35); } 55%, 92% { transform: scale(1); } 100% { transform: scale(0); } }
/* Yazı tipi örneği: sans ↔ serif */
.xd-aa { font-size: 15px; fill: var(--m-white); }
.xd-aa--sans { font-family: Poppins, system-ui, sans-serif; font-weight: 600; animation: xdFontA 7s steps(1) infinite; }
.xd-aa--serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; opacity: 0; animation: xdFontB 7s steps(1) infinite; }
@keyframes xdFontA { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes xdFontB { 0%, 49% { opacity: 0; } 50%, 100% { opacity: 1; } }
/* Renk örnekleri: seçim halkası gezer */
.xd-swatches circle:not(.xd-pick) { stroke: rgba(0, 0, 0, 0.4); stroke-width: 0.5; }
.xd-pick { fill: none; stroke: var(--m-white); stroke-width: 0.9; animation: xdPick 7s var(--m-ease-in-out) infinite; }
@keyframes xdPick { 0%, 20% { transform: translateX(0); } 30%, 45% { transform: translateX(20px); } 55%, 70% { transform: translateX(30px); } 80%, 100% { transform: translateX(0); } }
/* Kalem ucu (SVG içinde animateMotion ile harfin yolunu izler) */
.xd-pencil { pointer-events: none; }

.x-art-dots { background-image: radial-gradient(var(--m-on-dark-3) 1.2px, transparent 1.4px); background-size: 18px 18px; }

.x-disc__item:not(.is-open) .x-disc__art * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .x-disc__panel, .x-disc__title, .x-disc__plus { transition: none; }
  .x-disc__art *, .x-disc__art::before { animation: none !important; }
  .xd-path { stroke-dashoffset: 0; }
  .xd-dot { transform: scale(1); }
  .xd-anchors, .xd-handles { opacity: 1; }
  .xd-pencil { display: none; }
  .x-art-code span { width: 100%; }
}

/* --------------------------------------------------------------------------
   5. Ana sayfa: marka şeridi (logo ızgarasının yerine)
   -------------------------------------------------------------------------- */
.x-brands { position: relative; overflow: hidden; margin-top: clamp(24px, 4vw, 48px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.x-brands__track { display: flex; width: max-content; animation: xMarquee var(--x-brands-speed, 36s) linear infinite; }
.x-brands:hover .x-brands__track, .x-brands:focus-within .x-brands__track { animation-play-state: paused; }
.x-brands__list { display: flex; align-items: center; gap: clamp(40px, 6vw, 96px); margin: 0; padding: 0 clamp(20px, 3vw, 48px); list-style: none; }
.x-brands__list li { flex: 0 0 auto; }
.x-brands__list img {
  display: block;
  height: clamp(44px, 5vw, 72px);
  width: auto;
  max-width: 240px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1);
  opacity: 0.55;
  transition: filter 0.4s var(--m-ease), opacity 0.4s var(--m-ease), transform 0.5s var(--m-ease-out);
}
.x-brands__list li:hover img { filter: none; opacity: 1; transform: scale(1.06); }
@keyframes xMarquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .x-brands { -webkit-mask-image: none; mask-image: none; }
  .x-brands__track { animation: none; width: auto; }
  .x-brands__list { flex-wrap: wrap; justify-content: center; row-gap: 24px; }
  .x-brands__list[aria-hidden="true"], .x-brands__list li[aria-hidden="true"] { display: none; }
}

/* --------------------------------------------------------------------------
   6. Panelden yapıştırılan zengin içerik sayfayı taşırmasın
      (başka sitelerden kopyalanan metinlerde gömülü sabit genişlik / sütun stilleri olabiliyor)
   -------------------------------------------------------------------------- */
.rich-content { min-width: 0; overflow-wrap: anywhere; }
.rich-content [style*="width"] { max-width: 100% !important; }
.rich-content [style*="flex"] { flex: 1 1 auto !important; }
.rich-content img, .rich-content video, .rich-content iframe, .rich-content table { max-width: 100%; }
.rich-content img, .rich-content video { height: auto; }
/* Izgara sütunları içerikteki sabit genişlikler yüzünden büyümesin */
.m-split > *, .m-grid > * { min-width: 0; }

/* Jeneriğin sonunda logo */
.x-credits__logo { display: inline-block; width: clamp(220px, 40vw, 520px); height: auto; }
