/* ========== Keiron Enterprises — Premium Industrial Tech ========== */

:root {
  --bg: #0a0404;
  --bg-2: #120606;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --text: #fff5f5;
  --muted: #b8a0a0;
  --accent: #cc2222;
  --accent-2: #e05555;
  --accent-glow: 0 0 40px rgba(204,34,34,0.5);
  --grad: linear-gradient(120deg, #a81010 0%, #cc2222 50%, #e84444 100%);
  --grad-soft: linear-gradient(180deg, rgba(204,34,34,0.10), rgba(204,34,34,0));
  --radius: 16px;
  --container: 1200px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 500px at 80% -10%, rgba(204,34,34,0.18), transparent 60%),
    radial-gradient(700px 400px at 0% 30%, rgba(180,20,20,0.12), transparent 60%),
    linear-gradient(180deg, #0a0404 0%, #080305 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.2rem; }
p { color: var(--muted); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid rgba(204,34,34,0.3);
  border-radius: 999px;
  background: rgba(204,34,34,0.06);
  margin-bottom: 18px;
}

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font-weight: 600;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  font-size: 0.95rem; letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--grad); color: #1a0a00;
  box-shadow: 0 10px 30px -10px rgba(204,34,34,0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -12px rgba(204,34,34,0.7); }
.btn-ghost {
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text); background: rgba(255,255,255,0.03);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); transform: translateY(-2px); }
.btn.full { width: 100%; }

/* Preloader */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .6s ease, visibility .6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-bolt svg {
  width: 70px; height: 70px;
  fill: var(--accent);
  filter: drop-shadow(0 0 20px var(--accent));
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.6; }
}

/* Scroll progress */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 1000;
  box-shadow: 0 0 12px rgba(204,34,34,0.6);
  transition: width .1s linear;
}

/* Navbar */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(6,8,15,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.45rem;
}
.brand em { font-style: normal; color: var(--accent); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--grad); color: #1a0a00;
  border-radius: 10px; font-weight: 800;
  box-shadow: var(--accent-glow);
}
.brand-logo {
  width: 38px; height: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 0.92rem; color: var(--muted); position: relative;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--grad);
  transition: width .3s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  padding: 10px 18px; border-radius: 999px; background: var(--grad);
  color: #1a0a00 !important; font-weight: 600;
  box-shadow: 0 8px 24px -10px rgba(204,34,34,0.6);
}
.nav-cta:hover { transform: translateY(-1px); }

.hamburger {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
}
.hamburger span {
  width: 24px; height: 2px; background: var(--text);
  transition: transform .3s var(--ease), opacity .3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 70% 30%, rgba(204,34,34,0.25), transparent 70%),
    radial-gradient(50% 60% at 20% 70%, rgba(180,20,20,0.18), transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 80%);
}
.bolt-glow {
  position: absolute; top: 20%; right: 10%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(204,34,34,0.35), transparent 60%);
  filter: blur(40px); animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-content h1 { margin-bottom: 22px; }
.hero-sub { max-width: 720px; margin: 0 auto 36px; font-size: 1.1rem; color: #b8c2d6; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 70px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 1000px; margin: 0 auto;
}
.stat-card { padding: 24px; text-align: center; transition: transform .3s var(--ease); }
.stat-card:hover { transform: translateY(-4px); }
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 4px; }

/* Sections */
.section { padding: 110px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.section-head h2 { margin-bottom: 14px; }

.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center;
}
.two-col.reverse .col-text { order: 2; }
.two-col.reverse .quote-form { order: 1; }
.col-text .eyebrow { margin-bottom: 18px; }
.col-text h2 { margin-bottom: 20px; }
.col-text p { margin-bottom: 24px; }

.media-frame {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -30px rgba(204,34,34,0.25);
}
.media-frame img { aspect-ratio: 4/5; object-fit: cover; transition: transform .8s var(--ease); }
.media-frame:hover img { transform: scale(1.05); }
.media-badge {
  position: absolute; bottom: 20px; left: 20px;
  padding: 10px 16px; font-size: 0.8rem; font-weight: 600;
  border-radius: 999px;
}

