/* ============================================================
   Sophie Landing Page — Styles
   ============================================================ */

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

:root {
  --blue: #25D366;
  --blue-hover: #1da851;
  --navy: #0B3558;
  --gray: #476788;
  --bg-light: #F8F9FB;
  --whatsapp: #25D366;
  --border: #D4E0ED;
  --card-shadow: 0px 4px 5px 0px #4767880A, 0px 8px 15px 0px #47678808, 0px 30px 50px 0px #47678814;
  --radius-sm: 8px;
  --radius-md: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--gray);
  background: #fff;
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  color: var(--navy);
  font-weight: 700;
}

h1 { font-size: 3.5rem; line-height: 1.2; }
h2 { font-size: 2.375rem; line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.4; }

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

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(11,53,88,0.08);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
}
.logo-icon { flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--navy); }

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

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--gray);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: background 0.2s, color 0.2s;
}
.lang-btn:hover { color: var(--navy); }
.lang-btn.active {
  background: var(--blue);
  color: #fff;
}
.lang-divider { color: var(--border); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  border: none;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-hover); }

.btn-secondary {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--navy);
  color: var(--navy);
}

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

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 140px 0 100px;
  background: var(--bg-light);
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.1875rem;
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Phone Mockup ---------- */
.hero-phone {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 320px;
  height: 560px;
  background: #ECE5DD;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(11,53,88,0.18), 0 0 0 4px #1a1a1a;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-notch {
  height: 28px;
  background: #1a1a1a;
  position: relative;
}
.phone-notch::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: #333;
  border-radius: 3px;
}

.whatsapp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #075E54;
  color: #fff;
}
.wa-back { display: flex; align-items: center; }
.wa-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}
.wa-info { display: flex; flex-direction: column; }
.wa-name { font-size: 0.875rem; font-weight: 600; }
.wa-status { font-size: 0.6875rem; opacity: 0.8; }

.whatsapp-chat {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  background: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='20' cy='20' r='1' fill='%2300000008'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='%23ECE5DD' width='200' height='200'/%3E%3Crect fill='url(%23p)' width='200' height='200'/%3E%3C/svg%3E");
}

/* Chat bubbles */
.chat-bubble {
  max-width: 82%;
  padding: 7px 10px 4px;
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.4;
  position: relative;
  opacity: 0;
  transform: translateY(8px);
  animation: bubbleFadeIn 0.4s ease forwards;
  color: #111;
}
.chat-bubble .time {
  display: block;
  text-align: right;
  font-size: 0.625rem;
  color: #667781;
  margin-top: 2px;
}
.bubble-customer {
  align-self: flex-end;
  background: #DCF8C6;
  border-bottom-right-radius: 2px;
}
.bubble-sophie {
  align-self: flex-start;
  background: #fff;
  border-bottom-left-radius: 2px;
}

/* Service option buttons in chat */
.chat-option {
  display: inline-block;
  background: #E8F5E9;
  border: 1px solid #25D36640;
  border-radius: 16px;
  padding: 4px 12px;
  margin: 3px 4px 3px 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #075E54;
}
.chat-option.selected {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}

/* Typing indicator */
.typing-indicator {
  align-self: flex-start;
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  gap: 4px;
  opacity: 0;
  animation: bubbleFadeIn 0.3s ease forwards;
}
.typing-indicator span {
  width: 7px;
  height: 7px;
  background: #aaa;
  border-radius: 50%;
  animation: typingDot 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

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

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--gray);
  margin-top: 12px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

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

.feature-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0px 8px 20px 0px #4767880F, 0px 16px 40px 0px #47678812, 0px 40px 80px 0px #4767881A;
}

.feature-icon {
  margin-bottom: 20px;
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}
.feature-card p {
  font-size: 1rem;
  line-height: 1.5;
}

