/* KarvInteractive Base Styles */
:root {
  --bg: 12 12 16;
  --bg-alt: 20 20 28;
  --bg-soft: 30 30 40;
  --text: 235 235 240;
  --text-dim: 160 165 175;
  --brand: 220 90 255;
  --brand-accent: 120 180 255;
  --accent: 255 120 90;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 28px;
  --shadow: 0 8px 22px -8px rgba(0,0,0,.6),0 2px 4px -1px rgba(0,0,0,.4);
  --grad-1: linear-gradient(120deg,#d24dff,#6aa8ff 45%,#ff784d 85%);
  --grad-2: linear-gradient(140deg,#6aa8ff,#d24dff 55%,#ff784d);
  /* Refined White → Blue gradient for multicolor buttons (avoid pure white for legibility) */
  --grad-wb: linear-gradient(130deg,#f3f8ff 0%,#cfe2ff 22%,#93c2ff 44%,#6aa8ff 66%,#2f66ff 100%);
  /* Hover variant: Softer Light Blue → Blue (reduced white for readability) */
  --grad-wb-hover: linear-gradient(130deg,#e6f0ff 0%,#a9d5ff 48%,#2f66ff 100%);
  --btn-blue: #2f66ff;
  --focus: 0 0 0 3px rgba(255,255,255,.12),0 0 0 6px rgba(130,160,255,.35);
  --ease: cubic-bezier(.5,.2,.2,1);
}

[data-theme="light"] {
  --bg: 250 250 253;
  --bg-alt: 240 240 246;
  --bg-soft: 225 225 234;
  --text: 28 30 35;
  --text-dim: 90 94 105;
  --shadow: 0 4px 16px -6px rgba(0,0,0,.25),0 1px 3px -1px rgba(0,0,0,.25);
  --focus: 0 0 0 3px rgba(0,0,0,.15),0 0 0 6px rgba(90,130,255,.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif; color: rgb(var(--text)); background: rgb(var(--bg)); -webkit-font-smoothing: antialiased; line-height: 1.5; min-height: 100vh; overflow-x: hidden;
}

body::before { /* subtle vignette */
  content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 25% 15%,rgba(255,255,255,.08),transparent 60%),radial-gradient(circle at 85% 65%,rgba(255,255,255,.06),transparent 55%);
  mix-blend-mode: overlay; z-index: 0;
}

img,svg { max-width: 100%; display: block; }

h1,h2,h3,h4 { line-height: 1.12; font-weight: 700; letter-spacing: .5px; }
:where(p,li){max-width: 70ch;}

p { color: rgb(var(--text-dim)); }

.lead { font-size: clamp(1.05rem,1rem + .8vw,1.35rem); color: rgb(var(--text)); font-weight: 500; }

.small { font-size: .85rem; }
.tiny { font-size: .7rem; letter-spacing: .5px; text-transform: uppercase; }
.muted { color: rgb(var(--text-dim)); }
.center { text-align: center; }

.gradient-text { background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(120,60,200,.35)); }
/* Hero headline/subtitle: white → blue gradient only */
.hero .gradient-text {
  background: linear-gradient(120deg,#ffffff 0%,#6aa8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Subtle shadow tuned for lighter gradient */
  filter: drop-shadow(0 4px 18px rgba(80,120,220,.28));
}
/* Light mode: make hero headline/subtitle a solid blue instead of gradient */
[data-theme="light"] .hero .gradient-text {
  background: none !important;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #2f66ff !important;
  filter: none;
  text-shadow: none;
}

.container { width: min(1200px,92%); margin-inline: auto; position: relative; z-index: 1; }
.narrow { width: min(720px,92%); }
.medium { width: min(1000px,94%); }
.slim { width: min(880px,92%); }
.section { padding: clamp(3.5rem,5vw,6rem) 0; position: relative; }
.section.tight-top { padding-top: clamp(1rem,2vw,2rem); }
.section.flush-top { padding-top: .5rem; }
.section.alt { background: linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,0)); }
.section-title { font-size: clamp(1.6rem,1.2rem + 1.8vw,2.4rem); margin: 0 0 2rem; }

.flex { display: flex; gap: 1.25rem; }
.between { justify-content: space-between; }
.center-v { align-items: center; }
.grid { display: grid; gap: clamp(1.4rem,1.2rem + 1vw,2.2rem); }
.cols-3 { grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); }
.hero-grid { grid-template-columns: repeat(auto-fit,minmax(320px,1fr)); align-items: center; }

/* Navigation */
.site-header { position: sticky; top: 0; backdrop-filter: blur(18px) saturate(160%); background: rgba(18,18,24,.55); border-bottom: 1px solid rgba(255,255,255,.06); z-index: 50; }
[data-theme="light"] .site-header { background: rgba(255,255,255,.7); }
.nav-bar { min-height: 80px; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 600; font-size: 1rem; letter-spacing: .5px; text-decoration: none; color: rgb(var(--text)); }
.logo { width: 44px; height: 44px; object-fit: cover; border-radius: 12px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
/* Brand hover reveal (site-wide) */
.brand .logo { height:64px; width:auto; max-height:14vw; }
.brand .brand-name { display:inline-block; opacity:0; max-width:0; overflow:hidden; white-space:nowrap; transform:translateX(-4px); transition: opacity .3s var(--ease), transform .3s var(--ease), max-width .3s var(--ease); }
.brand:hover .brand-name,
.brand:focus-visible .brand-name { opacity:1; max-width:220px; transform:translateX(0); }

.primary-nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; align-items: center; }
.primary-nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: rgb(var(--text-dim)); position: relative; padding: .4rem .2rem; }
.primary-nav a:hover,.primary-nav a.active { color: rgb(var(--text)); }
.primary-nav a.active::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--grad-1); border-radius: 2px; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle .bar { display: block; width: 26px; height: 2px; background: rgb(var(--text)); margin: 5px 0; transition: .4s var(--ease); }

