/* ==========================================================================
   Merehead — Home page (public/home.php)
   Loaded after styles.css. Uses its tokens (--mh-*) and components (mh-*);
   only the home-specific pieces live here, prefixed with "hp-".
   ========================================================================== */

/* ---------- 01 Hero ---------- */
.hp-hero { padding-block: 80px 88px; }
.hp-hero__in { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.hp-hero .mh-hero__copy { flex: 1 1 480px; }
.hp-hero__visual { flex: 1 1 560px; min-width: 0; }

/* Product screen (illustrative admin panel) */
.hp-app { background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: 14px; box-shadow: 0 2px 4px rgba(16,24,40,0.04), 0 24px 48px -12px rgba(16,24,40,0.14); overflow: hidden; }
.hp-app__bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; background: var(--mh-surface-subtle); border-bottom: 1px solid var(--mh-border); }
.hp-app__dots { display: flex; gap: 6px; }
.hp-app__dots span { width: 10px; height: 10px; border-radius: 999px; background: var(--mh-border-control); }
.hp-app__url { flex: 1; display: flex; justify-content: center; }
.hp-app__url span { font-size: 12px; color: var(--mh-text-muted); background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: 6px; padding: 3px 12px; }
.hp-app__body { display: flex; min-height: 380px; }
.hp-app__side { width: 56px; flex: none; border-right: 1px solid var(--mh-border); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0; }
.hp-app__side span { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--mh-border-hover); }
.hp-app__side span.is-active { background: var(--mh-navy); color: var(--mh-on-navy); }
.hp-app__side svg { width: 16px; height: 16px; }
.hp-app__main { flex: 1; min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--mh-surface-muted); }
.hp-app__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hp-app__top strong { font-size: 15px; font-weight: 600; }
.hp-app__top small { font-size: 12px; color: var(--mh-text-muted); }
.hp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hp-kpi, .hp-chart, .hp-tx { background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: 10px; }
.hp-kpi { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.hp-kpi span, .hp-chart > span { font-size: 12px; color: var(--mh-text-muted); }
.hp-kpi strong { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.hp-kpi--warn strong { color: var(--mh-amber); }
.hp-chart { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.hp-chart__bars { height: 72px; display: flex; align-items: flex-end; gap: 6px; }
.hp-chart__bars i { flex: 1; background: var(--mh-blue-tint-strong); border-radius: 3px; }
.hp-chart__bars i:last-child { background: var(--mh-blue); }
.hp-tx { overflow: hidden; }
.hp-tx li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--mh-border-subtle); font-size: 13px; }
.hp-tx li:last-child { border-bottom: 0; }
.hp-chip--amber { background: var(--mh-amber-tint); color: var(--mh-amber-deep); }
.hp-chip--green { background: var(--mh-green-tint); color: var(--mh-green-deep); }

.hp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--mh-border); }
.hp-stats div { display: flex; flex-direction: column; gap: 6px; }
.hp-stats b { font-size: 36px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.hp-stats span { font-size: 14px; line-height: 1.5; color: var(--mh-text-body); }

/* ---------- 02 Track record ---------- */
.hp-tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px 80px; }
.hp-tr__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hp-tr__copy > p { font-size: 16px; line-height: 1.65; color: var(--mh-text-body); max-width: 560px; }
.hp-facts { display: flex; flex-wrap: wrap; gap: 16px; width: 100%; padding-top: 8px; }
.hp-fact { flex: 1 1 220px; display: flex; align-items: center; gap: 16px; background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: 14px; padding: 20px 24px; }
.hp-fact b { display: block; font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.hp-fact span { font-size: 14px; line-height: 1.5; color: var(--mh-text-body); }
.hp-delivered { flex: 1 1 440px; min-width: 0; background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: 16px; box-shadow: var(--mh-shadow-elevated); padding: 8px 28px; }
.hp-delivered > .mh-overline { display: block; padding: 20px 0 12px; }
.hp-delivered li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--mh-border-subtle); }
.hp-delivered li:last-child { padding-bottom: 20px; }
.hp-delivered strong { display: block; font-size: 16px; font-weight: 600; }
.hp-delivered li span:last-child span { font-size: 14px; color: var(--mh-text-body); }
.hp-partners { display: flex; flex-direction: column; gap: 20px; padding-top: 32px; border-top: 1px solid var(--mh-border); }
.hp-partners ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.hp-partners li { height: 80px; display: flex; align-items: center; justify-content: center; padding: 0 20px; background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: 12px; }
.hp-partners img { height: 26px; width: auto; max-width: 100%; object-fit: contain; display: block; }

