@import url('./tokens.css');

/* ═══════════════════════════════════════════════════════════
   FocaLabs — Shared Stylesheet
   Fonts: Outfit (display) + Figtree (body)
   Stack: Tailwind CDN utilities + custom CSS for effects
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   1. Custom Properties
   ───────────────────────────────────────── */
:root {
  --bg: #0a1628;
  --surface: #111d33;
  --surface-hover: #162440;
  --primary-hover: #1e97c4;
  --heading: #f1f5f9;
  --body: #94a3b8;
  --border: #1a3a55;
  --border-bright: #22a9d9;
  --backdrop: rgba(10, 22, 40, 0.88);

  --surface-elevated: #13203a;
  --border-subtle: rgba(34, 169, 217, 0.1);

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Figtree', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─────────────────────────────────────────
   2. Base
   ───────────────────────────────────────── */
html, body {
  background-color: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

/* Subtle dot-grid texture */
body {
  background-image: radial-gradient(rgba(34, 169, 217, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─────────────────────────────────────────
   3. Bilingual
   ───────────────────────────────────────── */
body.ro .en { display: none; }
body.en .ro { display: none; }

/* ─────────────────────────────────────────
   4. Scroll Reveal
   ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────
   5. Buttons
   ───────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 11px 26px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Shimmer sweep */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -120%;
  width: 55%;
  height: 200%;
  background: rgba(255, 255, 255, 0.15);
  transform: skewX(-20deg);
  transition: left 0.55s var(--ease-out-expo);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(34, 169, 217, 0.35);
}
.btn-primary:hover::after {
  left: 150%;
}

.btn-sm { padding: 7px 16px; font-size: 0.8125rem; }
.btn-lg { padding: 15px 36px; font-size: 1rem; }

.btn-secondary {
  display: block;
  text-align: center;
  padding: 14px;
  font-size: 0.9375rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--body);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--heading);
  background: rgba(34, 169, 217, 0.05);
}

/* ─────────────────────────────────────────
   6. Section Utilities
   ───────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 52px;
}

.section-label::before,
.section-label::after {
  content: '';
  flex: 1;
  max-width: 72px;
  height: 1px;
}
.section-label::before {
  background: linear-gradient(90deg, transparent, rgba(34, 169, 217, 0.45));
}
.section-label::after {
  background: linear-gradient(90deg, rgba(34, 169, 217, 0.45), transparent);
}

section {
  padding: 88px 0;
}

.section-alt {
  background: rgba(17, 29, 51, 0.45);
}

/* ─────────────────────────────────────────
   7. Header (shared across all pages)
   ───────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(34, 169, 217, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-group img {
  height: 30px;
  width: auto;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1875rem;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--body);
  letter-spacing: 0.01em;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--heading);
  background: rgba(255, 255, 255, 0.04);
}
.nav-link.active {
  font-weight: 600;
  color: var(--heading);
  background: rgba(34, 169, 217, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#lang-toggle {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--body);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
#lang-toggle:hover {
  background: rgba(34, 169, 217, 0.08);
  border-color: rgba(34, 169, 217, 0.3);
  color: var(--heading);
}

.header-login-link {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--body);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.header-login-link:hover {
  border-color: rgba(34, 169, 217, 0.3);
  color: var(--heading);
  background: rgba(34, 169, 217, 0.06);
}

/* Mobile hamburger */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.mobile-menu-toggle span {
  display: block;
  height: 2px;
  background: var(--body);
  border-radius: 2px;
  transition: opacity 0.2s;
}

/* Mobile nav actions (login + CTA inside hamburger menu) */
.mobile-nav-actions {
  display: none;
}


/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — Hero
   ═══════════════════════════════════════════════════════════ */
.hero {
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Gradient mesh atmosphere */
.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 65% at 50% -5%, rgba(34, 169, 217, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 88% 85%, rgba(43, 200, 215, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 8% 72%, rgba(34, 169, 217, 0.05) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  /* Entrance fade — runs once on load */
  animation: hero-logo-enter 800ms var(--ease-out-expo) both;
}

.hero-logo-mark {
  width: 120px;
  height: 120px;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 8px 32px rgba(37, 169, 216, 0.22));
}

@keyframes hero-logo-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .hero-logo-mark { width: 88px; height: 88px; }
  .hero-logo-wrap { margin-bottom: 24px; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw + 0.5rem, 4.5rem);
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.045em;
  line-height: 1.06;
  max-width: 760px;
  margin: 0 auto;
  text-wrap: balance;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--body);
  line-height: 1.72;
  max-width: 560px;
  margin: 24px auto 0;
}

.hero-cta {
  margin-top: 40px;
}

/* ── Browser Frame ── */
.browser-wrap {
  margin-top: 56px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  perspective: 2400px;
}

/* Gradient halo behind frame */
.browser-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(34, 169, 217, 0.35), rgba(43, 200, 215, 0.12) 50%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.browser-frame {
  background: var(--surface);
  border: 1px solid rgba(34, 169, 217, 0.15);
  border-radius: 13px;
  overflow: hidden;
  box-shadow:
    0 40px 80px -12px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(34, 169, 217, 0.06);
  transform: rotateX(1.5deg) translateZ(0);
  transition: transform 0.6s var(--ease-out-expo);
  will-change: transform;
}
.browser-frame:hover {
  transform: rotateX(0deg) translateZ(0);
}

.browser-bar {
  height: 36px;
  background: var(--bg);
  border-bottom: 1px solid rgba(34, 169, 217, 0.08);
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; margin-left: 6px; }
.dot-green  { background: #28c840; margin-left: 6px; }

.browser-url {
  margin-left: 12px;
  font-size: 0.7rem;
  color: var(--body);
  opacity: 0.4;
}

.browser-body {
  background: var(--surface);
}
.browser-body img {
  width: 100%;
  display: block;
}

.browser-placeholder {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--body);
  font-size: 0.875rem;
  opacity: 0.28;
  letter-spacing: 0.06em;
}


/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — How It Works (Steps)
   ═══════════════════════════════════════════════════════════ */
.step {
  display: flex;
  flex-direction: column;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 169, 217, 0.18) 0%, rgba(34, 169, 217, 0.05) 100%);
  border: 1px solid rgba(34, 169, 217, 0.28);
  box-shadow: 0 0 20px rgba(34, 169, 217, 0.15);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 12px;
}

