/* Page-level styles for marcasso.org redesign */

/* =============== HEADER =============== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(245, 240, 230, 0.6);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.site-header.is-scrolled {
  background: rgba(245, 240, 230, 0.92);
  border-bottom-color: var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  gap: 32px;
}
.brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.brand-mark { height: 56px; width: auto; flex-shrink: 0; display: block; }
.brand-tag { font-size: 11px; color: var(--ink-3); letter-spacing: 0.05em; margin-top: 2px; }
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
  position: relative; padding: 4px 0;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--accent); transition: width .25s ease;
}
.site-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-toggle {
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: 6px 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  cursor: pointer; color: var(--ink-3); display: inline-flex; gap: 4px; align-items: center;
}
.lang-toggle .on { color: var(--ink); }
.lang-sep { color: var(--rule); }
.btn-sm { padding: 10px 18px; font-size: 13px; }

@media (max-width: 880px) {
  .site-nav { display: none; }
}

/* =============== HERO =============== */
.hero { position: relative; padding: 64px 0 32px; overflow: hidden; }
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image: radial-gradient(circle at 20% 30%, rgba(212,80,42,.08), transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(90,122,74,.08), transparent 50%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px;
  align-items: center;
  position: relative;
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; }

.hero-display { font-size: clamp(64px, 9vw, 144px); margin: 24px 0 32px; }
.hero-display .kicker-line { display: block; font-style: italic; font-weight: 300; color: var(--accent-deep); font-size: 0.55em; }
.hero-display .line-2 { display: block; }
.hero-display .line-3 { display: block; color: var(--accent); }

.hero-quote {
  font-size: clamp(36px, 4.5vw, 60px);
  line-height: 1.1; font-style: italic; font-weight: 300;
  margin: 24px 0;
}
.quote-mark { color: var(--accent); font-style: normal; }
.quote-attr { display: block; font-size: 0.32em; font-style: normal; color: var(--ink-3); margin-top: 24px; letter-spacing: 0.05em; }

.hero-lede {
  font-size: 19px; max-width: 520px; color: var(--ink-2);
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 14px; margin-bottom: 56px; flex-wrap: wrap; }

.hero-meta {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  border-top: 1px solid var(--rule); padding-top: 24px; max-width: 540px;
}
.hero-meta li { display: flex; flex-direction: column; gap: 4px; }
.hero-meta-num { font-family: var(--serif); font-size: 32px; font-weight: 400; line-height: 1; color: var(--accent); }
.hero-meta-lbl { font-size: 13px; color: var(--ink-3); line-height: 1.3; }

/* portrait */
.hero-visual { position: relative; }
.portrait-card { position: relative; }
.portrait-frame {
  position: relative; aspect-ratio: 4/5; border-radius: 8px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(26,29,26,0.25), 0 8px 16px -8px rgba(26,29,26,0.15);
}
.portrait-img { width: 100%; height: 100%; }
.portrait-svg { width: 100%; height: 100%; }
.portrait-caption {
  position: absolute; left: 24px; bottom: 24px; right: 24px;
  background: rgba(251,248,241,0.92); backdrop-filter: blur(8px);
  padding: 14px 18px; border-radius: 4px;
}
.portrait-name { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.portrait-role { font-size: 12px; color: var(--ink-3); margin-top: 2px; letter-spacing: 0.04em; }

.portrait-stat {
  position: absolute; right: -32px; top: 32px;
  background: var(--ink); color: var(--paper);
  padding: 24px; border-radius: 4px; max-width: 200px;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.4);
  transform: rotate(2deg);
}
.stat-num { font-size: 56px; line-height: 1; color: var(--accent); }
.stat-unit { font-size: 18px; color: var(--paper); margin-left: 4px; }
.stat-lbl { font-size: 12px; line-height: 1.4; margin-top: 8px; color: rgba(245,240,230,0.8); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .portrait-stat { right: 16px; top: 16px; }
}

/* marquee */
.hero-marquee {
  margin-top: 64px; overflow: hidden;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 18px 0; background: var(--paper-2);
}
.marquee-track { display: flex; gap: 0; animation: marquee 50s linear infinite; white-space: nowrap; }
.marquee-row { display: inline-flex; align-items: center; gap: 32px; padding-right: 32px; }
.marquee-city { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-2); }
.marquee-sep { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-33.33%); }
}

