/* Feature hub and solution detail pages. Loaded after style.css. */

.features-page .site-header,
.solution-page .site-header { position: fixed; }

.solution-page { background: var(--bg-sky); }
.solution-page .story-section:not([style]) { background: var(--white); }

@media (min-width: 810px) {
  .has-mega {
    position: relative;
    padding-bottom: 24px;
    margin-bottom: -24px;
  }

  .has-mega::after {
    content: "";
    position: absolute;
    top: 100%;
    left: -24px;
    right: -24px;
    height: 24px;
  }

  .mega-panel {
    position: absolute;
    top: calc(100% - 24px);
    left: 50%;
    width: min(1100px, calc(100vw - 48px));
    transform: translate(-50%, 8px);
    display: grid;
    grid-template-rows: 0fr;
    padding: 30px;
    background: #FAFAE3;
    border: 1px solid rgba(42, 23, 48, 0.08);
    border-radius: 0 0 32px 32px;
    box-shadow: var(--shadow-card);
    z-index: 60;
    opacity: 0;
    transition: opacity .22s ease, transform .22s ease;
  }
  .mega-panel-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 250px; gap: 28px; min-height: 0; overflow: hidden; }
  .has-mega-row { display: flex; align-items: center; }
  .has-mega-row > a { display: flex; align-items: center; gap: 7px; }
  .has-mega-row > a::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
  .has-mega:hover .has-mega-row > a::after,
  .has-mega:focus-within .has-mega-row > a::after,
  .has-mega.is-open .has-mega-row > a::after { transform: rotate(225deg); }
  .has-mega:hover .mega-panel,
  .has-mega:focus-within .mega-panel,
  .has-mega.is-open .mega-panel { grid-template-rows: 1fr; opacity: 1; transform: translate(-50%, 0); }
  .has-mega:hover > a,
  .has-mega:focus-within > a,
  .has-mega.is-open > a { background: #FAFAE3; border-radius: var(--radius-pill) var(--radius-pill) 0 0; }
  .mega-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .mega-col-title, .included-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
  .mega-col-title { margin-bottom: 12px; }
  .mega-col a { display: block; width: 100%; padding: 12px 14px; margin: 0; border-radius: 14px; font-size: 14px; font-weight: 600; box-sizing: border-box; transition: background .2s ease, color .2s ease; }
  .mega-col a span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
  .mega-col a:hover { background: rgba(42, 23, 48, 0.06); color: var(--navy); }
  .mega-promo { display: flex; flex-direction: column; justify-content: space-between; padding: 22px; color: var(--white); background: var(--bg-deep-purple); border-radius: var(--radius-sm); }
  .mega-promo strong { font-family: var(--font-display); font-size: 19px; }
  .mega-promo p { margin: 8px 0 18px; color: rgba(255,255,255,.75); font-size: 13px; }
  .mega-promo a { font-size: 13px; text-decoration: underline; }
}

@media (max-width: 809px) {
  .has-mega-row > a::after { display: none !important; }
  .has-mega-row { display: flex; align-items: center; justify-content: space-between; }
  .mega-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: none; background: none; color: var(--navy); cursor: pointer; }
  .mega-toggle-icon { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s ease; }
  .mega-toggle[aria-expanded="true"] .mega-toggle-icon,
  .has-mega.is-open .mega-toggle-icon { transform: rotate(-135deg); }
  .mega-panel { position: static !important; width: 100% !important; max-width: none !important; transform: none !important; padding: 0 !important; margin: 0 !important; background: none !important; border: none !important; box-shadow: none !important; border-radius: 0 !important; opacity: 1 !important; display: none !important; }
  .has-mega.is-open .mega-panel { display: block !important; }
  .mega-panel-inner { display: block !important; padding-left: 14px !important; border-left: 2px solid rgba(151, 68, 120, 0.18) !important; margin: 6px 0 14px 6px !important; }
  .mega-col { margin-bottom: 12px !important; }
  .mega-promo { display: none !important; }
}