.step p {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.72;
}

/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — Differentiator Cards
   ═══════════════════════════════════════════════════════════ */
.diff-card {
  background: linear-gradient(148deg, var(--surface) 0%, rgba(17, 29, 51, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Top gradient line — reveals on hover */
.diff-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 169, 217, 0.5) 50%, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.diff-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 169, 217, 0.2);
  box-shadow: 0 20px 60px -15px rgba(34, 169, 217, 0.12), 0 8px 24px rgba(0, 0, 0, 0.3);
}
.diff-card:hover::before {
  opacity: 1;
}

.diff-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37, 169, 216, 0.14), rgba(52, 210, 221, 0.08));
  border: 1px solid rgba(52, 210, 221, 0.22);
  color: var(--brand-bright, #34D2DD);
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 240ms ease,
              box-shadow 240ms ease;
}

.diff-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.diff-card:hover .diff-icon {
  transform: translateY(-2px);
  border-color: rgba(52, 210, 221, 0.45);
  box-shadow: 0 6px 18px -8px rgba(52, 210, 221, 0.4);
}

.diff-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.diff-card p {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.72;
}


/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — Persona Cards
   ═══════════════════════════════════════════════════════════ */
.persona-card {
  background: linear-gradient(165deg, rgba(34, 169, 217, 0.05) 0%, var(--surface) 50%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 2px solid rgba(34, 169, 217, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.3s, border-top-color 0.3s, box-shadow 0.3s;
}
.persona-card:hover {
  transform: translateY(-4px);
  border-top-color: var(--primary);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(34, 169, 217, 0.12);
}

.persona-role {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 14px;
}

.persona-card p:last-child {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.72;
}


/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — Contact Section
   ═══════════════════════════════════════════════════════════ */
.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-lead {
  font-size: 1.0625rem;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(34, 169, 217, 0.22);
  background: rgba(34, 169, 217, 0.05);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.contact-pill:hover {
  color: var(--accent);
  border-color: rgba(43, 200, 215, 0.4);
  background: rgba(43, 200, 215, 0.08);
}

.contact-pill svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Form with gradient border */
.contact-form {
  position: relative;
  padding: 1px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34, 169, 217, 0.28), rgba(43, 200, 215, 0.08) 50%, rgba(34, 169, 217, 0.12));
  text-align: left;
}
.contact-form > :first-child:not([style*="display:none"]),
.contact-form .form-row,
.contact-form .form-group,
.contact-form .form-submit {
  /* These live inside the gradient-border wrapper */
}

/* Restyle: put actual form content in the card */
.contact-form {
  background: linear-gradient(160deg, var(--surface-elevated), var(--surface));
  border: 1px solid rgba(34, 169, 217, 0.15);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--body);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.label-optional {
  opacity: 0.4;
  font-weight: 400;
}

.form-input {
  background: rgba(10, 22, 40, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 15px;
  color: var(--heading);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 169, 217, 0.12);
}
.form-input::placeholder {
  color: var(--body);
  opacity: 0.35;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.55;
}

.form-submit {
  margin-top: 24px;
}

.form-success {
  text-align: center;
  padding: 56px 24px;
}

.form-success-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.form-success-text {
  font-size: 0.9375rem;
  color: var(--body);
}


/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — Lightbox
   ═══════════════════════════════════════════════════════════ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  cursor: zoom-out;
  padding: 24px;
}
#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}


