/* ==========================================================================
   yieldscout Hospitality Consulting — one-pager
   Palette sampled from the logo (teal wordmark + grey) and the 2018 layout.
   ========================================================================== */

:root {
  /* Brand */
  --teal:        #1f97a6;   /* "yield" wordmark teal */
  --teal-dark:   #16737f;
  --teal-deep:   #0f5560;
  --teal-tint:   #e9f4f5;   /* very light teal wash */
  --teal-soft:   #8fc7cd;   /* desaturated card teal from the layout */

  --grey:        #6e757c;   /* "scout" wordmark grey */
  --ink:         #1c2225;   /* near-black headings / dark sections */
  --ink-soft:    #2b3236;
  --body:        #424a4f;   /* body copy */
  --muted:       #7b848a;

  --line:        #e4e8ea;
  --bg:          #ffffff;
  --bg-alt:      #f6f8f9;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;

  /* Rhythm */
  /* Fluid container: 1280px up to 1440px, then widens in step with the type
     (≈1680px at 2560px) and caps at 1900px so 4K keeps comfortable margins. */
  --maxw: clamp(1280px, 770px + 35.5vw, 1900px);
  --pad: clamp(1.25rem, 5vw, 2rem);
  --radius: 4px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  /* Fluid root size: locked at 16px up to 1440px (laptops/tablets/mobile
     unchanged), then scales up to 21px by ~2560px so type, spacing and the
     rem-based measures all grow together on large/4K monitors. */
  font-size: clamp(16px, 9.6px + 0.446vw, 21px);
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--ink); line-height: 1.18; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--teal-dark); text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 6px 24px -16px rgba(15, 85, 96, 0.35); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: max(74px, 4.6rem);
}
.brand { display: inline-flex; }
.brand-logo { width: clamp(180px, 12.5rem, 260px); height: auto; }

.main-nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.5vw, 2rem); }
.main-nav a {
  color: var(--grey); font-size: 0.875rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  position: relative; padding: 0.35rem 0;
  transition: color 0.25s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--teal);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.main-nav a:hover { color: var(--teal-dark); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav .nav-cta {
  color: #fff; background: var(--teal); padding: 0.5rem 1.1rem;
  border-radius: var(--radius); text-transform: uppercase;
}
.main-nav .nav-cta::after { display: none; }
.main-nav .nav-cta:hover { background: var(--teal-dark); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.6rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease),
              box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -14px rgba(31, 151, 166, 0.9); }
.btn-primary:hover { background: var(--teal-dark); box-shadow: 0 14px 28px -12px rgba(22, 115, 127, 0.95); }

.btn-ghost { background: transparent; color: var(--teal-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }

.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--teal-tint) 0%, rgba(233, 244, 245, 0) 55%),
    linear-gradient(180deg, #eef6f7 0%, #e1eff1 100%);
}
.hero::before {
  content: ""; position: absolute; right: -8%; top: -20%;
  width: clamp(480px, 42vw, 1000px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 199, 205, 0.28), rgba(143, 199, 205, 0) 70%);
  pointer-events: none;
}
/* Hero content shares the exact same column as every other section — it is a
   .container, so it must keep .container's max-width (--maxw). Do NOT override
   max-width here or the hero will be wider/left-shifted vs the other sections. */
.hero-inner { position: relative; }
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8rem;
  font-weight: 700; color: var(--teal-dark); margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3.3rem);
  letter-spacing: -0.02em; margin-bottom: 1.1rem; max-width: none;
  text-wrap: balance;
}
.hero-lead {
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.45rem);
  color: var(--ink-soft); font-weight: 500; line-height: 1.5;
  max-width: 42rem; letter-spacing: -0.005em;
}

/* Desktop-only line breaks — give the client the exact wording layout they
   asked for on wide screens, while letting copy wrap naturally on mobile. */
