/**
 * Modern stylesheet fulfilling:
 * - glassmorphism
 * - dark mode vibes via modern colors from pd (light/dark support)
 * - dynamic scaling/animations
 */

:root {
  --primary-color: #2D767F;
  /* Teal */
  --secondary: #E3E9EA;
  /* Light teal/gray */
  --danger: #d94b4b;
  /* Red for cancel actions */
  --warning: #f39c12;
  /* Gold/Orange */

  --bg-color: #f7f9fa;
  --text-color: #1a202c;
  --text-muted: #718096;

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

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

/* Typography elements */
h1 {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.highlight {
  color: var(--primary-color);
}

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

/* Components */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 0;
  border-radius: 0 0 20px 20px;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mr {
  color: var(--primary-color);
}

.safe-text {
  color: var(--text-muted);
  font-weight: 300;
}

.platform-text {
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-weight: normal;
  margin-top: 4px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(45, 118, 127, 0.08);
  border: 1px solid rgba(45, 118, 127, 0.12);
}

.lang-button {
  min-width: 44px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-button:hover {
  transform: none;
  box-shadow: none;
  color: var(--text-color);
}

.lang-button.active {
  background: var(--primary-color);
  color: #fff;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.nav-toggle {
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(45, 118, 127, 0.18);
  background: rgba(255, 255, 255, 0.78);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 12px 30px rgba(45, 118, 127, 0.12);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-color);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-cta {
  white-space: nowrap;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  line-height: 1.6;
}

/* Animated Blooms */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  opacity: 0.5;
  animation: float 10s infinite;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-color);
  top: -100px;
  right: -100px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: -50px;
  left: -100px;
  animation-delay: -5s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}


/* Buttons */
button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 10px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
}

.btn-primary:hover {
  background: #225b61;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 118, 127, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--text-color);
  padding: 0.75rem 1.5rem;
}

.btn-secondary:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.btn-primary.large,
.btn-secondary.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Sections */
.section {
  padding: 8rem 0;
  position: relative;
}

/* Cards Grid */
.grid {
  display: grid;
  gap: 2rem;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 4rem;
}

.card {
  padding: 2.5rem;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
}

.card h3 {
  font-size: 3rem;
  color: var(--primary-color);
}

.card p {
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

/* Stat card hover animation */
.stat-card-hover {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.stat-card-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(45,118,127,0.06), rgba(45,118,127,0.12));
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}
.stat-card-hover:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 48px rgba(45,118,127,0.18);
}
.stat-card-hover:hover::before { opacity: 1; }
.stat-card-hover:hover h3 { transform: scale(1.08); }
.stat-card-hover h3 { transition: transform 0.35s ease; transform-origin: left; }

/* Source button — hidden until hover */
.source-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(45,118,127,0.08);
  border: 1px solid rgba(45,118,127,0.2);
  text-decoration: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s, background 0.2s ease;
  align-self: flex-start;
}
.source-btn .material-icons { font-size: 0.85rem; }
.stat-card-hover:hover .source-btn {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s, background 0.2s ease;
}
.source-btn:hover {
  background: rgba(45,118,127,0.18);
}

.card-icon-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin-bottom: 1rem;
  object-position: center;
  flex-shrink: 0;
}

.problem-section .card-icon-image {
  opacity: 0;
}

/* Two Cols */
.two-cols {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.feature-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-item .material-icons {
  color: var(--primary-color);
}

.feature-item strong {
  display: block;
  margin-bottom: 0.25rem;
}

.feature-item span {
  color: var(--text-muted);
  font-size: 0.95rem;
}


/* Chat Mockup */
.chat-mockup {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Header bar */
.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 0.25rem;
}

.chat-header-info strong {
  display: block;
  font-size: 0.95rem;
}

.chat-status-dot {
  font-size: 0.75rem;
  color: #22c55e;
}

/* Avatars */
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

.mr-safe-avatar {
  background: #f0f9fa;
  overflow: hidden;
}

.mr-safe-avatar img {
  width: 200%;
  height: 200%;
  object-fit: cover;
  object-position: 48% 15%;
  margin-left: -5%;
  margin-top: 65%;
}

.user-avatar {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  font-size: 0.6rem;
}

/* Row layout (avatar + bubble) */
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}

.chat-row.right {
  flex-direction: row-reverse;
}

.chat-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 78%;
}

