/* ========================================
   werxbank – Shared Styles
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: hsl(30 6% 10%);
  --bg-alt: hsl(30 6% 8%);
  --fg: hsl(40 20% 92%);
  --card: hsl(30 6% 14%);
  --primary: hsl(38 90% 55%);
  --primary-10: hsl(38 90% 55% / 0.1);
  --primary-20: hsl(38 90% 55% / 0.2);
  --primary-40: hsl(38 90% 55% / 0.4);
  --primary-60: hsl(38 90% 55% / 0.6);
  --secondary: hsl(30 6% 18%);
  --muted: hsl(30 8% 55%);
  --muted-low: hsl(30 8% 55% / 0.6);
  --muted-vlow: hsl(30 8% 55% / 0.5);
  --border: hsl(30 6% 22%);
  --radius: 0.75rem;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsl(30 6% 10% / 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.nav-brand span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--primary); }

/* ---- Container ---- */
.container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.container--narrow {
  max-width: 42rem;
}

/* ---- Hero / Header ---- */
.hero {
  position: relative;
  padding: 5rem 0 3rem;
  text-align: center;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}

.hero h1 {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.hero h1 span { color: var(--primary); }

.hero p {
  position: relative;
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.625;
  color: var(--muted);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Decorative Grid ---- */
.deco-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.04;
}

.deco-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--primary) 1px, transparent 1px),
    linear-gradient(90deg, var(--primary) 1px, transparent 1px);
  background-size: 4rem 4rem;
}

/* ---- Cards Grid ---- */
.cards { display: flex; flex-direction: column; gap: 1rem; }

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s;
  animation: fadeUp 0.5s ease-out both;
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }
.card:nth-child(5) { animation-delay: 0.4s; }
.card:nth-child(6) { animation-delay: 0.5s; }
.card:hover {
  border-color: var(--primary-40);
  background: var(--secondary);
  box-shadow: 0 10px 30px -10px hsl(38 90% 55% / 0.08);
  transform: translateY(-2px);
}

.card-inner { display: flex; align-items: flex-start; gap: 1.25rem; }

.icon-box {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--primary-10);
  color: var(--primary);
  transition: background 0.3s;
}

.card:hover .icon-box { background: var(--primary-20); }
.icon-box svg { width: 1.5rem; height: 1.5rem; }

.card-content { flex: 1; min-width: 0; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }

.card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 600;
  transition: color 0.3s;
}

.card:hover h3 { color: var(--primary); }

.card p {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted);
}

.card .url {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted-low);
}

.ext-icon, .arrow-icon {
  flex-shrink: 0;
  margin-top: 0.25rem;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.card:hover .ext-icon,
.card:hover .arrow-icon { opacity: 1; }

.card:hover .arrow-icon { transform: translateX(4px); }

.ext-icon svg, .arrow-icon svg { width: 1rem; height: 1rem; }

/* ---- Detail Page ---- */
.detail-hero-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.detail-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.detail-hero {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.detail-hero h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
}

.detail-hero p {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 36rem;
}

.section { margin-bottom: 3rem; }

.section h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

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

/* Screenshots Grid */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.screenshots img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.screenshot-placeholder {
  aspect-ratio: 16 / 10;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-low);
  font-size: 0.8125rem;
  font-family: 'JetBrains Mono', monospace;
}

/* Homescreen Demo */
.homescreen-demo {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.phone-mockup {
  width: 180px;
  height: 320px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.phone-mockup .app-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--primary-20);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.phone-mockup .app-icon svg { width: 1.5rem; height: 1.5rem; }

.phone-mockup .app-label {
  font-size: 0.6875rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

.homescreen-steps {
  flex: 1;
  min-width: 200px;
}

.homescreen-steps ol {
  list-style: none;
  counter-reset: step;
}

.homescreen-steps li {
  counter-increment: step;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.homescreen-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary-10);
  color: var(--primary);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

/* CTA Button */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--primary);
  color: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-cta:hover {
  background: var(--primary-60);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px hsl(38 90% 55% / 0.3);
}

.btn-cta svg { width: 1rem; height: 1rem; }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--primary); }
.back-link svg { width: 1rem; height: 1rem; }

/* ---- Footer ---- */
footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted-vlow);
}

/* ---- Content Page (Über mich, Impressum) ---- */
.content-page h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.content-page h2:first-child { margin-top: 0; }

/* About Photo */
.about-photo {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px;
}

.content-page p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1rem;
}

.content-page ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-page li {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* ---- Animations ---- */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.anim-fade-down { animation: fadeDown 0.6s ease-out both; }
.anim-fade-up { animation: fadeUp 0.5s ease-out both; }
.anim-fade-in { animation: fadeIn 0.6s ease-out both; }
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-6 { animation-delay: 0.6s; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .nav-inner { padding: 0 1rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.75rem; }
  .container { padding: 2.5rem 1rem; }
  .hero { padding: 3rem 0 2rem; }
  .homescreen-demo { flex-direction: column; align-items: stretch; }
  .phone-mockup { align-self: center; }
}
