/* ===== CSS Inc. — design tokens ===== */
:root {
  --ink:        #0b1220;
  --ink-soft:   #334155;
  --muted:      #64748b;
  --line:       #e6e9f0;
  --bg:         #ffffff;
  --bg-soft:    #f6f8fc;
  --bg-ink:     #0a1426;
  --bg-ink-2:   #0f1d38;

  --brand:      #2563eb;
  --brand-600:  #1d4ed8;
  --brand-700:  #1e40af;
  --brand-50:   #eff4ff;
  --teal:       #0ea5a4;

  --radius:     16px;
  --radius-sm:  10px;
  --shadow-sm:  0 1px 2px rgba(11,18,32,.06), 0 1px 3px rgba(11,18,32,.05);
  --shadow:     0 12px 32px -14px rgba(11,18,32,.22);
  --shadow-lg:  0 34px 64px -22px rgba(11,18,32,.32);
  --maxw:       1140px;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono:       'SF Mono', ui-monospace, 'Cascadia Code', 'Consolas', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.container { width: 90%; max-width: var(--maxw); margin: 0 auto; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; color: var(--ink); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -0.01em; }
p  { color: var(--ink-soft); }

.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--ink { background: var(--bg-ink); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head p { font-size: 1.08rem; margin-top: 14px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: .98rem; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -6px rgba(37,99,235,.5); }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.btn-light:hover { background: rgba(255,255,255,.18); }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; }
.brand .logo-mark { width: 48px; height: 36px; flex: none; }
.brand.logo--light { --bh-ink: #0B1320; --bh-hex: #ECE6DA; }
.brand .brand-sub { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; margin-top: -2px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: .95rem; font-weight: 550; color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--brand); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto; transition: .3s; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 92px 0 84px; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(820px 420px at 80% -12%, rgba(37,99,235,.16), transparent 60%), radial-gradient(640px 360px at 6% 4%, rgba(14,165,164,.12), transparent 55%); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.7rem); }
.hero h1 .hl { background: linear-gradient(90deg, var(--brand-700), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 1.2rem; color: var(--ink-soft); margin: 22px 0 32px; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; background: var(--brand-50); border: 1px solid #d6e2ff; color: var(--brand-700); font-size: .82rem; font-weight: 650; padding: 6px 14px; border-radius: 999px; }
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.18); }
.hero-note { margin-top: 26px; font-size: .9rem; color: var(--muted); }
.hero-note b { color: var(--ink); font-weight: 700; }

