/* ==========================================================================
   Site v2 — Page-specific styles, animations, hover effects
   ========================================================================== */

/* ═══════════════════════════════════════════
   SCROLL PROGRESS BAR
   ═══════════════════════════════════════════ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  z-index: 10000;
  transition: none;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   PAGE LOAD TRANSITION
   ═══════════════════════════════════════════ */

body {
  animation: pageIn 0.6s var(--ease-out-quint) forwards;
}

@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ═══════════════════════════════════════════
   LABEL-ACCENT DRAW-IN ANIMATION
   ═══════════════════════════════════════════ */

.label-accent {
  position: relative;
  display: inline-block;
}

.label-accent::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 50%;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width 0.6s var(--ease-out-quint);
  transform: translateY(-50%);
}

[data-aos].aos-animate .label-accent::before,
.label-accent.is-visible::before {
  width: 1rem;
}

/* ═══════════════════════════════════════════
   SECTION HEAD — sola hizalı, numaralı (yeni başlık imzası)
   ═══════════════════════════════════════════ */

body { counter-reset: sectionhead; }

.section-head {
  position: relative;
  text-align: left;
  max-width: 820px;
  margin-bottom: var(--space-12);
  padding-left: clamp(3.25rem, 7vw, 5.5rem);
  counter-increment: sectionhead;
}

.section-head::before {
  content: counter(sectionhead, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -0.1em;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 400;
  line-height: 1;
  color: var(--color-accent);
  -webkit-text-stroke: 1px var(--color-accent-dark);
  -webkit-text-fill-color: transparent;
}

.section-head .label-accent {
  display: inline-block;
  margin-bottom: var(--space-3);
}

/* Numara zaten var — soldaki draw-in tick'i gizle */
.section-head .label-accent::before { display: none; }

.section-head .block__title,
.section-head .block__title--large {
  text-align: left;
  margin: 0 0 var(--space-4);
}

.section-head .block__subtitle,
.section-head .block__subtitle--large {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: 640px;
  margin-bottom: 0;
}

/* Eski ortalı altın çizgi imzası section-head içinde gizli */
.section-head .rule-accent { display: none; }

@media (max-width: 640px) {
  .section-head { padding-left: 0; }
  .section-head::before {
    position: static;
    display: block;
    margin-bottom: var(--space-2);
  }
}

/* ═══════════════════════════════════════════
   GALLERY HOVER — Zoom Icon Overlay
   ═══════════════════════════════════════════ */

.gallery-grid__item::before,
.home-photos__item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%) scale(0.6);
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius-full);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out-expo), transform 0.35s var(--ease-out-expo);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2311161d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
  pointer-events: none;
}

.gallery-grid__item:hover::before,
.home-photos__item:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ═══════════════════════════════════════════
   PAGE BANNER — Parallax ready
   ═══════════════════════════════════════════ */

.page-banner {
  overflow: hidden;
  will-change: auto;
}

.page-banner__bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  transition: none;
}

/* ═══════════════════════════════════════════
   MAGNETIC BUTTON FEEL
   ═══════════════════════════════════════════ */

.btn--magnetic {
  will-change: transform;
}

/* ═══════════════════════════════════════════
   SECTION TITLE UNDERLINE REVEAL
   ═══════════════════════════════════════════ */

.rule-accent {
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.7s var(--ease-out-quint) 0.2s;
}

[data-aos].aos-animate .rule-accent,
.rule-accent.is-visible {
  transform: scaleX(1);
}

/* ═══════════════════════════════════════════
   FOOTER REVEAL
   ═══════════════════════════════════════════ */

.footer {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-quint), transform 0.8s var(--ease-out-quint);
}

.footer.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   GLOBAL LINK STYLES
   ═══════════════════════════════════════════ */

a {
  color: var(--gold-2);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius:0;
}

