/* unitotal.com — site-wide refinements layered on top of Tailwind */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ut-bg: #ffffff;
  --ut-surface: #fafafa;
  --ut-fg: #0a0a0a;
  --ut-muted: #525252;
  --ut-line: #e5e5e5;
  --ut-accent: #4f46e5;
  --ut-accent-soft: #eef2ff;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--ut-bg);
  color: var(--ut-fg);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.font-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Fluid display type */
.display-xl { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -0.04em; font-weight: 700; }
.display-lg { font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.display-md { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }

/* Subtle dot-grid hero background */
.dot-grid {
  background-image: radial-gradient(circle at 1px 1px, rgba(10,10,10,0.08) 1px, transparent 0);
  background-size: 24px 24px;
}
.dot-grid-fade {
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 75%);
}

/* Mesh-ish radial gradients used as hero glow */
.aura-indigo {
  background:
    radial-gradient(circle at 20% 10%, rgba(79,70,229,0.18), transparent 45%),
    radial-gradient(circle at 80% 15%, rgba(168,85,247,0.14), transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(56,189,248,0.10), transparent 50%);
}

/* Frosted nav */
.nav-glass {
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(10,10,10,0.06);
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1.125rem; border-radius: 9999px; font-weight: 500; font-size: 0.9375rem; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease; white-space: nowrap; }
.btn-primary { background: var(--ut-fg); color: #fff; }
.btn-primary:hover { background: #262626; transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(10,10,10,.35); }
.btn-secondary { background: #fff; color: var(--ut-fg); border: 1px solid var(--ut-line); }
.btn-secondary:hover { background: var(--ut-surface); border-color: #d4d4d4; }
.btn-ghost { color: var(--ut-fg); }
.btn-ghost:hover { background: var(--ut-surface); }
.btn-accent { background: var(--ut-accent); color: #fff; }
.btn-accent:hover { background: #4338ca; transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(79,70,229,.55); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

/* Product cards — subtle colored halo on hover */
.product-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ut-line);
  border-radius: 20px;
  padding: 1.75rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.product-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), var(--halo, rgba(79,70,229,0.10)), transparent 40%);
  opacity: 0; transition: opacity .3s ease;
  pointer-events: none;
}
.product-card:hover { transform: translateY(-3px); border-color: #d4d4d4; box-shadow: 0 24px 50px -22px rgba(10,10,10,0.18); }
.product-card:hover::before { opacity: 1; }

/* Reveal — CSS-only fade-up. Always ends visible. */
@keyframes ut-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.reveal { animation: ut-fade-up .7s ease both; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
}

/* Nav link */
.nav-link { color: #404040; font-size: 0.9375rem; padding: 0.4rem 0.75rem; border-radius: 8px; transition: background .15s ease, color .15s ease; }
.nav-link:hover { background: var(--ut-surface); color: var(--ut-fg); }
.nav-link.is-active { color: var(--ut-fg); font-weight: 500; }

/* Mega menu */
.mega-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-6px);
  width: min(640px, calc(100vw - 32px));
  background: #fff; border: 1px solid var(--ut-line); border-radius: 16px;
  box-shadow: 0 30px 60px -20px rgba(10,10,10,0.18);
  padding: 0.75rem; opacity: 0; visibility: hidden; transition: all .2s ease;
}
.has-mega:hover .mega-menu, .has-mega:focus-within .mega-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.mega-item { display: flex; gap: 0.875rem; padding: 0.75rem; border-radius: 12px; transition: background .15s ease; }
.mega-item:hover { background: var(--ut-surface); }
.mega-item .mega-logo { flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--ut-surface); display: grid; place-items: center; overflow: hidden; }
.mega-item .mega-logo img { max-width: 26px; max-height: 26px; }

/* Footer */
.footer-link { color: #a3a3a3; font-size: 0.9375rem; transition: color .15s ease; }
.footer-link:hover { color: #fff; }

/* Hide tailwind cdn warning */
.tw-cdn-warning, [data-tw-cdn-warning] { display: none !important; }

/* Inline code chip */
.kbd {
  display: inline-flex; align-items: center; padding: 0.125rem 0.5rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
  background: var(--ut-surface); border: 1px solid var(--ut-line); border-radius: 6px; color: var(--ut-muted);
}

/* Feature tile */
.feature-tile { padding: 1.5rem; border: 1px solid var(--ut-line); border-radius: 16px; background: #fff; transition: border-color .2s ease, transform .2s ease; }
.feature-tile:hover { border-color: #d4d4d4; transform: translateY(-2px); }

/* Section padding */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }

/* Decorative gradient text */
.gradient-text {
  background: linear-gradient(120deg, #4f46e5 0%, #a855f7 50%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Avoid layout shift from fonts loading */
@supports (font-display: swap) {
  body { font-display: swap; }
}
