/* ==========================================================
   Beta Pi – texture layer (redesign demo)
   Loaded AFTER style.css. Adds depth without touching the HTML:
   1. Film grain over the whole page
   2. Bronze candle-glow under the home banner text
   3. Faint marble veins in the alternate (dark) sections
   4. Warm "light through laurel leaves" over the Join-us band
   5. Bronze contour lines in the footer and page headers
   6. Softer, layered shadows + metallic bronze buttons
   Remove the <link> to this file and the site looks as before.
   ========================================================== */

:root {
  --grain-opacity: .07;
  --grain-blend: overlay;
  --vein-opacity: .10;
  --glow: rgba(198, 162, 107, .22);
  --contour-opacity: .10;
  --leaf-light: rgba(231, 207, 159, .10);
  --shadow-soft:
    0 1px 1px rgba(0,0,0,.25), 0 3px 6px rgba(0,0,0,.25),
    0 12px 24px rgba(0,0,0,.30), 0 32px 64px rgba(0,0,0,.35);
}
:root[data-theme="light"] {
  --grain-opacity: .10;
  --grain-blend: multiply;
  --vein-opacity: .12;
  --glow: rgba(198, 162, 107, .25);
  --contour-opacity: .16;
  --leaf-light: rgba(90, 60, 25, .08);
  --shadow-soft:
    0 1px 1px rgba(80,55,20,.05), 0 3px 6px rgba(80,55,20,.05),
    0 12px 24px rgba(80,55,20,.07), 0 32px 64px rgba(80,55,20,.09);
}

/* ---------- 1. Film grain (whole page) ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- 2. Bronze glow under the hero text ---------- */
.hero::after {
  content: ""; position: absolute; left: 50%; bottom: 0; z-index: 0; pointer-events: none;
  width: min(1100px, 100%); height: 75%; transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 55% at 50% 60%, var(--glow), transparent 70%);
  animation: bp-breathe 9s ease-in-out infinite alternate;
}
.hero .container { z-index: 1; }
@keyframes bp-breathe { from { opacity: .75; } to { opacity: 1; } }

/* ---------- 3. Marble veins in alternate sections ---------- */
.section-alt { position: relative; overflow: hidden; isolation: isolate; }
.section-alt::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: var(--vein-opacity);
  background-size: 900px 900px;
  /* turbulence -> keep only the thin ridges -> bronze-white veins */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='900'><filter id='m' x='0' y='0' width='100%' height='100%'><feTurbulence type='turbulence' baseFrequency='.0035 .007' numOctaves='5' seed='8' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 .91  0 0 0 0 .81  0 0 0 0 .62  -9 0 0 0 1.1'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
}
:root[data-theme="light"] .section-alt::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='900'><filter id='m' x='0' y='0' width='100%' height='100%'><feTurbulence type='turbulence' baseFrequency='.0035 .007' numOctaves='5' seed='8' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 .35  0 0 0 0 .27  0 0 0 0 .16  -9 0 0 0 1.1'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
}

/* ---------- 4. Light through laurel leaves (Join-us band) ---------- */
.cta-band::after {
  content: ""; position: absolute; inset: -15%; pointer-events: none; z-index: 0;
  filter: blur(22px);
  background:
    radial-gradient(ellipse 22% 9% at 18% 28%, var(--leaf-light) 60%, transparent 62%),
    radial-gradient(ellipse 12% 20% at 33% 62%, var(--leaf-light) 60%, transparent 62%),
    radial-gradient(ellipse 26% 8% at 62% 22%, var(--leaf-light) 60%, transparent 62%),
    radial-gradient(ellipse 10% 18% at 78% 58%, var(--leaf-light) 60%, transparent 62%),
    radial-gradient(ellipse 24% 9% at 86% 86%, var(--leaf-light) 60%, transparent 62%),
    radial-gradient(ellipse 16% 7% at 12% 82%, var(--leaf-light) 60%, transparent 62%),
    radial-gradient(ellipse 50% 60% at 50% 50%, var(--glow), transparent 70%);
  animation: bp-sway 10s ease-in-out infinite alternate;
}
.cta-band .container { z-index: 1; }
@keyframes bp-sway { to { transform: translate(2%, 1.5%) rotate(1.2deg); } }

/* ---------- 5. Contour lines (footer + subpage headers) ---------- */
.site-footer { position: relative; overflow: hidden; isolation: isolate; }
.site-footer::before, .page-header::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../assets/contours.svg") center / cover no-repeat;
  opacity: var(--contour-opacity);
}
.page-header { isolation: isolate; }
.page-header::before { z-index: -2; }
.page-header::after {
  z-index: -1; opacity: calc(var(--contour-opacity) * 1.2);
  /* fade the lines out towards the photo on the right */
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 45%, transparent 85%);
          mask-image: linear-gradient(90deg, #000 0%, #000 45%, transparent 85%);
}

/* ---------- 6. Cards, event cards, buttons ---------- */
.card, .event-card {
  background-image: linear-gradient(180deg, rgba(198,162,107,.07), rgba(198,162,107,0) 40%);
  box-shadow: var(--shadow-soft);
}
.card:hover { box-shadow: var(--shadow-soft), 0 0 40px rgba(198,162,107,.12); }
.card .icon { background: radial-gradient(circle at 35% 30%, rgba(231,207,159,.18), transparent 70%); }

/* Metallic bronze on the main button */
.btn:not(.btn-outline) {
  background: linear-gradient(135deg, #e7cf9f 0%, #c6a26b 35%, #8a6a3d 70%, #c6a26b 100%);
  background-size: 200% 200%; background-position: 0% 50%;
  transition: background-position .6s ease, box-shadow .3s ease, color .3s ease;
}
.btn:not(.btn-outline):hover { background-position: 100% 50%; }
:root[data-theme="light"] .btn:not(.btn-outline) {
  background-image: linear-gradient(135deg, #a8844f 0%, #7d5f34 40%, #5a4220 75%, #7d5f34 100%);
}

@media (prefers-reduced-motion: reduce) {
  .hero::after, .cta-band::after { animation: none; }
}
