/* brand.css — CogniLeap identity, shared by every page.
   Loaded AFTER each page's inline <style>, so equal-specificity rules here win.
   Colours are sampled from the logo (brand/cognileap-logo.png):
   charcoal from "Cogni", leaf green from "Leap", glow from the arrow's highlight. */

:root {
  --charcoal: #262826;   /* dark panels */
  --ink:      #2f302f;   /* body text */
  --graphite: #6d6f6c;   /* the C's lighter grey */
  --leaf:     #2a9a2e;   /* "Leap" — decorative, large text only */
  --action:   #1e7f2c;   /* buttons + links: AA with white text */
  --glow:     #7fd35c;   /* arrow highlight — only on charcoal */
  --mint:     #eef6ec;
  --paper:    #f7f8f6;
  --font:     'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body, button, input, select, textarea { font-family: var(--font); }
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.025em; }
::selection { background: var(--glow); color: var(--charcoal); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }

/* ── NAV LOCKUP: mark + two-tone wordmark, as in the logo ── */
.nav-logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.nav-logo img { height: 34px; width: auto; display: block; }
.nav-logo .wm { font-family: var(--font); font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.nav-logo .wm-a { color: #3d3d3d; }
.nav-logo .wm-b { color: var(--leaf); }
nav { height: 68px; gap: 1rem; }
.nav-links { gap: clamp(1rem, 1.8vw, 2rem); }
@media (max-width: 1080px) { .nav-links { display: none !important; } }
@media (max-width: 640px) {
  .nav-logo img { height: 28px; }
  .nav-logo .wm { font-size: 1.15rem; }
}
@media (max-width: 400px) { .nav-logo .wm { display: none; } }

/* Sentence-case labels: the logo is lowercase-friendly, not shouty */
.section-label { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 600; color: var(--action); }

.btn-primary, .nav-cta, .demo-submit { border-radius: 12px; }
.btn-primary { box-shadow: 0 10px 24px -10px rgba(30,127,44,.55); }
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(30,127,44,.6); }

/* ── HERO (home) — copy left, the mark leaping on the right ── */
.hero.hero--brand {
  text-align: left; min-height: 82vh;
  background:
    radial-gradient(circle at 78% 46%, rgba(127,211,92,.22) 0, rgba(127,211,92,0) 34%),
    linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}
.hero.hero--brand::before { display: none; }
.hero-grid {
  width: 100%; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: center; gap: 3rem;
}
.hero--brand .hero-badge { margin: 0 0 1.5rem; background: var(--mint); color: var(--action); }
.hero--brand .hero-badge span.dot { background: var(--leaf); box-shadow: 0 0 0 4px rgba(42,154,46,.18); }
.hero--brand h1 { margin: 0 0 1.4rem; max-width: none; font-size: clamp(2.3rem, 4.1vw, 3.9rem); line-height: 1.06; color: var(--ink); }
/* The headline runs the logo's gradient: charcoal → graphite → leaf */
.hero--brand h1 em { color: var(--graphite); }
.hero--brand .automate-wrap { color: var(--action); white-space: nowrap; }
@media (max-width: 600px) { .hero--brand .automate-wrap { white-space: normal; } }
.hero--brand .hero-sub { margin: 0 0 2.25rem; max-width: 34rem; }
.hero--brand .hero-actions, .hero--brand .hero-stats { justify-content: flex-start; }
.hero--brand .hero-stats { gap: 0; margin-top: 3rem; }
.hero--brand .stat { text-align: left; padding: 0 1.75rem; border-left: 2px solid var(--mint); }
.hero--brand .stat:first-child { padding-left: 0; border-left: 0; }
@media (max-width: 480px) {
  .hero--brand .hero-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
  .hero--brand .stat { padding: 0 .9rem; }
  .hero--brand .stat-num { font-size: 1.45rem; }
}
.hero--brand .stat-num { color: var(--ink); }

.hero-mark { position: relative; }

/* ── ANIMATED LOGO ──
   1. the grey C lands          (.la-c,     0.30s → 0.95s)
   2. the arrow sweeps out of it (.la-full, 0.85s → 1.85s) — a diagonal mask wipe from the
      C's tail to the arrow tip, over the complete logo, so the last frame IS the logo
   3. a glint runs up the arrow  (.la-shine, 1.90s → 2.80s), masked to the green pixels
   Hover replays the glint and gives the mark a small leap. */
.logo-anim {
  position: relative; width: 100%; max-width: 520px; margin-left: auto; aspect-ratio: 512 / 376;
  filter: drop-shadow(0 30px 40px rgba(38,40,38,.16));
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.logo-anim img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.la-c { animation: laC .65s cubic-bezier(.22,1,.36,1) .3s both; transform-origin: 30% 65%; }
@keyframes laC {
  from { opacity: 0; transform: scale(.82) rotate(-14deg); }
  to   { opacity: 1; transform: none; }
}
/* --la-p / --la-s are registered so they interpolate; without @property support the
   animation jumps straight to its end state, which is the plain logo. */
@property --la-p { syntax: '<percentage>'; inherits: false; initial-value: -20%; }
@property --la-s { syntax: '<percentage>'; inherits: false; initial-value: -30%; }
.la-full {
  --la-p: -20%;
  -webkit-mask-image: linear-gradient(to top right, #000 calc(var(--la-p) - 12%), transparent calc(var(--la-p) + 12%));
          mask-image: linear-gradient(to top right, #000 calc(var(--la-p) - 12%), transparent calc(var(--la-p) + 12%));
  animation: laSweep 1.05s cubic-bezier(.45,.05,.35,1) .7s forwards;
}
@keyframes laSweep { from { --la-p: -20%; } to { --la-p: 125%; } }
.la-shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/brand/mark-arrow.png) center / 100% 100% no-repeat;
          mask: url(/brand/mark-arrow.png) center / 100% 100% no-repeat;
  /* a bright band travelling the same way the arrow points */
  --la-s: -30%;
  background: linear-gradient(to top right, transparent calc(var(--la-s) - 9%), rgba(255,255,255,.9) var(--la-s), transparent calc(var(--la-s) + 9%));
  animation: laShine .85s ease-in-out 1.8s both;
}
@keyframes laShine  { from { --la-s: -30%; } to { --la-s: 130%; } }
@keyframes laShine2 { from { --la-s: -30%; } to { --la-s: 130%; } }
.logo-anim:hover { transform: translate(6px, -8px); }
.logo-anim:hover .la-shine { animation: laShine2 .85s ease-in-out both; }

/* Nav mark: a small leap on hover */
.nav-logo img { transition: transform .35s cubic-bezier(.22,1,.36,1); }
.nav-logo:hover img { transform: translate(2px, -3px) rotate(-4deg); }

/* Underline becomes the logo's arrow: a shaft that draws, then the head lands */
.automate-wrap::after {
  background: linear-gradient(90deg, var(--action), var(--glow)) !important;
  height: 6px !important; bottom: -8px !important; border-radius: 3px 0 0 3px !important;
  width: 0; max-width: calc(100% - 12px);
}
.automate-wrap::before {
  content: ''; position: absolute; right: -4px; bottom: -15px;
  width: 20px; height: 20px; background: var(--glow);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  opacity: 0; transform: translateX(-10px);
}
.automate-wrap.draw::after { animation: drawUnderline .7s ease forwards; }
.automate-wrap.draw::before { animation: arrowHead .3s ease .62s forwards; }
@keyframes arrowHead { to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-mark { order: -1; }
  .logo-anim { max-width: 220px; margin: 0; }
  .hero.hero--brand { min-height: 0; padding-top: 3rem; }
  .hero--brand .stat { padding: 0 1rem; }
}

/* ── CONTACT PANEL — charcoal, with the mark as a watermark ── */
#contact {
  background: var(--charcoal) !important;
  position: relative; overflow: hidden; isolation: isolate;
}
#contact::after {
  content: ''; position: absolute; z-index: -1; right: -60px; bottom: -40px;
  width: 420px; height: 310px; opacity: .08;
  background: url(/brand/cognileap-mark.webp) no-repeat center / contain;
}

