/* clar.tax · Navigation und Hero
 * Abgeleitet aus lavern.ai (site/index.html, Zeilen 786–1123), Apache-2.0,
 * Copyright (c) 2025-2026 Antti Innanen. Für clar.tax angepasst, siehe NOTICE. */

/* ═══════════════════════════════════════════════════════════════════
   NAV — borrowed from Legit: identify-as prompt, restrained
   ═══════════════════════════════════════════════════════════════════ */
.nav{
  position:fixed;top:0;left:0;right:0;z-index:10000;
  /* z-index above body::after grain (9998) so the nav is always
     the topmost layer — no risk of page content bleeding through. */
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;
  padding:22px 32px;
  margin:0;
  background:rgba(250,250,250,0.78);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--hair);
  /* Respect the iOS notch safe area so the bar sits below it on
     iPhones with viewport-fit=cover pages (we don't currently set
     that meta, but the env() falls back to 0 when there's no inset,
     so this is a no-op on Android and on viewport-fit=auto). */
  padding-top:max(22px, env(safe-area-inset-top))
}
/* Brand sits at the left edge of column 1; nav-links at the right
   edge of column 3. The middle column (nav-meta) is auto-sized and
   therefore truly viewport-centred. */
.nav > .brand{justify-self:start}
.nav > .nav-links{justify-self:end}
.brand{
  font-family:var(--sans);font-size:18px;font-weight:500;
  letter-spacing:-0.5px;color:var(--text)
}
.nav-meta{
  font-family:var(--mono);font-size:10px;
  letter-spacing:1.5px;text-transform:uppercase;
  color:var(--muted);display:flex;gap:18px;align-items:center
}
.nav-meta span.dot{
  display:inline-block;width:5px;height:5px;border-radius:50%;
  background:var(--text);margin-right:8px;vertical-align:1px
}
.nav-links{display:flex;gap:8px;align-items:center}
.nav-link{
  font-family:var(--sans);font-size:13px;font-weight:500;
  color:var(--text);padding:8px 14px;border-radius:6px;
  transition:background .25s var(--ease)
}
.nav-link:hover{background:rgba(20,19,16,0.06)}
.nav-link.primary{
  background:var(--text);color:var(--bg);
  display:inline-flex;align-items:center;gap:8px;
  box-shadow:var(--shadow-pill);
  transition:background .25s var(--ease),box-shadow .35s var(--ease),transform .35s var(--ease)
}
.nav-link.primary:hover{background:#000;box-shadow:var(--shadow-pill-hover),var(--ring-top-strong);transform:translateY(-2px)}
.nav-link.featured{
  background:var(--surface-2);
  border:1px solid var(--hair-strong);
  box-shadow:var(--shadow-pill);
  display:inline-flex;align-items:center;gap:6px;
  transition:background .25s var(--ease),border-color .25s var(--ease),box-shadow .35s var(--ease),transform .35s var(--ease)
}
.nav-link.featured:hover{
  background:#fff;border-color:var(--text);
  box-shadow:var(--shadow-pill-hover);transform:translateY(-1px)
}
.nav-link.featured .arrow{display:inline-block;font-size:11px;transition:transform .25s var(--ease)}
.nav-link.featured:hover .arrow{transform:translate(2px,-2px)}
.nav-link svg{width:13px;height:13px}

@media(max-width:760px){
  .nav{
    padding:12px 16px;
    padding-top:max(12px, env(safe-area-inset-top));
    /* Mobile-only treatment: keep the frosted-glass look (translucent
       bg + backdrop blur) but kill the hard seam that previously read
       as a "gap" above the bar as iOS Safari's URL bar collapses:
       1. No 1px border-bottom — it renders as a sub-pixel seam.
       2. Soft box-shadow instead, for the "lift" line, with no hard
          edge to misalign as the URL-bar slides. */
    border-bottom:none;
    box-shadow:0 1px 0 rgba(20,19,16,0.04), 0 4px 12px rgba(20,19,16,0.05);
    /* Flex layout on mobile so the three pills take only the space
       they need — the 1fr|auto|1fr grid would otherwise constrain
       the nav-links column to half the viewport. */
    display:flex;justify-content:space-between;gap:8px;
  }
  .nav-meta{display:none}
  .nav-links{gap:6px}
  .nav-link{padding:8px 10px;font-size:12px}
  .nav-link.featured{padding:7px 11px}
  /* GitHub label collapses to icon-only on mobile — saves room for
     Architecture + Demo to keep their full word labels. */
  .nav-link.primary{padding:8px 11px;gap:0;font-size:0}
  .nav-link.primary svg{width:15px;height:15px;margin:0}
}

/* ═══════════════════════════════════════════════════════════════════
   HERO — type-first, no photo, paper restraint, CENTERED
   ═══════════════════════════════════════════════════════════════════ */
.hero{
  min-height:100vh;min-height:100dvh;position:relative;
  padding:clamp(140px,18vh,240px) 32px 0;
  display:flex;flex-direction:column;justify-content:flex-start;align-items:center;
  max-width:var(--max);margin:0 auto;text-align:center
}
/* iMac shot embedded directly in the hero — first impression includes
   the product visual. Tight margin so it peeks above the fold. */
.hero-imac{
  position:relative;width:100%;max-width:1000px;margin:28px auto 0;
  border-radius:var(--r-xl);overflow:hidden;
  box-shadow:var(--shadow-2xl), var(--ring-top-strong);
  opacity:var(--so,1);
  transform:scale(var(--ss,.92));
  transition:box-shadow .6s var(--ease),transform .6s var(--ease)
}
.hero-imac img{display:block;width:100%;height:auto}
/* Demo video — locked to the iMac screen area of imac-hero.jpg.
   Pixel-tuned to the photograph (1600×931): screen runs roughly from
   y=30 (top bezel) to y=600 (chin), x=320 to x=1280. Hidden behind
   the play button until the user clicks. */
.hero-imac-screen{
  position:absolute;
  top:8.5%;left:22%;
  width:56%;height:58%;
  overflow:hidden;
  background:#0a0908;
  opacity:0;pointer-events:none;
  transition:opacity .45s var(--ease)
}
.hero-imac-screen video{
  width:100%;height:100%;
  object-fit:cover;display:block;
  background:#0a0908
}
.hero-imac.playing .hero-imac-screen{
  opacity:1;pointer-events:auto
}

/* Play overlay — centred on the iMac's screen area (not the whole frame).
   Vertical centre of the screen = 3.2% + 64.5%/2 ≈ 35.5%. */
.hero-imac-play{
  position:absolute;
  top:48%;left:50%;
  transform:translate(-50%,-50%);
  display:flex;flex-direction:column;align-items:center;gap:14px;
  background:none;border:none;cursor:pointer;
  color:rgba(250,248,240,1);
  font-family:var(--sans);padding:18px;
  filter:
    drop-shadow(0 6px 16px rgba(0,0,0,0.5))
    drop-shadow(0 20px 50px rgba(0,0,0,0.32))
    drop-shadow(0 0 32px rgba(15,77,46,0.45));
  transition:opacity .4s var(--ease),transform .4s var(--ease)
}
.hero-imac-play:hover{transform:translate(-50%,-50%) scale(1.06)}
/* Continuous attention pulse around the SVG circle — combined with
   a warm specular glow that breathes alongside the pulse. */
.hero-imac-play-circle{
  display:inline-flex;border-radius:50%;
  animation:heroPlayPulse 2.4s ease-in-out infinite
}
@keyframes heroPlayPulse{
  0%,100%{box-shadow:0 0 0 0 rgba(250,248,240,0), 0 0 48px rgba(15,77,46,0.30)}
  55%{box-shadow:0 0 0 14px rgba(250,248,240,0.10), 0 0 72px rgba(15,77,46,0.45)}
}
.hero-imac-play svg{width:104px;height:104px;display:block}
.hero-imac-play-meta{
  font-family:var(--mono);font-size:9px;font-weight:500;
  letter-spacing:1.8px;text-transform:uppercase;
  opacity:.62
}
.hero-imac.playing .hero-imac-play{opacity:0;pointer-events:none}
@media(max-width:760px){
  .hero-imac-play svg{width:80px;height:80px}
  .hero-imac-play{gap:10px}
  .hero-imac-play-meta{font-size:8px}
}
.hero-imac-cap{
  margin-top:28px;text-align:center;
  display:flex;justify-content:center;align-items:center;gap:18px;
  font-family:var(--mono);font-size:11px;font-weight:500;
  letter-spacing:2.4px;text-transform:uppercase;color:var(--muted);
  flex-wrap:wrap
}
.hero-imac-cap .rule{
  display:inline-block;width:48px;height:1px;
  background:var(--hair-strong);flex:none
}
.hero-imac-cap em{
  font-style:normal;color:var(--text);font-weight:500
}
@media(max-width:640px){
  .hero-imac-cap{font-size:10px;gap:12px;letter-spacing:2px}
  .hero-imac-cap .rule{width:28px}
}
@media(max-width:480px){
  .hero-imac-cap{font-size:9.5px;letter-spacing:1.6px;gap:10px}
  .hero-imac-cap .rule{display:none}
  /* Force "Not in a browser tab" onto its own line so "TAB" never orphans */
  .hero-imac-cap > span:not(.rule) > span{display:block;margin-top:4px}
}
.hero h1{
  font-family:var(--serif);
  font-size:clamp(44px,5.6vw,92px);
  font-weight:400;line-height:1.05;letter-spacing:-0.01em;
  color:var(--text);margin:0 auto 44px;max-width:980px;
  /* No text-wrap:balance at the desktop tier — at tablet widths
     (768-1024px) Chrome and Safari over-apply balance and break
     the headline into one word per line. The mobile media query
     below re-enables balance only where it's needed. */
}
/* Global: emphasis comes from weight + colour, not slant. */
em, i{font-style:normal}
.hero h1 em{
  font-weight:400;color:var(--text)
}
.hero-deck{
  font-family:var(--sans);font-size:clamp(16px,1.5vw,20px);
  font-weight:400;color:var(--muted);
  max-width:580px;line-height:1.5;margin:0 auto 32px
}
.hero-deck strong{color:var(--text);font-weight:600}
/* Small mono disclaimer line right under the hero deck — keeps the
   "this is not actually a law firm, and you use it at your own
   risk" message visible from the first paint. */
.hero-disclaimer{
  display:inline-block;margin-top:14px;
  font-family:var(--mono);font-size:clamp(10px,1.05vw,12px);
  letter-spacing:1.6px;text-transform:uppercase;
  color:var(--dim);font-weight:500;
}

/* Hero CTAs */
.cta-row{display:flex;flex-wrap:wrap;gap:14px;align-items:center;justify-content:center}
.btn{
  display:inline-flex;align-items:center;gap:10px;
  font-family:var(--sans);font-size:14px;font-weight:500;
  padding:15px 26px;border-radius:var(--r-pill);cursor:pointer;
  transition:transform .35s var(--ease),box-shadow .35s var(--ease),background-color .25s var(--ease);
  border:1px solid transparent;letter-spacing:-0.005em
}
.btn-primary{
  background:var(--text);color:var(--bg);
  box-shadow:var(--shadow-pill)
}
.btn-primary:hover{
  background:#000;transform:translateY(-2px);
  box-shadow:var(--shadow-pill-hover)
}
.btn svg{width:15px;height:15px}

/* Install one-liner pill */
.install{
  display:inline-flex;align-items:center;gap:14px;
  font-family:var(--mono);font-size:13px;
  background:var(--surface-2);border:1px solid var(--hair-strong);
  padding:13px 22px;border-radius:var(--r-pill);color:var(--text);cursor:pointer;
  transition:transform .35s var(--ease),box-shadow .35s var(--ease),background-color .25s var(--ease),border-color .25s var(--ease);
  max-width:100%;box-shadow:var(--shadow-pill)
}
.install:hover{
  background:#fff;border-color:var(--text);
  transform:translateY(-2px);
  box-shadow:var(--shadow-pill-hover)
}
.install-prompt{color:var(--dim);user-select:none}
.install-cmd{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.install-copy{
  font-family:var(--sans);font-size:11px;font-weight:500;
  color:var(--muted);padding-left:12px;border-left:1px solid var(--hair);
  transition:color .25s var(--ease)
}
.install:hover .install-copy{color:var(--text)}
.install.copied .install-copy{color:var(--warm)}

.hero-meta{
  margin:36px auto 0;padding-top:24px;border-top:1px solid var(--hair);
  display:grid;grid-template-columns:repeat(4,1fr);gap:24px;
  max-width:780px;width:100%;text-align:left
}
.hero-meta-item{
  display:flex;flex-direction:column;gap:4px
}
.hero-meta-num{
  font-family:var(--sans);font-size:22px;font-weight:500;
  letter-spacing:-0.02em;color:var(--text)
}
.hero-meta-label{
  font-family:var(--mono);font-size:10px;
  letter-spacing:1.5px;text-transform:uppercase;color:var(--muted)
}
@media(max-width:640px){
  .hero{padding:120px 22px 60px}
  .hero-meta{grid-template-columns:repeat(2,1fr)}
}
/* ─── Tight mobile (<=480px) — fix overflow, polish elegance ─── */
@media(max-width:480px){
  /* Install pill — sized to fit a phone viewport */
  .install{
    width:100%;
    padding:12px 18px;
    font-size:11.5px;
    gap:10px;
    justify-content:center
  }
  .install-prompt{display:none}
  .install-copy{font-size:10px;padding-left:10px}
  /* CTA stack — both items full-width when row wraps to column */
  .cta-row{gap:12px}
  .cta-row > *{width:100%;justify-content:center}
  .btn-primary{justify-content:center}
  /* Nav — drop the featured Architecture pill (accessible via footer);
     keep Demo pill — it's a primary CTA on mobile too. */
  .nav-link.featured{display:none}
  #navDemo{display:inline-flex;padding:8px 12px;font-size:12px}
  .nav{padding:12px 18px}
  /* Stats hero — single-column reads more luxurious than 2×2 on a phone */
  .hero-meta{grid-template-columns:1fr;gap:14px;max-width:280px;padding-top:32px;margin-top:48px}
  .hero-meta-item{flex-direction:row;justify-content:space-between;align-items:baseline;gap:14px}
  .hero-meta-num{font-size:24px}
  .hero-meta-label{font-size:11px}
  /* Hero — slight breathing-room tweaks */
  .hero{padding:96px 22px 56px}
  .hero h1{
    /* On mobile the headline "A Multi-Agent Legal System. / Yours."
       wraps to three lines naturally — "A Multi-Agent" / "Legal
       System." / "Yours." — and we let text-wrap:balance pick the
       best break so no word gets stranded. Font is tuned so each
       of those three lines reads big and confident on a 375px
       viewport without spilling. Balance is mobile-only here; the
       desktop rule above doesn't use it because at tablet widths
       the browsers over-balance and break each phrase to its own line. */
    font-size:clamp(34px,9.4vw,46px);
    letter-spacing:-0.022em;
    line-height:1.05;
    margin-bottom:28px;
    text-wrap:balance;
  }
  .hero-deck{margin-bottom:28px}
}
