/* ============================================================
   MH — maikharing.com
   Stylesheet v3.0 · Apple-inspiriert mit Norden-Touch
   ============================================================ */

/* === LOKALE FONTS (DSGVO-konform) ========================= */
/* Inter Variable Font */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-variable.woff2') format('woff2-variations'),
       url('../fonts/inter-variable.woff2') format('woff2');
}

/* JetBrains Mono */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono.woff2') format('woff2');
}

/* === CUSTOM PROPERTIES ==================================== */
:root {
  --bg: #fbfbfd;
  --bg-section: #ffffff;
  --bg-dark: #1d1d1f;
  --bg-card-a: #f5f5f7;
  --bg-card-b: #edede5;
  --bg-watt: #eef2f3;

  --ink: #1d1d1f;
  --ink-dim: #6e6e73;
  --ink-muted: #86868b;

  --accent: #83A603;          /* Oliv */
  --accent-bright: #a5cc20;
  --accent-sea: #468BA6;      /* Wattenmeer-Blau */
  --accent-sea-deep: #2d6883;
  --accent-sand: #c6a664;
  --accent-red: #D91807;

  --blue-link: #0071e3;
  --line: rgba(0, 0, 0, 0.06);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;
}

/* === RESET ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.47;
  letter-spacing: -0.003em;
  overflow-x: hidden;
  font-feature-settings: "cv11", "ss01";
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-link); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}
@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === NAV ================================================== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  height: 56px;
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo { display: flex; align-items: center; gap: 0.65rem; color: var(--ink); }
.nav-logo svg { height: 22px; width: auto; }
.nav-logo-text {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-menu a {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 400;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-menu a:hover { opacity: 1; }

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  padding: 0.5rem;
}

@media (max-width: 820px) {
  .nav-menu {
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: rgba(251, 251, 253, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu a { font-size: 1rem; padding: 0.5rem 0; }
  .nav-toggle { display: block; }
}

/* === HERO ================================================= */
.hero {
  padding: 8rem 1.5rem 4rem;
  text-align: center;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'><path d='M0 100 Q 150 60 300 100 T 600 100 T 900 100 T 1200 100' stroke='%23468BA6' stroke-width='1' fill='none' opacity='0.15'/><path d='M0 130 Q 150 90 300 130 T 600 130 T 900 130 T 1200 130' stroke='%2383A603' stroke-width='1' fill='none' opacity='0.1'/></svg>");
  background-size: 100% 100%;
  pointer-events: none;
}
.hero-moin {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.1s forwards;
}
.hero-moin::before,
.hero-moin::after {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.hero h1 {
  font-size: clamp(2.5rem, 7.5vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 auto 1.25rem;
  max-width: 13ch;
  opacity: 0;
  animation: fadeUp 0.9s 0.2s forwards;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-bright) 40%, var(--accent-sea) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 10s ease-in-out infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-sub {
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  color: var(--ink-dim);
  font-weight: 400;
  max-width: 42ch;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.35s forwards;
  padding: 0 1rem;
}
.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s forwards;
}

/* Buttons */
.btn-link {
  color: var(--blue-link);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: opacity 0.2s;
}
.btn-link:hover { opacity: 0.75; }
.btn-pill {
  background: var(--blue-link);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 100px;
  font-size: 1.05rem;
  font-weight: 400;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-pill:hover { background: #0077ed; color: white; }
.btn-pill.dark { background: var(--ink); color: white; }
.btn-pill.dark:hover { background: #000; }
.btn-pill:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4rem);
  margin-top: 4rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
  position: relative;
  z-index: 2;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-sea) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stat-num svg {
  /* Wenn Icon statt Zahl: Gradient auf Stroke anwenden */
  stroke: var(--accent);
  color: var(--accent);
}
.hero-stat-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 500;
}

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

/* === ABOUT ================================================ */
.about {
  background: var(--bg-section);
  padding: 6rem 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.about-left .mono {
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}
.about-left h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.025em;
}
.about-right p.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.about-right p {
  color: var(--ink-dim);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.about-right strong { color: var(--ink); font-weight: 600; }

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.tech-badge {
  padding: 0.5rem 1rem;
  background: var(--bg-card-a);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.tech-badge:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* === SERVICES ============================================= */
.services {
  padding: 6rem 0 2rem;
  background: var(--bg);
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
  padding: 0 1.5rem;
}
.section-header .mono {
  color: var(--accent);
  display: inline-block;
  margin-bottom: 1rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 5vw, 4rem);
  max-width: 22ch;
  margin: 0 auto 1rem;
  letter-spacing: -0.03em;
}
.section-header p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--ink-dim);
  max-width: 55ch;
  margin: 0 auto;
}

