/* ============================================================================
   HOMI scroll-scrub hero — styles
   Brand: deep navy + warm off-white + gold accent. Dependency-free.
   ==========================================================================*/

:root {
  --navy:   #0b0f26;
  --navy-2: #141a3a;
  --ink:    #f1eee6;
  --gold:   #f0c479;
  --muted:  rgba(241, 238, 230, .62);
  --ease:   cubic-bezier(.22, .61, .36, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* Page base follows the light/dark theme; night sections (hero, "3.0",
     horizontal projects, footer) paint their own dark surface on top. */
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;    /* explicit — pin to the very top of the viewport */
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 1.8vw, 22px) clamp(20px, 4vw, 64px);
  color: var(--ink);
  /* Glass bar — it overlays the always-dark hero at the top (transparent, light
     text) and stays a dark navy glass once scrolled, so the light wordmark/nav
     read over BOTH the dark hero and the light content sections in either theme.
     No mix-blend-mode (it recoloured text unpredictably). */
  background: transparent;
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease),
              box-shadow .35s var(--ease), padding .35s var(--ease);
}
.topbar.is-solid {
  background: rgba(11, 15, 38, .72);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 12px 34px var(--shadow);
}
.topbar__logo {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  letter-spacing: .42em;
  font-size: clamp(15px, 1.5vw, 19px);
  text-decoration: none;
  color: inherit;
  padding-left: .42em;          /* optical: balance the tracking */
}
.topbar__logo:has(.homi-logo-img) { padding-left: 0; }   /* no optical pad for images */
/* Custom logo (PNG/SVG) — replaces the "HOMI" wordmark when set in the admin. */
.homi-logo-img {
  display: block;
  height: clamp(26px, 3vw, 38px);
  width: auto;
  padding-left: 0;
}
.homi-logo-text { display: inline-block; }
.topbar__nav { display: flex; gap: clamp(18px, 2.4vw, 40px); align-items: center; }
/* Kill list bullets/markers when the nav is a WP menu (<ul><li>) — sadece isimler. */
.topbar__nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.topbar__nav li { list-style: none; margin: 0; padding: 0; }
.topbar__nav li::marker { content: ''; }
.topbar__nav a {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
  transition: opacity .3s var(--ease);
}
.topbar__nav a:hover { opacity: 1; }

/* ── Hero / pinned scrub ────────────────────────────────────────────── */
/* Night section: dark in every theme. Explicit ink text so captions stay
   cream even when the page theme is light. */
.hero { position: relative; background: var(--navy); color: var(--ink); }

.hero__track { height: 340vh; }             /* scroll distance of the scrub  */

.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;                            /* mobile URL-bar safe           */
  overflow: hidden;
  background: var(--navy);                   /* opening backdrop before frames */
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Opening black — covers the building at first, fades out fast as you scroll
   (driven by intro.js). DOM order (canvas → black → splash) layers it right. */
.hero__black {
  position: absolute;
  inset: 0;
  background: #05070f;
  pointer-events: none;
  will-change: opacity;
}

/* Text overlay — one grid cell so captions stack centred */
.hero__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 24px;
  pointer-events: none;
}
.hero__cap {
  grid-area: 1 / 1;                          /* all captions share the centre */
  max-width: min(92vw, 900px);
  text-align: center;
  will-change: opacity, transform, filter;
  opacity: 0;
  pointer-events: none;
}
.hero__cap--c { pointer-events: auto; }

.hero__eyebrow {
  display: block;
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: .48em;
  color: var(--gold);
  margin-bottom: 1.1em;
  padding-left: .48em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(28px, 8vw, 90px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
  /* subtle soft fade only around the glyphs — no box behind the text */
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}
.hero__title--sm { font-size: clamp(22px, 6vw, 64px); }
.hero__lead {
  margin: 1em auto 0;
  max-width: 30ch;
  font-size: clamp(15px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--muted);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}
.hero__wordmark {
  font-weight: 300;
  font-size: clamp(38px, 13vw, 116px);
  letter-spacing: .3em;
  padding-left: .3em;
}
.hero__cta {
  display: inline-block;
  margin-top: 1.6em;
  padding: 15px 30px;
  border: 1px solid rgba(240, 196, 121, .55);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(240, 196, 121, .06);
  backdrop-filter: blur(6px);
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.hero__cta:hover {
  background: rgba(240, 196, 121, .16);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* Scroll cue */
.hero__cue {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vh, 46px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity .5s var(--ease);
}
.hero__cue-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--gold), transparent);
  animation: cueSlide 1.9s var(--ease) infinite;
}
@keyframes cueSlide {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Scrub progress rail */
.hero__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, .1);
}
.hero__progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--gold), #fff);
  will-change: transform;
}

/* Preload curtain */
.hero__loader {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  background: var(--navy);
  transition: opacity .8s var(--ease), visibility .8s;
}
.hero.is-ready .hero__loader { opacity: 0; visibility: hidden; }
.hero__loader-mark {
  font-weight: 300;
  letter-spacing: .5em;
  font-size: 22px;
  padding-left: .5em;
  color: var(--ink);
}
.hero__loader-bar {
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}
.hero__loader-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--gold);
  transition: transform .25s var(--ease);
}

.hero__fallback { width: 100%; height: 100vh; object-fit: cover; display: block; }

/* ── After-hero content ─────────────────────────────────────────────── */
.after__block {
  min-height: 92vh;
  display: grid;
  place-content: center;
  padding: clamp(60px, 12vh, 160px) clamp(24px, 8vw, 140px);
  text-align: center;
}
.after__block--dark { background: var(--navy); color: var(--ink); }
.after__block--light { background: var(--bg-alt); color: var(--text); }

.after__eyebrow {
  font-size: 12px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 1.4em;
}
.after__big {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.2vw, 58px);
  line-height: 1.18;
  letter-spacing: -.01em;
  max-width: 22ch;
  margin: 0 auto;
}
.after__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 6vw, 90px);
}
.stat b {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 500;
  line-height: 1;
}
.stat span {
  display: block; margin-top: .8em;
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase; opacity: .6;
}

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.foot {
  background: var(--navy);
  text-align: center;
  padding: clamp(50px, 10vh, 120px) 24px;
  color: var(--muted);
}
.foot__mark { letter-spacing: .5em; padding-left: .5em; font-size: 18px; color: var(--ink); margin-bottom: 1em; }
.foot p { font-size: 13px; margin: 0; }

/* ── Reduced motion: no scrub, no long track ────────────────────────── */
.hero--static .hero__track { height: 100vh; height: 100svh; }
.hero--static .hero__cue,
.hero--static .hero__progress { display: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__cue-line { animation: none; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}

/* ── Small screens ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .after__stats { grid-template-columns: 1fr; gap: 40px; }
  .topbar__nav { gap: 16px; }
  .topbar__nav a { font-size: 11px; letter-spacing: .1em; }
}
