/* home.css — page-specific styles for index/landing page */

/* ─── HERO (light-mode override) ────────────────────────────── */
[data-theme="light"] #hero {
  --text-primary:  #E8E4DC;
  --text-secondary:#8A8580;
  --text-muted:    #4A4845;
  color: #E8E4DC;
}

/* ─── HERO ──────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Atmospheric background layers */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* WebGL smoke canvas */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  will-change: transform;
}

/* Dark vignette — ensures text readability over any smoke color */
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(10,10,11,0.78) 0%, rgba(10,10,11,0.55) 45%, rgba(10,10,11,0.35) 70%, rgba(10,10,11,0.55) 100%),
    linear-gradient(to bottom, rgba(10,10,11,0.45) 0%, transparent 35%, transparent 65%, rgba(10,10,11,0.55) 100%);
  pointer-events: none;
}

/* Grid blueprint lines — overlay on top of canvas */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200, 137, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 137, 42, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0.25) 70%, transparent 100%);
  pointer-events: none;
}

/* Diagonal accent line */
.hero-diagonal {
  position: absolute;
  width: 1px;
  height: 80%;
  background: linear-gradient(to bottom, transparent, rgba(200,137,42,0.18), transparent);
  top: 10%; right: 30%;
  transform: rotate(15deg);
  transform-origin: top;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
  padding-top: 8rem;
  padding-bottom: 5rem;
}

.hero-eyebrow {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
}

.hero-eyebrow .label { opacity: 0; animation: revealUp 0.7s var(--ease-out) 0.3s forwards; }

.hero-eyebrow-line {
  height: 1px;
  width: 50px;
  background: var(--accent);
  opacity: 0;
  animation: revealWidth 0.7s var(--ease-out) 0.5s forwards;
}

@keyframes revealWidth { from { width: 0; opacity: 0; } to { width: 50px; opacity: 1; } }

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7.5vw, 7rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.15em;
}

.hero-headline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px);
}

.hero-headline .line { display: block; }

.hero-headline .word:nth-child(1) { animation: revealUp 0.9s var(--ease-out) 0.5s forwards; }
.hero-headline .word:nth-child(2) { animation: revealUp 0.9s var(--ease-out) 0.65s forwards; }
.hero-headline .word.accent-word  {
  color: var(--accent-hot);
  font-style: italic;
  animation: revealUp 0.9s var(--ease-out) 0.8s forwards;
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(50px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out) 1.0s forwards;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out) 1.15s forwards;
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out) 1.6s forwards;
}

.scroll-hint span {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-chevron {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50%       { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
}

/* ─── MISSION ───────────────────────────────────────────────── */
#mission {
  border-top: 1px solid var(--border);
}

#mission .section-inner {
  text-align: center;
  max-width: 900px;
}

.mission-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.mission-quote::before {
  content: '\201C';
  font-size: 6rem;
  line-height: 0;
  position: absolute;
  top: 1.5rem; left: -1.5rem;
  color: var(--accent);
  opacity: 0.3;
  font-style: normal;
}

.mission-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 4rem;
  line-height: 1.9;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 4rem;
}

.stat-item {
  padding: 2.5rem 2rem;
  background: var(--bg-surface);
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.5s;
}

.stat-item:hover::before { opacity: 1; }

.stat-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ─── SERVICES ──────────────────────────────────────────────── */
#leistungen {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: background 0.4s var(--ease-out), transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  opacity: 0;
  transform: translateY(30px);
}

.service-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 0;
  background: var(--accent);
  transition: height 0.4s var(--ease-out);
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(200,137,42,0.04) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  background: var(--bg-elevated);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(200,137,42,0.12);
}

.service-card:hover::before { height: 100%; }
.service-card:hover::after { opacity: 1; }

.service-number {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 300;
  color: var(--text-muted);
  opacity: 0.25;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.4s, color 0.4s;
}

.service-card:hover .service-number { opacity: 0.4; color: var(--accent); }

.service-icon {
  width: 44px; height: 44px;
  margin-bottom: 1.5rem;
  color: var(--accent);
  flex-shrink: 0;
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.service-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.service-tag {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s;
}

.service-card:hover .service-tag {
  border-color: var(--accent-border);
  color: var(--text-secondary);
}

/* ─── SOCIAL PROOF ────────────────────────────────────────── */
#social-proof {
  border-top: 1px solid var(--border);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color 0.3s, transform 0.3s;
}

.testimonial-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-style: italic;
  flex: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.author-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.author-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── SOCIAL PROOF (refined / override block) ─────────────── */
