/* =========================================================
   ERGAN MÜHENDİSLİK — style.css
   Tasarım dili: "Tek Hat Şeması" — elektrik mühendisliğinde
   kullanılan tek hat şeması çiziminden ilham alan, koyu zeminli,
   devre hattı motifli teknik/endüstriyel bir kimlik.
   ========================================================= */

:root {
  /* --- Renkler --- */
  --bg: #0A0E14;
  --bg-panel: #10151E;
  --bg-panel-2: #151C28;
  --line: #212C3B;
  --line-bright: #2E3D51;
  --text: #E9EEF4;
  --text-muted: #93A3B8;
  --text-faint: #57687D;
  --amber: #FFB020;
  --amber-soft: rgba(255, 176, 32, 0.14);
  --blue: #56AEE8;
  --blue-soft: rgba(86, 174, 232, 0.14);

  /* --- Tipografi --- */
  --f-display: 'Space Grotesk', sans-serif;
  --f-body: 'Inter', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;

  /* --- Layout --- */
  --max: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 3px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  background-attachment: fixed;
  opacity: 1;
}

/* Grid arka planı çok belirgin olmasın diye üstüne bir katman */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(10,14,20,0) 0%, var(--bg) 78%);
  pointer-events: none;
  z-index: 0;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { color: var(--text-muted); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--amber-soft);
  flex-shrink: 0;
}

.mono { font-family: var(--f-mono); }

/* --- Butonlar --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
  cursor: pointer;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }

.btn-solid {
  background: var(--amber);
  border-color: var(--amber);
  color: #12100A;
  font-weight: 600;
}
.btn-solid:hover { background: #FFC451; border-color: #FFC451; color: #12100A; }

/* =========================================================
   HEADER / NAV
   ========================================================= */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
}
.logo-mark {
  height: 36px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
.logo-full {
  height: 60px;
  width: auto;
  display: block;
  margin-bottom: 16px;
}
.logo-tagline {
  display: block;
  height: 15px;
  width: auto;
  margin-top: 5px;
  border-radius: 2px;
}

.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
}
.nav-links a {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: var(--radius);
  transition: color .2s ease, background .2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); background: var(--bg-panel-2); }
