/* Self-hosted brand fonts (SIL Open Font License) — no Google call (DSG/DSGVO) */
@font-face {
  font-family: "Archivo Black";
  src: url("assets/fonts/ArchivoBlack-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("assets/fonts/Outfit-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* Tokens mirror the BOLT. brand and the iOS app palette (Core/Theme/Palette.swift, light mode) */
:root {
  --blue: #004aad;
  --blue-light: #38b6ff;
  --blue-mid: #67a7dc;
  --blue-deep: #062e66;
  --night: #0b1120;
  --white: #ffffff;
  --card: #f2f5fa;
  --card-active: #e8eef8;
  --text: #0e1b31;
  --text-secondary: #4a5b7a;
  --border: rgba(19, 36, 65, 0.12);
  --on-blue-secondary: rgba(255, 255, 255, 0.78);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --sans: "Outfit", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-md: 16px;
  --radius-lg: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }

/* Headlines: heavy and uppercase like the BOLT. wordmark, period in light blue like its dot */
h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
}

.dot { color: var(--blue-light); }

.kicker {
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-light);
}
.kicker-dark { color: var(--blue); }

/* ── Buttons (pills, as in the app) ──────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 17px;
  transition: transform 0.4s var(--ease), box-shadow 0.3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 74, 173, 0.3); }
.btn-white { background: var(--white); color: var(--text); }
.btn-white::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-light);
}
.btn-outline { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }
.btn-small { padding: 10px 18px; font-size: 15px; }
.btn-large { padding: 22px 40px; font-size: clamp(18px, 2.4vw, 24px); }

/* ── Navigation ──────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: var(--blue);
}

.logo-link img { width: auto; height: 30px; }

.nav-links { display: flex; gap: 36px; font-size: 15px; font-weight: 600; color: var(--on-blue-secondary); }
.nav-links a:hover { color: var(--white); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .logo-link img { height: 24px; }
}

/* ── Scroll story (brand blue stage) ─────────────────── */

/* Short on purpose: the app opens after about one screen of scrolling */
.story { position: relative; height: 560vh; }

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: var(--white);
  background: var(--blue);
}

/* The phone sits above the hero text, so it slides cleanly over it instead of showing through */
.phone-canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.hero { z-index: 1; }
.caption, .progress { z-index: 3; }

.phone-fallback { display: none; }
.no-webgl .phone-fallback {
  display: block;
  position: absolute;
  right: 12vw;
  top: 50%;
  width: min(300px, 60vw);
  transform: translateY(-50%);
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 0 0 10px #1b1f2a, 0 40px 120px rgba(0, 0, 0, 0.4);
}

.hero, .caption, .scroll-hint { will-change: opacity, transform; }

/* Centred headline with the phone rising from below, like a product launch page */
.hero {
  position: absolute;
  left: 50%;
  top: clamp(104px, 15vh, 160px);
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 2 * var(--gutter)));
  text-align: center;
}
.hero h1 { font-size: clamp(44px, 6.6vw, 104px); }
.hero .lead { margin: 24px auto 0; max-width: 560px; font-size: 21px; color: var(--on-blue-secondary); }
.hero-actions { display: flex; justify-content: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.captions { list-style: none; margin: 0; padding: 0; }

.caption {
  position: absolute;
  left: var(--gutter);
  top: 52%;
  max-width: 560px;
  opacity: 0;
  transform: translateY(-50%);
}
.caption h2 { font-size: clamp(44px, 6vw, 96px); }
.caption p { margin-top: 24px; font-size: 19px; color: var(--on-blue-secondary); max-width: 470px; }
.caption-index {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-light);
}

.progress {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 28px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--blue-light);
  transform-origin: left;
  transform: scaleX(0);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-blue-secondary);
}

