/* ============================================================================
   home.css — Renewed, feature-driven EasyCompare landing page.

   Philosophy: "show, don't tell". A calm, uniform layout where every feature
   reads the same way: headline → visual → 1–3 sentence caption. The visual
   does the talking; copy stays terse.

   Structure:
     - Tokens
     - Base / nav
     - Hero (headline + large video + 2×3 explainer grid)
     - Feature category section header
     - Feature unit (uniform full-width stack)
     - Media placeholders (capture instructions, drop real assets in later)
     - Footer
   ============================================================================ */

/* ----------------------------------------------------------------------------
   TOKENS
   ---------------------------------------------------------------------------- */
:root {
  --hm-bg: #fbfcfe;
  --hm-bg-alt: #f3f6fb;
  --hm-surface: #ffffff;
  --hm-ink: #0e1726;
  --hm-ink-soft: #44516a;
  --hm-ink-faint: #6b7890;
  --hm-line: #e4e9f2;
  --hm-line-soft: #eef2f8;

  --hm-brand: #2f6df6;
  --hm-brand-dark: #1f51c7;
  --hm-brand-wash: #eaf1ff;
  --hm-accent: #7c3aed;

  --hm-radius-lg: 22px;
  --hm-radius-md: 16px;
  --hm-radius-sm: 11px;

  --hm-shadow-sm: 0 1px 2px rgba(16, 23, 38, 0.04), 0 2px 8px rgba(16, 23, 38, 0.05);
  --hm-shadow-md: 0 6px 18px rgba(16, 23, 38, 0.07), 0 2px 6px rgba(16, 23, 38, 0.05);
  --hm-shadow-lg: 0 24px 60px rgba(16, 23, 38, 0.13), 0 6px 18px rgba(16, 23, 38, 0.08);

  /* Content width. The page runs wide and adapts to the window:
       - narrower-than-laptop windows: 85% (so it doesn't feel cramped)
       - full laptop width and up (>=1280px): 75%
       - below 1000px: near-full-width via padding (see responsive section)
     Capped by --hm-max so it never gets absurd on ultra-wide monitors. */
  --hm-width: 85%;
  --hm-max: 1600px;
  --hm-pad: clamp(20px, 5vw, 56px);

  --hm-font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hm-display: 'Space Grotesk', var(--hm-font);
}

/* ----------------------------------------------------------------------------
   BASE
   ---------------------------------------------------------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--hm-font);
  color: var(--hm-ink);
  background: var(--hm-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

a { color: inherit; }

.hm-shell {
  width: var(--hm-width);
  max-width: var(--hm-max);
  margin: 0 auto;
}

/* ----------------------------------------------------------------------------
   NAV
   ---------------------------------------------------------------------------- */
.hm-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 252, 254, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.hm-nav.is-scrolled {
  border-bottom-color: var(--hm-line);
  box-shadow: 0 1px 0 rgba(16, 23, 38, 0.02);
}
.hm-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  /* Nav runs wider than the 70% content column so the logo + CTA sit closer
     to the page edges. */
  width: 88%;
  max-width: var(--hm-max);
}
.hm-nav-logo { --brand-logo-display-height: 30px; }
.hm-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: #fff;
  background: var(--hm-brand);
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hm-nav-cta:hover { background: var(--hm-brand-dark); transform: translateY(-1px); }

/* ----------------------------------------------------------------------------
   SCROLL PROGRESS BAR (very top, above the nav)
   ---------------------------------------------------------------------------- */
.hm-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}
.hm-progress-fill {
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--hm-brand), var(--hm-accent));
  will-change: transform;
}

/* ----------------------------------------------------------------------------
   STICKY SECTION SUB-NAV (scrollspy pills)
   Sits in flow right after the hero, so it reveals itself once the hero
   scrolls away and then sticks just beneath the main nav.
   ---------------------------------------------------------------------------- */
.hm-subnav {
  position: sticky;
  top: 68px;
  z-index: 30;
  background: rgba(251, 252, 254, 0.9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--hm-line);
}
.hm-subnav-inner {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 88%;
  max-width: var(--hm-max);
  margin: 0 auto;
  padding: 9px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.hm-subnav-inner::-webkit-scrollbar { display: none; }
.hm-subnav-pill {
  flex: 0 0 auto;
  padding: 7px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--hm-ink-soft);
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.hm-subnav-pill:hover { background: var(--hm-line-soft); color: var(--hm-ink); }
.hm-subnav-pill.is-active {
  color: var(--hm-brand-dark);
  background: var(--hm-brand-wash);
  font-weight: 600;
}

/* Anchor offset so jumped-to sections clear both sticky bars. */
.hm-cat { scroll-margin-top: 124px; }

/* ----------------------------------------------------------------------------
   BACK TO TOP
   ---------------------------------------------------------------------------- */
.hm-totop {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 45;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--hm-line);
  border-radius: 50%;
  background: var(--hm-surface);
  color: var(--hm-ink);
  cursor: pointer;
  box-shadow: var(--hm-shadow-md);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.2s ease;
}
.hm-totop.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.hm-totop:hover { background: var(--hm-brand-wash); }
.hm-totop svg { width: 20px; height: 20px; }