.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr; padding: 0 1.25rem; }
  .bento-card-wide { grid-column: span 1 !important; }
}

.bento-card {
  background: var(--bg-card-a);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 340px;
  display: flex;
  flex-direction: column;
}
.bento-card:hover { transform: translateY(-4px); }

.bento-card-wide { grid-column: span 2; }

.bento-card.dark { background: var(--bg-dark); color: white; }
.bento-card.dark h3 { color: white; }
.bento-card.dark p { color: #a1a1a6; }
.bento-card.dark .bento-eyebrow { color: var(--accent-bright); }
.bento-card.dark .service-number { color: #86868b; }
.bento-card.dark .service-icon-box {
  background: rgba(255,255,255,0.08);
  color: var(--accent-bright);
}

.bento-card.sea { background: linear-gradient(135deg, #dce8ed 0%, #b8d0d9 100%); }
.bento-card.sea .bento-eyebrow { color: var(--accent-sea-deep); }
.bento-card.sea .service-icon-box { background: rgba(255,255,255,0.6); color: var(--accent-sea-deep); }

.bento-card.sand { background: linear-gradient(135deg, #f4ece0 0%, #e8d9bf 100%); }
.bento-card.sand .bento-eyebrow { color: #8a6a20; }
.bento-card.sand .service-icon-box { background: rgba(255,255,255,0.6); color: #8a6a20; }

.bento-card.olive { background: linear-gradient(135deg, #eef2dd 0%, #dbe5b0 100%); }
.bento-card.olive .bento-eyebrow { color: var(--accent); }
.bento-card.olive .service-icon-box { background: rgba(255,255,255,0.6); color: var(--accent); }

.service-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}
.service-icon-box {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: rgba(255,255,255,0.5);
  color: var(--ink);
}
.bento-eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.bento-card h3 {
  font-size: clamp(1.3rem, 2.3vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.15;
}
.bento-card p {
  font-size: 0.98rem;
  color: var(--ink-dim);
  line-height: 1.55;
}

/* === FEATURE DEEP DIVE ==================================== */
.feature-section {
  background: var(--bg-dark);
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.feature-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-sea), var(--accent), transparent);
  opacity: 0.5;
}
.feature-section .eyebrow {
  font-size: 0.95rem;
  color: var(--accent-bright);
  font-weight: 500;
  margin-bottom: 1rem;
}
.feature-section h2 {
  font-size: clamp(2rem, 5.5vw, 4rem);
  color: white;
  max-width: 20ch;
  margin: 0 auto 1.5rem;
}
.feature-section h2 em {
  font-style: normal;
  color: var(--accent-bright);
}
.feature-section > .container > p.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #a1a1a6;
  max-width: 50ch;
  margin: 0 auto 3rem;
}
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
  padding: 0 2rem;
}
@media (max-width: 768px) { .feature-list { grid-template-columns: 1fr; gap: 2rem; } }
.feature-item {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.feature-item .icon {
  color: var(--accent-bright);
  margin-bottom: 1rem;
}
.feature-item h4 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: white;
  letter-spacing: -0.02em;
}
.feature-item p {
  color: #a1a1a6;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* === WORK / REFERENZEN ==================================== */
.work {
  background: var(--bg);
  padding: 6rem 0;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
@media (max-width: 768px) {
  .work-grid { grid-template-columns: 1fr; padding: 0 1.25rem; }
}

.work-card {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background: var(--bg-card-a);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--ink);
  text-decoration: none;
}
.work-card:hover { transform: translateY(-6px); }
.work-card .eyebrow {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}
.work-card h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}
.work-card p {
  color: var(--ink-dim);
  font-size: 0.95rem;
  max-width: 28ch;
}

/* Work Card Preview-Bild */
.work-card-image {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  aspect-ratio: 3/2;
  background: rgba(255,255,255,0.15);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.5s;
}
.work-card:hover .work-card-image {
  transform: translateX(-50%) translateY(-10px);
}
.work-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Platzhalter (wenn kein Bild vorhanden) */
.work-card-placeholder .placeholder-mockup {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.92);
  display: flex;
  flex-direction: column;
}
.work-card-placeholder .placeholder-browser-bar {
  height: 24px;
  background: rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 5px;
  flex-shrink: 0;
  position: relative;
}
.work-card-placeholder .placeholder-browser-bar::before {
  content: '';
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  box-shadow: 14px 0 0 rgba(0,0,0,0.18), 28px 0 0 rgba(0,0,0,0.18);
}
.work-card-placeholder .placeholder-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
}
.work-card-placeholder .placeholder-initials {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-sea) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.work-card-placeholder .placeholder-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 60%;
  max-width: 140px;
}
.work-card-placeholder .placeholder-lines span {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: rgba(0,0,0,0.08);
}
.work-card-placeholder .placeholder-lines span:nth-child(1) { width: 100%; }
.work-card-placeholder .placeholder-lines span:nth-child(2) { width: 75%; }
.work-card-placeholder .placeholder-lines span:nth-child(3) { width: 50%; }

/* Auf dunklen Karten invertieren */
.work-card[data-theme="dark"] .work-card-placeholder .placeholder-mockup,
.work-card[data-theme="green"] .work-card-placeholder .placeholder-mockup {
  background: rgba(255,255,255,0.95);
}

/* Card Variants — automatisch je nach data-theme */
.work-card[data-theme="dark"] {
  background: linear-gradient(160deg, #1a1a2e 0%, #0d0d1a 100%);
  color: white;
}
.work-card[data-theme="dark"] h3 { color: white; }
.work-card[data-theme="dark"] .eyebrow { color: #ffc65c; }
.work-card[data-theme="dark"] p { color: rgba(255,255,255,0.7); }

.work-card[data-theme="green"] {
  background: linear-gradient(160deg, #3d5a2e 0%, #2a3f1f 100%);
  color: white;
}
.work-card[data-theme="green"] h3 { color: white; }
.work-card[data-theme="green"] .eyebrow { color: #c6a664; }
.work-card[data-theme="green"] p { color: rgba(255,255,255,0.7); }

.work-card[data-theme="sea"] { background: linear-gradient(160deg, #dce8ed 0%, #b8d0d9 100%); }
.work-card[data-theme="sea"] .eyebrow { color: var(--accent-sea-deep); }

.work-card[data-theme="sand"] { background: linear-gradient(160deg, #f4ece0 0%, #e8d9bf 100%); }
.work-card[data-theme="sand"] .eyebrow { color: #8a6a20; }

/* Loading State */
.work-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  color: var(--ink-muted);
}

/* === CONTACT ============================================== */
.contact {
  background: var(--bg-section);
  padding: 6rem 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; padding: 0 1.25rem; }
}
.contact-info .mono { color: var(--accent); display: block; margin-bottom: 1rem; }
.contact-info h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
.contact-info p.lead {
  color: var(--ink-dim);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-bottom: 2rem;
}
.contact-divider {
  width: 60px; height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin: 2rem 0;
}
.contact-detail { margin-bottom: 1.25rem; }
.contact-detail-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}
.contact-detail-value { font-size: 1.05rem; color: var(--ink); }
.contact-detail-value a {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.contact-detail-value a:hover { color: var(--accent); }

/* === FORM ================================================= */
.contact-form {
  background: var(--bg-card-a);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
}
@media (max-width: 500px) { .contact-form { padding: 1.75rem; } }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.form-group label .required { color: var(--accent-red); }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: white;
  color: var(--ink);
  transition: all 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(131, 166, 3, 0.1);
}
.form-group input.error,
.form-group textarea.error {
  border-color: var(--accent-red);
}
.form-error {
  color: var(--accent-red);
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}
.form-error.visible { display: block; }

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
  line-height: 1.5;
}
.form-checkbox input {
  width: auto !important;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}
.form-checkbox a { color: var(--accent); }

.form-captcha { margin: 1.25rem 0; min-height: 78px; }

.form-status {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}
.form-status.success {
  display: block;
  background: #ecf4d4;
  color: #3a5305;
  border: 1px solid var(--accent);
}
.form-status.error {
  display: block;
  background: #fdecea;
  color: #7a0c05;
  border: 1px solid var(--accent-red);
}

/* Honeypot */
.form-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* === FOOTER =============================================== */
.site-footer {
  background: var(--bg-dark);
  color: #86868b;
  padding: 4rem 0 2rem;
  font-size: 0.85rem;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;
  background: var(--bg-dark);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'><path d='M0 15 Q 150 0 300 15 T 600 15 T 900 15 T 1200 15' stroke='%23468BA6' stroke-width='1' fill='none' opacity='0.4'/></svg>");
  background-size: 100% 100%;
  transform: translateY(-30px);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

.footer-brand-logo { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; color: white; }
.footer-brand-logo svg { height: 22px; }
.footer-brand-logo span { color: white; font-weight: 500; }
.footer-brand p {
  color: #86868b;
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 34ch;
}
.footer-norden {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255,255,255,0.05);
  border-radius: 100px;
  font-size: 0.75rem;
  color: #a1a1a6;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.footer-col h5 {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a {
  color: #86868b;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: white; }
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #6e6e73;
}

/* === LEGAL PAGES (Impressum/Datenschutz) ================== */
.legal-page {
  padding: 8rem 0 5rem;
  background: var(--bg);
  min-height: 80vh;
}
.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}
.legal-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 2.5rem;
  letter-spacing: -0.03em;
}
.legal-content h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.legal-content p,
.legal-content li {
  color: var(--ink-dim);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content ul, .legal-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-content a { color: var(--accent); border-bottom: 1px solid var(--accent); }
.legal-content a:hover { opacity: 0.7; }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-dim);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.legal-back:hover { color: var(--accent); }

/* === MOBILE FIXES (alles <= 768px) ======================== */
/* Alle Sektionen: reduzierte horizontale Paddings */
@media (max-width: 768px) {
  /* Body: Grenze des Viewports strikt durchsetzen */
  html, body { max-width: 100%; overflow-x: hidden; }

  /* Sektionen: weniger vertikales Padding */
  .hero { padding: 6rem 1.25rem 3rem; }
  .about, .services, .work, .contact { padding: 4rem 0; }
  .feature-section { padding: 4rem 0; }

  /* Grids: reduziertes Padding */
  .about-grid,
  .contact-grid,
  .feature-list {
    padding: 0 1.25rem;
  }

  .section-header { padding: 0 1.25rem; }

  /* Hero-Stats: kleiner und enger */
  .hero-stats {
    gap: 1.5rem;
    margin-top: 3rem;
    justify-content: space-around;
    width: 100%;
  }
  .hero-stat { flex: 1; min-width: 0; }
  .hero-stat-num { font-size: 2rem; }
  .hero-stat-num svg { width: 30px; height: 30px; }
  .hero-stat-label { font-size: 0.72rem; }

  /* Hero-Typografie: kleiner damit's passt */
  .hero h1 { font-size: 2.5rem; line-height: 1.1; }
  .hero-sub { font-size: 1rem; padding: 0; }

  /* Actions zentrieren und Buttons full-width-fähig machen */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .hero-actions .btn-pill {
    width: 100%;
    justify-content: center;
  }

  /* Bento-Card weniger Padding */
  .bento-card { padding: 2rem 1.75rem; min-height: auto; }
  .bento-card h3 { font-size: 1.35rem; }

  /* Work-Card weniger Padding */
  .work-card {
    padding: 2rem;
    aspect-ratio: auto;
    min-height: 320px;
  }

  /* Contact-Form kompakter */
  .contact-form { padding: 1.75rem 1.5rem; }

  /* Tech-Badges: Umbruch sicherstellen */
  .tech-badges { gap: 0.5rem; }
  .tech-badge { font-size: 0.78rem; padding: 0.4rem 0.85rem; }

  /* Nav: Logo-Text auf Mobile ggf. kleiner */
  .nav-logo-text { font-size: 0.9rem; }

  /* Footer: weniger Padding */
  .footer-inner { padding: 0 1.25rem; }
  .footer-grid { gap: 2rem; padding-bottom: 2rem; }

  /* hCaptcha-Container: auf Mobile kann der Captcha-Widget übers Layout laufen */
  .form-captcha { overflow-x: auto; }
  .h-captcha > iframe { max-width: 100%; }
}

/* === KLEINE HANDYS (<= 380px) ============================= */
@media (max-width: 380px) {
  .hero h1 { font-size: 2.1rem; }
  .hero-stats { gap: 0.75rem; }
  .hero-stat-num { font-size: 1.6rem; }
  .section-header h2 { font-size: 1.6rem; }
  .bento-card { padding: 1.75rem 1.5rem; }
  .tech-badge { font-size: 0.72rem; padding: 0.35rem 0.75rem; }
}

/* === REVEAL =============================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === REDUCED MOTION ======================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* === PRINT ================================================ */
@media print {
  .site-nav, .site-footer, .hero-actions, .contact-form { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}
