/* ================================================================
   NeoDemos — pages/landing-r4.css
   Faithful adaptation of the 260718 cockpit landing source
   (templates/260718 NeoDemos Design System/ui_kits/cockpit/landing.html).
   Layout classes are prefixed ld- to avoid collisions with legacy lp-*.
   Controls use the canonical global .btn family; the page-level selectors
   below preserve the 260718 source's spacing and motion. Tokens only.

   DELTA vs the bundle (deliberate): the centre demo is a real
   screenshot in the browser chrome, NOT a live iframe — WS89 ships
   X-Frame-Options: DENY + frame-ancestors 'none' and we don't relax
   a fresh security remediation for a marketing embed. Relaxing to
   'self' for a public demo route is flagged as an owner decision in
   DESIGN_R4_PLAN.
   ================================================================ */

@layer components {

  /* ── Landing header — brand left, links + CTA right, sticky with a
     backdrop-blur that frosts content scrolling under it (per the 260718
     template). search.html overrides the chrome block so this nav replaces
     the site-wide _nav.html on the landing only. ── */
  .ld-nav {
    position: sticky; top: 0; z-index: var(--z-nav);
    background: color-mix(in oklab, var(--color-surface) 86%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-subtle);
  }
  .ld-nav__in { display: flex; align-items: center; gap: var(--space-4); height: 68px; }
  .ld-nav__brand {
    display: flex; align-items: center; gap: 0;
    font-family: var(--font-heading); font-size: 1.6rem;
    color: var(--color-primary); letter-spacing: var(--letter-spacing-display);
    text-decoration: none;
  }
  /* Wordmark period. Marketing-nav wordmark is 1.6rem (>=24px) per the brand
     rule, so the accent period uses the bright display --color-accent
     (matches ui_kits/cockpit/landing.html .nav__brand). */
  .ld-nav__dot { color: var(--color-accent); }
  .ld-nav__links { display: flex; align-items: center; gap: var(--space-6); margin-left: auto; }
  .ld-nav__link { font-size: var(--font-size-sm); font-weight: 500; color: var(--color-text-secondary); text-decoration: none; }
  .ld-nav__link:hover { color: var(--color-primary); }
  .ld-nav .btn {
    padding: var(--space-2) var(--space-4);
    border: 1px solid transparent;
    font-size: var(--font-size-sm);
    line-height: inherit;
    white-space: nowrap;
    transition:
      background var(--dur-1) var(--ease),
      color var(--dur-1) var(--ease),
      border-color var(--dur-1) var(--ease),
      transform var(--dur-2) var(--ease);
  }
  @media (max-width: 720px) { .ld-nav__links .ld-nav__link { display: none; } }

  /* Smooth in-page jumps + offset anchored sections below the 68px sticky
     bar so headings don't hide under it. Scoped to the landing via :has. */
  html:has(body.has-landing) { scroll-behavior: smooth; scroll-padding-top: calc(68px + var(--space-4)); }

  /* base.html wraps {% block content %} in a centered, capped <main>
     (layout.css: max-width var(--container-2xl); padding var(--space-12) 5%).
     The landing is full-bleed — the hero photo, the tinted Functies band and
     the CTA band span the viewport, with content re-centring via .ld-wrap — so
     it must opt out of that cap, the same way .home-page/.dossier-page main do.
     search.html renders its own <main> inside the base <main>; reset BOTH so
     the bands reach the edges. */
  body.has-landing main { max-width: none; margin: 0; padding: 0; }

  .ld-wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--space-6); }

  /* The landing reference uses a roomier CTA size than the canonical default.
     These are container layout adjustments, not a parallel button component. */
  .ld-hero__cta .btn,
  .ld-cta__row .btn {
    padding: var(--space-3) var(--space-6);
    border-width: 1px;
    border-style: solid;
    font-size: var(--font-size-base);
    line-height: inherit;
    transition:
      background var(--dur-1) var(--ease),
      color var(--dur-1) var(--ease),
      border-color var(--dur-1) var(--ease),
      transform var(--dur-2) var(--ease);
  }
  .ld-hero__cta .btn-accent,
  .ld-cta__row .btn-accent { border-color: transparent; }
  .ld-hero__cta .btn-ghost {
    border-color: var(--color-border-strong);
    color: var(--color-text);
  }
  @media (prefers-reduced-motion: reduce) {
    .ld-nav .btn,
    .ld-hero__cta .btn,
    .ld-cta__row .btn,
    .ld-feature,
    .ld-mcpshow__card { transition: none; }
    .ld-nav .btn-accent:hover,
    .ld-hero__cta .btn-accent:hover,
    .ld-cta__row .btn-accent:hover { transform: none; }
  }

  /* ── Hero — centred over blurred Rotterdam photo ─────────────── */
  .ld-hero { position: relative; padding: var(--space-16) 0 var(--space-10); text-align: center; overflow: hidden; }
  .ld-hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
  .ld-hero__bg::before {
    content: ""; position: absolute; inset: 0;
    /* Image + position come from the git content layer (ADR-0065):
       landing.hero_image in content/site/nl/landing.yaml, set as custom
       properties on .ld-hero__bg by templates/search.html. */
    background: var(--ld-hero-img) var(--ld-hero-pos, center) / cover no-repeat;
    filter: blur(2px) saturate(1); opacity: .38;
    /* GEEN overscan (bundle: inset:-40px; eerdere fix: scale 1.04): de
       geblurde gecomposite laag ontsnapt aan de overflow-clip en schilderde
       een fotostrook ONDER de ::after-gradient (zichtbaar op mobiel). De
       2px blur-fringe aan de randen valt onder nav + gradient — onzichtbaar. */
  }
  .ld-hero__bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg,
      color-mix(in oklab, var(--color-surface) 50%, transparent) 0%,
      color-mix(in oklab, var(--color-surface) 80%, transparent) 52%,
      var(--color-surface) 100%);
  }
  .ld-hero > .ld-wrap { position: relative; z-index: 1; }
  .ld-hero > .ld-demo { position: relative; z-index: 1; }
  .ld-hero__eyebrow {
    display: inline-flex; align-items: center; gap: var(--space-2);
    font-size: var(--font-size-xs); font-weight: 600;
    letter-spacing: var(--letter-spacing-wide); text-transform: uppercase;
    color: var(--color-accent-ink); background: var(--color-accent-light);
    border-radius: var(--radius-full); padding: var(--space-1) var(--space-4);
    margin-bottom: var(--space-5);
  }
  .ld-hero__title {
    font-family: var(--font-heading); font-weight: 400;
    font-size: clamp(2.6rem, 6vw, var(--font-size-6xl)); line-height: 1.04;
    letter-spacing: var(--letter-spacing-display); color: var(--color-primary);
    max-width: 17ch; margin: 0 auto; text-wrap: balance;
  }
  .ld-hero__sub {
    font-size: var(--font-size-lg); line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary); max-width: 54ch;
    margin: var(--space-4) auto 0; text-wrap: pretty;
  }
  .ld-hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-6); }
  .ld-hero__trust {
    display: inline-flex; align-items: center; gap: var(--space-2);
    margin-top: var(--space-4); font-size: var(--font-size-sm); color: var(--color-text-tertiary);
  }
  .ld-hero__trust b { color: var(--color-text-secondary); font-weight: 600; }
  .ld-hero__trust-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-success); }

  /* ── Demo: werkruimte in browser chrome ──────────────────────── */
  .ld-demo { margin-top: var(--space-10); }
  .ld-browser {
    border-radius: var(--radius-xl); overflow: hidden;
    border: 1px solid var(--color-border); background: var(--color-surface-raised);
    box-shadow: var(--shadow-xl);
  }
  .ld-browser__bar {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-sunken); border-bottom: 1px solid var(--color-border);
  }
  .ld-browser__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--color-border-strong); }
  .ld-browser__addr {
    margin-left: var(--space-3); flex: 1; font-size: var(--font-size-xs);
    color: var(--color-text-tertiary); font-family: var(--font-mono);
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-full); padding: 5px var(--space-4); text-align: center;
  }
  .ld-browser__tag {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--color-success);
    display: inline-flex; align-items: center; gap: 5px;
  }
  .ld-browser__tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); }
  .ld-browser__shot { display: block; }
  .ld-browser__shot img { display: block; width: 100%; height: auto; }
  .ld-demo__hint { text-align: center; font-size: var(--font-size-xs); color: var(--color-text-tertiary); margin-top: var(--space-3); }
  .ld-demo__hint a { color: var(--color-accent-ink); font-weight: 600; text-decoration: none; }

  /* ── Sections ────────────────────────────────────────────────── */
  .ld-section { padding: var(--space-16) 0; }
  .ld-section--tint { background: var(--color-surface-sunken); }
  .ld-section__kicker {
    font-size: var(--font-size-xs); font-weight: 600;
    letter-spacing: var(--letter-spacing-widest); text-transform: uppercase;
    color: var(--color-accent-ink); text-align: center;
  }
  .ld-section__title {
    font-family: var(--font-heading); font-weight: 400;
    font-size: clamp(2rem, 4vw, var(--font-size-4xl));
    letter-spacing: var(--letter-spacing-display); color: var(--color-primary);
    text-align: center; margin-top: var(--space-2); line-height: 1.1; text-wrap: balance;
  }
  .ld-section__lede {
    font-size: var(--font-size-lg); color: var(--color-text-secondary);
    text-align: center; max-width: 58ch; margin: var(--space-4) auto 0; text-wrap: pretty;
  }

  /* ── Hoe het werkt — 3 numbered steps ────────────────────────── */
  .ld-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); margin-top: var(--space-10); counter-reset: ldstep; }
  .ld-step { background: var(--color-surface-raised); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); }
  .ld-step__n {
    counter-increment: ldstep; width: 36px; height: 36px; border-radius: var(--radius-full);
    background: var(--color-primary); color: #fff; font-family: var(--font-heading);
    font-size: var(--font-size-lg); display: inline-flex; align-items: center;
    justify-content: center; margin-bottom: var(--space-4);
  }
  .ld-step__n::before { content: counter(ldstep); }
  .ld-step__h { font-family: var(--font-heading); font-weight: 400; font-size: var(--font-size-xl); color: var(--color-primary); margin-bottom: var(--space-2); }
  .ld-step__p { font-size: var(--font-size-sm); color: var(--color-text-secondary); line-height: var(--line-height-relaxed); }
  @media (max-width: 760px) { .ld-steps { grid-template-columns: 1fr; } }

  /* ── Functies — 6 feature cards ──────────────────────────────── */
  .ld-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-top: var(--space-10); }
  .ld-feature {
    background: var(--color-surface-raised); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: var(--space-6);
    transition: transform .15s, box-shadow .15s;
  }
  .ld-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
  @media (prefers-reduced-motion: reduce) { .ld-feature:hover { transform: none; } }
  .ld-feature__ic {
    width: 42px; height: 42px; border-radius: var(--radius-md);
    background: var(--color-accent-light); color: var(--color-accent-ink);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: var(--font-size-xl); margin-bottom: var(--space-4);
  }
  .ld-feature__h { font-family: var(--font-heading); font-weight: 400; font-size: var(--font-size-lg); color: var(--color-primary); margin-bottom: var(--space-2); }
  .ld-feature__p { font-size: var(--font-size-sm); color: var(--color-text-secondary); line-height: var(--line-height-relaxed); }
  @media (max-width: 920px) { .ld-features { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .ld-features { grid-template-columns: 1fr; } }

  /* ── AI-koppeling — mcpshow gallery with real card screenshots ─ */
  .ld-mcpshow { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); margin-top: var(--space-10); }
  .ld-mcpshow__card {
    background: var(--color-surface-raised); border: 1px solid var(--color-border);
    border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s;
  }
  .ld-mcpshow__card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
  @media (prefers-reduced-motion: reduce) { .ld-mcpshow__card:hover { transform: none; } }
  .ld-mcpshow__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5) 0; }
  .ld-mcpshow__name { font-family: var(--font-heading); font-size: var(--font-size-lg); color: var(--color-primary); }
  .ld-mcpshow__cmd {
    margin-left: auto; font-family: var(--font-mono); font-size: var(--font-size-xs);
    color: var(--color-accent-ink); background: var(--color-accent-light);
    border-radius: var(--radius-full); padding: 3px 10px;
  }
  .ld-mcpshow__desc { font-size: var(--font-size-sm); color: var(--color-text-secondary); padding: var(--space-2) var(--space-5) var(--space-4); line-height: var(--line-height-snug); }
  .ld-mcpshow__frame {
    position: relative; margin: 0 var(--space-5) var(--space-5);
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--color-border-subtle);
    background: var(--color-surface-sunken); aspect-ratio: 16 / 10;
  }
  .ld-mcpshow__frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
  .ld-mcpshow__frame--doc::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
    background: linear-gradient(to bottom, transparent, var(--color-surface-sunken));
  }
  @media (max-width: 760px) { .ld-mcpshow { grid-template-columns: 1fr; } }
  .ld-mcp__foot { text-align: center; margin-top: var(--space-6); font-size: var(--font-size-sm); color: var(--color-text-tertiary); }
  .ld-mcp__foot a { color: var(--color-accent-ink); font-weight: 600; text-decoration: none; }

  /* ── CTA — rounded primary card with radial accents ──────────── */
  .ld-cta {
    background: var(--color-primary); color: #fff; border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-8); text-align: center;
    position: relative; overflow: hidden;
  }
  .ld-cta::after {
    content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px;
    border-radius: 50%; background: radial-gradient(circle, rgba(255,117,31,.22), transparent 70%);
  }
  .ld-cta::before {
    content: ""; position: absolute; left: -70px; bottom: -90px; width: 240px; height: 240px;
    border-radius: 50%; background: radial-gradient(circle, rgba(255,117,31,.14), transparent 70%);
  }
  .ld-cta__title {
    font-family: var(--font-heading); font-weight: 400;
    font-size: clamp(2rem, 4vw, var(--font-size-5xl));
    letter-spacing: var(--letter-spacing-display); line-height: 1.08;
    position: relative; z-index: 1; text-wrap: balance;
    max-width: 18ch; margin-left: auto; margin-right: auto;
  }
  .ld-cta__sub {
    font-size: var(--font-size-lg); color: rgba(255,255,255,.8); max-width: 48ch;
    margin: var(--space-3) auto var(--space-6); text-align: center;
    position: relative; z-index: 1;
  }
  .ld-cta__row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; position: relative; z-index: 1; }
  .ld-cta__note { font-size: var(--font-size-sm); color: rgba(255,255,255,.6); margin-top: var(--space-5); position: relative; z-index: 1; }

  /* ── Mobile demo: screenshot + zoomed feature highlights ─────── */
  .ld-demo__mobile { display: none; }
  .ld-shot {
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--color-border); box-shadow: var(--shadow-xl);
    background: var(--color-surface-raised); margin: 0;
  }
  .ld-shot__bar {
    display: flex; align-items: center; gap: 6px; padding: 9px var(--space-3);
    background: var(--color-surface-sunken); border-bottom: 1px solid var(--color-border);
  }
  .ld-shot__bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--color-border-strong); flex-shrink: 0; }
  .ld-shot__bar em {
    margin-left: 6px; font-style: normal; font-family: var(--font-mono); font-size: 10px;
    color: var(--color-text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .ld-shot img { display: block; width: 100%; height: auto; }
  .ld-zoomgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-4); }
  .ld-zoomcard {
    display: flex; flex-direction: column; gap: var(--space-2);
    background: var(--color-surface-raised); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: var(--space-2); margin: 0;
  }
  .ld-zoomcard__crop {
    display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-md);
    background-image: url('/static/images/landing/shot-moties.png');
    background-repeat: no-repeat; border: 1px solid var(--color-border-subtle);
  }
  /* Crops framed on the REAL moties dashboard shot (1280x800):
     inbox = the afdoeningsvoorstellen list, term = the KPI row. */
  .ld-zoomcard__crop--inbox { background-size: 230%; background-position: 72% 92%; }
  .ld-zoomcard__crop--term { background-size: 260%; background-position: 70% 48%; }
  .ld-zoomcard figcaption { font-size: var(--font-size-xs); line-height: 1.4; color: var(--color-text-secondary); padding: 0 var(--space-1) var(--space-1); text-wrap: pretty; }
  .ld-zoomcard figcaption b { color: var(--color-primary); font-weight: 650; }
  .ld-demo__cta { display: block; text-align: center; margin-top: var(--space-5); font-size: var(--font-size-sm); font-weight: 600; color: var(--color-accent-ink); text-decoration: none; }

  @media (max-width: 640px) {
    .ld-hero { padding: var(--space-12) 0 var(--space-8); }
    .ld-demo { margin-top: var(--space-8); }
    .ld-browser, .ld-demo__hint { display: none; }
    .ld-demo__mobile { display: block; }
    .ld-cta { padding: var(--space-10) var(--space-5); }
    .ld-cta__row .btn { flex: 1 1 auto; justify-content: center; }
    /* The compact mobile demo exposes the hero-photo fade seam that the
       full-height browser frame covers on desktop — finish the gradient
       opaque before the demo block. */
    .ld-hero__bg::after {
      background: linear-gradient(180deg,
        color-mix(in oklab, var(--color-surface) 50%, transparent) 0%,
        color-mix(in oklab, var(--color-surface) 85%, transparent) 38%,
        var(--color-surface) 72%);
    }
  }

}