/* ----------------------------------------------------------------------------
   HERO
   ---------------------------------------------------------------------------- */
.hm-hero {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(1200px 520px at 50% -8%, var(--hm-brand-wash), transparent 60%);
}
.hm-hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hm-brand-dark);
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  box-shadow: var(--hm-shadow-sm);
}
.hm-hero-title {
  font-family: var(--hm-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  line-height: 1.07;
  letter-spacing: -0.02em;
  margin: 0 auto;
  max-width: none;
}
.hm-hero-title em {
  font-style: normal;
  color: var(--hm-brand);
}
.hm-hero-sub {
  margin: 22px auto 0;
  max-width: 70ch;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--hm-ink-soft);
}
.hm-hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.hm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: #fff;
  background: var(--hm-brand);
  border-radius: 999px;
  box-shadow: var(--hm-shadow-md);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.hm-btn-primary:hover {
  background: var(--hm-brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--hm-shadow-lg);
}
.hm-hero-hint {
  font-size: 0.9rem;
  color: var(--hm-ink-faint);
}

/* Hero video */
.hm-hero-media {
  margin-top: clamp(36px, 5vw, 56px);
}
.hm-hero-frame {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  border-radius: var(--hm-radius-lg);
  overflow: hidden;
  background: #0d1422;
  border: 1px solid var(--hm-line);
  box-shadow: var(--hm-shadow-lg);
  aspect-ratio: 16 / 10;
}
.hm-hero-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ----------------------------------------------------------------------------
   HERO EXPLAINER GRID (2×3 numbered cards)
   ---------------------------------------------------------------------------- */
.hm-points {
  margin-top: clamp(44px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
}
.hm-point {
  position: relative;
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-md);
  padding: 26px 26px 28px;
  box-shadow: var(--hm-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hm-point:hover {
  transform: translateY(-3px);
  box-shadow: var(--hm-shadow-md);
  border-color: #d4ddec;
}
.hm-point-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--hm-brand);
  background: var(--hm-brand-wash);
  border-radius: 12px;
  margin-bottom: 16px;
}
.hm-point-icon svg { width: 24px; height: 24px; }
.hm-point-title {
  font-family: var(--hm-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--hm-ink);
}
.hm-point p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--hm-ink-soft);
}
.hm-point strong { color: var(--hm-ink); font-weight: 600; }

/* ----------------------------------------------------------------------------
   FEATURE CATEGORY SECTION
   ---------------------------------------------------------------------------- */
.hm-cat {
  padding-bottom: clamp(56px, 8vw, 104px);
}

/* Full-bleed category band: a wide background strip that runs edge to edge so
   it's unmistakable that a new category is starting. */
