/*
Theme Name: Legal Defense Fund (Embedded Stripe)
Description: Single page theme with embedded Stripe Payment Elements.
Version: 1.1
Author: Gemini
*/

:root {
  --ink:       #0A0B0C;
  --ink-soft:  #141618;
  --slate:     #3F474D;
  --slate-mid: #6B747B;
  --smoke:     #9AA1A7;
  --bone:      #E9EAEA;
  --paper:     #EFEFEE;
  --hair:      #C9CBCB;
  --hair-dk:   rgba(233,234,234,0.22);
  --portrait: none;
  --portrait-filter: grayscale(1) contrast(1.06) brightness(0.96);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 400; font-size: 17px; line-height: 1.62;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.wrap { width: min(1140px, 88%); margin-inline: auto; }
.label {
  font-family: 'Newsreader', serif; font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--slate-mid);
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid currentColor; outline-offset: 3px;
}

/* Hero */
.hero { position: relative; min-height: 92vh; display: flex; flex-direction: column; color: var(--bone); background: var(--ink); overflow: hidden; }
.hero-img { position: absolute; inset: 0; z-index: 0; background-color: var(--ink); background-image: var(--portrait); background-size: cover; background-position: 72% center; filter: var(--portrait-filter); }
.hero-img::before { content: ""; position: absolute; inset: 0; background: radial-gradient(118% 88% at 74% 36%, #24282C 0%, #0E1012 54%, #07080A 100%); z-index: -1; }
.hero-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, rgba(6,7,8,0.94) 0%, rgba(6,7,8,0.78) 34%, rgba(6,7,8,0.26) 66%, rgba(6,7,8,0.56) 100%); }
.hero-nav, .hero-body, .portrait-note { position: relative; z-index: 2; }
.hero-nav { padding: 26px 0; border-bottom: 1px solid var(--hair-dk); }
.nav-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.wordmark { font-family: 'Bodoni Moda', serif; font-weight: 500; font-size: 1.02rem; letter-spacing: 0.04em; color: var(--bone); text-decoration: none; }
.nav-links { display: flex; gap: 26px; align-items: baseline; }
.nav-links a { font-size: 0.85rem; letter-spacing: 0.05em; color: var(--smoke); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav-links a:hover { color: var(--bone); border-bottom-color: var(--bone); }
.hero-body { flex: 1; display: flex; align-items: flex-end; padding: 90px 0 54px; }
.hero-text .label { color: var(--smoke); display: block; margin-bottom: 22px; }
.hero h1 { font-family: 'Bodoni Moda', serif; font-weight: 400; font-size: clamp(2.6rem, 5.6vw, 4.6rem); line-height: 1.0; letter-spacing: -0.02em; max-width: 15ch; margin-bottom: 26px; }
.hero h1 i { font-style: italic; font-weight: 400; }
.hero-lead { max-width: 44ch; font-size: 1.06rem; font-weight: 300; color: #C6CBCF; }
.hero-cue { margin-top: 40px; display: inline-flex; align-items: center; gap: 12px; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--bone); padding-bottom: 6px; transition: opacity 0.2s; }
.hero-cue:hover { opacity: 0.68; }
.portrait-note { position: absolute; right: 6%; bottom: 26px; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(233,234,234,0.42); text-align: right; max-width: 34ch; line-height: 1.5; }

/* Sticky give bar */
.givebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(10,11,12,0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--hair-dk); color: var(--bone); transform: translateY(102%); transition: transform 0.32s ease; }
.givebar.visible { transform: translateY(0); }
.givebar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; }
.givebar .gb-text { font-size: 0.92rem; font-weight: 300; color: #C6CBCF; }
.givebar .gb-text b { font-family: 'Bodoni Moda', serif; font-weight: 400; color: var(--bone); }
.gb-btn { font-family: 'Newsreader', serif; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding: 12px 28px; background: var(--bone); color: var(--ink); border: 1px solid var(--bone); text-decoration: none; white-space: nowrap; transition: background 0.18s, color 0.18s; }
.gb-btn:hover { background: transparent; color: var(--bone); }

/* Docket & Sections */
.docket { background: var(--ink-soft); color: var(--bone); border-top: 1px solid var(--hair-dk); }
.docket-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.docket-cell { padding: 30px 26px 30px 0; border-right: 1px solid var(--hair-dk); }
.docket-cell:last-child { border-right: none; }
.docket-cell .label { color: var(--slate-mid); display: block; margin-bottom: 8px; }
.docket-cell b { font-family: 'Bodoni Moda', serif; font-weight: 400; font-size: 1.32rem; letter-spacing: 0.01em; }
.band { padding: 104px 0; }
.band-head { max-width: 640px; margin-bottom: 56px; }
.band-head .label { display: block; margin-bottom: 18px; }
.band-head h2 { font-family: 'Bodoni Moda', serif; font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.06; letter-spacing: -0.015em; max-width: 18ch; }
.band-head p { margin-top: 18px; max-width: 50ch; font-weight: 300; color: var(--slate); }

/* Ledger */
.ledger { border-top: 1px solid var(--hair); }
.ledger-row { width: 100%; display: grid; grid-template-columns: 8.5rem 1fr auto; align-items: baseline; gap: 28px; padding: 26px 4px; border: none; border-bottom: 1px solid var(--hair); background: none; font-family: inherit; text-align: left; color: var(--ink); cursor: pointer; transition: background 0.18s, padding-left 0.18s; }
.ledger-row:hover { background: rgba(10,11,12,0.035); padding-left: 12px; }
.ledger-row .amt { font-family: 'Bodoni Moda', serif; font-size: 1.75rem; font-weight: 400; letter-spacing: -0.01em; }
.ledger-row .what { font-size: 1.02rem; font-weight: 300; color: var(--slate); }
.ledger-row .mark { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); white-space: nowrap; }
.ledger-row[aria-pressed="true"] { background: var(--ink); color: var(--bone); }
.ledger-row[aria-pressed="true"] .what { color: #B9BFC4; }
.ledger-row[aria-pressed="true"] .mark { color: var(--bone); }

.give-foot { margin-top: 40px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.custom-amt { font-family: inherit; font-size: 1rem; width: 15rem; padding: 13px 2px; border: none; border-bottom: 1px solid var(--hair); background: transparent; color: var(--ink); }
.custom-amt::placeholder { color: var(--smoke); }
.custom-amt:focus { border-bottom-color: var(--ink); }
.btn { font-family: 'Newsreader', serif; font-size: 0.86rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding: 17px 38px; background: var(--ink); color: var(--bone); border: 1px solid var(--ink); cursor: pointer; transition: background 0.18s, color 0.18s; display: inline-flex; justify-content: center; align-items: center; gap: 8px;}
.btn:hover:not(:disabled) { background: transparent; color: var(--ink); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.give-fine { font-size: 0.86rem; font-weight: 300; color: var(--slate-mid); max-width: 34ch; }

/* Voices & Contact */
.voices { background: var(--ink); color: var(--bone); }
.voices .band-head h2 { color: var(--bone); }
.voices .band-head .label { color: var(--slate-mid); }
.quotes { border-top: 1px solid var(--hair-dk); }
.quote { display: grid; grid-template-columns: 1fr 15rem; gap: 48px; align-items: start; padding: 46px 0; border-bottom: 1px solid var(--hair-dk); }
.quote blockquote { font-family: 'Bodoni Moda', serif; font-weight: 400; font-size: clamp(1.25rem, 2.3vw, 1.72rem); line-height: 1.34; letter-spacing: -0.005em; text-indent: -0.42em; }
.quote figcaption { padding-top: 8px; }
.quote figcaption b { display: block; font-size: 0.98rem; font-weight: 500; }
.quote figcaption span { font-size: 0.86rem; font-weight: 300; color: var(--slate-mid); }

.reach-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 76px; }
.reach-head { margin-bottom: 0; }
.reach-lines { display: grid; gap: 14px; margin-top: 30px; }
.reach-lines div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); font-size: 0.96rem; }
.reach-lines .label { align-self: center; }