.features-hero { padding: 170px 0 0; text-align: left; background: var(--banner-bg); }
.features-hero .hero-copy { max-width: 760px; }
.features-hero .hero-side { padding-top: 14px; }
.features-hero .hero-subtitle { color: var(--white); }
.features-hero .hero-visual { margin-top: 90px; }
.category-tabs { position: sticky; top: 76px; z-index: 30; padding: 10px 0; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(42,23,48,.1); backdrop-filter: blur(12px); }
.category-tabs-inner { display: flex; gap: 8px; overflow-x: auto; padding-top: 2px; padding-bottom: 2px; scrollbar-width: none; scroll-behavior: smooth; scroll-snap-type: x proximity; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.category-tabs-inner::-webkit-scrollbar { display: none; }
.category-tabs-inner:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 3px; border-radius: var(--radius-pill); }
.category-tab { flex-shrink: 0; padding: 10px 17px; border-radius: var(--radius-pill); color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.25; scroll-snap-align: start; white-space: nowrap; }
.category-tab:hover { color: var(--navy); background: var(--bg-sky-pale); }
.category-tab.is-active { color: var(--white); background: var(--navy); }
.category-tab:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.category-section { position: relative; min-height: 100svh; padding: 90px 0; display: flex; align-items: center; overflow: hidden; scroll-margin-top: 140px; }
.category-section .container { position: relative; z-index: 1; padding-right: min(48%, 620px); }
.category-visual { position: absolute; top: 50%; right: max(4%, calc((100vw - var(--container)) / 2)); width: min(42vw, 560px); height: 475px; transform: translateY(-50%); object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.category-section--dense { min-height: max(100svh, 760px); }
.category-section:nth-of-type(even) .container { padding-right: 20px; padding-left: min(48%, 620px); }
.category-section:nth-of-type(even) .category-visual { right: auto; left: max(4%, calc((100vw - var(--container)) / 2)); }
.category-section:nth-of-type(odd) { background: var(--bg-sky-paler); }
@media (prefers-reduced-motion: reduce) {
  .category-tabs-inner { scroll-behavior: auto; }
}
.category-head { max-width: 650px; margin-bottom: 30px; }
.category-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 16px; font-size: 22px; }
.category-head h2 { margin-bottom: 10px; font-size: 36px; }
.category-head p, .feature-card p { color: var(--muted); }
.feature-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card { padding: 20px; background: var(--white); border: 1px solid rgba(42,23,48,.1); border-radius: var(--radius-sm); box-shadow: 0 5px 18px rgba(42,23,48,.04); }
.feature-card h3 { margin-bottom: 8px; font-size: 18px; }
.feature-card p { font-size: 14px; line-height: 1.6; }
.feature-card a { display: inline-block; margin-top: 14px; color: var(--accent-dark); font-size: 13px; font-weight: 600; }
.included-block { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(42,23,48,.12); }
.included-label { margin-bottom: 14px; }
.included-pills { display: flex; flex-wrap: wrap; gap: 9px; }
.included-pills span { padding: 8px 14px; color: var(--navy); background: var(--bg-sky-pale); border-radius: var(--radius-pill); font-size: 13px; }
.story-section { padding: 88px 0; }
.story-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 340px); align-items: center; gap: clamp(24px, 3vw, 56px); }
.story-row.reverse { grid-template-columns: minmax(200px, 340px) minmax(0, 1fr); }
.story-copy, .story-visual { min-width: 0; }
.story-copy { max-width: 480px; }
.story-copy h2 { margin: 12px 0 16px; font-size: 34px; line-height: 1.2; }
.story-copy p:not(.eyebrow) { margin-bottom: 25px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.story-visual { width: 100%; max-width: 340px; justify-self: center; }
.story-visual img, .solution-hero-image img { display: block; width: min(100%, 340px); height: auto; max-width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

.feature-story-band {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #6a2581;
  color: var(--white);
}

.feature-story-band .story-row {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 520px);
  align-items: center;
}

.feature-story-band .story-copy {
  max-width: 540px;
}

.feature-story-band .story-copy h2,
.feature-story-band .story-copy p:not(.eyebrow),
.feature-story-band .story-copy .eyebrow {
  color: var(--white);
}

.feature-story-band .story-copy p:not(.eyebrow) {
  color: rgba(255,255,255,.8);
}

.feature-story-band .story-visual {
  max-width: 520px;
}

.feature-story-band .story-visual img {
  width: min(100%, 520px);
}

.feature-story-band .button {
  color: var(--white);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.feature-cta-band {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-sky-paler);
}

.payroll-cta-band {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-sky-paler);
}

.feature-cta-band .cta-layout,
.payroll-cta-band .cta-layout {
  width: min(100%, 1200px);
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  align-items: center;
  justify-content: center;
}

.feature-cta-band .cta-copy,
.payroll-cta-band .cta-copy {
  max-width: 520px;
  justify-self: start;
  color: var(--navy);
}

.feature-cta-band .cta-copy h2,
.payroll-cta-band .cta-copy h2,
.feature-cta-band .cta-copy p,
.payroll-cta-band .cta-copy p {
  color: var(--navy);
}

