/* Features page — full light editorial redesign under Brand Guide v1.0.
   Mirrors the about page's system: Sora headings, Inter body, pill CTAs,
   Pearl canvas, split panels, floating status chips, dark "window" cards
   for contrast, and a closing CTA card. Everything below the hero uses the
   fx- namespace. */

/* ---- Brand Guide v1.0 tokens ---- */
.features-page {
  --tv-blue: #2563eb;         /* Brand Blue — primary, one state only */
  --tv-blue-dark: #1d4ed8;    /* hover only — never both on one element */
  --tv-blue-light: #93c5fd;   /* tint */
  --tv-blue-pale: #eff6ff;    /* tinted surfaces */
  --tv-ink: #0b1120;          /* the ONLY dark page background */
  --tv-surface-dark: #151e33; /* the ONLY dark card surface */
  --tv-heading: #0f172a;
  --tv-body: #475569;
  --tv-muted: #94a3b8;
  --tv-border: #e2e8f0;
  --tv-success: #059669;
  --tv-gold: #c9a84c;         /* small labels/badges only */
  --tv-pearl: #f8f9ff;
  --tv-shadow: 0 24px 70px rgba(15, 23, 42, .10);
  --tv-max: 1536px;
  --tv-gutter: clamp(20px, 4vw, 72px);
  background:
    radial-gradient(circle at 6% 8%, rgba(37, 99, 235, .16), transparent 31rem),
    radial-gradient(circle at 90% 12%, rgba(147, 197, 253, .26), transparent 34rem),
    radial-gradient(circle at 72% 60%, rgba(5, 150, 105, .09), transparent 32rem),
    radial-gradient(circle at 16% 86%, rgba(201, 168, 76, .08), transparent 28rem),
    var(--tv-pearl);
  color: var(--tv-body);
}
.features-page h1, .features-page h2, .features-page h3, .features-page h4 {
  font-family: "Sora", sans-serif; color: var(--tv-heading);
}
.features-page main {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, .05) 1px, transparent 1px),
    linear-gradient(rgba(37, 99, 235, .045) 1px, transparent 1px);
  background-size: 72px 72px;
}
.features-page main .nb-container {
  max-width: min(var(--tv-max), calc(100% - (var(--tv-gutter) * 2)));
}

/* One button shape sitewide (pill), one blue per state. */
.features-page .nb-btn { border-radius: 999px; font: 600 .9375rem/1.2 "Inter", sans-serif; }
.features-page .nb-btn-primary {
  background: var(--tv-blue); border-color: var(--tv-blue);
  box-shadow: 0 12px 30px rgba(37, 99, 235, .25);
}
.features-page .nb-btn-primary:hover { background: var(--tv-blue-dark); border-color: var(--tv-blue-dark); box-shadow: 0 16px 38px rgba(37, 99, 235, .32); }
.features-page .nb-btn-ghost { color: var(--tv-heading); background: #fff; border-color: var(--tv-border); }
.features-page .nb-btn-ghost:hover { color: var(--tv-blue-dark); background: #fff; border-color: var(--tv-blue-light); }
.fx-btn-secondary { color: var(--tv-heading); background: rgba(255, 255, 255, .78); border: 1px solid var(--tv-border); }
.fx-btn-secondary:hover { color: var(--tv-blue-dark); background: #fff; border-color: var(--tv-blue-light); }

/* Shared section rhythm + eyebrow + heading */
.fx-section { position: relative; isolation: isolate; padding: clamp(64px, 7vw, 108px) 0; }
.fx-section-head { max-width: 740px; margin: 0 auto clamp(32px, 5vw, 56px); }
.features-page main h2 {
  margin: 0; font-weight: 700; letter-spacing: -.045em;
  font-size: clamp(1.85rem, 3.2vw, 2.9rem); line-height: 1.1;
}
.fx-eyebrow + h2 { margin-top: 14px; }
.features-page main h2 span {
  color: transparent; background: linear-gradient(100deg, var(--tv-blue) 10%, #60a5fa 60%, var(--tv-blue-light) 100%);
  background-clip: text; -webkit-background-clip: text;
}
.fx-section-head p, .fx-split-copy p, .fx-shell-copy p, .fx-final-card p {
  max-width: 560px; margin: 16px 0 0; color: var(--tv-body);
  font-size: clamp(.96rem, 1.1vw, 1.05rem); line-height: 1.72;
}
.fx-section-head.text-center p, .fx-final-card p { margin-left: auto; margin-right: auto; }

/* =====================  SECTION 1 — HERO (unchanged)  ===================== */
.fx-hero { position: relative; overflow: hidden; padding: clamp(148px, 96px + 7vw, 196px) 0 clamp(64px, 7vw, 96px); background: #f8f9ff; }
.fx-hero-mesh {
  position: absolute; inset: -10%; pointer-events: none;
  background:
    radial-gradient(circle at 10% 12%, rgba(37, 99, 235, .12), transparent 36%),
    radial-gradient(circle at 90% 18%, rgba(147, 197, 253, .18), transparent 34%),
    radial-gradient(circle at 68% 96%, rgba(5, 150, 105, .07), transparent 30%);
  filter: blur(8px);
}
.fx-hero-grid {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, .033) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .033) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 18%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 18%, #000, transparent 72%);
}
.fx-hero-layout { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 5vw, 76px); align-items: center; }

/* Eyebrow label tier: Inter 12px/700 uppercase (Brand Guide) */
.fx-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px;
  padding: 8px 14px; border: 1px solid rgba(37, 99, 235, .2); border-radius: 999px;
  background: var(--tv-blue-pale); color: var(--tv-blue);
  font: 700 .75rem "Inter", sans-serif; letter-spacing: .08em; text-transform: uppercase;
}
.fx-hero h1 { max-width: 620px; margin: 0 0 20px; font: 700 clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem)/1.08 "Sora", sans-serif; letter-spacing: -.045em; }
.fx-hero h1 span { color: var(--tv-blue); }
/* Body Large tier: Inter 18px/400 */
.fx-hero-sub { max-width: 540px; margin: 0 0 30px; color: var(--tv-body); font-size: 1.125rem; font-weight: 400; line-height: 1.7; }
.fx-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.fx-hero-proof { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--tv-body); font-size: .875rem; }
.fx-hero-proof i { margin-right: 7px; color: var(--tv-success); }

