:root {
  --paper: #f3f1ec;
  --paper-line: #d9d4ca;
  --ink: #141414;
  --ink-mute: #6f6a62;
  --night: #0d0d0e;
  --night-line: #26262a;
  --snow: #ecebe7;
  --snow-mute: #8d8b86;
  --bronze: #a87a52;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --ease: cubic-bezier(.76, 0, .24, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(20px, 3.4vw, 52px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--night);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============ AÇILIŞ ============ */
.intro {
  position: fixed; inset: 0; z-index: 100; background: var(--night);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  transition: transform 1.1s var(--ease) .1s;
}
.intro-mark { display: flex; overflow: hidden; color: var(--snow); font-weight: 300; font-size: clamp(3rem, 8vw, 6rem); letter-spacing: .12em; }
.intro-letter { display: inline-block; transform: translateY(110%); animation: rise .9s var(--ease-out) forwards; }
.intro-letter:nth-child(2) { animation-delay: .08s; }
.intro-letter:nth-child(3) { animation-delay: .16s; }
.intro-bar { width: 140px; height: 1px; background: var(--night-line); overflow: hidden; }
.intro-bar span { display: block; height: 100%; background: var(--bronze); transform: scaleX(0); transform-origin: left; animation: load 1.1s var(--ease) .2s forwards; }
body.is-ready .intro { transform: translateY(-100%); }
@keyframes rise { to { transform: none; } }
@keyframes load { to { transform: scaleX(1); } }

/* ============ ÜST / ALT BAR ============ */
.topbar, .bottombar {
  position: fixed; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px var(--pad); color: #fff; mix-blend-mode: difference;
  opacity: 0; transition: opacity 1s ease 1.3s;
}
.topbar { top: 0; }
.bottombar { bottom: 0; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
body.is-ready .topbar, body.is-ready .bottombar { opacity: 1; }
.brand { display: flex; align-items: center; gap: 10px; justify-self: start; }
.brand-mark { border: 1px solid currentColor; padding: 5px 8px 4px; font-weight: 500; font-size: .82rem; letter-spacing: .14em; }
.brand-name { font-weight: 300; font-size: 1rem; letter-spacing: .04em; }
.topbar-tag { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; opacity: .8; }
.topbar-mail { justify-self: end; display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 400; position: relative; }
.topbar-mail::after { content: ""; position: absolute; left: 18px; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.topbar-mail:hover::after { transform: scaleX(1); transform-origin: left; }
.mail-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bottombar span:last-child { justify-self: end; }
.bottombar-mid { opacity: .7; }

/* ============ BÖLÜNMÜŞ EKRAN ============ */
.split { position: relative; display: flex; height: 100vh; height: 100svh; }
.panel {
  position: relative; flex: 1 1 50%; overflow: hidden;
  display: flex; align-items: center;
  padding: 110px var(--pad) 90px;
  transition: flex-basis 1s var(--ease);
}
.panel-arch { background: var(--paper); color: var(--ink); }
.panel-soft { background: var(--night); color: var(--snow); }
@media (hover: hover) and (min-width: 901px) {
  .split:has(.panel-arch:hover) .panel-arch,
  .split:has(.panel-soft:hover) .panel-soft { flex-basis: 58%; }
  .split:has(.panel-arch:hover) .panel-soft,
  .split:has(.panel-soft:hover) .panel-arch { flex-basis: 42%; }
}

/* açılışta paneller perdelerden açılır */
.panel-arch { clip-path: inset(0 100% 0 0); }
.panel-soft { clip-path: inset(0 0 0 100%); }
body.is-ready .panel { clip-path: inset(0 0 0 0); transition: clip-path 1.3s var(--ease) .35s, flex-basis 1s var(--ease); }

.panel-inner { position: relative; z-index: 2; width: 100%; max-width: 440px; }

.label { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: clamp(18px, 3vh, 34px); }
.panel-soft .label { color: var(--snow-mute); }
.label-num { color: var(--bronze); }
.label-line { width: 0; height: 1px; background: currentColor; transition: width 1s var(--ease) 1.5s; }
body.is-ready .label-line { width: 48px; }

.title { font-weight: 200; font-size: clamp(3.2rem, 6.6vw, 7.4rem); line-height: .9; letter-spacing: -.045em; margin-bottom: clamp(16px, 3vh, 30px); margin-left: -.05em; }
.desc { font-size: clamp(.95rem, 1.15vw, 1.08rem); font-weight: 300; line-height: 1.55; color: var(--ink-mute); max-width: 400px; margin-bottom: clamp(22px, 4vh, 40px); }
.panel-soft .desc { color: var(--snow-mute); }

/* satır satır yükselen metin */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); }
body.is-ready .reveal-line > span { transform: none; }
body.is-ready .title .reveal-line > span { transition-delay: 1.05s; }
body.is-ready .desc .reveal-line:nth-child(1) > span { transition-delay: 1.2s; }
body.is-ready .desc .reveal-line:nth-child(2) > span { transition-delay: 1.28s; }

.services { border-top: 1px solid var(--paper-line); max-width: 360px; }
.panel-soft .services { border-color: var(--night-line); }
.services li {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--paper-line); font-size: .92rem; font-weight: 400;
  opacity: 0; transform: translateY(12px); transition: opacity .8s ease, transform .8s var(--ease-out), padding .4s var(--ease);
}
.panel-soft .services li { border-color: var(--night-line); }
.services li::after { content: "→"; font-size: .85rem; color: var(--bronze); opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s var(--ease); }
.services li:hover { padding-left: 8px; }
.services li:hover::after { opacity: 1; transform: none; }
body.is-ready .services li { opacity: 1; transform: none; }
body.is-ready .services li:nth-child(1) { transition-delay: 1.4s; }
body.is-ready .services li:nth-child(2) { transition-delay: 1.48s; }
body.is-ready .services li:nth-child(3) { transition-delay: 1.56s; }
body.is-ready .services li:nth-child(4) { transition-delay: 1.64s; }
body.is-ready .services li:hover { transition-delay: 0s; }

