/* ===== Variables ===== */
:root {
  --primary: #10B981;
  --primary-light: #34D399;
  --primary-dark: #059669;
  --primary-bg: #ECFDF5;
  --primary-glow: rgba(16, 185, 129, 0.15);
  --text: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --max-width: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

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

.centered { text-align: center; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

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

.header-cta {
  padding: 10px 24px;
  background: var(--text);
  color: white;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: #374151;
}

/* ===== Hero ===== */
.hero {
  padding-top: calc(var(--header-h) + 80px);
  padding-bottom: 100px;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -300px;
  inset-inline-end: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 80px;
}

.hero-content { flex: 1; }

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.gradient-text {
  display: inline;
  background-image: linear-gradient(135deg, var(--primary-dark), var(--primary-light), var(--primary-dark));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 520px;
  font-weight: 400;
}

.hero-image {
  flex: 0 0 auto;
  position: relative;
}

.hero-avatar {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-xl);
}

.avatar-glow {
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  z-index: 1;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* ===== Phone Mockup ===== */
.phone-mockup {
  position: relative;
}

.phone-mockup {
  transition: transform 0.4s var(--ease);
}

@media (hover: hover) {
  .phone-mockup:hover {
    transform: scale(1.05);
  }
}

.phone-frame {
  width: 280px;
  background: #1a1a1a;
  border-radius: 44px;
  padding: 10px 8px;
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px #333 inset,
    0 0 0 2px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

/* Side buttons */
.phone-frame::before {
  content: '';
  position: absolute;
  right: -3px;
  top: 120px;
  width: 3px;
  height: 40px;
  background: #2a2a2a;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 -60px 0 0 #2a2a2a;
}

.phone-frame::after {
  content: '';
  position: absolute;
  left: -3px;
  top: 100px;
  width: 3px;
  height: 28px;
  background: #2a2a2a;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 36px 0 0 #2a2a2a, 0 72px 0 0 #2a2a2a;
}

[dir="rtl"] .phone-frame::before {
  right: auto;
  left: -3px;
  border-radius: 0 2px 2px 0;
}

[dir="rtl"] .phone-frame::after {
  left: auto;
  right: -3px;
  border-radius: 2px 0 0 2px;
}

.phone-screen {
  width: 100%;
  border-radius: 28px;
  display: block;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}

/* Per-screenshot cropping — focus on key content, hide status bar + bottom nav */
.phone-screen.crop-food {
  object-position: center 8%;
}

.phone-screen.crop-chat {
  object-position: center 5%;
}

.phone-screen.crop-journey {
  object-position: top;
}

.phone-screen.crop-checkins {
  object-position: center 30%;
}

/* Check-ins section — image has its own phone frame, crop the top bezel */
.checkins-mockup {
  width: 280px;
  overflow: hidden;
  transition: transform 0.4s var(--ease);
}

@media (hover: hover) {
  .checkins-mockup:hover {
    transform: scale(1.05);
  }
}

.checkins-img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: -12%;
}

.phone-screen.crop-resources {
  object-position: center 2%;
}

.phone-screen.crop-challenges {
  object-position: center 5%;
}

/* ===== Store Buttons ===== */
.store-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.store-buttons.centered {
  justify-content: center;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--text);
  color: white;
  transition: all 0.2s var(--ease);
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: #374151;
}

.store-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-label {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.store-name {
  font-size: 1.05rem;
  font-weight: 600;
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin-inline: auto;
  margin-bottom: 56px;
  font-weight: 400;
}

/* ===== Intro ===== */
.intro {
  background: var(--bg);
  padding: 80px 0;
}

.intro-content {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.intro .section-title {
  margin-bottom: 20px;
}

.intro-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 400;
}

/* ===== Feature Sections ===== */
.feature-section {
  padding: 80px 0;
  background: var(--bg);
}

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

.feature-pair {
  display: flex;
  align-items: center;
  gap: 80px;
}

.feature-pair.reverse {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
}

.feature-phone {
  flex: 0 0 auto;
}

.feature-phone .phone-frame {
  width: 260px;
}

.feature-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.feature-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 400;
  max-width: 480px;
}

/* ===== Metaphors ===== */
.metaphors {
  background: var(--bg-alt);
}

.metaphors .section-title {
  margin-bottom: 12px;
}

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

.metaphor-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.metaphor-card::after {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}

.metaphor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.metaphor-card:hover::after {
  transform: scaleX(1);
}

.metaphor-emoji {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1;
}

.metaphor-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--accent);
}