a.btn:hover,
a.nav__link:hover,
a.breadcrumb__item:hover {
  text-decoration: none;
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

.card__title a:hover {
  color: var(--gold);
}

.lead-form .form-control {
  max-width: 100%;
}

/* ═══════════════════════════════════════════
   HOME PAGE — Scaled typography
   ═══════════════════════════════════════════ */

.hero__eyebrow {
  display: inline-block;
  color: var(--gold-2);
  margin-bottom: var(--space-2);
}

.hero__eyebrow-rule {
  margin-top: 0;
  margin-bottom: var(--space-5);
}

.hero__deco-frame {
  z-index: 2;
}

body.page-home .hero__title {
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  margin-bottom: var(--space-6);
}

body.page-home .hero__subline {
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-10);
}

body.page-home .block__title--large,
body.page-home .block__title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  margin-bottom: var(--space-4);
}

body.page-home .block__subtitle--large,
body.page-home .block__subtitle {
  font-size: var(--font-size-lg);
  max-width: 680px;
  line-height: var(--line-height-relaxed);
}

body.page-home .card--project .card__title {
  font-size: var(--font-size-2xl);
}

body.page-home .card--project .card__body .text-muted {
  font-size: var(--font-size-base);
}

body.page-home .stat-card__value {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
}

body.page-home .stat-card__label {
  font-size: var(--font-size-sm);
}

body.page-home .donati-item__title {
  font-size: var(--font-size-base);
}

body.page-home .donati-item__desc {
  font-size: var(--font-size-sm);
}

body.page-home .btn--lg {
  font-size: var(--font-size-sm);
  padding: 1rem 2.5rem;
}

/* ═══════════════════════════════════════════
   HOME — Photo grid
   ═══════════════════════════════════════════ */

.home-photos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-8);
}

@media (min-width: 768px) {
  .home-photos__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
}

@media (min-width: 1024px) {
  .home-photos__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
}

.home-photos__item {
  display: block;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow);
}

.home-photos__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 32, 26, 0);
  transition: background var(--transition-base);
  pointer-events: none;
}

.home-photos__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.home-photos__item:hover::after {
  background: rgba(8, 32, 26, 0.1);
}

.home-photos__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slower);
}

.home-photos__item:hover img {
  transform: scale(1.06);
}

/* ═══════════════════════════════════════════
   MASONRY GRID — Dikey/yatay karışık görseller
   ═══════════════════════════════════════════ */

.masonry {
  column-count: 2;
  column-gap: var(--space-3);
}

@media (min-width: 768px) {
  .masonry {
    column-count: 3;
    column-gap: var(--space-4);
  }
}

@media (min-width: 1200px) {
  .masonry {
    column-count: 4;
    column-gap: var(--space-4);
  }
}

.masonry--home {
  column-count: 2;
}

@media (min-width: 768px) {
  .masonry--home {
    column-count: 3;
  }
}

@media (min-width: 1200px) {
  .masonry--home {
    column-count: 4;
  }
}

.masonry__item {
  display: block;
  width: 100%;
  margin: 0 0 var(--space-3);
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow);
}

@media (min-width: 768px) {
  .masonry__item {
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
  }
}

.masonry__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 32, 26, 0);
  transition: background var(--transition-base);
  pointer-events: none;
}

.masonry__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.masonry__item:hover::after {
  background: rgba(8, 32, 26, 0.1);
}

.masonry__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slower);
}

.masonry__item:hover img {
  transform: scale(1.04);
}

/* ═══════════════════════════════════════════
   HOVER EFFECTS
   ═══════════════════════════════════════════ */

.btn--hover-lift {
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base);
}

.btn--hover-lift:hover {
  box-shadow: var(--shadow-md);
}

.card--hover-lift {
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow),
    border-color var(--transition-base);
}

.card--hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2xl);
  border-color: transparent;
}

.stat-card--hover {
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.stat-card--hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent-muted);
}

.donati-item--hover {
  /* Already handled by .donati-item base styles */
}

.donati-item__icon {
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    transform var(--transition-base);
}

