/* =========================================================
   Instalog Solutions — styles.css
   Palette: light blue (#3b82f6 / #60a5fa) + tech white (#fff / #f8fafc)
   ========================================================= */
:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --ink:      #0f172a;
  --slate-600:#475569;
  --muted:    #64748b;
  --line:     #e2e8f0;
  --white:    #ffffff;
  --bg:       #f8fafc;
  --radius:   16px;
  --radius-sm:10px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow:    0 10px 30px rgba(37,99,235,.08), 0 2px 8px rgba(15,23,42,.04);
  --shadow-lg: 0 24px 60px rgba(37,99,235,.16);
  --gradient:  linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  --maxw: 1180px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,99,235,.36); }
.btn-ghost { background: #fff; color: var(--blue-700); border-color: var(--blue-200); }
.btn-ghost:hover { border-color: var(--blue-400); transform: translateY(-2px); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-mark { display: inline-flex; }
.brand-name { color: var(--ink); }
.brand-name strong { color: var(--blue-600); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--slate-600); font-weight: 500; font-size: 15px; transition: color .15s ease; }
.nav-links a:hover { color: var(--blue-600); }
.nav-cta { background: var(--gradient); color: #fff !important; padding: 9px 18px; border-radius: 999px; box-shadow: 0 6px 16px rgba(37,99,235,.24); }
.nav-cta:hover { transform: translateY(-1px); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 999px; padding: 3px; }
.lang-btn {
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 11px; border-radius: 999px; transition: all .15s ease;
}
.lang-btn.active { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; width: 20px; margin: 0 auto; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 96px 0 84px; background: radial-gradient(1200px 600px at 80% -10%, var(--blue-100), transparent 60%), linear-gradient(180deg, #fff, var(--bg)); }
.hero-grid {
  position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--blue-100) 1px, transparent 1px), linear-gradient(90deg, var(--blue-100) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(700px 400px at 70% 20%, #000, transparent 75%);
          mask-image: radial-gradient(700px 400px at 70% 20%, #000, transparent 75%);
}
.hero-inner { position: relative; max-width: 860px; }
.hero-badge { display: inline-block; background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-200); font-size: 16px; font-weight: 600; padding: 9px 18px; border-radius: 999px; margin-bottom: 22px; }
.hero-title { font-size: clamp(34px, 5vw, 56px); font-weight: 800; }
.hero-subtitle { font-size: clamp(16px, 2vw, 19px); color: var(--slate-600); margin: 20px 0 32px; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 56px; margin-top: 60px; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 140px; padding: 22px 28px; background: rgba(255,255,255,.72); border: 1px solid var(--blue-100); border-radius: var(--radius); box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.stat-num { font-size: clamp(38px, 5vw, 52px); font-weight: 800; color: var(--blue-600); line-height: 1; }
.stat-label { font-size: 15px; font-weight: 600; color: var(--slate-600); margin-top: 10px; }

/* ===== Sections ===== */
.section { padding: 84px 0; }
.section-alt { background: linear-gradient(180deg, #fff, var(--blue-50)); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.eyebrow { display: inline-block; color: var(--blue-600); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.section-sub { color: var(--slate-600); margin-top: 16px; font-size: 17px; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; max-width: 980px; margin: 0 auto; }
.about-lead { font-size: 19px; color: var(--slate-600); margin: 0; }
.about-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.about-points li { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; box-shadow: var(--shadow-sm); font-weight: 500; }
.about-points .dot { flex: 0 0 10px; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--gradient); }

/* ===== Industry tags ===== */
.industry-tags { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 0 auto 44px; max-width: 900px; }
.industry-tags.center { margin-top: 8px; }

#aiIndustries {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto 52px;
  padding: 12px 18px;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
#aiIndustries .eyebrow { margin-bottom: 0; }

@media (max-width: 560px) {
  #aiIndustries { border-radius: 24px; padding: 14px 18px; }
}
.tag { background: #fff; border: 1px solid var(--blue-200); color: var(--blue-700); font-weight: 600; font-size: 17px; padding: 10px 22px; border-radius: 999px; box-shadow: var(--shadow-sm); }

.industry-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; max-width: 960px; margin: 8px auto 0; }
.industry-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 20px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.industry-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--blue-200); }
.industry-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--gradient); color: #fff; margin: 0 auto 18px; box-shadow: 0 10px 24px rgba(37,99,235,.22); }
.industry-icon svg { width: 30px; height: 30px; }
.industry-card h3 { font-size: 19px; font-weight: 700; color: var(--ink); }

/* ===== AI module cards ===== */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--blue-200); }
.card-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-600); margin-bottom: 18px; }
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--slate-600); font-size: 15px; margin: 0; }

