/* Blockchain Accessibility Foundation — main.css */

/* Tokens */
:root {
  --bg:           #ffffff;
  --bg-alt:       #f8fafc;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --accent:       #4f46e5;
  --accent-hover: #4338ca;
  --border:       #e2e8f0;
  --nav-height:   64px;
  --max-width:    1100px;
  --section-pad:  96px;
  --radius:       8px;
  --transition:   0.2s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-text-size-adjust: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Typography */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
p  { color: var(--text-muted); line-height: 1.75; }

/* Container */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Section label */
.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.625rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary       { background: var(--accent);     color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline-white         { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline-white:hover   { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ─── NAV ────────────────────────────────────────────────── */
#nav-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(15,23,42,0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background var(--transition);
}
#nav-wrap.scrolled { background: rgba(15,23,42,0.97); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

#nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
#nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}
#nav a:hover { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.75);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  #nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(15,23,42,0.98);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  #nav a { display: block; padding: 0.75rem 24px; font-size: 1rem; }
  body.nav-open #nav { display: flex; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--text);
  color: #fff;
  padding: calc(var(--nav-height) + 100px) 0 80px;
  text-align: center;
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin: 0.5rem 0 1.25rem; }
.hero-sub {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── ABOUT ──────────────────────────────────────────────── */
.about-block {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.about-block h2 { margin: 0.5rem 0 1.5rem; }
.about-block p  { font-size: 1.0625rem; margin-top: 1rem; }

/* ─── SECTION HEAD ───────────────────────────────────────── */
.section-head { text-align: center; max-width: 600px; margin: 0 auto 3rem; }
.section-head h2 { margin: 0.5rem 0 1rem; }
.section-head p  { font-size: 1.0625rem; }

/* ─── CARDS ──────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.07); }
.card i    { font-size: 1.5rem; color: var(--accent); margin-bottom: 1rem; display: block; }
.card h3   { margin-bottom: 0.625rem; }
.card p    { font-size: 0.9375rem; }

@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .cards-grid { grid-template-columns: 1fr; }
}

/* ─── CTA STRIP ──────────────────────────────────────────── */
.cta-strip {
  background: var(--accent);
  padding: 80px 0;
  text-align: center;
  color: #fff;
  overflow: visible;
}
.cta-strip h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-strip > .container > p {
  color: rgba(255,255,255,0.72);
  margin-bottom: 2.25rem;
  font-size: 1.0625rem;
}
.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── DONATE MODAL ───────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.18s ease;
}
.modal {
  background: var(--bg);
  border-radius: 12px;
  padding: 2.25rem 2.5rem 2.5rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  animation: slideUp 0.2s ease;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--bg-alt); }
.modal h3 { font-size: 1.25rem; margin-bottom: 0.375rem; }
.modal > p { font-size: 0.9375rem; margin-bottom: 1.75rem; }

.addr-block { margin-top: 1.25rem; }
.addr-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.addr-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px 8px 12px;
}
.addr-row .addr {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--text);
  -webkit-user-select: all;
  user-select: all;
  line-height: 1.5;
}
.copy-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.copy-btn:hover   { background: var(--accent-hover); }
.copy-btn.copied  { background: #16a34a; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--text);
  padding: 2.5rem 0;
  text-align: center;
}
.footer-copy {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.35);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-pad: 64px; }
  .hero { padding: calc(var(--nav-height) + 64px) 0 80px; }
}
