/* ═════════════════ HAREKET SİSTEMİ ═════════════════
   Başlangıç (gizli) durumlar yalnızca html.motion varken geçerlidir;
   JS yoksa ya da "hareketi azalt" seçiliyse her şey doğrudan görünür. */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 0.35s ease both vt-out; }
  ::view-transition-new(root) { animation: 0.5s ease both vt-in; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; background: var(--signal); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.site-header { transition: translate 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.site-header.is-hidden { translate: 0 -140%; }

/* Kelime kelime yükselen başlıklar */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.wi { display: inline-block; }
html.motion .hero h1 .wi { animation: rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--intro, 0s) + 0.55s + var(--i, 0) * 0.08s); }
html.motion [data-reveal="words"] .wi { transform: translateY(115%); transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(var(--i, 0) * 0.07s); }
html.motion [data-reveal="words"].in .wi { transform: none; }
@keyframes rise { from { transform: translateY(115%); } }

/* Hero: perde açılışı, paralaks, slayt geçişi */
.hero__bg { top: -8%; bottom: auto; height: 116%; translate: 0 calc(var(--hp, 0) * 9%); }
.hero__inner { translate: 0 calc(var(--hp, 0) * -48px); opacity: calc(1 - var(--hp, 0) * 1.7); }
html.motion .hero::after { content: ""; position: absolute; inset: 0; z-index: 3; background: var(--night); transform-origin: 50% 0; pointer-events: none; animation: curtain 1.2s cubic-bezier(0.77, 0, 0.18, 1) both; animation-delay: calc(var(--intro, 0s) + 0.1s); }
@keyframes curtain { to { transform: scaleY(0); } }
html.motion .hero .eyebrow, html.motion .hero__lead, html.motion .hero .hero__actions, html.motion .hero__meta, html.motion .hero__logos, html.motion .hero__steps { animation: fade-up 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--intro, 0s) + 1.15s); }
@keyframes fade-up { from { opacity: 0; translate: 0 22px; } }
.hero--slides .hero__bg { opacity: 0; animation: none; transition: opacity 1.4s ease; }
.hero--slides .hero__bg.is-active { opacity: 1; animation: hero-drift 9.5s ease-out both; }
.hero__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; justify-items: end; }
.hero__steps button { display: flex; align-items: center; gap: 0.8rem; padding: 0.3rem 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: var(--step--1); color: color-mix(in srgb, var(--white) 58%, transparent); transition: color 0.3s; }
.hero__steps button:hover, .hero__steps button.is-active { color: var(--white); }
.hero__steps i { position: relative; overflow: hidden; width: 3.5rem; height: 2px; background: color-mix(in srgb, var(--white) 30%, transparent); }
.hero__steps i::after { content: ""; position: absolute; inset: 0; background: var(--signal); transform: scaleX(0); transform-origin: left; }
.hero__steps button.is-active i::after { transform: scaleX(1); animation: step-fill 6.5s linear both; }
@keyframes step-fill { from { transform: scaleX(0); } }
@media (max-width: 860px) { .hero__steps { justify-items: start; grid-template-columns: 1fr 1fr; column-gap: var(--space-3); } }