.metaphor-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.metaphor-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 400;
}

/* ===== Philosophy ===== */
.philosophy {
  background: var(--bg);
}

.philosophy-card {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-bg), #F0FDF4);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  border: 1px solid rgba(16,185,129,0.12);
  position: relative;
}

.philosophy-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.philosophy-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
  box-shadow: 0 0 0 6px var(--primary-glow);
}

.philosophy-quote {
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
}

.philosophy-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 28px;
}

.philosophy-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 400;
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--primary-bg), #D1FAE5);
  padding: 100px 0;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 400;
}

/* ===== Footer ===== */
.footer {
  background: var(--text);
  color: white;
  padding: 56px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-name {
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 300px;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s var(--ease);
}

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

.footer-col-lang {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  padding: 0;
}

.lang-toggle:hover {
  color: rgba(255,255,255,0.7);
}

.lang-opt {
  transition: color 0.2s var(--ease);
}

.lang-opt.active {
  color: rgba(255,255,255,0.9);
}

.lang-divider {
  color: rgba(255,255,255,0.25);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .metaphor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 48px;
  }

  .hero-subtitle {
    margin-inline: auto;
  }

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

  .hero-avatar {
    width: 280px;
    height: 280px;
  }

  .feature-pair,
  .feature-pair.reverse {
    flex-direction: column;
    text-align: center;
    gap: 48px;
  }

  .feature-desc {
    max-width: 100%;
    margin-inline: auto;
  }

  .feature-badge {
    margin-inline: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer-desc {
    max-width: 100%;
    margin-inline: auto;
  }

  .footer-links {
    align-items: center;
  }

  .lang-toggle {
    flex-direction: row;
    justify-content: center;
  }

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

  .footer-logo-row {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 64px 0;
  }

  .hero {
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: 64px;
  }

  .hero-avatar {
    width: 180px;
    height: 180px;
  }

  .phone-frame {
    width: 240px;
  }

  .feature-phone .phone-frame {
    width: 220px;
  }

  .metaphor-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .metaphor-card {
    padding: 24px 16px;
  }

  .philosophy-card {
    padding: 36px 24px;
  }

  .store-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .store-btn {
    justify-content: center;
  }
}

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

/* ===== RTL ===== */
[dir="rtl"] body {
  text-align: right;
  font-family: 'Varela Round', -apple-system, BlinkMacSystemFont, sans-serif;
}

[dir="rtl"] .hero-inner {
  direction: rtl;
}

[dir="rtl"] .feature-pair {
  direction: rtl;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .gradient-text {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== Contact Page ===== */
.contact-hero {
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 60px;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg) 100%);
  text-align: center;
}

.contact-hero-inner {
  max-width: 560px;
  margin: 0 auto;
}

.contact-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
  box-shadow: 0 0 0 6px var(--primary-glow);
}

.contact-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.contact-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 400;
}

.contact-cards {
  padding: 60px 0 80px;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 700px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s var(--ease);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.contact-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--primary-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.contact-card-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 400;
}

.contact-email {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
  padding: 10px 24px;
  background: var(--primary-bg);
  border-radius: 100px;
  transition: all 0.2s var(--ease);
}

.contact-email:hover {
  background: var(--primary);
  color: white;
}

.contact-highlight {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
}

@media (max-width: 600px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-hero {
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 40px;
  }
}

/* ===== Legal Pages ===== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 80px;
}

.legal-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal-content .legal-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  font-weight: 400;
}

.legal-content ul {
  padding-inline-start: 24px;
  margin-bottom: 16px;
}

.legal-content li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
  font-weight: 400;
}