/* ===== Supply chain systems ===== */
.systems-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.system {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; text-align: left; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease;
}
.system::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--gradient); }
.system:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.system-abbr {
  display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 40px; padding: 0 12px;
  background: var(--gradient); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .04em; border-radius: 10px; margin-bottom: 16px;
}
.system-icon { color: var(--blue-500); margin-bottom: 12px; }
.system-icon svg { width: 30px; height: 30px; }
.system h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.system p { color: var(--slate-600); font-size: 14px; margin: 0; }

/* ===== Why Instalog (differentiators) ===== */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; max-width: 1040px; margin: 0 auto; }
.diff-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease; }
.diff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.diff-dim { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.diff-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; }
.diff-tag { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-top: 2px; }
.diff-tag.legacy { background: #f1f5f9; color: var(--muted); }
.diff-tag.instalog { background: var(--blue-50); color: var(--blue-700); }
.diff-row p { margin: 0; font-size: 14px; color: var(--slate-600); line-height: 1.5; }
.diff-legacy { color: var(--muted); }

/* ===== Case Studies ===== */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; max-width: 1100px; margin: 0 auto; }
.case-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); display: grid; gap: 10px; transition: transform .18s ease, box-shadow .2s ease; }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.case-head { display: flex; align-items: center; gap: 12px; }
.case-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gradient); color: #fff; flex: none; }
.case-icon svg { width: 22px; height: 22px; }
.case-meta { display: flex; flex-direction: column; }
.case-industry { font-size: 17px; font-weight: 700; color: var(--ink); }
.case-label { font-size: 12px; font-weight: 600; color: var(--blue-600); letter-spacing: .03em; }
.case-card p { margin: 0; font-size: 14px; color: var(--slate-600); line-height: 1.6; }
.case-gain { color: var(--ink); background: var(--blue-50); border-radius: var(--radius-sm); padding: 10px 12px; }
.case-gain strong { color: var(--blue-700); }

/* ===== Footer legal links ===== */
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.footer-legal a { color: #94a3b8; font-weight: 500; font-size: 14px; transition: color .15s ease; }
.footer-legal a:hover { color: var(--blue-400); }

/* ===== Contact ===== */
.contact { background: linear-gradient(180deg, var(--blue-50), #fff); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; max-width: 1040px; margin: 0 auto; }
.contact-copy .section-title { text-align: left; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 15px; font-weight: 600; color: var(--slate-600); }
.field input, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--ink); width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--bg); transition: border-color .15s ease, box-shadow .15s ease; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(96,165,250,.25); background: #fff; }
.contact-form .btn { width: 100%; }
.form-note { color: var(--blue-700); font-weight: 600; font-size: 14px; margin: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Footer ===== */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 52px 0 28px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; padding-bottom: 28px; border-bottom: 1px solid #1e293b; }
.footer-brand .brand-name { color: #fff; font-size: 18px; }
.footer-brand .brand-name strong { color: var(--blue-400); }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand p { margin: 10px 0 0; color: #94a3b8; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.footer-links a { color: #cbd5e1; font-weight: 500; font-size: 16px; transition: color .15s ease; }
.footer-links a:hover { color: var(--blue-400); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
.footer-contact .eyebrow { color: var(--blue-400); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.footer-line { display: inline-flex; align-items: center; gap: 8px; color: #e2e8f0; font-size: 15px; text-decoration: none; transition: color .15s ease; }
.footer-line:hover { color: #fff; }
.footer-line svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.footer-bottom { padding-top: 22px; color: #64748b; font-size: 13px; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .systems-grid { grid-template-columns: repeat(2, 1fr); }
  .industry-cards { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px; background: #fff; padding: 16px 24px 24px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease; }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-cta { text-align: center; margin-top: 8px; }
  .nav-toggle { display: flex; }
  .hero { padding: 64px 0 56px; }
  .hero-stats { gap: 16px 28px; }
  .stat { padding: 18px 22px; min-width: 120px; }
  .section { padding: 60px 0; }
}
@media (max-width: 560px) {
  .cards-grid, .systems-grid, .industry-cards { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(96,165,250,.6); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
