/* SF AI Robot PoC — koyu sinematik zemin, tek aksan #c2410c */
:root {
  /* --- KOYU TEMA (varsayilan) --- */
  --bg: #0b0b0a;   --bgRGB: 11,11,10;
  --fg: #efefeb;   --fgRGB: 239,239,235;
  --dim: #a3a39c;
  --accent: #c2410c;
  --node: #e9e9e4;        /* 3B cizgi/dugum rengi */
  --rim:  #d9d9d3;        /* portal metal halkasi */
  --mono: "SF Mono", "JetBrains Mono", Monaco, monospace;
}

/* --- ACIK TEMA --- */
:root[data-theme="light"] {
  --bg: #f5f5f2;   --bgRGB: 245,245,242;
  --fg: #141410;   --fgRGB: 20,20,16;
  --dim: #57534e;
  --node: #3a3a34;
  --rim:  #7a7a72;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--bg); color: var(--fg);
  font-family: -apple-system, "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  height: 650vh;                 /* kisa sinematik akis: hero + 10 cozum + final */
  overflow-x: hidden;
}
body.robot-hover { cursor: grab; }
body.robot-dragging,
body.robot-dragging * { cursor: grabbing !important; user-select: none; }
.mono { font-family: var(--mono); }
.serif { font-family: "Tiempos Headline", Georgia, serif; font-weight: 400; }

