/* ================================================================
   /styles/home_new.css — New Home hero + CTA treatment
   Thin overlay on the existing page design.
   Depends on: /styles/hea_tokens.css (design tokens)
   ================================================================ */

/* ──────────────────────────── Page-level tokens ──────────────────────────── */
:root {
  --nh-max: 1180px;
  --nh-ink: #090b13;
}

/* ──────────────────────────── 1) HERO ──────────────────────────── */
/* Dark immersive hero — adapted from What's New page, brand colors */

.nh-hero {
  position: relative;
  flex-shrink: 0;
  min-height: 520px;                             /* fallback for browsers without svh */
  min-height: min(720px, calc(100svh - 60px));   /* progressive */
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(ellipse 90% 80% at 10% 55%, rgba(255, 90, 100, 0.52), transparent 50%),
    radial-gradient(ellipse 100% 90% at 75% 25%, rgba(255, 195, 113, 0.40), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(255, 120, 70, 0.22), transparent 56%),
    linear-gradient(180deg, #030508 0%, #060810 100%);
  isolation: isolate;
}

.nh-hero-inner {
  width: min(var(--nh-max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  align-content: center;
  min-height: inherit;
  padding: 72px 0 56px;
}

/* Frosted kicker pill */
.nh-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: color-mix(in oklab, var(--brand1) 8%, rgba(255, 255, 255, 0.10));
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nh-hero h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  color: #ffffff;
  font-size: clamp(2.65rem, 5.8vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.nh-hero-copy {
  max-width: 780px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.16rem;
  line-height: 1.50;
  text-align: left;
}

/* Hero action buttons */
.nh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
  color: var(--nh-ink);
  font-weight: 800;
  font-size: 0.96rem;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nh-btn:hover {
  transform: translateY(-1px);
}

.nh-btn:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.nh-btn.secondary {
  border-color: rgba(255, 255, 255, 0.40);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nh-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
}

/* Book a demo — warm brand-gradient CTA */
.nh-btn.demo {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, var(--brand1, #ff5f6d) 0%, var(--brand2, #ffc371) 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px color-mix(in oklab, var(--brand1) 38%, transparent);
  position: relative;
}

.nh-btn.demo:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px color-mix(in oklab, var(--brand1) 50%, transparent);
}

/* ── Hero pain-point cards ── */
.nh-pain-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(1080px, 100%);
  margin-top: 42px;
}

.nh-pain {
  padding: 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(7, 9, 18, 0.62);
  backdrop-filter: blur(10px);
  transition: border-color 220ms ease, transform 220ms ease;
}

.nh-pain:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

.nh-pain strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand1, #f18f01);
}

.nh-pain span {
  font-size: 0.88rem;
  line-height: 1.52;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 980px) {
  .nh-pain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .nh-pain-grid { grid-template-columns: 1fr; }
}

/* ──────────────────────────── 2) BOTTOM CTA ──────────────────────────── */
/* Rounded gradient card — adapted from What's New, brand colors */

.nh-cta-band {
  padding: 82px 0;
  background: var(--bg);
}

.nh-cta-band-inner {
  width: min(var(--nh-max), calc(100% - 32px));
  margin: 0 auto;
}

.nh-cta-card {
  padding: 48px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 79, 139, 0.96), rgba(255, 138, 42, 0.88)),
    #ff4f8b;
  color: #ffffff;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.nh-cta-card h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 2.1rem;
  letter-spacing: 0;
  text-wrap: balance;
}

.nh-cta-card p {
  margin: 0;
  max-width: 52ch;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.55;
  text-align: center;
}

.nh-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}


/* ──────────────────────────── 3) SIDEBAR RAIL ──────────────────────────── */
/* Sticky sidebar — adapted from article-rail pattern, brand-colored */

:root {
  --nh-rail-bg: color-mix(in srgb, var(--surface) 92%, var(--brand1) 8%);
  --nh-warm: color-mix(in srgb, var(--surface) 91%, var(--brand1) 9%);
}

/* 2-column layout wrapper */
.nh-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 42px;
  align-items: start;
}

.nh-layout > main {
  min-width: 0;
}

/* Rail container — sticky on desktop */
.nh-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding-top: 1.5rem;
}

/* Rail card (shared) */
.nh-rail-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: 18px;
}

.nh-rail-box h3 {
  margin: 0 0 10px;
  color: var(--brand1);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nh-rail-box p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

/* Rail link list */
.nh-rail-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nh-rail-list li {
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.nh-rail-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.nh-rail-list a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  text-decoration: none;
  display: block;
  padding-left: 0;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, padding-left 0.15s ease, border-color 0.15s ease;
}

.nh-rail-list a:hover {
  color: var(--brand1);
  padding-left: 6px;
  border-left: 2px solid var(--brand1);
}

/* Warm CTA box (HEA Guide) */
.nh-rail-cta {
  background: var(--nh-warm);
  border-color: color-mix(in srgb, var(--brand1) 30%, var(--line) 70%);
}

.nh-rail-cta h3 {
  color: var(--brand1);
}

.nh-rail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid color-mix(in srgb, var(--brand1) 68%, var(--line) 32%);
  border-radius: 8px;
  background: var(--brand1);
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.16s ease;
}

.nh-rail-action:hover {
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}


/* ──────────────────────────── 4) RESPONSIVE ──────────────────────────── */

@media (max-width: 980px) {
  .nh-hero-inner {
    padding: 48px 0 56px;
  }
  .nh-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .nh-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
  }
}

@media (max-width: 700px) {
  .nh-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .nh-hero {
    min-height: 320px;
    overflow: visible;
  }
  .nh-hero-inner {
    padding: 32px 0 38px;
  }
  .nh-hero h1 {
    line-height: 1.06;
  }
  .nh-hero-copy {
    font-size: 1rem;
  }
  .nh-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .nh-btn {
    width: 100%;
    max-width: 420px;
    text-align: center;
  }
  .nh-cta-band {
    padding: 52px 0;
  }
  .nh-cta-card {
    padding: 28px;
  }
  .nh-cta-card h2 {
    font-size: 1.7rem;
  }
}

/* ──────────────────────────── 5) DARK MODE ──────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root {
    --nh-rail-bg: color-mix(in srgb, var(--surface) 88%, var(--brand1) 12%);
    --nh-warm: color-mix(in srgb, var(--surface) 88%, var(--brand1) 12%);
  }
}

:root.dark {
  --nh-rail-bg: color-mix(in srgb, var(--surface) 88%, var(--brand1) 12%);
  --nh-warm: color-mix(in srgb, var(--surface) 88%, var(--brand1) 12%);
}

/* ──────────────────────────── 6) REDUCED MOTION ──────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .nh-btn,
  .nh-rail-action {
    transition: none;
  }
}