/* hero visual */
.spec-card { background: var(--bg-ink); border-radius: 22px; padding: 28px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.06); color: #cbd5e1; }
.spec-card .sc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: #fff; font-weight: 700; }
.spec-card .sc-top .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(14,165,164,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{ box-shadow: 0 0 0 0 rgba(14,165,164,.5);} 70%{ box-shadow: 0 0 0 12px rgba(14,165,164,0);} 100%{ box-shadow: 0 0 0 0 rgba(14,165,164,0);} }
.spec-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .92rem; }
.spec-row:last-child { border-bottom: 0; }
.spec-row .k { color: #94a3b8; } .spec-row .v { color: #fff; font-weight: 650; font-family: var(--mono); font-size: .85rem; }
.spec-row .v.good { color: #34d399; }

/* ===== Strip ===== */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.strip-inner { display: flex; flex-wrap: wrap; gap: 16px 38px; align-items: center; justify-content: center; padding: 24px 0; }
.strip-inner span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.strip-inner .tag { font-family: var(--mono); color: var(--ink-soft); background: #fff; border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; font-size: .8rem; }

/* ===== Services ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .25s ease, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cdddff; }
.card .ico { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 18px; }
.card .ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .96rem; }

/* ===== Platform highlight (ByteHive) ===== */
.platform { background: var(--bg-ink); border-radius: 26px; overflow: hidden; display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; }
.platform .pf-text { padding: 56px 48px; }
.platform .eyebrow { color: #fbbf24; }
.platform h2 { color: #fff; margin: 12px 0 16px; }
.platform p { color: #cbd5e1; font-size: 1.05rem; }
.platform .pf-points { list-style: none; margin: 24px 0 30px; }
.platform .pf-points li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; color: #e2e8f0; font-size: .98rem; }
.platform .pf-points svg { flex: none; width: 20px; height: 20px; color: #fbbf24; margin-top: 3px; }
.platform .pf-visual { background: linear-gradient(135deg, #111c34, #0a1426); display: grid; place-items: center; padding: 40px; position: relative; }
/* ByteHive brand logo lockup */
.logo { display: inline-flex; align-items: center; gap: 14px; }
.logo--dark  { --bh-ink: #F4F8FB; --bh-hex: #0F1B2D; --bh-word: #F4F8FB; }
.logo--light { --bh-ink: #0B1320; --bh-hex: #ECE6DA; --bh-word: #0B1320; }
.logo .logo-mark { flex: none; }
.logo-type { display: flex; flex-direction: column; line-height: 1; }
.logo-word { font-family: 'Space Grotesk', var(--font); font-weight: 700; letter-spacing: -.01em; color: var(--bh-word); }
.logo-tag { font-family: var(--mono); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #19D4F5; }
.logo--lg .logo-mark { width: 132px; height: 99px; }
.logo--lg .logo-word { font-size: 2.6rem; }
.logo--lg .logo-tag { font-size: .82rem; margin-top: 10px; }

/* ===== Approach / steps ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; padding-top: 8px; }
.step .n { font-family: var(--mono); font-size: .82rem; font-weight: 700; color: var(--brand); background: var(--brand-50); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: .94rem; }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat .num { font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 850; letter-spacing: -.03em; color: var(--brand); }
.stat .lbl { color: var(--muted); font-size: .95rem; margin-top: 6px; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.contact-info h2 { margin-bottom: 14px; }
.contact-info p { font-size: 1.05rem; }
.contact-info .ci-item { display: flex; gap: 14px; align-items: center; margin-top: 24px; }
.contact-info .ci-item .ico { width: 44px; height: 44px; border-radius: 11px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.contact-info .ci-item .ico svg { width: 22px; height: 22px; }
.contact-info .ci-item b { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; }
.contact-info .ci-item a, .contact-info .ci-item span { color: var(--ink); font-weight: 600; }
.form-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: .95rem; color: var(--ink); background: var(--bg-soft); transition: border-color .2s, box-shadow .2s, background .2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit { width: 100%; justify-content: center; }
.btn-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }
#form-status { margin-top: 16px; text-align: center; font-weight: 600; font-size: .95rem; }

/* ===== Footer ===== */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 56px 0 32px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.foot-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 16px; }
.foot-grid ul { list-style: none; }
.foot-grid li { margin-bottom: 10px; }
.foot-grid a { color: var(--ink-soft); font-size: .94rem; transition: color .2s; }
.foot-grid a:hover { color: var(--brand); }
.foot-about p { font-size: .94rem; margin-top: 14px; max-width: 300px; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; }
.foot-bottom p { font-size: .88rem; color: var(--muted); }

/* ===== reveal ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1140px) {
  .hero-grid, .platform, .contact-grid { grid-template-columns: 1fr; }
  .platform .pf-visual { padding: 30px; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: 4px; position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 16px 5%; box-shadow: var(--shadow); }
  .nav.open .nav-links a { padding: 10px 0; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .steps, .form-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .section { padding: 68px 0; }
  .platform .pf-text { padding: 40px 26px; }
}

/* ===== Theme toggle button ===== */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  flex: none; transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .t-moon { display: none; }
html[data-theme="dark"] .theme-toggle .t-sun { display: none; }
html[data-theme="dark"] .theme-toggle .t-moon { display: block; }

/* ===== Dark mode ===== */
html[data-theme="dark"] {
  --ink:        #e7ecf5;
  --ink-soft:   #a7b1c6;
  --muted:      #6f7b94;
  --line:       #20304f;
  --bg:         #0a0f1f;
  --bg-soft:    #0f1730;
  --bg-ink:     #142042;
  --bg-ink-2:   #1a2750;

  --brand:      #5b8cff;
  --brand-600:  #7099ff;
  --brand-700:  #4f78e0;
  --brand-50:   rgba(91,140,255,.14);
  --teal:       #37d39e;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.45);
  --shadow:     0 14px 36px -14px rgba(0,0,0,.7);
  --shadow-lg:  0 34px 64px -22px rgba(0,0,0,.8);
}
html[data-theme="dark"] body { background: var(--bg); }
html[data-theme="dark"] .site-header { background: rgba(10,15,31,.78); border-bottom-color: var(--line); }
html[data-theme="dark"] .nav-toggle span { background: var(--ink); }
html[data-theme="dark"] .nav.open .nav-links { background: var(--bg-soft); border-bottom-color: var(--line); }

/* hero pill (white→dark with brand tint) */
html[data-theme="dark"] .hero-pill { background: rgba(91,140,255,.14); border-color: rgba(91,140,255,.3); color: #c0d2ff; }

/* strip + chips */
html[data-theme="dark"] .strip-inner .tag { background: var(--bg-soft); border-color: var(--line); color: var(--ink-soft); }

/* cards (white → elevated panel) */
html[data-theme="dark"] .card { background: var(--bg-soft); border-color: var(--line); }
html[data-theme="dark"] .card:hover { border-color: rgba(91,140,255,.45); }
html[data-theme="dark"] .card .ico { background: rgba(91,140,255,.14); color: #c0d2ff; }

/* contact info icons */
html[data-theme="dark"] .contact-info .ci-item .ico { background: rgba(91,140,255,.14); color: #c0d2ff; }
html[data-theme="dark"] .contact-info .ci-item a, html[data-theme="dark"] .contact-info .ci-item span { color: var(--ink); }

/* step number badges */
html[data-theme="dark"] .step .n { background: rgba(91,140,255,.14); color: #c0d2ff; }

/* stat numbers stay brand-blue and look fine on dark */

/* spec card already uses --bg-ink — re-tints automatically; ensure border still subtle */
html[data-theme="dark"] .spec-card { border-color: var(--line); }

/* "Meet ByteHive" platform card already dark — leave as is, the gradient still works */

/* contact form: panel background, dark inputs, override hardcoded #fff on focus */
html[data-theme="dark"] .form-card { background: var(--bg-soft); border-color: var(--line); }
html[data-theme="dark"] .form-group input, html[data-theme="dark"] .form-group textarea {
  background: var(--bg); border-color: var(--line); color: var(--ink);
}
html[data-theme="dark"] .form-group input::placeholder, html[data-theme="dark"] .form-group textarea::placeholder { color: var(--muted); }
html[data-theme="dark"] .form-group input:focus, html[data-theme="dark"] .form-group textarea:focus {
  background: var(--bg); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91,140,255,.18);
}

/* footer hover */
html[data-theme="dark"] .foot-grid a:hover { color: #c0d2ff; }

/* logo on header/footer: flip light variant tokens to dark when theme is dark */
html[data-theme="dark"] .logo--light { --bh-ink: #F4F8FB; --bh-hex: #0F1B2D; --bh-word: #F4F8FB; }
html[data-theme="dark"] .brand.logo--light { --bh-ink: #F4F8FB; --bh-hex: #0F1B2D; }

/* ghost button on dark */
html[data-theme="dark"] .btn-ghost { border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .btn-ghost:hover { border-color: var(--brand); color: #c0d2ff; }
html[data-theme="dark"] .btn-primary { color: #fff; }
