/* Lamb of God – site styles. See docs/04-style-guide.md.
   All colors and fonts come from the tokens below. To restyle, change tokens, not rules. */

:root {
  /* Classic theme (default): warm and reverent */
  --bg: #faf5ec;
  --bg-alt: #f4ead7;
  --surface: #ffffff;
  --text: #2b2420;
  --text-muted: #6b5f55;
  --primary: #6e1f2b;          /* burgundy */
  --on-primary: #ffffff;
  --accent: #a8802f;           /* gold: decorative only (rules, borders), not for small text */
  --accent-text: #7a5a14;      /* gold dark enough for text */
  --border: #e2d6bf;
  --footer-bg: #2b2420;
  --footer-text: #d9cdb5;

  --font-body: Georgia, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --heading-weight: 400;
  --heading-transform: none;
  --heading-tracking: 0;

  --wrap: 62rem;
  --radius: 6px;
}

/* Cinematic theme: dark and dramatic. Enable with `theme: cinematic` in src/_data/site.yml */
[data-theme="cinematic"] {
  --bg: #0d0d12;
  --bg-alt: #16161d;
  --surface: #16161d;
  --text: #ece8df;
  --text-muted: #9a968c;
  --primary: #f2c96b;
  --on-primary: #0d0d12;
  --accent: #f2c96b;
  --accent-text: #f2c96b;
  --border: #26262f;
  --footer-bg: #08080b;
  --footer-text: #8a867c;
  --heading-weight: 300;
  --heading-transform: uppercase;
  --heading-tracking: 0.05em;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.section { padding-top: 2rem; padding-bottom: 2rem; }
.prose { max-width: 44rem; margin-left: auto; margin-right: auto; }

h1, h2, h3 {
  font-weight: var(--heading-weight);
  text-transform: var(--heading-transform);
  letter-spacing: var(--heading-tracking);
  line-height: 1.2;
  color: var(--primary);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--primary); color: var(--on-primary); padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0; }

.banner {
  background: var(--primary); color: var(--on-primary);
  text-align: center; padding: 0.5rem 1rem;
  font-family: var(--font-ui); font-size: 0.95rem;
}

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand {
  font-size: 1.25rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--primary); text-decoration: none; font-weight: 600;
}
.nav-list { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; font-family: var(--font-ui); font-size: 0.95rem; }
.nav-list a { color: var(--text); text-decoration: none; padding: 0.5rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.nav-list a:hover, .nav-list a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Mobile menu button. nav.js unhides it and adds .has-nav-toggle; without JS the nav shows in full. */
.nav-toggle {
  display: none; align-items: center; gap: 0.4rem;
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-family: var(--font-ui); font-size: 0.95rem;
  padding: 0.4rem 0.75rem; cursor: pointer;
}
.nav-toggle-icon { display: block; }

@media (max-width: 44rem) {
  .has-nav-toggle .nav-toggle:not([hidden]) { display: inline-flex; }
  .has-nav-toggle nav { flex-basis: 100%; display: none; }
  .has-nav-toggle.nav-open nav { display: block; }
  .has-nav-toggle .nav-list { flex-direction: column; gap: 0; }
  .has-nav-toggle .nav-list li { border-top: 1px solid var(--border); }
  .has-nav-toggle .nav-list a { display: block; padding: 0.75rem 0; border-bottom: 0; }
  .has-nav-toggle .nav-list a[aria-current="page"] { color: var(--primary); font-weight: 600; }
}

/* Hero */
.hero { background: linear-gradient(var(--bg-alt), var(--bg)); text-align: center; padding: 3.5rem 0 3rem; }
.hero .eyebrow {
  font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.8rem; color: var(--accent-text); margin: 0 0 0.75rem;
}
.hero h1 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.lede { font-size: 1.25rem; margin: 0 0 1.5rem; color: var(--text-muted); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 0; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--font-ui); font-weight: 600; font-size: 1rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius); text-decoration: none;
  border: 2px solid var(--primary); min-height: 44px;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-secondary { background: transparent; color: var(--primary); }
.btn:hover { filter: brightness(1.1); }

/* Key details */
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 0; }
.details > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.details dt { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; color: var(--accent-text); }
.details dd { margin: 0.25rem 0 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card h2 { margin-top: 0; font-size: 1.25rem; }
.card p { margin: 0 0 0.75rem; }

/* Tables */
.schedule { width: 100%; border-collapse: collapse; font-size: 1rem; }
.schedule th, .schedule td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.schedule th { font-family: var(--font-ui); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

/* FAQ */
.faq { border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.faq p { margin: 0.5rem 0 0; }

.signup-embed { width: 100%; min-height: 40rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.placeholder { color: var(--text-muted); font-style: italic; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 1.5rem 0; margin-top: 3rem; font-family: var(--font-ui); font-size: 0.9rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--footer-text); }

/* Account pages (CMS login, change password, manage editors). Served by worker/pages.js. */
.account { max-width: 36rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
.account:has(table) { max-width: var(--wrap); }
.account h1 { font-size: 2rem; }
.account form { margin: 0 0 1.5rem; }
.account-field { margin: 0 0 1rem; }
.account-field label { display: block; font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem; margin: 0 0 0.25rem; }
.account-field input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--text-muted); border-radius: var(--radius); padding: 0.6rem 0.75rem; min-height: 44px;
}
.account-password-box { position: relative; }
.account-password-box input { padding-right: 3.25rem; }
.account-reveal {
  position: absolute; top: 0; right: 0; width: 3rem; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--text-muted); cursor: pointer; border-radius: var(--radius);
}
.account-reveal:hover { color: var(--primary); }
.account-reveal[hidden] { display: none; }
.account-reveal .account-eye-hide, .account-reveal[aria-pressed="true"] .account-eye-show { display: none; }
.account-reveal[aria-pressed="true"] .account-eye-hide { display: block; }
.account-hint { font-family: var(--font-ui); font-size: 0.9rem; color: var(--text-muted); margin: 0 0 0.35rem; }
.account-message { border-left: 4px solid var(--accent); background: var(--surface); padding: 0.75rem 1rem; margin: 0 0 1.25rem; }
.account-message p { margin: 0 0 0.5rem; }
.account-message p:last-child { margin: 0; }
.account-error { border-left-color: var(--primary); }
.account-password { font-size: 1.25rem; letter-spacing: 0.05em; }
.account-links { font-family: var(--font-ui); font-size: 0.95rem; }
.account-link-button { font: inherit; color: var(--primary); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.account-locked { color: var(--primary); font-family: var(--font-ui); font-size: 0.9rem; }
.account-table-wrap { overflow-x: auto; margin: 0 0 2rem; }
.account-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.account .account-inline { margin: 0; }
.account-confirm summary { list-style: none; }
.account-confirm summary::-webkit-details-marker { display: none; }
.account-confirm[open] summary { margin-bottom: 0.5rem; }
button.btn { cursor: pointer; }
.btn-small { font-size: 0.9rem; padding: 0.4rem 0.8rem; min-height: 36px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
