/* ============================================
   KARBON AYAK İZİ - MAIN STYLESHEET
   Design System: "Portal to the Future — Bioluminescent Dark"
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

/* ============================================
   CSS VARIABLES / DESIGN TOKENS
   ============================================ */
:root {
  /* Koyu Arka Planlar */
  --bg-void:       #0A0A0F;
  --bg-deep:       #0D1117;
  --bg-surface:    #131920;
  --bg-elevated:   #1A2332;
  --bg-glass:      rgba(13,17,23,0.6);

  /* Neon Yeşil — Ana Aksan */
  --neon-green:     #00FF88;
  --neon-green-dim: #00CC6A;
  --neon-green-glow: rgba(0,255,136,0.15);
  --neon-green-bright: #33FFAA;

  /* Cyan — İkincil Aksan */
  --neon-cyan:     #00D4FF;
  --neon-cyan-dim: #00A3CC;
  --neon-cyan-glow: rgba(0,212,255,0.12);

  /* Emerald — Doğa bağlantısı */
  --emerald:       #10B981;
  --emerald-deep:  #059669;

  /* Metin Renkleri */
  --text-primary:   #E8ECF1;
  --text-secondary: #8B9BB4;
  --text-muted:     #4A5568;
  --text-bright:    #FFFFFF;

  /* Kenarlık & Çizgiler */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-dim:     rgba(255,255,255,0.10);
  --border-glow:    rgba(0,255,136,0.25);

  /* Gradientler */
  --gradient-hero:      linear-gradient(160deg, #0A0A0F 0%, #0D1A12 40%, #0A1628 100%);
  --gradient-card:      linear-gradient(135deg, rgba(0,255,136,0.03) 0%, rgba(0,212,255,0.03) 100%);
  --gradient-neon-line: linear-gradient(90deg, transparent, var(--neon-green), transparent);
  --gradient-glow-orb:  radial-gradient(circle, rgba(0,255,136,0.2) 0%, transparent 70%);

  /* Glow Efektleri */
  --glow-green-sm:  0 0 10px rgba(0,255,136,0.2), 0 0 20px rgba(0,255,136,0.1);
  --glow-green-md:  0 0 20px rgba(0,255,136,0.25), 0 0 40px rgba(0,255,136,0.1);
  --glow-green-lg:  0 0 30px rgba(0,255,136,0.3), 0 0 60px rgba(0,255,136,0.15), 0 0 100px rgba(0,255,136,0.05);
  --glow-cyan-sm:   0 0 10px rgba(0,212,255,0.2), 0 0 20px rgba(0,212,255,0.1);

  /* Glassmorphism */
  --glass-bg:     rgba(13,17,23,0.7);
  --glass-border: rgba(255,255,255,0.08);
  --glass-blur:   blur(20px) saturate(150%);

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.5);
  --shadow-xl:   0 16px 64px rgba(0,0,0,0.6);

  /* Tipografi */
  --font-display:  'Syne', sans-serif;
  --font-body:     'IBM Plex Sans', sans-serif;
  --font-mono:     'IBM Plex Mono', monospace;
  --font-accent:   'Instrument Serif', serif;

  /* Font Ölçekleri */
  --text-hero:    clamp(3.5rem, 7vw, 7rem);
  --text-h1:      clamp(2.5rem, 5vw, 4.5rem);
  --text-h2:      clamp(1.75rem, 3.5vw, 3rem);
  --text-h3:      clamp(1.25rem, 2vw, 1.75rem);
  --text-h4:      clamp(1rem, 1.5vw, 1.25rem);
  --text-body:    clamp(0.95rem, 1.1vw, 1.05rem);
  --text-small:   clamp(0.8rem, 0.9vw, 0.875rem);
  --text-caption:  0.75rem;
  --text-overline: 0.7rem;

  /* Spacing (8px grid) */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;  --space-4: 1rem;
  --space-6: 1.5rem;   --space-8: 2rem;    --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;   --space-24: 6rem;    --space-32: 8rem;
  --space-40: 10rem;   --space-48: 12rem;

  /* Container */
  --container-max: 1300px;
  --container-padding: clamp(20px, 4vw, 60px);

  /* Border Radius */
  --radius-sm: 8px;   --radius-md: 14px;  --radius-lg: 22px;
  --radius-xl: 32px;  --radius-full: 9999px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-void);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Grid pattern arka plan — tüm sayfa boyunca */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-bright);
  line-height: 1.15;
  font-weight: 700;
}