.feature-card-wide {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.feature-wide-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.feature-wide-inner h3 { margin-bottom: 4px; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
  padding: 100px 0;
  background: var(--bg-light);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step {
  text-align: center;
  max-width: 280px;
  padding: 0 16px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 1.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step h3 {
  margin-bottom: 10px;
  font-size: 1.1875rem;
}
.step p {
  font-size: 0.9375rem;
}

.step-line {
  width: 80px;
  height: 2px;
  background: var(--border);
  margin-top: 28px;
  flex-shrink: 0;
}

/* ============================================================
   ANALYTICS PREVIEW — Dashboard Mockup
   ============================================================ */
.analytics {
  padding: 100px 0;
  background: var(--bg-light);
}

/* Dashboard window frame */
.dashboard-mockup {
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(11,53,88,0.15), 0 0 0 1px rgba(11,53,88,0.08);
}

.dash-chrome {
  background: #f1f3f5;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e0e4e8;
}
.dash-dots {
  display: flex;
  gap: 6px;
}
.dash-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.dash-url {
  flex: 1;
  background: #fff;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.75rem;
  color: var(--gray);
  font-family: 'Inter', monospace;
  text-align: center;
  border: 1px solid #e0e4e8;
}

.dash-body {
  display: flex;
  background: #f8f9fb;
  min-height: 520px;
}

/* Sidebar */
.dash-sidebar {
  width: 160px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  padding: 16px 0;
  flex-shrink: 0;
}
.dash-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 16px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
}
.dash-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 500;
  cursor: default;
  transition: background 0.15s;
}
.dash-nav-item.active {
  background: #f0f4ff;
  color: #006BFF;
  font-weight: 600;
}

/* Main content area */
.dash-main {
  flex: 1;
  padding: 16px 20px;
  overflow: hidden;
}

/* Date filter bar */
.dash-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.dash-filter-btn {
  padding: 5px 12px;
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: 6px;
  color: var(--gray);
  background: #fff;
  border: 1px solid #e5e7eb;
  cursor: default;
}
.dash-filter-btn.active {
  background: #006BFF;
  color: #fff;
  border-color: #006BFF;
}

/* KPI cards */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.dash-kpi {
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  min-width: 0;
}
.dash-kpi-label {
  display: block;
  font-size: 0.6rem;
  color: var(--gray);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.dash-kpi-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  white-space: nowrap;
}
.dash-kpi-value.highlight-blue {
  color: #006BFF;
}

/* Chart cards */
.dash-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.dash-chart-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
}
.dash-chart-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}

/* Legend dots */
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
}
.legend-dot.dashed {
  border-radius: 0;
  width: 12px;
  height: 2px;
  border-top: 2px dashed;
  background: transparent !important;
}

/* Line chart */
.dash-line-chart {
  width: 100%;
  height: 110px;
  display: block;
}
.dash-chart-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.65rem;
  color: var(--gray);
}
.dash-chart-legend span {
  display: flex;
  align-items: center;
}

/* Bar chart */
.dash-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 110px;
  padding-bottom: 2px;
}
.dash-bar {
  flex: 1;
  height: var(--h);
  background: #2a9d8f;
  border-radius: 3px 3px 0 0;
  min-width: 0;
  transition: height 1s ease-out;
}
.dash-bar.blue {
  background: #4361ee;
}

/* Days chart with labels */
.days-chart {
  height: 100px;
  padding-bottom: 20px;
}
.dash-bar-labeled {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.dash-bar-labeled .dash-bar {
  width: 100%;
}
.dash-bar-labeled span {
  font-size: 0.55rem;
  color: var(--gray);
  margin-top: 4px;
  font-weight: 500;
}

/* Pie chart */
.dash-pie-container {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-pie-chart {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.dash-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.6rem;
  color: var(--gray);
}
.dash-pie-legend span {
  display: flex;
  align-items: center;
}

/* ---- Dashboard mockup responsive ---- */
@media (max-width: 768px) {
  .dash-sidebar {
    display: none;
  }
  .dash-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-charts-row {
    grid-template-columns: 1fr;
  }
  .dash-kpi-value {
    font-size: 1rem;
  }
  .dashboard-mockup {
    margin: 0 -12px;
  }
}

@media (max-width: 480px) {
  .dash-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .dash-kpi {
    padding: 8px 10px;
  }
  .dash-kpi-value {
    font-size: 0.875rem;
  }
  .dash-kpi-label {
    font-size: 0.5rem;
  }
  .dash-filter-bar {
    flex-wrap: wrap;
  }
  .dash-main {
    padding: 10px 12px;
  }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 100px 0;
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}
.form-group:last-child:not(.form-row .form-group) {
  margin-bottom: 24px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--navy);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,107,255,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #A0B4C8;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-submit {
  width: 100%;
}

/* Success message */
.form-success {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px;
}
.success-icon {
  margin-bottom: 20px;
}
.form-success h3 {
  margin-bottom: 8px;
}
.form-success p {
  font-size: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy {
  font-size: 0.875rem;
  color: var(--gray);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--gray);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--navy); }

/* ============================================================
   RESPONSIVE — Tablet (768px)
   ============================================================ */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.875rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(11,53,88,0.08);
  }
  .nav-links.open { display: flex; }

  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 120px 0 80px; }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }

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

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  .step-line {
    width: 2px;
    height: 40px;
    margin: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (480px)
   ============================================================ */
@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  body { font-size: 1rem; }

  .hero { padding: 100px 0 64px; }

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

  .feature-wide-inner {
    flex-direction: column;
    text-align: center;
  }

  .phone-mockup {
    width: 280px;
    height: 490px;
  }

  .features, .how-it-works, .contact {
    padding: 72px 0;
  }
}