/* Görününce açılanlar */
html.motion [data-reveal="up"] { opacity: 0; translate: 0 36px; transition: opacity 0.9s ease, translate 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
html.motion [data-reveal="up"].in { opacity: 1; translate: 0 0; }
html.motion [data-reveal="clip"] img { clip-path: inset(0 0 100% 0); scale: 1.18; transition: clip-path 1.25s cubic-bezier(0.77, 0, 0.18, 1), scale 1.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
html.motion [data-reveal="clip"].in img { clip-path: inset(0); scale: 1; }
html.motion [data-stagger] > * { opacity: 0; translate: 0 26px; transition: opacity 0.8s ease, translate 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
html.motion [data-stagger].in > * { opacity: 1; translate: 0 0; }
html.motion .steps[data-stagger] > li { transition: opacity 0.8s ease, translate 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), padding-left 0.2s; }

/* Kelime kelime aydınlanan paragraf */
.intro { padding-block: clamp(5rem, 3rem + 8vw, 9rem); }
.intro__label { margin-bottom: var(--space-3); }
.intro__text { max-width: 34ch; margin: 0 0 var(--space-4); font-size: clamp(1.6rem, 0.9rem + 2.6vw, 3.1rem); line-height: 1.22; letter-spacing: -0.025em; color: var(--ink); }
html.motion .sw { opacity: 0.16; transition: opacity 0.4s; }
html.motion .sw.is-lit { opacity: 1; }

/* Kayan büyük yazı: kaydırmayla yatay hareket */
.marquee { overflow: hidden; padding-block: var(--space-4); }
.marquee__row { display: flex; width: max-content; gap: 3rem; margin: 0; font-size: clamp(3rem, 1.5rem + 6vw, 8rem); font-weight: 300; line-height: 1.15; letter-spacing: -0.03em; white-space: nowrap; color: var(--ink); translate: calc(var(--mp, 0.5) * -40%) 0; }
.marquee__row--b { color: transparent; -webkit-text-stroke: 1px var(--ink); translate: calc((var(--mp, 0.5) - 1) * 40%) 0; }
.marquee__row span::after { content: "—"; margin-left: 3rem; }

/* Sabitlenen hizmet bölümü: kart kaydırdıkça tam ekrana büyür */
.svc__tab { position: relative; }
.svc__tab::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--tp, 0) * 100%); background: var(--signal); }
.svc:not(.is-scrolly) .svc__tab::after { display: none; }
.svc.is-scrolly { height: 430svh; padding: 0; }
.svc.is-scrolly .svc__stick { position: sticky; top: 0; height: 100svh; overflow: hidden; padding: calc((1 - var(--e, 0)) * 6rem) calc((1 - var(--e, 0)) * 0.5rem) calc((1 - var(--e, 0)) * 0.75rem); }
.svc.is-scrolly .svc__stick > .wrap { width: 100%; max-width: none; height: 100%; }
.svc.is-scrolly .svc__card { height: 100%; min-height: 0; border-radius: calc((1 - var(--e, 0)) * var(--radius-lg)); padding-inline: clamp(1.25rem, 4vw, 3.5rem); padding-bottom: clamp(1.5rem, 5svh, 3.5rem); }
.svc.is-scrolly .svc__tab.is-active { border-bottom-color: color-mix(in srgb, var(--white) 38%, transparent); }
.svc.is-scrolly .svc__top h2 { font-size: var(--step-4); }
.svc.is-scrolly .svc__top, .svc.is-scrolly .svc__tabs { opacity: calc(0.35 + var(--e, 0) * 0.65); }

/* Koordinat bloğu: koyu metin + paralaks fotoğraf */
.geo { padding: 0; background: var(--night); color: color-mix(in srgb, var(--white) 82%, transparent); }
.geo__grid { display: grid; grid-template-columns: 1fr 1fr; min-height: min(100svh, 54rem); }
.geo__text { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-5); padding: clamp(2rem, 6vw, 6rem); }
.geo .eyebrow { color: color-mix(in srgb, var(--white) 60%, transparent); }
.geo__coords { margin: 0; font-family: var(--font-mono); font-size: clamp(1.9rem, 1rem + 3.4vw, 4.2rem); line-height: 1.15; letter-spacing: -0.02em; color: var(--white); }
.geo__text p:not(.geo__coords):not(.eyebrow) { max-width: 38ch; }
.geo .btn--ghost { align-self: flex-start; color: var(--white); border-color: color-mix(in srgb, var(--white) 70%, transparent); }
.geo .btn--ghost:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.geo__media { position: relative; overflow: hidden; min-height: 28rem; }
.geo__media img { position: absolute; left: 0; top: -9%; width: 100%; height: 118%; object-fit: cover; translate: 0 calc(var(--pp, 0) * -7%); }
@media (max-width: 860px) { .geo__grid { grid-template-columns: 1fr; } .geo__media { min-height: 24rem; order: -1; } }