/* ---------- 03 Services ---------- */
.hp-services { border-top: 1px solid var(--mh-border-subtle); }
.hp-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hp-panel { border-radius: 16px; padding: 40px; display: flex; flex-direction: column; background: var(--mh-surface-muted); border: 1px solid var(--mh-border-subtle); }
.hp-panel--navy { background: var(--mh-navy); border-color: var(--mh-navy); color: var(--mh-on-navy); }
.hp-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 24px; }
.hp-panel__head h3 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.hp-panel__head span { font-size: 13px; font-weight: 600; color: var(--mh-blue); }
.hp-panel--navy .hp-panel__head span { color: var(--mh-accent); }
.hp-svc { display: flex; gap: 18px; align-items: flex-start; padding: 24px 0; border-top: 1px solid var(--mh-border); }
.hp-svc:last-child { padding-bottom: 0; }
.hp-svc h4 { margin: 0 0 6px; font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.hp-svc p { font-size: 15px; line-height: 1.6; color: var(--mh-text-body); }
.hp-panel--navy .hp-svc { border-color: rgba(255,255,255,0.12); }
.hp-panel--navy .hp-svc p { color: var(--mh-on-navy-body); }
.hp-tile--on-navy { background: rgba(255,212,59,0.14); color: var(--mh-accent); }
.hp-cta-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: -16px; padding-top: 24px; border-top: 1px solid var(--mh-border); }
.hp-cta-line p { font-size: 16px; line-height: 1.5; color: var(--mh-text-body); }
.hp-cta-line b { color: var(--mh-ink); font-weight: 600; }

/* ---------- 04 Solutions ---------- */
.hp-problem { font-size: 14px; line-height: 1.55; color: var(--mh-text-secondary); }
.hp-problem b { color: var(--mh-ink); font-weight: 600; }
.hp-card-link { padding-top: 16px; border-top: 1px solid var(--mh-fill-chip); }

/* ---------- 05 Case studies ---------- */
.hp-case { padding-block: 112px 120px; background: var(--mh-surface); }
.hp-case--navy { background: var(--mh-navy); color: var(--mh-on-navy); }
.hp-case--muted { background: var(--mh-surface-muted); }
.hp-case__row { display: flex; flex-wrap: wrap; align-items: center; gap: 72px; }
.hp-case__media { flex: 1 1 560px; min-width: 0; }
.hp-case__media img { width: 100%; height: auto; display: block; border-radius: 16px; }
.hp-case--navy .hp-case__media img { border: 1px solid rgba(255,255,255,0.12); }
.hp-case__text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hp-case__meta { display: flex; align-items: center; gap: 14px; }
.hp-case__meta > span:first-child { font-size: 16px; font-weight: 500; color: var(--mh-text-muted); }
.hp-case--navy .hp-case__meta > span:first-child { color: var(--mh-on-navy-muted); }
.hp-case--navy .mh-eyebrow { color: var(--mh-on-navy-accent); background: rgba(199,210,254,0.12); }
.hp-case--navy .mh-eyebrow::before { background: var(--mh-accent); }
.hp-case--muted .mh-eyebrow { background: var(--mh-blue-tint-strong); }
.hp-case__title { font-size: 40px; line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
.hp-dl { margin: 0; width: 100%; border-top: 1px solid var(--mh-border); }
.hp-dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--mh-border); }
.hp-dl dt { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mh-text-muted); padding-top: 3px; }
.hp-dl dd { margin: 0; font-size: 16px; line-height: 1.6; color: var(--mh-text-strong); }
.hp-case--navy .hp-dl, .hp-case--navy .hp-dl > div { border-color: rgba(255,255,255,0.12); }
.hp-case--navy .hp-dl dt { color: var(--mh-on-navy-muted); }
.hp-case--navy .hp-dl dd { color: var(--mh-on-navy-body); }

/* ---------- 06 Engineering ---------- */
.hp-eng { padding: 16px 16px 28px; gap: 20px; }
.hp-eng__body { padding: 0 12px; display: flex; flex-direction: column; gap: 12px; }
.hp-eng__body .mh-h3 { font-size: 20px; }
.hp-vis { background: var(--mh-surface-muted); border: 1px solid var(--mh-border-subtle); border-radius: 12px; padding: 24px; min-height: 196px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.hp-bar { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 13px; color: var(--mh-text-strong); }
.hp-bar i { height: 8px; background: var(--mh-border); border-radius: 999px; display: flex; overflow: hidden; }
.hp-bar b { display: block; height: 100%; background: var(--mh-blue); border-radius: 999px; }
.hp-bar--range b { background: var(--mh-amber); border-radius: 999px 0 0 999px; }
.hp-bar--range s { display: block; height: 100%; background: #FCD9B0; text-decoration: none; }
.hp-axis { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; font-size: 12px; color: var(--mh-text-muted); }
.hp-axis span:last-child { display: flex; justify-content: space-between; }
.hp-vis__note { font-size: 13px; font-weight: 600; color: var(--mh-blue-deep); }
.hp-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; font-size: 13px; color: var(--mh-text-secondary); }
.hp-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--mh-text-strong); background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: 8px; padding: 8px 12px; }
.hp-step--done { background: var(--mh-blue-tint); border-color: var(--mh-blue-line); }
.hp-step--done > span:first-child { color: var(--mh-blue-deep); font-weight: 600; }
.hp-big { display: flex; align-items: baseline; gap: 10px; }
.hp-big b { font-size: 40px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.hp-big span { font-size: 14px; color: var(--mh-text-secondary); }
.hp-squares { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-squares i { width: 26px; height: 26px; border-radius: 6px; background: var(--mh-blue-tint-strong); border: 1px solid var(--mh-blue-line); }
.hp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--mh-text-secondary); }
.hp-legend b { color: var(--mh-ink); font-weight: 600; }

