/* ═══════════════════════════════════════════════════════════════
   styles.css — SamSam Portfolio
   Design System · Layout · Sections · Animations · Responsive
═══════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────
   1. DESIGN SYSTEM
───────────────────────────────────────── */
:root {
  /* Palette */
  --cream:        #F9F5EE;
  --cream-alt:    #F0EBE0;
  --cream-dark:   #E5DDD0;
  --navy:         #2f6ea5;
  --navy-mid:     #3e82bc;
  --navy-light:   #E0EEFF;
  --text:         #1C1C2E;
  --muted:        #6B7280;
  --border:       #DDD8CE;
  --white:        #FFFFFF;
  --error:        #C0392B;
  --success-bg:   #EDF7F2;
  --success-bd:   #6ECC9B;
  --success-tx:   #1A6B4A;

  /* Shadows (blue tint) */
  --shadow-sm:    0 2px 8px  rgba(47, 110, 165, 0.07);
  --shadow-md:    0 6px 24px rgba(47, 110, 165, 0.10);
  --shadow-lg:    0 12px 40px rgba(47, 110, 165, 0.13);

  /* Radii */
  --r-sm:  8px;
  --r:     12px;
  --r-lg:  18px;
  --r-xl:  24px;

  /* Transitions */
  --ease:       0.25s ease;
  --ease-long:  0.6s ease;

  /* Nav height (used in JS smooth-scroll offset) */
  --nav-h: 68px;
}


/* ─────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }


/* ─────────────────────────────────────────
   3. UTILITIES
───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5%, 3rem);
}

.section-pad { padding: 96px 0; }

/* Section label pill */
.label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-mid);
  background: var(--navy-light);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1.1rem;
}

/* Section headings */
h2.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.18;
  margin-bottom: 0.7rem;
}

p.section-lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 3.5rem;
}

/* Anti-spam honeypot — visually hidden, off-screen */
.u-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tabindex: -1;
}


/* ─────────────────────────────────────────
   4. SCROLL REVEAL
───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--ease-long), transform var(--ease-long);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* CSS fallback stagger for grid children (JS overrides with dynamic delay) */
.services-grid .service-card:nth-child(1),
.g-grid .g-card:nth-child(1),
.t-grid .t-card:nth-child(1) { transition-delay: 0ms; }

.services-grid .service-card:nth-child(2),
.g-grid .g-card:nth-child(2),
.t-grid .t-card:nth-child(2) { transition-delay: 80ms; }

.services-grid .service-card:nth-child(3),
.g-grid .g-card:nth-child(3),
.t-grid .t-card:nth-child(3) { transition-delay: 160ms; }

.services-grid .service-card:nth-child(4) { transition-delay: 240ms; }
.services-grid .service-card:nth-child(5) { transition-delay: 320ms; }
.services-grid .service-card:nth-child(6) { transition-delay: 400ms; }

/* Hero accent text — typewriter (driven by JS Module 5) */
.hero-content h1 em {
  display: inline-block;
  color: var(--navy-light);
  font-style: normal;
}
.hero-content h1 em.typing::after {
  content: '|';
  color: var(--navy-light);
  animation: tw-blink 0.65s step-end infinite;
  margin-left: 2px;
}
@keyframes tw-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Hero button overrides — secondary needs visibility on dark bg */
#hero .btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
#hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.8);
}


/* ─────────────────────────────────────────
   5. SCROLL PROGRESS BAR (injected by JS)
───────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--navy), var(--navy-mid));
  z-index: 9999;
  transition: width 0.08s linear;
  pointer-events: none;
}


/* ─────────────────────────────────────────
   6. BACK TO TOP (injected by JS)
───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--ease), transform var(--ease), background var(--ease);
  z-index: 150;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
}

.back-to-top.on-dark {
  background: var(--white);
  color: var(--navy);
}
.back-to-top.on-dark:hover {
  background: var(--cream);
  transform: translateY(-2px);
}


/* ─────────────────────────────────────────
   7. NAVIGATION
───────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

#nav.scrolled,
#nav.nav-solid {
  background: rgba(249, 245, 238, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

/* Menu-open: same look as scrolled but instant (no transition) */
#nav.menu-open {
  background: rgba(249, 245, 238, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  transition: none;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--ease);
}
#nav.scrolled .nav-logo-img,
#nav.nav-solid .nav-logo-img,
#nav.menu-open .nav-logo-img { filter: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: color var(--ease);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a:hover { color: var(--white); }

