/* =============================================
   HM Nepal — Design System & Styles
   Dark/Light theme with glassmorphism
   ============================================= */

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

/* ---- CSS Custom Properties (Dark — Default) ---- */
:root {
  /* Brand Colors */
  --color-primary: #c8a656;
  --color-primary-light: #e0c97a;
  --color-primary-dark: #a8873a;
  --color-accent: #d4af61;

  /* Background */
  --bg-deep: #0a0a0f;
  --bg-dark: #111118;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-glass: rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #f5f0e8;
  --text-secondary: rgba(245, 240, 232, 0.65);
  --text-muted: rgba(245, 240, 232, 0.4);

  /* Borders */
  --border-subtle: rgba(200, 166, 86, 0.12);
  --border-glow: rgba(200, 166, 86, 0.25);

  /* Shadows */
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(200, 166, 86, 0.08);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Ambient */
  --ambient-opacity-1: 0.06;
  --ambient-opacity-2: 0.04;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ---- Light Theme Override ---- */
[data-theme='light'] {
  --bg-deep: #f5f2ec;
  --bg-dark: #ede8df;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-card-hover: rgba(0, 0, 0, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.7);

  --text-primary: #1a1710;
  --text-secondary: rgba(26, 23, 16, 0.6);
  --text-muted: rgba(26, 23, 16, 0.4);

  --color-primary: #9e7c2e;
  --color-primary-light: #b8923e;
  --color-primary-dark: #7a5f20;

  --border-subtle: rgba(158, 124, 46, 0.15);
  --border-glow: rgba(158, 124, 46, 0.3);

  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 40px rgba(158, 124, 46, 0.06);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);

  --ambient-opacity-1: 0.08;
  --ambient-opacity-2: 0.05;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

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

/* ---- Background Ambient Effects ---- */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-ambient::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(200, 166, 86, var(--ambient-opacity-1)) 0%, transparent 70%);
  animation: float-slow 20s ease-in-out infinite;
}

.bg-ambient::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -15%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(200, 166, 86, var(--ambient-opacity-2)) 0%, transparent 70%);
  animation: float-slow 25s ease-in-out infinite reverse;
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ---- Main Container ---- */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: var(--space-lg);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-3xl);
}

/* ---- Checkmark Animation ---- */
.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-xl);
  position: relative;
  animation: scale-in 0.6s var(--transition-spring) both;
  animation-delay: 0.2s;
}

.success-icon__circle {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(200, 166, 86, 0.25), 0 0 60px rgba(200, 166, 86, 0.1);
  animation: pulse-glow 3s ease-in-out infinite;
}

.success-icon__check {
  width: 36px;
  height: 36px;
  stroke: var(--bg-deep);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.success-icon__check path {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: draw-check 0.5s ease-out 0.7s forwards;
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 30px rgba(200, 166, 86, 0.25), 0 0 60px rgba(200, 166, 86, 0.1); }
  50% { box-shadow: 0 0 40px rgba(200, 166, 86, 0.35), 0 0 80px rgba(200, 166, 86, 0.15); }
}

@keyframes scale-in {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---- Thank You Card ---- */
.thankyou-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: slide-up 0.7s var(--transition-smooth) both;
  animation-delay: 0.1s;
}

@keyframes slide-up {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---- Brand Header ---- */
.brand-header {
  margin-bottom: var(--space-sm);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  animation: fade-in 0.6s ease both;
  animation-delay: 0.4s;
}

.brand-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
  animation: fade-in 0.6s ease both;
  animation-delay: 0.5s;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Divider ---- */
.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: var(--space-lg) auto;
  animation: fade-in 0.6s ease both;
  animation-delay: 0.6s;
}

/* ---- Greeting Section ---- */
.greeting {
  animation: fade-in 0.6s ease both;
  animation-delay: 0.5s;
}

.greeting__title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--color-primary-light) 50%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.greeting__message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto;
}

.greeting__message strong {
  color: var(--color-primary-light);
  font-weight: 600;
}

/* ---- Product Categories ---- */
.product-strip {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  animation: fade-in 0.6s ease both;
  animation-delay: 0.8s;
}

.product-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(200, 166, 86, 0.08);
  border: 1px solid rgba(200, 166, 86, 0.15);
  color: var(--color-primary-light);
  transition: all var(--transition-fast);
}

.product-tag:hover {
  background: rgba(200, 166, 86, 0.15);
  border-color: rgba(200, 166, 86, 0.3);
  transform: translateY(-1px);
}

