/* SF Mühendislik - Custom styles */

/* Blueprint-style technical drawing texture for service cards */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    linear-gradient(to right, #0a0a0a 1px, transparent 1px),
    linear-gradient(to bottom, #0a0a0a 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Optional: subtle diagonal lines for more "technical" feel */
.service-card-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(10, 10, 10, 0.02) 20px,
    rgba(10, 10, 10, 0.02) 21px
  );
}

.service-card h3,
.service-card ul,
.service-card .service-panel-body {
  position: relative;
  z-index: 1;
}

/* Hizmetler billboard: üstte akan başlık şeridi */
.services-marquee-wrap {
  overflow: hidden;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, #fafafa 0%, transparent 8%, transparent 92%, #fafafa 100%);
  position: relative;
  z-index: 2;
}

.services-marquee-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  padding: 0.75rem 0;
  animation: services-marquee 50s linear infinite;
  position: relative;
  z-index: 1;
}

.services-marquee-wrap:hover .services-marquee-inner,
.services-marquee-wrap:focus-within .services-marquee-inner {
  animation-play-state: paused;
}

@keyframes services-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .services-marquee-inner {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 0.75rem 1.5rem;
  }
}

button.services-marquee-item {
  background: none;
  border: none;
  padding: 0.4rem 0.15rem;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(0.65rem, 1.1vw, 0.875rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

button.services-marquee-item:hover {
  color: #0a0a0a;
}

button.services-marquee-item.is-active {
  color: #c9a227;
  font-weight: 500;
}

button.services-marquee-item:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 4px;
}

.service-billboard-panel {
  min-height: 14rem;
}

/* Hizmetler paneli — lg+ sağda dağınık proje kolajı (mobilde gizli) */
.services-billboard-collage {
  pointer-events: none;
  align-self: stretch;
}

.services-billboard-collage__img {
  position: absolute;
  object-fit: cover;
  border-radius: 4px;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

.services-billboard-collage__img--1 {
  width: 58%;
  aspect-ratio: 4 / 3;
  top: 0;
  left: 0;
  transform: rotate(-6deg);
  z-index: 1;
}

.services-billboard-collage__img--2 {
  width: 52%;
  aspect-ratio: 1;
  top: 18%;
  right: -2%;
  transform: rotate(9deg);
  z-index: 3;
}

.services-billboard-collage__img--3 {
  width: 48%;
  aspect-ratio: 4 / 3;
  bottom: 0;
  left: 10%;
  transform: rotate(-3deg);
  z-index: 2;
}

.service-panel {
  animation: panelFade 0.45s ease-out;
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-panel {
    animation: none;
  }
}

/* Üst bar: 3 görünüm — yalnızca renk swatch (yazısız); sıra: altın · gül · kırmızı+koyu */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.theme-swatch:hover {
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.06);
}

.theme-swatch--active {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.theme-swatch-inner {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 9999px;
  pointer-events: none;
}

.theme-swatch--a .theme-swatch-inner {
  background-color: #c9a227;
}

.theme-swatch--b .theme-swatch-inner {
  background-color: #e11d48;
}

.theme-swatch--c .theme-swatch-inner {
  background: linear-gradient(180deg, #ff0000 0%, #ff0000 52%, #171818 52%, #171818 100%);
}

.theme-swatch:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

/* Hero (index): imleci yumuşak takip eden maske — delikte foto net; hero dışına çıkınca tam buğulu */
#hero {
  --hero-mx: 50%;
  --hero-my: 50%;
}

#hero .hero-reveal-veil {
  background: rgba(250, 250, 250, 0.38);
  -webkit-backdrop-filter: blur(16px) saturate(0.92);
  backdrop-filter: blur(16px) saturate(0.92);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* Fare hero dışında: tüm alan örtülü (eski / başlangıç hali) */
#hero .hero-reveal-veil.hero-reveal-veil--idle {
  -webkit-mask-image: linear-gradient(#000, #000);
  mask-image: linear-gradient(#000, #000);
}

/* Fare hero içindeyken: imleç çevresinde net pencere */
#hero .hero-reveal-veil:not(.hero-reveal-veil--idle) {
  -webkit-mask-image: radial-gradient(
    circle clamp(5.5rem, 14vw, 9rem) at var(--hero-mx, 50%) var(--hero-my, 50%),
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 1) 72%
  );
  mask-image: radial-gradient(
    circle clamp(5.5rem, 14vw, 9rem) at var(--hero-mx, 50%) var(--hero-my, 50%),
    transparent 0%,
    transparent 40%,
    black 72%
  );
}

#hero .hero-reveal-ring {
  left: var(--hero-mx, 50%);
  top: var(--hero-my, 50%);
  width: clamp(5.5rem, 14vw, 9rem);
  height: clamp(5.5rem, 14vw, 9rem);
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(185, 28, 28, 0.72);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 22px rgba(220, 38, 38, 0.38);
  opacity: 1;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#hero .hero-reveal-ring.hero-reveal-ring--idle {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  #hero .hero-reveal-veil {
    -webkit-mask-image: linear-gradient(#000, #000);
    mask-image: linear-gradient(#000, #000);
  }

  #hero .hero-reveal-ring {
    display: none;
  }
}

/* Hero fade-in on load */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

/* Scroll reveal: hidden until in view */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Stagger delay for grid items (optional, can be set via JS) */
.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }
.scroll-reveal.delay-5 { transition-delay: 0.5s; }
.scroll-reveal.delay-6 { transition-delay: 0.6s; }

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* 1536px ve üzeri geniş ekranlarda ana font boyutunu büyüt */
@media (min-width: 1536px) {
  html {
    font-size: 18px;
  }
}

/* 2000px ve üzeri ultra geniş ekranlarda bir kademe daha büyüt */
@media (min-width: 2000px) {
  html {
    font-size: 20px;
  }
}

/* Focus styles for accessibility */
input:focus,
textarea:focus,
button:focus {
  outline: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}