.form { display: grid; gap: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.field { display: grid; gap: 9px; }
.field input, .field textarea { font-family: inherit; font-size: 1rem; padding: 10px 2px; border: none; border-bottom: 1px solid var(--hair); background: transparent; color: var(--ink); }
.field textarea { min-height: 108px; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--ink); }
.form .btn { justify-self: start; }

footer { border-top: 1px solid var(--hair); padding: 34px 0 96px; }
.foot-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 0.84rem; font-weight: 300; color: var(--slate-mid); }

/* Responsive */
@media (max-width: 900px) {
  .docket-grid { grid-template-columns: 1fr 1fr; }
  .docket-cell { padding: 24px 22px 24px 0; border-bottom: 1px solid var(--hair-dk); }
  .docket-cell:nth-child(2n) { border-right: none; }
  .docket-cell:nth-last-child(-n+2) { border-bottom: none; }
  .reach-grid { grid-template-columns: 1fr; gap: 48px; }
  .quote { grid-template-columns: 1fr; gap: 20px; }
  .band { padding: 76px 0; }
}
@media (max-width: 640px) {
  .hero { min-height: 88vh; }
  .hero-img { background-position: 66% center; }
  .hero-body { padding: 64px 0 44px; }
  .hero h1 { max-width: 12ch; }
  .nav-links a:not(.nav-give) { display: none; }
  .portrait-note { position: static; margin: 0 6% 22px; text-align: left; max-width: none; }
  .ledger-row { grid-template-columns: 1fr auto; gap: 6px 20px; padding: 22px 4px; }
  .ledger-row .what { grid-column: 1 / -1; }
  .form-row { grid-template-columns: 1fr; }
  .custom-amt { width: 100%; }
  .give-foot .btn { width: 100%; }
  .givebar .gb-text { font-size: 0.84rem; }
  .gb-btn { padding: 11px 20px; }
}

/* Status Banner */
.status-banner { padding: 16px; text-align: center; font-weight: 500; font-size: 0.9rem; z-index: 100; position: relative; }
.status-banner.success { background: #E9EAEA; color: #0A0B0C; }
.status-banner.cancel { background: #3F474D; color: #E9EAEA; }

/* ── STRIPE EMBEDDED MODAL STYLES ── */
.payment-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,11,12,0.85); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.payment-overlay.visible { opacity: 1; pointer-events: auto; }
.payment-modal {
  background: var(--paper); padding: 46px 36px;
  width: min(520px, 92%); position: relative;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.close-btn {
  position: absolute; top: 12px; right: 18px;
  background: none; border: none; font-size: 1.8rem; font-weight: 300;
  cursor: pointer; color: var(--smoke); transition: color 0.2s;
}
.close-btn:hover { color: var(--ink); }
.payment-modal h3 {
  font-family: 'Bodoni Moda', serif; font-weight: 400; font-size: 1.8rem;
  margin-bottom: 24px; color: var(--ink); line-height: 1.1; letter-spacing: -0.01em;
}
#payment-message { display: none; color: #d93025; font-size: 0.9rem; margin-top: 12px; }
#payment-message.visible { display: block; }
/* Spinner */
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%; border-top-color: var(--bone);
  animation: spin 0.8s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner.hidden { display: none; }
