/* Önce İnşaat — motion layer styles. Pairs with motion.js.
   Everything here degrades to "no animation" under prefers-reduced-motion (see the block at
   the bottom) and under `.no-js`, because motion.js only ever adds classes. */

/* ── Scroll progress ─────────────────────────────────────────────────── */
.once-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-400));
  transform: scaleX(0); transform-origin: left center;
  will-change: transform; pointer-events: none;
}

/* ── Custom cursor ───────────────────────────────────────────────────── */
.once-cursor-dot, .once-cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none;
  border-radius: 50%;
  opacity: 0; /* parked at 0,0 until the pointer first moves */
}
.once-cursor-dot.is-live, .once-cursor-ring.is-live { opacity: 1; }
.once-cursor-dot {
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--color-accent);
}
.once-cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 70%, transparent);
  transition: width .28s ease, height .28s ease, margin .28s ease,
              border-radius .28s ease, opacity .28s ease, background .28s ease;
}
.once-cursor-ring.is-active {
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
}
.once-cursor-ring.is-text {
  width: 3px; height: 30px; margin: -15px 0 0 -1px; border-radius: 1px;
  background: var(--color-accent);
}
@media (pointer: fine) {
  .once-has-cursor, .once-has-cursor a, .once-has-cursor button, .once-has-cursor .prow {
    cursor: none;
  }
}

/* ── Page leave transition ──────────────────────────────────────────────
   There is deliberately no body-level *enter* fade: the dc runtime paints the page
   asynchronously, so a body opacity transition would start whenever hydration lands and
   leave the whole page washed out. Entrances are handled per element (.rise / .reveal). */
.once-leaving body {
  opacity: 0; transform: translateY(-12px);
  transition: opacity .3s ease, transform .3s ease;
}

/* ── Headline reveal ─────────────────────────────────────────────────
   Done with a mask on the element itself — never by splitting its children, because the
   dc/React runtime owns that subtree and would fight the rewrite. */
/* The padding below is what the mask eats into instead of the glyphs: Turkish diacritics
   (İ, Ü, Ö) and ascenders overshoot the border box on tight display line-heights, and
   inset(0 ...) would shave them off. inset() rejects negative values — one invalid value
   drops the whole rule and the heading never appears — so the breathing room is positive
   padding, cancelled by an equal negative margin to keep layout identical. */
.once-head {
  padding-top: 0.18em;
  margin-top: -0.18em;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  clip-path: inset(0 0 100% 0);
  transform: translateY(18px);
  transition: transform 1s cubic-bezier(.16, .7, .24, 1);
}
/* The settled heading carries NO clip at all. `inset(0 0 0 0)` is still a live clip and
   permanently shaves whatever overshoots the padding box — that is what ate the dots off
   İ/Ü/Ö on every heading on every page. `none` cannot be interpolated from `inset()`, so the
   slide-open is run as a one-shot keyframe and `none` is simply the state it lands in. */
.once-head.is-in {
  clip-path: none;
  transform: none;
  /* `forwards`/`both` would be wrong here: a filled-forwards animation outranks the normal
     `clip-path: none` above and would leave the clip live for good. `backwards` fills only
     the pre-start delay, so once the run ends the element falls back to `none` — unclipped. */
  animation: once-head-in 1s cubic-bezier(.16, .7, .24, 1) backwards;
}
@keyframes once-head-in {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ── Image wipe + slow drift + parallax ──────────────────────────────── */
.once-wipe {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.15s cubic-bezier(.16, .7, .24, 1);
}
.once-wipe:not(.blueprint) { overflow: hidden; }
.once-par { transform: translate3d(0, var(--once-par, 0px), 0) scale(1.09); }
.once-wipe.is-in { clip-path: inset(0 0 0 0); }
/* Framed figures keep their registration marks outside the frame — don't clip those. */
.blueprint.once-wipe { clip-path: none; }
.blueprint.once-wipe > img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.15s cubic-bezier(.16, .7, .24, 1);
}
.blueprint.once-wipe.is-in > img { clip-path: inset(0 0 0 0); }

.once-kb.once-kb-on { animation: once-kenburns 26s ease-in-out infinite alternate; }
@keyframes once-kenburns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.075) translate3d(-1.2%, -1.4%, 0); }
}
/* Hover zoom must win over the ambient drift. */
.zoom:hover .once-kb { animation-play-state: paused; }

