/* ============================================================
   home.css — kapy.ch v2 · Page-1 (Home)
   Section-specific layout/decoration. Uses foundation tokens + components.
   Loaded only on the Home page via base.njk page-specific slot.
   ============================================================ */

/* ============================================================
   Section 1 — HERO (Two-Worlds-Split-Bento + Aurora)
   ============================================================ */

.hero {
  padding-block: clamp(var(--space-8), 10vw, var(--space-10));
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Two-Worlds Bento — switcher pattern (row >=768px, stacked below) */
.hero__bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .hero__bento {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}

/* Welt-Cards override card defaults to fit hero context */
.hero__welt {
  --card-padding: clamp(var(--space-5), 4vw, var(--space-7));
  --card-radius: var(--radius-2xl);
  --card-gap: var(--space-4);
}

.hero__welt--a::before,
.hero__welt--b::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: var(--card-padding);
  block-size: 2px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-500);
  transition: block-size var(--dur-fast) var(--ease-out);
}

.hero__welt--b::before {
  background-color: var(--accent-400);
}

@media (hover: hover) {
  .hero__welt:hover::before {
    block-size: 4px;
  }
}

.hero__headline {
  /* Use display scale for hero — clamp so mobile stays readable */
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.5vw + 1rem, 2.5rem);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  text-wrap: balance;
  margin: 0;
}

.hero__subline {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  text-wrap: pretty;
  margin: 0;
  max-width: 38ch;
}

.hero__cta {
  margin-block-start: auto; /* push CTA to bottom of card */
  padding-block-start: var(--space-2);
}

/* ---------- Live-Demo Tile (Phase-1 Placeholder) ---------- */

.hero__demo {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-4), 3vw, var(--space-6));
  box-shadow: var(--shadow-sm);
  /* dashed inset indicates "Placeholder" state per 13-ASSET-PLACEHOLDERS pattern */
  outline: 2px dashed color-mix(in oklch, var(--brand-500) 30%, transparent);
  outline-offset: -8px;
}

@media (min-width: 768px) {
  .hero__demo {
    margin-block-start: calc(-1 * var(--space-5)); /* overlap bento bottom edge */
    margin-inline: clamp(var(--space-5), 4vw, var(--space-8));
  }
}

.hero__demo-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}

.hero__demo-text {
  font-size: var(--fs-body-md);
  color: var(--text-primary);
  margin: 0;
  max-width: 56ch;
}

.hero__demo-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-body-sm);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.hero__demo-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: var(--radius-circle);
  background-color: var(--success-500);
  box-shadow: 0 0 0 4px oklch(55% 0.14 155 / 0.18);
}

.hero__demo-note {
  margin: 0;
  font-style: italic;
}

/* ---------- Trust-Pills (3 pills, horizontal scroll on mobile) ---------- */

.hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
  margin-block-start: var(--space-3);
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  white-space: nowrap;
  margin: 0;
}

.hero__pill-dot {
  inline-size: 6px;
  block-size: 6px;
  border-radius: var(--radius-circle);
  background-color: var(--brand-500);
  flex-shrink: 0;
}

.hero__pill-dot--accent {
  background-color: var(--accent-400);
}

/* Mobile: enable horizontal scroll-snap when pills overflow */
@media (max-width: 540px) {
  .hero__pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    padding-block: var(--space-1);
    /* edge-fade mask for scroll hint */
    mask-image: linear-gradient(
      to right,
      transparent,
      black var(--space-3),
      black calc(100% - var(--space-3)),
      transparent
    );
  }
  .hero__pill {
    scroll-snap-align: start;
  }
}

/* ---------- Status-Indicator (per ADR-001 — pragmatic, no backend) ---------- */

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-body-sm);
  margin: 0;
  color: var(--text-secondary);
}

.hero__status-dot {
  inline-size: 10px;
  block-size: 10px;
  border-radius: var(--radius-circle);
  background-color: var(--success-500);
  box-shadow: 0 0 0 4px oklch(55% 0.14 155 / 0.15);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__status-dot {
    animation: status-pulse 2.4s ease-in-out infinite;
  }
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px oklch(55% 0.14 155 / 0.15);
  }
  50% {
    box-shadow: 0 0 0 8px oklch(55% 0.14 155 / 0.05);
  }
}

.hero__status-link {
  color: var(--text-secondary);
  text-decoration-color: color-mix(in oklch, currentColor 30%, transparent);
}

@media (hover: hover) {
  .hero__status-link:hover {
    color: var(--text-primary);
    text-decoration-color: currentColor;
  }
}

