:root {
  --bg: #050505;
  --fg: #f5f5f5;
  --accent: #ff3300;
  --accent-glow: rgba(255, 51, 0, 0.4);
  --sayfa-ilerleme: 0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
  background-image: url('../assets/images/dots.svg');
  background-size: 30px 30px;
  background-position: center top;
}

img:not([src]), img:-moz-broken { opacity: 0; }
img, video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-content { text-align: center; }
.loader-text {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  color: #888;
  margin-bottom: 1rem;
}
.loader-percentage {
  font-size: 5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
}
.header-logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.header-nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}
.header-nav a:hover { color: var(--accent); }

/* Sections */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  position: relative;
  z-index: 10;
}
.relative-z { position: relative; z-index: 10; }
section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-desc {
  font-size: 1.15rem;
  color: #888;
  max-width: 700px;
  margin-bottom: 2.5rem;
}
.text-center { text-align: center; margin-left: auto; margin-right: auto; }

/* Lines Split effect */
.lines-split {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.gorunur .lines-split {
  opacity: 1;
  transform: translateY(0);
}

/* Hero */
.hero { padding-top: 8rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.35; }
.hero-3d-container { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-3d-container canvas { pointer-events: auto; }
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 3rem;
  max-width: 1000px;
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-subtext {
  font-size: 1.25rem;
  max-width: 650px;
  color: #aaa;
  margin-bottom: 2rem;
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s 0.2s, transform 1s 0.2s;
  pointer-events: auto;
}
.gorunur .hero-subtext { opacity: 1; transform: translateY(0); }
.cta-btn {
  pointer-events: auto;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 30px var(--accent-glow);
}
.cta-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px var(--accent-glow);
}

/* About */
.about { background: #0a0a0a; padding: 8rem 0; }
.about-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center;
}
.about h2 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 1.5rem; }
.highlight { color: var(--accent); }
.about p { font-size: 1.15rem; color: #888; margin-bottom: 1.25rem; }
.about-visual {
  height: 460px; background: #111; border-radius: 16px;
  position: relative; overflow: hidden;
}
.abstract-shape {
  position: absolute; top: 50%; left: 50%; width: 280px; height: 280px;
  background: linear-gradient(45deg, var(--accent), transparent);
  border-radius: 50%; transform: translate(-50%, -50%);
  filter: blur(50px); opacity: 0.4;
}

/* Works / Swiper / Demo Cards */
.works { padding: 8rem 0; overflow: hidden; }
.works-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  gap: 2rem;
}
.works-title-wrap { flex: 1; }
.works h2 { font-size: clamp(2.5rem, 4.5vw, 3.5rem); margin-bottom: 0.75rem; }
.works-nav {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.works-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #333644;
  background: #111217;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.works-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 51, 0, 0.3);
}
.swiper-container {
  display: flex; gap: 2rem; overflow-x: auto; padding-bottom: 2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.swiper-container::-webkit-scrollbar { height: 6px; }
.swiper-container::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.swiper-slide {
  flex: 0 0 420px; scroll-snap-align: start;
}
.project-card {
  position: relative; overflow: hidden; border-radius: 14px; background: #111215;
  border: 1px solid #22232a;
  transform: translateY(0); opacity: 1; transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
  display: flex; flex-direction: column;
}
.project-card:hover {
  box-shadow: 0 16px 40px rgba(255, 51, 0, 0.2);
  border-color: rgba(255, 51, 0, 0.4);
  transform: translateY(-8px);
  z-index: 10;
}

.demo-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  background: #08090c;
  overflow: hidden;
  border-bottom: 1px solid #1c1d24;
}
.demo-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Demo 2: Magnetic Area */
.demo-magnetic-area {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: radial-gradient(circle at center, #151620 0%, #08090c 100%);
}
.mag-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.mag-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* Demo 3: Kesit Wrapper */
.demo-kesit-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  background: #0a0b0e;
  overflow: hidden;
}
.kesit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.kesit-layer-wire {
  opacity: 0.4;
}
.kesit-layer-cut {
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  transition: clip-path 0.05s linear;
}
.kesit-controls {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 9, 12, 0.85);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid #222;
  z-index: 10;
}
.kesit-range {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}
.kesit-value-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #aaa;
  white-space: nowrap;
}

/* Demo 5: Vector Blueprint Container */
.demo-cizim-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08090c;
  padding: 1rem;
}
.demo-cizim-svg {
  width: 100%;
  height: 100%;
}
.cizim-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Card Info */
.project-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 51, 0, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}
.project-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #fff;
}
.project-tech {
  font-size: 0.8125rem;
  color: #888;
  margin-bottom: 0.85rem;
}
.demo-mod-b {
  font-size: 0.8125rem;
  color: #bbb;
  border-left: 2px solid var(--accent);
  padding-left: 0.65rem;
  line-height: 1.45;
  margin-top: auto;
  font-style: italic;
}

