/* ============================================================
   MERIDIAN — Landing page styles
   Built on Modern Tiles design tokens (design-tokens.css)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--fg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- layout primitives ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 940px; margin: 0 auto; padding: 0 32px; }
section { position: relative; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--brand-terra-600);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--brand-terra-600);
  border-radius: 2px;
}
.eyebrow.on-dark { color: var(--brand-terra-400); }
.eyebrow.on-dark::before { background: var(--brand-terra-400); }
.eyebrow.centered { justify-content: center; }
.eyebrow.centered::before { display: none; }

h1,h2,h3,h4 { margin: 0; }
.section-title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-4xl);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
}
.section-sub {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--fg-2);
  max-width: 640px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,34,50,.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-left { display: flex; align-items: center; gap: 44px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: rgba(226,238,245,.72);
  transition: color var(--duration-fast) var(--ease-out);
}
.nav-links a:hover { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* ---- logo ---- */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 9px;
}
.logo-word {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo-word .sub {
  display: block;
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.18em;
  margin-top: 3px;
  opacity: .62;
}
.logo.on-dark .logo-word { color: #fff; }
.logo.on-light .logo-word { color: var(--brand-slate-800); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  border: 1.5px solid transparent;
  transition: transform var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-sm { height: 40px; padding: 0 16px; font-size: var(--text-base); }
.btn-accent {
  background: var(--brand-terra-600); color: #fff;
  box-shadow: 0 4px 14px rgba(197,98,44,.34);
}
.btn-accent:hover { background: var(--brand-terra-700); box-shadow: 0 6px 20px rgba(197,98,44,.42); }
.btn-primary { background: var(--brand-slate-800); color: #fff; }
.btn-primary:hover { background: var(--brand-slate-700); }
.btn-ghost-light {
  background: rgba(255,255,255,.07); color: #fff;
  border-color: rgba(255,255,255,.18);
}
.btn-ghost-light:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.32); }
.btn-outline {
  background: #fff; color: var(--brand-slate-800);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--brand-slate-700); background: var(--brand-slate-50); }
.btn .ico { width: 18px; height: 18px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--brand-slate-900);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.hero::before {
  /* tile-grid brand texture */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 70% 0%, #000 25%, transparent 78%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; top: -180px; right: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(197,98,44,.30), transparent 62%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 80px 32px 96px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 56px;
  align-items: center;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: rgba(226,238,245,.92);
  margin-bottom: 26px;
}
.hero-pill .tag {
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--brand-terra-600); color: #fff;
  padding: 3px 8px; border-radius: var(--radius-full);
}
.hero h1 {
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--brand-terra-500); }
.hero-sub {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: rgba(226,238,245,.78);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }
.hero-stats {
  display: flex; gap: 36px; flex-wrap: wrap;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.hero-stat .num {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
}
.hero-stat .num .unit { color: var(--brand-terra-500); }
.hero-stat .lbl {
  font-size: var(--text-base);
  color: rgba(226,238,245,.6);
  margin-top: 7px;
}

/* ---- hero product window ---- */
.app-window {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(8,18,28,.55), 0 0 0 1px rgba(255,255,255,.06);
  overflow: hidden;
}
.app-chrome {
  height: 38px;
  background: var(--brand-slate-50);
  border-bottom: 1px solid var(--border-default);
  display: flex; align-items: center; gap: 7px;
  padding: 0 14px;
}
.app-dot { width: 11px; height: 11px; border-radius: 50%; }
.app-url {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 3px 12px;
}
.hero-window { transform: perspective(2400px) rotateY(-4deg); transform-origin: right center; }

/* ============================================================
   APP MOCKUP INTERNALS (shared by hero + showcase)
   ============================================================ */
.erp { display: grid; grid-template-columns: 168px 1fr; min-height: 360px; background: var(--bg-base); }
.erp-side { background: var(--brand-slate-800); padding: 14px 12px; }
.erp-side-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 14px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.erp-side-logo .m { width: 22px; height: 22px; border-radius: 6px; }
.erp-side-logo span { color:#fff; font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.erp-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border-radius: 7px;
  font-size: 12.5px; font-weight: 500;
  color: rgba(226,238,245,.66);
  margin-bottom: 2px;
}
.erp-nav-item svg { width: 15px; height: 15px; stroke-width: 1.6; }
.erp-nav-item.active { background: rgba(255,255,255,.13); color: #fff; }
.erp-main { padding: 16px; overflow: hidden; }
.erp-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.erp-h .t { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--fg-1); line-height: 1.25; }
.erp-h .d { font-size: 11px; color: var(--fg-3); margin-top: 3px; line-height: 1.3; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 12px; }
.kpi {
  background: #fff; border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 11px 11px;
  box-shadow: var(--shadow-xs); overflow: hidden; min-width: 0;
}
.kpi.accent { border-top: 3px solid var(--brand-terra-600); }
.kpi .k-l { font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-v { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--fg-1); letter-spacing: -.02em; margin-top: 5px; line-height: 1; white-space: nowrap; }
.kpi .k-d { display:inline-flex; align-items:center; gap:3px; margin-top: 7px; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: var(--radius-full); white-space: nowrap; }
.k-up { background: var(--success-100); color: var(--success-700); }
.k-down { background: var(--danger-100); color: var(--danger-700); }

.erp-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
.panel { background:#fff; border:1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.panel-h { padding: 10px 13px; border-bottom: 1px solid var(--neutral-100); font-size: 12px; font-weight: 600; color: var(--fg-1); display:flex; align-items:center; justify-content:space-between; }
.panel-h .link { font-size: 11px; color: var(--brand-slate-600); font-weight: 600; }

/* chart */
.bars { display: flex; gap: 7px; align-items: stretch; height: 78px; padding: 13px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
.bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--brand-slate-100); flex-shrink: 0; }
.bar.cur { background: var(--brand-slate-800); }
.bar-m { font-size: 9px; color: var(--fg-3); }

/* mini table */
.mtable { width: 100%; border-collapse: collapse; }
.mtable th { font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3); text-align: left; padding: 7px 13px; background: var(--bg-surface-alt); border-bottom: 1px solid var(--neutral-100); }
.mtable td { font-size: 11.5px; color: var(--neutral-800); padding: 8px 13px; border-bottom: 1px solid var(--neutral-50); }
.mtable td.mono { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; }
.mtable td.r { text-align: right; font-family: var(--font-mono); font-weight: 500; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--radius-full); font-size: 10px; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; }
.b-green { background: var(--success-100); color: var(--success-700); } .b-green .dot { background: var(--success-500); }
.b-blue  { background: var(--info-100); color: var(--info-700); } .b-blue .dot { background: var(--info-500); }
.b-amber { background: var(--warning-100); color: var(--warning-700); } .b-amber .dot { background: var(--warning-500); }
.b-terra { background: var(--brand-terra-100); color: var(--brand-terra-700); } .b-terra .dot { background: var(--brand-terra-600); }
.b-gray  { background: var(--neutral-100); color: var(--neutral-700); } .b-gray .dot { background: var(--neutral-500); }