h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

button {
  cursor: pointer;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 1;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-overline);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--neon-green);
  margin-bottom: var(--space-4);
}

.section-label-cyan {
  color: var(--neon-cyan);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: var(--space-6);
}

.section-subtitle {
  font-size: var(--text-body);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

/* Neon divider — bölüm ayırıcı */
.neon-divider {
  width: 100%;
  height: 1px;
  background: var(--gradient-neon-line);
  position: relative;
  overflow: hidden;
}

.neon-divider::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 40px;
  height: 7px;
  background: var(--neon-green);
  border-radius: var(--radius-full);
  filter: blur(4px);
  animation: lightTrace 4s linear infinite;
}

/* ============================================
   FLOATING ORBS (decorative)
   ============================================ */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--gradient-glow-orb);
  opacity: 0.5;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(0,212,255,0.15) 0%, transparent 70%);
  opacity: 0.4;
  animation: orbFloat 25s ease-in-out infinite;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--gradient-glow-orb);
  opacity: 0.3;
  animation: orbFloat 30s ease-in-out infinite;
  animation-delay: -10s;
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }
[data-delay="700"] { transition-delay: 0.7s; }
[data-delay="800"] { transition-delay: 0.8s; }

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -40px); }
  50% { transform: translate(-20px, 20px); }
  75% { transform: translate(40px, 30px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1); }
}

@keyframes lightTrace {
  0% { left: -40px; }
  100% { left: calc(100% + 40px); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes slowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0,255,136,0.2); }
  50% { box-shadow: 0 0 40px rgba(0,255,136,0.4); }
}

/* ============================================
   SELECTION & SCROLLBAR
   ============================================ */
/* ============================================
   LIGHT MODE OVERRIDES
   ============================================ */