/* ── REVIEWS ── */
#reviews { background: var(--white, #fff); }
.reviews-summary {
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  margin: -1.75rem auto 2.75rem; flex-wrap: wrap; text-align: center;
}
.reviews-summary[hidden] { display: none; }
.reviews-avg { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--ink); }
.stars { color: var(--leaf); letter-spacing: 2px; font-size: 1.15rem; }
.stars .off { color: #cfd4cc; }
.reviews-count { color: var(--muted); font-size: .95rem; }
.reviews-wall { max-width: 1120px; margin: 0 auto; display: grid; gap: 1.5rem; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 350px)); justify-content: center; }
.review {
  margin: 0; padding: 1.6rem 1.6rem 1.4rem;
  background: var(--paper); border-radius: 18px; position: relative;
}
.review::before {
  content: '\201C'; position: absolute; top: .4rem; right: 1.1rem;
  font-size: 4.2rem; line-height: 1; font-weight: 700; color: var(--glow); opacity: .55;
}
.review .stars { font-size: 1rem; margin-bottom: .7rem; }
.review blockquote { font-size: 1.02rem; line-height: 1.65; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.review figcaption { margin-top: 1.1rem; font-size: .9rem; color: var(--muted); }
.review figcaption strong { display: block; color: var(--ink); font-weight: 600; font-size: .98rem; }
.reviews-empty {
  max-width: 560px; margin: 0 auto; text-align: center; padding: 2.25rem 2rem;
  background: var(--mint); border-radius: 20px; color: var(--ink);
}
.reviews-empty[hidden] { display: none; }
.reviews-cta { text-align: center; margin-top: 2rem; }
.reviews-cta a, .reviews-empty a {
  display: inline-block; margin-top: .25rem; padding: .8rem 1.5rem; border-radius: 12px;
  background: var(--action); color: #fff; font-weight: 600; text-decoration: none;
}
.reviews-cta a:hover, .reviews-empty a:hover { background: #17661f; }
.reviews-empty p { margin-bottom: 1.1rem; font-size: 1.05rem; }

/* ── FOOTER ── */
.site-footer { text-align: center; padding: 3rem 5vw 2.5rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); }
.site-footer img { width: 150px; height: auto; display: block; margin: 0 auto 1.25rem; }
.site-footer .footer-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.site-footer a { color: var(--action); text-decoration: none; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* Long German service names ("Automatisierung") pushed phones 8-14px wide.
   Wrap the NAME only: zeroing the item's own min-width (140px on phones) squeezes
   all five tabs into one 57px row. */
.svc-name { overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
