/* ============================================
   Poipet App — Modern Landing Page
   ============================================ */

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

:root {
  --primary: #2A4D7C;
  --primary-light: #3a6a9e;
  --primary-dark: #1a3052;
  --secondary: #E67E22;
  --accent: #27AE60;
  --bg: #ffffff;
  --bg-alt: #F5F7FA;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(42, 77, 124, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Background Gradient Orb --- */
.bg-gradient {
  position: fixed;
  top: -40%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(42, 77, 124, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

/* --- Typography --- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 800;
}

/* --- Header / Nav --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.logo span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}

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

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(42, 77, 124, 0.1), rgba(230, 126, 34, 0.1));
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.7;
}

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

.hero-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 16px rgba(42, 77, 124, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(42, 77, 124, 0.4);
}

.btn-light {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* --- Phone Slider --- */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-slider {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 244 / 512;
  animation: float 4s ease-in-out infinite;
}

.phone-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  object-fit: cover;
  transform: scale(0.95);
}

.phone-image.active {
  opacity: 1;
  transform: scale(1);
}

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

/* --- Features Section --- */
.features {
  padding: 100px 0;
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(42, 77, 124, 0.1), rgba(230, 126, 34, 0.1));
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 17px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(42, 77, 124, 0.1), rgba(230, 126, 34, 0.1));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* --- Stats Section --- */
.stats {
  padding: 80px 0;
}

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

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}

/* --- CTA Section --- */
.cta {
  padding: 80px 0 100px;
}

.cta-card {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 24px;
  padding: 64px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-card h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-card p {
  font-size: 17px;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
}

/* ============================================
   Reveal Animations
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-content .reveal {
  transition-delay: 0s;
}

.hero-content .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.hero-content .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.hero-visual .reveal {
  transition-delay: 0.3s;
}

.features-grid .reveal:nth-child(1) { transition-delay: 0s; }
.features-grid .reveal:nth-child(2) { transition-delay: 0.05s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.1s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.15s; }
.features-grid .reveal:nth-child(5) { transition-delay: 0.2s; }
.features-grid .reveal:nth-child(6) { transition-delay: 0.25s; }

.cta.reveal.revealed .cta-card {
  animation: scaleIn 0.6s ease forwards;
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ============================================
   Support Page
   ============================================ */

.page-hero {
  padding: 80px 0 60px;
  text-align: center;
}

.page-hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 18px;
}

.support-content {
  padding: 0 0 100px;
}

.support-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.support-main h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 32px;
}

/* FAQ Accordion */
.faq-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item.open {
  border-color: var(--primary-light);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--bg);
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background var(--transition);
  font-family: inherit;
}

.faq-question:hover {
  background: var(--bg-alt);
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 20px 20px;
}

.faq-answer p,
.faq-answer li {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.faq-answer ol {
  padding-left: 20px;
}

.faq-answer li {
  margin-bottom: 4px;
}

/* Sidebar */
.support-sidebar {
  position: sticky;
  top: 92px;
}

.sidebar-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.sidebar-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.sidebar-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.sidebar-card .btn {
  width: 100%;
  justify-content: center;
  font-size: 14px;
  padding: 12px 20px;
}

/* ============================================
   Support Page — Additional Styles
   ============================================ */

.contact-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.contact-section h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.contact-section > p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.support-channels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support-channel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.support-channel h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.support-channel p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.support-channel a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.support-channel a:hover {
  color: var(--secondary);
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.sidebar-links a:hover {
  color: var(--secondary);
}

.app-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.app-info-item:last-child {
  border-bottom: none;
}

.app-info-item .info-label {
  color: var(--text-muted);
  font-weight: 500;
}

.app-info-item .info-value {
  color: var(--text);
  font-weight: 600;
}

.app-info-item .info-value a {
  color: var(--primary);
  text-decoration: none;
}

.app-info-item .info-value a:hover {
  color: var(--secondary);
}

/* ============================================
   Legal Pages (Privacy, Terms)
   ============================================ */

.legal-content {
  padding: 0 0 100px;
}

.legal-body {
  max-width: 720px;
  margin: 0 auto;
}

.legal-body > p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.legal-body h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-body ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.legal-body li {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.legal-body a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.legal-body a:hover {
  color: var(--secondary);
}

@media (max-width: 640px) {
  .legal-body h2 {
    font-size: 19px;
  }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    display: flex;
    justify-content: center;
    margin-top: 40px;
  }
  .phone-frame {
    max-width: 220px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
  .support-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .features {
    padding: 64px 0;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .section-header h2 {
    font-size: 26px;
  }
  .cta-card {
    padding: 40px 24px;
  }
  .cta-card h2 {
    font-size: 26px;
  }
  .page-hero h1 {
    font-size: 30px;
  }
  .nav-links a {
    padding: 6px 10px;
    font-size: 13px;
  }
  .footer-top {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
}