/* Studio page (about.html) larger header */
.page-studio .nav-bar { min-height: 92px; }
.page-studio .brand .logo { height: 72px; }
@media (max-width: 840px) {
  .page-studio .primary-nav ul { top: 90px; }
}

@media (max-width: 840px) {
  .primary-nav ul { position: absolute; right: 1rem; top: 66px; flex-direction: column; align-items: flex-start; background: rgba(20,20,26,.92); padding: 1.2rem 1.4rem; border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); box-shadow: var(--shadow); width: min(260px,calc(100vw - 2rem)); transform-origin: top right; transform: scale(.85) translateY(-8px); opacity: 0; pointer-events: none; transition: .45s var(--ease); backdrop-filter: blur(22px) saturate(160%); }
  [data-theme="light"] .primary-nav ul { background: rgba(255,255,255,.85); }
  .primary-nav ul.open { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
  .nav-toggle { display: block; }
}

/* Buttons */
.btn { --bg-btn: var(--btn-blue); --txt: #fff; cursor: pointer; appearance: none; border: none; font: inherit; font-weight: 600; padding: .85rem 1.25rem; border-radius: var(--radius-sm); background: var(--bg-btn); color: var(--txt); position: relative; overflow: hidden; text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; line-height: 1.1; font-size: .95rem; letter-spacing: .3px; text-shadow: 0 1px 2px rgba(0,0,0,.35); transition: background .28s var(--ease), color .2s var(--ease), filter .2s var(--ease), border-color .2s var(--ease); }
.btn.primary { background: var(--btn-blue); }
.btn.primary:hover { background: var(--grad-wb-hover); color: #000; text-shadow: none; }
.btn.ghost { background: rgba(255,255,255,.08); color: rgb(var(--text)); }
.btn.outline { background: linear-gradient(rgb(var(--bg-soft)),rgb(var(--bg-soft))) padding-box,var(--btn-blue) border-box; border: 1px solid transparent; color: rgb(var(--text)); }
.btn.outline:hover { background: var(--grad-wb-hover); color: #000; border: 1px solid transparent; text-shadow: none; }
.btn.small { padding: .55rem .85rem; font-size: .8rem; }
.btn.full { width: 100%; justify-content: center; }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* Hero */
.hero { position: relative; }
.hero-copy h1 { margin: 0 0 1rem; font-size: clamp(2rem,1.4rem + 3vw,3.5rem); }
.hero-subtitle { margin: -.3rem 0 1rem; font-weight: 800; font-size: clamp(2rem,1.4rem + 3vw,3.5rem); letter-spacing: .4px; }
.meta-list { list-style: none; display: flex; gap: 1.5rem; padding: 1.2rem 0 0; margin: 0; font-size: .8rem; letter-spacing: .8px; text-transform: uppercase; color: rgb(var(--text-dim)); }
.meta-list li { position: relative; }
.meta-list li + li::before { content: ''; position: absolute; left: -12px; top: 50%; width: 4px; height: 4px; background: var(--grad-1); border-radius: 50%; transform: translateY(-50%); }

.hero-media { position: relative; }
.aspect { aspect-ratio: 16/10; width: 100%; border-radius: var(--radius-lg); position: relative; overflow: hidden; background: radial-gradient(circle at 30% 30%,rgba(255,255,255,.08),rgba(255,255,255,.02)); box-shadow: 0 10px 40px -8px rgba(0,0,0,.55),0 2px 4px -1px rgba(0,0,0,.5); }
.hero-video-wrapper { background: #000; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.9) saturate(1.1); }
.hero-video::cue { display: none; }
.noise { position: absolute; inset: 0; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"); mix-blend-mode: overlay; pointer-events: none; }
.floating-badge { position: absolute; top: 14px; left: 14px; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); padding: .4rem .7rem; border-radius: 100px; font-size: .65rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; box-shadow: 0 4px 12px -4px rgba(0,0,0,.6); }

/* JS-only video fade-in to avoid showing poster first */
/* No poster overlay; videos show as soon as they paint */

.scroll-indicator { position: absolute; left: 50%; bottom: 6px; width: 22px; height: 40px; border: 2px solid rgba(255,255,255,.35); border-radius: 14px; transform: translateX(-50%); display: flex; justify-content: center; }
.scroll-indicator span { width: 4px; height: 8px; background: var(--grad-1); display: block; border-radius: 2px; animation: scroll 2.3s infinite; margin-top: 6px; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0);} 20% { opacity: 1;} 80% { opacity: 1;} 100% { opacity: 0; transform: translateY(16px);} }

/* Light mode: make the scroll indicator blue for better contrast */
[data-theme="light"] .scroll-indicator { border-color: rgba(47,102,255,.65); }
[data-theme="light"] .scroll-indicator span { background: #2f66ff; }

/* Cards */
.glass { background: linear-gradient(130deg,rgba(255,255,255,.08),rgba(255,255,255,.02)); backdrop-filter: blur(20px) saturate(160%); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 1.4rem 1.5rem; position: relative; }
.glass.lg { padding: clamp(1.8rem,1.2rem + 1.5vw,2.4rem); }
.feature-card h3 { margin: 0 0 .5rem; font-size: 1.3rem; }
.placeholder { display: grid; place-items: center; font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; color: rgb(var(--text-dim)); border: 1px dashed rgba(255,255,255,.22); }
.gradient-box { background: var(--grad-2); color: #fff; display: grid; place-items: center; border-radius: var(--radius); font-weight: 600; text-shadow: 0 4px 14px rgba(0,0,0,.4); }
.gradient-box.tall { aspect-ratio: 3/4; }

/* Media card with video + overlay text */
.video-card { position: relative; overflow: hidden; --pad: 0; }
.video-card video {
  position: absolute;
  inset: 0; /* cover the entire gradient box */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(.9) saturate(1.1);
  border-radius: inherit; /* match the gradient-box corners */
}
.showcase-media .gradient-box.video-card {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  justify-self: center; /* prevent grid stretch */
  align-self: start;
}
.video-card .overlay-text { position: relative; z-index: 1; text-align: center; letter-spacing: .8px; font-size: .8rem; padding: .6rem .8rem; background: rgba(0,0,0,.35); border-radius: 10px; }

.showcase-card { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); align-items: center; }
.showcase-card.alt-layout { direction: rtl; }
.showcase-card.alt-layout .showcase-body { direction: ltr; }
.showcase-card.alt-layout .showcase-media { display: grid; }
.showcase-card.alt-layout .showcase-media > .gradient-box.video-card {
  max-width: 320px;
  width: 100%;
  justify-self: center;
}
.showcase-body h3,h2 { margin-top: 0; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0 1.2rem; }
.tags li { font-size: .65rem; letter-spacing: .8px; text-transform: uppercase; background: rgba(255,255,255,.12); padding: .45rem .65rem; border-radius: 40px; font-weight: 600; }
.tag.tiny { font-size: .55rem; padding: .35rem .5rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: linear-gradient(180deg,#d24dff,#6aa8ff); }
.timeline li { display: grid; grid-template-columns: 80px 1fr; gap: 1.25rem; align-items: start; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 10px; height: 10px; background: var(--grad-1); border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.timeline .time { font-size: .7rem; letter-spacing: 1px; font-weight: 600; text-transform: uppercase; color: rgb(var(--text-dim)); padding-top: .2rem; }

/* Newsletter */
.field-group { display: flex; gap: .75rem; }
.field-group input { flex: 1; }
.newsletter-form input { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); padding: .85rem 1rem; border-radius: var(--radius-sm); color: rgb(var(--text)); font: inherit; }
.newsletter-form input:focus-visible { outline: none; box-shadow: var(--focus); }
.form-msg { min-height: 1.1rem; font-size: .75rem; margin-top: .6rem; }
/* Enhanced form messaging for contact page */
.page-contact .form-msg { font-size: .8rem; padding:.55rem .75rem; border-radius: var(--radius-sm); background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.15); margin-top: .9rem; line-height:1.25; font-weight:500; letter-spacing:.3px; }
.page-contact .form-msg.success { background: rgba(60,200,120,.18); border-color: rgba(60,200,120,.45); color: #b5f7d2; }
.page-contact .form-msg.error { background: rgba(220,70,70,.2); border-color: rgba(255,90,90,.55); color: #ffc9c9; }

/* Disabled send button state */
#contactSubmit[disabled] { opacity:.45; cursor:not-allowed; filter:saturate(.3); }
/* Invalid state visuals */
.page-contact .contact-form .invalid { border-color: rgba(255,90,90,.65)!important; background: rgba(255,40,40,.08)!important; }
.page-contact .contact-form .invalid:focus-visible { box-shadow: 0 0 0 3px rgba(255,80,80,.35),0 0 0 6px rgba(255,255,255,.15); }
.page-contact .field-error { font-size:.65rem; letter-spacing:.5px; color:#ff9b9b; margin:-.4rem 0 .6rem; font-weight:600; text-transform:uppercase; }
@keyframes fieldShake { 0%,100%{transform:translateX(0);} 20%{transform:translateX(-4px);} 40%{transform:translateX(4px);} 60%{transform:translateX(-3px);} 80%{transform:translateX(3px);} }
.page-contact .shake { animation: fieldShake .4s ease; }

/* Contact */
.contact-grid { display: grid; gap: 3rem; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); align-items: start; }
.contact-form .field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.contact-form label { font-size: .75rem; letter-spacing: .7px; text-transform: uppercase; font-weight: 600; color: rgb(var(--text-dim)); }
.contact-form input, .contact-form textarea, .contact-form select { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); padding: .85rem 1rem; border-radius: var(--radius-sm); color: rgb(var(--text)); font: inherit; resize: vertical; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible, .contact-form select:focus-visible { outline: none; box-shadow: var(--focus); }
.contact-form .checkbox { display: flex; gap: .55rem; font-size: .7rem; letter-spacing: .6px; cursor: pointer; }
.contact-form button { margin-top: .5rem; }
.contact-form .form-inner { transition: opacity .35s ease, transform .4s ease, max-height .5s ease; will-change: opacity,transform,max-height; }
.contact-form.swap .form-inner { opacity:0; transform: translateY(-6px) scale(.985); pointer-events:none; max-height:0; overflow:hidden; }
.contact-form .form-panel { display:flex; flex-direction:column; justify-content:center; gap:1rem; text-align:center; min-height:260px; animation: panelFade .45s ease; }
.contact-form .form-panel h3 { font-size:1.4rem; margin:0; }
.contact-form .form-panel p { margin:0 0 1rem; line-height:1.4; }
.contact-form .form-panel .panel-actions { display:flex; gap:.75rem; justify-content:center; flex-wrap:wrap; }
.contact-form .panel-success { color:#b2f7d3; }
.contact-form .panel-error { color:#ffb3b3; }
@keyframes panelFade { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.contact-side { display: grid; gap: 1.4rem; }
.contact-side .info h3 { margin-top: 0; }
/* Ensure contact details read bright/white on dark theme */
.contact-side .info p strong { color: rgb(var(--text)); }
.contact-side .info a { color: rgb(var(--text)); }

/* Contact page: force black text inside the Topic <select> and options for readability */
.page-contact .contact-form select {
  background: #fff;
  color: #000;
  border-color: rgba(0,0,0,.25);
}
.page-contact .contact-form select option { color: #000; background: #fff; }

/* Team */
.team-grid .team-card { text-align: center; }
.team-card .avatar { width: 72px; aspect-ratio: 1; margin: 0 auto 1rem; font-size: 1.1rem; }
/* Ensure team card description centers and isn't width-limited */
.team-grid .team-card p { max-width: none; margin-left: auto; margin-right: auto; text-align: center; }

/* Footer */
.site-footer { background: linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02)); border-top: 1px solid rgba(255,255,255,.08); padding: 3.5rem 0 3rem; margin-top: 4rem; position: relative; }
/* In light mode, make only the footer dark by overriding local color variables */
[data-theme="light"] .site-footer {
  /* locally override palette for footer subtree */
  --bg: 16 16 22;
  --bg-alt: 24 24 32;
  --bg-soft: 28 28 38;
  --text: 235 235 240;
  --text-dim: 165 170 180;
  background: linear-gradient(180deg, rgba(5,5,8,.92), rgba(5,5,8,.88));
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot-links a { text-decoration: none; font-size: .8rem; color: rgb(var(--text-dim)); font-weight: 500; }
.foot-links a:hover { color: rgb(var(--text)); }
.foot-brand { margin: 0 0 .6rem; background: var(--grad-2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot-extra input { width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); padding: .6rem .8rem; border-radius: var(--radius-sm); color: rgb(var(--text)); font: inherit; margin-bottom: .5rem; }

/* (removed) legacy PayPal donate container styles */

/* Utilities */
.prose { line-height: 1.65; }
.values-grid .value-card h3 { margin: 0 0 .35rem; }
.benefits { margin: .5rem 0 1rem; padding-left: 1.1rem; color: rgb(var(--text-dim)); font-size: .9rem; }
.benefits li { margin: .25rem 0; }

/* Anchor offset for sticky header */
#donate { scroll-margin-top: 100px; }

/* Make donate cards equal height and tidy */
#donate .grid.cols-3 { align-items: stretch; }
#donate .grid.cols-3 > .glass { display: flex; flex-direction: column; height: 100%; }
#donate .grid.cols-3 > .glass .btn { margin-top: auto; align-self: start; }

/* Funding progress */
.fund-progress { margin-top: .5rem; }
.fund-bar { position: relative; width: 100%; height: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 40px; overflow: hidden; }
.fund-fill { position: absolute; inset: 0; width: var(--pct); background: var(--grad-2); border-radius: inherit; box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset,0 4px 14px -4px rgba(0,0,0,.6); animation: fundGrow 1.4s var(--ease) both; }
/* Support blurb */
.support-blurb { 
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.55;
  margin: .25rem auto 1.1rem;
  max-width: 58ch;
  color: rgba(255,255,255,.9);
}

.support-blurb strong { font-weight: 700; }

/* Support image styling */
.support-media { margin: .6rem auto 1.1rem; width: min(820px, 100%); }
.support-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) + 2px);
  /* Gradient border using double backgrounds */
  border: 1px solid transparent;
  background: linear-gradient(rgb(var(--bg-soft)), rgb(var(--bg-soft))) padding-box, var(--grad-wb) border-box;
  box-shadow: 0 14px 36px -12px rgba(0,0,0,.65);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.support-media:hover img { transform: translateY(-2px); box-shadow: 0 18px 44px -14px rgba(0,0,0,.7); }
.support-media figcaption { margin-top: .4rem; text-align: center; opacity: .8; }

@keyframes fundGrow { from { width: 0; } }

/* Theme switch */
.theme-switch { --size: 34px; width: var(--size); height: var(--size); border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: radial-gradient(circle at 30% 30%,#ffe7a1,#ff9f43 60%); cursor: pointer; position: relative; box-shadow: 0 4px 14px -4px rgba(0,0,0,.5); }
[data-theme="light"] .theme-switch { background: radial-gradient(circle at 30% 30%,#333,#111 70%); }
.theme-switch:focus-visible { outline: none; box-shadow: var(--focus); }
/* Sun icon inside theme switch */
.theme-switch .theme-icon { width: 60%; height: 60%; object-fit: contain; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); transition: transform .6s var(--ease) rotate .6s var(--ease); pointer-events: none; }
.theme-switch:hover .theme-icon { transform: translate(-50%,-50%) rotate(25deg) scale(1.06); }
[data-theme="light"] .theme-switch .theme-icon { filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)) brightness(.9) saturate(.8); }

/* Place theme toggle at end of header row */
.nav-bar .theme-switch { flex: 0 0 auto; margin-left: .6rem; }
@media (max-width: 840px) {
  .theme-switch { --size: 32px; }
}

/* Minimal switch based on input + label */
.toggle-input { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.toggle-label { display:inline-block; width: 52px; height: 28px; border-radius: 999px; background: rgba(255,255,255,.18); padding: 3px; box-sizing: border-box; cursor: pointer; transition: background .22s var(--ease); box-shadow: 0 2px 8px rgba(2,6,23,0.08); vertical-align: middle; }
[data-theme="light"] .toggle-label { background: rgba(0,0,0,.1); }
.toggle-label::before { content:""; display:block; width:22px; height:22px; border-radius:50%; background:#fff; transition: transform .22s var(--ease), background .22s var(--ease); transform: translateX(0); box-shadow: 0 2px 6px rgba(2,6,23,0.12); }
.toggle-input:checked + .toggle-label { background: var(--grad-wb); }
.toggle-input:checked + .toggle-label::before { transform: translateX(24px); }
.toggle-input:focus + .toggle-label, .toggle-input:focus-visible + .toggle-label { outline: 3px solid rgba(130,160,255,0.28); outline-offset: 2px; }

/* Animations */
[data-animate] { opacity: 0; transform: translateY(24px); transition: .9s var(--ease); }
[data-animate].visible { opacity: 1; transform: translateY(0); }

/* Accessibility improvements */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Responsive refinements */
@media (max-width: 640px) {
  .meta-list { flex-wrap: wrap; gap: .75rem 1.25rem; }
  .hero-copy h1 { font-size: clamp(1.9rem,1.8rem + 2.2vw,2.8rem); }
  .showcase-card { gap: 1.2rem; }
  .field-group { flex-direction: column; }
  .field-group button { width: 100%; }
}

/* Light mode tweaks */
[data-theme="light"] .glass { background: linear-gradient(130deg,rgba(255,255,255,.75),rgba(255,255,255,.6)); border: 1px solid rgba(0,0,0,.08); }
[data-theme="light"] .tags li { background: rgba(0,0,0,.08); }
[data-theme="light"] .btn.ghost { background: rgba(0,0,0,.08); }
[data-theme="light"] .newsletter-form input, [data-theme="light"] .contact-form input, [data-theme="light"] .contact-form textarea, [data-theme="light"] .contact-form select { background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.15); }

/* Support page readability tweaks */
#donate p.small { font-size: .9rem; }
#donate .btn.small { font-size: .9rem; padding: .65rem 1rem; }
#donate h3 { font-size: 1.25rem; }
#donate p { font-size: 1rem; }

/* Support card (home) polishing */
.support-card {
  padding: 1.25rem 1.4rem;
  border-radius: calc(var(--radius) + 4px);
  position: relative;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(130deg,rgba(255,255,255,.08),rgba(255,255,255,.02));
  box-shadow: 0 14px 36px -16px rgba(0,0,0,.6);
}
.support-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px; /* gradient border */
  background: var(--grad-wb);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .18;
  pointer-events: none;
}
.support-card .support-blurb { margin: .25rem auto 1rem; }
.support-card .cta-group { justify-content: center; }
.support-card:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -18px rgba(0,0,0,.7); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.support-card .support-media img { border-radius: calc(var(--radius) + 4px); }
