/*
Theme Name: Powertrain Dynamics
Theme URI: https://powertrain-dynamics.com/
Author: OpenAI
Description: A lightweight custom WordPress theme for Powertrain Dynamics LTD, focused on engine management, calibration, tuning, and powertrain software services.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: powertrain-dynamics
*/

:root {
  --pd-red: #d41414;
  --pd-black: #0b0d10;
  --pd-charcoal: #181b20;
  --pd-text: #2d333a;
  --pd-muted: #6e7681;
  --pd-line: #e8eaed;
  --pd-bg: #ffffff;
  --pd-soft: #f6f7f9;
  --pd-max: 1180px;
  --pd-radius: 18px;
  --pd-shadow: 0 20px 60px rgba(10, 13, 18, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--pd-text);
  background: var(--pd-bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.pd-container { width: min(var(--pd-max), calc(100% - 40px)); margin: 0 auto; }
.pd-eyebrow { color: var(--pd-red); font-weight: 800; text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; }
.pd-section { padding: 92px 0; }
.pd-section-light { background: var(--pd-soft); }
.pd-section-dark { background: var(--pd-black); color: #fff; }
.pd-kicker { color: var(--pd-muted); max-width: 720px; margin: 10px 0 0; }

.pd-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(232,234,237,.75);
}
.pd-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.pd-brand img { width: 310px; max-width: 52vw; }
.pd-nav { display: flex; align-items: center; gap: 26px; font-size: .92rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pd-nav a:hover { color: var(--pd-red); }
.pd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px; background: var(--pd-red); color: #fff;
  font-weight: 800; text-transform: uppercase; letter-spacing: .07em; font-size: .84rem;
  border: 1px solid var(--pd-red); transition: transform .2s ease, background .2s ease;
}
.pd-btn:hover { transform: translateY(-2px); background: #b90f0f; }
.pd-btn-secondary { background: transparent; color: var(--pd-black); border-color: #cfd4da; }
.pd-btn-secondary:hover { background: var(--pd-black); color: #fff; }

.pd-hero { position: relative; overflow: hidden; padding: 98px 0 74px; background: linear-gradient(135deg, #fff 0%, #fff 44%, #f3f4f6 100%); }
.pd-hero:after {
  content: ""; position: absolute; right: -140px; top: 80px; width: 520px; height: 520px;
  border: 46px solid rgba(212,20,20,.08); border-radius: 50%; pointer-events: none;
}
.pd-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.pd-hero h1 { margin: 16px 0 18px; font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: .96; letter-spacing: -.06em; color: var(--pd-black); }
.pd-hero h1 span { color: var(--pd-red); }
.pd-hero p { font-size: 1.15rem; color: #4d5560; max-width: 650px; }
.pd-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.pd-hero-card { background: #fff; border: 1px solid var(--pd-line); box-shadow: var(--pd-shadow); border-radius: 28px; padding: 32px; }
.pd-hero-card img { width: 100%; margin-bottom: 28px; }
.pd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pd-stat { padding: 18px; border-radius: 16px; background: var(--pd-soft); border: 1px solid var(--pd-line); }
.pd-stat strong { display: block; color: var(--pd-black); font-size: 1.4rem; }
.pd-stat span { color: var(--pd-muted); font-size: .84rem; text-transform: uppercase; letter-spacing: .08em; }

.pd-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 34px; }
.pd-card { background: #fff; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); padding: 30px; box-shadow: 0 12px 35px rgba(10,13,18,.04); }
.pd-card h3 { color: var(--pd-black); margin: 0 0 10px; font-size: 1.2rem; }
.pd-card p { color: var(--pd-muted); margin: 0; }
.pd-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(212,20,20,.1); color: var(--pd-red); display: grid; place-items: center; font-weight: 900; margin-bottom: 18px; }

.pd-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.pd-split h2, .pd-section h2 { margin: 10px 0 12px; color: var(--pd-black); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.04; letter-spacing: -.04em; }
.pd-section-dark h2 { color: #fff; }
.pd-list { display: grid; gap: 16px; }
.pd-list-item { padding: 22px; border: 1px solid var(--pd-line); border-radius: 16px; background: #fff; }
.pd-list-item strong { color: var(--pd-black); display: block; margin-bottom: 5px; }

.pd-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.pd-service { padding: 28px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); }
.pd-service h3 { margin: 0 0 10px; color: #fff; }
.pd-service p { color: rgba(255,255,255,.68); margin: 0; }

.pd-process { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.pd-step { counter-increment: step; border-left: 3px solid var(--pd-red); padding: 4px 0 4px 18px; }
.pd-step:before { content: "0" counter(step); color: var(--pd-red); font-weight: 900; letter-spacing: .12em; }
.pd-step h3 { margin: 8px 0 6px; color: var(--pd-black); }
.pd-step p { margin: 0; color: var(--pd-muted); }

.pd-cta { border-radius: 28px; background: var(--pd-black); color: #fff; padding: 46px; display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; position: relative; }
.pd-cta:after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; background: rgba(212,20,20,.2); }
.pd-cta h2 { color: #fff; margin: 0 0 8px; font-size: clamp(1.8rem, 3vw, 3rem); }
.pd-cta p { margin: 0; color: rgba(255,255,255,.7); }
.pd-cta > * { position: relative; z-index: 1; }

.pd-footer { background: #08090b; color: rgba(255,255,255,.72); padding: 48px 0; }
.pd-footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 34px; }
.pd-footer img { width: 280px; background: #fff; padding: 10px; border-radius: 10px; margin-bottom: 18px; }
.pd-footer h4 { color: #fff; margin: 0 0 12px; }
.pd-footer a { display: block; margin: 7px 0; color: rgba(255,255,255,.72); }
.pd-footer a:hover { color: #fff; }
.pd-small { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 20px; font-size: .9rem; }

.pd-page { padding: 72px 0; }
.pd-page h1 { color: var(--pd-black); font-size: clamp(2.2rem, 5vw, 4rem); }

@media (max-width: 920px) {
  .pd-nav { display: none; }
  .pd-hero-grid, .pd-split, .pd-footer-grid { grid-template-columns: 1fr; }
  .pd-three, .pd-services { grid-template-columns: 1fr 1fr; }
  .pd-process { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .pd-container { width: min(100% - 28px, var(--pd-max)); }
  .pd-brand img { max-width: 68vw; }
  .pd-hero { padding-top: 64px; }
  .pd-three, .pd-services, .pd-process, .pd-stats { grid-template-columns: 1fr; }
  .pd-cta { display: block; padding: 32px; }
  .pd-cta .pd-btn { margin-top: 22px; }
}
