﻿/* =========================================================
   angelmisinbe - Creative AI Developer
   Tek ekran / tek sayfa
   ========================================================= */

/* ---------- TOKENS ---------- */
:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --fg: #edeae4;
  --muted: rgba(237, 234, 228, 0.52);
  --faint: rgba(237, 234, 228, 0.30);
  --line: rgba(237, 234, 228, 0.10);
  --line-2: rgba(237, 234, 228, 0.20);
  --accent: #ff5f1f;
  --accent-soft: rgba(255, 95, 31, 0.14);

  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(1.25rem, 5vw, 5.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

html {
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: #fff; }

img { display: block; max-width: 100%; }
a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

::-webkit-scrollbar { width: 0; height: 0; }

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--pad);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }

.preloader__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.preloader__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.preloader__count {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.preloader__bar { height: 1px; background: var(--line); overflow: hidden; }
.preloader__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
}

/* =========================================================
   GRAIN
   ========================================================= */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 500;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(8) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, -1%); }
  80% { transform: translate(2%, 1%); }
}

/* =========================================================
   CURSOR
   Konum sadece cocuk ogelerde uygulanir; konteyner sabit kalir
   ========================================================= */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 900;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.is-active { opacity: 1; }

.cursor__dot,
.cursor__ring,
.cursor__label {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
}
.cursor__dot { width: 6px; height: 6px; background: #fff; }
.cursor__ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
    background 0.35s, border-color 0.35s;
}
.cursor__label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #000;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.is-link .cursor__ring {
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.18);
}
.cursor__dot { transition: opacity 0.3s; }

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  padding-top: max(var(--pad), env(safe-area-inset-top));
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
  overflow: hidden;
  isolation: isolate;
}

/* gorsel: sag / ust / alt kenara tam oturur, soldan tasar */
.hero__bg {
  position: absolute;
  inset: 0 0 0 50%;
  z-index: -2;
  overflow: hidden;
}
.hero__bg picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  filter: saturate(0.72) contrast(1.06);
  animation: heroZoom 16s var(--ease-io) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.16); }
  to { transform: scale(1.02); }
}

.hero__veil {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 0;
  z-index: -1;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, transparent 7%),
    linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 14%, transparent 46%);
}

.hero__content {
  grid-area: 1 / 1;
  align-self: start;
  max-width: 46rem;
}

/* acilis reveal */
.hero [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.hero [data-reveal].is-in { opacity: 1; transform: none; }

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(1rem, 2.5vh, 2rem);
}
.hero__eyebrow em { font-style: normal; color: var(--accent); }
.hero__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, min(13.5vw, 10vh), 7rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin-bottom: clamp(1.2rem, 3vh, 2.2rem);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }

/* JS ile karakterlere sarilir */
.ch { display: inline-block; overflow: hidden; vertical-align: top; }
.ch__i {
  display: inline-block;
  transform: translateY(108%);
  transition: transform 0.95s var(--ease);
  transition-delay: var(--d, 0ms);
}
.is-ready .ch__i { transform: translateY(0); }

.hero__sub {
  font-size: clamp(0.95rem, 1.5vw, 1.35rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--muted);
  max-width: min(100%, 36ch);
}
.hero__rot {
  position: relative;
  display: inline-block;
  color: var(--fg);
  font-family: var(--font-display);
  font-style: italic;
}
.hero__rot-item {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  white-space: nowrap;
}
.hero__rot-item.is-active { position: relative; opacity: 1; transform: none; }

.hero__foot {
  grid-area: 2 / 1 / 3 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(1.5rem, 4vh, 3.5rem);
}
.hero__links { display: flex; flex-wrap: wrap; gap: clamp(1rem, 2.5vw, 2.2rem); }
.hero__links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.hero__links a:hover { color: var(--accent); }
/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  /* mobilde gorsel tam ekrana doner, metin uzerinde */
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__bg { left: 0; }
/* dikey gorselde ortala, kenardan kirpma yapma */
  .hero__img { object-position: center; }
  /* mobilde foto boyanmaz: sadece en altta baglantilar icin hafif karartma */
  .hero__veil {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.28) 14%,
      transparent 34%
    );
  }
  /* okunabilirlik icin siyah yerine ince golge */
  .hero__eyebrow,
  .hero__title,
  .hero__sub,
  .hero__links {
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65);
  }
}

@media (max-width: 640px) {
  .hero__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
  }
  /* kisa etiketler tek sirada kalir, dokunma hedefleri buyusun */
  .hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    width: 100%;
  }
  .hero__links a {
    padding: 0.45rem 0;
    font-size: 0.66rem;
  }
}

@media (max-width: 380px) {
  .hero__title { font-size: clamp(1.5rem, 12vw, 4rem); }
  .hero__links a { font-size: 0.62rem; }
}

@media (max-height: 560px) {
  .hero__sub { display: none; }
  .hero__eyebrow { margin-bottom: 0.8rem; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .ch__i { transform: none; }
  .hero__img { animation: none; }
}
