/*
Theme Name: AutoTech Baydemir
Theme URI: https://cotoagency.com
Author: Coto Agency
Author URI: https://cotoagency.com
Description: Dark, performance-focused theme for AutoTech Baydemir – ECU software, performance tuning and auto service. Built by Coto Agency.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: autotech
*/

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0c;
  --bg-2: #111115;
  --surface: #17171c;
  --surface-2: #1f1f26;
  --line: rgba(255, 255, 255, .08);
  --text: #f3f3f5;
  --muted: #9b9ba6;
  --red: #e10600;
  --red-2: #ff2a1f;
  --red-glow: rgba(225, 6, 0, .35);
  --radius: 14px;
  --max: 1200px;
  --font-head: "Rajdhani", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.6em; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; transition: .25s ease;
}
.btn-red { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px var(--red-glow); }
.btn-red:hover { background: var(--red-2); transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--red-glow); }
.btn-ghost { border-color: rgba(255,255,255,.25); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(10,10,12,.88); backdrop-filter: blur(12px); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand-main { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; letter-spacing: .08em; font-style: italic; }
.brand-sub { font-family: var(--font-head); font-weight: 600; font-size: .78rem; letter-spacing: .42em; color: var(--red); margin-top: 3px; padding-left: 2px; }
.brand img { max-height: 54px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; }
.main-nav a { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.main-nav a:hover { color: #fff; }
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .btn { padding: .7em 1.2em; font-size: .95rem; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: currentColor; margin: 6px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; padding: 120px 0 80px;
  background:
    radial-gradient(ellipse at 75% 40%, rgba(225,6,0,.22), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(225,6,0,.10), transparent 50%),
    var(--bg);
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 25%, rgba(10,10,12,.6) 60%, rgba(10,10,12,.3)); }
.hex-pattern {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 32L0 82V66l28 16 28-16v16L28 98z' fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1.2'/%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; letter-spacing: .3em; text-transform: uppercase; font-size: .85rem; color: var(--red);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--red); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.16; text-transform: uppercase; margin-bottom: .3em; }
.hero h1 em { font-style: normal; color: var(--red); display: block; }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 540px; margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-brands { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 46px; font-family: var(--font-head); font-weight: 700; letter-spacing: .2em; color: rgba(255,255,255,.4); font-size: .95rem; }
.hero-brands span:not(:last-child)::after { content: "•"; margin-left: 22px; color: var(--red); }

/* Gauge */
.gauge-wrap { position: relative; aspect-ratio: 1; max-width: 460px; margin-left: auto; width: 100%; }
.gauge-wrap svg { width: 100%; height: 100%; overflow: visible; }
.gauge-arc { stroke-dasharray: 600; stroke-dashoffset: 600; animation: gaugeFill 2.2s 0.4s cubic-bezier(.2,.8,.2,1) forwards; }
.gauge-needle { transform-origin: 200px 200px; transform: rotate(-120deg); animation: needle 2.2s 0.4s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes gaugeFill { to { stroke-dashoffset: 110; } }
@keyframes needle { to { transform: rotate(75deg); } }
.gauge-readout { position: absolute; left: 0; right: 0; top: 67%; text-align: center; }
.gauge-readout strong { display: block; font-family: var(--font-head); font-size: 3.2rem; line-height: 1; }
.gauge-readout small { color: var(--muted); letter-spacing: .3em; font-size: .75rem; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); text-transform: uppercase; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Stats strip */
.stats { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 38px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2.6rem; line-height: 1; color: #fff; }
.stat strong .suf { color: var(--red); }
.stat small { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  position: relative; padding: 34px 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); overflow: hidden; transition: .3s ease;
}
.service-card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--red); transition: width .4s ease; }
.service-card:hover { transform: translateY(-6px); border-color: rgba(225,6,0,.4); }
.service-card:hover::before { width: 100%; }
.service-icon {
  width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 22px;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  background: rgba(225,6,0,.14); color: var(--red);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 1.5rem; text-transform: uppercase; }
.service-card p { color: var(--muted); margin: 0; font-size: .97rem; }
.service-card.featured { background: linear-gradient(160deg, rgba(225,6,0,.22), var(--surface) 60%); border-color: rgba(225,6,0,.45); }
.tag { display: inline-block; font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--red); color: #fff; margin-bottom: 14px; font-weight: 600; }