/* Mobile: phone in the lower area at start, text docked at the bottom later */
@media (max-width: 820px) {
  .hero { top: 92px; }
  .hero h1 { font-size: clamp(36px, 10.5vw, 60px); }
  .hero .lead { font-size: 16px; margin-top: 14px; }
  .hero-actions { margin-top: 18px; }
  .hero-actions .btn { padding: 12px 20px; font-size: 15px; }
  .kicker { margin-bottom: 12px; font-size: 12px; }
  .caption { top: auto; bottom: 52px; right: var(--gutter); transform: none; }
  .caption h2 { font-size: clamp(34px, 10vw, 52px); }
  .caption p { margin-top: 12px; font-size: 16px; }
  .caption-index { margin-bottom: 10px; }
  .scroll-hint { display: none; }
  .no-webgl .phone-fallback { right: auto; left: 50%; top: 38%; transform: translate(-50%, -50%); width: 52vw; }
}

/* ── Sections (white, like the app) ──────────────────── */

.steps, .team, .features {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(96px, 14vw, 180px) var(--gutter);
}

.section-title { font-size: clamp(44px, 6.4vw, 104px); color: var(--text); }
.section-lead { margin-top: 32px; max-width: 640px; font-size: 21px; color: var(--text-secondary); }
.section-title .dot { color: var(--blue); }

.step-list {
  list-style: none;
  margin: clamp(48px, 7vw, 96px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.step-list li {
  padding: 28px 24px 32px;
  border-radius: var(--radius-lg);
  background: var(--card);
}
.step-nr {
  display: block;
  margin-bottom: 48px;
  font-family: var(--display);
  font-size: 64px;
  line-height: 1;
  color: var(--blue);
}
.step-list h3 { font-size: 28px; }
.step-list p { margin-top: 14px; color: var(--text-secondary); }

@media (max-width: 1100px) {
  .step-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .step-list { grid-template-columns: 1fr; }
  .step-nr { margin-bottom: 20px; font-size: 48px; }
}

.features {
  padding-top: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
/* Same cover gradient as the app's video cards */
.feature {
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background:
    radial-gradient(80% 60% at 20% 0%, rgba(56, 182, 255, 0.35), transparent 70%),
    linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 55%, var(--night) 100%);
}
.feature h3 { font-size: clamp(24px, 2.2vw, 34px); overflow-wrap: anywhere; }
.feature p { margin-top: 10px; color: var(--on-blue-secondary); }

@media (max-width: 1180px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
}

.team {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
}
.team-photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-text p:not(.kicker) { margin-top: 24px; color: var(--text-secondary); font-size: 20px; max-width: 480px; }

@media (max-width: 820px) {
  .team { grid-template-columns: 1fr; }
}

.cta {
  padding: clamp(96px, 14vw, 180px) var(--gutter);
  text-align: center;
  color: var(--white);
  background:
    radial-gradient(50% 70% at 50% 40%, rgba(56, 182, 255, 0.4), transparent 70%),
    var(--blue);
}
.cta-logo { width: min(900px, 86vw); margin: 0 auto; }
.cta p { margin: 40px 0 36px; color: var(--on-blue-secondary); font-size: 20px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter);
  background: var(--night);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}
.footer-links { display: flex; gap: 24px; }
@media (max-width: 560px) {
  .footer { flex-direction: column; gap: 12px; }
}
.footer a:hover { color: var(--white); }

/* ── Reveal on scroll ────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Clio (assistant) ────────────────────────────────── */

.clio { --clio-ease: cubic-bezier(0.34, 1.4, 0.64, 1); font-family: var(--sans); }

/* Figure motion, ported from the app's ClioMotion: float, blink, hand sway */
.clio-figure { display: block; overflow: visible; }
.clio-float, .clio-hand, .clio-eye { transform-box: view-box; }
.clio-float { animation: clio-float 4.6s ease-in-out infinite; }
.clio-eye { animation: clio-blink 4.6s infinite; }
.clio-hand-left { animation: clio-sway-left 5.4s ease-in-out infinite; }
.clio-hand-right { animation: clio-sway-right 6.1s ease-in-out infinite; }

@keyframes clio-float { 50% { transform: translateY(-19px); } }
@keyframes clio-blink { 0%, 62%, 67%, 100% { transform: scaleY(1); } 64% { transform: scaleY(0.08); } }
@keyframes clio-sway-left { 50% { transform: rotate(-4deg); } }
@keyframes clio-sway-right { 50% { transform: rotate(4deg); } }
@keyframes clio-wave { from { transform: rotate(-22deg); } to { transform: rotate(18deg); } }

/* Peek: slides in from the side, waves, says one line */
.clio-peek {
  position: fixed;
  bottom: 110px;
  right: 0;
  z-index: 60;
  width: 150px;
  cursor: pointer;
  transform: translateX(120%);
  transition: transform 0.8s var(--clio-ease);
}
/* Only the figure leans in; the speech bubble stays level */
.clio-peek-figure { transform: rotate(-10deg); }
.clio[data-side="left"] .clio-peek-figure { transform: rotate(10deg); }
.clio[data-side="left"] .clio-peek { right: auto; left: 0; transform: translateX(-120%); }
.clio[data-state="peek"] .clio-peek { transform: translateX(10%); }
.clio[data-state="peek"][data-side="left"] .clio-peek { transform: translateX(-10%); }
.clio[data-state="peek"] .clio-peek .clio-hand-right,
.clio[data-state="peek"][data-side="left"] .clio-peek .clio-hand-left { animation: clio-wave 0.42s ease-in-out 8 alternate; }

.clio-bubble {
  position: absolute;
  bottom: 100%;
  right: 46px;
  width: max-content;
  max-width: 220px;
  margin-bottom: 4px;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 10px 30px rgba(11, 17, 32, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s 0.5s, transform 0.3s 0.5s;
}
.clio[data-side="left"] .clio-bubble { right: auto; left: 46px; border-radius: 18px 18px 18px 4px; }
.clio[data-state="peek"] .clio-bubble { opacity: 1; transform: none; }
.clio:not([data-state="peek"]) .clio-bubble { transition-delay: 0s; }

/* Dock: Clio waits in the corner */
.clio-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0, 74, 173, 0.28);
  cursor: pointer;
  transform: scale(0);
  transition: transform 0.45s var(--clio-ease);
}
.clio-dock-figure { width: 100%; height: 100%; }
.clio[data-state="dock"] .clio-dock,
.clio[data-state="open"] .clio-dock { transform: scale(1); }
.clio.is-tucked .clio-dock,
.clio.is-tucked .clio-peek { transform: scale(0); }
.clio-dock:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 3px; }

