/* =========================================================
   BatchTrace modern landing-page layer
   ========================================================= */

:root {
  --landing-navy: #0b1d35;
  --landing-navy-soft: #132d4f;
  --landing-blue: #287cff;
  --landing-blue-dark: #155fc7;
  --landing-sky: #78b4ff;
  --landing-surface: rgba(255, 255, 255, 0.88);
  --landing-border: rgba(148, 163, 184, 0.22);
  --landing-text: #142237;
  --landing-muted: #617086;
  --landing-shadow:
    0 24px 70px rgba(15, 35, 65, 0.12),
    0 4px 16px rgba(15, 35, 65, 0.05);
}

/* General rendering */

html {
  scroll-behavior: smooth;
}

body {
  background: #f5f8fc;
  color: var(--landing-text);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.landing-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 85% 5%,
      rgba(40, 124, 255, 0.18),
      transparent 29rem
    ),
    radial-gradient(
      circle at 5% 35%,
      rgba(120, 180, 255, 0.12),
      transparent 32rem
    ),
    linear-gradient(180deg, #ffffff 0%, #f4f7fb 58%, #edf3fa 100%);
}

.landing-shell::before {
  content: "";
  position: absolute;
  top: 110px;
  right: -180px;
  width: 500px;
  height: 500px;
  border: 1px solid rgba(40, 124, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

/* Header */

.landing-header {
  min-height: 80px;
  border-bottom: 1px solid rgba(210, 220, 233, 0.75);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 30px rgba(15, 35, 65, 0.04);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.landing-header .brand {
  gap: 13px;
}

.landing-header .brand-mark,
.preview-brand .brand-mark {
  background:
    linear-gradient(145deg, #1769e0 0%, #4897ff 55%, #8ac1ff 100%);
  box-shadow:
    0 9px 22px rgba(23, 105, 224, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.landing-header .brand strong {
  letter-spacing: -0.015em;
}

.landing-nav {
  gap: 28px;
}

.landing-nav a:not(.btn) {
  position: relative;
  color: #506079;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.landing-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--landing-blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.landing-nav a:not(.btn):hover {
  color: var(--landing-blue);
  transform: translateY(-1px);
}

.landing-nav a:not(.btn):hover::after {
  transform: scaleX(1);
}

/* Buttons */

.landing-shell .btn {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 11px;
  color: var(--landing-navy-soft);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 5px 14px rgba(15, 35, 65, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.landing-shell .btn:hover {
  color: var(--landing-blue);
  border-color: rgba(40, 124, 255, 0.55);
  background: #ffffff;
  box-shadow: 0 11px 25px rgba(15, 35, 65, 0.11);
  transform: translateY(-2px);
}

.landing-shell .btn.primary {
  color: #ffffff;
  border-color: transparent;
  background:
    linear-gradient(135deg, #1769e0 0%, #3186ff 100%);
  box-shadow:
    0 12px 25px rgba(23, 105, 224, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.landing-shell .btn.primary:hover {
  color: #ffffff;
  background:
    linear-gradient(135deg, #125dca 0%, #2778eb 100%);
  box-shadow: 0 16px 32px rgba(23, 105, 224, 0.34);
}

/* Hero */

.hero {
  position: relative;
  min-height: 720px;
  gap: 72px;
}

.eyebrow {
  border: 1px solid rgba(40, 124, 255, 0.2);
  background: rgba(237, 245, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.hero h1 {
  color: var(--landing-navy);
  font-weight: 790;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.hero h1 span {
  background:
    linear-gradient(105deg, #1769e0 0%, #318cff 55%, #65aaff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  color: #5c6c82;
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-note::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #137653;
  background: #e3f5ec;
  font-size: 11px;
  font-weight: 900;
}

/* Product preview */

.workflow-preview {
  border: 1px solid rgba(196, 208, 224, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow:
    0 40px 95px rgba(11, 29, 53, 0.18),
    0 10px 25px rgba(11, 29, 53, 0.08);
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
  transition:
    transform 280ms ease,
    box-shadow 280ms ease;
}

.workflow-preview:hover {
  box-shadow:
    0 48px 110px rgba(11, 29, 53, 0.21),
    0 15px 30px rgba(11, 29, 53, 0.09);
  transform: perspective(1200px) rotateY(0) rotateX(0) translateY(-5px);
}

.preview-topbar {
  background: rgba(250, 252, 255, 0.9);
  backdrop-filter: blur(12px);
}

.preview-dots span:nth-child(1) {
  background: #ff6b6b;
}

.preview-dots span:nth-child(2) {
  background: #f5ba45;
}

.preview-dots span:nth-child(3) {
  background: #42c979;
}

.preview-sidebar {
  background:
    linear-gradient(180deg, #102b4d 0%, #0b1d35 100%);
}

.preview-nav div {
  transition:
    background 150ms ease,
    color 150ms ease;
}

.preview-nav div.active {
  background:
    linear-gradient(
      90deg,
      rgba(49, 134, 255, 0.27),
      rgba(49, 134, 255, 0.11)
    );
  box-shadow: inset 3px 0 0 #5ea5ff;
}

.preview-content {
  background:
    linear-gradient(180deg, #f8fafe 0%, #f2f6fb 100%);
}

.preview-stat,
.preview-list {
  border-color: rgba(211, 221, 233, 0.82);
  box-shadow: 0 6px 18px rgba(15, 35, 65, 0.045);
}

/* Sections */

.section {
  position: relative;
}

.section-heading {
  margin-bottom: 48px;
}

.section-heading span {
  color: var(--landing-blue);
}

.section-heading h2 {
  color: var(--landing-navy);
  font-weight: 760;
  line-height: 1.1;
  text-wrap: balance;
}

.section-heading p {
  color: var(--landing-muted);
  line-height: 1.75;
  text-wrap: pretty;
}

/* Module cards */

.module-grid {
  gap: 20px;
}

.module-card {
  min-height: 235px;
  padding: 28px;
  border: 1px solid var(--landing-border);
  border-radius: 17px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.98),
      rgba(249, 251, 254, 0.9)
    );
  box-shadow:
    0 15px 38px rgba(15, 35, 65, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform 190ms ease,
    border-color 190ms ease,
    box-shadow 190ms ease;
}

.module-card::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(40, 124, 255, 0.1),
      transparent 70%
    );
  pointer-events: none;
}

.module-card:hover {
  border-color: rgba(40, 124, 255, 0.28);
  box-shadow:
    0 24px 55px rgba(15, 35, 65, 0.1),
    0 7px 17px rgba(15, 35, 65, 0.05);
  transform: translateY(-6px);
}

.module-number {
  border: 1px solid rgba(40, 124, 255, 0.12);
  background:
    linear-gradient(145deg, #edf5ff, #dfeeff);
  box-shadow: inset 0 1px 0 #ffffff;
}

.module-card h3 {
  letter-spacing: -0.015em;
}

.module-card p {
  line-height: 1.72;
}

/* Dark workflow section */

.workflow-section {
  overflow: hidden;
  background:
    radial-gradient(
      circle at 92% 18%,
      rgba(67, 143, 255, 0.23),
      transparent 28rem
    ),
    radial-gradient(
      circle at 8% 85%,
      rgba(65, 166, 255, 0.1),
      transparent 30rem
    ),
    linear-gradient(145deg, #0a1b31 0%, #102c4e 60%, #163b67 100%);
}

.workflow-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px
    );
  background-size: 42px 42px;
  pointer-events: none;
}

.workflow-section .section-inner {
  position: relative;
  z-index: 1;
}

.workflow-section .section-heading span {
  color: #82bdff !important;
}

.workflow-section .section-heading h2 {
  color: #ffffff !important;
}

.workflow-section .section-heading p {
  color: #c9d7e8 !important;
}

.workflow-line {
  gap: 16px;
}

.workflow-step {
  min-height: 185px;
  padding: 24px;
  border: 1px solid rgba(137, 179, 226, 0.2);
  border-radius: 15px;
  background:
    linear-gradient(
      145deg,
      rgba(33, 73, 119, 0.76),
      rgba(17, 48, 83, 0.72)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 18px 38px rgba(3, 13, 25, 0.16);
  backdrop-filter: blur(10px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.workflow-step:hover {
  border-color: rgba(127, 186, 255, 0.47);
  background:
    linear-gradient(
      145deg,
      rgba(39, 88, 145, 0.88),
      rgba(20, 58, 99, 0.82)
    );
  transform: translateY(-5px);
}

.workflow-step span {
  color: #8fc4ff;
}

.workflow-step strong {
  color: #ffffff;
  line-height: 1.25;
}

.workflow-step p {
  color: #c2d1e3;
  line-height: 1.65;
}

/* Principles */

.principle-grid {
  gap: 22px;
}

.principle-card {
  padding: 31px;
  border: 1px solid var(--landing-border);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 14px 38px rgba(15, 35, 65, 0.055);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.principle-card:hover {
  border-color: rgba(40, 124, 255, 0.25);
  box-shadow: 0 22px 48px rgba(15, 35, 65, 0.09);
  transform: translateY(-4px);
}

.principle-card h3 {
  letter-spacing: -0.018em;
}

.principle-card p {
  line-height: 1.72;
}

/* CTA */

.cta {
  position: relative;
  border: 1px solid rgba(143, 193, 255, 0.24);
  background:
    radial-gradient(
      circle at 90% 15%,
      rgba(138, 193, 255, 0.36),
      transparent 22rem
    ),
    linear-gradient(135deg, #1769e0 0%, #164f91 52%, #102d50 100%);
  box-shadow:
    0 35px 80px rgba(16, 51, 92, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -150px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.cta h2 {
  position: relative;
  z-index: 1;
  color: #ffffff;
  line-height: 1.12;
  text-wrap: balance;
}

.cta p {
  position: relative;
  z-index: 1;
  color: #d8e6f6;
}

.cta .btn {
  position: relative;
  z-index: 1;
  color: #15385f;
  border-color: rgba(255, 255, 255, 0.72);
  background: #ffffff;
}

.cta .btn:hover {
  color: #1769e0;
  background: #f5f9ff;
}

/* Footer */

.landing-footer {
  border-top: 1px solid rgba(211, 221, 233, 0.8);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
}

/* Keyboard accessibility */

.landing-shell a:focus-visible,
.landing-shell button:focus-visible {
  outline: 3px solid rgba(40, 124, 255, 0.35);
  outline-offset: 4px;
}

/* Respect reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .workflow-preview {
    transform: none;
  }
}

/* Responsive refinements */

@media (max-width: 980px) {
  .workflow-preview {
    transform: none;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .landing-header {
    min-height: 70px;
  }

  .hero {
    gap: 46px;
  }

  .hero h1 {
    letter-spacing: -0.042em;
  }

  .module-card,
  .principle-card {
    padding: 24px;
  }

  .workflow-step {
    min-height: auto;
  }
}

/* BatchTrace interactive demo pill */

.demo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(22, 134, 93, 0.22);
  border-radius: 999px;
  color: #126b4d !important;
  background: rgba(227, 245, 236, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 5px 15px rgba(22, 134, 93, 0.07);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.demo-pill:hover {
  color: #0f5c42 !important;
  border-color: rgba(22, 134, 93, 0.42);
  background: #dcf3e7;
  box-shadow: 0 9px 20px rgba(22, 134, 93, 0.13);
  transform: translateY(-1px);
}

.demo-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20a873;
  box-shadow: 0 0 0 4px rgba(32, 168, 115, 0.12);
}

@media (max-width: 720px) {
  .landing-nav .demo-pill {
    display: inline-flex !important;
    padding: 8px 11px;
  }

  .landing-nav .demo-pill-dot {
    display: none;
  }
}

/* BatchTrace emphasized development focus */

.cta .cta-focus {
  max-width: 820px;
  margin-top: 22px;
  padding: 2px 0 2px 18px;
  border-left: 3px solid rgba(255, 255, 255, 0.68);
  color: #ffffff;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.65;
}

@media (max-width: 720px) {
  .cta .cta-focus {
    padding-left: 14px;
    font-size: 16px;
  }
}

/* BatchTrace header refresh v2 */

:root {
  --header-glass: rgba(255, 255, 255, 0.72);
  --header-border: rgba(212, 222, 235, 0.85);
  --header-shadow: 0 10px 35px rgba(15, 35, 65, 0.08);
  --brand-shadow: 0 14px 28px rgba(23, 105, 224, 0.28);
}

/* Slightly more premium page feel */
.landing-shell {
  background:
    radial-gradient(circle at 84% 6%, rgba(48, 132, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 8% 35%, rgba(123, 187, 255, 0.10), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, #f4f8fc 55%, #eef4fb 100%);
}

/* Header */
.landing-header {
  position: sticky;
  top: 14px;
  z-index: 40;
  width: min(1220px, calc(100% - 24px));
  margin: 14px auto 0;
  min-height: 78px;
  padding: 12px 20px;
  border: 1px solid var(--header-border);
  border-radius: 20px;
  background: var(--header-glass);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
}

/* Brand */
.landing-header .brand {
  gap: 14px;
}

.landing-header .brand-mark,
.preview-brand .brand-mark {
  position: relative;
  overflow: hidden;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background:
    linear-gradient(145deg, #4ea1ff 0%, #1769e0 56%, #0e4aa6 100%);
  box-shadow:
    var(--brand-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.landing-header .brand-mark::before,
.preview-brand .brand-mark::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.landing-header .brand-mark::after,
.preview-brand .brand-mark::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  width: 24px;
  height: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0));
  border-radius: 0 0 14px 14px;
  transform: rotate(-18deg);
  pointer-events: none;
}

.landing-header .brand strong {
  color: #10233f;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.landing-header .brand span {
  color: #6d7d92;
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* Navigation */
.landing-nav {
  gap: 12px;
  align-items: center;
}

.landing-nav a:not(.btn):not(.demo-pill) {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  color: #5a6b81;
  font-size: 14px;
  font-weight: 750;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.landing-nav a:not(.btn):not(.demo-pill)::after {
  display: none;
}

.landing-nav a:not(.btn):not(.demo-pill):hover {
  color: #1769e0;
  background: rgba(232, 241, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(23, 105, 224, 0.08);
  transform: translateY(-1px);
}

/* Primary CTA in header */
.landing-nav .btn.primary {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  background: linear-gradient(135deg, #1769e0 0%, #3186ff 100%);
  box-shadow:
    0 12px 24px rgba(23, 105, 224, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Demo pill refinement */
.demo-pill {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(227, 245, 236, 0.95);
  border: 1px solid rgba(22, 134, 93, 0.18);
  box-shadow:
    0 8px 18px rgba(22, 134, 93, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.demo-pill-dot {
  width: 8px;
  height: 8px;
}

/* Hero refinement */
.hero {
  padding-top: 68px;
}

.hero h1 {
  font-weight: 810;
}

.hero-copy {
  font-size: clamp(18px, 1.95vw, 21px);
}

.eyebrow {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 11px;
}

/* Slight polish to cards */
.module-card,
.principle-card {
  border-radius: 18px;
}

.module-card h3,
.principle-card h3 {
  font-weight: 760;
}

.workflow-preview {
  border-radius: 24px;
}

.cta {
  border-radius: 24px;
}

/* Footer cleaner */
.landing-footer {
  background: rgba(255, 255, 255, 0.78);
}

/* Mobile */
@media (max-width: 720px) {
  .landing-header {
    top: 8px;
    width: calc(100% - 16px);
    margin-top: 8px;
    min-height: 72px;
    padding: 10px 14px;
    border-radius: 18px;
  }

  .landing-header .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .landing-nav {
    gap: 8px;
  }

  .landing-nav a:not(.btn):not(.demo-pill) {
    display: none;
  }

  .landing-nav .btn.primary,
  .landing-nav .demo-pill {
    min-height: 38px;
    padding: 0 12px;
    font-size: 11px;
  }
}
