/* ==========================================================================
   AlphaCockLabs – Clinical Biotech Corporate Design
   ========================================================================== */

/* --- Reset & Base -------------------------------------------------------- */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color – muted clinical biotech */
  --color-bg:            #f6f7f9;
  --color-surface:       #ffffff;
  --color-border:        #e2e5ec;
  --color-border-strong: #cdd2dc;
  --color-ink:           #161a22;
  --color-ink-muted:     #5b6373;
  --color-ink-dim:       #8b93a3;
  --color-accent:        #2b5797;
  --color-accent-hover:  #1f4275;
  --color-accent-light:  #dce6f5;
  --color-focus:         #2b5797;

  /* Typography */
  --font-sans: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing – 4pt base */
  --space-3xs: 0.25rem;   /*  4px */
  --space-2xs: 0.5rem;    /*  8px */
  --space-xs:  0.75rem;   /* 12px */
  --space-sm:  1rem;      /* 16px */
  --space-md:  1.5rem;    /* 24px */
  --space-lg:  2.5rem;    /* 40px */
  --space-xl:  4rem;      /* 64px */
  --space-2xl: 6rem;      /* 96px */

  /* Layout */
  --content-max: 740px;
  --content-pad: 1.5rem;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* --- Top Bar ------------------------------------------------------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-accent);
  z-index: 100;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 68vh;
  padding: var(--space-xl) var(--content-pad);
  text-align: center;
  background: var(--color-surface);
}

.hero__logo {
  max-height: clamp(64px, 8vw, 96px);
  width: auto;
  margin-bottom: var(--space-lg);
  opacity: 0.9;
}

.hero__title {
  font-size: clamp(4.5rem, 10vw, 6.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-ink);
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: none;
}

.hero__subline {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 200;
  color: var(--color-ink-muted);
  margin-top: var(--space-sm);
  letter-spacing: 0.015em;
}

.hero__line {
  width: 2.5rem;
  height: 2px;
  background: var(--color-accent-light);
  margin-top: var(--space-lg);
  border-radius: 1px;
}

/* --- Stat Section -------------------------------------------------------- */

.section-stat {
  background: #eef2f9;
  text-align: center;
  padding: var(--space-lg) var(--content-pad);
}

.section-stat__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.stat-number {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 0.1em;
}

.stat-slash {
  font-weight: 200;
  color: var(--color-ink-muted);
  opacity: 0.4;
  font-size: 0.7em;
}

.stat-label {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: var(--color-ink-muted);
  letter-spacing: 0.01em;
  max-width: 30ch;
  text-wrap: balance;
}

/* --- Sections ------------------------------------------------------------ */

.section {
  padding: var(--space-2xl) var(--content-pad);
  background: var(--color-surface);
}

.section--alt {
  background: #f0f3f8;
}

.section + .section {
  border-top: 1px solid var(--color-border);
}

.section-reviews {
  padding: var(--space-2xl) var(--content-pad);
  padding-bottom: calc(var(--space-2xl) + var(--space-xl));
  background-color: var(--color-surface);
  background-image:
    linear-gradient(rgba(43, 87, 151, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 87, 151, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.section__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section__heading {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
}

/* --- Field Study Figure -------------------------------------------------- */

.study-figure {
  margin: 0;
  max-width: 480px;
}

.study-figure__frame {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: 0 1px 3px rgba(22, 26, 34, 0.08), 0 8px 24px rgba(22, 26, 34, 0.05);
  transition: box-shadow 0.4s ease;
}

.study-figure__frame:hover {
  box-shadow: 0 4px 24px rgba(22, 26, 34, 0.1);
}

.study-figure__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.study-figure__frame:hover .study-figure__image {
  transform: scale(1.005);
}

.study-figure__caption {
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-ink-muted);
  padding-left: var(--space-sm);
  border-left: 3px solid var(--color-accent);
  max-width: 55ch;
}

/* --- CEO Figure ---------------------------------------------------------- */

.ceo-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ceo-figure__frame {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-bg);
  max-width: 340px;
  width: 100%;
  box-shadow: 0 1px 3px rgba(22, 26, 34, 0.08), 0 8px 24px rgba(22, 26, 34, 0.05);
  transition: box-shadow 0.4s ease;
}

.ceo-figure__frame:hover {
  box-shadow: 0 4px 24px rgba(22, 26, 34, 0.1);
}

.ceo-figure__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.ceo-figure__frame:hover .ceo-figure__image {
  transform: scale(1.005);
}

.ceo-figure__caption {
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-ink-muted);
  text-align: center;
  max-width: 40ch;
}

