/* ============================================
   Kinetex Design System
   ============================================ */

:root {
  --bg: #08080b;
  --bg-surface: #0f0f14;
  --bg-elevated: #16161d;
  --fg: #f0ece6;
  --fg-muted: #7a7780;
  --accent: #f0a030;
  --accent-dim: #c07820;
  --accent-glow: rgba(240,160,48,0.12);
  --border: rgba(240,236,230,0.08);
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--accent); color: var(--bg); }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================
   NAV
   ============================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(8,8,11,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand { display: flex; flex-direction: column; gap: 2px; }
.nav-logo-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.nav-logo-link:hover { text-decoration: none; }
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.nav-tagline {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
}

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-cta {
  padding: 8px 20px;
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s !important;
}
.nav-cta:hover { background: var(--accent) !important; color: var(--bg) !important; text-decoration: none !important; }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: center;
  padding: 0 48px;
  padding-top: 100px;
  gap: 60px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(240,160,48,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 640px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Grid display visual */
.hero-visual { position: relative; }
.grid-display {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.grid-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
}
.grid-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.grid-numbers span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-align: center;
  padding: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-dim); color: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--fg-muted); color: var(--fg); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: var(--bg); }

.btn-sm { padding: 8px 20px; font-size: 0.8rem; }
.btn-lg { padding: 16px 40px; font-size: 1rem; }

/* ============================================
   PRODUCTS SECTION
   ============================================ */
.products-section {
  padding: 80px 48px;
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.section-header p {
  color: var(--fg-muted);
  font-size: 1rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card:hover {
  border-color: rgba(240,160,48,0.3);
  transform: translateY(-2px);
}

.product-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.product-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.placeholder-grid {
  width: 80px;
  height: 80px;
  border: 2px solid var(--border);
  border-radius: 4px;
  position: relative;
}
.placeholder-grid::before,
.placeholder-grid::after {
  content: '';
  position: absolute;
  background: var(--border);
}
.placeholder-grid::before {
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}
.placeholder-grid::after {
  top: 50%; left: 0; right: 0;
  height: 1px;
  transform: translateY(-50%);
}

.product-card-body { padding: 24px; }
.product-card-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.product-card-tagline {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.5;
}
.product-card-footer { display: flex; }

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: 80px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(240,160,48,0.03));
}
.cta-inner { max-width: 540px; margin: 0 auto; }
.cta-inner h2 { font-size: 2rem; margin-bottom: 16px; }
.cta-inner p { color: var(--fg-muted); margin-bottom: 32px; }

/* ============================================
   PRODUCT DETAIL
   ============================================ */
.product-detail {
  flex: 1;
  padding: 120px 48px 80px;
}
.product-detail-inner {
  max-width: 900px;
  margin: 0 auto;
}

.product-detail-header { margin-bottom: 48px; }
.back-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  display: inline-block;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--fg); text-decoration: none; }
.product-detail-header h1 { font-size: 2.5rem; margin-bottom: 12px; }
.product-tagline { color: var(--fg-muted); font-size: 1.1rem; }

.product-detail-body { display: flex; flex-direction: column; gap: 48px; }
.product-detail-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.product-description h2,
.product-features h2,
.product-pricing h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.product-description p { color: var(--fg-muted); line-height: 1.8; }

.product-features ul { display: grid; gap: 12px; }
.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--fg-muted);
}
.product-features li::before {
  content: '→';
  font-family: var(--font-mono);
  color: var(--accent);
  flex-shrink: 0;
}

/* Pricing tiers */
.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.pricing-tier {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.pricing-tier-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.pricing-tier-price { margin-bottom: 16px; }
.price-value {
  font-size: 1.8rem;
  font-weight: 700;
}
.price-interval {
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.price-contact {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.tier-features { display: flex; flex-direction: column; gap: 8px; }
.tier-features li {
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.tier-features li::before { content: '✓ '; color: var(--accent); }

.product-cta { padding-top: 16px; }

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-section {
  flex: 1;
  padding: 120px 48px 80px;
}
.contact-inner {
  max-width: 640px;
  margin: 0 auto;
}
.contact-header { margin-bottom: 40px; }
.contact-header h1 { font-size: 2.2rem; margin-bottom: 12px; }
.contact-header p { color: var(--fg-muted); }

.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}
.required { color: var(--accent); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--fg-muted); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg-surface); }
.form-group textarea { resize: vertical; }

.form-success {
  text-align: center;
  padding: 48px 0;
}
.success-icon { margin-bottom: 24px; }
.form-success h3 { font-size: 1.5rem; margin-bottom: 12px; }
.form-success p { color: var(--fg-muted); margin-bottom: 32px; }

/* ============================================
   ERROR / 404
   ============================================ */
.error-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 48px 80px;
}
.error-inner { text-align: center; }
.error-inner h1 { font-size: 5rem; color: var(--accent); margin-bottom: 12px; }
.error-inner p { color: var(--fg-muted); margin-bottom: 32px; }

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-links a:hover { color: var(--fg); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-muted);
  width: 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  .hero {
    grid-template-columns: 1fr;
    padding: 100px 24px 60px;
    min-height: auto;
    gap: 40px;
  }
  .hero-visual { display: none; }
  .products-section { padding: 60px 24px; }
  .cta-section { padding: 60px 24px; }
  .product-detail { padding: 100px 24px 60px; }
  .contact-section { padding: 100px 24px 60px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 480px) {
  .nav-links { gap: 16px; }
  .hero-actions { flex-direction: column; }
  .products-grid { grid-template-columns: 1fr; }
  .pricing-tiers { grid-template-columns: 1fr; }
}