/* EQALL Homepage Redesign, Premium B2B SaaS */

:root {
  --bg: #FAFAF7;
  --bg-elevated: #FFFFFF;
  --bg-dark: #0A1628;
  --bg-dark-2: #0F1B2D;
  --bg-dark-soft: #142035;

  --ink: #0A1628;
  --ink-2: #2A3548;
  --ink-3: #5A6478;
  --ink-4: #8A93A4;

  --line: rgba(10, 22, 40, 0.08);
  --line-strong: rgba(10, 22, 40, 0.14);
  --line-dark: rgba(255, 255, 255, 0.08);
  --line-dark-strong: rgba(255, 255, 255, 0.16);

  --brand-blue: #2EA3F2;
  --brand-blue-deep: #1B7FBF;
  --brand-green: #7BC84A;
  --brand-green-deep: #5BA82E;
  --brand-teal: #2DD4BF;

  --on-dark: #F5F7FA;
  --on-dark-2: #B5BECC;
  --on-dark-3: #7A8499;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-soft: 0 1px 2px rgba(10,22,40,0.04), 0 8px 24px rgba(10,22,40,0.06);
  --shadow-pop: 0 2px 4px rgba(10,22,40,0.06), 0 24px 60px rgba(10,22,40,0.12);
  --shadow-deep: 0 40px 80px rgba(10,22,40,0.20);

  --container: 1280px;
  --gutter: 32px;

  --font-display: "Avenir Next", "Avenir", system-ui, sans-serif;
  --font-body: "Avenir Next", "Avenir", system-ui, sans-serif;
  --font-mono: "Avenir Next", "Avenir", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Type scale */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow.dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--brand-green);
  margin-right: 10px;
  transform: translateY(-2px);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.display-1 {
  font-size: clamp(48px, 6.4vw, 96px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.display-2 {
  font-size: clamp(40px, 4.6vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.display-3 {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.h-feature {
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lede {
  font-size: clamp(17px, 1.3vw, 20px);
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 60ch;
  text-wrap: pretty;
}
.body-l { font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.body { font-size: 15px; line-height: 1.6; color: var(--ink-3); }
.caption { font-size: 13px; color: var(--ink-3); }
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover { transform: translateY(-1px); background: #1A2438; }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover { background: rgba(10,22,40,0.04); border-color: rgba(10,22,40,0.22); }
.btn-ghost {
  background: transparent; color: var(--ink-2);
  padding: 8px 4px;
}
.btn-ghost:hover { color: var(--ink); }

.btn-on-dark.btn-primary {
  background: #fff; color: var(--ink);
}
.btn-on-dark.btn-primary:hover { background: #F0F2F5; }
.btn-on-dark.btn-secondary {
  border-color: var(--line-dark-strong); color: var(--on-dark);
}
.btn-on-dark.btn-secondary:hover { background: rgba(255,255,255,0.06); }

.btn-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  justify-content: center;
}
.btn-primary .btn-arrow { background: rgba(255,255,255,0.16); }
.btn-secondary .btn-arrow { background: rgba(10,22,40,0.08); }

/* Nav
   sticky lives on <header> (direct child of <body>) so the scroll range is the
   full viewport. Putting sticky on .nav alone confined it to <header>'s height,
   which is why the nav scrolled away with the body. */
body > header {
  position: sticky; top: 0; z-index: 50;
}
.nav {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(250, 250, 247, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center;
  height: 32px;
}
.logo-img {
  height: 32px;
  width: auto;
  display: block;
}
.logo-img-dark {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.logo-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, var(--brand-blue), var(--brand-blue-deep) 60%, var(--brand-green-deep));
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: "E";
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  font-style: italic;
  font-family: var(--font-display);
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 450;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  display: flex; align-items: center; gap: 8px;
}
@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* Section frame */
section { position: relative; }
.section-pad { padding: clamp(72px, 9vw, 140px) 0; }
.section-pad-sm { padding: clamp(56px, 6vw, 96px) 0; }

.section-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: clamp(48px, 5vw, 72px);
  max-width: 880px;
}
.section-header .eyebrow { margin-bottom: 8px; }

/* Dark section */
.dark {
  background: var(--bg-dark);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--on-dark); }
.dark .lede { color: var(--on-dark-2); }
.dark .body { color: var(--on-dark-3); }
.dark .eyebrow { color: var(--on-dark-3); }
.dark .mono { color: var(--on-dark-3); }

.dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(46,163,242,0.12), transparent 60%),
    radial-gradient(40% 60% at 100% 100%, rgba(123,200,74,0.08), transparent 60%);
  pointer-events: none;
}

/* Cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}
.dark .card {
  background: var(--bg-dark-soft);
  border-color: var(--line-dark);
}
.dark .card:hover {
  border-color: var(--line-dark-strong);
}

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(46,163,242,0.10);
  color: var(--brand-blue-deep);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--brand-blue); }
.chip-green { background: rgba(123,200,74,0.14); color: var(--brand-green-deep); }
.chip-green .dot { background: var(--brand-green); }
.dark .chip {
  background: rgba(46,163,242,0.16);
  color: #79C5F5;
}
.dark .chip-green {
  background: rgba(123,200,74,0.18);
  color: #A8E07C;
}

/* Grid utilities */
.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1000px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
}

/* Marquee */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; gap: 56px;
  width: max-content;
  animation: marquee 50s linear infinite;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink-3);
  letter-spacing: -0.01em;
  white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
}
.marquee-item .dot { width: 5px; height: 5px; border-radius: 999px; background: var(--ink-4); }

/* Accent text */
.accent-blue { color: var(--brand-blue-deep); }
.accent-green { color: var(--brand-green-deep); }
.italic-e {
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 600;
}

/* Asterisk pattern (used for decoration) */
.bullet {
  width: 6px; height: 6px; border-radius: 999px; background: currentColor;
  display: inline-block; opacity: 0.4; margin: 0 8px 2px;
}

/* Stat block */
.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(56px, 7vw, 96px);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--on-dark-2);
  padding: 96px 0 48px;
  position: relative;
  overflow: hidden;
}
.footer h3 { color: var(--on-dark); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; font-weight: 500; }
.footer a { color: var(--on-dark-2); font-size: 14px; transition: color .15s ease; display: block; padding: 6px 0; }
.footer a:hover { color: var(--on-dark); }
.footer-bottom {
  border-top: 1px solid var(--line-dark);
  margin-top: 64px;
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px;
  color: var(--on-dark-3);
}