/* Culture */
.culture { position: relative; padding: 8rem 0; background: #080808; }
.culture-3d-container { position: absolute; inset: 0; pointer-events: none; }
.culture h2 { font-size: clamp(2.5rem, 4.5vw, 3.5rem); margin-bottom: 1rem; }
.culture-images { display: flex; gap: 2rem; margin-top: 3.5rem; }
.culture-img { flex: 1; border-radius: 16px; overflow: hidden; height: 380px; position: relative; transform: translateY(30px); opacity: 0; transition: opacity 0.8s, transform 0.8s; }
.culture.gorunur .culture-img { opacity: 1; transform: translateY(0); }
.culture.gorunur .culture-img.offset { transform: translateY(40px); transition-delay: 0.2s; }
.culture-img img { transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.culture-img:hover img { transform: scale(1.05); }

/* AI */
.ai { position: relative; background: #030303; min-height: 100vh; padding: 6rem 0; }
.ai-3d-container { position: absolute; inset: 0; pointer-events: auto; }
.ai-content { max-width: 560px; margin-left: auto; text-align: right; }
.ai h2 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
.ai p { font-size: 1.15rem; color: #888; }

/* Labs */
.labs { padding: 8rem 0; background: #0a0a0a; }
.labs h2 { font-size: clamp(2.5rem, 4.5vw, 3.5rem); margin-bottom: 1rem; }
.labs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.lab-card {
  background: #111; padding: 2.5rem 2rem; border-radius: 16px; cursor: pointer;
  transition: background 0.3s, transform 0.3s; text-align: center;
  border: 1px solid #1c1c1c;
}
.lab-card:hover { background: #181818; transform: translateY(-8px); border-color: #333; }
.lab-icon {
  width: 50px; height: 50px; background: var(--accent); border-radius: 50%;
  margin: 0 auto 1.5rem; opacity: 0.6; transition: opacity 0.3s, transform 0.3s;
}
.lab-card:hover .lab-icon { opacity: 1; transform: scale(1.15); }
.lab-card h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.lab-card p { font-size: 0.95rem; color: #888; }

/* News */
.news { padding: 8rem 0; }
.news h2 { font-size: clamp(2.5rem, 4.5vw, 3.5rem); margin-bottom: 3rem; }
.news-list { display: flex; flex-direction: column; gap: 1.5rem; }
.news-item {
  display: flex; gap: 2rem; align-items: center; background: #111;
  padding: 1rem; border-radius: 16px; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s, box-shadow 0.4s; cursor: pointer;
  opacity: 0; transform: translateY(25px);
  border: 1px solid #1a1a1a;
}
.news.gorunur .news-item { opacity: 1; transform: translateY(0); }
.news.gorunur .news-item:nth-child(1) { transition-delay: 0.1s; }
.news.gorunur .news-item:nth-child(2) { transition-delay: 0.2s; }
.news.gorunur .news-item:hover { transform: translateX(15px); background: #161616; border-color: rgba(255,51,0,0.3); box-shadow: 0 10px 30px rgba(255,51,0,0.12); }
.news-img { width: 180px; height: 130px; border-radius: 10px; overflow: hidden; position: relative; flex-shrink: 0; }
.news-img img { transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.news-item:hover .news-img img { transform: scale(1.08); }
.news-date { color: var(--accent); font-size: 0.8125rem; font-weight: 700; margin-bottom: 0.4rem; display: block; }
.news-text h3 { font-size: 1.35rem; margin: 0; }

/* Services (Logo Wall) */
.services { padding: 8rem 0; background: #050505; overflow: hidden; }
.services h2 { font-size: clamp(2.5rem, 4.5vw, 3.5rem); margin-bottom: 1rem; }
.logo-wall-wrapper {
  margin-top: 3.5rem; width: 100%; display: flex; overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logo-track { display: flex; gap: 4rem; animation: scroll-left 25s linear infinite; }
.logo-item {
  font-size: 1.75rem; font-weight: 700; color: #333; white-space: nowrap;
}
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Footer */
.footer { padding: 5rem 0; border-top: 1px solid #1a1a1a; text-align: center; background: #000; }
.footer-brand { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.footer-msg { color: #888; font-size: 1.15rem; margin-bottom: 1.5rem; }
.footer-contact p { color: #666; font-size: 0.95rem; }
.footer-contact a { color: var(--fg); text-decoration: none; transition: color 0.2s; }
.footer-contact a:hover { color: var(--accent); text-decoration: underline; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .header { padding: 1.25rem 2rem; }
  .container { padding: 0 2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-visual { height: 380px; }
  .labs-grid { grid-template-columns: 1fr 1fr; }
  .swiper-slide { flex: 0 0 360px; }
}

@media (max-width: 768px) {
  .header { padding: 1rem 1.25rem; }
  .header-logo { font-size: 1.25rem; }
  .header-nav a { display: none; }
  .container { padding: 0 1.25rem; }
  .hero-content { padding: 0 1.25rem; }
  .culture-images { flex-direction: column; gap: 1.5rem; }
  .culture-img { height: 280px; }
  .culture-img.offset { transform: none !important; }
  .labs-grid { grid-template-columns: 1fr; }
  .swiper-slide { flex: 0 0 calc(100vw - 3rem); max-width: 360px; }
  .news-item { flex-direction: column; align-items: flex-start; }
  .news-img { width: 100%; height: 200px; }
  .ai-content { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .lines-split { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .project-card, .culture-img, .news-item { opacity: 1 !important; transform: none !important; }
  .logo-track { animation: none !important; }
}