/* ============================================================
   shared-tokens.css — single source of truth for all pages
   Pure-black canvas · liquid-metal shimmer · glass per segment
   Vercel-hosted: superior-chemical-co-superiorchem-4317s-projects.vercel.app
   ============================================================ */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 40px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- core tokens ---------- */
:root {
  /* ground */
  --bg: #050506;
  --bg-elevated: rgba(255, 255, 255, 0.024);
  --bg-secondary: rgba(255, 255, 255, 0.012);
  --bg-glass: rgba(255, 255, 255, 0.018);

  /* liquid metal layers */
  --lm-base: radial-gradient(ellipse 820px 520px at 50% -12%,
      rgba(0, 200, 255, 0.06), transparent 60%),
    radial-gradient(ellipse 700px 420px at 80% 100%,
      rgba(120, 80, 255, 0.05), transparent 55%),
    var(--bg);
  --lm-shimmer: rgba(255, 255, 255, 0.028);
  --lm-cut: rgba(0, 200, 255, 0.032);

  /* foreground */
  --fg: #f6f6f8;
  --fg-soft: rgba(246, 246, 248, 0.7);
  --fg-faint: rgba(246, 246, 248, 0.38);
  --fg-muted: rgba(246, 246, 248, 0.24);

  /* accent */
  --blue: #00e5ff;
  --blue-soft: rgba(0, 229, 255, 0.55);
  --violet: #9d4dff;
  --violet-soft: rgba(157, 77, 255, 0.5);

  /* separators */
  --strip: rgba(255, 255, 255, 0.052);
  --strip-strong: rgba(255, 255, 255, 0.12);
  --glass-edge: rgba(0, 229, 255, 0.18);

  /* shadows */
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-elevated: 0 6px 14px rgba(0, 0, 0, 0.5),
    0 22px 44px rgba(0, 0, 0, 0.42);

  /* radii */
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 980px;

  /* molecule accent */
  --mol-a: #00e5ff;
  --mol-b: #9d4dff;
  --mol-c: #76ff03;
}

/* ---------- segment identity (glass + metal each) ---------- */
html[data-segment="showcase"] {
  --fg: #f6f6f8;
  --bg: #07080c;
  --glassborder: rgba(0, 229, 255, 0.22);
  --glassshimmer: rgba(0, 200, 255, 0.1);
  --glassshadow: 0 6px 14px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 229, 255, 0.06),
    0 22px 44px rgba(0, 0, 0, 0.42);
}

html[data-segment="products"] {
  --fg: #f0f2f5;
  --bg: #0a0c12;
  --glassborder: rgba(157, 77, 255, 0.22);
  --glassshimmer: rgba(157, 77, 255, 0.1);
  --glassshadow: 0 6px 14px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(157, 77, 255, 0.06),
    0 22px 44px rgba(0, 0, 0, 0.42);
}

html[data-segment="register"] {
  --fg: #f6f6f8;
  --bg: #07080c;
  --glassborder: rgba(0, 200, 255, 0.26);
  --glassshimmer: rgba(0, 200, 255, 0.16);
  --glassshadow: 0 6px 14px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 200, 255, 0.08),
    0 22px 44px rgba(0, 0, 0, 0.42);
}

html[data-segment="footer"] {
  --fg: rgba(246, 246, 248, 0.5);
  --fg-soft: rgba(246, 246, 248, 0.55);
  --fg-faint: rgba(246, 246, 248, 0.38);
  --fg-muted: rgba(246, 246, 248, 0.2);
  --bg: #040507;
  --glassborder: rgba(255, 255, 255, 0.06);
  --glassshimmer: rgba(255, 255, 255, 0.03);
  --glassshadow: 0 1px 2px rgba(0, 0, 0, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.45);
}

/* ---------- liquid metal canvas ---------- */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.body {
  position: relative;
  z-index: 1;
  background: var(--lm-base);
  background-attachment: fixed;
}

.body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(0, 229, 255, 0.04) 0%,
      rgba(157, 77, 255, 0.03) 40%,
      transparent 55%),
    linear-gradient(225deg,
      rgba(120, 80, 255, 0.03) 0%,
      rgba(0, 200, 255, 0.02) 50%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
  animation: lm-shimmer 14s ease-in-out infinite alternate;
}

.body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 700px 600px at 50% 110%,
      var(--lm-cut) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
  animation: lm-pulse 9s ease-in-out infinite alternate;
}

@keyframes lm-shimmer {
  0%   { opacity: 0.85; transform: scale(1) translate(0, 0); }
  50%  { opacity: 1;    transform: scale(1.04) translate(1%, -1%); }
  100% { opacity: 0.85; transform: scale(1) translate(0, 0); }
}

@keyframes lm-pulse {
  0%   { opacity: 0.5; }
  100% { opacity: 0.95; }
}

/* ---------- glass utility ---------- */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--glassshadow);
}

.glass-md {
  border-radius: var(--radius-md);
}

.glass-sm {
  border-radius: var(--radius-sm);
}