/* ---- Nepal Badge ---- */
.nepal-badge {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(200, 166, 86, 0.06), rgba(200, 166, 86, 0.02));
  border: 1px solid rgba(200, 166, 86, 0.18);
  border-radius: var(--radius-md);
  animation: fade-in 0.6s ease both;
  animation-delay: 0.9s;
}

.nepal-badge__flag {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  animation: pulse-glow 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(200, 166, 86, 0.2));
}

.nepal-badge__text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.nepal-badge__title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary-light);
}

.nepal-badge__sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Social Section ---- */
.social-section {
  width: 100%;
  max-width: 460px;
  margin-top: var(--space-xl);
  animation: slide-up 0.7s var(--transition-smooth) both;
  animation-delay: 0.4s;
}

.social-section__title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/* Website link spans full width as primary CTA */
.social-link--website {
  grid-column: 1 / -1;
  justify-content: center;
  background: rgba(200, 166, 86, 0.06);
  border-color: rgba(200, 166, 86, 0.2);
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.02));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.social-link:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-soft);
}

.social-link:hover::before {
  opacity: 1;
}

.social-link:active {
  transform: translateY(-1px);
}

/* Social platform colors on hover */
.social-link--website:hover {
  border-color: rgba(200, 166, 86, 0.4);
  box-shadow: 0 4px 20px rgba(200, 166, 86, 0.15);
}

.social-link--facebook:hover {
  border-color: rgba(66, 103, 178, 0.4);
  box-shadow: 0 4px 20px rgba(66, 103, 178, 0.15);
}

.social-link--instagram:hover {
  border-color: rgba(225, 48, 108, 0.4);
  box-shadow: 0 4px 20px rgba(225, 48, 108, 0.15);
}

.social-link--whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.4);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.15);
}

.social-link--tiktok:hover {
  border-color: rgba(255, 0, 80, 0.4);
  box-shadow: 0 4px 20px rgba(255, 0, 80, 0.15);
}

.social-link__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.social-link__icon svg {
  width: 24px;
  height: 24px;
}

/* Social icon colors */
.social-link--website .social-link__icon svg { fill: #c8a656; }
.social-link--facebook .social-link__icon svg { fill: #4267B2; }
.social-link--instagram .social-link__icon svg { fill: #E1306C; }
.social-link--whatsapp .social-link__icon svg { fill: #25D366; }
.social-link--tiktok .social-link__icon svg { fill: #ff0050; }

.social-link__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ---- Footer ---- */
.footer {
  width: 100%;
  max-width: 460px;
  margin-top: var(--space-2xl);
  text-align: center;
  animation: fade-in 0.6s ease both;
  animation-delay: 1s;
}

.footer__text {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer__heart {
  color: var(--color-primary);
  display: inline-block;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
}

.footer__nepal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--space-xs);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.footer__flag {
  font-size: 0.9rem;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .page-wrapper {
    padding: var(--space-md);
    padding-top: var(--space-xl);
    padding-bottom: var(--space-2xl);
  }

  .thankyou-card {
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .greeting__title {
    font-size: 1.6rem;
  }

  .greeting__message {
    font-size: 0.9rem;
  }

  .social-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .social-link {
    padding: var(--space-sm) var(--space-md);
  }

  .success-icon {
    width: 68px;
    height: 68px;
  }

  .success-icon__circle {
    width: 68px;
    height: 68px;
  }

  .success-icon__check {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 340px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-soft);
  animation: fade-in 0.6s ease both;
  animation-delay: 1.2s;
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(200, 166, 86, 0.15);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  position: relative;
}

.theme-toggle__sun,
.theme-toggle__moon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle__sun svg,
.theme-toggle__moon svg {
  width: 20px;
  height: 20px;
  fill: var(--color-primary);
}

/* Dark mode: show moon, hide sun */
.theme-toggle__sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-toggle__moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Light mode: show sun, hide moon */
[data-theme='light'] .theme-toggle__sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme='light'] .theme-toggle__moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* Light theme card adjustments */
[data-theme='light'] .thankyou-card {
  border-color: rgba(158, 124, 46, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 0 40px rgba(158, 124, 46, 0.04);
}

[data-theme='light'] .success-icon__circle {
  box-shadow: 0 0 30px rgba(158, 124, 46, 0.2), 0 0 60px rgba(158, 124, 46, 0.08);
}

[data-theme='light'] .social-link--website {
  background: rgba(158, 124, 46, 0.06);
  border-color: rgba(158, 124, 46, 0.18);
}

/* ---- Utility ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
