/* ===========================================================================
   Gargoyle marketing site — "Gothic Gargoyle" theme.
   Uses the SAME art as the live dashboard (public/img/*): carved-stone bg,
   hero plate, castle pillars, perched gargoyles, Cinzel display type, fog.
   CSS lives in /css/, art lives in /public/img/, so paths are ../public/img/.
   =========================================================================== */
:root {
  --bg: #08080c; --bg-2: #0c0c12; --stone: #15151e; --stone-2: #1b1b26; --stone-3: #22222f;
  --edge: #2c2c3b; --edge-hi: rgba(255,255,255,0.07); --text: #e9e4d8; --muted: #9a93a8;
  --accent: #8b5cf6; --accent-bright: #a78bfa; --accent-deep: #6d3fd6; --glow: rgba(139,92,246,0.45);
  --gold: #c9a86a; --ok: #61c08a; --warn: #d8ad57; --danger: #e26464; --radius: 14px;
  --display: "Cinzel", "Trajan Pro", Georgia, serif; --body: "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --page-width: 1100px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: var(--body); color: var(--text); font-size: 15px; line-height: 1.6; min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 50% -12%, rgba(139,92,246,0.13), transparent 60%),
    radial-gradient(1100px 760px at 88% 118%, rgba(80,60,130,0.10), transparent 60%),
    linear-gradient(180deg, rgba(10,10,15,0.82), rgba(8,8,12,0.9)),
    url('../public/img/bg-stone.webp');
  background-size: auto, auto, auto, 480px 480px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-attachment: fixed;
  cursor: url('../public/img/cursor.png') 4 2, auto;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.nav-open { overflow: hidden; }
a, button, .btn, .ghost, .nav-toggle, select, summary { cursor: url('../public/img/cursor-pointer.png') 6 4, pointer; }
::selection { background: rgba(139,92,246,0.35); color: #fff; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: url('../public/img/scrollbar-thumb.png') center / 100% auto repeat-y; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { filter: brightness(1.25); }
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: #c4b5fd; }
img { max-width: 100%; display: block; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 600; letter-spacing: 0.02em; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1400; padding: 12px 18px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; transform: translateY(-150%); transition: transform 0.2s ease; }
.skip-link:focus { transform: translateY(0); }

/* ---- Sitewide fog + castle edge decor (injected by script.js) ------------ */
#sitefog { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; opacity: 0.55; }
#sitefog .foglayer { position: absolute; top: 0; left: 0; height: 100%; width: 200%; }
#sitefog .foglayer .image01, #sitefog .foglayer .image02 { float: left; height: 100%; width: 50%; }
#sitefog #sfog_01 .image01, #sitefog #sfog_01 .image02 { background: url("https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog1.png") center center/cover no-repeat transparent; }
#sitefog #sfog_02 .image01, #sitefog #sfog_02 .image02 { background: url("https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog2.png") center center/cover no-repeat transparent; }
#sitefog #sfog_01 { animation: fog_opacity_a 16s linear infinite, fog_move 60s linear infinite; }
#sitefog #sfog_02 { animation: fog_opacity_b 24s linear infinite, fog_move 90s linear infinite; }
@keyframes fog_opacity_a { 0% { opacity: .1; } 22% { opacity: .5; } 40% { opacity: .28; } 58% { opacity: .4; } 80% { opacity: .16; } 100% { opacity: .1; } }
@keyframes fog_opacity_b { 0% { opacity: .5; } 25% { opacity: .2; } 50% { opacity: .1; } 80% { opacity: .3; } 100% { opacity: .5; } }
@keyframes fog_move { 0% { left: 0; } 100% { left: -100%; } }

.edge-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.pillar { position: fixed; top: 0; bottom: 0; width: 116px; background-position: top center; background-size: 116px auto; background-repeat: repeat-y; opacity: 0.92; }
.pillar-left { left: 0; background-image: url('../public/img/pilar-left.png'); }
.pillar-right { right: 0; background-image: url('../public/img/pilar-right.png'); }
.edge-garg { position: fixed; top: 64px; width: 120px; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6)); }
.edge-garg-left { left: 0; }
.edge-garg-right { right: 0; }
@media (max-width: 1340px) { .edge-decor { display: none; } }