/* Hero specific */
.hero {
  position: relative;
  padding: clamp(40px, 6vw, 96px) 0 clamp(72px, 8vw, 120px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 32px; }
.hero-meta { display: flex; gap: 24px; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.hero-meta .check {
  width: 14px; height: 14px; border-radius: 999px;
  background: var(--brand-green);
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 6px;
}
.hero-meta .check svg { width: 9px; height: 9px; }

/* Decorative grid background for hero */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,22,40,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,22,40,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000, transparent 80%);
  pointer-events: none;
}

/* Ten-experts orbit */
.orbit {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 600px;
  margin: 0 auto;
  display: grid; place-items: center;
}

/* Tag (small label) */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(10,22,40,0.05);
  color: var(--ink-3);
}
.dark .tag { background: rgba(255,255,255,0.06); color: var(--on-dark-2); }

/* Animated underline links */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap .2s ease;
}
.link-arrow:hover { gap: 10px; }
.dark .link-arrow { color: var(--on-dark); }

/* App phone frame */
.phone-shell {
  border-radius: 36px;
  background: linear-gradient(180deg, #2A2D3A, #14161E);
  padding: 8px;
  box-shadow: var(--shadow-deep);
  position: relative;
}
.phone-shell::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 35px;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
}

/* Code-like compare row */
.compare-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 14px;
}
.compare-table th, .compare-table td {
  padding: 16px 18px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.compare-table th:first-child, .compare-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--ink);
}
.compare-table thead th {
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-3);
  padding-top: 8px;
}
.compare-table .col-eqall {
  background: rgba(46,163,242,0.04);
  color: var(--brand-blue-deep);
  font-weight: 600;
}
.compare-table .col-eqall.head {
  background: var(--ink);
  color: #fff;
  border-radius: 12px 12px 0 0;
}
.compare-table .check-yes { color: var(--brand-green-deep); font-weight: 600; }
.compare-table .check-no { color: var(--ink-4); }
.compare-table .check-partial { color: #C99A2A; }

/* Sticky-column responsive comparison */
.compare-wrap.compare-sticky {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.compare-wrap.compare-sticky .compare-table {
  min-width: 880px;
}
.compare-wrap.compare-sticky .compare-table th,
.compare-wrap.compare-sticky .compare-table td {
  white-space: nowrap;
}
.compare-wrap.compare-sticky .compare-table th:first-child,
.compare-wrap.compare-sticky .compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-elevated, #fff);
  white-space: normal;
  min-width: 230px;
}
.compare-wrap.compare-sticky .compare-table th:nth-child(2),
.compare-wrap.compare-sticky .compare-table td:nth-child(2) {
  position: sticky;
  left: 230px;
  z-index: 2;
  background: rgba(46,163,242,0.06);
}
.compare-wrap.compare-sticky .compare-table thead th:nth-child(2).col-eqall.head {
  background: var(--ink);
  color: #fff;
}
@media (max-width: 720px) {
  .compare-wrap.compare-sticky .compare-table th:first-child,
  .compare-wrap.compare-sticky .compare-table td:first-child {
    min-width: 180px;
  }
  .compare-wrap.compare-sticky .compare-table th:nth-child(2),
  .compare-wrap.compare-sticky .compare-table td:nth-child(2) {
    left: 180px;
  }
}

.tile-carousel-bounded {
  margin: 56px 0 28px !important;
  padding-left: 0 !important;
  border-radius: 24px;
}
.tile-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}
.tile-arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.tile-arrow:hover:not(:disabled) {
  background: var(--ink);
  color: #fff;
  transform: scale(1.05);
}
.tile-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Tile carousel (home) */
.tile-carousel {
  --tile-w: clamp(240px, 28vw, 360px);
  --tile-gap: 20px;
  margin: 56px 0 28px;
  padding-left: max(48px, calc((100vw - 1200px) / 2));
  overflow: hidden;
  position: relative;
}
.tile-carousel-track {
  display: flex;
  gap: var(--tile-gap);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  user-select: none;
}
.tile-carousel.is-dragging .tile-carousel-track {
  transition: none;
}
.tile-carousel img { pointer-events: none; -webkit-user-drag: none; }
.tile-card {
  flex: 0 0 var(--tile-w);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.tile-card-img {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  background: var(--bg-elevated, #f7f7f5);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.25);
}
.tile-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tile-card-caption {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
  text-align: center;
}
.tile-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.tile-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: var(--ink-soft, #d4d4d0);
  cursor: pointer;
  padding: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.tile-dot.is-active {
  width: 28px;
  background: var(--brand-blue-deep, #1B7FBF);
}
@media (max-width: 720px) {
  .tile-carousel {
    --tile-w: 70vw;
    --tile-gap: 14px;
    padding-left: 24px;
  }
}

/* Subtle reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s ease, transform .8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* Live demo embed */
.demo-frame {
  background: var(--bg-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}
.demo-titlebar {
  height: 38px;
  display: flex; align-items: center;
  padding: 0 14px;
  background: linear-gradient(180deg, #1A2438, #131C2D);
  border-bottom: 1px solid var(--line-dark);
  gap: 8px;
}
.demo-titlebar .traffic { display: flex; gap: 6px; }
.demo-titlebar .dot { width: 11px; height: 11px; border-radius: 999px; }

/* Tier accent badges */
.tier-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
}
.dark .tier-badge { border-color: var(--line-dark-strong); color: var(--on-dark-2); }

/* Tweaks panel position */
.tw-panel { z-index: 100; }

/* Decorative accent line */
.divider-dot {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.divider-dot::before, .divider-dot::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

/* Density modifier */
[data-density="compact"] .section-pad { padding: clamp(56px, 7vw, 100px) 0; }
[data-density="spacious"] .section-pad { padding: clamp(96px, 12vw, 180px) 0; }
