/**
 * Not Dead Yet — shared site styles (light / dark via prefers-color-scheme)
 * Body: Source Sans 3 with system UI fallbacks per platform.
 */

:root {
  color-scheme: light;
  --bg: #faf9f6;
  --bg-mid: #f3f0e8;
  --text: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #7a7a8a;
  --accent: #0d9b63;
  --accent-hover: #0a7d50;
  --accent-end: #0a7d50;
  --accent-soft: rgba(13, 155, 99, 0.1);
  --accent-soft-border: rgba(13, 155, 99, 0.2);
  --surface-elevated: #ffffff;
  --surface-muted: rgba(0, 0, 0, 0.04);
  --surface-feature: rgba(0, 0, 0, 0.03);
  --card-border: rgba(13, 155, 99, 0.18);
  --success-card-bg: rgba(13, 155, 99, 0.08);
  --success-card-border: rgba(13, 155, 99, 0.25);
  --spinner-track: rgba(13, 155, 99, 0.25);
  --spinner-thumb: #0d9b63;
  --btn-shadow: 0 8px 24px rgba(13, 155, 99, 0.35);
  --btn-shadow-hover: 0 12px 32px rgba(13, 155, 99, 0.45);
  --logo-shadow: 0 8px 32px rgba(13, 155, 99, 0.2);
  --logo-border: #c48528;
  --strong: #1a1a2e;
  --footer-muted: #7a7a8a;
  --content-bg: #ffffff;
  --content-border: rgba(13, 155, 99, 0.18);
  --content-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --hr-border: #e0ddd5;
  --em: #7a7a8a;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #b91c1c;
  --error-link: #0d9b63;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Source Sans', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1a1a2e;
    --bg-mid: #16213e;
    --text: #f5f5f5;
    --text-secondary: #c0c0d0;
    --text-muted: #a0a0b8;
    --accent: #16db93;
    --accent-hover: #2ee4a8;
    --accent-end: #0fa97a;
    --accent-soft: rgba(22, 219, 147, 0.1);
    --accent-soft-border: rgba(22, 219, 147, 0.2);
    --surface-elevated: rgba(255, 255, 255, 0.05);
    --surface-muted: rgba(255, 255, 255, 0.05);
    --surface-feature: rgba(255, 255, 255, 0.03);
    --card-border: rgba(22, 219, 147, 0.2);
    --success-card-bg: rgba(22, 219, 147, 0.1);
    --success-card-border: rgba(22, 219, 147, 0.3);
    --spinner-track: rgba(22, 219, 147, 0.2);
    --spinner-thumb: #16db93;
    --btn-shadow: 0 8px 24px rgba(22, 219, 147, 0.4);
    --btn-shadow-hover: 0 12px 32px rgba(22, 219, 147, 0.5);
    --logo-shadow: 0 8px 32px rgba(22, 219, 147, 0.3);
    --logo-border: #e09a30;
    --strong: #f5f5f5;
    --footer-muted: #666680;
    --content-bg: rgba(255, 255, 255, 0.05);
    --content-border: rgba(22, 219, 147, 0.15);
    --content-shadow: none;
    --hr-border: rgba(22, 219, 147, 0.15);
    --em: #a0a0b8;
    --error-bg: rgba(255, 99, 99, 0.1);
    --error-border: rgba(255, 99, 99, 0.25);
    --error-text: #ffb4b4;
    --error-link: #16db93;
    --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
      'Helvetica Neue', Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
      'Helvetica Neue', Arial, sans-serif;
  }
}

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

body.ndy-site {
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-mid) 100%);
  color: var(--text);
  min-height: 100vh;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
}

body.ndy-site.ndy-centered {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ndy-container {
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.ndy-container-legal {
  max-width: 840px;
  margin: 0 auto;
}

.ndy-header {
  text-align: center;
  margin-bottom: 40px;
  animation: ndy-fadeIn 0.8s ease-out;
}

.ndy-logo {
  margin: 0 auto 24px;
  border-radius: 90px;
  animation: ndy-fadeIn 0.6s ease-out;
}

.ndy-logo--pill {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  box-shadow: var(--logo-shadow);
}

.ndy-logo--square {
  width: 180px;
  height: 180px;
}

.ndy-logo--bordered {
  border-color: var(--logo-border);
  border-style: solid;
  border-width: thick;
}

h1.ndy-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  animation: ndy-fadeIn 0.8s ease-out;
}

.ndy-title--lg {
  font-size: 2.2rem;
}

h1.ndy-page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.ndy-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.ndy-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
  animation: ndy-fadeIn 1s ease-out;
}

.ndy-tagline--sm {
  font-size: 1.05rem;
}

.ndy-card {
  background: var(--surface-elevated);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  animation: ndy-slideUp 0.8s ease-out;
}

.ndy-card--padded {
  padding: 32px;
}

.ndy-card p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 20px;
}

.ndy-card--prose p {
  color: var(--text-secondary);
}

.ndy-card p:last-child {
  margin-bottom: 0;
}

.ndy-invitation-card {
  background: var(--surface-elevated);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  animation: ndy-slideUp 0.8s ease-out;
}

.ndy-invitation-text {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.6;
}

.ndy-invitation-note {
  font-size: 0.95rem;
  color: var(--text);
  margin-top: 20px;
  line-height: 1.6;
}

