/* ═══════════════════════════════════════════════════════════
   Tooling Studio — styles.css (Refined)
   Theme: Matrix Slate & Electric Cyan
   Focus: Readability, Future-proof Grid, Premium Engineering Feel
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Tokens ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  /* palette */
  --bg: #050508;
  --bg-card: rgba(255, 255, 255, .03);
  --bg-card-h: rgba(255, 255, 255, .05);
  --border: rgba(0, 245, 255, .1);
  --border-h: rgba(0, 245, 255, .3);
  --text: #d1d1d6;
  --text-dim: #8a8a93;
  --accent-1: #00f5ff;
  /* Electric Cyan */
  --accent-2: #00ff9f;
  /* Emerald/Mint */
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));

  /* type */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Space Grotesk', var(--font-body);

  /* spacing */
  --section-y: 8rem;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased
}

body {
  overflow-x: hidden
}

img,
svg {
  display: block;
  max-width: 100%
}

a {
  color: inherit;
  text-decoration: none
}

strong {
  color: #fff
}

/* ── Container ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem
}

/* ── Typography ─────────────────────────────────────────── */
h1,
h2,
h3 {
  font-family: var(--font-head);
  color: #fff;
  line-height: 1.1
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -.04em
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.03em
}

h3 {
  font-size: 1.1rem;
  font-weight: 600
}

.section-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: .75rem;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem
}

.section-sub {
  color: var(--text-dim);
  margin-top: 1rem;
  font-size: .95rem
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.navbar.scrolled {
  background: rgba(5, 5, 8, .8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: .8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none
}

.nav-links a {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color .25s
}

.nav-links a:hover {
  color: var(--accent-1)
}

.nav-cta {
  padding: .5rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 245, 255, .1);
  color: var(--accent-1) !important;
  border: 1px solid rgba(0, 245, 255, .2);
  transition: all .25s;
}

.nav-cta:hover {
  background: var(--accent-1);
  color: var(--bg) !important
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 245, 255, .07), transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px
}

.hero-desc {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-top: 1.5rem;
  max-width: 600px
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 3rem
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  padding: .8rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(0, 245, 255, .2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 30px rgba(0, 245, 255, .4)
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1.5px solid var(--border-h);
}

.btn-secondary:hover {
  border-color: var(--accent-1);
  color: var(--accent-1)
}

.btn-large {
  padding: .9rem 2.2rem;
  font-size: 1rem
}

/* ── About & Services ───────────────────────────────────── */
.section {
  padding: var(--section-y) 0
}

.about-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: all .3s ease;
}

.glass-card:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3), 0 0 20px rgba(0, 245, 255, .05);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 245, 255, .05);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 245, 255, .1);
}

.glass-card h3 {
  margin-bottom: .75rem
}

.glass-card p {
  color: var(--text-dim);
  font-size: .95rem
}

/* ── COMPACT TOOLS GRID (Refined) ───────────────────────── */
.tools-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.tool-card-new {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  overflow: hidden;
}

.tool-card-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity .3s;
}

.tool-card-new:hover::before {
  opacity: 1
}

.tool-card-new:hover {
  background: rgba(255, 255, 255, .06);
  border-color: var(--border-h);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4), 0 0 30px rgba(0, 245, 255, .08);
}

.tool-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem
}

.tool-icon-sm {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tool-title-wrap h3 {
  font-size: 1.25rem;
  margin-bottom: .15rem
}

.tool-status {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: .05em
}

.tool-desc-sm {
  color: var(--text-dim);
  font-size: .9rem;
  margin-bottom: 1.5rem;
  flex-grow: 1
}

.tool-footer {
  margin-top: auto
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent-1);
  transition: gap .2s;
}

.tool-btn:hover {
  gap: .6rem;
  text-shadow: 0 0 8px rgba(0, 245, 255, .4)
}

/* ── Clients ────────────────────────────────────────────── */
.clients-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem
}

.client-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.5rem;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 30px;
}

.client-card span {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-dim)
}

.client-card:hover {
  border-color: var(--accent-2)
}

.client-card:hover span {
  color: #fff
}

/* ── CTA & Footer ───────────────────────────────────────── */
.cta {
  text-align: center;
  background: linear-gradient(to bottom, transparent, rgba(0, 245, 255, .03))
}

.cta-content {
  max-width: 600px;
  margin: 0 auto
}

.cta h2 {
  margin-bottom: 1rem
}

.cta p {
  color: var(--text-dim);
  margin-bottom: 2.5rem
}

.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
  background: rgba(0, 0, 0, .2)
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem
}

.footer p {
  font-size: .8rem;
  color: var(--text-dim)
}

.footer-links {
  display: flex;
  gap: 2rem
}

.footer-links a {
  font-size: .8rem;
  color: var(--text-dim);
  transition: color .2s
}

.footer-links a:hover {
  color: var(--accent-1)
}

/* ── Animations ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all .8s cubic-bezier(.16, 1, .3, 1)
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0)
}

/* ── Responsive ─────────────────────────────────────────── */
@media(max-width:768px) {
  :root {
    --section-y: 5rem
  }

  .nav-links {
    display: none
  }

  .hero {
    padding-top: 7rem;
    min-height: auto
  }

  .hero-buttons {
    flex-direction: column
  }

  .btn {
    width: 100%;
    justify-content: center
  }

  .tools-grid-compact {
    grid-template-columns: 1fr
  }
}

@media(min-width:1024px) {
  .tools-grid-compact {
    grid-template-columns: repeat(3, 1fr)
  }

  /* Handle 2 tools nicely by centering if less than 3 */
  .tools-grid-compact:has(:nth-child(2):last-child) {
    justify-content: center;
    grid-template-columns: repeat(2, 360px);
  }
}