/* ==========================================================================
   Eruditto site — single CSS file, ported from the React Tailwind reference.
   No build step, no Tailwind. All tokens at :root.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Design tokens
   --------------------------------------------------------------------------- */
:root {
  /* Brand */
  --primary:        #1a73b8;
  --primary-hover:  #1565a8;
  --primary-light:  #dbeafe;   /* blue-100  */
  --primary-50:     #eff6ff;   /* blue-50   */
  --primary-200:    #bfdbfe;   /* blue-200  */

  /* Grays (Tailwind gray palette) */
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;

  /* Misc */
  --white:       #ffffff;
  --page-bg:     #0B0C10;   /* from PageLayout */
  --success:     #16a34a;
  --warning:     #d97706;
  --radius:      0.375rem;
  --radius-lg:   0.5rem;
  --radius-full: 9999px;

  /* Fonts */
  --font-heading: 'Source Serif 4', Georgia, serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'Courier New', ui-monospace, monospace;

  /* Layout */
  --max-width: 72rem;  /* max-w-6xl */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(26, 115, 184, 0.2);
  color: var(--gray-900);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #c8d8e8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input { font: inherit; }

/* ---------------------------------------------------------------------------
   Layout utilities
   --------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) { .container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-left: 2rem; padding-right: 2rem; } }

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }

/* Grid responsive — matches Tailwind grid-cols-N */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: 1fr 1fr; }
  .lg\:grid-cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.max-w-xl { max-width: 36rem; }

/* ---------------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-heading); }

h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.5rem; }
h3 { font-size: 0.875rem; font-weight: 600; }
h4 { font-size: 0.75rem; font-weight: 600; }
p  { line-height: 1.6; }
.subtitle { color: var(--gray-600); line-height: 1.6; }
code, .font-mono { font-family: var(--font-mono); }
.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }

@media (min-width: 640px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 1.875rem; }
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-white {
  background: var(--white);
  color: var(--primary);
}
.btn-white:hover { background: #eff6ff; }

.btn-outline {
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-outline-dark {
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline-dark:hover { border-color: var(--primary); color: var(--primary); }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  font-weight: 500;
}
.btn-primary:hover { background: var(--primary-hover); }

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.site-header {
  background: var(--primary);
  color: var(--white);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--white);
  letter-spacing: -0.01em;
}

.site-header nav {
  display: none;
}
@media (min-width: 768px) {
  .site-header nav { display: flex; gap: 0.25rem; }
}

.site-header nav a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  color: #bfdbfe;      /* blue-200/100 */
  transition: color 0.15s, background 0.15s;
}
.site-header nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.site-header nav a.active {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  font-weight: 500;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  color: var(--white);
  padding: 0.375rem;
  border-radius: var(--radius);
}
.mobile-menu-btn:hover { background: rgba(255,255,255,0.1); }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

.mobile-menu {
  display: none;
  background: var(--primary-hover);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  color: #bfdbfe;
}
.mobile-menu a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.mobile-menu a.active { background: rgba(255,255,255,0.2); color: var(--white); }

/* ---------------------------------------------------------------------------
   Hero section
   --------------------------------------------------------------------------- */
.hero {
  background: var(--primary);
  color: var(--white);
  padding: 4rem 0;
}
@media (min-width: 1024px) { .hero { padding: 5rem 0; } }

.hero .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero .grid { grid-template-columns: 1fr 1fr; }
}

.hero h1 { margin-bottom: 1rem; }
.hero p { color: #bfdbfe; font-size: 1.125rem; max-width: 32rem; margin-bottom: 2rem; }

.flex-col { flex-direction: column; }
@media (min-width: 640px) {
  .hero .flex.flex-col { flex-direction: row; }
}

.hero-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .hero-logo-area { align-items: flex-end; }
}

