/* =============================================
   INSTRUSYNC STUDIO — Premium & Clean UI
============================================= */
:root {
  --bg:    #0a0a0b;
  --bg2:   #121214;
  --fg:    #ffffff;
  --y:     #C9FF47;
  --dim:   #a0a0a5;
  --sep:   #2a2a2e;
  --pad:   clamp(20px, 5vw, 60px);
  --r:     12px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* NAVBAR */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 20px var(--pad); display: flex; justify-content: space-between; align-items: center;
  background: rgba(10, 10, 11, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: all 0.3s ease;
}
#navbar.scrolled { border-bottom: 1px solid var(--sep); }
.nav-logo { font-size: 18px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-logo span { color: var(--y); }
.nav-links { display: flex; gap: 32px; list-style: none;}
.nav-links a { font-size: 14px; font-weight: 500; color: var(--dim); transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }

/* HERO SECTION */
#hero {
  height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad); position: relative; overflow: hidden;
}
.hero-reel { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #000; }
.hero-reel iframe {
  position: absolute; top: 50%; left: 50%; width: 100vw; height: 100vh;
  transform: translate(-50%, -50%) scale(1.5); pointer-events: none;
}
@media (min-aspect-ratio: 16/9) { .hero-reel iframe { height: 300vw; } }
@media (max-aspect-ratio: 16/9) { .hero-reel iframe { width: 300vh; } }
.hero-reel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,11,0.6) 0%, var(--bg) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 800px; margin-top: 60px; }
.hero-badge {
  display: inline-block; background: rgba(255, 255, 255, 0.08); padding: 6px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg); margin-bottom: 20px; border-radius: 100px; backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
}
.hero-title { font-size: clamp(36px, 6vw, 72px); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero-sub { font-size: clamp(16px, 1.5vw, 20px); color: #d0d0d5; max-width: 600px; margin-bottom: 40px; }

/* SECTIONS */
.section { padding: 100px var(--pad); max-width: 1200px; margin: 0 auto; }
.dark-bg { background: var(--bg2); max-width: none; border-top: 1px solid var(--sep); border-bottom: 1px solid var(--sep);}
.dark-bg .demo-container, .dark-bg .order-grid, .dark-bg > .reveal { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }
.sec-label { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--y); display: flex; margin-bottom: 12px; }
.sec-title { font-size: clamp(28px, 4vw, 48px); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.sec-sub { color: var(--dim); font-size: 16px; margin-bottom: 40px; max-width: 500px; }

/* GRID & CARDS */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.role-card { background: var(--bg2); padding: 32px; border-radius: var(--r); border: 1px solid var(--sep); }
.role-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--y); }
.role-desc { font-size: 15px; color: var(--dim); line-height: 1.7; }

/* ==========================================
   HOW IT WORKS (1:1 ASPECT RATIO PIPELINE) 
========================================== */
.demo-container {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 60px 48px; border-radius: 24px; position: relative;
}
.glass-panel {
  background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
}

.demo-box { flex: 1; display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 380px; z-index: 2; position: relative; }
.demo-label { font-size: 15px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; text-align: center; margin-top: auto;}

.floating-badge {
  position: absolute; top: 12px; left: 12px; z-index: 10;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 6px 14px; border-radius: 8px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid rgba(255,255,255,0.15); color: #fff;
}
.floating-badge.highlight {
  background: rgba(201,255,71,0.15); color: var(--y); border-color: rgba(201,255,71,0.4);
}

.demo-media-wrap { 
  border-radius: 16px; padding: 10px; background: rgba(0,0,0,0.4); 
  border: 1px solid rgba(255,255,255,0.08); 
  aspect-ratio: 1 / 1; /* Updated to 1:1 */
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.demo-media { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.video-wrap video { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }

.output-box { position: relative; }
.glow-backdrop {
  position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,255,71,0.15) 0%, transparent 60%);
  z-index: -1; filter: blur(20px); pointer-events: none;
}

