:root {
  --blue: #155eef;
  --blue-2: #2563ff;
  --blue-soft: #eef4ff;
  --ink: #0c1428;
  --muted: #52627b;
  --line: #dfe6f1;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --shadow: 0 18px 50px rgba(30, 59, 110, 0.09);
  --shadow-soft: 0 8px 22px rgba(30, 59, 110, 0.08);
  --radius: 14px;
  --container: 1240px;
  --font-display: "Space Grotesk", "Inter", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }

.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.section { position: relative; padding: 96px 0; }
.skip-link { position: fixed; left: 18px; top: -80px; z-index: 1000; background: var(--blue); color: white; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 18px; }

/* Signature motif: node dot + connecting line, echoing the CaizWork network mark */
.node-dot { position: relative; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--blue); flex: 0 0 auto; }
.node-dot::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(21,94,239,.35); border-radius: 50%; }

.eyebrow { display: flex; align-items: center; margin: 0 0 18px; color: var(--blue); font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow-light { color: #8fb3ff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(212, 222, 235, .78);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 7px 22px rgba(22, 45, 85, .07); }
.nav-shell { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand img { width: 176px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.nav-link { position: relative; font-size: .93rem; font-weight: 600; color: #26344c; padding: 27px 0 22px; }
.nav-link::after { content:""; position: absolute; left: 50%; bottom: 13px; width: 0; height: 2px; background: var(--blue); border-radius: 999px; transition: width .25s ease, left .25s ease; }
.nav-link:hover, .nav-link.active { color: var(--blue); }
.nav-link:hover::after, .nav-link.active::after { left: 0; width: 100%; }
.nav-locator { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; color: var(--muted); padding-left: 4px; border-left: 1px solid var(--line); margin-left: 4px; }
.nav-locator .node-dot { margin-right: 8px; }
.menu-toggle { display: none; width: 46px; height: 42px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--ink); transition: transform .22s, opacity .22s; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 48px; padding: 0 22px; border-radius: 9px; font-size: .92rem; font-weight: 700; border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease; }
.button svg { width: 18px; height: 18px; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: linear-gradient(135deg, #0e5cf5, #286dff); box-shadow: 0 10px 22px rgba(31, 99, 244, .22); }
.button-primary:hover { box-shadow: 0 14px 28px rgba(31, 99, 244, .28); }
.button-secondary { color: var(--ink); background: transparent; border-color: #c4cddb; }
.button-secondary:hover, .button-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.button-outline { color: var(--blue); background: transparent; border-color: var(--blue); }
.nav-cta { min-height: 40px; padding-inline: 18px; }

/* ---------- Hero ---------- */
.hero { overflow: hidden; padding-top: 68px; padding-bottom: 40px; }
.hero-field {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 4px 4px, rgba(21,94,239,.14) 1px, transparent 1.4px),
    url('assets/backgrounds/network-background.webp');
  background-size: 34px 34px, cover;
  background-position: 0 0, center;
  opacity: .5;
  mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,.2) 72%, transparent);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, .96fr) minmax(460px, 1.04fr); align-items: center; gap: 32px; min-height: 560px; }
.hero-copy { max-width: 660px; z-index: 2; }
.hero h1 { margin: 0 0 22px; font-size: clamp(2.3rem, 4.2vw, 4.3rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 700; }
.hero-lede { max-width: 600px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.2vw, 1.15rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-visual { position: relative; height: 560px; min-width: 0; }
.hero-fallback { position: absolute; inset: 4% 0 0; width: 100%; height: 94%; object-fit: contain; opacity: 1; transition: opacity .4s; }
caizwork-3d { display: block; width: 100%; height: 100%; position: relative; z-index: 2; }
caizwork-3d:defined + .interaction-hint { opacity: 1; }
caizwork-3d:defined ~ .hero-fallback { opacity: 0; }
.interaction-hint { position: absolute; z-index: 3; bottom: 26px; left: 50%; transform: translateX(-50%); margin: 0; padding: 7px 14px; border: 1px solid var(--line); background: rgba(255,255,255,.8); backdrop-filter: blur(9px); color: var(--muted) !important; border-radius: 999px; font-family: var(--font-mono); font-size: .68rem !important; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transition: opacity .3s; pointer-events: none; }

/* ---------- About ---------- */
.about-band { padding-top: 8px; }
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; }
.about-statement p { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 1.9vw, 1.85rem); line-height: 1.42; letter-spacing: -.01em; color: var(--ink); }

.principle-list { position: relative; list-style: none; margin: 0; padding: 0; }
.principle-list::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.principle { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.principle:first-child { padding-top: 0; }
.principle:last-child { border-bottom: 0; padding-bottom: 0; }
.principle-marker { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; margin-top: 2px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--blue); font-family: var(--font-mono); font-size: .68rem; font-weight: 600; }
.principle h3, .service-row h3 { margin: 0 0 6px; font-size: 1.02rem; letter-spacing: -.01em; }
.principle p, .service-row p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Product ---------- */
.product-section { padding-top: 32px; padding-bottom: 96px; }
.product-grid { display: grid; grid-template-columns: .62fr 1.38fr; gap: 62px; align-items: center; }
.product-copy h2 { margin: 0 0 4px; font-size: clamp(2rem, 3.1vw, 2.9rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.product-label { margin: 0 0 18px !important; color: var(--blue) !important; font-weight: 700; font-size: .9rem; }
.product-copy p { margin: 0 0 16px; color: var(--muted); font-size: 1rem; }
.product-meta { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em; color: #164aa3; margin-bottom: 26px !important; }
.browser-mockup { overflow: hidden; border: 1px solid #dce5f0; border-radius: 12px; background: #fff; box-shadow: 0 22px 60px rgba(25,54,104,.13); transition: transform .3s ease, box-shadow .3s ease; }
.browser-mockup:hover { transform: translateY(-5px); box-shadow: 0 28px 70px rgba(25,54,104,.18); }
.browser-topbar { height: 38px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; border-bottom: 1px solid #e7edf5; background: #f8fafc; padding: 0 14px; }
.browser-dots { display: flex; gap: 6px; }
.browser-dots span { width: 8px; height: 8px; border-radius: 50%; background: #d1dae7; }
.browser-address { justify-self: center; padding: 4px 34px; min-width: 220px; text-align: center; border: 1px solid #e5ebf3; border-radius: 999px; color: #8793a7; background: white; font-family: var(--font-mono); font-size: .64rem; }
.browser-mockup img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; object-position: top; }

/* ---------- Services ---------- */
.services-section { padding-top: 0; padding-bottom: 40px; }
.services-panel { display: grid; grid-template-columns: 2.5fr 1fr; gap: 60px; padding-top: 56px; border-top: 1px solid var(--line); }
.service-list { list-style: none; margin: 0; padding: 0; }
.service-row { display: grid; grid-template-columns: 28px 30px 1fr; align-items: start; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.service-row:last-child { border-bottom: 0; padding-bottom: 0; }
.service-row .principle-marker { border: none; background: none; width: auto; height: auto; margin-top: 4px; }
.line-icon { color: var(--blue); margin-top: 2px; }
.line-icon svg { width: 24px; height: 24px; }
.why-column { border-left: 1px solid var(--line); padding-left: 32px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.check-list li { position: relative; padding-left: 30px; color: #384964; font-size: .93rem; }
.check-list li::before { content:"✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-size: .68rem; font-weight: 900; }

/* ---------- Contact ---------- */
.contact-section { padding: 80px 0; color: #e7ecf5; background: linear-gradient(160deg,#070c16,#141b28); }
.contact-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; align-items: center; }
.contact-copy h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.02em; color: #f4f7fc; }
.contact-copy p { margin: 0; color: #9fadc4; font-size: .93rem; }
.contact-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; transition: background .2s, transform .2s; }
a.contact-item:hover { background: rgba(21,94,239,.16); transform: translateY(-2px); }
.contact-icon { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: linear-gradient(135deg,#0e5cf5,#286dff); box-shadow: 0 9px 20px rgba(31,99,244,.28); }
.contact-icon svg { width: 21px; height: 21px; }
.contact-item strong, .contact-item small { display: block; }
.contact-item strong { margin-bottom: 3px; font-size: .86rem; color: #f4f7fc; }
.contact-item small { color: #94a3bd; font-size: .79rem; }

/* ---------- Footer ---------- */
.site-footer { color: white; background: #05080d; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.06); }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.footer-brand img { width: 146px; filter: invert(1) brightness(3); }
.site-footer p { margin: 0; color: #939cab; font-family: var(--font-mono); font-size: .72rem; text-align: center; letter-spacing: .02em; }
.social-links { justify-self: end; display: flex; gap: 10px; }
.social-links a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: white; transition: background .2s, color .2s; }
.social-links a:hover { background: white; color: #11151c; }
.social-links svg { width: 17px; height: 17px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

:focus-visible { outline: 3px solid rgba(21,94,239,.38); outline-offset: 3px; }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr 1fr; min-height: 520px; }
  .hero-visual { height: 480px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-panel { grid-template-columns: 1fr; gap: 32px; }
  .why-column { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 28px; }
  .contact-grid { grid-template-columns: repeat(3,1fr); }
  .contact-copy { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .container { width: min(calc(100% - 32px), var(--container)); }
  .menu-toggle { display: block; }
  .site-nav { position: fixed; left: 16px; right: 16px; top: 70px; display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(-10px); transition: opacity .22s, transform .22s; }
  .site-nav.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-link { padding: 13px 14px; border-radius: 10px; }
  .nav-link::after { display: none; }
  .nav-link:hover, .nav-link.active { background: var(--blue-soft); }
  .nav-locator { display: none; }
  .nav-cta { margin-top: 7px; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 64px 0; }
  .hero { padding-top: 46px; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 100%; text-align: center; }
  .eyebrow { justify-content: center; }
  .hero-lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { height: 420px; }
  .product-grid { grid-template-columns: 1fr; gap: 34px; }
  .product-copy { max-width: 660px; }
  .service-row { grid-template-columns: 24px 26px 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-copy { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; justify-items: center; }
  .social-links { justify-self: center; }
}

@media (max-width: 560px) {
  .brand img { width: 150px; }
  .nav-shell { min-height: 68px; }
  .hero h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .hero-visual { height: 340px; margin-top: -16px; }
  .interaction-hint { bottom: 4px; }
  .about-statement p { font-size: 1.3rem; }
  .browser-address { min-width: 0; width: 62%; padding-inline: 8px; overflow: hidden; white-space: nowrap; }
  .browser-mockup img { aspect-ratio: 1.45 / 1; }
  .footer-brand img { width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
.hero-visual.has-3d .hero-fallback { opacity: 0; pointer-events: none; }
