/* ============================================================
   MarketResearchly homepage
   Structure and rhythm modelled on a modern SaaS landing page:
   oversized upright serif headlines, generous whitespace, cream
   surface sections, one warm accent, pill buttons, marquees,
   a tabbed product tour, and a story slider.
   Tokens come from style.css (--mr-*).
   ============================================================ */

.hm { color: var(--mr-ink); font-family: var(--mr-sans); }
.hm .wrap { max-width: 1024px; margin: 0 auto; padding: 0 24px; }
.hm .wrap-wide { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---- Type scale ---- */
.hm .d-xl, .hm .d-lg, .hm .d-md, .hm .d-sm {
  font-family: var(--mr-display);
  font-weight: 400;
  color: var(--mr-ink);
  margin: 0;
  text-wrap: balance;
}
.hm .d-xl { font-size: 80px; line-height: 1; letter-spacing: -0.04em; }
.hm .d-lg { font-size: 60px; line-height: 1.04; letter-spacing: -0.03em; }
.hm .d-md { font-size: 44px; line-height: 1.1; letter-spacing: -0.03em; }
.hm .d-sm { font-size: 36px; line-height: 1.15; letter-spacing: -0.025em; }
.hm .lede { font-size: 20px; line-height: 1.5; color: var(--mr-ink-2); margin: 0; text-wrap: pretty; }
.hm .body { font-size: 16px; line-height: 1.6; color: var(--mr-ink-2); margin: 0; }
.hm .small { font-size: 13px; line-height: 1.5; color: var(--mr-ink-2); }
.hm .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mr-ink-2);
}
.hm .eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mr-accent); }
.hm .link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--mr-accent); font-size: 16px; font-weight: 500;
}
.hm .link:hover { color: #3B3470; }
.hm .link::after { content: '\2192'; transition: transform 0.15s ease; }
.hm .link:hover::after { transform: translateX(3px); }
.hm .center { text-align: center; }
.hm .stack-3 > * + * { margin-top: 12px; }
.hm .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Hero ---- */
.hm-hero { position: relative; padding: 96px 0 0; text-align: center; }
.hm-hero .d-xl { max-width: 880px; margin: 0 auto; }
.hm-hero .lede { max-width: 700px; margin: 24px auto 0; }
.hm-hero .btn-row { margin-top: 32px; }
.hm-hero-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(60% 45% at 50% 20%, rgba(86, 74, 153, 0.10), transparent 70%),
    radial-gradient(40% 40% at 50% 90%, rgba(237, 228, 217, 0.9), transparent 70%);
}
/* The product showcase is the hero screenshot. Pull it up under the buttons
   and strip its own heading; the stage, steps and tags stay. */
.hm-hero .sc-wrap { padding-top: 56px; padding-bottom: 32px; background: none; }
.hm-hero .sc-head { display: none; }