/* Bubbles */
.chat-bubble {
  padding: 0.85rem 1.2rem;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: slideIn 0.5s ease backwards;
}

.chat-bubble.left {
  background: var(--bg-color);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom-left-radius: 4px;
  color: var(--text-color);
}

.chat-bubble.right {
  background: #f0f9fa;
  border: 1px solid rgba(45, 118, 127, 0.18);
  color: var(--text-color);
  border-bottom-right-radius: 4px;
  animation-delay: 0.5s;
}

/* Timestamps */
.chat-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-left: 0.25rem;
}

.chat-time.right-time {
  text-align: right;
  padding-right: 0.25rem;
}

.status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.status.mr-conditional {
  background: #e0f2f1;
  color: #0d6b72;
  border: 1px solid rgba(45, 118, 127, 0.25);
}

.specs-list {
  margin: 0.5rem 0;
  padding-left: 1rem;
}

.specs-list li {
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
  color: var(--text-color);
}


/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* How It Works */
.how-section {
  background: var(--secondary);
}

.how-section .section-title p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.how-layout {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3.5rem;
}

/* Steps */
.how-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.how-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(45, 118, 127, 0.3);
}

.step-text strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.step-text span {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* UI Screenshot */
.ui-screenshot-wrap {
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.ui-screenshot {
  width: 100%;
  display: block;
  background: transparent;
  border-radius: 0;
}

/* Why MRsafe section */
.why-section {
  background: var(--bg-color);
}

.why-image-wrap {
  display: flex;
  align-items: center;
}

.why-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
  box-shadow: 0 12px 40px rgba(45, 118, 127, 0.18);
  border: none;
  padding: 0;
}

/* Team Section */
.team-section {
  background: var(--secondary);
}

.team-section .section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.team-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3.5rem;
}

.team-card {
  display: flex;
  gap: 2rem;
  padding: 2.5rem;
  align-items: flex-start;
  transition: transform 0.3s ease;
}

.team-card:hover {
  transform: translateY(-6px);
}

.team-photo-wrap {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(45, 118, 127, 0.2);
  border: 3px solid rgba(45, 118, 127, 0.2);
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.initials-wrap {
  background: linear-gradient(135deg, var(--primary-color), #1a4f55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-initials {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.team-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.team-role-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-color);
  margin-bottom: 0.85rem;
}

.team-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

.team-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  background: rgba(45, 118, 127, 0.1);
  border: 1px solid rgba(45, 118, 127, 0.2);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
}

.legal-section {
  background: var(--bg-color);
}

.legal-page {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(227, 233, 234, 0.65), rgba(247, 249, 250, 1));
}

.legal-page-main {
  min-height: 100vh;
  padding-top: 4rem;
}

.legal-page-shell {
  max-width: 980px;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.legal-back-link:hover {
  text-decoration: underline;
}

.legal-card {
  padding: 3rem;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.legal-block {
  padding: 1.5rem;
  border-radius: 18px;
  background: rgba(45, 118, 127, 0.05);
  border: 1px solid rgba(45, 118, 127, 0.08);
}

.legal-block h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.legal-block p {
  color: var(--text-muted);
  line-height: 1.7;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  h1 {
    font-size: 2.5rem;
  }

  .navbar {
    padding: 0.75rem 0;
  }

  .nav-content {
    position: relative;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
  }

  .logo {
    font-size: 1.15rem;
    gap: 6px;
  }

  .platform-text {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-menu {
    order: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding-top: 0;
    margin-top: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.22s ease, visibility 0.22s ease, margin-top 0.3s ease, padding-top 0.3s ease;
  }

  .nav-open .nav-menu {
    max-height: 420px;
    opacity: 1;
    visibility: visible;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(45, 118, 127, 0.12);
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.2rem;
  }

  .lang-switcher {
    width: fit-content;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    border-radius: 0;
    background: transparent;
  }

  .nav-cta {
    width: 100%;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .chat-bubble {
    max-width: 95%;
  }

  .why-image {
    height: 260px;
  }

  .team-cards {
    grid-template-columns: 1fr;
  }

  .legal-card {
    padding: 2rem;
  }

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

  .team-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .team-badges {
    justify-content: center;
  }

  .how-layout {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .mockup-tabs {
    display: none;
  }

  .mockup-left {
    width: 42%;
  }
}