.br-lg { display: none; }
@media (min-width: 1000px) { .br-lg { display: inline; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.hero-claim {
  margin-top: 2.5rem; font-style: italic; color: var(--teal-dark);
  font-size: 1.05rem; letter-spacing: 0.01em;
}
.hero-claim::before { content: "— "; color: var(--teal-soft); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-ansatz { background: var(--bg); }
.section-leistungen { background: var(--bg-alt); }
.section-ueber { background: var(--bg); }

.section-head { max-width: min(100%, 70rem); margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.78rem; font-weight: 700; color: var(--teal); margin-bottom: 0.7rem;
}
.kicker::after {
  content: ""; display: block; width: 38px; height: 2px;
  background: var(--teal); margin-top: 0.6rem;
}
.section-head h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
.section-intro { color: var(--body); font-size: 1.075rem; }

/* ---------- Value grid (Ansatz) ---------- */
/* 4 cards: explicit steps so they never orphan (no 3+1). 1 col → 2×2 → 4-up. */
.value-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px)  { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .value-grid { grid-template-columns: repeat(4, 1fr); } }
.value-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.value-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--teal); border-radius: var(--radius) 0 0 var(--radius);
  transform: scaleY(0); transform-origin: top; transition: transform 0.35s var(--ease);
}
.value-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(15, 85, 96, 0.45); border-color: transparent; }
.value-card:hover::before { transform: scaleY(1); }
.value-card h3 { font-size: 1.15rem; }
.value-card p { margin: 0; color: var(--body); font-size: 0.97rem; }

/* ---------- Service grid (Leistungen) ---------- */
.service-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}

/* Tablet (2 columns): 5 cards would leave a lone orphan, so the 5th spans the
   full width instead of sitting alone in a half column. */
@media (min-width: 560px) and (max-width: 879px) {
  .service-grid--five { grid-template-columns: repeat(2, 1fr); }
  .service-grid--five .service-card:nth-child(5) { grid-column: 1 / -1; }
}

/* Five-card variant: 3 on top, 2 centred below — no awkward hole.
   Built on a 6-column track so cards span 2 each; the last two are
   nudged inward to centre the second row. */
@media (min-width: 880px) {
  .service-grid--five {
    grid-template-columns: repeat(6, 1fr);
  }
  .service-grid--five .service-card { grid-column: span 2; }
  .service-grid--five .service-card:nth-child(4) { grid-column: 2 / span 2; }
  .service-grid--five .service-card:nth-child(5) { grid-column: 4 / span 2; }
}
.service-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.9rem 1.7rem; position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.service-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(143, 199, 205, 0.12), rgba(143, 199, 205, 0) 60%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 26px 48px -30px rgba(15, 85, 96, 0.5); }
.service-card:hover::after { opacity: 1; }
.service-num {
  display: inline-block; font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--teal-soft); margin-bottom: 0.6rem;
}
.service-card h3 { font-size: 1.2rem; }
.service-card p { margin: 0; color: var(--body); font-size: 0.97rem; }

/* ---------- Über ---------- */
/* Portrait beside first-person bio. The facts panel is gone, so we use a
   tighter two-column split with generous whitespace and a centred measure. */
.ueber-inner {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: clamp(220px, 30%, 300px) 1fr;
  align-items: start;
}
.ueber-text h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
.ueber-text p { color: var(--body); }

/* Portrait — sticky beside the bio on desktop, centred above it on mobile */
.ueber-portrait {
  margin: 0;
  position: sticky; top: 96px;
}
.ueber-portrait img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 22px 44px -24px rgba(15, 85, 96, 0.55);
  outline: 1px solid var(--line); outline-offset: 0;
}
.ueber-portrait figcaption {
  margin-top: 0.7rem; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey);
  text-align: center;
}

/* Pull-quote treatment for the certification line */
.ueber-quote {
  margin: 1.8rem 0 0; padding: 1.1rem 0 1.1rem 1.4rem;
  border-left: 3px solid var(--teal);
  color: var(--ink-soft); font-size: 1.075rem; font-weight: 500;
  line-height: 1.55; letter-spacing: -0.005em;
}

/* ---------- Kontakt ---------- */
.section-kontakt {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(31, 151, 166, 0.35), rgba(31, 151, 166, 0) 55%),
    linear-gradient(135deg, var(--teal-deep) 0%, var(--ink) 100%);
  color: #fff;
}
/* Kontakt shares the same column as every other section (left-aligned within
   --maxw), not a narrower centred block — keep widths consistent page-wide.
   The lead keeps its own reading measure below. */
