/* =========================================================================
   HMI Studio — layout.css
   Site chrome: header/nav, hero, sections, footer, responsive
   ========================================================================= */

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--ink-100);
  box-shadow: var(--shadow-sm);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink-900); font-size: 1.12rem; }
.brand:hover { color: var(--ink-900); }
.brand img { width: 34px; height: 34px; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.nav-links a {
  color: var(--ink-600);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { background: var(--brand-50); color: var(--brand-700); }
.nav-links a.is-active { color: var(--brand-700); background: var(--brand-50); }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink-700); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(6px); }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: rotate(45deg); }
.nav-toggle.is-open span::after  { transform: rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 520px at 85% -10%, rgba(59,130,246,.18), transparent 60%),
    radial-gradient(900px 480px at 5% 10%, rgba(245,158,11,.12), transparent 55%),
    linear-gradient(180deg, #f3f7fd, var(--bg));
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(900px 500px at 70% 0%, #000, transparent 75%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
.hero-copy .badge-row { margin-bottom: 20px; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lead { font-size: 1.18rem; color: var(--ink-500); max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; color: var(--ink-400); font-size: .92rem; }
.hero-meta b { color: var(--ink-700); }

/* ---------------- Logo cloud / trust ---------------- */
.trust { border-top: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); background: #fff; }
.trust .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 40px; padding: 22px 24px; }
.trust span { color: var(--ink-400); font-size: .92rem; font-weight: 600; letter-spacing: .02em; }

/* ---------------- Feature blocks ---------------- */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff; margin-bottom: 18px;
  box-shadow: 0 10px 22px -10px rgba(37,99,235,.6);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--ink-500); margin: 0; font-size: .96rem; }

/* ---------------- Showcase / split ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split--reverse .split-media { order: -1; }
@media (max-width: 920px) {
  .split, .split--reverse { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split-media { order: 0; }
}
.checklist li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px dashed var(--ink-100);
  color: var(--ink-600);
}
.checklist li:last-child { border-bottom: 0; }
.checklist svg { flex: none; width: 22px; height: 22px; color: var(--brand-600); margin-top: 2px; }

/* ---------------- Use cases ---------------- */
.usecase {
  border-radius: var(--radius-lg);
  padding: 26px;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.usecase::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.28));
}
.usecase > * { position: relative; z-index: 1; }
.usecase h3 { color: #fff; margin-bottom: 6px; }
.usecase p { margin: 0; color: rgba(255,255,255,.85); font-size: .94rem; }
.uc-1 { background: linear-gradient(135deg, #0f766e, #0ea5e9); }
.uc-2 { background: linear-gradient(135deg, #4338ca, #2563eb); }
.uc-3 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.uc-4 { background: linear-gradient(135deg, #7c2d12, #db2777); }

/* ---------------- Stats ---------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-size: 2.4rem; font-weight: 800; color: var(--brand-700); line-height: 1; }
.stat .lbl { color: var(--ink-500); font-size: .95rem; margin-top: 6px; }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- CTA band ---------------- */
.cta-band {
  background: linear-gradient(120deg, var(--brand-700), var(--brand-500) 60%, var(--accent-500));
  border-radius: var(--radius-xl);
  color: #fff;
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink-900); color: var(--ink-200); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; margin-bottom: 16px; }
.site-footer a { color: var(--ink-300); display: block; padding: 5px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand p { color: var(--ink-300); font-size: .94rem; max-width: 320px; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  color: var(--ink-400); font-size: .88rem;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------- Responsive nav ---------------- */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    padding: 14px 18px 22px;
    border-bottom: 1px solid var(--ink-100);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: transform .25s var(--ease), opacity .25s var(--ease);
  }
  .nav-links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; }
  .nav-actions .btn--primary { display: none; }
}

/* ---------------- Page hero (sub pages) ---------------- */
.page-hero {
  background: linear-gradient(180deg, #eef4fc, var(--bg));
  border-bottom: 1px solid var(--ink-100);
  padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px);
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { color: var(--ink-500); max-width: 640px; font-size: 1.1rem; margin: 0; }
.breadcrumbs { font-size: .9rem; color: var(--ink-400); margin-bottom: 14px; }
.breadcrumbs a { color: var(--ink-500); }
.breadcrumbs a:hover { color: var(--brand-600); }
