/*
  CLIMB Landing Page Styles
  - Mobile-first, responsive
  - Clean typography, whitespace, bold accent #00ff84
  - Sticky nav, scrollspy, animations, dark mode
*/

:root {
  --bg: #ffffff;
  --text: #000;
  --muted: #475569;
  --accent: #00ff84;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --radius: 14px;
  --container: 1100px;
}

[data-theme="dark"] {
  --bg: #0b1020;
  --text: #e6edf3;
  --muted: #000;
  --surface: #121212;
  --border: #1f2a44;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
h1 { font-family: 'Anton', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; letter-spacing: .05px; font-weight: 900; text-transform: uppercase;  }
h2, h3 { font-family: 'Anton', 'Anton', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; letter-spacing: .05px; font-weight: 900; text-transform: uppercase;  }
/* Anchor offset for sticky nav */
section[id] { scroll-margin-top: 112px; }

img { max-width: 100%; display: block; border-radius: calc(var(--radius) - 6px); }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.section { padding: 3.5rem 0; }
.section.alt { background: var(--surface); }
.section.dark { background: #121212; color: #e6edf3; }
.section.dark .section-header p { color: #fff; }
.section.accent { background: #00ff84; color: #001b09; }
.section.accent .section-header p { color: #003c1f; }
.section.dark .card { background: #1a1a1a; border-color: #00ff84; }
.section.accent .card { background: #eafff3; border-color: #00a344; }
.section.dark a { color: #66ffd1; }
.section.accent a { color: #005e2f; }
.section-header { margin-bottom: 1.5rem; }
.section-header h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 .3rem; }
.section-header p { color: var(--muted); margin: 0; }

/* Referenzen (Cases) section: white background */
#cases { background: #ffffff !important; color: #121212; }

.skip-link {
  position: absolute; left: 0; top: -40px; padding: .5rem .75rem; background: var(--accent); color: white; border-radius: 6px;
}
.skip-link:focus { top: .5rem; left: .5rem; outline: none; }

/* Nav */
.site-header { position: relative; }
.nav {
font-family: 'Anton', sans-serif; letter-spacing: 3px; font-weight: 600; font-synthesis: none; position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.25rem; background: #ffffff; color: #121212;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
}
.logo { font-weight: 800; letter-spacing: .5px; color: #121212; text-decoration: none; display: inline-flex; align-items: center; gap: .65rem; }
.logo img { height: 44px; width: auto; display: block; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: none; position: fixed; top: 0; right: 0; width: 100%; height: 100vh; background: var(--bg); z-index: 100; transform: translateX(100%); transition: transform 0.3s ease; flex-direction: column; justify-content: center; align-items: center; gap: 2rem; }
.nav-menu a { text-decoration: none; color: #121212; padding: .6rem .7rem; border-radius: 8px; font-weight: 400; position: relative; font-size: 1.5rem; }
.nav-icons-mobile { display: none; }
.nav-icons-mobile a { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; color: #28282B; text-decoration: none; }
.nav-icons-mobile svg { width: 26px; height: 26px; }
.nav-close { display: none; border-radius: 999px; padding: .7rem .7rem; border: 1px solid var(--border); background: #00ff84; color: #001b09; box-shadow: var(--shadow); font-size: 1.5rem; cursor: pointer; }
/* Short accent underline under nav links */
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: .25rem;
  width: 22px; /* not too long */
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  opacity: 0;
  transition: opacity .2s ease;
}
.nav-menu a:hover::after, .nav-menu a:focus-visible::after, .nav-menu a.active::after { opacity: 1; }
.nav-menu a.active { color: var(--accent); }

.nav-toggle { background: none; border: 1px solid #e2e8f0; padding: .6rem; border-radius: 10px; display: grid; gap: 4px; }
.nav-toggle .bar { width: 24px; height: 2px; background: #121212; display: block; transition: all 0.3s; }
.theme-toggle { border: 1px solid #e2e8f0; background: #f8fafc; color: #121212; border-radius: 10px; padding: .5rem .7rem; }
.theme-toggle svg { width: 18px; height: 18px; vertical-align: -3px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

/* Mobile menu open */

/* Hero */
.hero { position: relative; min-height: 88vh; display: grid; place-items: center; isolation: isolate; overflow: clip; }
.hero-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: right top; transform: translateZ(0);
  will-change: transform;
  background-image: url('assets/hero.png');
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(2,6,23,.45), rgba(2,6,23,.2) 40%, rgba(2,6,23,.65)); z-index: 0; }
.hero-content { position: relative; z-index: 1; text-align: center; color: #fff; }
.hero h1 { font-size: clamp(1.9rem, 5.5vw, 3.6rem); line-height: 1.12; margin: 0 0 .5rem; }
.subline { font-size: clamp(1rem, 2.8vw, 1.25rem); margin-bottom: 1.25rem; opacity: .95; }
.hero-btn { position: absolute; bottom: 15%; left: 50%; transform: translateX(-50%); text-align: center!important; }
.scroll-indicator { position: absolute; bottom: 1rem; left: 50%; translate: -50% 0; color: #fff; opacity: .8; font-size: .9rem; }

.btn { display: inline-block; border-radius: 999px; padding: .8rem 1.1rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-family: 'Oswald', 'Anton', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; letter-spacing: .4px; }
.btn-primary { background: var(--accent); color: #001b09; border: none; box-shadow: var(--shadow); }
.icon-inline { width: 20px; height: 20px; vertical-align: -3px; margin-right: .35rem; }

/* Grids */
.grid { display: grid; gap: 1rem; }
.usp-grid { grid-template-columns: 1fr; }
.services-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.cases-grid { grid-template-columns: 1fr; }
.blog-grid { grid-template-columns: 1fr; }

.card { background: var(--bg); border: 1px solid var(--border); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.service .icon { font-size: 1.5rem; margin-bottom: .25rem; }
.service .icon svg { width: 24px; height: 24px; display: inline-block; }
.card h3 { text-transform: uppercase; letter-spacing: .3px; font-weight: 500; }
.features { margin: .5rem 0 0; padding-left: 1.1rem; }
.features li { margin: .2rem 0; }
/* Clients logos block */
.clients { display: block; text-align: center; padding: 1rem; }
.clients img { width: 100%; height: auto; display: block; filter: none; }

/* Carousel */
.carousel { position: relative; --per-view: 1; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius); outline: none; touch-action: pan-y; }
.carousel-track { display: flex; gap: 1rem; will-change: transform; transition: transform .45s ease; padding: .15rem; }
.carousel-slide { flex: 0 0 calc(100% / var(--per-view)); }
.carousel .post.card { height: 100%; display: grid; align-content: start; gap: .5rem; }
.carousel [data-expand] { margin-top: .25rem; }
.carousel .post-more { margin-top: .5rem; }

/* Arrows */
.carousel-prev, .carousel-next {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), black 4%); color: var(--text);
  box-shadow: var(--shadow); cursor: pointer;
  display: none; /* hide on mobile to avoid overlap */
}
.carousel-prev { left: -6px; }
.carousel-next { right: -6px; }
.carousel-prev:disabled, .carousel-next:disabled { opacity: .45; cursor: default; }

/* Show and move arrows outside viewport on larger screens */
@media (min-width: 640px) {
  .carousel-prev, .carousel-next { display: inline-flex; align-items: center; justify-content: center; }
  .carousel-prev { left: -16px; }
  .carousel-next { right: -16px; }
}
@media (min-width: 1024px) {
  .carousel-prev { left: -28px; }
  .carousel-next { right: -28px; }
}

/* Dots */
.carousel-dots { display: flex; gap: .35rem; justify-content: center; margin-top: 1rem; }
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 999px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface), white 10%);
}
.carousel-dots button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); width: 18px; }

/* Form styling */
.multistep { max-width: 600px; margin: 0 auto; }
.form-step h3 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--text); }
.form-step label { display: block; margin: .75rem 0 .25rem; font-weight: 500; }
input, textarea { width: 100%; padding: .75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1rem; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 255, 132, 0.1); }
.checkbox { display: flex; gap: .5rem; align-items: flex-start; margin: 1rem 0; }
.checkbox input[type="checkbox"] { width: auto; margin-top: .25rem; }
.form-nav { display: flex; gap: .5rem; margin-top: 1.5rem; justify-content: space-between; }
.form-nav .btn { flex: 1; }
.form-success { text-align: center; padding: 2rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.form-success h3 { color: var(--accent); margin-bottom: .5rem; }

/* Service checkboxes */
fieldset { border: none; padding: 0; margin: 0; }
fieldset label { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; padding: .5rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; }
fieldset label:hover { background: color-mix(in srgb, var(--surface), var(--accent) 5%); border-color: var(--accent); }
fieldset label input[type="checkbox"] { width: auto; margin: 0; }

/* reCAPTCHA styling */
.g-recaptcha { display: none; }

/* Footer */
.footer { background: var(--surface); padding: 2rem 0 3rem; border-top: 1px solid var(--border); position: relative; }
.footer-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
.footer-links, .footer-legal ul, .social { list-style: none; padding: 0; margin: 0; display: flex; gap: .5rem .75rem; flex-wrap: wrap;  }
.footer a { color: var(--text); text-decoration: none; }

/* Footer Social Icons */
.footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); text-decoration: none; transition: all 0.2s ease; }
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #001b09; }
.footer-social svg { width: 20px; height: 20px; }

/* Back to top */
.back-to-top { position: fixed; right: 1rem; bottom: 1rem; padding: .7rem .7rem; border-radius: 999px; border: 1px solid var(--border); background: #00ff84; box-shadow: var(--shadow); display: none; }
.back-to-top.show { display: inline-block; }

/* Animations */
.reveal { opacity: 0; translate: 0 16px; transition: opacity .6s ease, translate .6s ease; }
.reveal.visible { opacity: 1; translate: 0 0; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); z-index: 90; }
.modal-overlay[hidden] { display: none; }
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-dialog { background: #fff; color: #000; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); width: min(100% - 2rem, 820px); overflow: hidden; }
.modal > .modal-header, .modal > .modal-body { background: none; color: inherit; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-body { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; max-height: 60vh; }
.modal-close { background: none; border: 1px solid var(--border); border-radius: 10px; padding: .35rem .6rem; color: #000; cursor: pointer; }
.scroll-lock { overflow: hidden; }

/* Shake animation for invalid step */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake { animation: shake .35s ease; }

/* Accessibility */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent), white 30%); outline-offset: 2px; border-radius: 10px; }
.text-link { color: var(--accent); text-underline-offset: 2px; }
.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; }

/* Responsive */
@media (min-width: 640px) {
  .carousel { --per-view: 2; }
  .nav-menu { display: flex; gap: .25rem; position: static; transform: none; background: none; width: auto; height: auto; flex-direction: row; justify-content: flex-start; align-items: center; }
  .nav-menu a { font-size: inherit; color: #121212; }
  .nav.open .nav-menu { display: flex; }
  .nav-toggle { display: none; }
  .usp-grid { grid-template-columns: repeat(3, 1fr); }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .cases-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 4.5rem 0; }
  #faq .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 639px) {
  .nav-menu { position: fixed; top: 0; right: 0; width: 100%; height: 100vh; background: #ffffff; color: #000000; z-index: 100; transform: translateX(100%); transition: transform 0.3s ease; flex-direction: column; justify-content: center; align-items: center; gap: 2rem; }
  .nav-menu a { font-size: 1.5rem; color: #000000; }
  .nav-icons-mobile { display: flex; }
  .nav-icons { display: none; }
  .nav-close { display: block; }
  .nav.open .nav-menu { display: flex; transform: translateX(0); }
  .nav.open .nav-toggle .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav.open .nav-toggle .bar:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle .bar:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
  .hero { min-height: auto; height: calc(100vw * 1024 / 1536); }
  .hero-media { background-size: contain; background-position: center center; }
  .back-to-top { padding: .5rem .5rem; font-size: 1rem; }
  .hero-btn { padding: 1rem 2rem; font-size: 1.1rem; min-width: 280px; }
}

@media (min-width: 1024px) {
  .hero { min-height: 94vh; }
  .carousel { --per-view: 3; }
  #faq .grid { grid-template-columns: repeat(3, 1fr); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; translate: 0 0; }
  .hero-media { transform: none !important; }
}

/* Make services cards visually like USP cards */
#services .service.card {
  background: #1a1a1a; /* like .section.dark .card */
  border-color: #1e293b;
  color: #e6edf3;
}
#services .service.card a { color: #66ffd1; }

/* Desktop layout: services grid as 3 / 2 centered / 2 centered */
@media (min-width: 1024px) {
  #services .services-grid {
    grid-template-columns: repeat(12, 1fr);
  }
  #services .services-grid > .service { grid-column: span 4; }
  /* Row 1: 3 cards */
  #services .services-grid > .service:nth-child(1) { grid-column: 1 / span 4; }
  #services .services-grid > .service:nth-child(2) { grid-column: 5 / span 4; }
  #services .services-grid > .service:nth-child(3) { grid-column: 9 / span 4; }
  /* Row 2: 2 cards centered */
  #services .services-grid > .service:nth-child(4) { grid-column: 3 / span 4; }
  #services .services-grid > .service:nth-child(5) { grid-column: 7 / span 4; }
  /* Row 3: 2 cards centered */
  #services .services-grid > .service:nth-child(6) { grid-column: 3 / span 4; }
  #services .services-grid > .service:nth-child(7) { grid-column: 7 / span 4; }
}

/* Make service cards look like USP cards in About */
#services .service .icon { display: none !important; }
#services .service .features { display: none !important; }
/* Hide the second descriptive paragraph to match USP brevity */
#services .service p + p { display: none; }

/* Header social icons */
.nav-icons { display: inline-flex; gap: .35rem; align-items: center; }
.nav-icons a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; color: #28282B; text-decoration: none; }
.nav-icons svg { width: 18px; height: 18px; }

/* Green underline (30% width) under headlines */
.section-header h2 { position: relative; margin-bottom: 1rem; }
.section-header h2::after {
  content: "";
  position: absolute; left: 0; bottom: -6px; height: 4px; width: 30%;
  background: var(--accent); border-radius: 4px;
}

/* Green expand buttons inside Social Media Tipps */
#blog .btn[data-expand] { background: var(--accent); color: #001b09; border: none; }

/* Override: white underline for Leistungen heading */
#services .section-header h2::after { background: #ffffff; width: 25%; }

/* Override: white underline for Kostenlose Beratung heading */
#lead .section-header h2::after { background: #ffffff; width: 25%; }

/* Green underline under card titles (USPs and Services) */
.usp-grid .card h3,
#services .service.card h3 {
  position: relative;
  margin-bottom: .5rem;
}
.usp-grid .card h3::after,
#services .service.card h3::after {
  content: "";
  display: block;
  margin-top: .35rem;
  height: 4px;
  width: 30%;
  background: var(--accent);
  border-radius: 4px;
}