/* ============================================
   agentur-girten.pro – Stylesheet
   Seven Sundays Agenturpartner: Schlafberatung
   (colors/logo aligned with energie24.pro / agentur-girten.de)
   ============================================ */

/* ---- 1. Custom properties + reset ---- */
:root {
  --brand-green: #6BC04B;
  --brand-teal:  #2FA6A6;
  --brand-blue:  #2568B3;
  --gradient-brand: linear-gradient(90deg, var(--brand-green), var(--brand-teal), var(--brand-blue));

  --color-primary: #2568B3;
  --color-primary-hover: #1E5695;
  --color-primary-light: #EAF1F8;
  --color-link: #2568B3;
  --color-accent-green-text: #3F7A2C;
  --color-accent-teal-text:  #1F7A7A;
  --color-icon-green: #3F7A2C;
  --color-icon-teal:  #1F7A7A;

  --color-bg: #F7F9FA;
  --color-bg-alt: #FFFFFF;
  --color-text: #1B2733;
  --color-text-muted: #4B5A68;
  --color-border: #DDE3E7;
  --color-success: #2E7D32;
  --color-error:   #C0392B;

  /* Footer is a fixed dark band by design in both themes - not theme-adaptive */
  --footer-bg: #1B2733;
  --footer-text: #cdd5db;
  --footer-text-strong: #FFFFFF;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;

  --fs-h1: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --lh-body: 1.6;
  --lh-heading: 1.2;

  --space-1: 4px;  --space-2: 8px;  --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 48px; --space-7: 64px; --space-8: 96px;

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(27,39,51,0.08);
  --shadow-md: 0 8px 24px rgba(27,39,51,0.10);

  --container-max: 1200px;
  --container-pad: clamp(16px, 4vw, 48px);

  color-scheme: light;
}

/* Dark theme: system preference (unless explicitly overridden to light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-primary: #2E74C4;
    --color-primary-hover: #255E96;
    --color-primary-light: #1B2A3A;
    --color-link: #6FA8DC;
    --color-icon-green: #8ED96F;
    --color-icon-teal:  #4FC3C3;

    --color-bg: #10161D;
    --color-bg-alt: #182028;
    --color-text: #E7ECEF;
    --color-text-muted: #A9B4BE;
    --color-border: #2B3440;
    --color-success: #66BB6A;
    --color-error:   #E57373;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.5);

    color-scheme: dark;
  }
}

/* Dark theme: explicit user choice via the toggle, wins over system preference either way */
:root[data-theme="dark"] {
  --color-primary: #2E74C4;
  --color-primary-hover: #255E96;
  --color-primary-light: #1B2A3A;
  --color-link: #6FA8DC;
  --color-icon-green: #8ED96F;
  --color-icon-teal:  #4FC3C3;

  --color-bg: #10161D;
  --color-bg-alt: #182028;
  --color-text: #E7ECEF;
  --color-text-muted: #A9B4BE;
  --color-border: #2B3440;
  --color-success: #66BB6A;
  --color-error:   #E57373;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);

  color-scheme: dark;
}

* { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3 { line-height: var(--lh-heading); margin: 0 0 var(--space-3); overflow-wrap: break-word; hyphens: auto; font-family: var(--font-serif); }
h1 { font-size: var(--fs-h1); font-weight: 500; hyphens: none; }
h2 { font-size: var(--fs-h2); font-weight: 500; }
h3 { font-size: var(--fs-h3); font-weight: 700; font-family: var(--font-sans); }
p { margin: 0 0 var(--space-3); color: var(--color-text-muted); }
a { color: var(--color-link); }
ul, ol { padding-left: 0; list-style: none; margin: 0; }
img { display: block; max-width: 100%; }

.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;
}

.skip-link {
  position: absolute; top: -100%; left: var(--space-3);
  background: var(--color-primary); color: #fff;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  z-index: 1000; transition: top .15s ease;
}
.skip-link:focus { top: var(--space-3); }

:focus-visible {
  outline: 3px solid var(--color-link);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- 2. Layout ---- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

section { padding-block: var(--space-8); }
.section-lead {
  max-width: 60ch;
  font-size: 1.125rem;
  margin-bottom: var(--space-6);
}
.section-eyebrow {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-teal-text);
  margin-bottom: var(--space-2);
}