/* ============================================================
   Section 2 — TWO-WORLDS-SPLIT (Full-Width)
   ============================================================ */

.two-worlds {
  padding-block: clamp(var(--space-8), 10vw, var(--space-10));
}

.two-worlds__head {
  max-width: 65ch;
}

.two-worlds__split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: start;
}

@media (min-width: 768px) {
  .two-worlds__split {
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-7);
  }
}

.two-worlds__welt {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.two-worlds__list {
  list-style: none;
  padding: 0;
  font-size: var(--fs-body-md);
  color: var(--text-secondary);
  line-height: var(--lh-body);
}

.two-worlds__list li {
  position: relative;
  padding-inline-start: var(--space-5);
}

.two-worlds__list li::before {
  content: '→';
  position: absolute;
  inset-inline-start: 0;
  color: var(--brand-500);
  font-weight: var(--fw-semibold);
}

.two-worlds__welt--b .two-worlds__list li::before {
  color: var(--accent-600);
}

.two-worlds__cta {
  margin-block-start: var(--space-2);
}

/* Aurora-Divider between the two welts (desktop only) */
.two-worlds__divider {
  display: none;
}

@media (min-width: 768px) {
  .two-worlds__divider {
    display: block;
    inline-size: 1px;
    block-size: 100%;
    min-block-size: 200px;
    background: linear-gradient(
      to bottom,
      transparent,
      var(--border-strong) 20%,
      var(--border-strong) 80%,
      transparent
    );
  }
}

/* ============================================================
   Section 5 — SERVICES-BENTO (6-Card-Grid)
   Mobile-stack-first, 2-col tablet, 3-col desktop. No carousel.
   Reuses card.njk macro + button.njk macro.
   ============================================================ */

.services {
  padding-block: clamp(var(--space-8), 10vw, var(--space-10));
}

.services__head {
  max-width: 65ch;
}

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

@media (min-width: 600px) {
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

@media (min-width: 960px) {
  .services__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

/* ---------- Service-Card ---------- */
/* Component-scoped overrides on top of .card defaults from card.css */

.services__card {
  --card-padding: clamp(var(--space-5), 2.5vw, var(--space-6));
  --card-gap: var(--space-3);
  --card-radius: var(--radius-xl);
}

.services__price {
  /* Price as the visual anchor — top of card, tabular-nums, small caps weight */
  font-family: var(--font-display);
  font-size: var(--fs-body-md);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings:
    'tnum' 1,
    'lnum' 1;
  color: var(--brand-700);
  letter-spacing: 0;
  margin: 0;
}

[data-theme='dark'] .services__price {
  color: var(--brand-300);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .services__price {
    color: var(--brand-300);
  }
}

.services__price-unit {
  font-weight: var(--fw-regular);
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
}

.services__title {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  line-height: var(--lh-headline);
  letter-spacing: var(--ls-headline);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin: 0;
}

.services__desc {
  font-size: var(--fs-body-md);
  color: var(--text-secondary);
  line-height: var(--lh-body);
  margin: 0;
}

.services__more {
  display: inline-block;
  margin-block-start: auto; /* push to card bottom (flex column) */
  padding-block-start: var(--space-2);
  color: var(--text-link);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body-sm);
  transition:
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
  .services__card:hover .services__more {
    color: var(--brand-600);
    transform: translateX(2px);
  }
}

[data-theme='dark'] .services__more {
  color: var(--brand-400);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .services__more {
    color: var(--brand-400);
  }
}

/* ---------- Bundle-Card ---------- */
/* .card--featured already provides brand-border + ring-shadow.
   Only minor adjustments for Bundle's visual emphasis. */

.services__card--bundle .services__price {
  /* Bigger price for the Bundle — it's the cross-sell anchor */
  font-size: var(--fs-headline-sm);
}

/* ---------- Section CTA ---------- */

.services__cta {
  margin-block-start: var(--space-3);
}

/* ============================================================
   Section 7 — FOUNDER-INTRO
   Ruhig, schweizer bodenstaendig. Initials-Placeholder statt Foto.
   Kein Aurora, kein Quote-Bubble, kein Parallax — bewusst nuechtern.
   ============================================================ */

.founder {
  padding-block: clamp(var(--space-8), 10vw, var(--space-10));
}

.founder__inner {
  /* container narrower than wide — Founder ist persoenliche Sektion,
     nicht Marketing-Wall. Default container (960px) ist passend. */
  max-width: 56rem; /* ~896px — etwas enger als --cq-default 960 */
  margin-inline: auto;
}

.founder__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
  margin-block-start: var(--space-4);
}

@media (min-width: 600px) {
  .founder__layout {
    grid-template-columns: auto 1fr;
    gap: var(--space-7);
    align-items: center;
  }
}

/* ---------- Avatar (Initials-Placeholder, Phase-1 per ASSET-INVENTORY) ---------- */

.founder__avatar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  inline-size: clamp(160px, 24vw, 220px);
  block-size: clamp(160px, 24vw, 220px);
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(ellipse at top, oklch(72% 0.155 210 / 0.1), transparent 60%),
    color-mix(in oklch, var(--brand-500) 8%, var(--bg-surface));
  border: 1px solid var(--border-strong);
  /* dashed brand-outline marks Phase-1 placeholder (same convention
     as Hero Live-Demo) — removed when real photo lands */
  outline: 2px dashed color-mix(in oklch, var(--brand-500) 30%, transparent);
  outline-offset: -8px;
  color: var(--brand-700);
  flex-shrink: 0;
}