/* ============================================================
   GENERIC SECTION SPACING
   ============================================================ */
.section-pad { padding: 96px 0; }
.section-pad-sm { padding: 64px 0; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head .section-title { margin-bottom: 16px; }

/* ---- trust bar ---- */
.trust { background: var(--brand-slate-900); padding: 28px 0; border-top: 1px solid rgba(255,255,255,.06); }
.trust-inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; justify-content: center; }
.trust-label { font-size: var(--text-sm); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(226,238,245,.42); }
.trust-logo { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: rgba(255,255,255,.46); letter-spacing: -.01em; }

/* ---- problem cards ---- */
.problem { background: var(--bg-surface); }
.prob-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prob-card {
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 26px;
}
.prob-card .ic {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--brand-terra-50); color: var(--brand-terra-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.prob-card .ic svg { width: 22px; height: 22px; stroke-width: 1.6; }
.prob-card h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; margin-bottom: 8px; }
.prob-card p { font-size: var(--text-base); color: var(--fg-2); line-height: var(--leading-relaxed); margin: 0; }
.prob-card .stat { display: block; font-family: var(--font-display); font-weight: 700; color: var(--brand-terra-600); font-size: var(--text-2xl); margin-top: 14px; letter-spacing: -.02em; }

/* ============================================================
   PLATFORM SHOWCASE (tabbed)
   ============================================================ */