/* Stages */
.stage-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; }
.stage-tab {
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .8em 1.8em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: .25s;
}
.stage-tab.active, .stage-tab:hover { color: #fff; border-color: var(--red); }
.stage-tab.active { background: var(--red); }
.stage-panel { display: none; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 50px; }
.stage-panel.active { display: grid; animation: fadeUp .5s ease; }
.stage-panel h3 { font-size: 2.4rem; text-transform: uppercase; }
.stage-panel ul { list-style: none; padding: 0; margin: 20px 0 0; }
.stage-panel li { padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); position: relative; color: #d6d6dc; }
.stage-panel li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 10px; height: 10px; background: var(--red); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.gain-bars { display: grid; gap: 26px; }
.gain-bar label { display: flex; justify-content: space-between; font-family: var(--font-head); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.gain-bar label b { color: var(--red); font-size: 1.3rem; }
.bar { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #7a0400, var(--red), var(--red-2)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.note { color: var(--muted); font-size: .85rem; margin-top: 18px; }

/* Process */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.process-step { position: relative; padding: 30px 26px; border-left: 2px solid var(--line); }
.process-step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-head); font-weight: 700; font-size: 3.4rem; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(225,6,0,.7); display: block; margin-bottom: 16px;
}
.process-step:hover { border-color: var(--red); }
.process-step h4 { font-size: 1.3rem; text-transform: uppercase; }
.process-step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Brands */
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.brand-tile {
  aspect-ratio: 16/9; display: grid; place-items: center; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; letter-spacing: .14em; color: rgba(255,255,255,.55); transition: .3s;
}
.brand-tile:hover { color: #fff; border-color: var(--red); box-shadow: 0 0 40px -12px var(--red-glow) inset; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: .3s; display: flex; flex-direction: column; }
.project-card:hover { border-color: rgba(225,6,0,.5); transform: translateY(-4px); }
.project-thumb { aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; position: relative; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.18); font-family: var(--font-head); letter-spacing: .3em; }
.project-body { padding: 22px 24px 26px; }
.project-body h3 { font-size: 1.35rem; text-transform: uppercase; margin-bottom: 12px; }
.project-specs { display: flex; gap: 10px; flex-wrap: wrap; }
.spec { font-size: .82rem; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); color: #d6d6dc; }
.spec b { color: var(--red); }
.empty-note { text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; }

/* FAQ */
.faq { max-width: 860px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-family: var(--font-head); font-weight: 600; font-size: 1.3rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--red); font-size: 1.8rem; transition: .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 22px; margin: 0; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: 24px; padding: 70px 60px;
  background: linear-gradient(120deg, #7a0400, var(--red) 55%, #ff3b2f);
  display: grid; grid-template-columns: 1.4fr auto; gap: 30px; align-items: center;
}
.cta-band .hex-pattern { opacity: 1; mask-image: none; -webkit-mask-image: none; }
.cta-band h2 { font-size: clamp(2rem, 4vw, 3rem); text-transform: uppercase; position: relative; }
.cta-band p { position: relative; margin: 0; color: rgba(255,255,255,.85); font-size: 1.1rem; }
.cta-band .btn { background: #0a0a0c; color: #fff; position: relative; }
.cta-band .btn:hover { background: #000; transform: translateY(-2px); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; }
.contact-info { display: grid; gap: 16px; align-content: start; }
.info-item { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.info-item svg { width: 24px; height: 24px; color: var(--red); flex: none; margin-top: 2px; }
.info-item small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; }
.info-item strong { font-size: 1.05rem; font-weight: 600; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 220px; }
.map-embed iframe { width: 100%; height: 260px; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 40px; }
.contact-form h3 { font-size: 1.8rem; text-transform: uppercase; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: inherit; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field textarea { min-height: 120px; resize: vertical; }
.form-msg { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.form-msg.ok { background: rgba(40,180,90,.15); border: 1px solid rgba(40,180,90,.4); }
.form-msg.err { background: rgba(225,6,0,.15); border: 1px solid rgba(225,6,0,.4); }
.hp-field { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: #060607; border-top: 1px solid var(--line); padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-grid h4 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .12em; color: #fff; }
.footer-grid p, .footer-grid li { color: var(--muted); font-size: .95rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--red); }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); transition: .25s; }
.socials a:hover { background: var(--red); border-color: var(--red); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .85rem; }
.footer-bottom a { color: #fff; }
.footer-bottom a:hover { color: var(--red); }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: .25s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* Inner pages */
.page-hero { padding: 160px 0 60px; background: radial-gradient(ellipse at 80% 0, rgba(225,6,0,.18), transparent 60%), var(--bg-2); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); text-transform: uppercase; margin: 0; }
.entry { padding: 70px 0 100px; }
.entry-content { max-width: 820px; }
.entry-content a { color: var(--red); }
.project-detail { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; }
.project-detail .specs-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; align-self: start; }
.specs-box dl { margin: 0; display: grid; gap: 14px; }
.specs-box dt { color: var(--muted); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.specs-box dd { margin: 0; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; }
.specs-box dd b { color: var(--red); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 78px 0 auto; background: rgba(10,10,12,.97); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .main-nav.open { max-height: 420px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 20px 20px; }
  .main-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .header-cta .btn { display: none; }
  .hero-grid, .stage-panel, .contact-grid, .project-detail, .cta-band { grid-template-columns: 1fr; }
  .gauge-wrap { max-width: 280px; margin: 10px auto 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .stage-panel { padding: 30px; }
  .cta-band { padding: 50px 30px; }
}
@media (max-width: 600px) {
  .section { padding: 80px 0; }
  .services-grid, .projects-grid, .process-grid, .footer-grid, .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .gauge-arc { stroke-dashoffset: 110; }
  .gauge-needle { transform: rotate(75deg); }
}