/* ---- 3. Buttons ---- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.button:active { transform: translateY(1px); }
.button--primary { background: var(--color-primary); color: #fff; }
.button--primary:hover { background: var(--color-primary-hover); }
.button--ghost { background: transparent; color: var(--color-link); border-color: var(--color-link); }
.button--ghost:hover { background: var(--color-primary-light); }
.button--lg { padding: var(--space-3) var(--space-5); font-size: 1.0625rem; }

/* ---- 4. Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  min-width: 0;
}
.logo__mark { flex-shrink: 0; }
.logo__word {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.logo__dot { color: var(--brand-teal); -webkit-text-fill-color: var(--brand-teal); }
.logo__tag {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-teal-text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-text);
  transition: transform .15s ease, opacity .15s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.main-nav ul {
  display: flex;
  gap: var(--space-4);
}
.main-nav a:not(.button) {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}
.main-nav a:not(.button):hover { color: var(--color-link); }

@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-4) var(--container-pad);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: var(--space-3); }
  .nav-cta { margin-top: var(--space-3); }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--color-link); color: var(--color-link); }
.theme-toggle__icon { width: 20px; height: 20px; }
.theme-toggle__icon--sun { display: none; }
.theme-toggle__icon--moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon--sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__icon--moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle__icon--sun { display: block; }
:root[data-theme="dark"] .theme-toggle__icon--moon { display: none; }

/* ---- 5. Hero ---- */
.hero { padding-block: var(--space-8); overflow: hidden; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--space-6);
}
.hero__content { min-width: 0; }
.hero__lead { font-size: 1.125rem; max-width: 55ch; }
.hero__actions, .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.hero__actions .button, .button-row .button { max-width: 100%; white-space: normal; }
.hero__visual {
  width: 100%;
  max-width: 400px;
  justify-self: center;
}
.hero__visual svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
}

/* ---- 6. Stats bar ---- */
.stats-bar { background: var(--color-bg-alt); border-block: 1px solid var(--color-border); padding-block: var(--space-6); }
.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  text-align: center;
}
.stats-bar__num {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats-bar__label { color: var(--color-text-muted); font-size: var(--fs-small); margin: 0; }
@media (max-width: 700px) {
  .stats-bar__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 7. Services / cards grid ---- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}
.service-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--accent, var(--color-primary));
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.service-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text, var(--color-link));
  margin-bottom: var(--space-3);
}
.service-card__icon svg { width: 100%; height: 100%; }
.service-card__tagline {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-text, var(--color-link));
  margin: 0 0 var(--space-1);
}
.service-card h3 { font-size: 1.15rem; }
.service-card p { flex-grow: 1; }
.service-card__meta {
  font-size: var(--fs-small);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
}
.service-card__link {
  font-weight: 600;
  text-decoration: none;
  margin-top: var(--space-2);
}
.service-card__link:hover { text-decoration: underline; }

/* ---- 8. Process ---- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  counter-reset: step;
}
.process-steps--3 { grid-template-columns: repeat(3, 1fr); }
.process-steps li {
  position: relative;
  padding-top: var(--space-6);
}
.process-steps__num {
  position: absolute;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-brand);
}
.process-steps li:nth-child(1) .process-steps__num { background: var(--color-accent-green-text); }
.process-steps li:nth-child(2) .process-steps__num { background: var(--color-accent-teal-text); }
.process-steps li:nth-child(3) .process-steps__num { background: var(--color-primary); }
.process-steps li:nth-child(4) .process-steps__num { background: var(--color-primary-hover); }
.process-steps h3 { font-size: 1.05rem; }
@media (max-width: 900px) {
  .process-steps, .process-steps--3 { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* ---- 9. FAQ accordion ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 80ch;
}
.faq-item {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-link);
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: var(--space-3) 0 0; }

/* ---- 10. Persona grid ---- */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.persona-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--accent, var(--color-primary));
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.persona-card h3 { font-size: 1rem; margin-bottom: var(--space-1); }
.persona-card p { margin: 0; font-size: var(--fs-small); }
@media (max-width: 900px) {
  .persona-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .persona-grid { grid-template-columns: 1fr; }
}

