/* ============================
   AppDudi.com — Design System
   ============================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Custom Properties ---- */
/* Light Mode (Default) */
:root {
  /* Colors */
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  --accent: #059669;
  --accent-light: #06D6A0;
  --accent-dark: #047857;
  --bg-dark: #F8F9FC;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --surface: #F0EDF6;
  --surface-alt: #E8E4F0;
  --text-primary: #1A1330;
  --text-secondary: #5B5173;
  --text-muted: #8B7FB5;
  --gradient-hero: linear-gradient(135deg, #F8F9FC 0%, #EDE9FE 50%, #F8F9FC 100%);
  --gradient-accent: linear-gradient(135deg, #7C3AED 0%, #06D6A0 100%);
  --gradient-card: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(6, 214, 160, 0.05) 100%);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(124, 58, 237, 0.12);

  /* Typography */
  --font-th: 'Prompt', sans-serif;
  --font-en: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;

  /* Shadows */
  --shadow-lg: 0 25px 50px rgba(124, 58, 237, 0.1);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
  --shadow-glow-accent: 0 0 30px rgba(6, 214, 160, 0.12);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  --accent: #06D6A0;
  --accent-light: #34E9BA;
  --accent-dark: #05B384;
  --bg-dark: #0F0B1A;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --surface: #1A1330;
  --surface-alt: #231B3A;
  --text-primary: #F5F3FF;
  --text-secondary: #C4B5FD;
  --text-muted: #8B7FB5;
  --gradient-hero: linear-gradient(135deg, #0F0B1A 0%, #1E1145 50%, #0F0B1A 100%);
  --gradient-accent: linear-gradient(135deg, #7C3AED 0%, #06D6A0 100%);
  --gradient-card: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(6, 214, 160, 0.08) 100%);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.3);
  --shadow-glow-accent: 0 0 30px rgba(6, 214, 160, 0.25);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-th);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Utility Classes ---- */
.section-label {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 60px;
}

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

.text-center { text-align: center; }

/* ---- Animated Background Orbs ---- */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.bg-orb--purple {
  background: var(--primary);
  width: 500px;
  height: 500px;
}

.bg-orb--green {
  background: var(--accent);
  width: 350px;
  height: 350px;
}

/* ---- Scroll Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ==========================
   NAVIGATION
   ========================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(248, 249, 252, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 0;
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(15, 11, 26, 0.9);
}

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

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 40px;
  width: auto;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--primary-light);
  background: var(--bg-card-hover);
  transform: scale(1.08);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: var(--transition);
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: inline;
}

.nav-logo span {
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--gradient-accent);
  color: var(--bg-dark) !important;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.5);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 4px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================
   HERO SECTION
   ========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero .bg-orb--purple {
  top: -150px;
  right: -200px;
  animation: float-orb 8s ease-in-out infinite;
}

.hero .bg-orb--green {
  bottom: -100px;
  left: -100px;
  animation: float-orb 10s ease-in-out infinite reverse;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 24px;
}

.hero h1 .highlight {
  position: relative;
  display: inline;
}

.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 12px;
  background: rgba(124, 58, 237, 0.3);
  border-radius: 4px;
  z-index: -1;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient-accent);
  color: var(--bg-dark);
  font-family: var(--font-th);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 36px;
  border-radius: 60px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-family: var(--font-th);
  font-size: 1rem;
  font-weight: 500;
  padding: 16px 24px;
  border-radius: 60px;
  border: 1px solid var(--glass-border);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.1);
}

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

.phone-mockup {
  position: relative;
  width: 280px;
  height: 560px;
  border-radius: 40px;
  background: linear-gradient(145deg, #E0DAF0, #C4B5FD);
  border: 3px solid rgba(124, 58, 237, 0.15);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

[data-theme="dark"] .phone-mockup {
  background: linear-gradient(145deg, #2A2050, #1A1330);
  border-color: rgba(255,255,255,0.12);
  overflow: hidden;
  animation: float-phone 6s ease-in-out infinite;
}

@keyframes float-phone {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-20px) rotate(-1deg); }
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #C4B5FD;
}

[data-theme="dark"] .phone-notch {
  background: #1A1330;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.phone-screen {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border-radius: 28px;
  background: linear-gradient(180deg, #8B5CF6 0%, #6D28D9 30%, #4C1D95 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* App screen UI elements */
.screen-header {
  padding: 40px 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.screen-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-accent);
}

