/* ============================================================
   uhl-tools.de — Hosting-Visitenkarte Tim Uhlmann
   CSS Custom Properties + Dark Mode + Responsive
   ============================================================ */

/* --- Custom Properties (Light) --- */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #334155;
  --heading: #1e3a5f;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --muted: #64748b;
  --footer-bg: #1e3a5f;
  --hero-start: #eff6ff;
  --shadow: 0 2px 16px rgba(30, 58, 95, 0.08);
  --shadow-hover: 0 6px 28px rgba(30, 58, 95, 0.16);
  --radius: 12px;
  --radius-sm: 6px;
  --max-w: 1100px;
}

/* --- Dark Mode (System) --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f172a;
    --surface: #1e293b;
    --border: #334155;
    --text: #e2e8f0;
    --heading: #f1f5f9;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-light: #1e3a5f;
    --muted: #94a3b8;
    --footer-bg: #0a1628;
    --hero-start: #0a1628;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 6px 28px rgba(0, 0, 0, 0.55);
  }
}

/* --- Dark Mode (Explicit) --- */
:root[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --heading: #f1f5f9;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: #1e3a5f;
  --muted: #94a3b8;
  --footer-bg: #0a1628;
  --hero-start: #0a1628;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 6px 28px rgba(0, 0, 0, 0.55);
}

/* --- Base Reset --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  color: var(--heading);
  line-height: 1.2;
  margin: 0;
}

p { margin: 0; }

a { color: var(--accent); }

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  z-index: 200;
  transition: top 0.15s;
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   Layout Helpers
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 1.0625rem;
  margin-bottom: 3rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.875rem 2.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  color: #fff;
  outline: none;
}

/* ============================================================
   Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  font-weight: 900;
  font-size: 1.125rem;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.025em;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-logo .logo-name { font-size: 1rem; }
.nav-logo .logo-domain {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9375rem;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--heading);
  line-height: 0;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: linear-gradient(150deg, var(--hero-start) 0%, var(--bg) 65%);
  padding: 6.5rem 0 5.5rem;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.375rem 1.125rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.hero-trust {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0.75rem;
}

/* ============================================================
   Leistungen
   ============================================================ */
.leistungen { background: var(--surface); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.625rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.375rem;
  color: var(--accent);
}
.card-icon svg { width: 24px; height: 24px; }

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ============================================================
   Referenzen
   ============================================================ */
.referenzen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.ref-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.ref-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.ref-preview {
  height: 186px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
}

/* Simulated browser dots */
.ref-preview::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;
  background: rgba(0, 0, 0, 0.25);
}
.ref-preview::after {
  content: '● ● ●';
  position: absolute;
  top: 6px;
  left: 14px;
  font-size: 9px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.5);
}

.ref-preview-kneipe {
  background: linear-gradient(145deg, #0d1a12 0%, #12201a 45%, #243a2c 100%);
}

.ref-preview-womoroute {
  background: linear-gradient(145deg, #1a3018 0%, #264420 55%, #3a5e30 100%);
}

.ref-preview-placeholder {
  background: linear-gradient(145deg, #5a5248 0%, #8a7d75 100%);
  color: rgba(255, 255, 255, 0.5);
}

.ref-preview-domain {
  margin-top: 10px;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.ref-body { padding: 1.375rem 1.625rem 1.5rem; }

.ref-body h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.4rem;
}

.ref-body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.ref-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  transition: color 0.15s, gap 0.15s;
}
.ref-link:hover { color: var(--accent-hover); gap: 0.5rem; }
.ref-link svg { width: 13px; height: 13px; }

.ref-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ============================================================
   Über mich
   ============================================================ */
.ueber { background: var(--bg); }

.ueber-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 1.375rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  letter-spacing: -0.02em;
}

.ueber-inner h2 {
  font-size: clamp(1.375rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.ueber-inner p {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}

/* ============================================================
   Kontakt
   ============================================================ */
.kontakt { background: var(--surface); }

.kontakt-inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}

.kontakt-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1.125rem;
}

.kontakt-inner > p {
  color: var(--muted);
  font-size: 1.0625rem;
  margin-bottom: 2.25rem;
  line-height: 1.65;
}

.kontakt-note {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.kontakt-email {
  color: var(--accent);
  font-weight: 700;
}
.kontakt-email:hover { color: var(--accent-hover); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.875rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.site-footer a:hover { color: var(--accent); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.375rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-links.is-open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.875rem 1.5rem;
  }

  .nav-toggle { display: block; }

  .hero { padding: 4rem 0 3.5rem; }

  .section { padding: 3.5rem 0; }

  .cards-grid { grid-template-columns: 1fr 1fr; }

  .referenzen-grid { grid-template-columns: 1fr; }

  .hero-trust span { display: block; margin: 0.25rem 0; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }

  .hero h1 { letter-spacing: -0.01em; }
}