/* Chat panel */
.clio-panel {
  position: fixed;
  right: 20px;
  bottom: 104px;
  z-index: 61;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 40px));
  max-height: min(580px, calc(100svh - 140px));
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(11, 17, 32, 0.28);
  overflow: hidden;
  animation: clio-panel-in 0.35s var(--clio-ease);
}
.clio-panel[hidden] { display: none; }
@keyframes clio-panel-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } }

.clio-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--blue);
  color: var(--white);
}
.clio-head-figure { width: 44px; height: 44px; flex: none; }
.clio-name { font-family: var(--display); font-size: 18px; text-transform: uppercase; line-height: 1; }
.clio-role { margin-top: 4px; font-size: 13px; color: var(--on-blue-secondary); }
.clio-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.clio-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.clio-msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.45;
}
.clio-msg-clio { align-self: flex-start; background: var(--card); border-bottom-left-radius: 4px; }
.clio-msg-user { align-self: flex-end; background: var(--blue); color: var(--white); border-bottom-right-radius: 4px; }
.clio-msg.is-typing::after { content: "•••"; letter-spacing: 3px; color: var(--text-secondary); animation: clio-typing 1s infinite; }
@keyframes clio-typing { 50% { opacity: 0.3; } }

.clio-contact {
  align-self: flex-start;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
}