.nav-links a.active { color: var(--amber); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 1px;
  background: var(--amber);
}
.nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--text);
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 78px; left: 0; right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px var(--pad) 22px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-left: 0; margin-top: 10px; text-align: center; justify-content: center; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding: 88px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 { margin-bottom: 22px; }
.hero h1 .accent { color: var(--amber); }
.hero p.lead {
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 52px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.hero-stats div { flex: 1; padding-right: 20px; }
.hero-stats .num {
  font-family: var(--f-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stats .lbl {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.schematic-holder {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  border-radius: var(--radius);
  padding: 26px 20px 18px;
  position: relative;
}
.schematic-holder .cap {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Tek hat şeması SVG çizim animasyonu */
.trace {
  fill: none;
  stroke: var(--line-bright);
  stroke-width: 1.5;
}
.trace.live {
  stroke: var(--amber);
  stroke-dasharray: 6 420;
  stroke-dashoffset: 0;
  animation: flow 5.5s linear infinite;
}
.trace.live.blue { stroke: var(--blue); animation-duration: 6.5s; animation-direction: reverse; }
@keyframes flow {
  from { stroke-dashoffset: 426; }
  to { stroke-dashoffset: 0; }
}
.node-circle { fill: var(--bg-panel); stroke: var(--line-bright); stroke-width: 1.5; }
.node-circle.on { stroke: var(--amber); }
.node-label {
  font-family: var(--f-mono);
  font-size: 9.5px;
  fill: var(--text-faint);
  letter-spacing: 0.03em;
}

/* =========================================================
   SECTION GENERIC
   ========================================================= */
section { padding: 84px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { font-size: 1.02rem; }
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* =========================================================
   SERVICES GRID
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg-panel);
  padding: 30px 26px;
  transition: background .2s ease;
  position: relative;
}
.service-card:hover { background: var(--bg-panel-2); }
.service-card .ico {
  width: 34px; height: 34px;
  margin-bottom: 20px;
  color: var(--amber);
}
.service-card .ico svg { width: 100%; height: 100%; }
.service-card h3 { margin-bottom: 8px; font-size: 1.02rem; }
.service-card p { font-size: 0.9rem; }
.service-card .tag {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  position: absolute;
  top: 26px; right: 24px;
}

/* =========================================================
   CTA BAND
   ========================================================= */
.cta-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 60px 0;
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 1.6rem; max-width: 480px; }

/* =========================================================
   PROJECTS PAGE
   ========================================================= */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.filter-btn {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all .2s ease;
}
.filter-btn:hover { border-color: var(--line-bright); color: var(--text); }
.filter-btn.active { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 900px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-panel);
  transition: border-color .2s ease, transform .2s ease;
}
.project-card:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.project-media {
  aspect-ratio: 4 / 3;
  background: var(--bg-panel-2);
  position: relative;
  overflow: hidden;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-media .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  text-align: center;
  padding: 20px;
  background:
    repeating-linear-gradient(45deg, var(--bg-panel-2), var(--bg-panel-2) 10px, #131A25 10px, #131A25 20px);
}
.project-body { padding: 18px 20px 20px; }
.project-cat {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  color: var(--amber);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.project-body h3 { font-size: 1rem; margin-bottom: 6px; }
.project-spec {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.portrait-frame {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  border-radius: var(--radius);
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame .ph {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  text-align: center;
  padding: 20px;
}
.portrait-caption {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  color: var(--text-faint);
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 30px;
}
.credentials div { background: var(--bg-panel); padding: 18px 20px; }
.credentials .num { font-family: var(--f-mono); color: var(--amber); font-size: 0.72rem; letter-spacing: 0.06em; }
.credentials .desc { font-size: 0.88rem; color: var(--text-muted); margin-top: 6px; }

.values-list { margin-top: 20px; }
.values-list li {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.values-list li:last-child { border-bottom: 1px solid var(--line); }
.values-list .vnum {
  font-family: var(--f-mono);
  color: var(--text-faint);
  font-size: 0.8rem;
  flex-shrink: 0;
  padding-top: 2px;
}
.values-list h4 { font-size: 0.98rem; margin-bottom: 4px; }
.values-list p { font-size: 0.9rem; }

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 0.95rem;
  padding: 13px 14px;
  transition: border-color .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.field textarea { resize: vertical; min-height: 120px; }

.contact-info-list { margin-top: 8px; }
.contact-info-list li {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-info-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-info-list .ico { width: 20px; height: 20px; color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.contact-info-list .lbl { font-family: var(--f-mono); font-size: 0.68rem; color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.contact-info-list .val { font-size: 0.98rem; margin-top: 4px; }

.map-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 30px;
  filter: grayscale(1) invert(0.92) contrast(0.9);
}
.map-frame iframe { width: 100%; height: 260px; border: 0; display: block; }

.form-note {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 6px;
}
.form-success {
  display: none;
  border: 1px solid var(--amber);
  background: var(--amber-soft);
  padding: 16px 18px;
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-size: 0.85rem;
  color: var(--amber);
  margin-bottom: 20px;
}
.form-success.show { display: block; }

/* =========================================================
   FOOTER
   ========================================================= */
footer.site {
  border-top: 1px solid var(--line);
  padding: 56px 0 30px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-grid h4 {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a { font-size: 0.92rem; color: var(--text-muted); transition: color .2s; }
.footer-grid ul li a:hover { color: var(--amber); }
.footer-brand p { max-width: 34ch; font-size: 0.92rem; margin-top: 14px; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

/* =========================================================
   PAGE HEADER (inner pages)
   ========================================================= */
.page-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero p.lead { max-width: 60ch; font-size: 1.02rem; margin-top: 16px; }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .trace.live { animation: none; stroke-dasharray: none; }
}