.kontakt-inner { max-width: var(--maxw); }
.kicker-light { color: var(--teal-soft); }
.kicker-light::after { background: var(--teal-soft); }
.section-kontakt h2 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem); }
.kontakt-lead { color: rgba(255, 255, 255, 0.82); font-size: 1.1rem; max-width: 54ch; }
.kontakt-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.8rem 0 2.2rem; }
.kontakt-person { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; line-height: 1.7; margin: 0; }
.kontakt-person strong { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.7); padding: 2rem 0; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-brand { margin: 0; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.footer-brand span { color: var(--teal-soft); font-weight: 400; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { color: rgba(255, 255, 255, 0.65); font-size: 0.9rem; transition: color 0.25s var(--ease); }
.footer-nav a:hover { color: #fff; }
.footer-copy { margin: 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }

/* ==========================================================================
   Legal pages (Impressum / Datenschutz)
   ========================================================================== */
.legal { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 8vw, 6rem); background: var(--bg); }
/* Legal content uses the same --maxw column as the main page and the page's own
   header/footer — consistent width sitewide (it is already a .container). */
.legal-inner { max-width: var(--maxw); }

.legal-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.legal-head h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.7rem);
  margin: 0.25rem 0 0.4rem;
}
.legal-sub { color: var(--muted); margin: 0; font-size: 1rem; }

.legal-section { margin-bottom: 2.2rem; }
.legal-section h2 {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem);
  margin: 0 0 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.legal-section p { color: var(--body); }
.legal-section p:last-child { margin-bottom: 0; }
.legal-note { font-size: 0.92rem; color: var(--muted); }

/* Definition-style key/value list */
.legal-list { list-style: none; margin: 0; padding: 0; }
.legal-list li {
  display: grid; grid-template-columns: 230px 1fr; gap: 0.4rem 1.2rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line);
}
.legal-list li:last-child { border-bottom: 0; }
.legal-key { font-weight: 600; color: var(--ink-soft); }
.legal-val { color: var(--body); }

/* Bullet lists in the policy */
.legal-bullets { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--body); }
.legal-bullets li { margin-bottom: 0.35rem; }

.legal-stand { color: var(--muted); font-size: 0.92rem; margin-top: 2.5rem; }

/* Placeholder highlight — subtle but findable for the client */
mark.todo {
  background: #fff5d6;
  color: #6b5300;
  padding: 0.05em 0.4em;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #f0dca0;
  font-weight: 500;
}

@media (max-width: 560px) {
  .legal-list li { grid-template-columns: 1fr; gap: 0.1rem; }
  .legal-key { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey); }
}

/* ==========================================================================
   Micro-animations — scroll reveal + hero intro
   ========================================================================== */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Staggered children inside grids */
.value-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.value-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.value-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.service-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.service-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.service-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.service-grid .reveal:nth-child(5) { transition-delay: 0.24s; }

/* Hero intro — staggered fade/slide on load (added by JS) */
.hero .reveal { transition-delay: 0s; }
.hero-loaded .hero-eyebrow { transition-delay: 0.05s; }
.hero-loaded .hero-title   { transition-delay: 0.15s; }
.hero-loaded .hero-lead    { transition-delay: 0.28s; }
.hero-loaded .hero-actions { transition-delay: 0.40s; }
.hero-loaded .hero-claim   { transition-delay: 0.52s; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  /* Über stacks: portrait centred above the bio, no longer sticky */
  .ueber-inner { grid-template-columns: 1fr; justify-items: center; }
  .ueber-portrait {
    position: static; width: clamp(180px, 60%, 260px); margin: 0 auto 0.4rem;
  }
}
@media (max-width: 620px) {
  .main-nav { gap: 0.85rem; }
  .main-nav a:not(.nav-cta) { display: none; }   /* keep header clean on small screens */
  .hero-actions .btn, .kontakt-actions .btn { flex: 1 1 auto; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .value-card:hover, .service-card:hover { transform: none; }
}

/* ---------- Focus visibility (a11y) ---------- */
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--radius);
}
