:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #dfdfdfc0;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Prevent global horizontal scrolling breakout */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .navbar {
    padding: 1.2rem 2.5rem;
  }
}

.logo {
  font-weight: 800;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  letter-spacing: -0.02em;
}

.nav-links {
  display: none; /* Hidden on mobile by default */
  list-style: none;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex; /* Visible on iPads, tablets, and desktops */
  }
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0.5rem 0;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-actions {
    gap: 0.8rem;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  touch-action: manipulation;
  min-height: 44px; /* Optimal tap target size */
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .btn {
    padding: 0.65rem 1.3rem;
    font-size: 0.95rem;
  }
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-hero {
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .btn-hero {
    padding: 0.9rem 1.8rem;
    font-size: 1.05rem;
  }
}

/* ==========================================================================
   Hero Section & Mockup Showcase
   ========================================================================== */
.hero {
  text-align: center;
  padding: 2.5rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hero {
    padding: clamp(3rem, 6vw, 5rem) 1.25rem 2.5rem 1.25rem;
  }
}

.badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary-color);
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  border: 1px solid #bfdbfe;
}

@media (min-width: 768px) {
  .badge {
    padding: 0.4rem 1rem;
    margin-bottom: 1.25rem;
  }
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .hero h1 {
    margin-bottom: 1rem;
  }
}

.hero p {
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 2rem auto;
  font-style: italic;
  padding: 0 0.25rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .hero p {
    margin: 0 auto 2.5rem auto;
    padding: 0 0.5rem;
  }
}

.hero-image-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hero-image-container {
    border-radius: 16px;
  }
}

.browser-header {
  background: #f8fafc;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .browser-header {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .dot {
    width: 10px;
    height: 10px;
  }
}

.red { background: #ef4444; }
.yellow { background: #f59e0b; }
.green { background: #10b981; }

.browser-title {
  margin-left: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .browser-title {
    margin-left: 0.5rem;
    font-size: 0.8rem;
  }
}

.hero-preview-box {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  background: #f1f5f9;
}

@media (min-width: 576px) {
  .hero-preview-box {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .hero-preview-box {
    grid-template-columns: repeat(3, 1fr);
    padding: clamp(1rem, 3vw, 2.5rem);
    gap: 1rem;
  }
}

.preview-card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  text-align: left;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .preview-card {
    padding: 1.1rem;
  }
}

.preview-card.highlight {
  border-left: 4px solid var(--primary-color);
}

.preview-card .tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}

@media (min-width: 768px) {
  .preview-card .tag {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
  }
}

.preview-card h4 {
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .preview-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
  }
}

.preview-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  word-break: break-word;
}

@media (min-width: 768px) {
  .preview-card p {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features, .how-it-works {
  padding: 2.5rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .features, .how-it-works {
    padding: clamp(3rem, 7vw, 5rem) 1.25rem;
  }
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

@media (min-width: 768px) {
  .section-header {
    margin: 0 auto clamp(2rem, 5vw, 3.5rem) auto;
  }
}

.section-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
  word-break: break-word;
}

@media (min-width: 768px) {
  .section-header h2 {
    margin-bottom: 0.8rem;
  }
}

.section-header p {
  color: var(--text-muted);
  font-size: clamp(0.85rem, 2vw, 1rem);
  word-break: break-word;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 576px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.feature-card {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .feature-card {
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
  }
}

.icon-wrapper {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .icon-wrapper {
    font-size: 2.2rem;
    margin-bottom: 1rem;
  }
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .feature-card p {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   Team Members Section
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Clean 2-column smartphone grid */
  gap: 1rem;
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr); /* Clean 3-column tablet / iPad grid */
    gap: 1.5rem;
  }
}

.team-card {
  text-align: center;
  padding: 1.15rem 0.85rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .team-card {
    padding: 1.75rem 1.25rem;
  }
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
}

.team-avatar {
  width: 90px;
  height: 90px;
  margin: 0 auto 0.85rem auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease;
  touch-action: manipulation;
}

@media (min-width: 768px) {
  .team-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.25rem auto;
    border: 4px solid var(--primary-color);
  }
}

.team-avatar:hover {
  transform: scale(1.04);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .team-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
  }
}