.feature-cta-band .cta-visual,
.payroll-cta-band .cta-visual {
  justify-self: center;
  margin: 0;
  max-width: 500px;
}

.feature-cta-band .cta-visual img,
.payroll-cta-band .cta-visual img {
  transform: none;
}
.breadcrumb { padding-top: 138px; padding-bottom: 20px; color: var(--muted); font-size: 14px; }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb .current { color: var(--navy); font-weight: 600; }
.solution-hero { padding: 20px 0 0; text-align: center; background: var(--banner-bg); }
.solution-hero-inner { max-width: 720px; margin: 0 auto; padding: 30px 20px 58px; }
.solution-hero h1 { margin: 14px 0 18px; font-size: clamp(38px, 5vw, 58px); line-height: 1.1; color: var(--white); }
.solution-hero .eyebrow { color: var(--white); }
.solution-hero p:not(.eyebrow) { color: var(--white); font-size: 18px; }
.solution-hero .hero-actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.solution-hero-visual {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 0;
}

.solution-hero-visual img {
  display: block;
  width: min(100%, 720px);
  height: auto;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.quote-block { padding: 88px 0; text-align: center; background: var(--bg-lavender); }
.quote-block blockquote { max-width: 760px; margin: 0 auto 24px; font-family: var(--font-display); font-size: clamp(23px, 3vw, 32px); line-height: 1.35; }
.quote-person { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 14px; }
.quote-person strong { color: var(--navy); }

@media (max-width: 1023px) {
  .category-tabs { top: 68px; }
  .category-tabs-inner { padding-left: 20px; padding-right: 20px; }
  .category-section { scroll-margin-top: 132px; }
  .mega-col { margin-bottom: 16px; }
  .mega-promo { display: none; }
  .category-section { min-height: auto; padding: 90px 0; flex-direction: column; align-items: stretch; }
  .category-section .container, .category-section:nth-of-type(even) .container { padding-right: 20px; padding-left: 20px; }
  .category-visual, .category-section:nth-of-type(even) .category-visual { position: relative; top: auto; right: auto; left: auto; display: block; width: min(80vw, 560px); height: 340px; margin: 36px auto 0; transform: none; }
  .feature-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-row, .story-row.reverse { grid-template-columns: 1fr; flex-direction: column; gap: 24px; text-align: center; }
  .story-copy { max-width: 680px; }
  .story-visual { max-width: 100%; }
  .feature-story-band { min-height: auto; padding: 72px 0; }
  .feature-story-band .story-row { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .feature-story-band .story-copy { max-width: 680px; margin: 0 auto; }
  .feature-story-band .story-visual { width: min(100%, 520px); max-width: 100%; margin: 0 auto; }
  .feature-story-band .story-visual img { width: 100%; }
  .feature-cta-band,
  .payroll-cta-band { min-height: auto; padding: 72px 0; }
  .feature-cta-band .cta-layout,
  .payroll-cta-band .cta-layout { grid-template-columns: 1fr; gap: 28px; }
  .feature-cta-band .cta-copy,
  .payroll-cta-band .cta-copy { justify-self: center; text-align: center; max-width: 100%; }
  .feature-cta-band .cta-visual,
  .payroll-cta-band .cta-visual { max-width: 420px; }
}
@media (max-width: 640px) {
  .category-tabs { top: 68px; padding: 8px 0; }
  .category-tabs-inner { gap: 6px; padding-left: 16px; padding-right: 16px; }
  .category-tab { padding: 10px 14px; font-size: 13px; }
  .category-section { scroll-margin-top: 122px; }
  .features-hero { padding-top: 120px; }
  .features-hero .hero-copy { font-size: clamp(32px, 8vw, 46px); }
  .feature-card-grid { grid-template-columns: 1fr; }
  .category-section, .story-section { padding: 64px 0; }
  .category-head h2, .story-copy h2 { font-size: 30px; }
  .story-row, .story-row.reverse { gap: 18px; }
  .feature-story-band { padding: 56px 0; }
  .feature-story-band .story-row { gap: 20px; }
  .feature-story-band .story-copy h2 { font-size: 30px; }
  .feature-cta-band .cta-layout,
  .payroll-cta-band .cta-layout { gap: 20px; }
  .solution-hero-inner { padding-bottom: 42px; }
  .solution-hero .hero-actions { flex-direction: column; align-items: stretch; }
  .solution-hero .button { justify-content: center; }
  .breadcrumb { padding-top: 115px; }
}