/* Scrolled state — dark text on cream bg */
#nav.scrolled .nav-links a,
#nav.nav-solid .nav-links a        { color: var(--muted); }
#nav.scrolled .nav-links a:hover,
#nav.nav-solid .nav-links a:hover  { color: var(--navy); }

/* Active state (added by JS Intersection Observer) */
.nav-links a.active { color: var(--white); font-weight: 600; }
#nav.scrolled .nav-links a.active,
#nav.nav-solid .nav-links a.active { color: var(--navy); }
.nav-links a.active::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--navy-mid);
  border-radius: 2px;
}

/* CTA button in nav */
.nav-cta {
  background: var(--navy) !important;
  color: var(--cream) !important;
  padding: 0.78rem 2.2rem 0.9rem !important;
  border-radius: var(--r-sm);
  font-weight: 600 !important;
  transition: background var(--ease) !important;
}
.nav-cta:hover { background: var(--navy-mid) !important; color: var(--cream) !important; }
.nav-cta::after { display: none !important; } /* hide underline on CTA */

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px 4px;
  background: none;
  border: none;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease), background var(--ease);
}
#nav.scrolled .hamburger span,
#nav.nav-solid .hamburger span,
#nav.menu-open .hamburger span { background: var(--navy); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 1.5rem clamp(1rem, 5%, 3rem);
  gap: 0.25rem;
}
.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 0.55rem 0;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--navy); border-color: var(--border); }

.mobile-menu .nav-cta {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: none !important;
}


/* ─────────────────────────────────────────
   8. HERO
───────────────────────────────────────── */
#hero {
  position: relative;
  background-color: var(--navy); /* fallback if images fail */
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Carousel slides — horizontal track */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  background: center / cover no-repeat;
  flex-shrink: 0;
}

/* Slide images (swap for real photos later) */
.hero-slide-1 { background-image: url('img/entrance.jpg'); }
.hero-slide-2 { background-image: url('img/entrance.jpg'); }
.hero-slide-3 { background-image: url('img/entrance.jpg'); }

/* Carousel arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.hero-arrow svg { width: 20px; height: 20px; }
.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.6);
}
.hero-arrow-prev { left: clamp(1rem, 3vw, 2.5rem); }
.hero-arrow-next { right: clamp(1rem, 3vw, 2.5rem); }

/* Dark gradient overlay — heavier on the left where the text lives */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.70) 0%,
    rgba(0, 0, 0, 0.48) 50%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Lift container above overlay */
#hero > .container {
  position: relative;
  z-index: 2;
}

/* Carousel indicators */
.hero-indicators {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.6rem;
}

.hero-dot {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.4); }

.hero-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--white);
  border-radius: 2px;
}

.hero-dot.active::after {
  animation: hero-progress var(--carousel-speed, 6s) linear forwards;
}

@keyframes hero-progress {
  from { width: 0%; }
  to   { width: 100%; }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 5rem 0;
}

/* Hero badge pill */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.6rem;
  backdrop-filter: blur(4px);
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--navy-light);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Hero headline */
.hero-content {
  max-width: 700px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.12;
  margin-bottom: 1.3rem;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
  margin: 0 0 2.2rem;
}

/* Button row */
.btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; justify-content: flex-start; }

.btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-sm);
  padding: 0.78rem 1.8rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease),
              transform var(--ease), box-shadow var(--ease);
}
.btn-primary  { background: var(--navy); color: var(--cream); }
.btn-primary:hover  { background: var(--navy-mid); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--cream); transform: translateY(-2px); }

/* Hero visual (right column) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-circle {
  width: 380px;
  height: 380px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-lg);
  will-change: transform; /* parallax optimisation */
}

.hero-circle::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px dashed rgba(15, 36, 71, 0.18);
  pointer-events: none;
}

.hero-circle svg { width: 56%; height: 56%; }

/* Floating chips */
.hero-chip {
  position: absolute;
  background: var(--white);
  border-radius: var(--r);
  padding: 0.7rem 1rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}
.chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chip-icon svg { width: 15px; height: 15px; stroke: var(--navy); fill: none; }
.chip-stars { color: var(--navy-mid); font-size: 0.72rem; display: block; }

.hero-chip-1 { bottom: 40px; left: -24px; }
.hero-chip-2 { top: 40px; right: -24px; }


/* ─────────────────────────────────────────
   9. HERO STATS STRIP (properly full-width)
───────────────────────────────────────── */
.hero-stats-strip {
  background: var(--navy);
  width: 100%;
  padding: 2.2rem 0;
}

.hero-stats-inner {
  display: flex;
  justify-content: center;
  gap: 5rem;
  flex-wrap: wrap;
}

.stat { text-align: center; color: var(--cream); }

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  display: block;
  color: var(--navy-mid);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 0.2rem;
}


/* ─────────────────────────────────────────
   10. SERVICES
───────────────────────────────────────── */
#services { background: var(--cream); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.9rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
}

/* Left-border accent on hover */
.service-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--navy);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--ease);
  border-radius: 0 2px 2px 0;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(18, 85, 163, 0.12);
  transform: translateY(-3px);
}
.service-card:hover::before { transform: scaleY(1); }

.svc-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.svc-icon svg { width: 24px; height: 24px; stroke: var(--navy); fill: none; }

.service-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 0.45rem; }
.service-card p  { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }


/* ─────────────────────────────────────────
   11. ABOUT
───────────────────────────────────────── */
#about { background: var(--cream-alt); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text p { font-size: 0.93rem; color: var(--muted); margin-bottom: 1rem; }
.about-text p.section-lead { margin-bottom: 1.2rem; }

.values-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.7rem;
}
.values-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}
.check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.check svg { width: 11px; height: 11px; stroke: var(--cream); fill: none; }

/* ── Before/After Slider ────────────────────────────────── */
.before-after {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  --ba-pos: 50%;
}

.ba-after,
.ba-before {
  position: absolute;
  inset: 0;
}

.ba-after img,
.ba-before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  color: transparent;        /* hides alt text when image fails to load */
  font-size: 0;              /* suppresses broken-image icon in most browsers */
}

.ba-before {
  clip-path: inset(0 calc(100% - var(--ba-pos)) 0 0);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-pos);
  transform: translateX(-50%);
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--white);
  box-shadow: 0 0 8px rgba(0,0,0,0.35);
  pointer-events: none;
}

.ba-handle:focus-visible .ba-line {
  box-shadow: 0 0 0 3px var(--navy), 0 0 8px rgba(0,0,0,0.35);
}

@media (max-width: 640px) {
  .before-after { aspect-ratio: 3 / 4; }
}

@media (prefers-reduced-motion: reduce) {
  .ba-circle { transition: none; }
}


/* ─────────────────────────────────────────
   12. FOUNDERS
───────────────────────────────────────── */
#about { padding-bottom: 0; }

.founders-sub {
  margin-top: 4rem;
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 4rem 0;
}

.founders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem 7rem;
  max-width: 800px;
  margin: 0 auto;
  align-items: start;
}

.founder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.8rem;
}

.founder-portrait {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  flex-shrink: 0;
}

.founder-portrait svg { width: 85%; }

.founder-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.founder-role {
  display: block;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--navy-mid);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.9rem;
}

.founder-info p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Scroll reveal stagger for founder cards */
.founders-grid .founder-card:nth-child(1) { transition-delay: 0ms; }
.founders-grid .founder-card:nth-child(2) { transition-delay: 120ms; }


/* ─────────────────────────────────────────
   13. GOOGLE RATINGS (legacy styles kept for reference)
───────────────────────────────────────── */
#google-ratings { background: var(--cream); }