/* ANIMATED CENTER PIPELINE */
.demo-pipeline {
  flex: 0.8; display: flex; flex-direction: column; gap: 40px; align-items: center; position: relative; z-index: 1;
}
.animated-line {
  position: absolute; top: 5%; bottom: 5%; left: 50%; width: 2px; 
  background: rgba(255,255,255,0.05); transform: translateX(-50%); z-index: -1;
  overflow: hidden;
}
.animated-line::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 40%;
  background: linear-gradient(to bottom, transparent, var(--y), transparent);
  animation: flowDown 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes flowDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(300%); }
}

.pipeline-step {
  display: flex; align-items: center; gap: 16px;
  background: rgba(0,0,0,0.4); padding: 12px 24px 12px 12px; border-radius: 100px; 
  border: 1px solid rgba(255,255,255,0.08); width: 240px; transition: all 0.3s ease;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.pipeline-step:hover {
  transform: scale(1.05); border-color: rgba(201,255,71,0.3); background: rgba(0,0,0,0.6);
}
.icon-circle {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; color: var(--y);
  border: 1px solid rgba(201, 255, 71, 0.2); box-shadow: 0 0 15px rgba(201, 255, 71, 0.05);
  transition: all 0.3s ease; flex-shrink: 0;
}
.pipeline-step:hover .icon-circle {
  box-shadow: 0 0 20px rgba(201, 255, 71, 0.3); transform: rotate(5deg);
}
.step-text { display: flex; flex-direction: column; }
.step-text strong { font-size: 14px; font-weight: 700; color: var(--fg); letter-spacing: 0.05em; line-height: 1.2;}
.step-text span { font-size: 12px; color: var(--dim); margin-top: 2px;}

/* ==========================================
   PRICING UI 
========================================== */
.pricing-intro { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; margin-bottom: 60px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card { 
  background: var(--bg2); padding: 48px 32px; border-radius: 24px; border: 1px solid var(--sep); 
  display: flex; flex-direction: column; transition: transform 0.3s, border-color 0.3s;
}
.price-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.2); }
.price-card.featured { 
  border-color: var(--y); background: linear-gradient(180deg, rgba(201, 255, 71, 0.03) 0%, var(--bg2) 100%); 
  position: relative; box-shadow: 0 20px 40px rgba(201, 255, 71, 0.05);
}
.price-card.featured:hover { border-color: var(--y); }
.price-featured-tag { 
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); 
  background: var(--y); color: #000; font-size: 12px; font-weight: 800; padding: 6px 16px; 
  border-radius: 100px; text-transform: uppercase; white-space: nowrap; letter-spacing: 0.05em;
}
.price-header { border-bottom: 1px solid var(--sep); padding-bottom: 24px; margin-bottom: 24px; }
.price-duration { font-size: 14px; color: var(--dim); margin-bottom: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;}
.price-main { font-size: 56px; font-weight: 800; margin-bottom: 12px; line-height: 1; color: var(--fg); }
.price-main sup { font-size: 24px; vertical-align: super; top: -0.5em; color: var(--dim); }
.price-desc { font-size: 14px; color: var(--dim); line-height: 1.6; }

.price-features { list-style: none; margin-bottom: 40px; flex-grow: 1; display: flex; flex-direction: column; gap: 16px;}
.price-features li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #d0d0d5; }
.price-features svg { width: 18px; height: 18px; color: var(--y); flex-shrink: 0; }

.price-btn { 
  width: 100%; padding: 16px; background: transparent; border: 1px solid var(--sep); 
  color: var(--fg); font-weight: 600; font-size: 15px; border-radius: 100px; transition: all 0.3s; 
}
.price-btn:hover { background: var(--y); color: #000; border-color: var(--y); }
.price-card.featured .price-btn { background: var(--y); color: #000; border-color: var(--y); }

/* FORMS & ORDER */
.order-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: start;}
.form-group { margin-bottom: 24px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--dim); margin-bottom: 8px; }
input, textarea { width: 100%; padding: 16px; background: var(--bg); border: 1px solid var(--sep); color: var(--fg); font-family: inherit; font-size: 15px; border-radius: var(--r); outline: none; transition: border 0.3s; }
input:focus, textarea:focus { border-color: var(--y); }
textarea { min-height: 120px; resize: vertical; }