/* ── Sticky header states ────────────────────────────────────────────── */
header {
  transition: transform .45s cubic-bezier(.16, .7, .24, 1),
              background .35s ease, box-shadow .35s ease, min-height .35s ease;
}
header.is-stuck {
  background: color-mix(in srgb, var(--color-ink) 94%, transparent) !important;
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
}
header.is-stuck .nav-row { min-height: 58px !important; }
header .nav-row { transition: min-height .35s cubic-bezier(.16, .7, .24, 1); }
header img { transition: height .35s cubic-bezier(.16, .7, .24, 1); }
header.is-stuck img { height: 24px !important; }
header.is-stuck nav { font-size: 15px !important; }
header nav { transition: font-size .35s cubic-bezier(.16, .7, .24, 1); }

/* Header is fixed (see Header.dc.html) so it stays pinned to the very top of the viewport
   regardless of scroll; this spacer reserves the document flow space it no longer occupies
   and shrinks in lockstep with the compacted header. */
.once-header-spacer { min-height: 78px; transition: min-height .35s cubic-bezier(.16, .7, .24, 1); }
header.is-stuck + .once-header-spacer { min-height: 58px; }

/* ── Back to top ─────────────────────────────────────────────────────── */
.once-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 190;
  width: 52px; height: 52px; padding: 0; display: grid; place-items: center;
  background: var(--color-ink); color: #f2f1ef;
  border: 1px solid rgba(255, 255, 255, .18); cursor: pointer;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.16, .7, .24, 1),
              background .25s ease, border-color .25s ease;
}
.once-top.is-in { opacity: 1; transform: none; pointer-events: auto; }
.once-top:hover { background: var(--color-accent); border-color: var(--color-accent); }
.once-top:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.once-top svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: square;
  transition: transform .3s cubic-bezier(.16, .7, .24, 1);
}
.once-top:hover svg { transform: translateY(-3px); }
/* registration marks, same language as the .blueprint frames */
.once-top > .corner {
  position: absolute; width: 7px; height: 7px; opacity: .5;
  border-color: currentColor; border-style: solid; border-width: 0;
}
.once-top > .corner.tl { top: 3px; left: 3px; border-top-width: 1px; border-left-width: 1px; }
.once-top > .corner.tr { top: 3px; right: 3px; border-top-width: 1px; border-right-width: 1px; }
.once-top > .corner.bl { bottom: 3px; left: 3px; border-bottom-width: 1px; border-left-width: 1px; }
.once-top > .corner.br { bottom: 3px; right: 3px; border-bottom-width: 1px; border-right-width: 1px; }
@media (max-width: 620px) {
  .once-top { right: 16px; bottom: 16px; width: 46px; height: 46px; }
}

/* ── Marquee band ────────────────────────────────────────────────────── */
.once-marquee {
  display: flex; overflow: hidden; user-select: none;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-ink); color: #f2f1ef;
}
.once-marquee-track {
  display: flex; flex: 0 0 auto; align-items: center; gap: 46px;
  padding: 20px 23px;
  font-family: var(--font-heading); font-size: 15px; letter-spacing: .2em;
  text-transform: uppercase; white-space: nowrap;
  animation: once-marquee 34s linear infinite;
}
.once-marquee:hover .once-marquee-track { animation-play-state: paused; }
.once-marquee-track > span { display: inline-flex; align-items: center; gap: 46px; }
.once-marquee-track .dot { color: var(--color-accent); }
@keyframes once-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ── Buttons: magnetic pull + accent sweep ───────────────────────────── */
.btn {
  position: relative; overflow: hidden;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: background .25s ease, color .25s ease, border-color .25s ease,
              transform .35s cubic-bezier(.16, .7, .24, 1);
}
.btn > * { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--color-accent-600);
  transform: translateY(101%);
  transition: transform .45s cubic-bezier(.16, .7, .24, 1);
}
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) + 1px), 0); }

/* ── Project rows ────────────────────────────────────────────────────── */
.prow { position: relative; }
.prow::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--color-accent); transform: scaleY(0); transform-origin: top center;
  transition: transform .4s cubic-bezier(.16, .7, .24, 1);
}
.prow:hover::before, .prow[aria-selected="true"]::before { transform: scaleY(1); }

/* ── Form fields ─────────────────────────────────────────────────────── */
.input {
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}
.input:focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .once-progress, .once-cursor-dot, .once-cursor-ring { display: none !important; }
  .once-kb, .once-marquee-track { animation: none !important; }
  .once-wipe, .blueprint.once-wipe > img { clip-path: none !important; transform: none !important; }
  .once-leaving body { opacity: 1 !important; transform: none !important; }
  .once-head { clip-path: none !important; transform: none !important; animation: none !important; }
  .once-top { transition: opacity .2s linear !important; transform: none !important; }
}