#social-proof {
  padding: 6rem 0;
  background: var(--bg);
}
#social-proof .section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
#social-proof .section-header {
  text-align: center;
  margin-bottom: 3rem;
}
#social-proof .section-header .label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
  display: block;
  margin-bottom: 0.75rem;
}
#social-proof .section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--text-primary);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.3s, transform 0.3s;
}
.testimonial-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
}
.testimonial-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  flex: 1;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.author-name {
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.author-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.author-link {
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--text-muted);
  transition: color 0.3s;
}
.author-link:hover { color: var(--accent); }

.social-proof-cta {
  text-align: center;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.social-proof-cta .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
}
.social-proof-cta .btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}
.social-proof-cta .cta-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}

/* ─── CTA BAND ──────────────────────────────────────────────── */
#cta-primary {
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(200,137,42,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.cta-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200, 137, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 137, 42, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

#cta-primary .section-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.cta-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.9;
}

.cta-subtext {
  margin-top: 1.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ─── APPROACH ──────────────────────────────────────────────── */
#ansatz {
  border-top: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 3.5rem;
  position: relative;
}

.step-item {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: start;
  position: relative;
}

.step-item:last-child { border-bottom: 1px solid var(--border); }

.step-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1;
  width: 4rem;
  opacity: 0.35;
  transition: color 0.4s, opacity 0.4s;
}

.step-item:hover .step-number { color: var(--accent); opacity: 0.7; }

.step-content {}

.step-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.step-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.9;
  max-width: 500px;
}

/* ─── ABOUT ─────────────────────────────────────────────────── */
#ueber-mich {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text {}

.about-text h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 0.25rem;
}

.about-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 2rem;
}

.about-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.skill-tag {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

/* Decorative geometric element */
.about-deco {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-deco-inner {
  width: 320px; height: 320px;
  position: relative;
}

.deco-ring {
  position: absolute;
  border: 1px solid;
  border-radius: 50%;
}

.deco-ring:nth-child(1) {
  inset: 0;
  border-color: rgba(200,137,42,0.12);
  animation: rotateSlow 30s linear infinite;
}

.deco-ring:nth-child(2) {
  inset: 30px;
  border-color: rgba(200,137,42,0.08);
  animation: rotateSlow 20s linear infinite reverse;
  border-style: dashed;
}

.deco-ring:nth-child(3) {
  inset: 70px;
  border-color: rgba(61,107,142,0.2);
  animation: rotateSlow 15s linear infinite;
}

.deco-center {
  position: absolute;
  inset: 110px;
  background: radial-gradient(circle, rgba(200,137,42,0.15) 0%, transparent 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deco-initials {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--accent);
  opacity: 0.7;
}

.deco-dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Dots on ring 1 (4 cardinal) */
.deco-dot:nth-child(5)  { top: -3px; left: 50%; transform: translateX(-50%); }
.deco-dot:nth-child(6)  { bottom: -3px; left: 50%; transform: translateX(-50%); }
.deco-dot:nth-child(7)  { left: -3px; top: 50%; transform: translateY(-50%); }
.deco-dot:nth-child(8)  { right: -3px; top: 50%; transform: translateY(-50%); }

@keyframes rotateSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ─── CONTACT SECTION ───────────────────────────────────────── */
#kontakt {
  border-top: 1px solid var(--border);
}

#kontakt .section-inner {
  text-align: center;
  max-width: 700px;
}

#kontakt h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.contact-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 2.5rem;
}

.contact-email {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
  margin-top: 2rem;
  transition: color 0.3s;
}

.contact-email:hover { color: var(--accent-hot); }

/* ─── GRAIN OVERLAY ─────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps-grid {
    gap: 0;
  }

  .step-item {
    grid-template-columns: 5rem 1fr;
    gap: 3rem;
  }

  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 5th card full width on last row */
  .service-card:nth-child(4),
  .service-card:nth-child(5) {
    grid-column: span 1;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

@media (max-width: 767px) {
  .hero-inner { padding-top: 7rem; }

  .mission-quote::before { left: 0; font-size: 4rem; top: 1rem; }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .about-deco { display: none; }
}

/* ─── PERFORMANCE ───────────────────────────────────────────── */

/* content-visibility: skip rendering of off-screen sections */
#mission, #leistungen, #cta-primary, #ansatz, #ueber-mich, #kontakt, footer {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  /* Make all reveal elements immediately visible */
  .reveal, .hero-headline .word, .hero-eyebrow .label, .hero-eyebrow-line,
  .hero-sub, .hero-ctas, .scroll-hint {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  #hero-canvas { display: none; }
}