/* ---- Top bar / nav -------------------------------------------------------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 26px;
  background: linear-gradient(180deg, rgba(14,14,20,0.92), rgba(10,10,15,0.78)); border-bottom: 1px solid var(--edge);
  box-shadow: 0 1px 0 var(--edge-hi), 0 14px 40px rgba(0,0,0,0.5); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50; }
.brand { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; text-shadow: 0 0 22px var(--glow); }
.brand:hover { color: #fff; }
.brand-logo { height: 28px; width: 28px; border-radius: 6px; vertical-align: middle; box-shadow: 0 0 12px var(--glow); }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { color: var(--muted); padding: 9px 13px; border-radius: 10px; font-weight: 600; letter-spacing: 0.02em; transition: color 0.15s, background 0.15s; }
.nav-links a:hover { color: var(--text); background: var(--stone-2); }
.nav-links a.active { color: #fff; background: var(--stone-2); }
.nav-links a.nav-cta { color: #fff; background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep)); box-shadow: 0 8px 20px var(--glow); margin-left: 6px; }
.nav-links a.nav-cta:hover { color: #fff; box-shadow: 0 10px 26px var(--glow); }
.nav-toggle { display: none; width: 46px; height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 11px; border: 1px solid var(--edge); background: var(--stone-2); cursor: pointer; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 999px; transition: transform 0.2s, opacity 0.2s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.container { max-width: var(--page-width); margin: 0 auto; padding: 30px 24px 70px; position: relative; z-index: 1; }

/* ---- Buttons -------------------------------------------------------------- */
.btn, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; letter-spacing: 0.02em; border-radius: 11px; padding: 11px 18px; border: 1px solid transparent; transition: transform 0.08s ease, box-shadow 0.18s ease, background 0.18s ease; }
.btn:active, .ghost:active { transform: translateY(1px); }
.btn { color: #fff; background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep)); border-color: rgba(255,255,255,0.14); box-shadow: 0 8px 22px var(--glow), inset 0 1px 0 rgba(255,255,255,0.22); }
.btn:hover { box-shadow: 0 10px 30px var(--glow), inset 0 1px 0 rgba(255,255,255,0.28); }
.btn.secondary { background: linear-gradient(180deg, var(--stone-3), var(--stone-2)); border-color: #38384c; color: var(--text); box-shadow: inset 0 1px 0 var(--edge-hi); }
.btn.secondary:hover { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--edge-hi), 0 8px 22px rgba(0,0,0,0.4), 0 0 0 1px rgba(139,92,246,0.25); }
.btn.big { padding: 14px 26px; font-size: 16px; }
.ghost { background: transparent; color: var(--muted); border-color: transparent; }
.ghost:hover { color: var(--text); }

/* ---- Hero (real hero.webp plate) ----------------------------------------- */
.hero { text-align: center; padding: 92px 24px 56px; position: relative; border: 1px solid var(--edge); border-radius: 18px; overflow: hidden;
  background-image: linear-gradient(180deg, rgba(8,8,12,0.5), rgba(8,8,12,0.85)), url('../public/img/hero.webp');
  background-size: cover; background-position: center; box-shadow: 0 18px 50px rgba(0,0,0,0.5); }
.hero .fog { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero .foglayer { position: absolute; top: 0; left: 0; height: 100%; width: 200%; }
.hero .foglayer .image01, .hero .foglayer .image02 { float: left; height: 100%; width: 50%; }
.hero #foglayer_01 .image01, .hero #foglayer_01 .image02 { background: url("https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog1.png") center center/cover no-repeat transparent; }
.hero #foglayer_02 .image01, .hero #foglayer_02 .image02 { background: url("https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog2.png") center center/cover no-repeat transparent; }
.hero #foglayer_01 { animation: fog_opacity_a 12s linear infinite, fog_move 16s linear infinite; }
.hero #foglayer_02 { animation: fog_opacity_b 20s linear infinite, fog_move 13s linear infinite; }
.hero > *:not(.fog) { position: relative; z-index: 2; }
.hero::before { content: "\2756"; color: var(--gold); opacity: 0.7; font-size: 20px; display: block; margin-bottom: 16px; text-shadow: 0 0 14px rgba(201,168,106,0.5); position: relative; z-index: 2; }
.hero h1 { font-size: clamp(40px, 8vw, 58px); margin: 0 0 14px; letter-spacing: 0.06em; text-transform: uppercase; text-shadow: 0 0 38px var(--glow); display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero h1 .hero-logo { height: 0.95em; width: auto; filter: drop-shadow(0 0 14px var(--glow)); }
.hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 28px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.section { margin-top: 40px; }
.section-head { max-width: 720px; margin: 0 auto 26px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: 0.04em; margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---- Ornamental divider (gold lines → glowing violet gem) ---------------- */
.divider { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: 720px; margin: 36px auto; }
.divider::before, .divider::after { content: ''; height: 1px; flex: 1; }
.divider::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.divider::after { background: linear-gradient(90deg, var(--gold), transparent); }
.divider i { flex: 0 0 auto; width: 12px; height: 12px; transform: rotate(45deg); background: var(--accent); border: 1px solid var(--gold); box-shadow: 0 0 14px var(--glow); }

/* ---- Feature cards = the real card art ----------------------------------- */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }
.feature-img { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--edge); box-shadow: 0 14px 36px rgba(0,0,0,0.45); transition: transform 0.15s ease, box-shadow 0.2s ease; }
.feature-img:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(0,0,0,0.5); }
.card { position: relative; background: linear-gradient(180deg, #1a1a25, #131319); border: 1px solid var(--edge); border-top-color: var(--edge-hi); border-radius: var(--radius); padding: 22px; box-shadow: 0 14px 36px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04); }
.card h3 { margin: 0 0 12px; letter-spacing: 0.05em; }
.card p { color: var(--muted); margin: 0; }
.muted { color: var(--muted); }

/* ---- Command table -------------------------------------------------------- */
.table-wrap { border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, #1a1a25, #131319); box-shadow: 0 14px 36px rgba(0,0,0,0.5); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--edge); }
th { color: var(--gold); font-family: var(--display); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(139,92,246,0.05); }
td.who { color: var(--muted); white-space: nowrap; }
code, .inline-code { background: #101017; border: 1px solid var(--edge); border-radius: 6px; padding: 1px 6px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--accent-bright); }

/* ---- Donate tiers --------------------------------------------------------- */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tier-card { display: flex; flex-direction: column; }
.tier-card.featured { border-color: rgba(139,92,246,0.55); box-shadow: 0 0 0 1px var(--glow), 0 16px 40px rgba(0,0,0,0.5); }
.tier-card h3 { margin: 0 0 4px; font-size: 20px; }
.tier-card .t-price { color: var(--gold); font-family: var(--display); font-size: 24px; margin-bottom: 12px; }
.tier-card .t-price span { font-size: 13px; color: var(--muted); font-family: var(--body); }
.tier-card .t-desc { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.perks li { position: relative; padding-left: 22px; color: var(--text); font-size: 14px; }
.perks li::before { content: '\2756'; position: absolute; left: 0; color: var(--accent-bright); }

/* ---- Prose (guide / legal) ------------------------------------------------ */
.prose { line-height: 1.8; }
.prose h2 { color: var(--text); margin: 30px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--edge); font-size: 22px; letter-spacing: 0.04em; }
.prose h3 { color: var(--accent-bright); margin: 20px 0 8px; font-size: 17px; }
.prose p, .prose ul { margin: 0 0 14px; color: var(--muted); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.reading { max-width: 820px; }
.page-head { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--edge); }
.page-head h1 { margin: 0 0 6px; font-size: clamp(30px, 6vw, 42px); letter-spacing: 0.05em; text-shadow: 0 0 26px var(--glow); }
.toc { margin-bottom: 24px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.toc a { display: block; padding: 11px 14px; background: var(--stone-2); border: 1px solid var(--edge); border-radius: 10px; color: var(--text); transition: background 0.15s, transform 0.1s; }
.toc a:hover { background: var(--stone-3); transform: translateX(3px); border-color: var(--accent); }
.guide-section { scroll-margin-top: 90px; }
.guide-section + .guide-section { margin-top: 18px; }

/* ---- Footer --------------------------------------------------------------- */
.site-foot { text-align: center; color: var(--muted); padding: 32px 20px; border-top: 1px solid var(--edge); font-size: 13px; letter-spacing: 0.03em; position: relative; z-index: 1; }
.site-foot .foot-logo { height: 20px; width: 20px; border-radius: 5px; vertical-align: middle; margin-right: 6px; }
.site-foot .foot-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); }

@media (max-width: 820px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .nav-links { width: 100%; display: none; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 12px; justify-content: flex-start; }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { width: 100%; }
  .nav-links a.nav-cta { margin-left: 0; }
  .hero { padding: 64px 18px 44px; }
  .cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #sitefog .foglayer, .hero .foglayer { animation: none !important; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