.check-list li {
  position: relative; padding-left: 30px; margin-bottom: 12px; color: #cdd5e6;
}
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(204,34,34,0.5);
}
.check-list li::after {
  content: '✓'; position: absolute; left: 4px; top: 5px;
  color: #1a0a00; font-weight: 800; font-size: 0.75rem;
}

/* Grids */
.grid { display: grid; gap: 22px; }
.services-grid { grid-template-columns: repeat(3, 1fr); }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.testi-grid { grid-template-columns: repeat(3, 1fr); }

/* Service card */
.service-card {
  padding: 32px; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-soft); opacity: 0; transition: opacity .35s;
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(204,34,34,0.35); box-shadow: 0 20px 50px -20px rgba(204,34,34,0.35); }
.service-card:hover::before { opacity: 1; }
.svc-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(204,34,34,0.18), rgba(180,20,20,0.1));
  border: 1px solid rgba(204,34,34,0.25);
  margin-bottom: 18px; position: relative;
}
.service-card h3 { margin-bottom: 8px; position: relative; }
.service-card p { font-size: 0.95rem; position: relative; }

/* Feature */
.feature {
  padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent);
  transition: transform .3s var(--ease), border-color .3s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(204,34,34,0.3); }
.feat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 10px;
}
.feature h4 { font-size: 1.1rem; margin-bottom: 6px; }
.feature p { font-size: 0.92rem; }

/* Masonry */
.masonry {
  columns: 3; column-gap: 18px;
}
.m-item {
  display: block; margin-bottom: 18px; break-inside: avoid;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.m-item img {
  width: 100%; transition: transform .7s var(--ease);
}
.m-item.tall img { aspect-ratio: 3/4; object-fit: cover; }
.m-item.wide img { aspect-ratio: 16/9; object-fit: cover; }
.m-item:hover img { transform: scale(1.08); }
.m-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(204,34,34,0.18));
  opacity: 0; transition: opacity .3s;
}
.m-item:hover::after { opacity: 1; }

/* Testimonials */
.testi { padding: 30px; transition: transform .3s var(--ease); }
.testi:hover { transform: translateY(-4px); }
.testi p { color: #d8dff0; font-size: 1rem; margin-bottom: 20px; }
.testi footer { display: flex; flex-direction: column; }
.testi strong { color: var(--text); }
.testi span { color: var(--muted); font-size: 0.85rem; }

/* Form */
.quote-form { padding: 36px; }
.quote-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field label {
  font-size: 0.82rem; color: var(--muted); margin-bottom: 8px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: inherit; font-size: 0.95rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  background: rgba(204,34,34,0.06);
  box-shadow: 0 0 0 3px rgba(204,34,34,0.15);
}
.field textarea { resize: vertical; min-height: 110px; }
.field select option { background: var(--bg-2); color: var(--text); }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 12px; text-align: center; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 70px 0 30px;
  background: linear-gradient(180deg, transparent, rgba(204,34,34,0.04));
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px;
  margin-bottom: 40px;
}
.footer h5 {
  font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); margin-bottom: 16px;
}
.footer .muted { margin-top: 14px; font-size: 0.92rem; max-width: 320px; }
.footer-list li { margin-bottom: 8px; color: var(--muted); font-size: 0.92rem; }
.footer-list a { color: var(--muted); }
.footer-list a:hover { color: var(--accent); }
.footer-address { line-height: 1.7; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  color: var(--muted); transition: all .25s;
}
.socials a:hover { background: var(--grad); color: #1a0a00; border-color: transparent; transform: translateY(-2px); }
.copyright { padding-top: 24px; border-top: 1px solid var(--border); text-align: center; color: var(--muted); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .services-grid, .feature-grid, .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .masonry { columns: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 70px; right: 16px; left: 16px;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 18px;
    background: rgba(6,8,15,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transform: translateY(-20px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 14px; border-radius: 10px; }
  .nav-links a:hover { background: rgba(255,255,255,0.05); }
  .nav-cta { text-align: center; margin-top: 6px; }
  .hamburger { display: flex; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .two-col.reverse .col-text { order: 0; }
  .two-col.reverse .quote-form { order: 0; }
  .services-grid, .feature-grid, .testi-grid { grid-template-columns: 1fr; }
  .quote-form .row { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .hero { padding: 120px 0 60px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