.screen-dots {
  display: flex;
  gap: 4px;
}

.screen-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}

.screen-search {
  margin: 8px 16px;
  height: 36px;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.08);
}

.screen-cards {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.screen-card {
  border-radius: 16px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  animation: card-shimmer 3s ease-in-out infinite;
}

.screen-card:nth-child(1) {
  background: rgba(6, 214, 160, 0.15);
  border: 1px solid rgba(6, 214, 160, 0.2);
}

.screen-card:nth-child(2) {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.25);
  animation-delay: 0.5s;
}

.screen-card:nth-child(3) {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.2);
  animation-delay: 1s;
}

@keyframes card-shimmer {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

.screen-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.screen-card-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.screen-card-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.2);
}

.screen-card-line:last-child {
  width: 60%;
}

.screen-nav {
  padding: 12px 24px 16px;
  display: flex;
  justify-content: space-around;
}

.screen-nav-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
}

.screen-nav-dot.active {
  background: var(--accent);
}

/* Floating elements around phone */
.floating-el {
  position: absolute;
  border-radius: 16px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.1);
  animation: float-element 5s ease-in-out infinite;
}

[data-theme="dark"] .floating-el {
  background: rgba(26, 19, 48, 0.85);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.floating-el--1 {
  top: 60px;
  left: -60px;
  animation-delay: 0s;
}

.floating-el--2 {
  bottom: 120px;
  right: -50px;
  animation-delay: 1.5s;
}

.floating-el--3 {
  bottom: 40px;
  left: -40px;
  animation-delay: 3s;
}

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

.floating-el .icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.floating-el .icon-badge.green {
  background: rgba(6, 214, 160, 0.2);
}

.floating-el .icon-badge.purple {
  background: rgba(124, 58, 237, 0.2);
}

.floating-el .icon-badge.orange {
  background: rgba(245, 158, 11, 0.2);
}

/* ==========================
   TRUST SIGNALS
   ========================== */
.trust-section {
  padding: 60px 0;
  background: var(--surface);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  overflow: hidden;
}

.trust-label {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  font-weight: 500;
}

.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: var(--transition);
  cursor: default;
}

.trust-logo:hover {
  opacity: 1;
  transform: translateY(-4px);
}

.trust-logo-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: var(--transition);
}

.trust-logo:hover .trust-logo-icon {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.trust-logo-name {
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ==========================
   VIDEO STORY
   ========================== */
.video-story {
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
}

.video-story .bg-orb--green {
  top: 50%;
  right: -150px;
  transform: translateY(-50%);
  animation: float-orb 12s ease-in-out infinite;
}

.video-story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.video-story-visual {
  position: relative;
}

.video-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow-accent);
  border: 2px solid var(--glass-border);
  background: var(--surface);
}

.video-wrapper video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.video-story-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.video-story-content .section-title {
  font-size: 2.2rem;
  margin-bottom: 36px;
}

.story-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
  width: 100%;
  position: relative;
}

/* Timeline connector line */
.story-steps::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 48px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-light), var(--accent));
  border-radius: 2px;
  opacity: 0.4;
}

.story-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.story-step:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-light);
  transform: translateX(6px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.1);
}

.story-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
}

.story-step-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.story-step-text p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Reversed layout (content left, video right) — 
   In HTML the content div comes first, video second, 
   so default grid order already places content-left, video-right.
   We just ensure the first section shows video-left by reordering. */
.video-story:not(.video-story--reversed) .video-story-visual {
  order: -1;
}

.video-story--reversed {
  background: var(--surface);
}

