/* Klarhimmel — klarhimmel.com */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

/* Theme tokens */
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b7280;
  --surface: #f9fafb;
  --border: #e5e7eb;
  --accent: #0a0a0a;
  --font-sans: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --max-w: 1200px;
  --max-w-md: 768px;
  --section-py: 7rem;
  --px: 1.5rem;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #fafafa;
  --muted: #a1a1aa;
  --surface: #111111;
  --border: #27272a;
  --accent: #fafafa;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a;
    --fg: #fafafa;
    --muted: #a1a1aa;
    --surface: #111111;
    --border: #27272a;
    --accent: #fafafa;
  }
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--fg); color: var(--bg); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--px); }
.container-md { max-width: var(--max-w-md); margin: 0 auto; padding: 0 var(--px); }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.logo { display: flex; align-items: center; gap: 0.625rem; }
.logo svg { height: 1.75rem; width: 1.75rem; color: var(--fg); }
.logo-wordmark { height: 0.75rem; width: auto; color: var(--fg); display: none; }
@media (min-width: 640px) { .logo-wordmark { display: block; } }

/* Nav */
.nav-desktop { display: none; align-items: center; gap: 2rem; }
@media (min-width: 640px) { .nav-desktop { display: flex; } }
.nav-link { font-size: 0.875rem; color: var(--muted); transition: color 0.15s; }
.nav-link:hover { color: var(--fg); }
.nav-cta {
  display: inline-block; padding: 0.5rem 1rem;
  background: var(--fg); color: var(--bg);
  border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.8; }

/* Mobile nav */
.nav-mobile-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  background: none; border: none; cursor: pointer;
  position: relative;
}
@media (min-width: 640px) { .nav-mobile-toggle { display: none; } }
.hamburger { position: relative; width: 1.25rem; height: 1rem; }
.hamburger span {
  position: absolute; left: 0; display: block;
  width: 100%; height: 1px; background: var(--fg);
  transition: all 0.2s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }
.nav-open .hamburger span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-open .hamburger span:nth-child(2) { opacity: 0; }
.nav-open .hamburger span:nth-child(3) { top: 50%; transform: translateY(-50%) rotate(-45deg); }

.nav-mobile-panel {
  display: none;
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(12px);
}
.nav-open .nav-mobile-panel { display: block; }
.nav-mobile-panel .container { display: flex; flex-direction: column; gap: 0.25rem; padding-top: 1rem; padding-bottom: 1rem; }
.nav-mobile-link {
  display: block; padding: 0.625rem 0.75rem;
  font-size: 0.875rem; color: var(--muted);
  border-radius: 0.5rem; transition: all 0.15s;
}
.nav-mobile-link:hover { background: var(--surface); color: var(--fg); }
.nav-mobile-cta {
  display: block; margin-top: 0.5rem; padding: 0.625rem 0.75rem;
  background: var(--fg); color: var(--bg);
  border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500;
  text-align: center; transition: opacity 0.15s;
}
.nav-mobile-cta:hover { opacity: 0.8; }

/* Theme toggle */
.theme-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--muted); display: flex; align-items: center;
  padding: 0.25rem; transition: color 0.15s;
}
.theme-toggle:hover { color: var(--fg); }
.theme-toggle svg { width: 1.125rem; height: 1.125rem; }
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-icon-moon { display: block; }
}

/* Hero */
.hero {
  display: flex; align-items: center; justify-content: center;
  min-height: 85vh; padding: 5rem var(--px) 0;
  text-align: center;
}
.hero-label {
  margin-bottom: 1.5rem;
  font-family: var(--font-mono); font-size: 0.875rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.hero-sub {
  max-width: 36rem; margin: 0 auto 2.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.6; color: var(--muted);
}
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; justify-content: center; } }
.btn-primary {
  display: inline-block; padding: 0.875rem 2rem;
  background: var(--fg); color: var(--bg);
  border-radius: 0.5rem; font-size: 1rem; font-weight: 500;
  transition: opacity 0.15s; border: none; cursor: pointer;
}
.btn-primary:hover { opacity: 0.8; }
.btn-secondary {
  display: inline-block; padding: 0.875rem 2rem;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 0.5rem;
  font-size: 1rem; font-weight: 500; transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--fg); color: var(--fg); }

/* Section */
section { padding: var(--section-py) 0; }
.section-label {
  margin-bottom: 1rem;
  font-family: var(--font-mono); font-size: 0.875rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem;
}
.section-subtitle {
  max-width: 42rem; font-size: 1.125rem; color: var(--muted);
  margin-bottom: 4rem;
}