/* ---- 11. Awards strip ---- */
.awards-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.awards-strip__badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-alt);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ---- 12. Final CTA banner ---- */
.final-cta {
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  text-align: center;
}
.final-cta h2, .final-cta p { color: #fff; }
.final-cta h2 { margin-bottom: var(--space-3); }
.final-cta p { opacity: 0.92; max-width: 55ch; margin-inline: auto; margin-bottom: var(--space-5); }
.final-cta .button--primary { background: #fff; color: var(--brand-blue); }
.final-cta .button--primary:hover { background: var(--color-bg); }

/* ---- 13. Why / advisor ---- */
.why__inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: var(--space-6);
  align-items: start;
}
.why__content { min-width: 0; }
.why-list li {
  padding-left: var(--space-5);
  position: relative;
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}
.why-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.4em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gradient-brand);
}
.why-list strong { color: var(--color-text); }
.advisor-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.advisor-card__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-3);
  border: 3px solid var(--color-bg);
  box-shadow: var(--shadow-sm);
}
.advisor-card__role {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-accent-teal-text);
  margin: -8px 0 var(--space-2);
}
@media (max-width: 900px) {
  .why__inner { grid-template-columns: 1fr; }
}

/* ---- 14. Product gallery ---- */
.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.product-gallery figure {
  margin: 0;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.product-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product-gallery figcaption { padding: var(--space-3) var(--space-4); font-size: var(--fs-small); color: var(--color-text-muted); }

/* ---- 15. Contact ---- */
.contact { background: var(--color-bg-alt); border-top: 1px solid var(--color-border); }
.contact__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-7);
  align-items: start;
}
.contact__intro, .contact-form { min-width: 0; }
.contact address {
  font-style: normal;
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.contact address a { color: var(--color-text); text-decoration: none; }
.contact address a:hover { color: var(--color-link); }
.contact__note {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  font-size: var(--fs-small);
}
.contact__note p { color: var(--color-text); margin: 0; }
@media (max-width: 900px) {
  .contact__inner { grid-template-columns: 1fr; }
}

.contact-form { display: flex; flex-direction: column; gap: var(--space-4); }
.form-row { display: flex; flex-direction: column; gap: var(--space-1); }
.form-row--split { flex-direction: row; gap: var(--space-4); }
.form-row--split > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
@media (max-width: 480px) {
  .form-row--split { flex-direction: column; }
}
.form-row label, .form-row legend { font-weight: 600; font-size: var(--fs-small); padding: 0; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
  font: inherit;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  color: var(--color-text);
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--color-link); }
fieldset.form-row { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2);
}
.checkbox-grid label, .form-row--checkbox label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-weight: 400;
  color: var(--color-text-muted);
}
.form-row--checkbox { font-size: var(--fs-small); }
.form-row--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  font-weight: 600;
  min-height: 1.5em;
}
.form-status[data-state="success"] { color: var(--color-success); }
.form-status[data-state="error"] { color: var(--color-error); }

/* ---- 16. Footer ---- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: var(--space-6);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.site-footer__disclaimer {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
}
.site-footer p { color: var(--footer-text); margin: 0; }
.site-footer__disclaimer p { font-size: var(--fs-small); max-width: 80ch; }
.site-footer nav ul { display: flex; gap: var(--space-4); }
.site-footer a { color: var(--footer-text-strong); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.logo--footer .logo__word { -webkit-text-fill-color: unset; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- 17. Legal pages ---- */
.legal-content {
  max-width: 75ch;
  margin-inline: auto;
  padding-block: var(--space-7);
}
.legal-content h2 { margin-top: var(--space-6); }
.legal-content h3 { margin-top: var(--space-4); }
.legal-content ul { list-style: disc; padding-left: 1.4em; }
.legal-content li { margin-bottom: var(--space-2); color: var(--color-text-muted); }
.legal-content .placeholder { background: #FFF6DA; padding: 0 4px; border-radius: 4px; }