/* ═══════════════════════════════════════════════════════════
   Footer (shared across all pages)
   ═══════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  text-align: center;
  position: relative;
}

/* Centered gradient accent at top edge */
footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary) 40%, var(--accent) 60%, transparent);
  opacity: 0.5;
}

.footer-trust {
  font-size: 0.875rem;
  color: var(--body);
  opacity: 0.6;
  line-height: 1.8;
  margin-bottom: 24px;
}

.footer-nav {
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.footer-nav a {
  padding: 5px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--body);
  transition: color 0.2s, background 0.2s;
}
.footer-nav a:hover {
  color: var(--heading);
  background: rgba(255, 255, 255, 0.04);
}

.footer-contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.footer-contact-row a {
  color: var(--body);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-contact-row a:hover {
  color: var(--primary);
}

.footer-contact-sep {
  color: var(--body);
  opacity: 0.3;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 20px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--body);
  opacity: 0.4;
  letter-spacing: 0.01em;
}


/* ═══════════════════════════════════════════════════════════
   Chrome autofill override
   ═══════════════════════════════════════════════════════════ */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(10, 22, 40, 0.92) inset !important;
  -webkit-text-fill-color: var(--heading) !important;
  border-color: var(--border) !important;
  transition: background-color 5000s ease-in-out 0s;
}


/* ═══════════════════════════════════════════════════════════
   Responsive — Mobile
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  section { padding: 64px 0; }

  /* Header mobile */
  .header-inner {
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }
  /* Header actions — on mobile, lang toggle sits right next to hamburger */
  .header-actions {
    order: 3;
    gap: 8px;
    margin-left: auto;
  }
  .header-actions .header-login-link { display: none; }
  .header-actions .btn-primary { display: none; }

  /* Hamburger stays at the far right */
  .mobile-menu-toggle {
    display: flex;
    order: 4;
    margin-left: 4px;
  }

  .main-nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 0 6px;
    gap: 2px;
    flex: none;
  }
  header.nav-open .main-nav { display: flex; }

  /* Show login + CTA inside hamburger menu on mobile */
  .mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .mobile-nav-actions .header-login-link {
    display: block;
    text-align: center;
  }
  .mobile-nav-actions .btn-primary {
    display: block;
    width: 100%;
    text-align: center;
  }

  /* Hero */
  .hero { padding: 80px 0 48px; }
  .hero-subtitle { font-size: 1rem; }
  .browser-wrap { margin-top: 40px; }
  .browser-frame { transform: none; }
  .browser-frame:hover { transform: none; }

  /* Steps — handled by Tailwind grid responsive, but step styles */
  .step-badge { width: 38px; height: 38px; font-size: 0.75rem; }

  /* Contact */
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 20px; }
  .contact-info { gap: 10px; flex-direction: column; align-items: center; }

  /* Footer */
  .footer-contact-row { gap: 8px; }
}


/* ═══════════════════════════════════════════════════════════
   platforma.html — Page-specific styles
   ═══════════════════════════════════════════════════════════ */