.sel-grid { display: grid; gap: 12px; }
.sel-3 { grid-template-columns: repeat(3, 1fr); }
.sel-btn { background: var(--bg); border: 1px solid var(--sep); color: var(--dim); padding: 16px; font-weight: 600; border-radius: var(--r); transition: all 0.2s; }
.sel-btn.active { background: rgba(201, 255, 71, 0.1); border-color: var(--y); color: var(--fg); }

.upload-zone { border: 1px dashed var(--dim); padding: 40px 20px; text-align: center; border-radius: var(--r); position: relative; background: var(--bg); transition: border 0.3s;}
.upload-zone:hover { border-color: var(--y); background: rgba(255,255,255,0.02);}
.upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-ttl { font-weight: 600; margin-bottom: 4px; color: var(--fg); }
.upload-sub { font-size: 13px; color: var(--dim); }
.upload-previews { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; }
.upload-previews img { aspect-ratio: 1; object-fit: cover; border-radius: 6px; width: 100%; border: 1px solid var(--sep); }

/* SUMMARY CARD */
.order-summary { background: var(--bg); padding: 40px; border-radius: 20px; border: 1px solid var(--sep); position: sticky; top: 100px; }
.sum-ttl { font-size: 20px; font-weight: 700; margin-bottom: 24px; border-bottom: 1px solid var(--sep); padding-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 15px; }
.sum-row .lbl { color: var(--dim); }
.sum-total { display: flex; justify-content: space-between; margin-top: 24px; border-top: 1px solid var(--sep); padding-top: 24px; font-size: 18px; font-weight: 700; align-items: center; }
.sum-total .t-val { color: var(--y); font-size: 28px; }
.pay-btn { width: 100%; padding: 18px; background: var(--y); color: #000; font-weight: 700; font-size: 16px; border: none; border-radius: 100px; margin-top: 32px; transition: transform 0.3s, opacity 0.3s; }
.pay-btn:hover { transform: translateY(-2px); opacity: 0.95; }
.pay-btn:disabled { background: var(--sep); color: var(--dim); cursor: not-allowed; transform: none; }

/* FOOTER */
footer { padding: 40px var(--pad); display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--sep); background: var(--bg); }
.f-copy { font-size: 13px; color: var(--dim); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; padding: 20px; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-inner { background: var(--bg); padding: 48px; border-radius: 24px; max-width: 400px; width: 100%; text-align: center; border: 1px solid var(--sep); position: relative; }
.modal-inner h2 { margin-bottom: 16px; font-size: 24px; font-weight: 800; }
.modal-inner p { color: var(--dim); margin-bottom: 32px; font-size: 15px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: transparent; border: none; color: var(--dim); font-size: 24px; }
.modal-close:hover { color: var(--fg); }

/* ANIMATIONS */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* MOBILE RESPONSIVENESS */
@media(max-width: 900px){
  .nav-links { display: none; }
  .about-grid, .pricing-grid, .order-grid { grid-template-columns: 1fr; gap: 32px;}
  
  .demo-container { flex-direction: column; padding: 32px 24px; }
  .demo-box { max-width: 100%; }
  .demo-media-wrap { aspect-ratio: 1 / 1; height: auto; } /* Keeps it 1:1 on mobile */
  .demo-pipeline { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 30px 0; gap: 20px;}
  .animated-line { width: 80%; height: 2px; top: 50%; left: 10%; background: rgba(255,255,255,0.05); transform: translateY(-50%); }
  .animated-line::after { width: 40%; height: 100%; background: linear-gradient(to right, transparent, var(--y), transparent); animation: flowRight 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
  @keyframes flowRight { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
  .pipeline-step { width: 100%; max-width: 280px; justify-content: flex-start;}
  
  .sel-3 { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
}