:root {
  --font-title: "Unbounded", sans-serif;
  --font-body: "Outfit", sans-serif;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(28, 23, 20, 0.12);
  --surface: #ffffff;
  --surface-soft: #f7f7f7;
}

body[data-theme="sahara"] {
  --bg-1: #f8f2e8;
  --bg-2: #efe1cf;
  --card: rgba(255, 249, 239, 0.78);
  --text: #2d251f;
  --muted: #6f5d50;
  --primary: #9f6d31;
  --primary-2: #6d8b57;
  --surface: #ffffff;
  --surface-soft: #f7f3ec;
}

body[data-theme="savannah"] {
  --bg-1: #eef0e6;
  --bg-2: #d9d7c9;
  --card: rgba(251, 252, 248, 0.8);
  --text: #1f2b26;
  --muted: #4e6459;
  --primary: #6b7f3f;
  --primary-2: #9d6c49;
  --surface: #ffffff;
  --surface-soft: #eff2e8;
}

body[data-theme="nile"] {
  --bg-1: #e6ecee;
  --bg-2: #d5d8d1;
  --card: rgba(244, 248, 248, 0.82);
  --text: #1f2f33;
  --muted: #4c6167;
  --primary: #3e6b73;
  --primary-2: #88705a;
  --surface: #ffffff;
  --surface-soft: #eef4f5;
}

body[data-theme="atlas-night"] {
  --bg-1: #0e1418;
  --bg-2: #152229;
  --card: rgba(19, 30, 36, 0.82);
  --text: #e8f0f2;
  --muted: #9bb1b8;
  --primary: #4f9e8d;
  --primary-2: #d08b4e;
  --surface: #1b2b33;
  --surface-soft: #223841;
  --shadow: 0 12px 40px rgba(3, 6, 8, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background: radial-gradient(circle at 15% 15%, var(--bg-2), transparent 35%),
    radial-gradient(circle at 85% 10%, color-mix(in oklab, var(--primary-2) 35%, transparent), transparent 32%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
}

.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 16px,
    color-mix(in oklab, var(--primary) 18%, transparent) 16px,
    color-mix(in oklab, var(--primary) 18%, transparent) 18px
  );
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: transparent;
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 18px;
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-link {
  display: flex;
  flex: 0 0 auto;
  text-decoration: none;
  cursor: pointer;
}

.logo-link:focus-visible {
  outline: 2px solid var(--primary);
  border-radius: 14px;
}

.africa-logo {
  width: 116px;
  height: 116px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 24px;
  border: 2px solid color-mix(in oklab, var(--muted) 30%, transparent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.africa-logo:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

.brand {
  margin: 0;
  font-family: var(--font-title);
  letter-spacing: 0.8px;
  font-size: 1.18rem;
}

.tagline {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.hamburger {
  border: 0;
  background: color-mix(in oklab, var(--primary) 15%, var(--surface));
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  background: var(--text);
}

.drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: min(86vw, 320px);
  height: 100vh;
  background: color-mix(in oklab, var(--card) 92%, var(--surface));
  border-left: 1px solid color-mix(in oklab, var(--muted) 24%, transparent);
  backdrop-filter: blur(10px);
  z-index: 40;
  transition: right 0.25s ease;
}

.drawer.open { right: 0; }

.drawer-content {
  padding: 24px 18px;
  display: grid;
  gap: 18px;
}

.drawer-nav { display: grid; gap: 8px; }

.nav-link {
  border: 0;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  background: color-mix(in oklab, var(--primary) 18%, transparent);
  color: var(--text);
}

.nav-link.disabled-link {
  opacity: 0.45;
  cursor: not-allowed;
}

.drawer-block label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.split-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.split-buttons button,
.drawer-block select,
.ghost {
  border-radius: 10px;
  border: 1px solid color-mix(in oklab, var(--muted) 32%, transparent);
  background: var(--surface);
  color: var(--text);
  padding: 10px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 120px 14px 14px;
  position: relative;
  z-index: 2;
}

.view { display: none; animation: fade-in 0.35s ease; }
.view.active { display: block; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--muted) 22%, transparent);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.home-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(208, 139, 78, 0.3), transparent 36%),
    radial-gradient(circle at 90% 70%, rgba(79, 158, 141, 0.35), transparent 38%),
    linear-gradient(135deg, #123342, #0e222d 55%, #102734);
  color: #f1ece2;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 8% 85%, rgba(255, 255, 255, 0.14), transparent 26%),
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.12), transparent 22%),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, 0.04) 14px 16px);
}

