/* Eidolon Mail (eidolonmail.com) Sovereign Webmail Shell Stylesheet (Wave 3)
 * Mobile-first (360px-1440px), >= 44px tap targets, WCAG 2.2 AA contrast,
 * dark/light theme support, zero horizontal overflow.
 * Owner: Dr Kudakwashe Dube, Eidolon AI, a division of Kupa Holdings Ltd.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --em-bg: #f8fafc;
  --em-surface: #ffffff;
  --em-surface-alt: #f1f5f9;
  --em-border: #cbd5e1;
  --em-text: #0f172a;
  --em-muted: #475569;
  --em-accent: #1d4ed8;
  --em-accent-hover: #1e40af;
  --em-accent-soft: #e0e7ff;
  --em-accent-soft-text: #1e3a8a;
  --em-focus: #2563eb;
  --em-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --em-bg: #0b1120;
    --em-surface: #111827;
    --em-surface-alt: #1e293b;
    --em-border: #334155;
    --em-text: #f8fafc;
    --em-muted: #cbd5e1;
    --em-accent: #3b82f6;
    --em-accent-hover: #2563eb;
    --em-accent-soft: #1e3a8a;
    --em-accent-soft-text: #dbeafe;
    --em-focus: #60a5fa;
    --em-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--em-bg);
  color: var(--em-text);
  line-height: 1.5;
}

.em-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.em-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--em-accent);
  color: #ffffff;
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
}

.em-skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  border-radius: 8px;
  outline: 3px solid var(--em-focus);
  outline-offset: 2px;
}

.em-header {
  background: var(--em-surface);
  border-bottom: 1px solid var(--em-border);
  padding: 0.875rem 1rem;
}

.em-header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.em-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--em-text);
  min-height: 44px;
}

.em-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--em-accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.em-brand-text {
  display: flex;
  flex-direction: column;
}

.em-brand-name {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
}

.em-brand-domain {
  font-size: 0.75rem;
  color: var(--em-muted);
}

.em-header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.em-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.em-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0;
}

.em-landing[hidden],
.em-app-root[hidden] {
  display: none;
}

.em-card {
  width: 100%;
  max-width: 680px;
  background: var(--em-surface);
  border: 1px solid var(--em-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--em-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.em-eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--em-accent-soft);
  color: var(--em-accent-soft-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.em-hero-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  line-height: 1.2;
  font-weight: 800;
  color: var(--em-text);
}

.em-hero-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--em-muted);
}

.em-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.em-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.625rem 1.125rem;
  border-radius: 10px;
  border: 1px solid var(--em-border);
  background: var(--em-surface);
  color: var(--em-text);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.em-btn:hover {
  background: var(--em-surface-alt);
}

.em-btn:focus-visible,
.em-brand:focus-visible {
  outline: 3px solid var(--em-focus);
  outline-offset: 2px;
}

.em-btn-primary {
  background: var(--em-accent);
  border-color: var(--em-accent);
  color: #ffffff;
}

.em-btn-primary:hover {
  background: var(--em-accent-hover);
  border-color: var(--em-accent-hover);
}

.em-features {
  margin: 0.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--em-border);
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.em-feature-item {
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--em-surface-alt);
  border: 1px solid var(--em-border);
}

.em-feature-title {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--em-text);
}

.em-feature-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--em-muted);
}

.em-session-status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--em-muted);
  min-height: 1.5rem;
}

.em-app-root {
  width: 100%;
  max-width: 100%;
}

.em-footer {
  background: var(--em-surface);
  border-top: 1px solid var(--em-border);
  padding: 1rem;
  font-size: 0.8125rem;
  color: var(--em-muted);
}

.em-footer-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .em-card {
    padding: 2rem;
  }

  .em-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .em-main {
    padding: 2rem 1.5rem 3rem;
  }
}