/* ── Açılış: lazer çizgisi logoyu soldan sağa açar (oturum başına bir kez) ── */
.intro-screen { display: none; }
html.intro { --intro: 1.9s; }
html.intro .intro-screen { display: grid; place-items: center; position: fixed; inset: 0; z-index: 200; background: var(--paper); pointer-events: none; animation: intro-out 0.9s cubic-bezier(0.77, 0, 0.18, 1) 1.75s forwards; }
.intro-logo { position: relative; width: min(62vw, 420px); }
.intro-logo img { width: 100%; height: auto; clip-path: inset(0 100% 0 0); animation: intro-reveal 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.35s forwards; }
.intro-line { position: absolute; top: -28px; bottom: -28px; left: 0; width: 2px; background: #fff3e0; box-shadow: 0 0 6px 1px #ffb27a, 0 0 22px 5px color-mix(in srgb, var(--signal) 60%, transparent); animation: intro-scan 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.35s both; }
@keyframes intro-reveal { to { clip-path: inset(0 0 0 0); } }
@keyframes intro-scan { from { left: 0; opacity: 1; } 90% { opacity: 1; } to { left: 100%; opacity: 0; } }
@keyframes intro-out { to { translate: 0 -100%; visibility: hidden; } }

/* ── Teknik sahneler: kaydırınca bükülen sac, sarılan halka ── */
.scene { padding-block: var(--space-6); background: var(--night); color: color-mix(in srgb, var(--white) 82%, transparent); }
.scene h2 { color: var(--white); }
.scene .section-head__no { color: color-mix(in srgb, var(--white) 65%, transparent); }
.scene__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--space-5); align-items: center; }
.scene__read { display: flex; align-items: baseline; gap: var(--space-3); margin: var(--space-3) 0 0; font-family: var(--font-mono); color: var(--white); }
.scene__num { font-size: clamp(3rem, 1.5rem + 6vw, 7rem); line-height: 1; letter-spacing: -0.04em; min-width: 3.4ch; }
.scene__unit { font-size: var(--step-1); color: color-mix(in srgb, var(--white) 60%, transparent); }
.scene .chips { margin: var(--space-3) 0 0; }
.scene .chips li { border-color: color-mix(in srgb, var(--white) 35%, transparent); color: color-mix(in srgb, var(--white) 55%, transparent); transition: color 0.3s, border-color 0.3s, background 0.3s; }
.scene .chips li.is-on { color: var(--white); border-color: var(--signal); background: var(--signal); }
.scene__art { margin: 0; }
.scene__art svg { display: block; width: 100%; height: auto; max-height: 76svh; overflow: visible; }
.s-body { fill: color-mix(in srgb, var(--white) 7%, transparent); stroke: color-mix(in srgb, var(--white) 70%, transparent); stroke-width: 1.6; stroke-linejoin: round; }
.s-axis { stroke: color-mix(in srgb, var(--white) 22%, transparent); stroke-width: 1; stroke-dasharray: 3 7; }
.s-sheet { fill: none; stroke: var(--signal); stroke-width: 7; stroke-linejoin: round; stroke-linecap: butt; }
.s-node { fill: #fff3e0; }
.s-mark { stroke: color-mix(in srgb, var(--white) 55%, transparent); stroke-width: 2; }
.scene.is-scrolly { height: 340svh; padding: 0; }
.scene.is-scrolly .scene__stick { position: sticky; top: 0; display: flex; align-items: center; height: 100svh; padding-top: calc(var(--header-h) + 1rem); }
.scene.is-scrolly .scene__grid { width: min(100% - 2rem, var(--wrap)); }
@media (max-width: 860px) { .scene__grid { grid-template-columns: 1fr; gap: var(--space-4); } }

/* ── Kıvılcım tuvali ve lazer noktası imleci ── */
.sparks { position: fixed; inset: 0; z-index: 45; width: 100%; height: 100%; pointer-events: none; }
@media (pointer: fine) {
  html.has-cursor .cursor-dot, html.has-cursor .cursor-ring { opacity: 1; }
}
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 300; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.3s, width 0.25s, height 0.25s, background 0.25s, border-color 0.25s; }
.cursor-dot { width: 7px; height: 7px; background: #ffb27a; box-shadow: 0 0 10px 2px color-mix(in srgb, var(--signal) 70%, transparent); }
.cursor-ring { width: 34px; height: 34px; border: 1.5px solid color-mix(in srgb, var(--signal) 80%, transparent); }
html.cursor-hot .cursor-ring { width: 58px; height: 58px; background: color-mix(in srgb, var(--signal) 14%, transparent); }
html.cursor-hot .cursor-dot { background: var(--signal); }

/* Büyütülmüş fotoğraflar kutusundan taşmasın (sticky bozmayan clip) */
html { overflow-x: clip; }
[data-reveal="clip"] { overflow: hidden; }
.fig[data-reveal="clip"] { border-radius: var(--radius-lg); }

/* Küçük dokunuşlar */
.btn:active { scale: 0.98; }
.machine img, .fig img { transition: scale 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.machine:hover img { scale: 1.04; }
.refs li img { transition: scale 0.4s; }
.refs li:hover img { scale: 1.08; }
