/* ============================================
   Hassala Landing Page – Design System
   Color palette from AppColors:
     primary:        #10B981 (Emerald)
     primaryDark:    #059669
     primaryLight:   #F0FDF4
     secondary:      #F59E0B (Amber)
     accent:         #FEF3C7
     background:     #FDFDFB
     foreground:     #2D3436
     muted:          #F7F7F5
     mutedForeground:#6B7280
     border:         rgba(0,0,0,0.08)
   ============================================ */

:root {
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #F0FDF4;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --secondary: #F59E0B;
  --accent: #FEF3C7;
  --accent-fg: #92400E;
  --bg: #FDFDFB;
  --card: #FFFFFF;
  --surface: #F9FAFB;
  --fg: #2D3436;
  --text: #2D3436;
  --muted: #F7F7F5;
  --muted-fg: #6B7280;
  --border: rgba(0, 0, 0, 0.08);
  --error: #EF4444;
  --success: #10B981;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 60px rgba(16, 185, 129, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 253, 251, 0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.logo img {
  height: 38px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted-fg);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-dark);
  background: var(--primary-light);
}

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

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--fg);
  border-radius: 4px;
  transition: var(--transition);
}

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

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

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8rem;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, var(--bg) 0%, #E2E8F0 50%, #D1FAE5 100%);
}

.relative-container {
  position: relative;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: var(--primary);
  top: -200px;
  right: -150px;
  animation: float 20s ease-in-out infinite;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: -100px;
  left: -100px;
  animation: float 25s ease-in-out infinite reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--primary-dark);
  top: 50%;
  left: 50%;
  animation: float 15s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.hero-content {
  max-width: 540px;
  text-align: left;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1.2rem;
  letter-spacing: -0.03em;
}

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

.hero p {
  font-size: 1.1rem;
  color: var(--muted-fg);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-visual {
  z-index: 2;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.mockup-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: auto;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.main-screen-container {
  width: 300px;
  height: 640px;
  background: #111827;
  /* Dark phone frame */
  border-radius: 40px;
  /* User-requested frame radius */
  padding: 10px;
  /* Bezel thickness */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.4), inset 0 0 0 1px #4B5563, var(--shadow-glow);
  position: relative;
  z-index: 2;
  transform: rotateY(-2deg) rotateX(1deg);
  transition: transform 0.5s ease;
}

.main-screen-container:hover {
  transform: rotateY(0deg) rotateX(0deg);
}

.main-screen-container::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.hero-app-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
  /* User-requested image radius */
  background: var(--card);
  /* Ensure no background bleed */
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Floating Widgets Base Layout */
.floating-widget {
  position: absolute;
  z-index: 5;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
  animation: float-widget 6s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(16, 185, 129, 0.4);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.float-tl {
  width: 240px;
  height: 120px;
  top: 15%;
  left: -5%;
  animation-delay: 0s;
}

.float-br {
  width: 140px;
  height: 140px;
  bottom: 10%;
  right: -15%;
  animation-delay: 2s;
  border-radius: 50%;
}

.float-tr {
  width: 220px;
  height: 140px;
  top: -60px;
  left: -40px;
  animation-delay: 1s;
}

@keyframes float-widget {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-store {
  background: var(--fg);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ============================================
   SECTIONS COMMON
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--muted-fg);
  max-width: 480px;
  margin: 0 auto;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-section,
.contact-section {
  padding: 6rem 0;
}

.alt-bg {
  background: var(--surface);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
  padding: 6rem 0;
  background: var(--bg);
}

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 185, 129, 0.2);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--primary);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--primary);
  color: white;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--muted-fg);
  line-height: 1.6;
}

/* ============================================
   CONTENT CARDS (About, Privacy, Terms)
   ============================================ */
.content-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  line-height: 1.8;
}