.ndy-referral-box {
  margin-top: 12px;
  padding: 12px;
  background: var(--accent-soft);
  border-radius: 8px;
}

.ndy-referral-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.ndy-referral-code {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas,
    monospace;
  letter-spacing: 2px;
}

.ndy-btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-end) 100%);
  color: #f5f5f5;
  padding: 18px 48px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: var(--btn-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 16px 0;
  animation: ndy-slideUp 1s ease-out;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.ndy-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow-hover);
}

.ndy-btn-primary:active {
  transform: translateY(0);
}

.ndy-btn-primary--compact {
  padding: 16px 40px;
}

.ndy-bonus-badge {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-end) 100%);
  color: #f5f5f5;
  display: inline-block;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 1rem;
  margin: 16px 0;
  box-shadow: var(--btn-shadow);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: ndy-pulse 2s ease-in-out infinite;
}

.ndy-bonus-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow-hover);
}

.ndy-bonus-badge:active {
  transform: translateY(0);
}

.ndy-platform-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  color: var(--text);
  opacity: 0.85;
}

.ndy-platform-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ndy-platform-icon svg {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ndy-platform-icon:hover svg {
  opacity: 1;
  transform: scale(1.1);
}

.ndy-features {
  margin-top: 32px;
  text-align: left;
  animation: ndy-fadeIn 1.2s ease-out;
}

.ndy-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--surface-feature);
  border-radius: 8px;
}

.ndy-feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.ndy-feature-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.ndy-feature-text strong {
  color: var(--strong);
  font-weight: 600;
}

.ndy-footer {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--footer-muted);
  animation: ndy-fadeIn 1.2s ease-out;
}

.ndy-centered .ndy-footer {
  opacity: 0.95;
}

.ndy-footer--delayed {
  animation: ndy-fadeIn 1.4s ease-out;
}

.ndy-footer a {
  color: var(--accent);
  text-decoration: none;
}

.ndy-footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.ndy-footer--legal {
  text-align: center;
}

.ndy-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--spinner-track);
  border-top-color: var(--spinner-thumb);
  border-radius: 50%;
  animation: ndy-spin 0.8s linear infinite;
  margin: 16px auto;
}

.ndy-spinner--lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
  animation: ndy-spin 1s linear infinite;
  margin: 0 auto 16px;
}

.ndy-redirecting-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.ndy-message {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
  animation: ndy-fadeIn 1s ease-out;
}

.ndy-success-card {
  background: var(--success-card-bg);
  border: 1px solid var(--success-card-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  animation: ndy-slideUp 0.8s ease-out;
}

.ndy-success-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.ndy-success-text {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}

.ndy-success-text strong {
  color: var(--strong);
  font-weight: 600;
}

.fallback {
  display: none;
}

.hidden {
  display: none !important;
}

/* Legal / markdown pages */
.ndy-content {
  background: var(--content-bg);
  border: 1px solid var(--content-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--content-shadow);
  animation: ndy-slideUp 0.8s ease-out;
}

.ndy-content h1,
.ndy-content h2,
.ndy-content h3 {
  font-family: var(--font-heading);
  color: var(--accent);
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.ndy-content h1:first-child,
.ndy-content h2:first-child,
.ndy-content h3:first-child {
  margin-top: 0;
}

.ndy-content h1 {
  font-size: 1.8rem;
}

.ndy-content h2 {
  font-size: 1.25rem;
}

.ndy-content h3 {
  font-size: 1rem;
}

.ndy-content p,
.ndy-content li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.ndy-content ul,
.ndy-content ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.ndy-content li {
  margin-bottom: 8px;
}

.ndy-content hr {
  border: none;
  border-top: 1px solid var(--hr-border);
  margin: 24px 0;
}

.ndy-content strong {
  color: var(--strong);
}

.ndy-content em {
  color: var(--em);
}

.ndy-site a {
  color: var(--accent);
  text-decoration: none;
}

.ndy-site a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Primary controls are <a>; beat .ndy-site a so label stays light on green */
.ndy-site a.ndy-btn-primary,
.ndy-site a.ndy-bonus-badge,
button.ndy-btn-primary {
  color: #f5f5f5;
}

.ndy-site a.ndy-btn-primary:hover,
.ndy-site a.ndy-bonus-badge:hover,
button.ndy-btn-primary:hover {
  color: #f5f5f5;
  text-decoration: none;
}

.ndy-error-box {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 12px;
  padding: 20px;
  color: var(--error-text);
  line-height: 1.6;
}

.ndy-error-box a {
  color: var(--error-link);
}

.ndy-error-box a:hover {
  color: var(--accent-hover);
}

.ndy-loading-hint {
  color: var(--text-muted);
}

@keyframes ndy-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ndy-slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ndy-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ndy-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@media (max-width: 600px) {
  h1.ndy-title {
    font-size: 2rem;
  }

  h1.ndy-title.ndy-title--lg {
    font-size: 1.8rem;
  }

  h1.ndy-page-title {
    font-size: 1.6rem;
  }

  .ndy-btn-primary {
    padding: 16px 36px;
    font-size: 1rem;
  }

  .ndy-btn-primary.ndy-btn-primary--compact {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .ndy-content {
    padding: 20px;
  }

  .ndy-content h1 {
    font-size: 1.45rem;
  }

  .ndy-referral-code {
    font-size: 1.5rem;
  }
}