/* ═══════════════════════════════════════════
   HERO ENTRANCE ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

body.page-home .hero__title--animate {
  animation: heroReveal 1.1s var(--ease-out-quint) forwards;
  opacity: 0;
}

body.page-home .hero__subline--animate {
  animation: heroReveal 1s var(--ease-out-quint) 0.25s forwards;
  opacity: 0;
}

body.page-home .hero__ctas--animate {
  animation: heroReveal 0.9s var(--ease-out-quint) 0.5s forwards;
  opacity: 0;
}

body.page-home .hero__scroll-hint--animate {
  animation: heroReveal 0.8s var(--ease-out-quint) 0.8s forwards;
  opacity: 0;
}

/* ═══════════════════════════════════════════
   GRAIN TEXTURE OVERLAY (subtle)
   ═══════════════════════════════════════════ */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ═══════════════════════════════════════════
   SECTION DIVIDER — thin gold line
   Only show when no wave divider is present
   ═══════════════════════════════════════════ */

.block + .block:not(.block--no-divider)::before {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-accent);
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.4;
}

/* Hide gold line when preceded by a wave divider */
.wave-divider + .block::before {
  display: none !important;
}

/* ═══════════════════════════════════════════
   3D TILT EFFECT — Cards
   ═══════════════════════════════════════════ */

.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card .card__body,
.tilt-card .stat-card__value,
.tilt-card .stat-card__label,
.tilt-card .donati-item__icon,
.tilt-card .donati-item__title {
  transform: translateZ(20px);
}

/* Subtle inner glow on tilt */
.tilt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  background: radial-gradient(
    ellipse at var(--tilt-x, 50%) var(--tilt-y, 50%),
    rgba(200, 164, 94, 0.08) 0%,
    transparent 70%
  );
}

.tilt-card:hover::after {
  opacity: 1;
}

/* ── Tilt + fareyi izleyen sarı glow — TÜM kutulara genişletildi ── */
.about-value-card,
.about-legacy-stat,
.project-info-card,
.lokasyon-feature,
.adh .stat,
.adh .amen-item,
.ktl-card,
.kt-mekan,
.kt-teknik,
.kt-other-card,
.kt-stat {
  position: relative;
}
.about-value-card::after,
.about-legacy-stat::after,
.project-info-card::after,
.lokasyon-feature::after,
.adh .stat::after,
.adh .amen-item::after,
.ktl-card::after,
.kt-mekan::after,
.kt-teknik::after,
.kt-other-card::after,
.kt-stat::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  background: radial-gradient(
    ellipse at var(--tilt-x, 50%) var(--tilt-y, 50%),
    rgba(200, 164, 94, 0.14) 0%,
    transparent 70%
  );
}
.about-value-card:hover::after,
.about-legacy-stat:hover::after,
.project-info-card:hover::after,
.lokasyon-feature:hover::after,
.adh .stat:hover::after,
.adh .amen-item:hover::after,
.ktl-card:hover::after,
.kt-mekan:hover::after,
.kt-teknik:hover::after,
.kt-other-card:hover::after,
.kt-stat:hover::after {
  opacity: 1;
}

/* ═══════════════════════════════════════════
   ANIMATED NUMBER COUNTER
   ═══════════════════════════════════════════ */

.stat-card__value[data-counted] {
  transition: none;
}

/* ═══════════════════════════════════════════
   PARALLAX HERO EFFECT (Ken Burns)
   ═══════════════════════════════════════════ */

.hero__slide.is-active .hero__slide-img {
  animation: kenBurns 8s ease-in-out forwards;
}

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* ═══════════════════════════════════════════
   REVEAL ON SCROLL — CSS classes for JS
   ═══════════════════════════════════════════ */

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-quint), transform 0.8s var(--ease-out-quint);
}

.reveal-up.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out-quint), transform 0.8s var(--ease-out-quint);
}

.reveal-left.is-revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out-quint), transform 0.8s var(--ease-out-quint);
}

.reveal-right.is-revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s var(--ease-out-quint), transform 0.8s var(--ease-out-quint);
}

.reveal-scale.is-revealed {
  opacity: 1;
  transform: scale(1);
}

/* ═══════════════════════════════════════════
   FLOATING CTA SECTION — premium feel
   ═══════════════════════════════════════════ */