/* Page Hero (sub-pages) */
.page-hero {
  padding: 64px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at -5% 50%, rgba(34, 169, 217, 0.09) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 108% 50%, rgba(43, 200, 215, 0.04) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.035em;
  line-height: 1.12;
  max-width: 640px;
  margin-bottom: 18px;
}
.page-hero .hero-subtitle {
  text-align: left;
  margin: 0;
  max-width: 540px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* Modules Section */
.modules-list {
  max-width: 800px;
  margin: 0 auto;
}
.module-card {
  background: linear-gradient(160deg, var(--surface) 0%, rgba(10, 22, 40, 0.55) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 32px 32px 36px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.module-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 3px 3px 0;
  opacity: 0.4;
  transition: opacity 0.2s, height 0.3s, top 0.3s;
}
.module-card:hover {
  border-color: rgba(34, 169, 217, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  transform: translateX(4px);
}
.module-card:hover::before {
  opacity: 1;
  height: 80%;
  top: 10%;
}
.module-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.module-card p {
  font-size: 0.9375rem;
  color: var(--body);
  line-height: 1.7;
}

/* Technical Details Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}
.tech-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px 18px 48px;
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.55;
  position: relative;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.tech-item::before {
  content: '\2192';
  position: absolute;
  left: 18px;
  top: 18px;
  font-size: 0.875rem;
  color: var(--primary);
  opacity: 0.55;
  line-height: 1.55;
  transition: opacity 0.2s;
}
.tech-item:hover {
  border-color: rgba(34, 169, 217, 0.25);
  color: var(--heading);
  background: var(--surface-hover);
}
.tech-item:hover::before { opacity: 1; }

/* Page CTA block */
.page-cta {
  text-align: center;
  padding: 80px 0 96px;
  position: relative;
}
.page-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(34, 169, 217, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-cta .container { position: relative; z-index: 1; }
.page-cta h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.page-cta p {
  font-size: 1.0625rem;
  color: var(--body);
  margin-bottom: 32px;
  line-height: 1.65;
}
.page-cta .btn-primary {
  padding: 16px 36px;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .page-hero { padding: 44px 0 32px; }
  .page-hero h1 { font-size: 1.875rem; }
  .tech-grid { grid-template-columns: 1fr; }
  .page-cta { padding: 56px 0 64px; }
  .page-cta h2 { font-size: 1.5rem; }
}


/* ═══════════════════════════════════════════════════════════
   securitate.html — Page-specific styles
   ═══════════════════════════════════════════════════════════ */

/* Architecture Diagram */
.arch-diagram {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  max-width: 920px;
  margin: 0 auto;
}
.arch-column {
  flex: 1;
  background: linear-gradient(160deg, var(--surface) 0%, rgba(10, 22, 40, 0.65) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  min-width: 0;
  transition: border-color 0.2s;
}
.arch-column--highlight {
  border-color: rgba(34, 169, 217, 0.42);
  background: linear-gradient(160deg, rgba(34, 169, 217, 0.08) 0%, var(--surface) 60%);
  box-shadow: 0 0 36px rgba(34, 169, 217, 0.09), 0 0 0 1px rgba(34, 169, 217, 0.14);
  position: relative;
  z-index: 1;
}
.arch-column-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  color: var(--brand-cyan);
  display: block;
}
.arch-column-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.arch-column--highlight .arch-column-icon {
  color: var(--brand-bright);
}
.arch-column-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.arch-column-label {
  font-size: 0.8125rem;
  color: var(--body);
  line-height: 1.55;
  margin-bottom: 16px;
  opacity: 0.85;
}
.arch-items {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.arch-items li {
  font-size: 0.8rem;
  color: var(--body);
  padding: 6px 10px;
  background: rgba(10, 22, 40, 0.65);
  border-radius: 6px;
  border: 1px solid rgba(34, 169, 217, 0.09);
  line-height: 1.4;
  font-weight: 500;
}

/* Arrow connector */
.arch-arrow {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  gap: 5px;
}
.arch-arrow-track { display: flex; align-items: center; }
.arch-arrow-line {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.arch-arrow-head {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent);
}

.arch-arrow--partial .arch-arrow-line {
  background: transparent;
  border-top: 2px dashed rgba(148, 163, 184, 0.38);
  height: 0;
}
.arch-arrow--partial .arch-arrow-head {
  border-left-color: rgba(148, 163, 184, 0.38);
}
.arch-arrow-label {
  font-size: 0.6875rem;
  color: var(--body);
  text-align: center;
  line-height: 1.3;
  opacity: 0.55;
  max-width: 60px;
}

/* Security Principles Grid */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}
.security-card {
  background: linear-gradient(148deg, var(--surface) 0%, rgba(17, 29, 51, 0.5) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.security-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 169, 217, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.security-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 169, 217, 0.25);
  box-shadow: 0 8px 32px rgba(34, 169, 217, 0.07), 0 4px 16px rgba(0, 0, 0, 0.3);
}
.security-card:hover::after { opacity: 1; }
.security-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.security-card p {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.72;
}

/* Article Section */
.article-section {
  max-width: 650px;
  margin: 0 auto;
}
.article-section p {
  font-size: 0.9375rem;
  color: var(--body);
  line-height: 1.82;
}
.article-section p + p {
  margin-top: 18px;
}

@media (max-width: 768px) {
  .arch-diagram {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .arch-arrow { display: none; }
  .security-grid { grid-template-columns: 1fr; }
}

/* Header brand mark */
.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   Top bar (Raycast-style availability pill)
   ═══════════════════════════════════════════════════════════ */
.top-bar {
  background: linear-gradient(
    90deg,
    rgba(37, 169, 216, 0.05) 0%,
    rgba(52, 210, 221, 0.08) 50%,
    rgba(37, 169, 216, 0.05) 100%
  );
  border-bottom: 1px solid rgba(52, 210, 221, 0.10);
  position: relative;
  z-index: 90;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 var(--gutter);
}

.top-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--body);
  text-decoration: none;
  letter-spacing: 0.005em;
  transition: color var(--dur-fast) var(--ease-standard);
}
.top-bar-link:hover {
  color: var(--heading);
}
.top-bar-link:hover .top-bar-arrow {
  transform: translateX(3px);
}

.top-bar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-bright);
  box-shadow: 0 0 0 0 rgba(52, 210, 221, 0.6);
  animation: top-bar-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes top-bar-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(52, 210, 221, 0.55);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(52, 210, 221, 0);
  }
}

