/* ============================================================
   Emre Elektrik — Tema
   ============================================================ */
:root {
  --orange: #ea5514;
  --orange-dark: #c8460d;
  --charcoal: #3a3a3a;
  --charcoal-2: #2b2b2b;
  --ink: #1e1e1e;
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --muted: #7a7a7a;
  --line: #e6e6e6;
  --white: #ffffff;

  --header-h: 132px;          /* açık haldeki yükseklik */
  --header-h-scrolled: 68px;  /* scroll edilmiş yükseklik */
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h-scrolled); }

body {
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  color: var(--ink);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .08);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .12); }

.header-inner {
  width: min(1180px, 94%);
  margin: 0 auto;
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 98px;
  transition: height .35s var(--ease);
}

.header-left { justify-self: start; }
.header-right { justify-self: end; }

/* Dil değiştirici (TR / EN) */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 8px 15px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--line); }
.lang-btn:hover { color: var(--orange); }
.lang-btn.active { background: var(--orange); color: var(--white); }

.search-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--charcoal);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color .2s, color .2s;
}
.search-btn:hover { border-color: var(--orange); color: var(--orange); }

/* Marka / logo */
.brand {
  justify-self: center;
  display: flex;
  align-items: center;
}
.brand-logo {
  height: 72px;
  width: auto;
  transition: height .35s var(--ease);
}
.brand-fallback {
  display: none;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--charcoal);
}
.brand-fallback strong { color: var(--orange); }

/* Alt menü satırı */
.header-nav {
  overflow: hidden;
  max-height: 60px;
  opacity: 1;
  transition: max-height .35s var(--ease), opacity .25s var(--ease);
  border-top: 1px solid var(--line);
}
.header-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 46px;
  height: 60px;
  align-items: center;
}
.nav-link {
  position: relative;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--charcoal);
  padding: 6px 2px;
  transition: color .2s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .25s var(--ease);
}
.nav-link:hover,
.nav-link.active { color: var(--orange); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Scroll edilmiş hal: menü gizlenir, logo küçülür */
.site-header.scrolled .header-top { height: var(--header-h-scrolled); }
.site-header.scrolled .brand-logo { height: 48px; }
.site-header.scrolled .brand-fallback { font-size: 1.45rem; }
.site-header.scrolled .header-nav {
  max-height: 0;
  opacity: 0;
  border-top-color: transparent;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s var(--ease), transform 6s linear;
  /* Görsel eklenene kadar şık degrade fallback */
  background-color: #222;
  background-image: linear-gradient(120deg, #1a1a1a 0%, #2b2b2b 45%, #3a2410 100%);
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, .85) 0%, rgba(20, 20, 20, .45) 60%, rgba(20, 20, 20, .25) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, 92%);
  margin: 0 auto;
  padding-top: var(--header-h);
  max-width: 720px;
}
.hero-kicker {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: .22em;
  font-size: .82rem;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .4);
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, .9);
  max-width: 560px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .03em;
  padding: 14px 30px;
  border-radius: 8px;
  transition: transform .15s var(--ease), background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { border: 2px solid rgba(255, 255, 255, .7); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--ink); }

.hero-dots {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dots button {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: background .2s, width .2s;
}
.hero-dots button.active { background: var(--orange); width: 26px; border-radius: 6px; }

/* ============ GENEL BÖLÜM ============ */
.section { padding: 100px 0; }
.section-about { background: var(--bg); }
.section-projects { background: var(--bg-soft); }

.section-head { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: .2em;
  font-size: .8rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--ink);
  margin-top: 10px;
}
.section-divider {
  display: block;
  width: 60px; height: 4px;
  background: var(--orange);
  border-radius: 3px;
  margin: 18px auto 0;
}

/* ============ HAKKIMIZDA ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-text p { color: #4a4a4a; margin-bottom: 18px; }
.about-features { list-style: none; margin-top: 26px; }
.about-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--charcoal);
}
.feat-num {
  color: var(--orange);
  font-weight: 800;
  font-size: .95rem;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.stat {
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num {
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--orange);
}
.stat-label { font-size: .85rem; color: rgba(255, 255, 255, .8); }

/* ============ PROJELER ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .14); }
.project-thumb {
  height: 210px;
  background-size: cover;
  background-position: center;
  background-color: #ddd;
  background-image: linear-gradient(135deg, #3a3a3a, #555);
}
.project-body { padding: 22px 24px 28px; }
.project-body h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--ink); }
.project-body p { color: var(--muted); font-size: .95rem; }

/* ============ İLETİŞİM ============ */
.section-contact { background: var(--bg); padding-bottom: 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: stretch;
  padding-bottom: 90px;
}
.contact-title { margin-top: 10px; }
.section-contact .section-divider { margin: 18px 0 34px; }
.contact-item { margin-bottom: 26px; }
.contact-label {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.contact-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
a.contact-value:hover { color: var(--orange); }
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 380px;
  box-shadow: var(--shadow);
}
.contact-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

/* ============ FOOTER ============ */
.site-footer { background: var(--charcoal-2); color: rgba(255, 255, 255, .75); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: .88rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-brand { font-weight: 800; color: #fff; }
.footer-brand strong { color: var(--orange); }

/* ============ FADE-IN (reveal) ============ */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Proje kartları sırayla belirsin */
.js .project-card.reveal:nth-child(1) { transition-delay: .05s; }
.js .project-card.reveal:nth-child(2) { transition-delay: .18s; }
.js .project-card.reveal:nth-child(3) { transition-delay: .31s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ HAMBURGER ============ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  margin: 0 auto;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ MOBİL MENÜ ============ */
.mobile-menu {
  display: none;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .35s var(--ease), opacity .25s var(--ease), padding .35s var(--ease);
}
.mobile-menu.open { max-height: 420px; opacity: 1; padding: 8px 0 18px; }
.mobile-link {
  padding: 14px 8px;
  font-weight: 600;
  color: var(--charcoal);
  border-bottom: 1px solid var(--line);
  transition: color .2s, padding-left .2s;
}
.mobile-link:hover,
.mobile-link.active { color: var(--orange); padding-left: 14px; }
.mobile-lang { display: none; margin-top: 16px; width: max-content; }

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
  z-index: 900;
}
.menu-backdrop.show { opacity: 1; visibility: visible; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .header-nav { display: none; }
  .lang-switch--desktop { display: none; }
  .mobile-menu { display: flex; }
  .mobile-lang { display: inline-flex; }
  .header-top { height: 72px; }
  .brand-logo { height: 46px; }
  .site-header.scrolled .header-top { height: 60px; }
}
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-nav ul { gap: 22px; }
  .nav-link { font-size: .82rem; }
  .header-top { height: 76px; }
  .brand-logo { height: 46px; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .section { padding: 70px 0; }
}
