:root{
  --bg:#0b1220;
  --panel:#0f1a30;
  --card:#0f1b33;
  --text:#e9efff;
  --muted:#b9c6ea;
  --line:rgba(255,255,255,.12);

  --accent:#45e0b8;
  --accent2:#5aa7ff;

  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.35);

  --max:980px;
  --pad:16px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(90,167,255,.25), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(69,224,184,.22), transparent 60%),
    var(--bg);
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:0 var(--pad);
}

.skip-link{
  position:absolute;
  left:-999px; top:8px;
  background:#fff;
  color:#000;
  padding:10px 12px;
  border-radius:10px;
}
.skip-link:focus{ left:12px; z-index:9999; }

.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  border:0;
}

/* Header + Nav */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.68);
  border-bottom:1px solid var(--line);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}
.brand-mark{
  display:inline-grid;
  place-items:center;
  width:38px; height:38px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(90,167,255,.25), rgba(69,224,184,.22));
  border:1px solid var(--line);
}
.brand-name{ display:block; font-weight:800; letter-spacing:.2px; }
.brand-tagline{ display:block; font-size:.85rem; color:var(--muted); }

.site-nav{
  display:none;
  flex-direction:column;
  gap:6px;
  width:100%;
  padding:10px 0 2px;
}
.nav-link{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent;
  color:var(--text);
}
.nav-link:hover{
  background: rgba(255,255,255,.05);
  border-color: var(--line);
  text-decoration:none;
}
.nav-link.active{
  background: rgba(69,224,184,.12);
  border-color: rgba(69,224,184,.35);
}

.nav-toggle{
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor:pointer;
}
.nav-toggle:hover{ background: rgba(255,255,255,.07); }
.nav-toggle-lines{
  display:block;
  width:18px; height:2px;
  background: var(--text);
  margin:0 auto;
  position:relative;
}
.nav-toggle-lines::before,
.nav-toggle-lines::after{
  content:"";
  position:absolute; left:0;
  width:18px; height:2px;
  background: var(--text);
}
.nav-toggle-lines::before{ top:-6px; }
.nav-toggle-lines::after{ top:6px; }

/* Show nav on desktop */
@media (min-width: 860px){
  .nav-toggle{ display:none; }
  .site-nav{
    display:flex !important;
    flex-direction:row;
    width:auto;
    padding:0;
    gap:4px;
  }
  .nav-link{ padding:10px 10px; }
}

/* Main */
.hero{
  padding:26px 0 10px;
}
.hero h1{
  margin:0 0 8px;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing:.2px;
}
.lead{
  margin:0;
  color:var(--muted);
  line-height:1.55;
  font-size:1.05rem;
}
.hero-small{ padding-top:22px; }

.card{
  background: rgba(15,27,51,.85);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
  margin:14px 0;
}

/* Earth image on home page (prevents overflow on mobile/desktop) */
.earth-hero{
  margin: 0;
}
.earth-hero img{
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.card h2{ margin:0 0 10px; font-size:1.25rem; }
.card h3{ margin:0 0 6px; font-size:1.05rem; color:var(--text); }

.pledge-block{
  border-radius:14px;
  padding:16px;
  background: linear-gradient(135deg, rgba(90,167,255,.10), rgba(69,224,184,.10));
  border:1px solid var(--line);
}
.pledge-text{
  margin:0;
  font-size:1.2rem;
  line-height:1.6;
}

.button-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}
.btn{
  appearance:none;
  border:1px solid rgba(69,224,184,.45);
  background: rgba(69,224,184,.14);
  color: var(--text);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:700;
}
.btn:hover{ background: rgba(69,224,184,.20); }
.btn:active{ transform: translateY(1px); }

.btn-ghost{
  border-color: var(--line);
  background: rgba(255,255,255,.05);
}
.btn-ghost:hover{ background: rgba(255,255,255,.08); }

.small-note{
  margin:10px 0 0;
  color: var(--muted);
  font-size:.95rem;
}

.checklist{
  padding-left: 18px;
  color: var(--text);
  line-height:1.6;
}
.checklist li{ margin:6px 0; }

.callout{
  margin-top:10px;
  border-radius:14px;
  padding:14px;
  border:1px dashed rgba(90,167,255,.45);
  background: rgba(90,167,255,.10);
}

