/* ============================
   Todogether Landing Page
   ============================ */

:root {
  --primary: #8D7B68;
  --primary-dark: #675542;
  --primary-light: #C0AE9B;
  --accent: #CDBBA8;
  --bg: #FAFAF8;
  --bg-warm: #F5F0EB;
  --text: #1F2937;
  --text-light: #6B7280;
  --white: #FFFFFF;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
  --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;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

/* ============================
   Typography
   ============================ */

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
}

.text-accent {
  color: var(--primary);
}

.section-tag {
  display: inline-block;
  background: var(--bg-warm);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.section-tag.light {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

/* ============================
   Buttons
   ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(141, 123, 104, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary-light);
}

.btn-outline:hover {
  background: var(--bg-warm);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ============================
   Navigation
   ============================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(141, 123, 104, 0.08);
  transition: all var(--transition);
}

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

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--transition);
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--bg-warm);
  padding: 4px;
  border-radius: 100px;
}

.lang-switcher.mobile {
  margin-top: 12px;
  justify-content: center;
}

.lang-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn.active {
  background: var(--white);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.lang-btn:hover:not(.active) {
  color: var(--primary-dark);
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

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

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

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

.nav-mobile {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-top: 1px solid rgba(141, 123, 104, 0.08);
}

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

.nav-mobile a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  padding: 8px 0;
}

/* ============================
   Hero
   ============================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg-shape {
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 140%;
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--accent) 50%, var(--primary-light) 100%);
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(80px);
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: var(--bg-warm);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-top: 24px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-phone {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

/* ============================
   Phone Frame — 3D Perspective
   ============================ */

.phone-perspective {
  perspective: 1200px;
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: 280px;
  border-radius: 36px;
  overflow: hidden;
  background: var(--white);
  transform-style: preserve-3d;
  transform: rotateY(-12deg) rotateX(4deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    24px 16px 60px rgba(0,0,0,0.15),
    8px 6px 20px rgba(0,0,0,0.08),
    0 0 0 1px rgba(0,0,0,0.04);
}

.phone-frame:hover {
  transform: rotateY(-4deg) rotateX(2deg) translateY(-8px);
  box-shadow:
    32px 24px 80px rgba(0,0,0,0.18),
    12px 8px 24px rgba(0,0,0,0.1),
    0 0 0 1px rgba(0,0,0,0.04);
}

/* Mirror rotation for reverse/right-side showcase */
.phone-tilt-right .phone-frame {
  transform: rotateY(12deg) rotateX(4deg);
  box-shadow:
    -24px 16px 60px rgba(0,0,0,0.15),
    -8px 6px 20px rgba(0,0,0,0.08),
    0 0 0 1px rgba(0,0,0,0.04);
}

.phone-tilt-right .phone-frame:hover {
  transform: rotateY(4deg) rotateX(2deg) translateY(-8px);
  box-shadow:
    -32px 24px 80px rgba(0,0,0,0.18),
    -12px 8px 24px rgba(0,0,0,0.1),
    0 0 0 1px rgba(0,0,0,0.04);
}

.phone-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================
   Social Proof
   ============================ */

.social-proof {
  padding: 60px 0;
  background: var(--white);
  border-top: 1px solid rgba(141, 123, 104, 0.06);
  border-bottom: 1px solid rgba(141, 123, 104, 0.06);
}

.proof-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
}

.proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.proof-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.proof-label {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
}

.proof-divider {
  width: 1px;
  height: 48px;
  background: var(--accent);
}

/* ============================
   Features Grid
   ============================ */

.features {
  padding: 120px 0;
  background: var(--bg);
}

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

.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--transition);
  border: 1px solid rgba(141, 123, 104, 0.06);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(141, 123, 104, 0.12);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--bg-warm);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
}

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

.feature-card h3 {
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ============================
   Showcase Sections
   ============================ */

.showcase {
  background: var(--bg);
}

.showcase-block {
  padding: 100px 0;
}

.showcase-block:nth-child(even) {
  background: var(--white);
}

.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.showcase-reverse .showcase-row {
  direction: rtl;
}

.showcase-reverse .showcase-row > * {
  direction: ltr;
}

.showcase-text h2 {
  margin-bottom: 20px;
}

.showcase-text p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 28px;
}

.showcase-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.showcase-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.showcase-phone {
  display: flex;
  justify-content: center;
}

/* ============================
   Download / CTA
   ============================ */

.download {
  padding: 120px 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

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

.download h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.download p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  color: var(--white);
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.store-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.store-btn svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-btn div {
  text-align: left;
}

.store-btn small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

/* ============================
   Footer
   ============================ */

.footer {
  padding: 60px 0 32px;
  background: var(--text);
  color: rgba(255,255,255,0.7);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.footer-links a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

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

.fade-in,
.fade-in-left,
.fade-in-right {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in {
  transform: translateY(40px);
}

.fade-in-left {
  transform: translateX(-60px);
}

.fade-in-right {
  transform: translateX(60px);
}

.fade-in.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* Staggered feature cards */
.features-grid .feature-card:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.3s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.4s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.5s; }

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

@media (max-width: 1024px) {
  .hero-content {
    gap: 60px;
  }

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

  .showcase-row {
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-right {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 24px 60px;
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-subtitle {
    margin: 24px auto 0;
  }

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

  .hero-phone {
    order: 1;
  }

  .phone-frame {
    width: 240px;
  }

  .proof-items {
    gap: 32px;
  }

  .proof-number {
    font-size: 2rem;
  }

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

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

  .showcase-block {
    padding: 60px 0;
  }

  .showcase-row {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .showcase-reverse .showcase-row {
    direction: ltr;
  }

  .showcase-phone {
    order: 1;
  }

  .showcase-list {
    align-items: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 32px;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

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

@media (max-width: 480px) {
  .hero-badge,
  .section-tag {
    font-size: 0.8rem;
  }

  .phone-frame {
    width: 220px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .feature-card {
    padding: 28px;
  }

  .proof-items {
    flex-direction: column;
    gap: 24px;
  }

  .proof-divider {
    width: 48px;
    height: 1px;
  }
}