.showcase { background: var(--brand-slate-900); color: #fff; }
.showcase .section-title { color: #fff; }
.showcase .section-sub { color: rgba(226,238,245,.74); }
.tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(226,238,245,.74);
  font-size: var(--text-base); font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
}
.tab svg { width: 17px; height: 17px; stroke-width: 1.7; }
.tab:hover { background: rgba(255,255,255,.12); color: #fff; }
.tab.active { background: var(--brand-terra-600); border-color: var(--brand-terra-600); color: #fff; box-shadow: 0 6px 18px rgba(197,98,44,.4); }
.tab-panels { position: relative; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .4s var(--ease-out); }
.showcase-frame {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 70px rgba(8,18,28,.5);
  overflow: hidden;
}
.showcase-frame .erp { min-height: 440px; grid-template-columns: 196px 1fr; }
.showcase-cap {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center;
  margin-top: 30px;
}
.showcase-cap h3 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; color: #fff; margin-bottom: 10px; }
.showcase-cap p { font-size: var(--text-lg); color: rgba(226,238,245,.74); line-height: var(--leading-relaxed); margin: 0; }
.cap-list { display: flex; flex-direction: column; gap: 11px; }
.cap-list .row { display: flex; align-items: flex-start; gap: 11px; font-size: var(--text-base); color: rgba(226,238,245,.88); }
.cap-list .row svg { width: 19px; height: 19px; color: var(--brand-terra-500); flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   FEATURE BENTO
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.feat {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feat .ic { width: 46px; height: 46px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feat .ic svg { width: 23px; height: 23px; stroke-width: 1.6; }
.ic-slate { background: var(--brand-slate-100); color: var(--brand-slate-700); }
.ic-terra { background: var(--brand-terra-100); color: var(--brand-terra-700); }
.ic-green { background: var(--success-100); color: var(--success-700); }
.ic-blue  { background: var(--info-100); color: var(--info-700); }
.feat h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; margin-bottom: 9px; }
.feat p { font-size: var(--text-base); color: var(--fg-2); line-height: var(--leading-relaxed); margin: 0; }
.feat.col-3 { grid-column: span 3; }
.feat.col-2 { grid-column: span 2; }

/* ============================================================
   SPOTLIGHT (split image + copy)
   ============================================================ */
.spot { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.spot.reverse .spot-media { order: 2; }
.spot-copy h2 { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; margin-bottom: 16px; }
.spot-copy > p { font-size: var(--text-lg); color: var(--fg-2); line-height: var(--leading-relaxed); margin: 0 0 24px; }
.spot-points { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.spot-point { display: flex; gap: 14px; align-items: flex-start; }
.spot-point .pic { width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--brand-slate-50); color: var(--brand-slate-700); display:flex; align-items:center; justify-content:center; flex-shrink: 0; }
.spot-point .pic svg { width: 19px; height: 19px; stroke-width: 1.7; }
.spot-point h4 { font-size: var(--text-lg); font-weight: 600; margin-bottom: 3px; color: var(--fg-1); }
.spot-point p { font-size: var(--text-base); color: var(--fg-2); margin: 0; line-height: var(--leading-normal); }

/* portal mockup */
.portal { background:#fff; border:1px solid var(--border-default); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.portal-h { background: var(--brand-slate-800); padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; }
.portal-h .t { color:#fff; font-family: var(--font-display); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 9px; }
.portal-h .t svg { width: 18px; height: 18px; }
.portal-h .live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--success-300); }
.portal-h .live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--success-500); box-shadow: 0 0 0 0 rgba(46,155,100,.6); animation: pulse 1.8s infinite; }
.shipment { padding: 14px 18px; border-bottom: 1px solid var(--neutral-100); }
.shipment:last-child { border-bottom: none; }
.ship-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.ship-id { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--fg-1); }
.ship-route { font-size: 11px; color: var(--fg-3); margin-top: 2px; }
/* tracker line */
.track { display: flex; align-items: center; gap: 0; margin: 4px 0 2px; }
.track-node { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--neutral-200); background:#fff; flex-shrink: 0; position: relative; z-index: 1; }
.track-node.done { background: var(--success-500); border-color: var(--success-500); }
.track-node.cur { background: var(--brand-terra-600); border-color: var(--brand-terra-600); box-shadow: 0 0 0 4px var(--brand-terra-100); }
.track-seg { flex: 1; height: 2px; background: var(--neutral-200); }
.track-seg.done { background: var(--success-500); }
.track-labels { display: flex; justify-content: space-between; margin-top: 7px; }
.track-labels span { font-size: 9.5px; color: var(--fg-3); flex: 1; }
.track-labels span:last-child { text-align: right; }
.track-labels span.cur { color: var(--brand-terra-600); font-weight: 600; }

/* reports mockup */
.report-card { background:#fff; border:1px solid var(--border-default); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.report-h { padding: 16px 20px; border-bottom: 1px solid var(--neutral-100); display: flex; align-items: center; justify-content: space-between; }
.report-h .t { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.report-h .when { font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--neutral-100); }
.report-cell { background:#fff; padding: 18px 20px; }
.report-cell .l { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.report-cell .v { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -.02em; margin-top: 6px; }
.report-cell .v.terra { color: var(--brand-terra-600); }
.report-cell .sub { font-size: 11px; color: var(--fg-2); margin-top: 4px; }
.donut { width: 88px; height: 88px; border-radius: 50%; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; }
.step { padding: 0 28px; position: relative; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 26px; right: -6px;
  width: 12px; height: 12px; border-top: 2px solid var(--border-strong); border-right: 2px solid var(--border-strong);
  transform: rotate(45deg);
}
.step-num {
  width: 52px; height: 52px; border-radius: var(--radius-lg);
  background: var(--brand-slate-800); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  margin-bottom: 20px;
}
.step.s2 .step-num { background: var(--brand-slate-600); }
.step.s3 .step-num { background: var(--brand-terra-600); }
.step .chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 9px; }
.step h3 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; margin-bottom: 10px; }
.step p { font-size: var(--text-base); color: var(--fg-2); line-height: var(--leading-relaxed); margin: 0; }

/* ============================================================
   MARKETS
   ============================================================ */
.markets { background: var(--bg-surface); }
.market-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.market {
  border: 1px solid var(--border-default); border-radius: var(--radius-xl);
  padding: 24px; background: var(--bg-base);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.market:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.market .flag { font-size: 30px; line-height: 1; margin-bottom: 14px; }
.market h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; margin-bottom: 6px; }
.market .pri { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-full); margin-bottom: 14px; }
.pri-high { background: var(--brand-terra-100); color: var(--brand-terra-700); }
.pri-med { background: var(--warning-100); color: var(--warning-700); }
.market .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.market .tags span { font-size: 11px; color: var(--fg-2); background: var(--neutral-100); padding: 4px 9px; border-radius: var(--radius-full); }

/* ============================================================
   GLOBAL BACKBONE (dark)
   ============================================================ */
.global { background: var(--brand-slate-900); color: #fff; }
.global .section-title { color: #fff; }
.global .section-sub { color: rgba(226,238,245,.74); }
.entities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.entity {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: 28px;
}
.entity .e-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.entity .e-ic { width: 46px; height: 46px; border-radius: var(--radius-md); background: rgba(197,98,44,.18); color: var(--brand-terra-400); display:flex; align-items:center; justify-content:center; }
.entity .e-ic svg { width: 23px; height: 23px; stroke-width: 1.6; }
.entity .e-stage { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-full); }
.stage-active { background: var(--success-500); color: #fff; }
.stage-next { background: rgba(255,255,255,.12); color: rgba(226,238,245,.8); }
.entity h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; color: #fff; margin-bottom: 4px; }
.entity .e-loc { font-size: var(--text-base); color: var(--brand-terra-400); font-weight: 600; margin-bottom: 12px; }
.entity p { font-size: var(--text-base); color: rgba(226,238,245,.7); line-height: var(--leading-relaxed); margin: 0; }

/* ============================================================
   GUARANTEE / FINAL CTA
   ============================================================ */
.cta-final { background: var(--bg-surface); }
.cta-box {
  background: var(--brand-terra-600);
  border-radius: var(--radius-2xl);
  padding: 64px;
  position: relative; overflow: hidden;
  color: #fff;
}
.cta-box::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(100% 100% at 100% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(100% 100% at 100% 0%, #000, transparent 70%);
}
.cta-box .inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.cta-box h2 { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin-bottom: 16px; }
.cta-box p { font-size: var(--text-lg); color: rgba(255,255,255,.92); line-height: var(--leading-relaxed); margin: 0 0 28px; }
.cta-box .btn-on-terra { background: #fff; color: var(--brand-terra-700); }
.cta-box .btn-on-terra:hover { background: var(--brand-slate-900); color: #fff; }
.cta-mail {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 500;
  color: #fff;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255,255,255,.4);
  transition: border-color var(--duration-fast) var(--ease-out);
}
.cta-mail:hover { border-color: #fff; }
.guarantee {
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-xl);
  padding: 28px;
}
.guarantee .g-ic { width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--brand-terra-700); display:flex; align-items:center; justify-content:center; margin-bottom: 16px; }
.guarantee .g-ic svg { width: 26px; height: 26px; stroke-width: 2; }
.guarantee h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: #fff; margin-bottom: 8px; }
.guarantee p { font-size: var(--text-base); color: rgba(255,255,255,.9); margin: 0; line-height: var(--leading-normal); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--brand-slate-900); color: rgba(226,238,245,.66); padding: 64px 0 36px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.09); }
.footer-brand p { font-size: var(--text-base); line-height: var(--leading-relaxed); color: rgba(226,238,245,.6); margin: 18px 0 0; max-width: 320px; }
.footer-col h4 { font-size: var(--text-sm); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(226,238,245,.5); margin-bottom: 16px; }
.footer-col a { display: block; font-size: var(--text-base); color: rgba(226,238,245,.74); padding: 6px 0; transition: color var(--duration-fast); }
.footer-col a:hover { color: #fff; }
.footer-bot { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; flex-wrap: wrap; gap: 16px; }
.footer-bot .copy { font-size: var(--text-sm); color: rgba(226,238,245,.5); }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; border-radius: var(--radius-md); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: rgba(226,238,245,.74); transition: all var(--duration-fast); }
.footer-social a:hover { background: var(--brand-terra-600); border-color: var(--brand-terra-600); color: #fff; }
.footer-social svg { width: 17px; height: 17px; }

/* ============================================================
   ANIMATIONS + REVEAL
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,155,100,.55); } 70% { box-shadow: 0 0 0 8px rgba(46,155,100,0); } 100% { box-shadow: 0 0 0 0 rgba(46,155,100,0); } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* portal mockup layout */
.erp-portal { display: grid; grid-template-columns: 200px 1fr; gap: 12px; padding: 0; }
.portal-threads { border-right: 1px solid var(--border-default); padding: 14px 10px; }
.portal-chat { padding: 14px 16px; display: flex; flex-direction: column; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-window { transform: none; }
  .hero-media { max-width: 560px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .feat.col-3, .feat.col-2 { grid-column: span 1; }
  .spot { grid-template-columns: 1fr; gap: 36px; }
  .spot.reverse .spot-media { order: 0; }
  .showcase-cap { grid-template-columns: 1fr; gap: 20px; }
  .cta-box .inner { grid-template-columns: 1fr; gap: 32px; }
  .entities, .market-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .step { padding: 0; }
  .step:not(:last-child)::after { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-inner { padding: 0 20px; }
  .section-pad { padding: 64px 0; }
  .section-title { font-size: var(--text-3xl); }
  .section-sub { font-size: var(--text-lg); }
  .prob-grid, .bento, .market-grid, .entities { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .erp-side { display: none; }
  .showcase-frame .erp, .erp { grid-template-columns: 1fr; }
  .showcase-frame .erp { min-height: 0; }
  .erp-portal { grid-template-columns: 1fr; }
  .portal-threads { display: none; }
  .cta-box { padding: 36px 24px; }
  .cta-box h2 { font-size: var(--text-3xl); }
  .footer-top { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .hero-inner { padding: 56px 20px 72px; }
}
@media (max-width: 520px) {
  .nav-right .btn-ghost-light { display: none; }
  .hero h1 { font-size: 33px; }
  .hero-sub { font-size: var(--text-lg); }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-stat .num { font-size: var(--text-3xl); }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .erp-cols { grid-template-columns: 1fr !important; }
  .cta-mail { font-size: var(--text-sm); word-break: break-all; }
  .logo-word { font-size: 17px; }
}
