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

:root {
  /* Core Semantic Tokens from THEME.md */
  --color-primary: #2d4739;
  --color-on-primary: #ffffff;
  --color-primary-container: #c0c5c1;
  --color-on-primary-container: #0f1814;
  --color-surface: rgba(24, 40, 33, 0.45);
  --color-on-surface: #e8ecea;
  --color-background: #0f1814;
  --color-on-background: #e8ecea;

  /* Semantic Statuses */
  --color-success: #4caf50;
  --color-warning: #ffc107;
  --color-error: #f44336;
  --color-info: #2196f3;

  /* Shadows & Elevation */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 12px rgba(159, 184, 173, 0.3);

  /* Aliases for UI Components */
  --primary-color: var(--color-primary);
  --accent-color: var(--color-primary-container);
  --hover-color: var(--color-surface);
  --bg-color: var(--color-background);
  --text-color: var(--color-on-background);
  --text-muted: var(--color-primary-container);
  --border: rgba(255, 255, 255, 0.08);
  --card-bg: var(--color-surface);
}

@media (prefers-color-scheme: light) {
  :root {
    --color-primary: #2d4739;
    --color-on-primary: #ffffff;
    --color-primary-container: #e1e6e2;
    --color-on-primary-container: #1a2b22;
    --color-surface: rgba(255, 255, 255, 0.75);
    --color-on-surface: #182821;
    --color-background: #f4f7f5;
    --color-on-background: #182821;

    --color-success: #2e7d32;
    --color-warning: #ffc107;
    --color-error: #d32f2f;
    --color-info: #0288d1;

    --shadow-sm: 0 2px 4px rgba(24, 40, 33, 0.08);
    --shadow-md: 0 4px 12px rgba(24, 40, 33, 0.12);
    --shadow-hover: 0 8px 24px rgba(24, 40, 33, 0.16);
    --shadow-glow: 0 0 12px rgba(45, 71, 57, 0.15);

    --primary-color: var(--color-primary);
    --accent-color: var(--color-primary-container);
    --hover-color: var(--color-primary-container);
    --text-muted: #4a5450;
    --border: #c8d3ce;
  }
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Inter", sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.3s,
    color 0.3s;
  position: relative;
}

/* Glow Spheres for Homepage Unity */
.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sphere-1 {
  width: 600px;
  height: 600px;
  background: var(--primary-color);
  top: -150px;
  left: -200px;
}

.sphere-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-color);
  bottom: -100px;
  right: -100px;
}

main.main {
  min-height: 100vh;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

.content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Glassmorphism Card style */
.backend-card {
  background: var(--color-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  max-width: 720px;
  width: 100%;
  box-sizing: border-box;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.backend-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.logo {
  max-width: 100px;
  width: 100%;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

h1 {
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.2;
}

.subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  color: var(--accent-color);
  margin: 0 0 1.5rem 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem auto;
  line-height: 1.7;
}

/* Status Indicator Dot styling */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(76, 175, 80, 0.12);
  border: 1px solid rgba(76, 175, 80, 0.25);
  border-radius: 100px;
  padding: 0.5rem 1.25rem;
  margin-bottom: 2.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  position: relative;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(76, 175, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

.status-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-success);
  letter-spacing: 0.5px;
}

/* Interactive CTA group styling */
.cta-group {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.cta-button {
  padding: 0.9rem 2rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.primary-btn {
  background-color: var(--primary-color);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.primary-btn:hover {
  box-shadow: var(--shadow-glow);
  background-color: var(--accent-color);
}

.secondary-btn {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-color);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  letter-spacing: 0.4px;
}

.footer-line {
  display: block;
  margin-bottom: 0.35rem;
}

.copyright a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition:
    border-bottom-color 0.2s ease,
    color 0.2s ease;
}

.copyright a:hover,
.copyright a:focus-visible {
  color: var(--text-color);
  border-bottom-color: var(--text-color);
}

@media (min-width: 640px) {
  .footer-line {
    display: inline-block;
    margin-bottom: 0;
    margin-right: 1.2rem;
  }
  .footer-line:last-child {
    margin-right: 0;
  }
}

@media (min-width: 768px) {
  main.main {
    padding: 5.5rem 2rem;
  }
  .backend-card {
    padding: 4rem 3rem;
  }
}
