/* Do by Businlog: home page (D3). Loaded only by index.html, after site.css + brand.css.
   Prefix "hm-". Light theme only. Mobile first: everything fits 360px with no sideways scroll.
   Blocks: .hm-hero (demo in a browser frame + phone)  .hm-built (solutions strip)  .hm-tour (tabs)
           .hm-facts (stat band)  .hm-addr (example workspaces)  .hm-cmp (compare teaser)  .hm-ask (contact nudge) */

/* ---------- hero ---------- */
.hm-hero { padding-bottom: clamp(40px, 6vw, 72px); }
.hm-hero-visual { position: relative; margin: clamp(36px, 5.5vw, 64px) auto 0; max-width: 1080px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: end; }
.hm-hero-main { min-width: 0; }
.hm-hero-phone { display: none; margin: 0; }
@media (min-width: 1020px) {
  .hm-hero-visual { grid-template-columns: minmax(0, 1fr) 210px; }
  .hm-hero-phone { display: block; margin-bottom: -28px; transform: rotate(2deg); }
}

/* "Have a go" note above a live demo (an honest "this is an example" label, always visible) */
.hm-try { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 0 0 14px; color: var(--ink-2); font-size: .92rem; line-height: 1.45; text-align: center; }
.hm-try b { color: var(--ink); }
.hm-panel-media .hm-try { justify-content: flex-start; text-align: left; }

/* browser frame that holds a live demo (same chrome as ui.browser) */
.hm-frame { margin: 0; }
.hm-frame-body { position: relative; background: var(--surface); min-width: 0; }
.hm-frame-body > * { max-width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .hm-hero-main { animation: hm-lift .9s cubic-bezier(.2, .7, .2, 1) both .08s; }
  .hm-hero-phone { animation: hm-lift-tilt 1s cubic-bezier(.2, .7, .2, 1) both .3s; }
  @keyframes hm-lift { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes hm-lift-tilt { from { opacity: 0; transform: translateY(32px) rotate(2deg); } to { opacity: 1; transform: rotate(2deg); } }
}

/* ---------- built for: three solution links ---------- */
.hm-built { padding: clamp(24px, 4vw, 40px) 0 clamp(8px, 2vw, 16px); }
.hm-built-title { font: 600 .82rem/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: center; margin: 0 0 18px; }
.hm-built-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 860px) { .hm-built-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.hm-built-list > li { min-width: 0; display: flex; }
.hm-built-card { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--ui-shadow-1, var(--shadow-sm)); color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
.hm-built-card:hover { transform: translateY(-2px); border-color: rgba(255, 138, 0, .38); box-shadow: var(--ui-shadow-3, var(--shadow)); }
.hm-built-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r); }
.hm-built-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hm-built-text b { font: 650 1.02rem/1.3 var(--f-display); letter-spacing: -.01em; }
.hm-built-text > span { color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.hm-built-go { flex: none; color: var(--accent-ink); transition: transform .2s; }
.hm-built-card:hover .hm-built-go { transform: translateX(3px); }

/* ---------- product tour (tabs) ---------- */
.hm-tour { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(48px, 7vw, 88px); }
.hm-tablist { display: none; }
.js .hm-tablist {
  display: flex; gap: 6px; width: max-content; max-width: 100%; margin: 0 auto clamp(24px, 4vw, 40px); padding: 6px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--ui-shadow-2, var(--shadow));
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding: 0 16px;
}
.js .hm-tablist::-webkit-scrollbar { display: none; }
.hm-tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); font: 600 .95rem/1 var(--f-body); cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.hm-tab svg { color: var(--ink-3); transition: color .2s; }
.hm-tab:hover { color: var(--ink); background: var(--surface-2); }
.hm-tab[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); box-shadow: 0 8px 18px -8px rgba(91, 77, 255, .6); }
.hm-tab[aria-selected="true"] svg { color: #fff; }
.hm-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 999px; }
@media (max-width: 560px) { .hm-tab { padding: 0 13px; font-size: .9rem; gap: 6px; } }
@media (max-width: 440px) {
  /* five tabs fit a 360px phone without scrolling: drop the icons, tighten the pills */
  .js .hm-tablist { gap: 0; padding: 4px; width: 100%; justify-content: space-between; }
  .hm-tab { padding: 0 10px; font-size: .86rem; }
  .hm-tab svg { display: none; }
}

/* stop a flash of every panel before the tab script runs */
.js .hm-tabs:not(.is-tabs) .hm-panel + .hm-panel { display: none; }