/* ---- Marquee (logos / categories) ---- */
.hm-marquee { padding: 8px 0 88px; }
.hm-marquee .label { text-align: center; font-size: 13px; font-weight: 500; color: var(--mr-ink-3); margin-bottom: 22px; }
.hm-track-clip {
  position: relative; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.hm-track {
  display: flex; gap: 12px; width: max-content;
  animation: hm-scroll 42s linear infinite;
}
.hm-track.reverse { animation-direction: reverse; }
.hm-track-clip:hover .hm-track { animation-play-state: paused; }
.hm-chip {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  height: 44px; padding: 0 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--mr-line-2);
  font-size: 14px; font-weight: 500; color: var(--mr-ink);
}
.hm-chip::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--mr-cream-2); }
.hm-chip.tone-a::before { background: var(--mr-brand); }
.hm-chip.tone-b::before { background: #1E1D28; }
.hm-chip.tone-c::before { background: #9A91C8; }
@keyframes hm-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Featured story ---- */
.hm-story { padding: 0 0 110px; }
.hm-story-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch;
}
.hm-story-card {
  border-radius: 20px; padding: 44px; background: var(--mr-cream);
  display: flex; flex-direction: column; gap: 18px;
}
.hm-story-card .d-sm { color: var(--mr-ink); }
.hm-story-quote {
  margin: 8px 0 0; padding-left: 18px; border-left: 2px solid var(--mr-accent);
  font-family: var(--mr-display); font-size: 22px; line-height: 1.35; letter-spacing: -0.01em; color: var(--mr-ink);
}
.hm-story-attr { font-size: 13px; color: var(--mr-ink-2); }
.hm-story-links { display: flex; gap: 22px; margin-top: auto; }
.hm-story-stats {
  border-radius: 20px; padding: 40px; background: var(--mr-dark); color: #fff;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; align-content: center;
}
.hm-story-stats .v { font-family: var(--mr-display); font-size: 56px; line-height: 1; letter-spacing: -0.03em; }
.hm-story-stats .l { margin-top: 8px; font-size: 13px; color: rgba(255, 255, 255, 0.62); }
.hm-story-stats .full { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 13px; color: rgba(255, 255, 255, 0.7); }

/* ---- Problem / Solution ---- */
.hm-ps { background: var(--mr-cream); padding: 80px 0 0; overflow: hidden; }
.hm-toggle {
  display: inline-flex; padding: 4px; border-radius: 999px; background: var(--mr-cream-2); margin: 0 auto 24px;
}
.hm-toggle button {
  border: 0; background: transparent; cursor: pointer; font-family: var(--mr-sans);
  font-size: 14px; font-weight: 500; color: var(--mr-ink-2);
  padding: 9px 18px; border-radius: 999px; transition: background 0.2s ease, color 0.2s ease;
}
.hm-toggle button.active { background: var(--mr-ink); color: #fff; }
.hm-ps-head { max-width: 760px; margin: 0 auto; }
.hm-ps-head .body { max-width: 620px; margin: 14px auto 0; font-size: 17px; }
.hm-ps-panel { display: none; }
.hm-ps-panel.active { display: block; }
.hm-ps-visual {
  margin: 56px auto 0; max-width: 900px;
  background: #fff; border-radius: 20px 20px 0 0; border: 1px solid var(--mr-line); border-bottom: 0;
  box-shadow: 0 -20px 60px -30px rgba(22, 22, 24, 0.25);
  overflow: hidden;
}
.hm-ps-visual .hd {
  display: grid; grid-template-columns: 1.1fr 1fr; padding: 16px 26px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mr-ink-3);
  border-bottom: 1px solid var(--mr-line); background: #FBF7F2;
}
.hm-ps-visual .row {
  display: grid; grid-template-columns: 1.1fr 1fr; padding: 16px 26px; gap: 20px;
  border-bottom: 1px solid var(--mr-line); font-size: 15px; line-height: 1.45;
}
.hm-ps-visual .row:last-child { border-bottom: 0; }
.hm-ps-visual .dim { font-weight: 600; color: var(--mr-ink); }
.hm-ps-visual .val { color: var(--mr-ink-2); display: flex; gap: 10px; align-items: flex-start; }
.hm-ps-visual .val::before { content: ''; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; margin-top: 2px; }
.hm-ps-visual[data-mode="problem"] .val::before { background: var(--mr-cream-2); box-shadow: inset 0 0 0 1px var(--mr-line-2); }
.hm-ps-visual[data-mode="solution"] .val { color: var(--mr-ink); }
.hm-ps-visual[data-mode="solution"] .val::before { background: var(--mr-accent); }
.hm-ps-visual .val span[data-them], .hm-ps-visual .val span[data-us] { display: none; }
.hm-ps-visual[data-mode="problem"] .val span[data-them] { display: inline; }
.hm-ps-visual[data-mode="solution"] .val span[data-us] { display: inline; }

/* ---- Platform ---- */
.hm-platform { padding: 130px 0 40px; }
.hm-platform .d-xl { max-width: 990px; margin: 0 auto 64px; }
.hm-diagram { position: relative; }
.hm-diagram .streams { display: grid; gap: 10px; margin-bottom: 26px; }
.hm-diagram .streams .hm-chip { height: 40px; font-size: 13.5px; }
.hm-core {
  position: relative; border-radius: 22px; padding: 26px; background: var(--mr-cream);
  border: 1px solid var(--mr-line);
}
.hm-core-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px;
}
.hm-core-title { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; }
.hm-core-title .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mr-accent); box-shadow: 0 0 0 5px rgba(204, 72, 45, 0.18); }
.hm-channels { display: flex; gap: 8px; }
.hm-channels span {
  font-size: 12.5px; font-weight: 500; color: var(--mr-ink-2); background: #fff;
  border: 1px solid var(--mr-line-2); border-radius: 999px; padding: 6px 12px;
}
.hm-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hm-tile {
  background: #fff; border: 1px solid var(--mr-line); border-radius: 16px; padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px; min-height: 172px;
}
.hm-tile .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--mr-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mr-display); font-size: 18px; }
.hm-tile .t { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.hm-tile .d { font-size: 13.5px; line-height: 1.5; color: var(--mr-ink-2); }
.hm-ops {
  margin-top: 14px; border-radius: 16px; padding: 18px 22px; background: #fff; border: 1px solid var(--mr-line);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.hm-ops .t { font-size: 14px; font-weight: 600; }
.hm-ops .s { font-size: 13px; color: var(--mr-ink-2); margin-top: 2px; }
.hm-ops .chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hm-ops .chips span { font-size: 12.5px; font-weight: 500; background: var(--mr-cream); border-radius: 999px; padding: 7px 12px; }

/* ---- Engine (dark) ---- */
.hm-engine { padding: 80px 0 130px; }
.hm-engine-card {
  border-radius: 24px; background: var(--mr-dark); color: #fff; padding: 64px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
}
.hm-engine-card .d-md { color: #fff; }
.hm-engine-card .body { color: rgba(255, 255, 255, 0.7); font-size: 17px; margin-top: 16px; max-width: 460px; }
.hm-engine-card .link { margin-top: 24px; }
.hm-engine-points { display: grid; gap: 14px; align-content: center; }
.hm-point {
  display: flex; gap: 16px; padding: 18px 20px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
}
.hm-point .n { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--mr-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.hm-point .t { font-size: 15.5px; font-weight: 600; }
.hm-point .d { font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.7); margin-top: 4px; }

/* ---- Tabbed product tour ---- */
.hm-tour { padding: 0 0 130px; }
.hm-tour-head { max-width: 900px; margin: 0 auto 56px; }
.hm-tour-head .body { font-size: 18px; max-width: 700px; margin: 16px auto 0; }
.hm-tabs { display: flex; border-bottom: 1px solid var(--mr-line-2); margin-bottom: 56px; }
.hm-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 20px 12px 22px; background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; font-family: var(--mr-sans); color: var(--mr-ink-2); transition: color 0.2s ease, border-color 0.2s ease;
}
.hm-tab .glyph {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--mr-cream); color: var(--mr-ink); font-family: var(--mr-display); font-size: 20px;
  transition: background 0.2s ease, color 0.2s ease;
}
.hm-tab .lbl { font-size: 16px; font-weight: 500; }
.hm-tab:hover { color: var(--mr-ink); }
.hm-tab.active { color: var(--mr-ink); border-bottom-color: var(--mr-accent); }
.hm-tab.active .glyph { background: var(--mr-accent); color: #fff; }
.hm-tab-panel { display: none; }
.hm-tab-panel.active { display: block; }
.hm-tour-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hm-tour-text .d-sm { margin-bottom: 18px; }
.hm-tour-text .body { font-size: 17px; }
.hm-tour-text .link { margin-top: 22px; }
.hm-callout {
  margin-top: 30px; padding: 22px 24px; border-radius: 14px; background: var(--mr-cream);
  font-family: var(--mr-display); font-size: 20px; line-height: 1.35; letter-spacing: -0.01em;
}
.hm-callout small { display: block; margin-top: 10px; font-family: var(--mr-sans); font-size: 12.5px; color: var(--mr-ink-2); letter-spacing: 0; }
.hm-tour-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.hm-tour-chips span { font-size: 13px; font-weight: 500; border: 1px solid var(--mr-line-2); border-radius: 999px; padding: 7px 13px; }
/* illustrative mini window on the right */
.hm-mock {
  border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--mr-line-2);
  box-shadow: 0 40px 90px -40px rgba(22, 22, 24, 0.35), 0 10px 26px -14px rgba(22, 22, 24, 0.14);
}
.hm-mock .bar { height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 16px; background: #FBF7F2; border-bottom: 1px solid var(--mr-line); }
.hm-mock .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--mr-cream-2); }
.hm-mock .bar span { margin-left: 10px; font-size: 11.5px; color: var(--mr-ink-3); }
.hm-mock .pane { padding: 22px; display: grid; gap: 12px; background: linear-gradient(180deg, #fff, #FBF7F2); }
.hm-mock .line { height: 12px; border-radius: 6px; background: var(--mr-cream-2); }
.hm-mock .line.w60 { width: 60%; } .hm-mock .line.w40 { width: 40%; } .hm-mock .line.w80 { width: 80%; }
.hm-mock .card { border: 1px solid var(--mr-line); border-radius: 12px; padding: 14px 16px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hm-mock .card b { font-size: 13.5px; font-weight: 600; }
.hm-mock .card em { font-style: normal; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(86, 74, 153, 0.12); color: #3B3470; }
.hm-mock .card em.ok { background: rgba(29, 158, 117, 0.12); color: #0F6E56; }
.hm-mock .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hm-mock .stat { border: 1px solid var(--mr-line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.hm-mock .stat .k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mr-ink-3); }
.hm-mock .stat .v { font-family: var(--mr-display); font-size: 30px; line-height: 1; margin-top: 8px; }
.hm-mock .btn { justify-self: start; border-radius: 999px; background: var(--mr-ink); color: #fff; font-size: 12.5px; font-weight: 500; padding: 9px 14px; }

/* ---- Stories / use cases ---- */
.hm-stories { padding: 96px 0; }
.hm-stories-head { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; margin-bottom: 44px; }
.hm-stories-head .body { font-size: 17px; margin-top: 16px; }
.hm-stories-head .link { margin-top: 20px; }
.hm-stories-ctl { display: flex; gap: 8px; justify-content: flex-end; align-self: end; }
.hm-stories-ctl button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--mr-line-2); background: #fff; cursor: pointer;
  font-size: 18px; color: var(--mr-ink); display: inline-flex; align-items: center; justify-content: center;
}
.hm-stories-ctl button:hover { background: var(--mr-cream); }
.hm-slider {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 0 18px; margin: 0 -24px; padding-left: 24px; padding-right: 24px;
  scrollbar-width: none;
}
.hm-slider::-webkit-scrollbar { display: none; }
.hm-story-tile {
  flex: 0 0 372px; scroll-snap-align: start; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--mr-line); background: #fff; display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hm-story-tile:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -36px rgba(22, 22, 24, 0.35); }
.hm-story-tile .art {
  height: 190px; position: relative; overflow: hidden;
  background: var(--mr-cream);
}
.hm-story-tile .art .big {
  position: absolute; left: 22px; bottom: -12px;
  font-family: var(--mr-display); font-size: 140px; line-height: 1; letter-spacing: -0.05em; color: rgba(22, 22, 24, 0.08);
}
.hm-story-tile .art .tag {
  position: absolute; top: 18px; left: 20px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mr-ink-2); background: #fff; border-radius: 999px; padding: 6px 11px;
}
.hm-story-tile.alt .art { background: var(--mr-cream-2); }
.hm-story-tile.dark .art { background: var(--mr-dark); }
.hm-story-tile.dark .art .big { color: rgba(255, 255, 255, 0.1); }
.hm-story-tile.dark .art .tag { background: rgba(255, 255, 255, 0.12); color: #fff; }
.hm-story-tile .txt { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hm-story-tile .t { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.hm-story-tile .d { font-size: 14px; line-height: 1.55; color: var(--mr-ink-2); }
.hm-story-tile .link { margin-top: auto; font-size: 14px; }

/* ---- Final CTA ---- */
.hm-cta { padding: 200px 0 80px; text-align: center; }
.hm-cta .d-lg { max-width: 720px; margin: 0 auto; }
.hm-cta .body { font-size: 18px; max-width: 560px; margin: 16px auto 0; }
.hm-cta .btn-row { margin-top: 32px; }

/* ---- Responsive (page is desktop-first; keep it readable below 1100px) ---- */
@media (max-width: 1100px) {
  .hm .d-xl { font-size: 60px; }
  .hm .d-lg { font-size: 48px; }
  .hm .d-md { font-size: 36px; }
  .hm-tiles { grid-template-columns: repeat(2, 1fr); }
  .hm-engine-card { grid-template-columns: 1fr; padding: 44px; }
  .hm-tour-grid, .hm-story-grid, .hm-stories-head { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-track { animation: none; }
  .hm-story-tile:hover { transform: none; }
}