.video-story-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* ==========================
   SERVICES
   ========================== */
.services {
  padding: var(--section-padding);
  position: relative;
}

.services .bg-orb--purple {
  top: 100px;
  left: -200px;
  opacity: 0.15;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 36px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.1);
}

[data-theme="dark"] .service-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.service-icon.purple { background: rgba(124, 58, 237, 0.15); }
.service-icon.green { background: rgba(6, 214, 160, 0.15); }
.service-icon.blue { background: rgba(59, 130, 246, 0.15); }
.service-icon.orange { background: rgba(245, 158, 11, 0.15); }

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================
   PORTFOLIO
   ========================== */
.portfolio {
  padding: var(--section-padding);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.portfolio .bg-orb--green {
  bottom: -100px;
  right: -100px;
  opacity: 0.12;
}

.portfolio-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 48px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.portfolio-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.portfolio-info {
  position: relative;
  z-index: 1;
}

.portfolio-tag {
  display: inline-block;
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-light);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.portfolio-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.portfolio-detail {
  margin-bottom: 16px;
  padding-left: 20px;
  border-left: 3px solid var(--primary);
}

.portfolio-detail strong {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 600;
}

.portfolio-detail p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.portfolio-result {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 16px 20px;
  background: rgba(6, 214, 160, 0.08);
  border: 1px solid rgba(6, 214, 160, 0.2);
  border-radius: 16px;
}

.portfolio-result-icon {
  font-size: 1.8rem;
}

.portfolio-result-text {
  font-size: 0.95rem;
  color: var(--accent-light);
  font-weight: 500;
}

/* Portfolio Visual */
.portfolio-visual {
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.portfolio-phone {
  width: 220px;
  height: 440px;
  border-radius: 32px;
  background: linear-gradient(145deg, #E0DAF0, #C4B5FD);
  border: 2px solid rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] .portfolio-phone {
  background: linear-gradient(145deg, #2A2050, #1A1330);
  border-color: rgba(255,255,255,0.1);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.portfolio-phone-screen {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 24px;
  background: linear-gradient(180deg, #F8FAFC, #EDE9FE);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pf-screen-top {
  background: var(--primary);
  padding: 30px 14px 14px;
  color: white;
}

.pf-screen-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pf-screen-top h4 {
  font-size: 0.7rem;
  font-weight: 600;
}

.pf-search-bar {
  background: rgba(255,255,255,0.2);
  height: 28px;
  border-radius: 14px;
}

.pf-screen-body {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

.pf-product {
  background: white;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pf-product-img {
  width: 100%;
  height: 50px;
  border-radius: 8px;
  margin-bottom: 6px;
}

.pf-product:nth-child(1) .pf-product-img { background: #DDD6FE; }
.pf-product:nth-child(2) .pf-product-img { background: #A7F3D0; }
.pf-product:nth-child(3) .pf-product-img { background: #FDE68A; }
.pf-product:nth-child(4) .pf-product-img { background: #FECACA; }

.pf-product-line {
  height: 5px;
  border-radius: 3px;
  background: #E5E7EB;
  margin-bottom: 4px;
}

.pf-product-line:last-child {
  width: 50%;
  background: #C4B5FD;
}

/* ==========================
   HOW WE WORK
   ========================== */
.how-we-work {
  padding: var(--section-padding);
  position: relative;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

/* Connection line */
.steps-container::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 0;
  opacity: 0.3;
}

.step-card {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--bg-dark);
  margin: 0 auto 24px;
  box-shadow: var(--shadow-glow);
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card .step-subtitle {
  font-family: var(--font-en);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ==========================
   PRICING
   ========================== */
.pricing {
  padding: var(--section-padding);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.pricing .bg-orb--purple {
  bottom: -150px;
  left: -150px;
  opacity: 0.12;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 44px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border-color: var(--primary);
  background: var(--gradient-card);
}

.pricing-card.featured::before {
  content: 'แนะนำ';
  position: absolute;
  top: 20px;
  right: -30px;
  background: var(--gradient-accent);
  color: var(--bg-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 40px;
  transform: rotate(45deg);
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.12);
}

[data-theme="dark"] .pricing-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.pricing-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.pricing-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-card .pricing-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.pricing-price {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.pricing-price .currency {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pricing-feature .check {
  color: var(--accent);
  font-size: 1.1rem;
}

.pricing-card .btn-primary {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
}

.pricing-card .btn-secondary {
  width: 100%;
  justify-content: center;
  margin-top: 0;
}

.pricing-disclaimer {
  text-align: center;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* ==========================
   CONTACT
   ========================== */
.contact {
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.contact .bg-orb--green {
  top: -100px;
  right: -100px;
  opacity: 0.1;
}

.contact-inner {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 60px;
  text-align: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.contact-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(6, 214, 160, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.contact h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.contact-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
  position: relative;
}

.contact-channels {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  position: relative;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 16px 24px;
  border-radius: 16px;
  transition: var(--transition);
}

.contact-channel:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.1);
}

[data-theme="dark"] .contact-channel:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.contact-channel-icon {
  font-size: 1.4rem;
}

.contact-channel-info {
  text-align: left;
}

.contact-channel-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-channel-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact .btn-primary {
  font-size: 1.1rem;
  padding: 18px 48px;
  position: relative;
}

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

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

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo-img {
  height: 32px;
  width: auto;
}

.footer-logo span {
  color: var(--accent);
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================
   FLOATING LINE BUTTON
   ========================== */
.floating-line {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #06C755;
  color: white;
  font-family: var(--font-th);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 60px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(6, 199, 85, 0.4);
  transition: var(--transition);
  text-decoration: none;
  animation: bounce-float 3s ease-in-out infinite;
}

.floating-line:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 40px rgba(6, 199, 85, 0.5);
}

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

.floating-line svg {
  width: 22px;
  height: 22px;
}

/* Tooltip */
.floating-line .tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: var(--surface);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.8rem;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
  border: 1px solid var(--glass-border);
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
  pointer-events: none;
}

[data-theme="dark"] .floating-line .tooltip {
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.floating-line .tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.floating-line:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================
   RESPONSIVE DESIGN
   ========================== */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    margin-top: 40px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .portfolio-detail {
    text-align: left;
  }

  .portfolio-visual {
    order: -1;
  }

  .video-story-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .video-story-content {
    text-align: center;
    align-items: center;
  }

  .story-steps::before {
    display: none;
  }

  .story-step:hover {
    transform: translateX(0) translateY(-3px);
  }
}

@media (max-width: 768px) {
  html { font-size: 15px; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(248, 249, 252, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 100px 40px;
    gap: 24px;
    transition: var(--transition);
    border-left: 1px solid var(--glass-border);
  }

  [data-theme="dark"] .nav-links {
    background: rgba(15, 11, 26, 0.97);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .phone-mockup {
    width: 220px;
    height: 440px;
  }

  .floating-el {
    display: none;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .steps-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .steps-container::before {
    display: none;
  }

  .video-story-content .section-title {
    font-size: 1.6rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card {
    padding: 32px;
  }

  .contact-inner {
    padding: 40px 24px;
  }

  .contact h2 {
    font-size: 1.6rem;
  }

  .contact-channels {
    flex-direction: column;
    align-items: center;
  }

  .footer .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .floating-line span {
    display: none;
  }

  .floating-line {
    padding: 14px;
    border-radius: 50%;
  }

  .floating-line .tooltip {
    right: -10px;
  }
}

@media (max-width: 480px) {
  html { font-size: 14px; }

  .hero h1 {
    font-size: 1.7rem;
  }

  .btn-primary {
    padding: 14px 28px;
    font-size: 0.95rem;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .trust-logos {
    gap: 24px;
  }

  .trust-logo-icon {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  .portfolio-card {
    padding: 24px;
  }

  .portfolio-info h3 {
    font-size: 1.4rem;
  }

  .pricing-card {
    padding: 32px;
  }
}