/* =============== MISSION =============== */
.mission { padding: 120px 0 100px; background: var(--card); border-top: 1px solid var(--rule); }
.mission-head { max-width: 780px; margin-bottom: 80px; }
.mission-title { font-size: clamp(40px, 5.5vw, 76px); margin: 16px 0 28px; }
.mission-body { font-size: 19px; color: var(--ink-2); max-width: 640px; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.pillar {
  padding: 40px 32px 32px 0; border-right: 1px solid var(--rule);
  position: relative;
}
.pillar:last-child { border-right: none; padding-right: 0; }
.pillar:not(:first-child) { padding-left: 32px; }
.pillar-icon { width: 56px; height: 56px; margin-bottom: 18px; }
.pillar-icon svg { width: 100%; height: 100%; display: block; }
.pillar-num { font-size: 14px; color: var(--accent); font-weight: 500; letter-spacing: 0.1em; }
.pillar-title { font-size: 26px; font-weight: 500; margin: 16px 0 12px; line-height: 1.15; }
.pillar-body { color: var(--ink-2); font-size: 15px; }

@media (max-width: 880px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { border-right: none; border-bottom: 1px solid var(--rule); padding: 32px 0; }
  .pillar:not(:first-child) { padding-left: 0; }
  .pillar:last-child { border-bottom: none; }
}

/* =============== STORY =============== */
.story { padding: 120px 0; background: var(--paper); }
.story-grid { display: grid; grid-template-columns: 320px 1fr; gap: 80px; }
.story-aside { position: sticky; top: 100px; align-self: start; }
.story-photo { margin: 24px 0 32px; }
.story-photo-inner {
  aspect-ratio: 4/5; border-radius: 4px; overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(26,29,26,0.3);
  background: #f7f5f0;
}
.story-illust { width: 100%; height: 100%; display: block; }
.story-photo-cap { font-size: 12px; margin-top: 10px; font-style: italic; }

.story-pull {
  font-size: 22px; line-height: 1.35; font-style: italic; font-weight: 300;
  border-left: 3px solid var(--accent); padding: 8px 0 8px 20px;
  color: var(--ink-2);
}
.story-pull cite { display: block; font-size: 13px; font-style: normal; color: var(--ink-3); margin-top: 12px; letter-spacing: 0.04em; }

.story-title { font-size: clamp(36px, 4.5vw, 64px); margin: 16px 0 24px; }
.story-lede { font-size: 19px; color: var(--ink-2); margin-bottom: 56px; max-width: 640px; }

.timeline { list-style: none; padding: 0; margin: 0 0 72px; }
.timeline-item {
  display: grid; grid-template-columns: 32px 100px 1fr; gap: 24px;
  padding: 24px 0; border-bottom: 1px solid var(--rule); position: relative;
}
.timeline-item:first-child { border-top: 1px solid var(--rule); }
.timeline-marker {
  display: flex; align-items: center; justify-content: center;
  height: 24px;
}
.timeline-marker span {
  width: 10px; height: 10px; border-radius: 999px; background: var(--accent);
  display: block;
}
.timeline-year { font-size: 18px; font-weight: 500; color: var(--accent-deep); padding-top: 1px; }
.timeline-title { font-size: 22px; font-weight: 500; margin: 0 0 6px; }
.timeline-body { color: var(--ink-2); margin: 0; max-width: 540px; }

.story-book {
  display: grid; grid-template-columns: 160px 1fr; gap: 32px;
  padding: 32px; background: var(--card); border-radius: 4px;
  align-items: center;
}
.story-book-cover {
  aspect-ratio: 2/3;
  background: linear-gradient(160deg, #931515 0%, #c41e1e 60%, #3a7ec4 100%);
  color: #fff; padding: 18px; border-radius: 2px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 14px 28px -10px rgba(0,0,0,0.3);
  position: relative; overflow: hidden;
}
.story-book-cover::before {
  content: ''; position: absolute; inset: 8px;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 1px;
  pointer-events: none;
}
.story-book-cover::after {
  content: ''; position: absolute; left: 50%; top: 30%;
  width: 50px; height: 50px; transform: translateX(-50%);
  background: radial-gradient(circle, #4a9c4a 30%, transparent 30%) 0 0/16px 16px;
  opacity: 0.4;
}
.book-title { font-size: 22px; line-height: 1; font-weight: 500; }
.book-author { font-size: 11px; opacity: 0.85; letter-spacing: 0.06em; }
.story-book-text h4 { font-size: 22px; margin: 8px 0 10px; }
.story-book-text { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.story-book-text .btn { margin-top: 4px; }

@media (max-width: 980px) {
  .story-grid { grid-template-columns: 1fr; gap: 32px; }
  .story-aside { position: static; }
  .timeline-item { grid-template-columns: 24px 80px 1fr; gap: 16px; }
  .story-book { grid-template-columns: 100px 1fr; gap: 20px; padding: 20px; }
}

/* =============== THERAPIES =============== */
.therapies { padding: 120px 0; background: var(--ink); color: var(--paper); }
.therapies .eyebrow { color: rgba(245,240,230,0.6); }
.therapies-head { max-width: 780px; margin-bottom: 64px; }
.therapies-title { font-size: clamp(40px, 5.5vw, 76px); margin: 16px 0 24px; }
.therapies-title .italic { color: var(--accent); }
.therapies-lede { font-size: 18px; color: rgba(245,240,230,0.75); max-width: 600px; }

.therapies-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08);
}
.therapy {
  padding: 28px; background: var(--ink);
  cursor: default; transition: background .25s ease;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 200px;
}
.therapy:hover, .therapy.is-active { background: #2a2d2a; }
.therapy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.therapy-abbr {
  font-size: 36px; font-weight: 400; color: var(--accent);
  letter-spacing: -0.01em; line-height: 1;
}
.therapy .tag { background: rgba(255,255,255,0.08); color: rgba(245,240,230,0.7); }
.therapy .tag-accent { background: rgba(212,80,42,0.18); color: #f4cdb8; }
.therapy .tag-leaf { background: rgba(90,122,74,0.2); color: #c8d4b8; }
.therapy .tag-sky { background: rgba(74,107,133,0.22); color: #cdd9e3; }

.therapy-name { font-size: 16px; font-weight: 500; line-height: 1.3; margin: 0; flex: 1; }
.therapy-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: rgba(245,240,230,0.55);
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px;
}
.therapy-origin { font-style: italic; }
.therapy-years { font-family: var(--serif); }

.therapies-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap; gap: 16px;
}
.therapies-foot .muted { color: rgba(245,240,230,0.55); }
.therapies-foot .btn-ghost { color: var(--paper); border-color: rgba(255,255,255,0.4); }
.therapies-foot .btn-ghost:hover { background: var(--paper); color: var(--ink); }

@media (max-width: 880px) {
  .therapies-grid { grid-template-columns: 1fr; }
}
@media (min-width: 881px) and (max-width: 1100px) {
  .therapies-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============== NEWS =============== */
.news { padding: 120px 0; background: var(--paper); }
.news-head { margin-bottom: 64px; max-width: 780px; }
.news-title { font-size: clamp(40px, 5.5vw, 76px); margin-top: 16px; }

.news-list {
  display: flex; flex-direction: column;
}
.news-item {
  display: grid; grid-template-columns: 180px 1fr 32px; gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
  transition: background .2s ease, padding .2s ease;
  cursor: pointer;
}
.news-readmore {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; font-size: 13px; font-weight: 600;
  color: var(--accent); letter-spacing: 0.02em;
}
a.news-item { color: inherit; text-decoration: none; }
a.news-item.is-link { cursor: pointer; }
.news-item:hover { background: var(--card); padding-left: 16px; padding-right: 16px; }
.news-date { font-size: 22px; font-weight: 500; color: var(--ink-2); padding-top: 4px; }
.news-tagline { margin-bottom: 10px; }
.news-title-item { font-size: 28px; font-weight: 500; line-height: 1.15; margin: 0 0 12px; max-width: 600px; }
.news-text { color: var(--ink-2); margin: 0; max-width: 660px; }
.news-arrow { color: var(--ink-3); padding-top: 6px; transition: transform .2s ease, color .2s ease; }
.news-item:hover .news-arrow { transform: translateX(4px); color: var(--accent); }

@media (max-width: 880px) {
  .news-item { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .news-arrow { display: none; }
}

/* =============== JOIN / DONATE =============== */
.join { padding: 120px 0; background: var(--paper-2); }
.join-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
.join-card {
  padding: 56px; border-radius: 6px; position: relative; overflow: hidden;
}
.join-membership { background: var(--card); border: 1px solid var(--rule); }
.join-title { font-size: clamp(34px, 3.5vw, 52px); margin: 12px 0 20px; }
.join-body { color: var(--ink-2); font-size: 17px; margin-bottom: 28px; max-width: 520px; }
.join-perks { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-direction: column; gap: 14px; }
.join-perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.perk-mark {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

.join-donate {
  background: var(--accent); color: #fbf8f1;
  display: flex; flex-direction: column;
}
.donate-deco { position: absolute; right: -40px; top: -40px; width: 280px; opacity: 0.5; }
.donate-deco svg { width: 100%; height: 100%; }
.join-donate .display { color: #fbf8f1; }
.donate-title { font-size: clamp(28px, 2.8vw, 40px); margin: 0 0 16px; position: relative; }
.donate-body { color: rgba(251,248,241,0.9); margin-bottom: 32px; max-width: 360px; position: relative; }
.donate-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; position: relative; }
.donate-amount {
  background: rgba(251,248,241,0.12); color: #fbf8f1;
  border: 1px solid rgba(251,248,241,0.3);
  padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s ease;
  font-family: var(--sans);
}
.donate-amount:hover { background: rgba(251,248,241,0.22); }
.donate-other { font-style: italic; }
.join-donate .btn-paper { align-self: flex-start; position: relative; }

@media (max-width: 980px) {
  .join-grid { grid-template-columns: 1fr; }
  .join-card { padding: 36px; }
}

/* =============== FOOTER =============== */
.site-footer { background: var(--ink); color: var(--paper); padding: 80px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-logo { margin-bottom: 8px; }
.footer-logo-img {
  height: 64px; width: auto; display: block;
  background: #f7f5f0; padding: 10px 14px; border-radius: 6px;
}
.footer-tag { color: rgba(245,240,230,0.7) !important; margin: 8px 0 4px; font-size: 14px; }
.footer-siret { font-size: 12px; color: rgba(245,240,230,0.5) !important; margin: 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col-title { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245,240,230,0.6); margin-bottom: 8px; font-weight: 600; }
.footer-link { color: var(--paper); text-decoration: none; font-size: 14px; transition: color .2s ease; }
.footer-link:hover { color: var(--accent-soft); }
.footer-addr { font-size: 13px; color: rgba(245,240,230,0.5) !important; margin-top: 8px; max-width: 200px; }

.footer-bottom {
  display: flex; justify-content: space-between; padding-top: 24px;
  font-size: 12px; flex-wrap: wrap; gap: 12px;
}
.footer-bottom .muted { color: rgba(245,240,230,0.5) !important; }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* =============== DARK MODE =============== */
body.dark {
  --paper: #1a1d1a;
  --paper-2: #232622;
  --card: #232622;
  --ink: #f5f0e6;
  --ink-2: #d4cfc1;
  --ink-3: #8a8e83;
  --rule: #3a3d39;
}
body.dark .site-header { background: rgba(26,29,26,0.7); }

/* =============== PALETTE TWEAKS =============== */
body.palette-warm {
  --accent: #c41e1e; --accent-deep: #931515; --accent-soft: #f4cccc;
}
body.palette-leaf {
  --accent: #4a9c4a; --accent-deep: #2f6e2f; --accent-soft: #cfe5cf;
}
body.palette-sky {
  --accent: #3a7ec4; --accent-deep: #245a93; --accent-soft: #cfe0f2;
}
body.palette-gold {
  --accent: #c08a2e; --accent-deep: #8a5e15; --accent-soft: #f0d9a8;
}

/* =============== HEADLINE FONT TWEAK =============== */
body.font-cormorant .display,
body.font-cormorant .serif,
body.font-cormorant .pillar-title,
body.font-cormorant .therapy-abbr,
body.font-cormorant .timeline-year,
body.font-cormorant .timeline-title,
body.font-cormorant .news-title-item,
body.font-cormorant .news-date,
body.font-cormorant .stat-num,
body.font-cormorant .footer-logo,
body.font-cormorant .brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
}
body.font-newsreader .display,
body.font-newsreader .serif {
  font-family: "Newsreader", Georgia, serif;
}

/* =============== DENSITY =============== */
body.density-compact .hero { padding: 40px 0 24px; }
body.density-compact .mission,
body.density-compact .story,
body.density-compact .therapies,
body.density-compact .news,
body.density-compact .join { padding: 72px 0; }