.top-bar-arrow {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease-out);
  opacity: 0.7;
}

@media (max-width: 640px) {
  .top-bar-inner { height: 30px; }
  .top-bar-link { font-size: 0.75rem; gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════
   Hero product animation (Connect → Ask → Answer, auto-loop)
   ═══════════════════════════════════════════════════════════ */

/* Stage (the browser body) */
.anim-stage {
  position: relative;
  height: 480px;
  background: linear-gradient(180deg, var(--surface) 0%, #0d1a30 100%);
  overflow: hidden;
}
.anim-stage:hover .anim-frame,
.anim-stage:hover .anim-connector,
.anim-stage:hover .anim-connector-check,
.anim-stage:hover .anim-chat-typed,
.anim-stage:hover .anim-chat-thinking,
.anim-stage:hover .anim-chat-message,
.anim-stage:hover .anim-invoice-row,
.anim-stage:hover .anim-source-chip {
  animation-play-state: paused;
}

/* Each frame fills the stage; cycle handles visibility */
.anim-frame {
  position: absolute;
  inset: 0;
  padding: 28px 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  animation-duration: 12s;
  animation-iteration-count: infinite;
  animation-timing-function: var(--ease-standard);
}

/* Frame timing within the 12s loop:
   0%–4%     fade in
   4%–32%    visible
   32%–36%   fade out
   remainder invisible */
.anim-frame-1 { animation-name: anim-frame-1-cycle; }
.anim-frame-2 { animation-name: anim-frame-2-cycle; animation-delay: 0s; }
.anim-frame-3 { animation-name: anim-frame-3-cycle; animation-delay: 0s; }

@keyframes anim-frame-1-cycle {
  0%, 32%   { opacity: 1; transform: translateY(0); }
  36%, 96%  { opacity: 0; transform: translateY(-4px); pointer-events: none; }
  100%      { opacity: 1; transform: translateY(0); }
}
@keyframes anim-frame-2-cycle {
  0%, 32%   { opacity: 0; transform: translateY(4px); }
  36%, 64%  { opacity: 1; transform: translateY(0); }
  68%, 100% { opacity: 0; transform: translateY(-4px); pointer-events: none; }
}
@keyframes anim-frame-3-cycle {
  0%, 64%   { opacity: 0; transform: translateY(4px); }
  68%, 96%  { opacity: 1; transform: translateY(0); }
  100%      { opacity: 0; transform: translateY(-4px); pointer-events: none; }
}

/* Shared frame header and caption */
.anim-frame-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.anim-chip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-bright);
  box-shadow: 0 0 8px rgba(52, 210, 221, 0.6);
}
.anim-frame-caption {
  margin-top: auto;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--body);
  text-align: center;
  letter-spacing: -0.005em;
}

/* ─── Frame 1: Connector grid ─── */
.anim-connector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  flex: 1;
  align-content: center;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}
.anim-connector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(6px);
  animation-duration: 12s;
  animation-iteration-count: infinite;
  animation-timing-function: var(--ease-out);
}
.anim-connector-1 { animation-name: connector-reveal; animation-delay: 0.2s; }
.anim-connector-2 { animation-name: connector-reveal; animation-delay: 0.55s; }
.anim-connector-3 { animation-name: connector-reveal; animation-delay: 0.90s; }
.anim-connector-4 { animation-name: connector-reveal; animation-delay: 1.25s; }