/* --- Reviews / Kundenfeedback -------------------------------------------- */

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 700px) {
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.review-card {
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-accent-light);
  border-radius: 4px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  box-shadow: 0 1px 3px rgba(22, 26, 34, 0.05);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.review-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(22, 26, 34, 0.08);
}

.review-card__text {
  flex: 1;
}

.review-card--negative {
  background: #f6f7fa;
  border-color: var(--color-border-strong);
}

.review-card__stars {
  display: flex;
  gap: 3px;
  margin-bottom: var(--space-xs);
}

.star {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

.star--full {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b5797'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
}

.star--empty {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d2d6df'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
}

.review-card__text {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-ink);
  font-style: normal;
  margin: 0;
}

.review-card__author {
  font-size: 0.8125rem;
  color: var(--color-ink-muted);
}

/* --- Footer -------------------------------------------------------------- */

.footer {
  padding: var(--space-2xl) var(--content-pad) var(--space-lg);
  background: var(--color-ink);
  color: var(--color-ink-dim);
}

.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  flex-wrap: wrap;
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__col--brand {
  max-width: 280px;
}

.footer__logo {
  max-height: 32px;
  width: auto;
  opacity: 0.65;
  transition: opacity 0.25s ease;
}

.footer__logo:hover {
  opacity: 1;
}

.footer__tagline {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-ink-dim);
  opacity: 0.75;
}

.footer__col-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  opacity: 0.85;
  margin-bottom: var(--space-3xs);
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.footer__claim {
  max-width: var(--content-max);
  margin: var(--space-xl) auto 0;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #ffffff;
}

.footer__bottom {
  max-width: var(--content-max);
  margin: var(--space-lg) auto 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-ink-dim);
  opacity: 0.55;
}

.footer__link {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-ink-dim);
  transition: color 0.25s ease;
}

.footer__link:hover {
  color: #ffffff;
}

/* --- Impressum / Legal Page ---------------------------------------------- */

.legal-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--content-pad) var(--space-2xl);
  background: var(--color-surface);
  min-height: 80vh;
}

.legal-page__back {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 400;
  margin-bottom: var(--space-xl);
  color: var(--color-ink-muted);
  transition: color 0.25s ease;
}

.legal-page__back:hover {
  color: var(--color-accent);
}

.legal-page__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent-light);
}

.legal-page__content h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
  color: var(--color-ink);
}

.legal-page__content p {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-ink-muted);
  margin-bottom: var(--space-xs);
}

.legal-portrait {
  margin-bottom: var(--space-lg);
  max-width: 200px;
}

.legal-portrait__frame {
  border-radius: 3px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-bg);
}

.legal-portrait__image {
  width: 100%;
  display: block;
}

.legal-page__note {
  margin-top: var(--space-xl);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-ink-dim);
}

/* --- Animations ---------------------------------------------------------- */

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 640px) {
  :root {
    --content-pad: 1.25rem;
  }

  .hero {
    min-height: 60vh;
    padding: var(--space-xl) var(--content-pad);
  }

  .section {
    padding: var(--space-xl) var(--content-pad);
  }

  .legal-page {
    padding: var(--space-xl) var(--content-pad);
  }

  .study-figure,
  .ceo-figure__frame {
    max-width: 100%;
  }

  .section-stat {
    padding: var(--space-md) var(--content-pad) var(--space-xl);
  }

  .section-reviews {
    padding: var(--space-xl) var(--content-pad);
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .footer__claim {
    margin-top: var(--space-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .study-figure__image,
  .ceo-figure__image {
    transition: none;
  }

  .study-figure__frame:hover .study-figure__image,
  .ceo-figure__frame:hover .ceo-figure__image {
    transform: none;
  }
}