[data-theme="light"] {
  /* Backgrounds */
  --bg-void:       #F8FAFB;
  --bg-deep:       #FFFFFF;
  --bg-surface:    #F1F5F9;
  --bg-elevated:   #E8EDF2;
  --bg-glass:      rgba(255,255,255,0.75);

  /* Neon Green — toned down for light */
  --neon-green:     #059669;
  --neon-green-dim: #047857;
  --neon-green-glow: rgba(5,150,105,0.12);
  --neon-green-bright: #10B981;

  /* Cyan */
  --neon-cyan:     #0891B2;
  --neon-cyan-dim: #0E7490;
  --neon-cyan-glow: rgba(8,145,178,0.10);

  /* Text Colors */
  --text-primary:   #1E293B;
  --text-secondary: #64748B;
  --text-muted:     #94A3B8;
  --text-bright:    #0F172A;

  /* Borders */
  --border-subtle:  rgba(0,0,0,0.06);
  --border-dim:     rgba(0,0,0,0.10);
  --border-glow:    rgba(5,150,105,0.25);

  /* Gradients */
  --gradient-hero:      linear-gradient(160deg, #F8FAFB 0%, #ECFDF5 40%, #EFF6FF 100%);
  --gradient-card:      linear-gradient(135deg, rgba(5,150,105,0.03) 0%, rgba(8,145,178,0.03) 100%);
  --gradient-neon-line: linear-gradient(90deg, transparent, var(--neon-green), transparent);
  --gradient-glow-orb:  radial-gradient(circle, rgba(5,150,105,0.12) 0%, transparent 70%);

  /* Glow Effects — subtler for light */
  --glow-green-sm:  0 0 10px rgba(5,150,105,0.12), 0 0 20px rgba(5,150,105,0.06);
  --glow-green-md:  0 0 20px rgba(5,150,105,0.15), 0 0 40px rgba(5,150,105,0.08);
  --glow-green-lg:  0 0 30px rgba(5,150,105,0.18), 0 0 60px rgba(5,150,105,0.08);
  --glow-cyan-sm:   0 0 10px rgba(8,145,178,0.12), 0 0 20px rgba(8,145,178,0.06);

  /* Glassmorphism */
  --glass-bg:     rgba(255,255,255,0.8);
  --glass-border: rgba(0,0,0,0.06);
  --glass-blur:   blur(20px) saturate(150%);

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl:   0 16px 64px rgba(0,0,0,0.12);
}

/* Light mode: reduce/hide decorative overlays */
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

[data-theme="light"] body::after {
  opacity: 0.015;
}

/* Light mode: scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track {
  background: var(--bg-void);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(5,150,105,0.15);
  border-color: var(--border-glow);
}

/* Light mode: selection */
[data-theme="light"] ::selection {
  background-color: rgba(5,150,105,0.15);
  color: var(--neon-green);
}

/* Light mode: orbs less prominent */
[data-theme="light"] .orb {
  opacity: 0.15 !important;
}

/* Light mode: scan-lines hidden */
[data-theme="light"] .hero-section::before,
[data-theme="light"] .page-hero::before {
  display: none;
}

/* Light mode: navbar brand SVG */
[data-theme="light"] .navbar-brand svg text[fill="#E8ECF1"] {
  fill: #1E293B;
}

[data-theme="light"] .navbar-brand svg text[fill="#8B9BB4"] {
  fill: #64748B;
}

[data-theme="light"] .navbar-brand svg circle {
  fill: #059669;
}

/* Light mode: footer brand SVG */
[data-theme="light"] .footer-brand svg text[fill="#E8ECF1"] {
  fill: #1E293B;
}

[data-theme="light"] .footer-brand svg text[fill="#8B9BB4"] {
  fill: #64748B;
}

[data-theme="light"] .footer-brand svg circle {
  fill: #059669;
}

/* Light mode: hero badge */
[data-theme="light"] .hero-badge {
  background: rgba(5,150,105,0.08);
  border-color: var(--neon-green);
}

/* Light mode: mobile menu */
[data-theme="light"] .mobile-menu {
  background: var(--bg-void);
}

/* Light mode: WhatsApp SVG fill */
[data-theme="light"] .whatsapp-fab svg {
  fill: #fff;
}

/* Light mode: neon text in hero */
[data-theme="light"] .hero-title .neon {
  color: var(--neon-green);
  text-shadow: none;
}

/* Light mode: cursor blink */
[data-theme="light"] .cursor-blink {
  background: var(--neon-green);
  box-shadow: none;
}

/* Light mode: stat number */
[data-theme="light"] .stat-number {
  text-shadow: none;
}

/* Light mode: service card hover */
[data-theme="light"] .service-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

/* Light mode: report mockup */
[data-theme="light"] .report-mockup {
  background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
}

/* Light mode: contact map */
[data-theme="light"] .contact-map iframe {
  filter: none;
}

/* Light mode: blog card image text */
[data-theme="light"] .blog-card-image-text {
  color: rgba(5,150,105,0.5);
}

/* Light mode: mega menu card tags */
[data-theme="light"] .mega-tag {
  background: rgba(5,150,105,0.08);
  border-color: rgba(5,150,105,0.15);
  color: var(--neon-green);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-dim);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.theme-toggle:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(0,255,136,0.06);
  box-shadow: var(--glow-green-sm);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

/* Show/hide icons based on theme */
.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle {
  border-color: var(--border-dim);
  color: var(--text-secondary);
}

[data-theme="light"] .theme-toggle:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(5,150,105,0.06);
}

::selection {
  background-color: rgba(0,255,136,0.2);
  color: var(--neon-green);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-void);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,255,136,0.15);
  border-color: var(--border-glow);
}