@keyframes connector-reveal {
  0%        { opacity: 0; transform: translateY(6px); border-color: var(--border); }
  5%, 32%   { opacity: 1; transform: translateY(0); border-color: rgba(37, 169, 216, 0.25); }
  36%, 100% { opacity: 0; transform: translateY(-4px); border-color: var(--border); }
}

.anim-connector-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-cyan);
  background: rgba(37, 169, 216, 0.08);
  border-radius: 8px;
  flex-shrink: 0;
}
.anim-connector-icon svg { width: 18px; height: 18px; }
.anim-connector-label {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--heading);
  font-weight: 500;
  flex: 1;
}
.anim-connector-check {
  color: var(--brand-bright);
  font-weight: 700;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.5);
  animation-duration: 12s;
  animation-iteration-count: infinite;
  animation-timing-function: var(--ease-out-back);
}
.anim-connector-1 .anim-connector-check { animation-name: check-pop; animation-delay: 0.5s; }
.anim-connector-2 .anim-connector-check { animation-name: check-pop; animation-delay: 0.85s; }
.anim-connector-3 .anim-connector-check { animation-name: check-pop; animation-delay: 1.20s; }
.anim-connector-4 .anim-connector-check { animation-name: check-pop; animation-delay: 1.55s; }

@keyframes check-pop {
  0%        { opacity: 0; transform: scale(0.5); }
  6%, 32%   { opacity: 1; transform: scale(1); }
  36%, 100% { opacity: 0; transform: scale(0.5); }
}

/* Frame 1: "+ altele" row — extends the connector grid visually */
.anim-connector-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 0;
  padding: 8px 14px;
  max-width: 520px;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: -0.005em;
  opacity: 0;
  animation: connector-more-cycle 12s infinite var(--ease-out);
  animation-delay: 1.6s;
}
.anim-connector-more svg {
  width: 14px;
  height: 14px;
  color: var(--brand-cyan);
  opacity: 0.75;
  flex-shrink: 0;
}

@keyframes connector-more-cycle {
  0%, 14%   { opacity: 0; transform: translateY(4px); }
  15%, 30%  { opacity: 1; transform: translateY(0); }
  34%, 100% { opacity: 0; transform: translateY(-2px); }
}

/* ─── Frame 2 & 3: Chat UI shared ─── */
.anim-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 0;
  overflow: hidden;
}

.anim-chat-message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 85%;
}

.anim-chat-user {
  background: rgba(37, 169, 216, 0.10);
  border: 1px solid rgba(37, 169, 216, 0.18);
  color: var(--heading);
  align-self: flex-end;
  min-height: 42px;
}

/* Frame 2: typewriter effect on user message */
.anim-frame-2 .anim-chat-user .anim-chat-typed {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--brand-cyan);
  animation:
    type-in 2.2s steps(52, end) 0.4s both,
    caret-blink 0.8s step-end 3s infinite;
  vertical-align: bottom;
  max-width: 100%;
}
.ro .anim-frame-2 .anim-chat-user .anim-chat-typed::before {
  content: "Care sunt facturile restante de peste 60 de zile?";
}
.en .anim-frame-2 .anim-chat-user .anim-chat-typed::before {
  content: "Which invoices are overdue by more than 60 days?";
}

@keyframes type-in {
  from { max-width: 0; }
  to   { max-width: min(620px, calc(100vw - 80px)); }
}
@keyframes caret-blink {
  0%, 50%   { border-right-color: var(--brand-cyan); }
  50.1%, 100% { border-right-color: transparent; }
}

/* Frame 2: thinking dots */
.anim-chat-thinking {
  align-self: flex-start;
  display: flex;
  gap: 6px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  opacity: 0;
  animation: thinking-in 0.3s ease-out 3.2s both;
}
.anim-chat-thinking span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: thinking-bounce 1.4s ease-in-out infinite;
}
.anim-chat-thinking span:nth-child(2) { animation-delay: 0.2s; }
.anim-chat-thinking span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes thinking-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40%           { transform: translateY(-5px); opacity: 1; }
}

/* Frame 3: static user message (no typewriter) */
.anim-chat-user--static {
  animation: fade-slide-up 0.4s var(--ease-out) 7.7s both;
  opacity: 0;
}