.hero-logo {
  width: 10rem;
  height: 10rem;
  object-fit: contain;
  opacity: 0.9;
}
@media (min-width: 1024px) {
  .hero-logo { width: 13rem; height: 13rem; }
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
@media (min-width: 1024px) {
  .badge-row { justify-content: flex-end; }
}

.badge {
  padding: 0.25rem 0.75rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: #bfdbfe;
}

/* Install snippet */
.install-snippet {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 0.625rem 1rem;
  max-width: 24rem;
}
.install-snippet .prompt {
  color: #bfdbfe;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.install-snippet code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--white);
  flex: 1;
  user-select: all;
}
.install-snippet .copy-btn {
  color: #bfdbfe;
  transition: color 0.15s;
  flex-shrink: 0;
}
.install-snippet .copy-btn:hover { color: var(--white); }
.install-snippet .copy-btn.copied { color: #86efac; }  /* green-300 */

/* ---------------------------------------------------------------------------
   How-it-works section
   --------------------------------------------------------------------------- */
.how-it-works {
  padding: 4rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-number {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-icon { color: var(--primary); }

.step-title { color: var(--gray-900); }
.step-desc  { font-size: 0.875rem; color: var(--gray-600); line-height: 1.6; }

/* ---------------------------------------------------------------------------
   Download section
   --------------------------------------------------------------------------- */
.download-section {
  padding: 4rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.download-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.download-card-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.download-card-footer {
  padding: 1rem;
  background: var(--gray-50);
}
.download-card-footer p {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

/* Terminal snippet (light version, for download section + overview) */
.terminal-snippet {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
}
.terminal-snippet .prompt {
  color: var(--gray-400);
  font-size: 0.875rem;
}
.terminal-snippet code {
  font-size: 0.875rem;
  color: var(--gray-800);
  flex: 1;
  user-select: all;
}
.terminal-snippet .copy-btn {
  color: var(--gray-400);
  transition: color 0.15s;
  flex-shrink: 0;
}
.terminal-snippet .copy-btn:hover { color: var(--primary); }
.terminal-snippet .copy-btn.copied { color: var(--success); }

/* ---------------------------------------------------------------------------
   Donation preview section (homepage)
   --------------------------------------------------------------------------- */
.donate-preview {
  padding: 4rem 0;
  background: var(--gray-50);
}

.donate-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.donate-preset-link {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: border-color 0.15s, color 0.15s;
}
.donate-preset-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.donate-custom-link {
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.donate-custom-link:hover { background: var(--primary-hover); }

.view-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--primary);
}
.view-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.site-footer {
  background: var(--primary);
  color: var(--white);
  margin-top: auto;
  padding: 2.5rem 0;
}

.site-footer .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .site-footer .grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

.site-footer .brand-col p {
  font-size: 0.875rem;
  color: #bfdbfe;
  line-height: 1.6;
  margin-top: 0.75rem;
}

.site-footer h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer li a {
  font-size: 0.875rem;
  color: #bfdbfe;
  transition: color 0.15s;
}
.site-footer li a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  font-size: 0.875rem;
  color: #bfdbfe;
}
.footer-bottom .tech-note {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: rgba(147,197,253,0.7);
}

/* ---------------------------------------------------------------------------
   Donate page (full form)
   --------------------------------------------------------------------------- */
.donate-page {
  min-height: calc(100vh - 3.5rem);
  background: var(--gray-50);
  padding: 3rem 0;
}

.donate-icon-circle {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 1rem;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.donate-page h1 { margin-bottom: 0.5rem; }
.donate-page .subtitle {
  max-width: 28rem;
  margin: 0 auto;
}

.donate-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Type toggle strip */
.donate-type-toggle {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  padding: 0;
}
.donate-type-label {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background: rgba(239, 246, 255, 0.5);  /* blue-50/50 */
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* Amount grid */
.amount-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.amount-btn {
  padding: 0.625rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  transition: all 0.15s;
}
.amount-btn:hover { border-color: var(--gray-300); }
.amount-btn.selected {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 500;
}

.custom-amount-wrap {
  position: relative;
}
.custom-amount-wrap .prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.875rem;
}
.custom-amount-input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.625rem 1rem 0.625rem 1.75rem;
  font-size: 0.875rem;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.15s;
}
.custom-amount-input::placeholder { color: var(--gray-400); }
.custom-amount-input:focus { border-color: var(--primary); }

/* Checkbox + alias */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-700);
}
.checkbox-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  border-radius: var(--radius);
  accent-color: var(--primary);
}

.alias-input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.15s;
}
.alias-input::placeholder { color: var(--gray-400); }
.alias-input:focus { border-color: var(--primary); }

/* Generic donate input (name, email) */
.donate-input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.15s;
}
.donate-input::placeholder { color: var(--gray-400); }
.donate-input:focus { border-color: var(--primary); }

/* Checkout button */
.checkout-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: var(--white);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: background 0.15s, opacity 0.15s;
}
.checkout-btn:hover:not(:disabled) { background: var(--primary-hover); }
.checkout-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Checkout error */
.checkout-error {
  padding: 0.5rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: #dc2626;
}

/* Secure note */
.secure-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ---------------------------------------------------------------------------
   Overview page sections
   --------------------------------------------------------------------------- */
.overview-section {
  padding: 4rem 0;
  background: var(--white);
}

.install-steps {
  list-style: none;
  counter-reset: install-step;
}
.install-steps li {
  counter-increment: install-step;
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 1.5rem;
  border-left: 2px solid var(--gray-200);
  margin-left: 0.75rem;
}
.install-steps li::before {
  content: counter(install-step);
  position: absolute;
  left: -0.75rem;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.install-steps h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}
.install-steps p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}