.home-hero > * {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(255, 245, 220, 0.82);
}

.home-hero h2 {
  margin: 8px 0 10px;
  line-height: 1.2;
  font-family: var(--font-title);
  font-size: clamp(1.3rem, 4vw, 2rem);
}

.home-hero p {
  max-width: 58ch;
  margin-top: 0;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.hero-pills span {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
}

.hero-cta {
  max-width: 260px;
}

.filter-card h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.08rem;
}

.filter-sub {
  margin: 8px 0 14px;
  color: var(--muted);
}

.welcome-hero {
  background:
    radial-gradient(circle at 12% 22%, rgba(208, 139, 78, 0.3), transparent 34%),
    radial-gradient(circle at 88% 70%, rgba(79, 158, 141, 0.28), transparent 40%),
    linear-gradient(145deg, #0f2430 0%, #122c3a 45%, #153443 100%);
  color: #eef5f7;
}

.welcome-hero h2 {
  margin: 8px 0 10px;
  font-family: var(--font-title);
  line-height: 1.25;
  font-size: clamp(1.3rem, 4vw, 2rem);
}

.welcome-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-actions .primary,
.welcome-actions .ghost {
  width: auto;
  min-width: 170px;
}

.welcome-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.welcome-info h3 {
  margin-top: 0;
}

.welcome-gallery {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 140px;
  border: 1px solid color-mix(in oklab, var(--muted) 28%, transparent);
  box-shadow: var(--shadow);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-switcher h2 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: 1.05rem;
}

.auth-page-buttons {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.auth-page-btn {
  border: 1px solid color-mix(in oklab, var(--muted) 32%, transparent);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.auth-page-btn.active {
  border-color: color-mix(in oklab, var(--primary) 60%, transparent);
  background: color-mix(in oklab, var(--primary) 18%, var(--surface));
}

.auth-page {
  display: none;
}

.auth-page.active {
  display: block;
}

#map {
  width: 100%;
  height: 48vh;
  min-height: 300px;
  border-radius: var(--radius);
  border: 2px solid color-mix(in oklab, var(--primary) 25%, transparent);
  margin-bottom: 14px;
  overflow: hidden;
}

.feed { display: grid; gap: 10px; }

.service-item {
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--primary) 8%, var(--surface-soft));
  border: 1px solid color-mix(in oklab, var(--primary) 22%, transparent);
}

.stack { display: grid; gap: 10px; }
.grid-two { display: grid; gap: 10px; grid-template-columns: 1fr; }

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 86px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: auto;
  padding: 4px 6px;
  transform: translateY(-50%);
  background: transparent;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.password-toggle:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--primary) 60%, transparent);
  outline-offset: 2px;
}

input, select, textarea, button {
  font: inherit;
  width: 100%;
}

input, select, textarea {
  border: 1px solid color-mix(in oklab, var(--muted) 32%, transparent);
  border-radius: 11px;
  padding: 11px 12px;
  background: var(--surface);
  color: var(--text);
}

textarea { min-height: 90px; resize: vertical; }

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
}

.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 600;
}

.danger {
  background: linear-gradient(135deg, #9c2f2f, #cf4a3f);
  color: #fff;
  font-weight: 700;
}

.auth-secondary-actions {
  margin-top: 10px;
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--primary);
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}

.link-btn:hover {
  opacity: 0.72;
}

.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.plan {
  border-radius: 14px;
  padding: 14px;
  background: color-mix(in oklab, var(--primary-2) 12%, var(--surface-soft));
  border: 1px solid color-mix(in oklab, var(--primary-2) 30%, transparent);
}

.hidden { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  visibility: hidden;
  background: rgba(7, 12, 16, 0.94);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  transition: transform .25s ease, opacity .25s ease, visibility .25s ease;
  z-index: 55;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

@media (min-width: 760px) {
  .container { padding: 20px; }
  .grid-two { grid-template-columns: 1fr 1fr; }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .welcome-grid { grid-template-columns: repeat(2, 1fr); }
  .welcome-gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-card { min-height: 150px; }
  .auth-page-buttons { grid-template-columns: repeat(3, 1fr); }
  #map { height: 58vh; }
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  background: color-mix(in oklab, var(--bg-2) 90%, var(--primary) 10%);
  border-top: 1px solid color-mix(in oklab, var(--muted) 18%, transparent);
  padding: 18px 20px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.footer-links a:hover {
  text-decoration: underline;
}
