:root {
  --primary: #a855f7;
  /* Premium Electric Purple */
  --primary-rgb: 168, 85, 247;
  --bg-dark: #f6f3eb;
  --bg-surface: #ffffff;
  --text-main: #1c1c24;
  --text-muted: #64748b;
  --nav-height: 80px;
  --font-display: 'Outfit', 'Inter', sans-serif;
  --glass: rgba(28, 28, 36, 0.02);
  --glass-border: rgba(28, 28, 36, 0.08);
  --glow: 0 0 25px rgba(168, 85, 247, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-display);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── NOISE OVERLAY ─── */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
}

/* ─── NAVIGATION ─── */
.main-nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(246, 243, 235, 0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--text-main);
}

.nav-logo::after {
  content: ".";
  color: var(--primary);
}

.btn-explore-top {
  font-size: 0.72rem;
  text-decoration: none;
  border: 1.5px solid var(--primary);
  color: var(--primary) !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: transparent;
  transition: all 0.3s ease;
}

.btn-explore-top:hover {
  background: var(--primary);
  color: white !important;
  box-shadow: var(--glow);
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

/* ─── SCROLL CONTAINER ─── */
.scroll-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none; /* Firefox */
}

.scroll-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.snap-section {
  scroll-snap-align: start;
  width: 100%;
  height: 100vh;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* ─── REVEAL ANIMATION ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ─── HERO ─── */
.hero-inner {
  padding: 0 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: calc(100vh - var(--nav-height));
}

.hero-text {
  flex: 1;
  z-index: 2;
  max-width: 550px;
}

.tech-tag {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 4px;
}

.hero-text h1 {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -2px;
  margin-left: -5px;
  color: var(--text-main);
  margin-bottom: 2rem;
}

.hero-text h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(15, 23, 42, 0.2);
  animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% {
    -webkit-text-stroke: 1.5px rgba(15, 23, 42, 0.15);
    text-shadow: none;
  }
  50% {
    -webkit-text-stroke: 1.5px var(--primary);
    text-shadow: var(--glow);
  }
}

.hero-img-container {
  position: absolute;
  right: 5%;
  top: calc(var(--nav-height) + 20px);
  bottom: 40px;
  width: 48%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.phone-stack {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.phone-wrapper {
  position: relative;
  width: 90%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.phone-wrapper img {
  width: 100%;
  max-height: calc(100vh - var(--nav-height) - 100px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(168,85,247,0.15);
  border: 1px solid var(--glass-border);
  filter: brightness(0.9);
  transition: 0.6s;
}

.p-right {
  z-index: 2;
  animation: float 6s ease-in-out infinite;
}

.phone-wrapper:hover img {
  filter: brightness(1.05);
  transform: scale(1.015);
  border-color: var(--primary);
  box-shadow: 0 30px 70px rgba(0,0,0,0.7), 0 0 50px rgba(168,85,247,0.3);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}

/* ─── SPLIT SECTIONS (Editorial Style) ─── */
.side-left,
.side-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6rem;
  height: 100%;
  position: relative;
  z-index: 2;
}

.bg-number {
  position: absolute;
  font-size: 18rem;
  font-weight: 900;
  color: rgba(168, 85, 247, 0.045);
  top: -5%;
  left: 2rem;
  z-index: -1;
  user-select: none;
}

.section-label {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.section-title-large {
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2rem;
  letter-spacing: -1px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 480px;
  line-height: 1.65;
}

/* ─── CARDS ─── */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

.content-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 2.2rem;
  border-radius: 8px;
  transition: all 0.4s ease;
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.content-card:hover {
  background: rgba(168, 85, 247, 0.03);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  transform: translateX(6px);
}

.card-num {
  font-size: 1.8rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 50%;
}

.content-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

/* ─── FEATURE GRID ─── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  width: 100%;
}

.feature-card-small {
  background: var(--glass);
  padding: 2.2rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  transition: all 0.4s ease;
}

.feature-card-small:hover {
  background: #0f172a;
  border-color: #0f172a;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
  transform: translateY(-6px);
}

.feature-card-small:hover * {
  color: #ffffff !important;
}

.feature-icon-box {
  margin-bottom: 1.5rem;
  font-size: 2.2rem;
}

.feature-icon-box i {
  transition: 0.3s;
}

.feature-card-small h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.feature-card-small p {
  font-size: 0.85rem;
  line-height: 1.5;
}

.chat-role {
  font-size: 0.68rem;
  font-weight: 900;
  margin-bottom: 0.8rem;
  display: block;
  letter-spacing: 2px;
}

.text-cyan { color: #06b6d4; }
.text-green { color: #10b981; }
.text-purple { color: #a855f7; }

/* ─── TECHNICAL STACK PANEL ─── */
.tech-stack-panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 3rem;
  border-radius: 12px;
  width: 100%;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

.tech-stack-panel h3 {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 2rem;
  letter-spacing: 2px;
  color: var(--primary);
  border-bottom: 2px solid rgba(168, 85, 247, 0.2);
  padding-bottom: 10px;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.stack-list span {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c084fc;
  transition: all 0.3s ease;
}

.stack-list span:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

/* ─── UTILIZATION TABLE ─── */
.util-table {
  width: 100%;
  margin-top: 2rem;
}

.util-row {
  display: flex;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--glass-border);
  gap: 1.5rem;
}

.col-step {
  flex: 1;
  font-weight: 900;
  color: var(--primary);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.col-purpose {
  flex: 3;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ─── PROGRESS BAR ─── */
.progress-container {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 1001;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #d8b4fe 100%);
  width: 0%;
}

/* ─── MOBILE RESPONSIVE ─── */
@media (max-width: 768px) {
  :root {
    --nav-height: 65px;
  }

  .main-nav {
    padding: 0 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .snap-section {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding-top: var(--nav-height);
    scroll-snap-align: none;
    display: block;
  }

  .scroll-container {
    scroll-snap-type: none;
    overflow-y: auto;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 1.5rem;
    height: auto;
  }

  .hero-text h1 {
    font-size: 3.2rem !important;
  }

  .hero-img-container {
    position: relative;
    width: 100%;
    right: 0;
    bottom: 0;
    margin-top: 2.5rem;
    height: 320px;
    padding-bottom: 2rem;
  }

  .phone-stack {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
  }

  .phone-wrapper {
    width: 90% !important;
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
  }

  .side-left, .side-right {
    padding: 4rem 1.5rem !important;
    width: 100%;
    flex: none;
    height: auto;
  }

  .section-title-large {
    font-size: 2.6rem !important;
  }

  .bg-number {
    font-size: 9rem;
    left: 1rem;
    top: 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card-small {
    grid-column: span 1 !important;
  }

  .util-row {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.2rem 0;
  }

  .col-step {
    font-size: 0.78rem;
  }

  footer h1 {
    font-size: 13vw !important;
  }
}