/* Visual column: real photograph + floating workspace card + FBR badge */
.fx-hero-visual { position: relative; max-width: 470px; margin-left: auto; }
.fx-hero-photo { margin: 0; }
.fx-hero-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border: 1px solid #fff; border-radius: 28px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, .16), 0 10px 26px rgba(15, 23, 42, .08);
}
.fx-hero-card {
  position: absolute; bottom: 34px; left: -64px; width: min(330px, 84%);
  padding: 18px; border: 1px solid var(--tv-border); border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 55px rgba(15, 23, 42, .16);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.fx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--tv-border); }
.fx-card-head span { color: var(--tv-heading); font-size: .8rem; font-weight: 600; }
.fx-card-head span i { margin-right: 7px; color: var(--tv-blue); }
.fx-card-head em { display: inline-flex; align-items: center; gap: 5px; color: var(--tv-success); font-size: .68rem; font-style: normal; font-weight: 600; }
.fx-card-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0; }
.fx-card-steps span {
  display: grid; justify-items: center; gap: 4px; padding: 9px 4px;
  border: 1px solid var(--tv-border); border-radius: 12px; background: #f8fafc;
  color: var(--tv-muted); font-size: .66rem; font-weight: 600;
}
.fx-card-steps span.is-done { border-color: rgba(5, 150, 105, .22); background: #ecfdf5; color: var(--tv-success); }
.fx-card-steps span.is-now { border-color: rgba(37, 99, 235, .3); background: #dbeafe; color: var(--tv-blue-dark); }
.fx-card-meta { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.fx-card-meta small { display: block; margin-bottom: 3px; color: var(--tv-body); font-size: .68rem; }
.fx-card-meta strong { color: var(--tv-heading); font-family: "Sora", sans-serif; font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; }
.fx-card-meta strong.is-ready { display: inline-flex; align-items: center; gap: 6px; color: var(--tv-success); font-size: .85rem; }
.fx-hero-chip {
  position: absolute; top: 26px; right: -16px; display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--tv-border); border-radius: 14px;
  background: rgba(255, 255, 255, .95); box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: fxFloat 6s ease-in-out infinite;
}
.fx-hero-chip > i { color: var(--tv-gold); font-size: 1.05rem; }
.fx-hero-chip small { display: block; color: var(--tv-body); font-size: .62rem; }
.fx-hero-chip strong { display: block; color: var(--tv-heading); font-size: .72rem; font-weight: 600; }

@keyframes fxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* =============  SECTION 2 & 3 — split panels (Quotes/Approval, FBR)  ============= */
.fx-split {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 5vw, 74px); align-items: center;
}
.fx-split-reverse { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
.fx-split-reverse .fx-split-media { order: -1; }
.fx-check-list { display: grid; gap: 13px; margin: 26px 0 0; padding: 0; list-style: none; }
.fx-check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--tv-body); font-size: .92rem; line-height: 1.5; }
.fx-check-list i { flex: 0 0 auto; margin-top: 3px; color: var(--tv-success); }
.fx-split-media {
  position: relative; margin: 0; overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9); border-radius: 30px;
  background: #fff; box-shadow: var(--tv-shadow);
}
.fx-split-media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.fx-split-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 17, 32, 0) 52%, rgba(11, 17, 32, .5));
}
.fx-split-media figcaption {
  position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2;
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; color: #fff;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 16px;
  background: rgba(11, 17, 32, .42); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.fx-split-media figcaption span { color: var(--tv-blue-light); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.fx-split-media figcaption strong { font-family: "Sora", sans-serif; font-size: .95rem; font-weight: 600; }

.fx-section-fbr::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 82% 20%, rgba(37, 99, 235, .14), transparent 40rem),
    radial-gradient(ellipse at 10% 86%, rgba(5, 150, 105, .10), transparent 34rem);
}