/* ---------- navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--strip);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fg);
}

.navbar-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
  overflow: hidden;
}

.navbar-icon img { width: 100%; height: 100%; display: block; }

.navbar-links { display: flex; align-items: center; gap: 18px; }

.navbar-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-soft);
  text-decoration: none;
  transition: color 0.12s ease;
}

.navbar-links a:hover { color: var(--blue); }

.navbar-call {
  color: var(--blue) !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.navbar-cta {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff !important;
  background: var(--blue);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background 0.12s ease, transform 0.12s ease;
}

.navbar-cta:hover { background: #33e0ff; }

.navbar-cta:active { transform: scale(0.97); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-fill {
  background: var(--blue);
  color: #fff;
}

.btn-fill:hover { background: #33e0ff; }

.btn-tint {
  background: var(--bg-glass);
  color: var(--blue);
  border: 1px solid var(--glass-edge);
}

.btn-tint:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--blue-soft);
}

/* ---------- section headers ---------- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 36px 0 14px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.section-caption {
  font-size: 13px;
  color: var(--fg-faint);
  font-weight: 500;
}

/* ---------- hero ---------- */
.hero {
  padding: 44px 0 30px;
}

.hero-eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

h1.hero-title {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--fg);
  max-width: 640px;
}

.hero-sub {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--fg-soft);
  max-width: 520px;
  font-weight: 400;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- widgets ---------- */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.widget {
  position: relative;
  background: var(--bg-elevated);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--glassshadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55),
    0 0 0 1px var(--glass-edge),
    0 28px 58px rgba(0, 0, 0, 0.45);
}

.widget-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.widget-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  display: block;
  background: var(--bg-glass);
  border: 1px solid var(--strip);
  padding: 4px;
}

.widget-icon img { width: 100%; height: 100%; display: block; object-fit: contain; }

.widget-titles { flex: 1; min-width: 0; }

.widget-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--fg);
}

.widget-sub {
  font-size: 12.5px;
  color: var(--fg-faint);
  font-weight: 500;
  margin-top: 1px;
}

.widget-rows { margin-bottom: 14px; }

.widget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--strip);
  font-size: 14.5px;
}

.widget-row:last-child { border-bottom: none; }

.widget-row .k { color: var(--fg); font-weight: 500; }
.widget-row .v {
  color: var(--fg-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-glass);
  border: 1px solid var(--strip);
  color: var(--fg-soft);
}

.widget-cta { margin-top: auto; }

.order-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.order-link:hover { background: #33e0ff; }
.order-link:active { transform: scale(0.98); }

.cta-row { display: flex; gap: 8px; }

.learn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--strip-strong);
  color: var(--fg-soft);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  flex: 0 0 auto;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.learn-link:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.cta-row .order-link { width: auto; flex: 1; }

/* ---------- trust strip ---------- */
.trust-strip {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.trust-card {
  background: var(--bg-secondary);
  border: 1px solid var(--strip);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #76ff03;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(118, 255, 3, 0.5);
}

/* ---------- register widget ---------- */
.register-section { padding: 44px 0 20px; }

.register-widget {
  position: relative;
  background: linear-gradient(155deg,
      rgba(0, 229, 255, 0.12), rgba(157, 77, 255, 0.05));
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--glassshadow);
  padding: 36px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: center;
}

.register-left { flex: 1; min-width: 260px; max-width: 440px; }

.register-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--strip);
  background: var(--bg-glass);
}

.register-badge img { width: 100%; height: 100%; display: block; }

h2.register-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--fg);
}

.register-copy {
  font-size: 14.5px;
  color: var(--fg-soft);
  line-height: 1.55;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  max-width: 320px;
}

.register-form input,
.register-form select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-glass);
  border: 1px solid var(--strip-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.register-form input:focus,
.register-form select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

.register-form input::placeholder { color: var(--fg-faint); }

.register-submit {
  margin-top: 4px;
  padding: 13px 16px;
  background: var(--blue);
  border: none;
  border-radius: var(--radius-pill);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
  font-family: inherit;
}

.register-submit:hover { background: #33e0ff; }
.register-submit:active { transform: scale(0.98); }
.register-submit:disabled { opacity: 0.6; cursor: default; }

.form-note {
  font-size: 11.5px;
  color: var(--fg-faint);
  text-align: center;
}

.form-note a { color: var(--blue); text-decoration: none; }

/* ---------- footer ---------- */
footer {
  max-width: 980px;
  margin: 56px auto 0;
  padding: 24px 20px 0;
  border-top: 1px solid var(--strip);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px;
  color: var(--fg-faint);
  font-weight: 500;
}

footer a { color: var(--blue); text-decoration: none; }

footer .foot-name { color: var(--fg-soft); font-weight: 600; }

/* ---------- molecule mini-logo for navbar/product pages ---------- */
.mol-mini {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-glass);
  border: 1px solid var(--strip);
}

.mol-mini canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .side-widget { position: static; }
  .mol-card { width: 100%; }
}

@media (max-width: 640px) {
  .widget-grid { grid-template-columns: 1fr; }
  .register-widget {
    padding: 28px 22px;
    flex-direction: column;
    align-items: stretch;
  }
  .register-form { max-width: none; }
  .hero { padding: 32px 0 24px; }
}

@media (min-width: 900px) {
  .widget-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .body::before,
  .body::after {
    animation: none;
  }
}
