@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #0b3a25; /* Deep Emerald Green */
  --primary-light: #16563b;
  --primary-dark: #062316;
  --accent-color: #d4af37; /* Metallic Gold */
  --accent-light: #f3e5ab;
  --accent-dark: #aa861d;
  --bg-color: #faf9f5; /* Ivory / Cream */
  --card-bg: #ffffff;
  --text-main: #1c2b24; /* Very dark forest green/charcoal */
  --text-muted: #5c6f66;
  --border-color: #e5e0d5;
  --shadow-sm: 0 2px 4px rgba(11, 58, 37, 0.05);
  --shadow-md: 0 10px 25px rgba(11, 58, 37, 0.08);
  --shadow-lg: 0 20px 40px rgba(11, 58, 37, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
}

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

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

/* Base Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / Navbar */
header {
  padding: 24px 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 24px;
  color: var(--primary-color);
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

.logo-text {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--accent-dark) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-link {
  text-decoration: none;
  font-weight: 700;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 13px;
  transition: var(--transition);
  background-color: transparent;
}

.lang-link:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  background: radial-gradient(
    circle at 80% 20%,
    rgba(212, 175, 55, 0.08) 0%,
    rgba(11, 58, 37, 0.02) 50%,
    transparent 100%
  );
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0l40 40-40 40L0 40z' fill='%230b3a25' fill-opacity='0.01' fill-rule='evenodd'/%3E%3C/svg%3E");
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 52px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 24px;
}

.app-name {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.hero-content h1 span {
  background: linear-gradient(
    135deg,
    var(--primary-light) 0%,
    var(--accent-dark) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 580px;
}

/* Buttons and Badges */
.app-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-store svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.btn-store:hover {
  transform: translateY(-3px);
  background-color: var(--primary-light);
  box-shadow: 0 8px 20px rgba(11, 58, 37, 0.2);
}

.btn-store.store-ios {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-store.store-ios:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* App Mockup Animation */
.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
}

.mockup-container {
  width: 280px;
  height: 570px;
  border-radius: 40px;
  background: var(--primary-color);
  padding: 12px;
  box-shadow:
    var(--shadow-lg),
    0 0 0 4px var(--accent-color);
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.mockup-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: radial-gradient(
    circle at 50% 30%,
    var(--primary-light) 0%,
    var(--primary-color) 100%
  );
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  position: relative;
}

.mockup-screen::before {
  content: '';
  position: absolute;
  top: 10px;
  width: 80px;
  height: 18px;
  background: #000;
  border-radius: 9px;
  z-index: 10;
}

.mockup-app-logo {
  width: 80px;
  height: 80px;
  background: #ffffff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mockup-app-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mockup-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

.mockup-subtitle {
  font-size: 12px;
  color: var(--accent-light);
  opacity: 0.8;
  margin-top: 4px;
}

.mockup-decor {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to top, rgba(212, 175, 55, 0.15), transparent);
}

/* Features Section */
.features {
  padding: 100px 0;
  background-color: #ffffff;
  position: relative;
}

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

.section-title h2 {
  font-size: 38px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 16px;
}

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

.feature-card {
  background: var(--bg-color);
  padding: 40px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(212, 175, 55, 0.3);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: #ffffff;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--primary-color);
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
}

.data-use-note {
  max-width: 820px;
  margin: 48px auto 0;
  padding: 28px 32px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-color);
  text-align: center;
}

.data-use-note h2 {
  margin-bottom: 10px;
  color: var(--primary-color);
  font-size: 24px;
}

.data-use-note p {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.data-use-note a {
  color: var(--primary-color);
  font-weight: 700;
}

/* Group Detail Page specific styles */
.group-preview-section {
  padding: 140px 0 100px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(212, 175, 55, 0.05) 0%,
    rgba(11, 58, 37, 0.02) 60%,
    transparent 100%
  );
}

.group-card {
  max-width: 580px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  padding: 48px;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.group-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--primary-color) 0%,
    var(--accent-color) 50%,
    var(--primary-color) 100%
  );
}

.group-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-light) 100%
  );
  border: 4px solid var(--accent-light);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent-color);
  font-size: 32px;
  font-weight: 700;
}

.group-meta-tags {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.group-tag {
  display: inline-block;
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-dark);
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: 0;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.group-lang-tag {
  background: rgba(11, 58, 37, 0.06);
  color: var(--primary-color);
  border: 1px solid rgba(11, 58, 37, 0.12);
  display: inline-flex;
  align-items: center;
}

.lang-icon {
  margin-right: 6px;
  font-size: 14px;
}

.group-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.group-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.btn-join {
  display: block;
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-light) 100%
  );
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  padding: 16px;
  border-radius: var(--border-radius);
  border: 1px solid var(--accent-color);
  box-shadow: 0 4px 15px rgba(11, 58, 37, 0.15);
  margin-bottom: 24px;
  transition: var(--transition);
}

.btn-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(11, 58, 37, 0.25);
  border-color: #ffffff;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
}

.download-app-section {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-download-sm {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--bg-color);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-download-sm svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-download-sm:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Error / Not Found Page specific styles */
.error-card {
  max-width: 500px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  padding: 48px;
  text-align: center;
  position: relative;
}

.error-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--accent-color);
}

.error-icon {
  width: 72px;
  height: 72px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-dark);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 32px;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.btn-home {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.btn-home:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: #ffffff;
  padding: 60px 0 30px;
  position: relative;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
}

.footer-logo svg {
  width: 28px;
  height: 28px;
  fill: var(--accent-color);
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* Floating Animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Responsive Grid / Styling */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

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

@media (max-width: 576px) {
  .group-card,
  .error-card {
    padding: 32px 20px;
  }

  .group-title {
    font-size: 24px;
  }

  .footer-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-nav {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Magic-link fallback */
.centered-page {
  min-height: 100vh;
  padding: 40px 20px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(212, 175, 55, 0.16), transparent 40%),
    var(--bg-color);
}

.auth-card {
  width: min(100%, 520px);
  padding: 48px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-logo {
  width: 84px;
  height: 84px;
  margin-bottom: 12px;
  object-fit: contain;
}

.auth-card h1 {
  margin-bottom: 12px;
  color: var(--primary-color);
  font-size: 32px;
  line-height: 1.2;
}

.auth-card p {
  color: var(--text-muted);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent-dark) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.eyebrow.error {
  color: #a33a32 !important;
}

.button {
  min-height: 52px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
}

.button.primary {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 8px 22px rgba(11, 58, 37, 0.18);
}

.button:hover {
  transform: translateY(-2px);
}

.button.full {
  width: 100%;
  margin: 12px 0;
}

.store-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.store-links a {
  padding: 8px 12px;
  color: var(--primary-color);
  font-weight: 700;
}

.security {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
}

.ios-open-help {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--border-radius);
  background: rgba(212, 175, 55, 0.08);
  color: var(--primary-color) !important;
  font-weight: 600;
}

@media (max-width: 576px) {
  .auth-card {
    padding: 32px 20px;
  }
}