/* =====================  SECTION 4 — feature card grid  ===================== */
.fx-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fx-feature-card {
  min-height: 250px; padding: 28px;
  border: 1px solid rgba(226, 232, 240, .94); border-radius: 26px;
  background: rgba(255, 255, 255, .8); box-shadow: 0 18px 48px rgba(15, 23, 42, .06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.fx-feature-card:hover { transform: translateY(-6px); border-color: var(--tv-blue-light); box-shadow: 0 28px 64px rgba(15, 23, 42, .1); }
.fx-feature-card > i {
  display: grid; place-items: center; width: 48px; height: 48px;
  color: var(--tv-blue); font-size: 1.2rem;
  border-radius: 16px; background: var(--tv-blue-pale);
}
.fx-feature-card h3 { margin: 22px 0 8px; font-size: 1.05rem; letter-spacing: -.02em; }
.fx-feature-card p { margin: 0 0 16px; color: var(--tv-body); font-size: .88rem; line-height: 1.65; }
.fx-feature-card > span { color: var(--tv-blue); font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

/* =====================  SECTION 5 — reliable operations shell  ===================== */
.fx-section-ops::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 14% 22%, rgba(5, 150, 105, .10), transparent 30rem),
    radial-gradient(circle at 88% 70%, rgba(37, 99, 235, .16), transparent 34rem);
}
.fx-shell {
  display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(26px, 4vw, 54px); border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 36px; background: rgba(255, 255, 255, .74);
  box-shadow: var(--tv-shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.fx-text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--tv-blue); font-weight: 700; text-decoration: none; }
.fx-text-link:hover { color: var(--tv-blue-dark); }
.fx-queue-window {
  overflow: hidden; padding: 22px; border: 1px solid rgba(21, 30, 51, .14);
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(147, 197, 253, .07) 1px, transparent 1px),
    linear-gradient(rgba(147, 197, 253, .07) 1px, transparent 1px),
    var(--tv-ink);
  background-size: 38px 38px;
  box-shadow: 0 26px 64px rgba(15, 23, 42, .18);
}
.fx-window-top { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: rgba(255, 255, 255, .6); font-size: .78rem; }
.fx-window-top span { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .24); }
.fx-window-top span:nth-child(1) { background: #ef4444; }
.fx-window-top span:nth-child(2) { background: var(--tv-gold); }
.fx-window-top span:nth-child(3) { background: var(--tv-success); }
.fx-window-top em { margin-left: 8px; font-style: normal; }
.fx-queue-row {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: 16px; background: rgba(255, 255, 255, .05);
}
.fx-queue-row + .fx-queue-row { margin-top: 10px; }
.fx-queue-row > i {
  display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px;
  color: var(--tv-blue-light); border-radius: 12px; background: rgba(59, 130, 246, .14);
}
.fx-queue-row > span { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.fx-queue-row strong { color: #f8fafc; font-size: .86rem; }
.fx-queue-row small { color: rgba(248, 250, 252, .5); font-size: .74rem; }
.fx-queue-row em {
  flex: 0 0 auto; padding: 6px 11px; color: rgba(248, 250, 252, .6);
  font-size: .68rem; font-style: normal; font-weight: 600;
  border-radius: 999px; background: rgba(148, 163, 184, .12);
}
.fx-queue-row.is-complete em { color: #6ee7b7; background: rgba(74, 222, 128, .14); }
.fx-queue-row.is-running em { color: #93c5fd; background: rgba(59, 130, 246, .18); animation: fxPulseSoft 2.4s ease-in-out infinite; }
.fx-queue-row.is-running > i { color: #93c5fd; background: rgba(59, 130, 246, .22); }

@keyframes fxPulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* =====================  SECTION 6 — connected-by-design flow  ===================== */
.fx-flow {
  position: relative; display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 18px; padding: clamp(28px, 4vw, 40px) clamp(20px, 4vw, 40px);
  border: 1px solid rgba(226, 232, 240, .92); border-radius: 30px;
  background: rgba(255, 255, 255, .76); box-shadow: 0 18px 50px rgba(15, 23, 42, .07);
}
.fx-flow-track {
  position: absolute; top: calc(clamp(28px, 4vw, 40px) + 24px); left: calc(10% + 24px); right: calc(10% + 24px);
  height: 2px; background: repeating-linear-gradient(90deg, var(--tv-border) 0 8px, transparent 8px 14px);
  z-index: 0;
}
.fx-flow-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; text-align: center; }
.fx-flow-step i {
  display: grid; place-items: center; width: 48px; height: 48px;
  color: var(--tv-blue); font-size: 1.15rem;
  border: 1px solid var(--tv-border); border-radius: 16px; background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}
.fx-flow-step strong { font-family: "Sora", sans-serif; font-size: .88rem; letter-spacing: -.01em; }
.fx-flow-step small { color: var(--tv-muted); font-size: .72rem; }
.fx-plan-note { margin: 20px 0 0; color: var(--tv-muted); font-size: .82rem; text-align: center; }

/* =====================  SECTION 7 — final CTA  ===================== */
.fx-final { padding-bottom: clamp(88px, 10vw, 132px); }
.fx-final-card {
  position: relative; max-width: 940px; margin: 0 auto; overflow: hidden;
  padding: clamp(36px, 6vw, 68px); text-align: center;
  border: 1px solid rgba(226, 232, 240, .95); border-radius: 38px;
  background:
    radial-gradient(circle at 20% 18%, rgba(37, 99, 235, .12), transparent 34%),
    radial-gradient(circle at 80% 82%, rgba(5, 150, 105, .08), transparent 30%),
    rgba(255, 255, 255, .82);
  box-shadow: var(--tv-shadow);
}
.fx-final-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, .04) 1px, transparent 1px),
    linear-gradient(rgba(37, 99, 235, .035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%);
  pointer-events: none;
}
.fx-final-card > * { position: relative; z-index: 1; }
.fx-final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 13px; margin-top: 32px; }

/* =====================  Motion  ===================== */
.js .features-page .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.js .features-page .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fx-hero-chip, .fx-queue-row.is-running em { animation: none !important; }
  .features-page .reveal { transition: none; }
}

/* =====================  Responsive  ===================== */
@media (max-width: 991.98px) {
  .fx-hero { padding-top: 136px; }
  .fx-hero-layout { grid-template-columns: 1fr; gap: 48px; }
  .fx-hero-visual { max-width: 520px; margin: 0 auto; }
  .fx-hero-card { left: 14px; bottom: 14px; }

  .fx-split, .fx-split-reverse { grid-template-columns: 1fr; }
  .fx-split-reverse .fx-split-media { order: 0; }
  .fx-card-grid { grid-template-columns: 1fr 1fr; }
  .fx-shell { grid-template-columns: 1fr; }
  .fx-flow { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 767.98px) {
  .fx-hero { padding: 122px 0 60px; }
  .fx-hero-sub { font-size: 1.05rem; }
  .fx-hero-actions { display: grid; }
  .fx-hero-photo img { aspect-ratio: 4 / 4.6; border-radius: 22px; }
  .fx-hero-card { width: min(310px, calc(100% - 28px)); padding: 15px; }
  .fx-hero-chip { top: 14px; right: 14px; }

  .fx-card-grid { grid-template-columns: 1fr; }
  .fx-final-actions { display: grid; }

  .fx-flow { grid-template-columns: 1fr; gap: 20px; }
  .fx-flow-track { display: none; }
  .fx-flow-step { grid-template-columns: 48px 1fr; grid-auto-flow: column; justify-items: start; text-align: left; align-items: center; }
  .fx-flow-step small { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-hero-chip { animation: none !important; }
}
