/* ============================================
   Hemma.health — Conversion Landing Page
   ============================================ */

/* --- Custom Properties --- */
:root {
  --cream: #FAF7F2;
  --navy: #1B3A5C;
  --gold: #C4961A;
  --white: #FFFFFF;
  --muted: #636E72;
  --border: #E8E4DD;
  --dark: #2D3436;
  --font-en: 'Inter', sans-serif;
  --font-ar: 'Noto Sans Arabic', sans-serif;
}

/* --- 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-en);
  background: var(--cream);
  color: var(--navy);
  line-height: 1.6;
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: var(--font-ar);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Bilingual Visibility --- */
[data-lang="ar"][hidden] { display: none !important; }
[data-lang="en"][hidden] { display: none !important; }

/* --- NAV --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.logo-ar {
  color: var(--gold);
  font-family: var(--font-ar);
}

.lang-toggle {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.2s, background 0.2s;
}

.lang-toggle:hover {
  border-color: var(--gold);
  background: #FFF9EE;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  font-weight: 600;
  border-radius: 12px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(196, 150, 26, 0.3);
}

.btn-primary:hover {
  background: #D4A31E;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(196, 150, 26, 0.4);
}

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

.btn-lg {
  padding: 16px 40px;
  font-size: 1.125rem;
}

/* --- HERO --- */
.hero {
  padding: 60px 0 40px;
  overflow: hidden;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--navy);
}

html[dir="rtl"] .hero-text h1 {
  letter-spacing: 0;
}

.subline {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-phone {
  flex-shrink: 0;
}

/* --- PHONE FRAME --- */
.phone-frame {
  width: 260px;
  height: 520px;
  border-radius: 36px;
  border: 6px solid #1a1a1a;
  background: #FAF7F2;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0,0,0,0.05);
  position: relative;
  flex-shrink: 0;
  margin: 0 auto;
}

.phone-notch {
  width: 120px;
  height: 24px;
  background: var(--dark);
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
}

.phone-screen {
  padding: 12px 16px;
  height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #FAF7F2 0%, #F5F0E8 100%);
}

/* --- HERO SCREEN MOCKUP --- */
.app-header-bar {
  margin-bottom: 16px;
}

.app-greeting {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}

.app-card {
  background: var(--white);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.app-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.app-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.app-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
}

.app-progress-pct {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
}

.app-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.app-badge.gold {
  background: #FFF3D6;
  color: var(--gold);
}

.app-badge.navy {
  background: #E8EDF2;
  color: var(--navy);
}

.app-tab-bar {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.app-tab {
  text-align: center;
  font-size: 0.6rem;
  color: var(--muted);
}

.app-tab.active {
  color: var(--gold);
}

.app-tab-icon {
  font-size: 1rem;
  margin-bottom: 2px;
}

/* --- SHOWCASE --- */
.showcase {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 56px;
  letter-spacing: -0.02em;
}

html[dir="rtl"] .section-title {
  letter-spacing: 0;
}

.showcase-item {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-bottom: 72px;
}

.showcase-item:last-child {
  margin-bottom: 0;
}

.showcase-item--reverse {
  flex-direction: row-reverse;
}

html[dir="rtl"] .showcase-item--reverse {
  flex-direction: row;
}

html[dir="rtl"] .showcase-item:not(.showcase-item--reverse) {
  flex-direction: row-reverse;
}

.showcase-text {
  flex: 1;
  min-width: 0;
}

.showcase-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.showcase-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 400px;
}

/* --- MOCK SCREENS (inside phone frames) --- */

/* Screen 1: Learning Path */
.mock-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.mock-module-card {
  background: var(--white);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mock-module-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mock-module-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
}

.mock-badge {
  font-size: 0.55rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.mock-badge.priority {
  background: #FFE0E0;
  color: #C0392B;
}

.mock-badge.recommended {
  background: #FFF3D6;
  color: var(--gold);
}

.mock-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.mock-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
}

.mock-meta {
  font-size: 0.6rem;
  color: var(--muted);
}

/* Screen 2: Lesson Viewer */
.mock-header-sm {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.mock-step-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.mock-step-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
}

.mock-step-label {
  font-size: 0.6rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.mock-lesson-body {
  flex: 1;
}

.mock-instruction {
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--navy);
  margin-bottom: 14px;
}

.mock-tip-box {
  background: #E8F0FE;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--navy);
}

html[dir="rtl"] .mock-tip-box {
  border-left: none;
  border-right: 3px solid var(--navy);
}

.mock-tip-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mock-tip-text {
  font-size: 0.65rem;
  color: var(--navy);
  line-height: 1.5;
}

.mock-next-btn {
  margin-top: auto;
  background: var(--gold);
  color: var(--white);
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Screen 3: Results */
.mock-score-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #E8F5E9;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.mock-score-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2E7D32;
}

.mock-score-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2E7D32;
}

.mock-domain {
  margin-bottom: 10px;
}

.mock-domain-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.mock-domain-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--navy);
}

.mock-domain-score {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--navy);
}

.mock-domain-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.mock-domain-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
}

.mock-domain-fill.low {
  background: #E74C3C;
}

.mock-insights {
  margin-top: 14px;
  background: var(--white);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mock-insights-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mock-insights-text {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.5;
}

/* --- FEATURES --- */
.features {
  padding: 64px 0;
  background: var(--white);
}

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

.feature-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

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

/* --- HOW IT WORKS --- */
.how-it-works {
  padding: 80px 0;
}

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

.step {
  text-align: center;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy);
}

.step p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* --- TRUST --- */
.trust {
  padding: 56px 0;
  background: var(--white);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--navy);
  font-weight: 500;
}

.trust-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* --- FINAL CTA --- */
.final-cta {
  padding: 80px 0;
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 24px;
}

.cta-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --- FOOTER --- */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-tagline {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.footer-contact {
  margin-bottom: 8px;
}

.footer-contact a {
  font-size: 0.85rem;
  color: var(--gold);
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- FADE-IN ANIMATIONS --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE --- */

/* Tablet */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .subline {
    margin-left: auto;
    margin-right: auto;
  }

  html[dir="rtl"] .subline {
    margin-left: auto;
    margin-right: auto;
  }

  .showcase-item,
  .showcase-item--reverse {
    flex-direction: column !important;
    text-align: center;
    gap: 32px;
  }

  .showcase-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
    gap: 40px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

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

  .subline {
    margin-left: auto;
    margin-right: auto;
  }

  .phone-frame {
    width: 220px;
    height: 440px;
    border-radius: 28px;
    border-width: 5px;
  }

  .phone-notch {
    width: 100px;
    height: 20px;
    border-radius: 0 0 12px 12px;
  }

  .phone-screen {
    padding: 10px 12px;
    height: calc(100% - 20px);
  }

  .showcase-item .phone-frame,
  .showcase-item--reverse .phone-frame {
    margin: 0 auto;
  }

  .hero {
    padding: 40px 0 24px;
  }

  .hero-text h1 {
    font-size: 1.75rem;
  }

  .btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .showcase {
    padding: 56px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .showcase-item {
    margin-bottom: 56px;
  }

  .showcase-text h3 {
    font-size: 1.25rem;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .how-it-works {
    padding: 56px 0;
  }

  .final-cta {
    padding: 56px 0;
  }
}

/* --- RTL adjustments --- */
html[dir="rtl"] {
  font-family: var(--font-ar);
}

html[dir="rtl"] .logo {
  font-family: var(--font-ar);
}

html[dir="rtl"] .btn {
  font-family: var(--font-ar);
}
