/* === CSS RESET & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Theme: Dark (Machinal Instinct) */
  --bg: #0d0d0d;
  --bg-alt: #16161a;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #f59e0b; /* Bright Amber from icon vibes */
  --accent-glow: rgba(245, 158, 11, 0.5);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px; /* For phone frames */
  --shadow-glass: 0 8px 32px 0 rgba(0,0,0,0.5);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
  --container-width: 1240px;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: clip;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  object-fit: cover;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

/* === STRUCTURAL BASELINES === */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 5%;
  width: 100%;
}

section {
  padding: 100px 0;
  position: relative;
  overflow: clip;
}

@media (max-width: 768px) {
  section { padding: 60px 0; }
  .glass-panel { padding: 1.5rem; }
}

/* === PREMIUM UI BLOCKS === */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-glass);
}

.btn-pill {
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--text);
  padding: 1rem 2.5rem;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pill:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* === ANIMATED MESH BACKGROUND === */
.mesh-gradient {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  background:
    radial-gradient(at 0% 0%, rgba(245, 158, 11, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(30, 58, 138, 0.2) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(245, 158, 11, 0.1) 0px, transparent 50%);
  filter: blur(80px);
  animation: mesh-move 20s infinite alternate;
}

@keyframes mesh-move {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.1) translate(2%, 2%); }
  100% { transform: scale(1) translate(-1%, 1%); }
}

/* === HEADER / NAV === */
.machinal-nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all 0.4s ease;
}

.machinal-nav.scrolled {
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--glass-border);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
}

.nav-logo {
  width: 36px; height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
}

.mobile-menu-btn {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--accent);
}

/* === HERO SECTION === */
.mech-hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 80px;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 1rem;
  background: linear-gradient(to bottom, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 0.9;
}

.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--glass-bg);
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2rem;
}

.hero-logo-large {
  width: 80px; height: 80px;
  object-fit: contain;
  border-radius: 20px;
  margin: 2rem auto;
  box-shadow: 0 0 30px var(--accent-glow);
}

.hero-ctas {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* === SCREENSHOT GALLERY === */
.arena-gallery {
  background: var(--bg-alt);
}

.mockup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 4rem;
}

.phone-frame {
  position: relative;
  border: 4px solid #333;
  border-radius: var(--radius-xl);
  padding: 8px;
  background: #000;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.phone-frame::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 40%; height: 18px;
  background: #333;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  z-index: 2;
}

.phone-frame img {
  width: 100%;
  border-radius: 32px;
  display: block;
}

.phone-frame:nth-child(odd) { transform: rotate(-3deg); }
.phone-frame:nth-child(even) { transform: rotate(3deg); }
.phone-frame:hover { transform: rotate(0) scale(1.05); z-index: 10; }

/* === FEATURES === */
.feature-row {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 80px;
}

.feature-row:nth-child(even) { flex-direction: row-reverse; }

.feature-content { flex: 1; }
.feature-visual {
  flex: 1;
  height: 400px;
  border-radius: var(--radius-lg);
  background: linear-gradient(45deg, var(--accent), #1e3a8a);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.feature-visual img {
  max-width: 80%;
  transform: rotate(-5deg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.feature-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature-title { font-size: 2.5rem; margin-bottom: 1.5rem; color: #fff; }

@media (max-width: 992px) {
  .feature-row, .feature-row:nth-child(even) { flex-direction: column; text-align: center; }
  .feature-visual { width: 100%; }
}

/* === STATS BAR === */
.stats-bar {
  background: var(--accent);
  color: #000;
  padding: 4rem 0;
  clip-path: polygon(0 15%, 100% 0, 100% 85%, 0 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 20px;
}

.stat-number { font-size: 3.5rem; font-weight: 800; display: block; }
.stat-label { font-size: 1rem; font-weight: 700; text-transform: uppercase; opacity: 0.8; }

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .stats-bar { clip-path: none; padding: 60px 0; }
}

/* === REVIEWS === */
.reviews-section {
  background: var(--bg);
}

.reviews-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
  align-items: start;
}

.featured-review {
  grid-row: span 2;
}

.review-card {
  padding: 2rem;
}

.review-quote { font-size: 3rem; color: var(--accent); line-height: 1; margin-bottom: 1rem; }
.review-text { font-style: italic; font-size: 1.1rem; margin-bottom: 1.5rem; }
.review-stars { color: var(--accent); margin-bottom: 1rem; }
.review-author { font-weight: 700; color: #fff; }

@media (max-width: 992px) {
  .reviews-layout { grid-template-columns: 1fr; }
}

/* === DOWNLOAD CTA === */
.download-section {
  padding: 150px 0;
}

.cta-glass-card {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-logo { width: 100px; height: 100px; border-radius: 24px; margin: 0 auto 2rem; }

/* === FOOTER === */
.machinal-footer {
  background: #050505;
  padding: 80px 0 40px;
  border-top: 1px solid var(--glass-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .nav-logo { width: 24px; height: 24px; margin-bottom: 1rem; }

.footer-col h4 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}

/* === ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

/* Sticky Banner */
.sticky-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  transform: translateY(150%);
  transition: transform 0.5s ease;
}

.sticky-banner.visible { transform: translateY(0); }

.floating-cta {
  background: var(--accent);
  color: #000;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* SAWTOOTH DIVIDER */
.sawtooth {
  position: absolute;
  left: 0; width: 100%; height: 50px;
  background: var(--bg);
  z-index: 5;
}

.saw-top { top: -25px; clip-path: polygon(0 100%, 5% 0, 10% 100%, 15% 0, 20% 100%, 25% 0, 30% 100%, 35% 0, 40% 100%, 45% 0, 50% 100%, 55% 0, 60% 100%, 65% 0, 70% 100%, 75% 0, 80% 100%, 85% 0, 90% 100%, 95% 0, 100% 100%); }
.saw-bottom { bottom: -25px; clip-path: polygon(0 0, 5% 100%, 10% 0, 15% 100%, 20% 0, 25% 100%, 30% 0, 35% 100%, 40% 0, 45% 100%, 50% 0, 55% 100%, 60% 0, 65% 100%, 70% 0, 75% 100%, 80% 0, 85% 100%, 90% 0, 95% 100%, 100% 0); }
