/*
Theme Name: Primalogic
Theme URI: https://primalogic.de
Author: Primalogic Team
Author URI: https://primalogic.de
Description: Custom theme for Primalogic – energy optimization and AI consulting.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: primalogic
*/

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  --bg:      #0c0e14;
  --panel:   #121622;
  --panel-2: #161b29;
  --text:    #f1f5f9;
  --muted:   #7a8092;
  --sub:     #c8cfdd;
  --line:    rgba(255, 255, 255, 0.08);
  --iot:     #38bdf8;
  --ai:      #c084fc;
  --eff:     #fb923c;

  --font-body:    'Karla', sans-serif;
  --font-heading: 'Cormorant Garamond', serif;
  --font-label:   'Rajdhani', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 16px;

  --header-h: 68px;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }

/* ── Layout ────────────────────────────────────────────────────── */
.container {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 300;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.1;
}

.section-sub {
  max-width: 700px;
  color: var(--muted);
  margin: 0 auto 52px;
  text-align: center;
  font-size: 16px;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: opacity 0.2s, transform 0.2s;
  background: transparent;
  color: var(--text);
}
.btn:hover { opacity: 0.82; transform: translateY(-2px); }

.btn-primary {
  background: var(--eff);
  border-color: var(--eff);
  color: #fff;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.card p  { color: var(--sub); font-size: 15px; line-height: 1.65; }

/* ── Kicker ────────────────────────────────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--eff);
  text-transform: uppercase;
  letter-spacing: 2.4px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
  font-family: var(--font-label);
}
.kicker::before,
.kicker::after {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--eff);
}

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(12, 14, 20, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a,
.nav-links li a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links li a:hover { color: var(--text); }

/* Strip default WP menu list styling */
.nav-links ul { display: flex; gap: 32px; align-items: center; list-style: none; }
.nav-links li { list-style: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.mobile-nav a:hover { color: var(--text); }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 300;
  line-height: 1.02;
  margin-bottom: 24px;
}

.hero h1 .iot { color: var(--iot); font-style: italic; }
.hero h1 .ai  { color: var(--ai);  font-style: italic; }
.hero h1 .eff { color: var(--eff); font-style: italic; }

.hero-lead {
  max-width: 520px;
  color: var(--sub);
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 12px;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 400;
  color: var(--eff);
  line-height: 1;
  margin-bottom: 4px;
}

.stat span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-family: var(--font-label);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

#neural-flow-container {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
}

/* Prevent WordPress normalize from clipping SVG halos */
#neural-flow-container svg {
  overflow: visible !important;
  display: block;
}

.hero-visual {
  overflow: visible;
}

/* ── Services grid ─────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* ── Pipeline ──────────────────────────────────────────────────── */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pipeline-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.pipeline-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.pipeline-step.iot::before { background: var(--iot); }
.pipeline-step.ai::before  { background: var(--ai); }
.pipeline-step.eff::before { background: var(--eff); }

.pipeline-step small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 11px;
  margin-bottom: 14px;
  font-family: var(--font-label);
}

.pipeline-step h3 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 18px;
}

.pipeline-step ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipeline-step li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sub);
  font-size: 14px;
}

.pipeline-step li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pipeline-step.iot li::before { background: var(--iot); }
.pipeline-step.ai  li::before { background: var(--ai); }
.pipeline-step.eff li::before { background: var(--eff); }

/* ── Contact form ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 36px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sub);
  font-size: 15px;
  margin-bottom: 14px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-family: var(--font-label);
}

.form-group input,
.form-group textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(251, 146, 60, 0.5);
}

.form-group textarea { min-height: 130px; }

.form-privacy {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.form-privacy a { color: var(--eff); text-decoration: underline; }

.form-success {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  padding: 20px;
  color: var(--iot);
  font-size: 15px;
  text-align: center;
}

.form-error {
  color: #f87171;
  font-size: 13px;
}

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  padding: 52px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 2px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ── Cookie banner ─────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-text {
  font-size: 13px;
  color: var(--sub);
  flex: 1;
  min-width: 220px;
}

.cookie-text a { color: var(--eff); text-decoration: underline; }

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: opacity 0.2s;
  cursor: pointer;
  border: none;
}
.cookie-btn:hover { opacity: 0.82; }

.cookie-btn-accept {
  background: var(--eff);
  color: #fff;
}

.cookie-btn-decline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ── Legal pages ───────────────────────────────────────────────── */
.legal-page {
  min-height: calc(100vh - var(--header-h));
  padding: 72px 0 100px;
}

.legal-page h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.legal-section {
  margin-bottom: 44px;
}

.legal-section h2 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--eff);
  margin-bottom: 14px;
  font-family: var(--font-label);
}

.legal-section p {
  color: var(--sub);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-section ul {
  list-style: disc;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section li {
  color: var(--sub);
  font-size: 15px;
  line-height: 1.65;
}

.legal-section a {
  color: var(--eff);
  text-decoration: underline;
}

.legal-placeholder {
  color: var(--eff);
  font-style: italic;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid    { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual  { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .nav-links    { display: none; }
  .hamburger    { display: flex; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .container  { padding: 0 16px; }
  .section    { padding: 60px 0; }
  .hero       { padding: 52px 0 40px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat strong { font-size: 28px; }
  .card-grid  { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
}