.soon { display: flex; align-items: center; gap: 10px; margin-top: clamp(18px, 3vh, 30px); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); opacity: 0; transition: opacity 1s ease 1.8s; }
.panel-soft .soon { color: var(--snow-mute); }
body.is-ready .soon { opacity: 1; }
.pulse { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--bronze); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--bronze); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }

/* ============ MİMARİ ÇİZİM ============ */
.art { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: transform 1.2s var(--ease-out), opacity .8s; }
.art-arch { width: 118%; height: 100%; top: auto; left: auto; right: -12%; bottom: 30px; opacity: .42; }
@media (hover: hover) and (min-width: 901px) { .panel-arch:hover .art-arch { opacity: .62; } }
.art-arch line, .art-arch path { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.art-arch .axis line { stroke: var(--bronze); stroke-dasharray: 6 6; opacity: .55; }
.art-arch .axis circle { fill: none; stroke: var(--bronze); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
.art-arch .axis text, .art-arch .dims text { font-family: var(--mono); font-size: 10px; fill: var(--ink-mute); text-anchor: middle; }
.art-arch .axis text { fill: var(--bronze); }
.art-arch .dims path { stroke: var(--ink-mute); }
.art-arch .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.art-arch .axis line.draw { stroke-dasharray: 1; }
body.is-ready .art-arch .draw { animation: draw 2.4s var(--ease) forwards; }
body.is-ready .art-arch .axis .draw { animation-delay: 1s; }
body.is-ready .art-arch .building .draw:nth-child(1) { animation-delay: 1.2s; }
body.is-ready .art-arch .building .draw:nth-child(2) { animation-delay: 1.35s; }
body.is-ready .art-arch .building .draw:nth-child(3) { animation-delay: 1.5s; }
body.is-ready .art-arch .building .draw:nth-child(n+4) { animation-delay: 1.7s; }
body.is-ready .art-arch .building .draw:nth-child(n+6) { animation-delay: 1.9s; animation-duration: 2.8s; }
body.is-ready .art-arch .dims .draw { animation-delay: 2.4s; }
.art-arch .axis circle, .art-arch text { opacity: 0; transition: opacity 1s ease 2.6s; }
body.is-ready .art-arch .axis circle { opacity: .7; }
body.is-ready .art-arch text { opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ============ KOD PENCERESİ ============ */
.art-soft { display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 var(--pad) 96px; }
.code-window {
  width: min(360px, 40%); border: 1px solid var(--night-line); border-radius: 8px; background: rgba(255,255,255,.015);
  opacity: 0; transform: translateY(20px); transition: opacity 1.2s ease 1.4s, transform 1.2s var(--ease-out) 1.4s;
}
body.is-ready .code-window { opacity: .7; transform: none; }
.panel-soft:hover .code-window { opacity: 1; }
.code-head { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--night-line); }
.code-head span { width: 8px; height: 8px; border-radius: 50%; background: var(--night-line); }
.code-head em { margin-left: auto; font-family: var(--mono); font-style: normal; font-size: .68rem; color: var(--snow-mute); }
.code { font-family: var(--mono); font-size: clamp(.6rem, .72vw, .74rem); line-height: 1.9; color: var(--snow-mute); padding: 16px 18px 20px; min-height: 13.5em; white-space: pre; overflow: hidden; }
.code .k { color: var(--bronze); }
.code .s { color: #c9c4b8; }
.code .c { color: #55534f; }
.code .caret { display: inline-block; width: .55em; height: 1.1em; background: var(--bronze); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ============ ORTA ÇİZGİ ============ */
.divider { position: absolute; top: 0; bottom: 0; left: 50%; z-index: 5; width: 0; pointer-events: none; transition: left 1s var(--ease); }
.split:has(.panel-arch:hover) .divider { left: 58%; }
.split:has(.panel-soft:hover) .divider { left: 42%; }
.divider-line { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--bronze); opacity: .6; transform: scaleY(0); transform-origin: top; transition: transform 1.4s var(--ease) .2s; }
body.is-ready .divider-line { transform: scaleY(1); }
.divider-badge {
  position: absolute; top: 50%; left: 0; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--bronze);
  background: var(--night); color: var(--bronze); font-weight: 300; font-size: 1.1rem;
  transform: scale(0); transition: transform .8s var(--ease-out) 1.5s;
}
body.is-ready .divider-badge { transform: scale(1); }

/* ============ MOBİL ============ */
@media (max-width: 900px) {
  body { overflow: auto; }
  .split { flex-direction: column; height: auto; }
  .panel { min-height: 100svh; flex-basis: auto; padding: 100px var(--pad) 80px; align-items: flex-end; }
  .panel-arch { clip-path: inset(0 0 100% 0); }
  .panel-soft { clip-path: inset(100% 0 0 0); }
  .divider { display: none; }
  .panel { flex-direction: column; justify-content: center; align-items: stretch; padding-top: 84px; }
  .art { position: relative; inset: auto; flex: none; margin-bottom: 28px; }
  .art-arch { width: 100%; height: 44svh; right: auto; bottom: auto; opacity: .6; }
  .art-soft { display: flex; justify-content: flex-start; padding: 0; }
  .code-window { width: 100%; max-width: 460px; }
  body.is-ready .code-window { opacity: .6; }
  .topbar { grid-template-columns: 1fr auto; position: absolute; }
  .topbar-tag { display: none; }
  .topbar-mail { font-size: .78rem; }
  .bottombar { position: static; mix-blend-mode: normal; background: var(--night); color: var(--snow-mute); grid-template-columns: 1fr 1fr; gap: 6px; }
  .bottombar-mid { display: none; }
}
@media (max-width: 480px) {
  .topbar-mail .mail-dot { display: none; }
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* diğer panel genişleyince kod penceresi geri çekilir */
@media (hover: hover) and (min-width: 901px) {
  .split:has(.panel-arch:hover) .code-window { opacity: .15; transform: translateX(40px); transition-delay: 0s; }
}

/* ============ 3B TEL MODEL ============ */
.art-arch .model line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.art-arch .model line.cut { stroke: var(--bronze); stroke-width: 1.4; }
.art-arch .model line.hatch { stroke: var(--ink-mute); stroke-width: .8; }
.art-arch .model line.hidden { stroke: var(--ink-mute); stroke-dasharray: 3 4; }
.art-arch .phase-label { font-family: var(--mono); font-size: 10px; letter-spacing: .25em; fill: var(--bronze); text-anchor: start; transition: opacity .6s ease; }
.art-arch .axis, .art-arch .dims { transition: opacity 1.2s ease; }
.art-arch.is-persp .axis, .art-arch.is-persp .dims { opacity: 0 !important; }