.team-card .role {
  font-size: 0.8rem;
  color: var(--primary-color);
  font-weight: 600;
  word-break: break-word;
}

@media (min-width: 768px) {
  .team-card .role {
    font-size: 0.88rem;
  }
}

/* Extra Small Phones (iPhone SE, folds) */
@media (max-width: 380px) {
  .team-grid {
    grid-template-columns: 1fr; /* Single column fallback for extremely narrow devices */
  }
}

/* ==========================================================================
   Image Modal Overlay
   ========================================================================== */
.modal {
  display: none; /* Toggled to 'flex' via script.js */
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 1rem;
  box-sizing: border-box;

  /* Perfect Center Alignment */
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease-out;
}

@media (min-width: 768px) {
  .modal {
    padding: 1.5rem;
  }
}

.modal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 450px;
  width: 100%;
  margin: auto;
  box-sizing: border-box;
}

.modal-content {
  display: block;
  width: 90%;
  max-width: 420px;
  max-height: 55vh;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 3px solid var(--card-bg);
  animation: zoomIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#modal-caption {
  margin-top: 1rem;
  text-align: center;
  color: #ffffff;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  max-width: 90%;
  word-wrap: break-word;
}

@media (min-width: 768px) {
  #modal-caption {
    margin-top: 1.25rem;
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #f1f5f9;
  font-size: 34px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
  user-select: none;
}

@media (min-width: 768px) {
  .modal-close {
    top: 20px;
    right: 25px;
    font-size: 38px;
  }
}

.modal-close:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   CTA Banner & Footer
   ========================================================================== */
.cta-banner {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #1e293b;
  color: #ffffff;
  margin-top: 2rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .cta-banner {
    padding: clamp(3rem, 6vw, 5rem) 1.25rem;
  }
}

.cta-banner h2 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  margin-bottom: 0.6rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .cta-banner h2 {
    margin-bottom: 0.8rem;
  }
}

.cta-banner p {
  color: #94a3b8;
  font-size: clamp(0.85rem, 2vw, 1rem);
  word-break: break-word;
}

footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  footer {
    padding: 1.75rem 1rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Splash Screen with Realistic 3D Spinning Earth
   ========================================================================== */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0b0f19;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  box-sizing: border-box;
}

#splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: splashPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0 1rem;
  box-sizing: border-box;
}

.earth-container {
  width: 130px;
  height: 130px;
  margin-bottom: 1.25rem;
  perspective: 1000px;
}

@media (min-width: 768px) {
  .earth-container {
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
  }
}

.earth {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/8/83/Equirectangular_projection_SW.jpg');
  background-size: auto 100%;
  background-repeat: repeat-x;
  animation: rotateEarth 14s linear infinite;
  box-shadow: 
    inset 18px 0 40px 6px rgba(0, 0, 0, 0.85),
    inset -4px 0 12px 2px rgba(255, 255, 255, 0.3),
    0 0 25px 3px rgba(37, 99, 235, 0.45);
  transform: rotate(-23.5deg);
}

.splash-logo {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.splash-subtitle {
  color: #94a3b8;
  font-size: clamp(0.88rem, 2.5vw, 1.15rem);
  font-weight: 500;
}

@keyframes rotateEarth {
  0% { background-position: 0 0; }
  100% { background-position: -200% 0; }
}

@keyframes splashPop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Google Sign-In & Divider Styling
   ========================================================================== */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.7rem 1rem;
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .btn-google {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
}

.btn-google:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: #9ca3af;
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .divider {
    margin: 1.5rem 0;
    font-size: 0.85rem;
  }
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.divider span {
  padding: 0 0.75rem;
}