.hm-panel {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(20px, 3.5vw, 40px); border-radius: var(--ui-r-xl, 28px);
  background: linear-gradient(160deg, #fff7ea 0%, #ffffff 55%); border: 1px solid rgba(255, 176, 32, .24); box-shadow: var(--ui-shadow-2, var(--shadow));
}
.hm-panel + .hm-panel { margin-top: 24px; }            /* no-JS: panels stack */
.is-tabs .hm-panel + .hm-panel { margin-top: 0; }
.hm-panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
@media (min-width: 960px) { .hm-panel { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.hm-panel-copy { min-width: 0; }
.hm-panel-title { font: 700 clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem)/1.15 var(--f-display); letter-spacing: -.03em; margin: 0 0 12px; }
.hm-panel-lead { color: var(--ink-2); font-size: 1.04rem; line-height: 1.6; margin: 0 0 20px; }
.hm-panel-copy .ui-checks { margin-bottom: 22px; }
.hm-panel-media { min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .is-tabs .hm-panel:not([hidden]) { animation: hm-fade .35s ease both; }
  @keyframes hm-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---------- facts band ---------- */
.hm-facts { padding: clamp(8px, 2vw, 16px) 0 clamp(64px, 9vw, 112px); }
.hm-facts-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 18px; }
.hm-facts-head .ui-h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin: 0; }
.hm-facts-head p { margin: 0; color: var(--ink-3); font-size: .95rem; }
.hm-stats .ui-stat-value { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem); }
@media (min-width: 640px) and (max-width: 899px) {
  /* 3 across on tablets: redraw the band's dividers for a 3 x 2 grid */
  .hm-stats.ui-stats--band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-stats.ui-stats--band > .ui-stat { border: 0; }
  .hm-stats.ui-stats--band > .ui-stat:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
  .hm-stats.ui-stats--band > .ui-stat:nth-child(n+4) { border-top: 1px solid var(--line); }
}

/* ---------- security teaser ---------- */
#private .ui-checks { margin: 22px 0 24px; }
.hm-addr { min-width: 0; display: grid; gap: 12px; justify-items: start; }
.hm-addr .addr-demo { width: 100%; }

/* ---------- compare teaser ---------- */
.hm-cmp { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; }
@media (min-width: 560px) { .hm-cmp { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } }
.hm-cmp-col { min-width: 0; border-radius: var(--ui-r-lg, 22px); padding: 20px; }
.hm-cmp-label { margin: 0 0 12px; font: 650 .76rem/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.hm-cmp-before { background: rgba(255, 255, 255, .6); border: 1px dashed var(--line-2); }
.hm-cmp-before .hm-cmp-label { color: var(--ink-3); }
.hm-cmp-before ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hm-cmp-before li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; line-height: 1.3; }
.hm-cmp-before li svg { flex: none; color: var(--ink-3); }
.hm-cmp-before li:nth-child(odd) { transform: rotate(-.6deg); }
.hm-cmp-before li:nth-child(even) { transform: rotate(.5deg) translateX(4px); }
.hm-cmp-arrow { justify-self: center; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #12b886, #0ea5a4); box-shadow: 0 8px 18px -8px rgba(14, 165, 164, .6); }
@media (max-width: 559px) { .hm-cmp-arrow svg { transform: rotate(90deg); } }
.hm-cmp-after { background: var(--surface); border: 1px solid rgba(18, 184, 134, .3); box-shadow: var(--ui-shadow-3, var(--shadow-lg)); }
.hm-cmp-after .hm-cmp-label { color: var(--ui-mint-ink, #04694a); }
.hm-cmp-one { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.hm-cmp-one svg { flex: none; }
.hm-cmp-one > span { display: grid; gap: 2px; min-width: 0; }
.hm-cmp-one b { font: 700 1.08rem/1.25 var(--f-display); letter-spacing: -.015em; }
.hm-cmp-one > span > span { color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.hm-cmp-price { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.hm-cmp-price b { font: 750 1.5rem/1 var(--f-display); letter-spacing: -.03em; color: var(--ink); margin-right: 4px; }

/* ---------- pricing teaser ---------- */
.hm-price-kicker { margin-bottom: 4px; }
.hm-reassure { margin-top: 22px; }
#pricing .ui-btn-row { margin-top: 24px; }

/* ---------- FAQ + human contact nudge ---------- */
.hm-ask { max-width: 820px; margin: 22px auto 0; display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--r); background: var(--surface); border: 1px dashed var(--line-2); }
.hm-ask p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.hm-ask b { color: var(--ink); }
@media (max-width: 420px) { .hm-ask { align-items: flex-start; } }

/* ---------- final CTA ---------- */
.hm-final { padding-top: 0; }
.hm-faq + .hm-final { padding-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .hm-built-card, .hm-built-card:hover, .hm-built-card:hover .hm-built-go { transform: none; transition: none; }
}

/* equal-height feature cards (each card sits in a reveal wrapper) */
.hm-cards > * { display: flex; }
.hm-cards > * > .ui-card { flex: 1; }
.hm-unit { font-size: .42em; letter-spacing: 0; font-weight: 650; margin-left: .2em; }
/* plain sections that follow each other share one gap instead of two */
.hm-pricing + .hm-faq, .dir-home + .hm-faq { padding-top: clamp(16px, 3vw, 32px); }