/* Card grid */
.card-grid { display: grid; gap: 2rem; }
@media (min-width: 640px) { .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .card-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Card */
.card {
  display: flex; flex-direction: column;
  padding: 2rem; border-radius: 0.75rem;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color 0.15s;
}
a.card:hover, .card-link:hover { border-color: color-mix(in srgb, var(--fg) 20%, transparent); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.card-number {
  font-family: var(--font-mono); font-size: 1.875rem; font-weight: 700;
  color: color-mix(in srgb, var(--muted) 40%, transparent);
  transition: color 0.15s;
}
a.card:hover .card-number { color: color-mix(in srgb, var(--fg) 50%, transparent); }
.card h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.card p { font-size: 0.875rem; line-height: 1.7; color: var(--muted); }
.card-cta {
  margin-top: auto; padding-top: 1.5rem;
  font-size: 0.875rem; font-weight: 500; color: var(--muted);
  transition: color 0.15s;
}
a.card:hover .card-cta { color: var(--fg); }

/* Tier badge */
.tier { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem;
  border-radius: 0.375rem; font-family: var(--font-mono);
  font-size: 0.75rem; font-weight: 600; }
.tier-s { background: var(--fg); color: var(--bg); }
.tier-a { border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); color: var(--fg); }
.tier-b { border: 1px solid var(--border); color: var(--muted); }

/* Steps */
.steps { display: grid; gap: 3rem; position: relative; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-circle {
  display: flex; align-items: center; justify-content: center;
  width: 4rem; height: 4rem; margin-bottom: 1.5rem;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-mono); font-size: 1.125rem; font-weight: 700;
}
.step h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.step p { font-size: 0.875rem; line-height: 1.7; color: var(--muted); }

/* Case studies */
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; padding-top: 1.5rem; }
.project-tag {
  padding: 0.25rem 0.75rem; border-radius: 9999px;
  border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
}

/* Contact CTA */
.cta-box {
  border-radius: 1rem; border: 1px solid var(--border); background: var(--surface);
  padding: 3rem; text-align: center;
}
@media (min-width: 640px) { .cta-box { padding: 4rem; } }
.cta-box h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }
.cta-box p { max-width: 32rem; margin: 0 auto 2.5rem; font-size: 1.125rem; color: var(--muted); }
.cta-box .location { margin-top: 1.5rem; font-size: 0.875rem; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; }
.site-footer .container {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 640px) { .site-footer .container { flex-direction: row; } }
.footer-left { display: flex; align-items: center; gap: 1rem; }
.footer-sep { color: color-mix(in srgb, var(--muted) 30%, transparent); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-link { font-size: 0.875rem; color: var(--muted); transition: color 0.15s; }
.footer-link:hover { color: var(--fg); }
.footer-copy { font-size: 0.875rem; color: var(--muted); }

/* Service detail page */
.service-hero { padding-top: 8rem; padding-bottom: 5rem; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.375rem;
  margin-bottom: 2rem; font-size: 0.875rem; color: var(--muted);
  transition: color 0.15s;
}
.back-link:hover { color: var(--fg); }
.service-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem;
}
.service-tagline { font-size: 1.25rem; color: var(--muted); max-width: 36rem; }

/* Deliverables list */
.deliverables { padding-left: 1.25rem; }
.deliverables li {
  list-style: disc; font-size: 0.9375rem; color: var(--muted);
  line-height: 1.7; margin-bottom: 0.5rem;
}

/* Pricing cards */
.pricing-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }
.pricing-card {
  padding: 2rem; border-radius: 0.75rem;
  border: 1px solid var(--border); background: var(--surface);
}
.pricing-tier { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.5rem; }
.pricing-price { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.pricing-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* Turnaround */
.turnaround { display: flex; flex-direction: column; gap: 0.5rem; }
.turnaround-item { display: flex; gap: 1rem; font-size: 0.9375rem; }
.turnaround-label { font-weight: 600; min-width: 5rem; }
.turnaround-time { color: var(--muted); }

/* Ideal client */
.ideal-clients { padding-left: 1.25rem; }
.ideal-clients li {
  list-style: disc; font-size: 0.9375rem; color: var(--muted);
  line-height: 1.7; margin-bottom: 0.5rem;
}

/* Prose (blog) */
.prose { line-height: 1.75; color: var(--fg); }
.prose p { margin-bottom: 1.5rem; }
.prose h2 {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.025em;
  margin-top: 3rem; margin-bottom: 1rem;
}
.prose h3 {
  font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em;
  margin-top: 2rem; margin-bottom: 0.75rem;
}
.prose p:last-child { margin-bottom: 0; }

/* Utility */
main { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