.g-header {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

/* Rating badge card */
.g-badge {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.3rem 1.7rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.g-score { display: flex; flex-direction: column; }
.g-num   { font-size: 2.7rem; font-weight: 800; color: var(--navy); line-height: 1; }
.g-stars { color: var(--navy-mid); font-size: 1rem; letter-spacing: 0.04em; margin: 0.2rem 0; }
.g-count { font-size: 0.76rem; color: var(--muted); }

.g-sep { width: 1px; height: 60px; background: var(--border); flex-shrink: 0; }

.g-logo { display: flex; align-items: center; gap: 0.55rem; }
.g-wordmark { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.g-wordmark-sub { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* Google brand colours */
.gb { color: #4285F4; }
.gr { color: #EA4335; }
.gy { color: #FBBC04; }
.gg { color: #34A853; }

/* Rating bar chart */
.g-bars { display: flex; flex-direction: column; gap: 0.45rem; }
.bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.79rem;
  color: var(--muted);
}
.bar-track {
  flex: 1;
  min-width: 100px;
  height: 6px;
  background: var(--cream-dark);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill { height: 100%; background: var(--navy-mid); border-radius: 99px; }

/* Bar width classes (replaces inline styles) */
.bar-89 { width: 89%; }
.bar-9  { width: 9%; }
.bar-2  { width: 2%; }
.bar-0  { width: 0%; }

/* Google review card grid */
.g-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  margin-bottom: 2.2rem;
}

.g-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.g-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.g-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.g-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--white);
  flex-shrink: 0;
}

/* Avatar colour classes (replaces inline styles) */
.avatar-google-blue  { background: #4285F4; }
.avatar-google-red   { background: #EA4335; }
.avatar-google-green { background: #34A853; }

.g-reviewer-name { font-size: 0.88rem; font-weight: 600; color: var(--text); display: block; }
.g-reviewer-sub  { font-size: 0.73rem; color: var(--muted); }
.g-card-stars    { color: var(--navy-mid); font-size: 0.82rem; margin-bottom: 0.7rem; }
.g-card-text     { font-size: 0.86rem; color: #555; line-height: 1.65; }

.g-card-footer {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.73rem;
  color: var(--muted);
}

/* Google Maps CTA button */
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.btn-google:hover {
  border-color: #4285F4;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.18);
}


/* ─────────────────────────────────────────
   13. TESTIMONIALS / REFERENCES
───────────────────────────────────────── */
#references { background: var(--cream-alt); }

.t-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.t-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  position: relative;
  transition: box-shadow var(--ease), transform var(--ease);
}
.t-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Decorative quote mark */
.t-quote {
  font-size: 5rem;
  line-height: 0;
  color: var(--navy-light);
  font-family: Georgia, serif;
  font-weight: 700;
  position: absolute;
  top: 1.6rem;
  right: 1.8rem;
  pointer-events: none;
  user-select: none;
}

.t-stars { color: var(--navy-mid); font-size: 0.85rem; margin-bottom: 1rem; }
.t-text  { font-size: 0.9rem; color: var(--text); line-height: 1.7; margin-bottom: 1.5rem; font-style: italic; }

.t-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.t-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.t-name { font-size: 0.88rem; font-weight: 700; color: var(--navy); display: block; }
.t-role { font-size: 0.78rem; color: var(--muted); }

/* Client row */
.client-row { margin-top: 3rem; display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.client-row-lbl { font-size: 0.76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.client-chip {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  transition: border-color var(--ease), background var(--ease);
}
.client-chip:hover { border-color: var(--navy); background: var(--navy-light); }


/* ─────────────────────────────────────────
   14. CONTACT
───────────────────────────────────────── */
#contact { background: var(--cream); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 5rem;
  align-items: start;
}

.contact-info p { font-size: 0.93rem; color: var(--muted); margin-bottom: 2.5rem; }

.c-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.c-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.c-icon svg { width: 18px; height: 18px; stroke: var(--cream); fill: none; }
.c-lbl { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); display: block; margin-bottom: 0.1rem; }
.c-val { font-size: 0.93rem; font-weight: 500; color: var(--text); }
.c-val a { text-decoration: none; color: var(--navy); transition: color var(--ease); }
.c-val a:hover { color: var(--navy-mid); text-decoration: underline; }

/* Contact form card */
.c-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.6rem;
  box-shadow: var(--shadow-md);
}
.c-form h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 1.8rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }

label { font-size: 0.8rem; font-weight: 600; color: var(--navy); letter-spacing: 0.03em; }

input, textarea, select {
  width: 100%;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  appearance: none;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(18, 85, 163, 0.09);
}

input.invalid, textarea.invalid, select.invalid {
  border-color: var(--error);
  background: #fdf5f5;
}

/* Field error message */
.f-error {
  font-size: 0.76rem;
  color: var(--error);
  margin-top: 0.25rem;
  display: none;
}
.f-error.show { display: block; }

textarea { resize: vertical; min-height: 118px; }

/* Custom select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Submit button */
.btn-submit {
  width: 100%;
  background: var(--navy);
  color: var(--cream);
  border: none;
  padding: 0.9rem;
  font-size: 0.97rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-submit:hover:not(:disabled) { background: var(--navy-mid); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* Loading spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(249, 245, 238, 0.3);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

/* Form notice */
.f-notice {
  margin-top: 1.1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
  animation: slideDown 0.35s ease;
}
.f-notice.success { background: var(--success-bg); border: 1px solid var(--success-bd); color: var(--success-tx); }
.f-notice.warning { background: var(--navy-light); border: 1px solid var(--navy-mid); color: var(--navy); }
.f-notice.show    { display: block; }


/* ─────────────────────────────────────────
   15. FOOTER
───────────────────────────────────────── */
footer {
  background: var(--navy);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo { display: flex; align-items: center; }
.footer-logo-img { height: 28px; width: auto; filter: brightness(0) invert(1); }

.footer-links { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.82rem;
  color: rgba(249, 245, 238, 0.45);
  text-decoration: none;
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--cream); }

.footer-copy { font-size: 0.78rem; color: rgba(249, 245, 238, 0.35); width: 100%; margin-top: 0.5rem; }

.footer-social { display: flex; gap: 1rem; align-items: center; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(249, 245, 238, 0.08);
  color: rgba(249, 245, 238, 0.55);
  transition: background var(--ease), color var(--ease);
}
.footer-social a:hover {
  background: rgba(249, 245, 238, 0.18);
  color: var(--cream);
}
.footer-social svg { width: 18px; height: 18px; }


/* ─────────────────────────────────────────
   16. KEYFRAME ANIMATIONS
───────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}


/* ─────────────────────────────────────────
   17. RESPONSIVE BREAKPOINTS
───────────────────────────────────────── */

/* Large desktop — widen breathing room */
@media (min-width: 1400px) {
  .container { max-width: 1280px; }
}

/* Tablet landscape */
@media (max-width: 1200px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .g-grid        { grid-template-columns: repeat(2, 1fr); }
  .t-grid        { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet portrait */
@media (max-width: 1024px) {
  .about-inner   { gap: 3rem; }
  .contact-inner { gap: 3rem; }
}

/* Indent hero text to clear the left carousel arrow.
   Applies from 769 px up to 1280 px — beyond that the centred container
   shifts the text far enough right on its own. */
@media (min-width: 769px) and (max-width: 1280px) {
  .hero-content { padding-left: 3.5rem; }
}

/* Mobile landscape / large mobile */
@media (max-width: 768px) {
  /* Reduce section padding */
  .section-pad { padding: 64px 0; }

  /* Nav — show hamburger, hide links */
  .nav-links { display: none; }

  /* Hide carousel arrows on mobile */
  .hero-arrow { display: none; }
  .hamburger { display: flex; }

  /* Hero */
  .hero-inner    { padding: 3rem 0; }

  /* Grids → single column */
  .services-grid  { grid-template-columns: 1fr; }
  .about-inner    { grid-template-columns: 1fr; gap: 2.5rem; }
  .founders-grid  { grid-template-columns: 1fr; gap: 3rem; max-width: 380px; }
  .founders-sub   { margin-top: 3rem; padding: 3rem 0; }
  .g-header       { flex-direction: column; }
  .t-grid         { grid-template-columns: 1fr; }
  .contact-inner  { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; }

  /* Back to top lower on mobile */
  .back-to-top { bottom: 1.25rem; right: 1.25rem; }
}

/* Small mobile */
@media (max-width: 480px) {
  .founder-portrait { width: 160px; height: 160px; }
  .founders-grid    { max-width: 320px; }
  .c-form           { padding: 1.8rem; }
  p.section-lead    { margin-bottom: 2.5rem; }
}

/* Extra small mobile (360px) */
@media (max-width: 360px) {
  .section-pad   { padding: 48px 0; }
  .hero-inner    { padding: 2.5rem 0; }
  .btn           { padding: 0.7rem 1.2rem; font-size: 0.88rem; }
  .c-form        { padding: 1.4rem; }
  .section-title { font-size: 1.6rem; }
  .founder-portrait { width: 140px; height: 140px; }
}

/* ─────────────────────────────────────────
   18. CONSENT MANAGEMENT UI
───────────────────────────────────────── */

/* Banner — slides up from bottom */
#consent-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 300;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.09);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#consent-banner.visible { transform: none; }

.cbanner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 5%, 3rem);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.cbanner-text { flex: 1; min-width: 260px; }
.cbanner-text strong { font-size: 0.9rem; font-weight: 700; color: var(--text); display: block; margin-bottom: 0.2rem; }
.cbanner-text p { font-size: 0.81rem; color: var(--muted); line-height: 1.55; margin: 0; }
.cbanner-text a { color: var(--navy); text-decoration: underline; transition: color var(--ease); }
.cbanner-text a:hover { color: var(--navy-mid); }
.cbanner-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; flex-shrink: 0; }

/* Shared consent button */
.cbtn {
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  white-space: nowrap;
  line-height: 1.4;
}
.cbtn-primary { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.cbtn-primary:hover { background: var(--navy-mid); border-color: var(--navy-mid); }
.cbtn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.cbtn-outline:hover { background: var(--navy-light); }
.cbtn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.cbtn-ghost:hover { color: var(--navy); border-color: var(--navy); }

/* Overlay */
#consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 46, 0.52);
  z-index: 399;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#consent-overlay.visible { opacity: 1; pointer-events: auto; }

/* Modal */
#consent-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -46%);
  z-index: 400;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  width: min(92vw, 540px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
#consent-modal.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.cmodal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
#cmodal-title { font-size: 1.1rem; font-weight: 800; color: var(--navy); margin: 0; }
.cmodal-close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 0.3rem 0.55rem; border-radius: var(--r-sm);
  font-size: 0.95rem; line-height: 1;
  transition: color var(--ease), background var(--ease);
}
.cmodal-close:hover { color: var(--navy); background: var(--cream-alt); }
.cmodal-lead { font-size: 0.84rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.4rem; }

/* Category card */
.ccat {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
}
.ccat-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.ccat-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.ccat-badge {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700;
  color: var(--navy); background: var(--navy-light);
  padding: 0.18rem 0.55rem; border-radius: 50px;
  margin-left: 0.4rem; letter-spacing: 0.04em;
}
.ccat-sub { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 0.15rem; }
.ccat-check { color: var(--navy); font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }
.ccat-desc { font-size: 0.81rem; color: var(--muted); line-height: 1.65; margin: 0; }

/* Toggle switch */
.ctoggle {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
  flex-shrink: 0; cursor: pointer;
}
.ctoggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.ctoggle-track {
  position: absolute; inset: 0;
  background: var(--cream-dark);
  border-radius: 50px;
  transition: background var(--ease);
}
.ctoggle-track::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: var(--white); border-radius: 50%;
  transition: transform var(--ease);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.ctoggle input:checked + .ctoggle-track { background: var(--navy); }
.ctoggle input:checked + .ctoggle-track::after { transform: translateX(20px); }
.ctoggle input:focus-visible + .ctoggle-track { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Modal footer */
.cmodal-footer {
  display: flex; gap: 0.75rem; justify-content: flex-end;
  margin-top: 1.4rem; padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Footer "Cookie-Einstellungen" button styled as link */
.footer-consent-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 0.82rem;
  color: rgba(249, 245, 238, 0.45);
  transition: color var(--ease);
}
.footer-consent-btn:hover { color: var(--cream); }

/* Mobile */
@media (max-width: 600px) {
  .cbanner-inner { gap: 1rem; }
  .cbanner-actions { width: 100%; }
  .cbtn { flex: 1; text-align: center; justify-content: center; }
  #consent-modal { padding: 1.5rem; }
  .cmodal-footer { flex-direction: column-reverse; }
  .cmodal-footer .cbtn { width: 100%; text-align: center; }
}


/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