.block--cta {
  background: #eef2ee;
  color: var(--color-text);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(16, 45, 38, 0.06);
  border-bottom: 1px solid rgba(16, 45, 38, 0.06);
}

.block--cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(200,164,94,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.block--cta .block__title {
  color: var(--color-secondary);
}

.block--cta .block__subtitle {
  color: var(--color-text-muted);
}

/* CTA içindeki inline beyaz metinleri (view'lerde style="color:var(--color-white)")
   beyaz temada koyuya zorla — görünürlük için */
.block--cta .section-title[style],
.block--cta h2[style] {
  color: var(--color-secondary) !important;
}
.block--cta p[style] {
  color: var(--color-text-muted) !important;
}

/* ═══════════════════════════════════════════
   IMAGE HOVER — Cinematic zoom
   ═══════════════════════════════════════════ */

.card__image-wrap {
  overflow: hidden;
}

.card__image-wrap .card__image {
  transition: transform 0.9s var(--ease-out-quint);
}

.card:hover .card__image-wrap .card__image {
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════
   IMAGE CLIP REVEAL — Scroll entrance
   ═══════════════════════════════════════════ */

.clip-reveal {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.clip-reveal.is-revealed {
  clip-path: inset(0 0 0% 0);
}

/* ═══════════════════════════════════════════
   HOVER GLOW — Buttons
   ═══════════════════════════════════════════ */

.btn--accent:hover {
  box-shadow: 0 0 24px rgba(200, 164, 94, 0.35), var(--shadow-md);
}

.btn--primary:hover {
  box-shadow: 0 0 20px rgba(200, 164, 94, 0.3), var(--shadow-md);
}

/* ═══════════════════════════════════════════
   MOBILE — Page-specific adjustments
   ═══════════════════════════════════════════ */

@media (max-width: 767px) {
  body.page-home .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  body.page-home .hero__subline {
    font-size: var(--font-size-base);
  }
  body.page-home .block__title--large,
  body.page-home .block__title {
    font-size: clamp(1.625rem, 6vw, 2.5rem);
  }
  body.page-home .block__subtitle--large,
  body.page-home .block__subtitle {
    font-size: var(--font-size-sm);
  }

  .home-photos__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .lead-form {
    padding: 0 var(--space-2);
  }
}

/* ═══════════════════════════════════════════
   HATA SAYFALARI (404 / 500)
   ═══════════════════════════════════════════ */
.err-block { padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.err-inner { max-width: 820px; margin: 0 auto; }
.err-code {
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 20vw, 12rem);
  line-height: 0.95;
  font-weight: 600;
  color: var(--gold-2, #ddbd7c);
  letter-spacing: 0.04em;
  margin: 0;
}
.err-title {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  font-weight: 500;
  color: #0c2c25;
  margin: var(--space-3) 0 0;
}
.err-text {
  font-size: var(--font-size-lg);
  font-weight: 300;
  line-height: var(--line-height-relaxed);
  color: #5f6f67;
  max-width: 620px;
  margin: var(--space-5) auto var(--space-10);
}
.err-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}
.err-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid rgba(160, 127, 63, 0.5);
  color: #0c2c25;
  font-size: var(--font-size-base);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.err-nav a:hover {
  background: var(--gold, #c8a45e);
  color: #0c2c25;
  border-color: var(--gold, #c8a45e);
  transform: translateY(-2px);
}
.err-nav a svg,
.err-nav a i { width: 18px; height: 18px; }
.err-meta { font-size: var(--font-size-sm); color: #7a8c81; margin-bottom: var(--space-8); }

/* ═══════════════════════════════════════════
   LENIS SMOOTH SCROLL — yardımcı stiller
   Lenis JS yüklendiğinde <html> üzerine .lenis sınıflarını ekler.
   design-system.css'teki html{scroll-behavior:smooth} ile çakışmayı
   önler; modal/lightbox için data-lenis-prevent desteği sağlar.
   ═══════════════════════════════════════════ */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