.anim-chat-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  max-width: 92%;
  animation: fade-slide-up 0.4s var(--ease-out) 8.1s both;
  opacity: 0;
}

@keyframes fade-slide-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-chat-answer {
  color: var(--heading);
  font-size: 0.9375rem;
  margin-bottom: 10px;
  line-height: 1.55;
}

/* Frame 3: invoice table */
.anim-invoice-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid rgba(37, 169, 216, 0.14);
  border-radius: 8px;
  margin-bottom: 10px;
}
.anim-invoice-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 6px 4px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--body);
  opacity: 0;
  transform: translateX(-4px);
  animation-duration: 12s;
  animation-iteration-count: infinite;
  animation-timing-function: var(--ease-out);
}
.anim-invoice-row + .anim-invoice-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.anim-invoice-row-1 { animation-name: invoice-row-cycle-1; }
.anim-invoice-row-2 { animation-name: invoice-row-cycle-2; }
.anim-invoice-row-3 { animation-name: invoice-row-cycle-3; }

@keyframes invoice-row-cycle-1 {
  0%, 70%    { opacity: 0; transform: translateX(-4px); }
  73%, 96%   { opacity: 1; transform: translateX(0); }
  100%       { opacity: 0; transform: translateX(-4px); }
}
@keyframes invoice-row-cycle-2 {
  0%, 72.5%  { opacity: 0; transform: translateX(-4px); }
  75.5%, 96% { opacity: 1; transform: translateX(0); }
  100%       { opacity: 0; transform: translateX(-4px); }
}
@keyframes invoice-row-cycle-3 {
  0%, 75%    { opacity: 0; transform: translateX(-4px); }
  78%, 96%   { opacity: 1; transform: translateX(0); }
  100%       { opacity: 0; transform: translateX(-4px); }
}

.anim-invoice-client { color: var(--heading); font-weight: 500; }
.anim-invoice-amount { color: var(--brand-bright); font-weight: 600; }
.anim-invoice-days   { color: var(--body); opacity: 0.7; text-align: right; min-width: 50px; }

/* Frame 3: source chips */
.anim-chat-sources {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.anim-source-chip {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 3px 10px;
  background: rgba(37, 169, 216, 0.08);
  border: 1px solid rgba(37, 169, 216, 0.18);
  border-radius: 999px;
  color: var(--brand-cyan);
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fade-slide-up 0.3s var(--ease-out) 9.4s both;
}
.anim-source-chip + .anim-source-chip {
  animation-delay: 9.55s;
}

/* Responsive tweaks */
@media (max-width: 720px) {
  .anim-stage { height: 440px; }
  .anim-frame { padding: 22px 20px 16px; }
  .anim-connector-grid { grid-template-columns: 1fr; }
  .anim-connector-label { font-size: 0.875rem; }
  .anim-chat-message { font-size: 0.875rem; }
  .anim-invoice-row { font-size: 0.75rem; }

  /* Typewriter bubble width constraint on mobile */
  .anim-frame-2 .anim-chat-user,
  .anim-frame-3 .anim-chat-user--static {
    max-width: calc(100% - 16px);
  }
  .anim-frame-2 .anim-chat-user .anim-chat-typed {
    max-width: 100%;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .anim-stage { height: 420px; }
  .anim-invoice-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .anim-invoice-days { grid-column: 2; grid-row: 1; }
  .anim-invoice-amount { grid-column: 2; grid-row: 2; }
}

/* ── Reduced motion: freeze animations, show frame 3 as static ── */
@media (prefers-reduced-motion: reduce) {
  .anim-frame,
  .anim-connector,
  .anim-connector-check,
  .anim-connector-more,
  .anim-invoice-row,
  .anim-chat-user--static,
  .anim-chat-assistant,
  .anim-source-chip,
  .anim-chat-thinking,
  .anim-chat-typed {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    max-width: none !important;
    border-right: none !important;
  }
  .anim-frame-1, .anim-frame-2 { opacity: 0 !important; display: none; }
  .anim-frame-3 { opacity: 1 !important; }
  .anim-chat-thinking { display: none; }
  .anim-frame-2 .anim-chat-user .anim-chat-typed::before { content: ""; }
}

/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — Capabilities section
   ═══════════════════════════════════════════════════════════ */

.capability-eyebrow {
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--body);
  margin: 0 auto 36px;
  max-width: 700px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.capability-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: linear-gradient(155deg, var(--surface) 0%, rgba(17, 29, 51, 0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--dur-normal) var(--ease-standard),
    border-color var(--dur-normal) var(--ease-standard),
    box-shadow var(--dur-normal) var(--ease-standard);
}

/* Subtle top-edge accent that intensifies on hover */
.capability-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 169, 216, 0.55) 50%, transparent);
  opacity: 0;
  transition: opacity var(--dur-normal) var(--ease-standard);
}
.capability-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 169, 216, 0.22);
  box-shadow:
    0 18px 48px -14px rgba(0, 0, 0, 0.4),
    0 0 32px -8px rgba(37, 169, 216, 0.14);
}
.capability-card:hover::before {
  opacity: 1;
}