/* ---------- 07 Industries ---------- */
.hp-ind .mh-overline { margin-top: 4px; }

/* ---------- 08 Why Merehead ---------- */
.hp-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "a b b" "a c d"; gap: 16px; }
.hp-why__a { grid-area: a; } .hp-why__b { grid-area: b; } .hp-why__c { grid-area: c; } .hp-why__d { grid-area: d; }
.hp-wy { border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); }
.hp-wy h3 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; color: var(--mh-on-navy); }
.hp-wy p { font-size: 15px; line-height: 1.6; color: var(--mh-on-navy-body); }
.hp-wy__num { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--mh-accent); }
.hp-wy__grow { flex-grow: 1; }
.hp-wy__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-wy__chips li { font-size: 13px; color: var(--mh-on-navy-strong); border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 5px 12px; }
.hp-wy__label { display: block; padding-bottom: 6px; color: var(--mh-on-navy-muted); }
.hp-wy__row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.hp-wy__row:last-child { padding-bottom: 0; }
.hp-wy__row b { flex: none; width: 28px; height: 28px; border-radius: 8px; background: rgba(255,212,59,0.14); color: var(--mh-accent); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.hp-wy__row span { font-size: 15px; line-height: 1.5; color: var(--mh-on-navy); font-weight: 500; padding-top: 3px; }
.hp-wy__split { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.hp-wy__split > div { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hp-wy__panel { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 20px 24px; }
.hp-track { position: relative; height: 6px; margin: 30px 0; border-radius: 999px; background: linear-gradient(90deg, var(--mh-accent), rgba(255,212,59,0.25)); }
.hp-track__dot { position: absolute; top: -5px; width: 16px; height: 16px; border-radius: 999px; background: var(--mh-navy); border: 2px solid var(--mh-accent); }
.hp-track__lbl { position: absolute; top: -24px; font-size: 12px; color: var(--mh-on-navy-muted); white-space: nowrap; }
.hp-track__cap { position: absolute; left: 0; top: 18px; font-size: 12px; color: var(--mh-on-navy-body); white-space: nowrap; }
.hp-wy__check { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 14px; color: var(--mh-on-navy); }
.hp-wy--accent { background: var(--mh-accent); border-color: var(--mh-accent); }
.hp-wy--accent .hp-wy__num, .hp-wy--accent h3 { color: var(--mh-ink); }
.hp-wy--accent p { color: #27272A; }
.hp-wy--accent .mh-btn { align-self: flex-start; }

/* ---------- 09 Process ---------- */
.hp-steps .mh-h3 { font-size: 17px; }
.hp-steps .mh-text { font-size: 14px; }
.hp-models__title { font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }

/* ---------- 10 Testimonials ---------- */
.hp-avatar { width: 48px; height: 48px; flex: none; border-radius: 999px; object-fit: cover; }

/* ---------- 11 Blog ---------- */
.hp-post { padding: 12px 12px 24px; gap: 16px; text-decoration: none; color: inherit; }
.hp-post__cover { height: 148px; border-radius: 10px; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; padding: 16px; background: var(--mh-blue-tint); color: var(--mh-blue); position: relative; }
.hp-post__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-post__cover svg { width: 28px; height: 28px; position: relative; }
.hp-post__cover .mh-chip { position: relative; background: var(--mh-surface); color: var(--mh-blue-deep); }
.hp-post__body { padding: 8px 12px 0; display: flex; flex-direction: column; gap: 16px; flex-grow: 1; }
.hp-post__body .mh-h3 { font-size: 17px; }
.hp-post__more { align-self: flex-start; font-size: 14px; }
.hp-post--violet .hp-post__cover { background: var(--mh-violet-tint); color: var(--mh-violet); }
.hp-post--amber .hp-post__cover { background: var(--mh-amber-tint); color: var(--mh-amber); }
.hp-post--teal .hp-post__cover { background: var(--mh-teal-tint); color: var(--mh-teal); }

/* ---------- 12 Contact ---------- */
.hp-direct { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--mh-border); align-self: stretch; }
.hp-direct__links { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-direct__links svg { width: 18px; height: 18px; }
.hp-direct address { font-style: normal; font-size: 13px; line-height: 1.5; color: var(--mh-text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-why { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "b b" "a c" "a d"; }
}
@media (max-width: 900px) {
  .hp-bento { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .hp-partners ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hp-hero, .hp-case { padding-block: 72px; }
  .hp-hero__in { gap: 48px; }
  .hp-stats { margin-top: 40px; row-gap: 28px; }
  .hp-app__side { display: none; }
  .hp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-partners ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-panel { padding: 28px 20px; }
  .hp-case__row { gap: 40px; }
  .hp-case__title { font-size: 30px; }
  .hp-dl > div { grid-template-columns: 1fr; gap: 6px; }
  .hp-bar, .hp-axis { grid-template-columns: 96px minmax(0, 1fr); }
  .hp-why { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d"; }
  .hp-wy { padding: 24px 20px; }
}