[data-theme='dark'] .founder__avatar {
  background:
    radial-gradient(ellipse at top, oklch(78% 0.15 210 / 0.12), transparent 60%),
    color-mix(in oklch, var(--brand-500) 18%, var(--bg-surface));
  color: var(--brand-300);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .founder__avatar {
    background:
      radial-gradient(ellipse at top, oklch(78% 0.15 210 / 0.12), transparent 60%),
      color-mix(in oklch, var(--brand-500) 18%, var(--bg-surface));
    color: var(--brand-300);
  }
}

.founder__avatar-initials {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -0.02em;
  color: inherit;
}

.founder__avatar-tag {
  position: absolute;
  inset-block-end: var(--space-3);
  inset-inline: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-overline);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: center;
}

/* ---------- Text-Block (rechts auf Desktop, unter Avatar Mobile) ---------- */

.founder__name {
  font-family: var(--font-display);
  font-size: var(--fs-headline-lg);
  line-height: var(--lh-headline);
  letter-spacing: var(--ls-headline);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin: 0;
}

.founder__role {
  font-size: var(--fs-body-md);
  color: var(--text-secondary);
  margin: 0;
}

.founder__story p {
  font-size: var(--fs-body-md);
  color: var(--text-primary);
  line-height: var(--lh-body);
  max-width: 56ch;
  margin: 0;
}

/* ---------- Contact-Row (Telefon + WhatsApp) ---------- */

.founder__contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  list-style: none;
  padding: 0;
  margin: 0;
  margin-block-start: var(--space-2);
}

.founder__contact li {
  margin: 0;
}

.founder__contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px; /* touch-target */
  font-size: var(--fs-body-md);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.founder__contact-link span:last-child {
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, currentColor 30%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

@media (hover: hover) {
  .founder__contact-link:hover span:last-child {
    text-decoration-color: currentColor;
  }
}

.founder__contact-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: var(--radius-circle);
  background-color: var(--brand-500);
  flex-shrink: 0;
}

.founder__contact-dot--accent {
  background-color: var(--accent-400);
}

.founder__replytime {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Section 10 — CTA-CLOSER (Demo-Booking)
   Ruhig, klar, kein Sales-Look. aurora--cta provides static glow.
   ============================================================ */

.cta-closer {
  padding-block: clamp(var(--space-9), 14vw, var(--space-10));
}

.cta-closer__inner {
  text-align: center;
  align-items: center;
}

.cta-closer__headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-headline);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  text-wrap: balance;
  margin: 0;
  max-width: 22ch;
}

.cta-closer__sub {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  line-height: var(--lh-body);
  text-wrap: pretty;
  margin: 0;
  max-width: 42ch;
}

.cta-closer__cta {
  margin-block-start: var(--space-2);
}

/* ---------- Backup Text-Link Row (kein zweiter Button) ---------- */

.cta-closer__backup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
  margin-block-start: var(--space-3);
  font-size: var(--fs-body-md);
  color: var(--text-secondary);
}

.cta-closer__backup li {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
}

@media (min-width: 540px) {
  .cta-closer__backup {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-5);
  }
}

.cta-closer__backup-label {
  color: var(--text-tertiary);
}

.cta-closer__backup-link {
  color: var(--text-primary);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, currentColor 30%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .cta-closer__backup-link:hover {
    text-decoration-color: currentColor;
  }
}

.cta-closer__replytime {
  margin: 0;
  margin-block-start: var(--space-2);
  font-variant-numeric: tabular-nums;
}
