/* ============================================================
   ASK2MESOLUTION CONSULTANCY — PORTFOLIO SHOWCASE
   Main Stylesheet
   ============================================================ */

:root {
  --primary: #6c47ff;
  --primary-dark: #4f2fe0;
  --secondary: #ff6b35;
  --accent: #00d4aa;
  --dark: #0a0a14;
  --dark2: #10101e;
  --dark3: #161628;
  --surface: #1a1a2e;
  --surface2: #22223a;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0ff;
  --text-muted: #8888aa;
  --gradient: linear-gradient(135deg, #6c47ff, #ff6b35);
  --gradient2: linear-gradient(135deg, #00d4aa, #6c47ff);
  --shadow: 0 20px 60px rgba(108,71,255,0.2);
  --radius: 16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ---- Particle Canvas ---- */
#particleCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ============================================================
   HEADER
   ============================================================ */
#main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  background: rgba(10,10,20,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
#main-header.scrolled {
  background: rgba(10,10,20,0.95);
  box-shadow: 0 4px 30px rgba(108,71,255,0.15);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 38px; height: 38px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
  box-shadow: 0 4px 15px rgba(108,71,255,0.4);
}
.logo-icon.small { width: 28px; height: 28px; font-size: 0.8rem; border-radius: 7px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-main { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: #fff; }
.logo-sub { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.main-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(108,71,255,0.15);
}

.cta-btn {
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(108,71,255,0.3);
  transition: all 0.3s;
  display: flex; align-items: center; gap: 6px;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(108,71,255,0.5); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  gap: 0.25rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link { padding: 0.75rem 1rem; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 8rem 6rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(108,71,255,0.15);
  border: 1px solid rgba(108,71,255,0.3);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  color: #b8a4ff;
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

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

.typed-text::after {
  content: '|';
  -webkit-text-fill-color: var(--primary);
  animation: blink 0.7s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 25px rgba(108,71,255,0.4);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(108,71,255,0.5); }
.btn-primary.full-width { width: 100%; justify-content: center; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: rgba(108,71,255,0.05); }

.hero-chips {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.chip i { color: var(--accent); }

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.device-showcase {
  position: relative;
  width: 300px;
  height: 580px;
}

.phone-mockup-hero {
  width: 280px;
  height: 560px;
  background: #111125;
  border-radius: 40px;
  border: 2px solid rgba(108,71,255,0.4);
  box-shadow: 0 0 60px rgba(108,71,255,0.2), 0 30px 80px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
  overflow: hidden;
  position: relative;
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.phone-notch {
  width: 120px; height: 28px;
  background: #0a0a14;
  border-radius: 0 0 20px 20px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.phone-screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  border-radius: 38px;
}

.phone-preview-slider {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  height: 100%;
}

.hero-slide {
  min-width: 280px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 40px 16px 20px;
  position: relative;
  overflow: hidden;
}

.phone-home-bar {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

.floating-cards {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  pointer-events: none;
}
.float-card {
  position: absolute;
  background: rgba(26,26,46,0.9);
  border: 1px solid rgba(108,71,255,0.3);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.float-card i { color: var(--primary); }
.card-1 { top: 10%; left: -60px; animation: floatCard1 3s ease-in-out infinite; }
.card-2 { top: 35%; right: -65px; animation: floatCard2 3.5s ease-in-out infinite 0.5s; }
.card-3 { bottom: 30%; left: -65px; animation: floatCard1 4s ease-in-out infinite 1s; }
.card-4 { bottom: 10%; right: -60px; animation: floatCard2 3.2s ease-in-out infinite 0.3s; }

@keyframes floatCard1 {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(8px) translateY(-5px); }
}
@keyframes floatCard2 {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-8px) translateY(5px); }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  grid-column: 1 / -1;
}
.hero-scroll-hint span {
  width: 2px; height: 40px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   SECTION COMMONS
   ============================================================ */
section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-label {
  display: inline-block;
  background: rgba(108,71,255,0.15);
  border: 1px solid rgba(108,71,255,0.3);
  color: #b8a4ff;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 550px;
  margin: 0 auto;
}

/* ============================================================
   SERVICES
   ============================================================ */
#services { max-width: 1400px; margin: 0 auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108,71,255,0.3);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.gradient-1 { background: linear-gradient(135deg, #6c47ff, #9f7aea); }
.gradient-2 { background: linear-gradient(135deg, #ff6b35, #f6ad55); }
.gradient-3 { background: linear-gradient(135deg, #00d4aa, #38b2ac); }
.gradient-4 { background: linear-gradient(135deg, #e53e7e, #ed64a6); }
.gradient-5 { background: linear-gradient(135deg, #3182ce, #63b3ed); }
.gradient-6 { background: linear-gradient(135deg, #d69e2e, #f6e05e); }

.service-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.75rem; }
.service-card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; margin-bottom: 1rem; }
.service-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.service-tags span {
  background: rgba(108,71,255,0.1);
  border: 1px solid rgba(108,71,255,0.2);
  color: #b8a4ff;
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
#portfolio {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--dark2);
  border-radius: 24px;
  padding: 4rem 3rem;
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab-btn:hover { border-color: var(--primary); color: var(--text); }
.tab-btn.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(108,71,255,0.35);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  animation: fadeInUp 0.4s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.portfolio-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(108,71,255,0.4);
  box-shadow: 0 20px 50px rgba(108,71,255,0.2);
}
.portfolio-card.hidden {
  display: none;
}

.card-preview {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-device {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Phone Preview in card */
.mini-phone {
  width: 100px;
  height: 188px;
  background: #0d0d20;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.12);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.mini-phone-notch {
  width: 40px; height: 10px;
  background: #0a0a14;
  border-radius: 0 0 8px 8px;
  margin: 0 auto 4px;
  position: relative;
  z-index: 2;
}
.mini-phone-screen {
  width: 100%;
  height: calc(100% - 14px);
  overflow: hidden;
}

/* Browser Preview in card */
.mini-browser {
  width: 180px;
  height: 130px;
  background: #0d0d20;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.1);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.mini-browser-bar {
  height: 22px;
  background: #161628;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mini-browser-bar .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.mini-browser-screen { height: calc(100% - 22px); overflow: hidden; }

.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: var(--radius);
}
.card-play-overlay i {
  width: 50px; height: 50px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 8px 25px rgba(108,71,255,0.5);
}
.portfolio-card:hover .card-play-overlay { opacity: 1; }

.card-info { padding: 1.25rem; }
.card-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(108,71,255,0.12);
  border: 1px solid rgba(108,71,255,0.2);
  color: #b8a4ff;
  font-size: 0.7rem;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  margin-bottom: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }
.card-desc { color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }

/* ============================================================
   STATS
   ============================================================ */
#stats {
  background: var(--dark2);
  position: relative;
  overflow: hidden;
}
.stats-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(108,71,255,0.12) 0%, transparent 70%);
}
.stats-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.section-header.light .section-title { color: #fff; }

.stats-grid {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-align: center;
  min-width: 180px;
  flex: 1;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
}
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.stat-icon {
  width: 50px; height: 50px;
  background: rgba(108,71,255,0.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.2rem;
  color: var(--primary);
}
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  display: inline;
}
.stat-plus {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: inline;
}
.stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  max-width: 1400px;
  margin: 0 auto;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
.contact-left .section-label { display: inline-block; margin-bottom: 1rem; }
.contact-left .section-title { text-align: left; font-size: 2.2rem; margin-bottom: 1rem; }
.contact-left p { color: var(--text-muted); line-height: 1.7; margin-bottom: 2rem; }

.contact-info-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.contact-info-item i {
  width: 34px; height: 34px;
  background: rgba(108,71,255,0.12);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.social-links { display: flex; gap: 0.75rem; }
.social-btn {
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.9rem;
}
.social-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-3px); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group select { cursor: pointer; appearance: none; }
.form-group textarea { resize: vertical; }

/* ============================================================
   FOOTER
   ============================================================ */
#main-footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9rem; }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }

/* ============================================================
   WEBVIEW MODAL
   ============================================================ */
.webview-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.webview-modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,5,15,0.85);
  backdrop-filter: blur(12px);
}

.modal-container {
  position: relative;
  z-index: 1;
  background: var(--dark2);
  border: 1px solid rgba(108,71,255,0.3);
  border-radius: 24px;
  width: min(1100px, 95vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 60px rgba(108,71,255,0.1);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.webview-modal.open .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title-wrap { display: flex; align-items: center; gap: 14px; }
.modal-app-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}
.modal-title { font-size: 1.2rem; font-weight: 700; }
.modal-category { color: var(--text-muted); font-size: 0.8rem; }

.modal-controls { display: flex; gap: 0.5rem; }
.modal-btn {
  width: 38px; height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.modal-btn:hover { background: rgba(108,71,255,0.2); border-color: var(--primary); }
.close-btn:hover { background: rgba(255,70,70,0.15); border-color: #ff4646; color: #ff4646; }

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.device-frame-wrap {
  background: var(--dark3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-right: 1px solid var(--border);
  min-height: 520px;
}

/* Full Phone in Modal */
.device-phone {
  width: 260px;
  height: 500px;
  background: #111125;
  border-radius: 44px;
  border: 2.5px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.5), 0 30px 60px rgba(0,0,0,0.5), 0 0 40px rgba(108,71,255,0.15);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.device-phone-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.device-notch-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 18px;
  height: 30px;
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.d-time { font-size: 0.65rem; font-weight: 700; }
.d-icons { display: flex; gap: 4px; font-size: 0.55rem; color: var(--text-muted); }
.device-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.device-screen::-webkit-scrollbar { display: none; }
.device-home-bar {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.device-home-bar::before {
  content: '';
  width: 90px; height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

/* Browser in Modal */
.device-browser {
  width: 100%;
  max-width: 520px;
  height: 460px;
  background: #111125;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.1);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 38px;
  background: #161628;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.browser-dots { display: flex; gap: 5px; }
.browser-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }
.browser-url {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 0.2rem 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: monospace;
}
.browser-actions { color: var(--text-muted); font-size: 0.75rem; cursor: pointer; }
.browser-screen {
  height: calc(100% - 38px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.browser-screen::-webkit-scrollbar { display: none; }

/* Modal Info Panel */
.modal-info-panel {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.modal-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.modal-features h4, .modal-tech h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.features-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.feature-item i { color: var(--accent); font-size: 0.7rem; flex-shrink: 0; }
.tech-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tech-tag {
  background: rgba(108,71,255,0.1);
  border: 1px solid rgba(108,71,255,0.2);
  color: #b8a4ff;
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-weight: 500;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--surface);
  border: 1px solid rgba(108,71,255,0.3);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  z-index: 3000;
  animation: slideInRight 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.toast i { color: var(--accent); }
@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  #hero {
    grid-template-columns: 1fr;
    padding: 7rem 2rem 3rem;
    text-align: center;
  }
  .hero-content { align-items: center; display: flex; flex-direction: column; }
  .hero-desc { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-chips { justify-content: center; }
  .hero-visual { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-body { grid-template-columns: 1fr; }
  .device-frame-wrap { border-right: none; border-bottom: 1px solid var(--border); padding: 1.5rem; min-height: 380px; }
  .device-phone { width: 220px; height: 420px; }
  .device-browser { height: 360px; }
  .contact-inner { grid-template-columns: 1fr; gap: 2rem; }
  #portfolio { padding: 3rem 1.5rem; }
}

@media (max-width: 768px) {
  .main-nav, .cta-btn { display: none; }
  .hamburger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 1rem; }
  .stat-card { min-width: 140px; padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .category-tabs { gap: 0.35rem; }
  .tab-btn { padding: 0.4rem 0.75rem; font-size: 0.75rem; }
  .modal-header { padding: 1rem; }
  .modal-info-panel { padding: 1.25rem; }
}

@media (max-width: 480px) {
  section { padding: 3rem 1rem; }
  #portfolio { padding: 2rem 1rem; border-radius: 16px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .modal-container { border-radius: 16px; }
  .device-phone { width: 200px; height: 380px; border-radius: 36px; }
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   MINI APP UI STYLES (for card previews and modal screens)
   ============================================================ */

/* Generic App Shell */
.app-shell {
  width: 100%;
  min-height: 100%;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #111;
  font-size: 10px;
}
.app-shell.dark-theme { background: #0f0f1a; color: #f0f0ff; }

/* App Header */
.app-header {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.app-header.sticky { position: sticky; top: 0; z-index: 10; }
.app-logo { font-weight: 800; font-size: 11px; }
.app-header-icons { display: flex; gap: 6px; font-size: 9px; }
.app-header-icons span {
  width: 20px; height: 20px;
  background: rgba(0,0,0,0.06);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* Hero Banner */
.app-hero-banner {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 8px;
  color: #fff;
  font-size: 9px;
}
.app-hero-banner h2 { font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.app-hero-banner p { opacity: 0.85; }

/* Category Scroll */
.cat-scroll {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-chip {
  white-space: nowrap;
  background: #f4f4f8;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 8px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.cat-chip.active { background: #6c47ff; color: #fff; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px 8px;
}
.product-card-mini {
  background: #f9f9ff;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.product-thumb {
  width: 100%;
  height: 55px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.product-info { padding: 4px 6px; }
.product-name { font-size: 7.5px; font-weight: 600; color: #111; margin-bottom: 2px; }
.product-price { font-size: 8px; font-weight: 800; color: #6c47ff; }

/* Bottom Nav */
.app-bottom-nav {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  padding: 6px 0;
}
.app-bottom-nav.dark { background: #0f0f1a; border-top-color: rgba(255,255,255,0.08); }
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 7px;
  color: #888;
  cursor: pointer;
}
.nav-item.active { color: #6c47ff; }
.nav-icon { font-size: 11px; }

/* Food UI */
.food-banner { padding: 10px; }
.search-bar-mini {
  background: #f4f4f8;
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 8px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 6px 8px;
}
.restaurant-list { padding: 4px 8px; }
.restaurant-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 6px;
  overflow: hidden;
}
.restaurant-img {
  width: 100%;
  height: 45px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.restaurant-meta { padding: 5px 8px; }
.restaurant-name { font-size: 8.5px; font-weight: 700; margin-bottom: 2px; }
.restaurant-tags { display: flex; gap: 3px; }
.r-tag { font-size: 6.5px; background: #f0f0f8; padding: 1px 5px; border-radius: 10px; color: #666; }
.restaurant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}
.r-rating { font-size: 7px; color: #f59e0b; font-weight: 700; }
.r-time { font-size: 7px; color: #888; }

/* Ride / Cab UI */
.map-placeholder {
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, #c8d8e8, #d4e4c8);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  position: relative;
  overflow: hidden;
}
.map-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-70%);
  font-size: 18px;
}
.ride-options { padding: 6px 8px; }
.ride-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 8px;
  background: #f9f9ff;
  margin-bottom: 4px;
  cursor: pointer;
}
.ride-opt.selected { background: rgba(108,71,255,0.08); border: 1px solid rgba(108,71,255,0.2); }
.ride-icon { font-size: 14px; }
.ride-info { flex: 1; }
.ride-name { font-size: 8px; font-weight: 700; }
.ride-eta { font-size: 7px; color: #888; }
.ride-price { font-size: 9px; font-weight: 800; color: #6c47ff; }

/* Hotel UI */
.hotel-search-box {
  background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
  padding: 12px;
  color: #fff;
}
.hotel-search-box h2 { font-size: 11px; font-weight: 800; margin-bottom: 8px; }
.hotel-input {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 8px;
  color: #fff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hotel-row { display: flex; gap: 4px; }
.hotel-input.half { flex: 1; }
.hotel-list { padding: 6px 8px; }
.hotel-card {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}
.hotel-img {
  width: 100%;
  height: 45px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.hotel-info { padding: 5px 8px; }
.hotel-name { font-size: 8.5px; font-weight: 700; }
.hotel-loc { font-size: 7px; color: #888; margin-bottom: 3px; }
.hotel-row2 { display: flex; justify-content: space-between; align-items: center; }
.hotel-price { font-size: 9px; font-weight: 800; color: #6c47ff; }
.hotel-stars { font-size: 7px; color: #f59e0b; }

/* Pharmacy UI */
.pharma-banner {
  background: linear-gradient(135deg, #0a7c5f, #0f9672);
  padding: 10px 12px;
  color: #fff;
}
.pharma-banner h2 { font-size: 11px; font-weight: 800; margin-bottom: 4px; }
.pharma-banner p { font-size: 8px; opacity: 0.85; }

/* Streaming UI */
.stream-hero {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: flex-end;
  padding: 8px;
  position: relative;
  overflow: hidden;
}
.stream-title { font-size: 10px; font-weight: 800; color: #fff; }
.stream-badge {
  position: absolute;
  top: 6px; right: 8px;
  background: #e50914;
  color: #fff;
  font-size: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
}
.stream-row { display: flex; gap: 4px; padding: 4px 8px; overflow-x: auto; scrollbar-width: none; }
.stream-thumb {
  min-width: 50px;
  height: 32px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

/* Parcel UI */
.parcel-track {
  padding: 10px 12px;
}
.track-input {
  background: #f4f4f8;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 8px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px; color: #888;
}
.track-steps { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.track-step { display: flex; align-items: flex-start; gap: 8px; }
.step-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 7px;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-dot.done { background: #00d4aa; color: #fff; }
.step-dot.current { background: #6c47ff; color: #fff; }
.step-dot.pending { background: #e5e5ef; }
.step-info .step-label { font-size: 8px; font-weight: 700; }
.step-info .step-time { font-size: 7px; color: #888; }

/* Super App UI */
.super-hero {
  background: linear-gradient(135deg, #00aa6c, #007a4d);
  padding: 12px;
  color: #fff;
}
.super-hero h2 { font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.super-apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
}
.super-app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.super-icon-box {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.super-app-label { font-size: 6.5px; text-align: center; color: #444; font-weight: 600; }

/* Home Service UI */
.home-service-cats { padding: 8px; }
.hs-cat-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}
.hs-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 35px;
  cursor: pointer;
}
.hs-cat-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.hs-cat-label { font-size: 6.5px; text-align: center; color: #555; font-weight: 600; }

/* Grocery (Zepto/Blinkit style) */
.grocery-banner {
  background: linear-gradient(135deg, #f7c59f, #ef8d69);
  padding: 10px 12px;
  color: #fff;
}
.grocery-banner h2 { font-size: 11px; font-weight: 800; }
.delivery-time-badge {
  background: rgba(0,0,0,0.2);
  display: inline-block;
  padding: 2px 6px;
  border-radius: 20px;
  font-size: 7px;
  margin-top: 3px;
}
.grocery-grid { padding: 4px 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.grocery-item {
  background: #f9f9ff;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding: 5px;
}
.g-thumb { font-size: 16px; margin-bottom: 3px; }
.g-name { font-size: 7px; font-weight: 600; color: #333; margin-bottom: 2px; }
.g-price { font-size: 8px; font-weight: 800; color: #6c47ff; }

/* Ecommerce Web */
.web-header-full {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  border-bottom: 1px solid #eee;
}
.web-logo { font-size: 11px; font-weight: 800; }
.web-nav-links { display: flex; gap: 8px; }
.web-nav-links a { font-size: 7px; color: #555; text-decoration: none; }
.web-hero-full {
  padding: 16px 14px;
  text-align: center;
  color: #fff;
}
.web-hero-full h1 { font-size: 14px; font-weight: 900; margin-bottom: 5px; }
.web-hero-full p { font-size: 8px; opacity: 0.85; margin-bottom: 8px; }
.web-btn {
  background: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 8px;
  font-weight: 700;
  display: inline-block;
  cursor: pointer;
}
.web-product-row { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; scrollbar-width: none; }
.web-product-mini {
  min-width: 60px;
  background: #f9f9ff;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.web-product-mini .thumb { height: 40px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.web-product-mini .info { padding: 3px 5px; }
.web-product-mini .pname { font-size: 7px; font-weight: 600; color: #111; }
.web-product-mini .pprice { font-size: 7.5px; font-weight: 800; color: #6c47ff; }
.web-section-title { font-size: 10px; font-weight: 800; padding: 6px 10px 2px; }
