/* ==========================================================================
   Wizardz Bluff — shared base styles
   Loaded on every page: reset, variables, header, footer, buttons, and the
   handful of components reused across pages (panel, hero-video, page-banner,
   post-checkout notice). Page-specific styles live in css/<page>.css.
   ========================================================================== */

:root {
  /* Arcane base */
  --void:           #170b1f;            /* deep violet-black — section bg */
  --void-img:       url("../images/leather.png");
  --ink-panel:      #241230;            /* slightly lighter panel/footer bg */
  --parchment:      #f4e6c8;            /* warm cream panels */
  --parchment-edge: #d8ad63;            /* parchment border/divider */
  --gold:           #d8af52;            /* antique gold — headings on dark */
  --gold-bright:    #f0cd7c;            /* gold hover/glow */
  --ember:          #c9552c;            /* rust ember — CTAs */
  --ember-dark:     #9c3f1f;            /* ember hover */
  --text-light:     #f2e6d3;            /* body text on dark */
  --ink:            #2a160b;            /* body text on parchment */
  --header-bg:      #fffaf0;
  --header-text:    #3c2412;
  --footer-bg:      #120a17;
  --radius:         12px;
  --max-width:      1170px;

  --font-display: "New Rocker", Georgia, serif;
  --font-body:    "Geom", Arial, Helvetica, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--void);
  background-image: var(--void-img);
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ember); }
a:hover { color: var(--ember-dark); }
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 600; line-height: 1.15;
  letter-spacing: -0.01em; margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ember); color: #fff; padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header { background: var(--header-bg); position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(60,36,18,.12), 0 8px 20px -12px rgba(0,0,0,.3); }
.header-inner { display: flex; align-items: center; gap: 16px; padding: 18px 0; }
.logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  flex: 1 1 0; min-width: 0;
}
.logo-icon { height: 80px; width: auto; flex: none; }
.logo-wordmark { height: 80px; width: auto; flex: none; }

.site-nav { flex: none; }

.header-actions { flex: 1 1 0; justify-content: flex-end; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; }
.site-nav a {
  position: relative; color: var(--header-text); text-decoration: none;
  font-weight: 500; font-size: 17px; padding: 4px 0; display: inline-block;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width .2s ease;
}
.site-nav a:hover { color: var(--ember); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { width: 100%; }
.site-nav a[aria-current="page"] { color: var(--ember-dark); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--header-text); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; position: relative;
  background: linear-gradient(180deg, var(--ember) 0%, var(--ember-dark) 100%);
  color: #fff8ee; text-decoration: none;
  font-family: var(--font-body); font-weight: 600; font-size: 16px; letter-spacing: .01em;
  padding: 12px 30px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px -4px rgba(0,0,0,.4);
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover, .btn:focus-visible {
  background: linear-gradient(180deg, #d4663a 0%, var(--ember) 100%);
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 10px 22px -6px rgba(0,0,0,.45);
}
.btn-lg {
  font-size: 19px; padding: 18px 48px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: .04em;
}
.btn-lg::before { content: "✨ "; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-leather { background-color: var(--void); background-image: var(--void-img); background-repeat: repeat; color: var(--text-light); }
.section-leather h1, .section-leather h2 { color: var(--gold); }
.section-parchment {
  background: var(--parchment);
  background-image: radial-gradient(ellipse 120% 100% at 50% -10%, rgba(255,255,255,.55), transparent 60%);
  color: var(--ink);
}
.section-parchment h2, .section-parchment h4 { color: #3c1f0f; }
.center { text-align: center; }

/* ---------- Panel (shared card used on home, about, contact, how-to) ---------- */
.panel {
  background: var(--parchment);
  background-image: radial-gradient(ellipse at top, rgba(255,255,255,.5), transparent 60%);
  color: var(--ink); border-radius: var(--radius);
  border: 1px solid var(--parchment-edge);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 5px rgba(216,175,82,.14), 0 26px 50px -16px rgba(0,0,0,.5);
  padding: 36px 40px;
}
.panel > *:first-child { margin-top: 0; }
.panel > *:last-child { margin-bottom: 0; }
.panel h4, .panel h2 { color: #3c1f0f; }

/* ---------- Click-to-load video embed (shared by home hero + how-to overview) ---------- */
.hero-video {
  position: relative; z-index: 2; max-width: 820px; margin: 0 auto;
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(216,175,82,.35), 0 30px 60px -20px rgba(0,0,0,.65);
  opacity: 0; transform: translateY(16px);
  animation: panel-rise .7s cubic-bezier(.22,1,.36,1) .35s forwards;
}
.hero-video iframe, .hero-video button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hero-video button { padding: 0; cursor: pointer; background: #000 center / cover no-repeat; }
.hero-video button::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%,-50%);
  border-radius: 50%; border: 2px solid var(--gold); background: rgba(23,11,31,.55);
  box-shadow: 0 0 0 6px rgba(216,175,82,.12), 0 0 24px rgba(216,175,82,.35);
}
.hero-video button::before {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%,-50%); z-index: 1;
  border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent var(--gold-bright);
}
@keyframes panel-rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- Page banner (image + title, used by contact + how-to) ---------- */
.page-banner {
  display: flex; align-items: center; justify-content: center; gap: 28px;
  max-width: 900px; margin: 0 auto 44px; flex-wrap: wrap;
}
.page-banner img { height: 130px; width: auto; flex: none; }
.page-banner h1 { margin: 0; }

/* ---------- Banner (post-checkout, markup present on every page) ---------- */
.notice { display: none; background: #e4f3e2; color: #1d5a1d; border-bottom: 3px solid #3a9a3a; padding: 14px 0; text-align: center; font-weight: 600; }
.notice.show { display: block; }
.notice.cancel { background: #fbeedb; color: #6b3d00; border-color: var(--parchment-edge); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #c9bdae; font-size: 15px; padding: 28px 0; text-align: center; border-top: 1px solid rgba(216,175,82,.25); }
.site-footer a { color: var(--gold-bright); }
.site-footer nav { margin-bottom: 10px; }
.site-footer nav a { margin: 0 12px; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--header-bg); box-shadow: 0 10px 20px -8px rgba(0,0,0,.25);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 20px 18px; }
  .site-nav li a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(60,36,18,.1); }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .logo-icon { display: none; }
  .logo-wordmark { height: auto; max-height: 60px; }
  .header-actions .btn { padding: 10px 18px; font-size: 15px; }
  .panel { padding: 26px 22px; }
  .page-banner { flex-direction: column; text-align: center; gap: 16px; margin-bottom: 32px; }
  .page-banner img { height: 100px; }
}