.capability-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(37, 169, 216, 0.08);
  border: 1px solid rgba(37, 169, 216, 0.16);
  color: var(--brand-cyan);
  flex-shrink: 0;
  margin-bottom: 6px;
  transition: background var(--dur-normal) var(--ease-standard);
}
.capability-card:hover .capability-icon {
  background: rgba(37, 169, 216, 0.12);
}
.capability-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.capability-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
}

.capability-subtitle {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--brand-cyan);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: -4px 0 6px !important;
}

.capability-card p:last-child {
  font-size: 0.9375rem;
  color: var(--body);
  line-height: 1.68;
  margin: 0;
}

@media (max-width: 720px) {
  .capability-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .capability-card {
    padding: 24px;
  }
  .capability-eyebrow {
    font-size: 0.8125rem;
    margin-bottom: 28px;
  }
}

/* ─────────────────────────────────────────
   Stage 4 — Trust strip
   ───────────────────────────────────────── */
.trust-strip {
  padding: 36px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.trust-strip-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.trust-strip-items li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted, #94a3b8);
  font-size: 0.875rem;
  line-height: 1.4;
}

.trust-strip-items li svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--brand-bright, #34D2DD);
  opacity: 0.85;
}

@media (max-width: 768px) {
  .trust-strip {
    padding: 28px 0 22px;
  }
  .trust-strip-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
  }
  .trust-strip-items li {
    font-size: 0.8125rem;
  }
}

/* ─────────────────────────────────────────
   Stage 4 — Tiered hero CTAs (ghost button)
   ───────────────────────────────────────── */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  color: var(--heading, #f1f5f9);
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 200ms ease,
              background 200ms ease,
              color 200ms ease,
              transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ghost:hover {
  border-color: rgba(52, 210, 221, 0.5);
  color: var(--brand-bright, #34D2DD);
  background: rgba(52, 210, 221, 0.05);
  transform: translateY(-1px);
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--brand-bright, #34D2DD);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero-cta .btn-lg,
  .hero-cta .btn-ghost {
    width: 100%;
  }
}

/* ─────────────────────────────────────────
   Stage 4 — Staggered reveals (cards)
   ───────────────────────────────────────── */
@keyframes card-stagger-enter {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal.visible .capability-card,
.reveal.visible .diff-card {
  opacity: 0;
  animation: card-stagger-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal.visible .capability-card:nth-child(1),
.reveal.visible .diff-card:nth-child(1) {
  animation-delay: 60ms;
}
.reveal.visible .capability-card:nth-child(2),
.reveal.visible .diff-card:nth-child(2) {
  animation-delay: 140ms;
}
.reveal.visible .capability-card:nth-child(3),
.reveal.visible .diff-card:nth-child(3) {
  animation-delay: 220ms;
}
.reveal.visible .capability-card:nth-child(4),
.reveal.visible .diff-card:nth-child(4) {
  animation-delay: 300ms;
}

@media (prefers-reduced-motion: reduce) {
  .reveal.visible .capability-card,
  .reveal.visible .diff-card {
    opacity: 1;
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   Scroll target offset — keeps anchored section below sticky header
   ═══════════════════════════════════════════════════════════ */
#pilot {
  scroll-margin-top: 96px;
}

@media (max-width: 640px) {
  #pilot {
    scroll-margin-top: 88px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Scroll-to-top button (appears past hero, fixed bottom-right)
   ═══════════════════════════════════════════════════════════ */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(37, 169, 216, 0.28);
  border-radius: 50%;
  color: var(--brand-cyan);
  cursor: pointer;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity var(--dur-normal) var(--ease-standard),
    visibility var(--dur-normal) var(--ease-standard),
    transform var(--dur-normal) var(--ease-standard),
    background var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: rgba(17, 29, 51, 0.95);
  border-color: rgba(37, 169, 216, 0.55);
  color: var(--brand-bright);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 640px) {
  .scroll-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}