.clio-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.clio-chips:empty { display: none; }
.clio-chip {
  padding: 8px 14px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font: 600 14px var(--sans);
  cursor: pointer;
}
.clio-chip:hover { background: var(--card-active); }

.clio-form { display: flex; gap: 8px; padding: 12px 16px 6px; border-top: 1px solid var(--border); }
.clio-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font: 16px var(--sans);
  color: var(--text);
}
.clio-form input:focus { outline: none; border-color: var(--blue); }
.clio-form button {
  width: 46px;
  height: 46px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}
.clio-form :disabled { opacity: 0.45; cursor: not-allowed; }
.clio-note { padding: 0 16px 14px; font-size: 12px; line-height: 1.4; color: var(--text-secondary); }
.clio-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
  .clio-peek { width: 120px; bottom: 96px; }
  .clio-dock { width: 64px; height: 64px; right: 14px; bottom: 14px; }
  /* Phone: full-screen sheet. Top and height follow the visual viewport (set in clio.js),
     so the input stays right above the keyboard instead of the panel being squashed */
  .clio-panel {
    top: var(--clio-vv-top, 0);
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: var(--clio-vv-height, 100dvh);
    max-height: none;
    border-radius: 0;
    animation-name: clio-sheet-in;
  }
  .clio-panel-head { padding-top: calc(14px + env(safe-area-inset-top)); }
  .clio-log { min-height: 0; }
  /* Question chips in one swipeable row, so the conversation keeps the space */
  .clio-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
  .clio-chips::-webkit-scrollbar { display: none; }
  .clio-chip { flex: none; white-space: nowrap; }
  .clio-form { padding-bottom: 8px; }
  .clio-note { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .clio[data-state="open"] .clio-dock { transform: scale(0); }
}
@keyframes clio-sheet-in { from { transform: translateY(24px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .clio-float, .clio-eye, .clio-hand, .clio[data-state] .clio-hand { animation: none !important; }
  .clio-peek, .clio-dock, .clio-bubble { transition: none; }
  .clio-panel { animation: none; }
}

/* Clio says hello on the start screen, peeking in from the right edge */
.hero-clio {
  position: absolute;
  right: 0;
  bottom: 14%;
  z-index: 3;
  width: clamp(110px, 12vw, 180px);
  cursor: pointer;
  animation: hero-clio-in 0.9s 0.9s var(--ease) both;
}
.hero-clio-figure { width: 100%; height: auto; transform: translateX(14%) rotate(-10deg); }
.hero-clio .clio-hand-right { animation: clio-wave 0.42s ease-in-out 1.7s 10 alternate, clio-sway-right 6.1s ease-in-out 6s infinite; }
.hero-clio-bubble {
  position: absolute;
  right: 70%;
  bottom: 88%;
  width: max-content;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 10px 30px rgba(11, 17, 32, 0.25);
  animation: hero-clio-bubble-in 0.4s 1.6s var(--ease) both;
}
@keyframes hero-clio-in { from { transform: translateX(130%); } }
@keyframes hero-clio-bubble-in { from { opacity: 0; transform: translateY(8px) scale(0.95); } }

@media (max-width: 820px) {
  .hero-clio { bottom: 24%; width: 96px; }
  .hero-clio-bubble { font-size: 13px; padding: 9px 12px; right: 62%; }
}
/* Phone: Clio sits small in the free strip right of the phone, the bubble stacks above her */
@media (max-width: 560px) {
  .hero-clio { bottom: 26%; width: 64px; }
  .hero-clio-figure { transform: translateX(8%) rotate(-10deg); }
  .hero-clio-bubble {
    right: 6px;
    bottom: 100%;
    /* max-content + cap: the bubble may be wider than Clio's own 64px box */
    width: max-content;
    max-width: 108px;
    margin-bottom: 2px;
    padding: 8px 10px;
    border-radius: 14px 14px 4px 14px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-clio, .hero-clio-bubble, .hero-clio .clio-hand-right { animation: none; }
}