.content-card h1,
.content-card h2,
.content-card h3 {
  color: var(--primary-dark);
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.content-card h3:first-child {
  margin-top: 0;
}

.content-card p {
  margin-bottom: 1rem;
  color: var(--text);
}

.content-card em {
  color: var(--muted-fg);
  font-style: italic;
}

.content-card strong {
  color: var(--fg);
  font-weight: 600;
}

.content-card ul {
  margin: 0.5rem 0 1.2rem 1.5rem;
  padding: 0;
}

.content-card ul li {
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.7;
}

.content-card a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(16, 185, 129, 0.3);
  text-underline-offset: 3px;
  transition: var(--transition);
}

.content-card a:hover {
  text-decoration-color: var(--primary);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.input-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background-color: var(--surface);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: var(--card);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-fg);
  opacity: 0.6;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   MESSAGES (Success / Error)
   ============================================ */
.msg {
  margin-top: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  display: none;
}

.msg.success {
  display: block;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.msg.error {
  display: block;
  background: #FEF2F2;
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ============================================
   SKELETONS
   ============================================ */
.skeleton-text {
  height: 14px;
  background: linear-gradient(90deg, var(--muted) 25%, var(--surface) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 12px;
  border-radius: 6px;
}

.skeleton-text.short {
  width: 60%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--fg);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 2rem 2rem;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  width: 100%;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.feature-card:nth-child(1) {
  animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
  animation-delay: 0.4s;
}

.feature-card:nth-child(5) {
  animation-delay: 0.5s;
}

.feature-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* ============================================
   APP REPLICAS (Phase 2)
   ============================================ */
.app-goal-card {
  width: 260px;
  height: auto;
  flex-direction: column;
  padding: 1.2rem;
  background: #FFFFFF;
  border: 1px solid #F3F4F6;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  top: 30%;
  left: -20%;
}

.app-circle-standalone {
  background: #FFFFFF;
  border: 1px solid #F3F4F6;
  box-shadow: 0 10px 20px rgba(229, 231, 235, 0.5);
}

.app-progress-circle-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.app-progress-circle-wrap.small {
  width: 100px;
  height: 100px;
}

.app-progress-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.app-progress-svg circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.bg-circle {
  stroke: #F0FDF4;
}

.progress-circle {
  stroke: #10B981;
  transition: stroke-dashoffset 1s ease-out;
}

.circle-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circle-text .pct {
  font-size: 1.8rem;
  font-weight: 700;
  color: #047857;
  line-height: 1.1;
}

.small .pct {
  font-size: 1.5rem;
}

.circle-text .lbl {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6B7280;
}

.app-stats-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 1.5rem;
  font-family: 'Inter', sans-serif;
}

.stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.stat-title {
  font-size: 0.7rem;
  color: #4B5563;
  font-weight: 500;
}

.stat-val {
  font-size: 0.9rem;
  font-weight: 600;
}

.val-green {
  color: #059669;
}

.val-dark {
  color: #374151;
}

.val-orange {
  color: #D97706;
}

/* ============================================
   APP REPLICAS (Phase 3)
   ============================================ */
.app-motivation-card {
  width: 320px;
  height: auto;
  min-height: 80px;
  padding: 1rem 1.2rem;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  top: -80px;
  right: -20px;
  left: auto;
}

.motivation-icon {
  font-size: 1.5rem;
  background: var(--accent);
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.motivation-content {
  display: flex;
  flex-direction: column;
}

.motivation-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.motivation-text {
  font-size: 0.8rem;
  color: var(--muted-fg);
  line-height: 1.3;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
    padding-top: 7rem;
  }

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

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

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

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

  .mockup-wrapper {
    transform: scale(0.85);
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(253, 253, 251, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem 2rem 2rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-xs);
  }

  .hero {
    min-height: auto;
    padding: 7rem 1.5rem 4rem;
  }

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

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .content-section,
  .contact-section,
  .features-section {
    padding: 4rem 0;
  }

  .form-container,
  .content-card {
    padding: 1.5rem;
  }

  .mockup-wrapper {
    transform: scale(0.75);
    min-height: 480px;
  }

  .floating-widget {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-store {
    width: 100%;
    justify-content: center;
  }

  h2 {
    font-size: 1.6rem;
  }
}