.hm-cat-band {
  width: 100%;
  background:
    linear-gradient(180deg, var(--hm-brand-wash), #fff);
  border-block: 1px solid var(--hm-line-soft);
  padding-block: clamp(44px, 6vw, 84px);
  margin-bottom: clamp(44px, 6vw, 80px);
  text-align: center;
}
.hm-cat-title {
  font-family: var(--hm-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 auto;
  max-width: none;
}
.hm-cat-lead {
  margin: 18px auto 0;
  max-width: 70ch;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--hm-ink-soft);
}

/* Optional category overview image, shown under a category headline ahead of
   the individual feature list. */
.hm-cat-media {
  margin: calc(-1 * clamp(20px, 3vw, 40px)) auto clamp(56px, 8vw, 96px);
}

/* ----------------------------------------------------------------------------
   FEATURE UNIT (uniform full-width stack)
   ---------------------------------------------------------------------------- */
.hm-feats {
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 8vw, 96px);
}
.hm-feat {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.hm-feat-index {
  font-family: var(--hm-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--hm-ink-faint);
}
.hm-feat-title {
  font-family: var(--hm-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 8px auto 0;
  max-width: none;
}
.hm-feat-media {
  margin: clamp(26px, 3.4vw, 40px) auto 0;
}
.hm-feat-frame {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  border-radius: var(--hm-radius-lg);
  overflow: hidden;
  background: #0d1422;
  border: 1px solid var(--hm-line);
  box-shadow: var(--hm-shadow-lg);
}
/* Media keeps its natural aspect ratio, never wider than the column and
   never taller than 80% of the viewport height. */
.hm-feat-frame video,
.hm-feat-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  background: #0d1422;
}
.hm-feat-caption {
  margin: clamp(22px, 2.6vw, 32px) auto 0;
  max-width: none;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  line-height: 1.5;
  color: var(--hm-ink-soft);
}
.hm-feat-caption strong { color: var(--hm-ink); font-weight: 600; }

/* ----------------------------------------------------------------------------
   MEDIA PLACEHOLDERS (drop real assets in later)
   ---------------------------------------------------------------------------- */
.hm-ph {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: clamp(260px, 42vw, 460px);
  padding: 32px;
  border-radius: var(--hm-radius-lg);
  border: 1.5px dashed #c2cee0;
  background:
    repeating-linear-gradient(135deg, #f6f9fe, #f6f9fe 14px, #f1f5fc 14px, #f1f5fc 28px);
  color: var(--hm-ink-faint);
  box-shadow: none;
}
.hm-ph--video { border-color: #b9c8ee; }
.hm-ph--image { border-color: #c9c2ec; }
.hm-ph-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.hm-ph-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hm-line);
}
.hm-ph--video .hm-ph-badge { color: var(--hm-brand-dark); }
.hm-ph--image .hm-ph-badge { color: var(--hm-accent); }
.hm-ph-badge svg { width: 14px; height: 14px; }
.hm-ph-dim {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--hm-ink-faint);
}
.hm-ph-shot {
  margin: 0;
  max-width: 52ch;
  font-size: 0.92rem;
  color: var(--hm-ink-soft);
}
.hm-ph-shot strong { color: var(--hm-ink); }

/* ----------------------------------------------------------------------------
   PRICING
   ---------------------------------------------------------------------------- */
.hm-pricing-intro {
  max-width: 64ch;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}
.hm-pricing-intro p {
  margin: 0 0 16px;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.55;
  color: var(--hm-ink-soft);
}
.hm-pricing-intro strong { color: var(--hm-ink); font-weight: 600; }

.hm-pricing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
  align-items: stretch;
}
.hm-plan {
  display: flex;
  flex-direction: column;
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-lg);
  padding: 32px 30px;
  box-shadow: var(--hm-shadow-sm);
}
.hm-plan--featured {
  border-color: var(--hm-brand);
  box-shadow: var(--hm-shadow-md);
  position: relative;
}
.hm-plan-tag {
  position: absolute;
  top: -12px;
  left: 30px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--hm-brand);
  padding: 4px 12px;
  border-radius: 999px;
}
.hm-plan-name {
  font-family: var(--hm-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 6px;
}
.hm-plan-price {
  font-family: var(--hm-display);
  font-weight: 700;
  font-size: clamp(2rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 0;
}
.hm-plan-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--hm-ink-faint);
}
.hm-plan-note {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: var(--hm-ink-faint);
}
.hm-plan-list {
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.hm-plan-list li {
  position: relative;
  padding-left: 28px;
  font-size: 1.02rem;
  color: var(--hm-ink-soft);
}
.hm-plan-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    var(--hm-brand-wash)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232f6df6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.hm-plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hm-plan-cta--primary { color: #fff; background: var(--hm-brand); }
.hm-plan-cta--primary:hover { background: var(--hm-brand-dark); transform: translateY(-2px); }
.hm-plan-cta--ghost {
  color: var(--hm-brand-dark);
  background: var(--hm-brand-wash);
}
.hm-plan-cta--ghost:hover { background: #dfe9ff; transform: translateY(-2px); }

@media (max-width: 640px) {
  .hm-pricing { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------------------- */
.hm-footer {
  border-top: 1px solid var(--hm-line);
  padding-block: 28px;
}
.hm-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--hm-ink-faint);
}
.hm-footer a { color: var(--hm-ink-soft); text-decoration: none; }
.hm-footer a:hover { color: var(--hm-brand); }
.hm-footer-links { display: flex; gap: 18px; }

/* ----------------------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------------------- */
/* At full laptop width and beyond, tighten the column to 75% (the default
   85% is reserved for narrower, not-full-screen windows). */
@media (min-width: 1280px) {
  :root { --hm-width: 75%; }
}

/* Below ~1000px the column gets too cramped — fall back to a
   padding-based near-full-width layout. */
@media (max-width: 1000px) {
  .hm-shell,
  .hm-nav-inner {
    width: auto;
    margin-inline: 0;
    padding-inline: var(--hm-pad);
  }
}
@media (max-width: 860px) {
  .hm-points { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hm-points { grid-template-columns: 1fr; }
  .hm-feat-frame { border-radius: var(--hm-radius-md); }
}

@media (prefers-reduced-motion: reduce) {
  .hm-point:hover,
  .hm-btn-primary:hover,
  .hm-nav-cta:hover { transform: none; }
}