.grid-2{
  display:grid;
  gap:14px;
}
@media (min-width: 820px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
}

.grid-3{
  display:grid;
  gap:12px;
}
@media (min-width: 820px){
  .grid-3{ grid-template-columns: 1fr 1fr 1fr; }
}

.tile{
  display:block;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  text-decoration:none;
}
.tile:hover{
  text-decoration:none;
  background: rgba(255,255,255,.06);
}
.tile-title{ display:block; font-weight:800; margin-bottom:4px; }
.tile-text{ display:block; color:var(--muted); }

/* Footer */
.site-footer{
  margin-top:24px;
  border-top:1px solid var(--line);
  background: rgba(0,0,0,.18);
}
.footer-inner{
  padding:18px 0;
  text-align:center;
}
.footer-title{ margin:0 0 6px; font-weight:900; }
.footer-text{ margin:0 0 10px; color:var(--muted); }
.footer-links{ margin:0 0 10px; color:var(--muted); }
.footer-links a{ color:var(--text); }
.footer-small{ margin:0; color:var(--muted); font-size:.92rem; }

/* Pledge page additions */
.backLink{
  display:inline-block;
  margin: 6px 0 14px;
  text-decoration:none;
  font-weight:600;
  opacity:.9;
}

.pledgeText{
  font-size: 1.05rem;
  line-height: 1.5;
}

.sayRow{
  display:flex;
  gap:10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btnMini{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.15);
  color: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.pledgeCard .muted{
  opacity: .9;
}

.form{
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.field span{
  display:block;
  font-size: .9rem;
  opacity: .9;
  margin-bottom: 6px;
}

.field input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  color: inherit;
}

.twoCol{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 440px){
  .twoCol{ grid-template-columns: 1fr; }
}

.checkRow{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  font-weight: 600;
}

.checkRow input{
  margin-top: 3px;
  transform: scale(1.1);
}

.ctaRow.single{
  margin-top: 6px;
}

.successBox{
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.14);
}

/* --- GlobalPledge home nav + Earth button tweaks --- */
.topnav{ display:flex; flex-wrap:wrap; gap:8px; margin: 10px 0 14px; }
.topnav a{ display:inline-flex; padding:10px 12px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,.04); font-weight:800; }
.topnav a:hover{ background: rgba(255,255,255,.07); text-decoration:none; }

.earth-btn{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:nowrap; }
.earth-btn .btn-text{ min-width:0; }
.earth-btn .btn-arrow{ flex:0 0 auto; font-size:1.25rem; opacity:.9; }

.copyright-mark{ display:inline-block; margin-left:6px; font-weight:900; text-decoration:none; border-bottom: 1px dotted rgba(255,255,255,.55); }
.copyright-mark:hover{ border-bottom-color: rgba(255,255,255,.95); }

/* ------------------------------------------------------------
   Home page card image sizing (match earthview.png behavior)
   Keeps images readable on desktop without overwhelming cards.
------------------------------------------------------------ */
.card-media-wrap{
  display:flex;
  justify-content:center;
  margin: 0 0 12px;
}

.card-media{
  width:100%;
  max-width:520px;
  height:auto;
  display:block;
  border-radius:16px;
  box-shadow:0 10px 22px rgba(0,0,0,.25);
}

/* ------------------------------------------------------------
   Thumb grid layout fix
   Ensures letter/article thumbnails show caption UNDER the image
   and are centered (mobile-first).
   Save as: /assets/css/thumb-grid-fix.css
------------------------------------------------------------ */

.thumb-grid{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
}

.thumb-card{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:flex-start !important;
  text-align:center !important;
  gap:8px;
  padding:10px;
}

.thumb-card img{
  width:100%;
  max-width:220px;              /* keeps thumbs reasonable on desktop */
  height:auto;
  aspect-ratio:4 / 5;           /* consistent thumb crops */
  object-fit:cover;
  object-position:top center;   /* show the top (faces/headers) */
  border-radius:12px;
  display:block;
}

.thumb-title,
.thumb-sub{
  display:block;
}

.thumb-title{
  font-weight:700;
  line-height:1.2;
}

.thumb-sub{
  font-size:0.92rem;
  line-height:1.2;
  opacity:0.9;
}
