/* Crea Brand Works — scroll-driven brand reveal
   Tek sayfa, düz statik. Tasarım dili kaynak videodan türetildi:
   saf siyah zemin, gümüş-beyaz tipografi, ölçülmüş marka kırmızısı. */

:root {
  --bg: #000000;
  --ink: #f2f2f0;
  --ink-soft: rgba(242, 242, 240, 0.58);
  --ink-faint: rgba(242, 242, 240, 0.26);
  --accent: #e6332a;

  --track-wide: 0.42em;
  --track-mail: 0.05em;

  --font-ui: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  /* Scroll uzunluğu: 120 karelik dizi için ~5vh/kare */
  --scroll-length: 640vh;

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

/* Kareler yeterince yüklenene kadar scroll kilitli */
html.is-booting,
html.is-booting body { overflow: hidden; height: 100%; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Sahne ---------- */

.stage {
  position: relative;
  height: var(--scroll-length);
}

.viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

.frame {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Kapanış perdesi ---------- */

.veil {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to top,
      #000 0%,
      #000 74%,
      rgba(0, 0, 0, 0.93) 88%,
      rgba(0, 0, 0, 0.82) 100%
    );
}

/* ---------- Kapanış kartı ---------- */

.outro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  padding: 2rem 1.25rem;
  text-align: center;
  opacity: 0;
  transform: translateY(1.75rem);
  pointer-events: none;
}

.outro.is-live { pointer-events: auto; }

/* Klavye odağı geldiğinde JS bloğu görünür kılar (sequence.js: outroFocused) */
.outro:focus-within { pointer-events: auto; }

.outro__logo {
  margin: 0 0 0.9rem;
  line-height: 0;
}

.outro__logo img {
  display: block;
  width: clamp(11rem, 24vw, 19rem);
  height: auto;
}

/* Logodaki kırmızı aksanın yankısı */
.outro__rule {
  width: 2.25rem;
  height: 2px;
  background: var(--accent);
  transform: skewX(-16deg);
}

.outro__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink-soft);
}

.outro__mail {
  font-size: clamp(1.15rem, 3.6vw, 2.4rem);
  font-weight: 300;
  letter-spacing: var(--track-mail);
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.28em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: 0% 1px;
  transition: background-size 0.5s var(--ease-out);
}

.outro__mail:hover,
.outro__mail:focus-visible { background-size: 100% 1px; }

.outro__mail:focus-visible {
  outline: 1px solid var(--ink-faint);
  outline-offset: 0.6rem;
}

/* ---------- Kaydırma ipucu ---------- */

.hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  pointer-events: none;
}

/* Simli zemin metni yutuyor — yerel karartma, kontrastı ölçülebilir hâle getirir */
.hint::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(38rem, 92vw);
  height: min(24rem, 46vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.72) 34%,
    rgba(0, 0, 0, 0.38) 62%,
    rgba(0, 0, 0, 0) 82%
  );
}

.hint__label,
.hint__line { position: relative; }

.hint__label {
  font-size: clamp(1.0625rem, 2.2vw, 1.625rem);
  font-weight: 300;
  letter-spacing: 0.46em;
  text-indent: 0.46em; /* letter-spacing sağda boşluk bırakır, optik merkez düzeltmesi */
  text-transform: uppercase;
  color: var(--ink);
}

.hint__line {
  width: 1px;
  height: clamp(5rem, 10vh, 7.5rem);
  background: rgba(242, 242, 240, 0.38);
  overflow: hidden;
}

.hint__line::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 42%;
  background: var(--ink);
  animation: hint-drop 2.1s var(--ease-out) infinite;
}

@keyframes hint-drop {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(160%); }
  100% { transform: translateY(160%); }
}

/* ---------- Açılış yükleyicisi ---------- */

.boot:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.8s var(--ease-out);
}

.boot.is-done {
  opacity: 0;
  pointer-events: none;
}

.boot__track {
  display: block;
  width: min(11rem, 40vw);
  height: 1px;
  background: var(--ink-faint);
}

.boot__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s linear;
}

/* ---------- JS yoksa ---------- */

.fallback {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.25rem;
}

.fallback img {
  width: min(100%, 60rem);
  height: auto;
}

/* ---------- Uyarlamalar ---------- */

@media (max-width: 820px) {
  :root { --scroll-length: 520vh; } /* mobilde 80 kare */
}

@media (prefers-reduced-motion: reduce) {
  :root { --scroll-length: 100svh; }

  .hint { display: none; }
  .hint__line::after { animation: none; }

  .veil { opacity: 1; }

  .outro {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