#stage {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 6; pointer-events: none;      /* robot yazinin onunden gecebilir */
  image-rendering: auto;
}

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; }
.mark {
  width: 32px; height: 32px; border-radius: 10px; background: #0c0a09; color: #fff;
  border: 1px solid rgba(255,255,255,.24);
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.theme-btn {
  width: 34px; height: 34px; border-radius: 9999px; margin-left: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--fg); cursor: pointer;
  border: 1px solid rgba(var(--fgRGB),.22);
  transition: background-color .2s ease, border-color .2s ease;
}
.theme-btn:hover { background: rgba(var(--fgRGB),.08); border-color: rgba(var(--fgRGB),.4); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .ic-sun { display: none; }
:root[data-theme="light"] .theme-btn .ic-sun { display: block; }
:root[data-theme="light"] .theme-btn .ic-moon { display: none; }
.bar-right { display: inline-flex; align-items: center; }

.explore-btn {
  padding: 9px 13px; border-radius: 3px;
  border: 1px solid rgba(var(--fgRGB),.22); background: rgba(var(--bgRGB),.7); color: var(--fg);
  font-size: 10px; letter-spacing: .12em; cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.explore-btn:hover, .explore-btn[aria-expanded="true"] { border-color: var(--accent); background: rgba(var(--fgRGB),.07); }
.explore-btn span { display: inline-block; margin-left: 5px; color: var(--accent); transition: transform .25s ease; }
.explore-btn[aria-expanded="true"] span { transform: rotate(45deg); }
.explore-menu {
  position: fixed; z-index: 14; top: 68px; right: 26px; width: min(390px, calc(100vw - 32px));
  padding: 22px; border: 1px solid rgba(var(--fgRGB),.18); border-radius: 3px;
  background: rgba(var(--bgRGB),.96); color: var(--fg);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.985); transform-origin: top right;
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.explore-menu.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.explore-kicker { color: var(--accent); font-size: 9.5px; letter-spacing: .17em; margin-bottom: 14px; }
.explore-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.explore-head > p { font-size: 25px; line-height: 1.08; font-weight: 750; letter-spacing: -.035em; }
.explore-close { border: 0; background: transparent; color: var(--dim); font-size: 26px; line-height: .8; cursor: pointer; }
.explore-links { border-top: 1px solid rgba(var(--fgRGB),.14); }
.explore-links a {
  display: grid; grid-template-columns: 28px 1fr; gap: 3px 10px; padding: 13px 0;
  color: var(--fg); text-decoration: none; border-bottom: 1px solid rgba(var(--fgRGB),.14);
}
.explore-links a > span { grid-row: span 2; color: var(--accent); font-size: 10px; padding-top: 3px; }
.explore-links strong { font-size: 13px; font-weight: 650; }
.explore-links em { color: var(--dim); font-size: 11px; font-style: normal; }
.explore-links a:hover strong { color: var(--accent); }
.explore-cta { display: block; margin-top: 18px; text-align: center; }

.layer {
  position: fixed; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 min(7vw, 96px);
  will-change: transform, opacity;
}
.oai-badge {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 9px;
  margin-bottom: 19px; padding: 11px 17px 11px 14px;
  border: 1px solid rgba(12,10,9,.1); border-radius: 9999px;
  color: #0c0a09; background: #fff; font-size: 13px; font-weight: 750;
  box-shadow: none;
}
.oai-badge .oai-logo {
  width: 28px; height: 28px; flex: 0 0 auto;
}
.eyebrow { font-size: 12px; letter-spacing: .22em; color: var(--dim); margin-bottom: 24px; }
.eyebrow-mobile { display: none; }
.mega {
  font-size: clamp(2.6rem, 8.5vw, 7.5rem);
  line-height: 1.02; letter-spacing: -.05em; font-weight: 800;
  max-width: 14ch;
}
.lede { color: var(--dim); max-width: 44ch; margin-top: 26px; font-size: clamp(.95rem, 1.2vw, 1.1rem); line-height: 1.6; }
.ctas { margin-top: 30px; }
.btn {
  display: inline-block; background: var(--fg); color: var(--bg);
  border-radius: 9999px; padding: 13px 26px; font-weight: 600; font-size: 14px; text-decoration: none;
}
.btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.btn:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px rgba(var(--fgRGB),.25); }
.btn.ghost:hover { color: var(--accent); }
.hint {
  position: absolute; bottom: 30px; left: min(7vw, 96px);
  font-size: 10.5px; letter-spacing: .24em; color: var(--dim);
  display: inline-flex; align-items: center; gap: 12px;
}
.hint-line { width: 46px; height: 1px; background: var(--accent); display: inline-block; }

.layer-sec { opacity: 0; visibility: hidden; }
.sec-eyebrow { font-size: 11.5px; letter-spacing: .22em; color: var(--dim); margin-bottom: 22px;
  border-top: 1px solid rgba(var(--fgRGB),.14); padding-top: 20px; max-width: 420px; }
.sec-eyebrow .sn { color: var(--accent); font-weight: 600; }
.sol-list { list-style: none; margin-top: 30px; color: var(--dim); font-size: 12.5px; letter-spacing: .08em; }
.sol-list li { padding: 10px 0; border-bottom: 1px solid rgba(var(--fgRGB),.10); max-width: 380px; }
.sol-list .more { color: var(--accent); border-bottom: 0; }
.sol-list li, .proc-list li { transition: color .35s ease, border-color .35s ease; }
.sol-list li.on { color: var(--fg); border-color: rgba(var(--fgRGB),.3); }

.proc-list { list-style: none; margin-top: 30px; counter-reset: n; }
.proc-list li {
  padding: 13px 0; border-bottom: 1px solid rgba(var(--fgRGB),.10);
  max-width: 430px; color: var(--dim); font-size: 13px; letter-spacing: .06em;
  display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px;
}
.proc-list .pn { color: var(--accent); grid-row: span 2; }
.proc-list em { font-style: normal; font-size: 11px; color: #6f6f68; letter-spacing: .04em; }
.proc-list li.on { color: var(--fg); border-color: rgba(var(--fgRGB),.3); }
.proc-list li.on em { color: var(--dim); }
.layer-sec .btn { margin-top: 28px; align-self: flex-start; }
.layer-sec .lede { margin-top: 18px; max-width: 38ch; }
.vis-list li { max-width: 400px; }

/* FINAL: CTA kahraman, robot geri planda */
.layer-final { opacity: 0; visibility: hidden; }
.final-h { max-width: 20ch; font-size: clamp(2.3rem, 5vw, 4.75rem); line-height: 1.03; }
.final-h .serif { color: var(--accent); }
.layer-final .ctas { margin-top: 38px; }
.layer-final .btn { background: var(--accent); color: #fff; }
.final-meta { margin-top: 26px; font-size: 11px; letter-spacing: .16em; color: var(--dim); }
.final-meta::before { content: ""; display: inline-block; width: 18px; height: 1px; margin-right: 9px; vertical-align: middle; background: var(--accent); }

/* portal yolculugu: HTML referansini kaybettiren perde (canvas ALTINDA, icerik USTUNDE) */
.veil {
  position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 62% 46%, rgba(194,65,12,.11), transparent 34%),
    radial-gradient(circle at 62% 46%,
    rgba(var(--bgRGB),.55) 0%, rgba(var(--bgRGB),.88) 38%, rgb(var(--bgRGB)) 72%);
}

.dbg {
  position: fixed; right: 14px; bottom: 14px; z-index: 9;
  background: rgba(10,10,9,.88); border: 1px solid rgba(var(--fgRGB),.18);
  border-radius: 10px; padding: 10px 13px; font-size: 10.5px; line-height: 1.7; color: var(--dim);
  white-space: pre;
}

/* Sinematik yol yoksa (reduced-motion veya WebGL yok): normal akan sayfa */
html.flat body { height: auto; }
html.flat #stage { display: none; }
html.flat .layer {
  position: relative; inset: auto; min-height: 92vh;
  opacity: 1 !important; visibility: visible !important; transform: none !important;
}
html.flat .hint { display: none; }

/* ============ COZUM SATIRLARI (tiklanabilir, 10 adet) ============ */
.sol-list li {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px;
  align-items: baseline; cursor: pointer; max-width: 520px;
  transition: color .25s ease, border-color .25s ease;
}
.sol-list li .sn2 { color: var(--dim); }
.sol-list li .nm  { color: var(--fg); font-size: 13.5px; letter-spacing: .04em; }
.sol-list li .ar  { color: var(--dim); font-size: 11px; transition: transform .25s ease, color .25s ease; }
.sol-list li:hover .nm,
.sol-list li.on .nm { color: var(--accent); }
.sol-list li:hover .ar { color: var(--accent); transform: translateX(4px); }
.sol-list li:hover, .sol-list li.on { border-color: rgba(var(--fgRGB), .3); }
@media (prefers-reduced-motion: reduce) { .sol-list li:hover .ar { transform: none; } }

/* ============ VAKA MODALI ============ */
.case-modal {
  position: fixed; inset: 0; z-index: 20;
  display: none; align-items: flex-start; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
  background: rgba(4,4,3,.74);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.case-modal.open { display: flex; }
.case-modal.open .case-panel { animation: caseIn .3s cubic-bezier(.2,.7,.2,1) both; }
@keyframes caseIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.case-panel {
  position: relative; width: 100%; max-width: 760px; margin: auto;
  background: var(--bg); border: 1px solid rgba(var(--fgRGB), .14);
  border-radius: 26px; overflow: hidden;
}
.case-video-wrap { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.case-video { width: 100%; height: 100%; display: block; object-fit: cover; background: #000; }
.case-copy { padding: 28px 30px 30px; }
.case-tag { font-size: 10.5px; letter-spacing: .2em; color: var(--dim); margin-bottom: 10px; }
.case-copy h3 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); letter-spacing: -.03em; line-height: 1.15; margin-bottom: 12px; }
.case-intro { color: var(--dim); font-size: 14px; line-height: 1.65; max-width: 60ch; }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.case-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 36px; height: 36px; border-radius: 9999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,4,3,.6); color: #fff; border: 1px solid rgba(255,255,255,.22);
  font-size: 15px; line-height: 1;
}
.case-close:hover { background: var(--accent); border-color: var(--accent); }
@media (max-width: 640px) { .case-copy { padding: 22px 20px 24px; } .case-panel { border-radius: 18px; } }
@media (max-width: 700px) {
  .bar { padding: 15px 16px; }
  .explore-btn { margin-left: 0; }
  .theme-btn { margin-left: 8px; }
  .explore-menu { top: 62px; right: 16px; padding: 19px; }
  .oai-badge { font-size: 12px; padding: 9px 14px 9px 11px; margin-bottom: 15px; }
  .oai-badge .oai-logo { width: 24px; height: 24px; }
  .eyebrow { font-size: 9.5px; letter-spacing: .16em; }
  .eyebrow-wide { display: none; }
  .eyebrow-mobile { display: inline; }
  .final-h { font-size: clamp(2.15rem, 11vw, 3.2rem); max-width: 12ch; }
}
@media (prefers-reduced-motion: reduce) {
  .explore-menu, .explore-btn span { transition: none; }
}

/* duz modda (WebGL yok / reduced-motion) modal yine calisir */
html.flat .case-modal { z-index: 60; }
