/* ============================================================
   AgentMesh Labs — layout (header, nav, hero, grid, footer)
   ============================================================ */

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand:hover { text-decoration: none; }

.brand-logo {
  width: auto;
  height: 20px;
  flex-shrink: 0;
}

.brand-logo svg { width: auto; height: 100%; }

.brand-badge {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 3px 9px;
}

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s ease, background-color .15s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
}

@media (max-width: 1024px) {
  .main-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a { padding: 14px 12px; border-radius: 10px; }

  .nav-toggle { display: inline-flex; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(64px, 9vw, 120px) var(--section-y);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-title {
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 540px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 7px 14px;
}

.chip svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- generic grid ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 32px);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (max-width: 1024px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding-block: 48px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand { color: var(--text-2); font-size: 14px; max-width: 300px; }

.footer-brand .brand-logo { margin-bottom: 16px; }

.footer-col h4 {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text);
  padding-block: 6px;
}

.footer-col a:hover { color: var(--accent); text-decoration: none; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-2);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- breadcrumbs / page header ---------- */

.page-head {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: 8px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
}

.breadcrumbs a:hover { color: var(--accent); }

.breadcrumbs .sep { opacity: .5; }
