/* =========================================
   Weekly Devotional Q&A — Design System
   Palette: ivory + sage + forest + muted gold
   Fonts: Fraunces (serif) + Inter (body)
   ========================================= */

:root {
  --ivory: #f8f4ec;
  --ivory-2: #f1ece2;
  --sage: #b6c2ab;
  --sage-soft: #d8dfce;
  --forest: #2f4a3a;
  --forest-deep: #1f3327;
  --gold: #b08a3e;
  --gold-soft: #d9c08a;
  --ink: #2a2a25;
  --ink-soft: #5a5a52;
  --line: #e2dccf;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(47, 74, 58, 0.06);
  --shadow-md: 0 12px 36px rgba(47, 74, 58, 0.10);
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  font-size: 16px;
  background-image:
    radial-gradient(rgba(176,138,62,0.04) 1px, transparent 1px),
    radial-gradient(rgba(47,74,58,0.03) 1px, transparent 1px);
  background-size: 32px 32px, 48px 48px;
  background-position: 0 0, 16px 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--forest); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; color: var(--forest-deep); letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .4em; }
.serif-italic { font-style: italic; font-weight: 500; color: var(--gold); }

.eyebrow {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.eyebrow.centered { justify-content: center; }
.eyebrow .dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; display: inline-block; }

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 244, 236, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px;
  color: var(--forest-deep);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--gold-soft);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.primary-nav { display: flex; gap: 28px; }
.primary-nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  position: relative;
}
.primary-nav a:hover { color: var(--forest); }
.primary-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--gold); transition: width .25s var(--ease);
}
.primary-nav a:hover::after { width: 100%; }
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line); color: var(--forest);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}
.display {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 14px;
}
.tagline {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--gold);
  margin: 0 0 18px;
}
.lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 540px; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .25s var(--ease);
  text-decoration: none;
}
.btn-primary {
  background: var(--forest-deep); color: var(--ivory);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--forest); color: var(--ivory); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--forest-deep);
  border-color: var(--forest-deep);
}
.btn-ghost:hover { background: var(--forest-deep); color: var(--ivory); }
.btn-mini {
  padding: 9px 16px; font-size: 13px; border-radius: 999px;
  background: var(--ivory-2); color: var(--forest-deep);
  border: 1px solid var(--line);
}
.btn-mini:hover { background: var(--forest-deep); color: var(--ivory); border-color: var(--forest-deep); }

/* QR Cards */
.qr-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.qr-card--hero { max-width: 360px; margin-left: auto; }
.qr-card .qr-image {
  width: 100%; height: auto; border-radius: var(--radius);
  background: #fff;
}
.qr-card-caption {
  margin: 14px 0 0; text-align: center;
  font-size: 13px; color: var(--ink-soft);
  font-family: 'Fraunces', serif; font-style: italic;
}

.hero-divider { color: var(--line); margin-top: 40px; }
.hero-divider svg { width: 100%; height: 12px; }

/* ============ SECTIONS ============ */
.section { padding: 80px 0; }
.section-alt { background: linear-gradient(180deg, var(--ivory-2) 0%, var(--ivory) 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-sub { color: var(--ink-soft); font-size: 1.02rem; }

/* ============ STEPS ============ */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.step-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sage);
}
.step-number {
  font-family: 'Fraunces', serif; font-style: italic;
  color: var(--gold); font-size: 14px; letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.step-icon { font-size: 32px; margin-bottom: 10px; }
.step-title { font-size: 1.3rem; }
.step-desc { color: var(--ink-soft); font-size: 0.96rem; margin: 0 0 14px; }
.step-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--forest);
  padding: 8px 16px; border-radius: 999px;
  background: var(--sage-soft); border: 1px solid var(--sage);
  transition: all .25s var(--ease);
}
.step-link:hover {
  background: var(--forest-deep); color: var(--ivory); border-color: var(--forest-deep);
  box-shadow: 0 4px 12px rgba(176,138,62,0.25);
}

.step-card--locked { background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%); }
.lock-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  background: var(--ivory); border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 5px 11px; border-radius: 999px;
  letter-spacing: 0.05em;
}
.lock-pill.inline { vertical-align: middle; margin-left: 8px; }

/* ============ WORKSHEET ============ */
.worksheet {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-md);
  max-width: 820px; margin: 0 auto;
}
.ws-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.ws-field { display: flex; flex-direction: column; gap: 6px; }
.ws-label { font-size: 12px; font-weight: 600; color: var(--forest); letter-spacing: 0.08em; text-transform: uppercase; }
.ws-field input, .ws-question textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--ivory); color: var(--ink);
  font-family: 'Inter', sans-serif; font-size: 15px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
  resize: vertical;
}
.ws-field input:focus, .ws-question textarea:focus {
  outline: none; border-color: var(--forest); background: var(--white);
  box-shadow: 0 0 0 3px rgba(47,74,58,0.08);
}

.ws-question { border: none; padding: 0; margin: 0 0 28px; }
.ws-question legend {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.25rem; color: var(--forest-deep);
  margin-bottom: 8px;
}
.q-num {
  display: inline-block; background: var(--forest-deep); color: var(--gold-soft);
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 6px; margin-right: 10px;
  vertical-align: middle;
}
.q-help { color: var(--ink-soft); font-size: 0.94rem; margin: 0 0 10px; }

.ws-question--locked textarea { opacity: 0.5; background: var(--ivory-2); }
.ws-question--locked.unlocked textarea { opacity: 1; background: var(--ivory); }
.ws-question--locked.unlocked .lock-pill { display: none; }
#ws-unlock { margin-top: 10px; }
.ws-question--locked.unlocked #ws-unlock { display: none; }

.ws-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid var(--line); margin-top: 6px;
}
.ws-share {
  margin-top: 28px; padding-top: 20px; border-top: 1px dashed var(--line);
}
.ws-share-label {
  font-size: 13px; font-weight: 600; color: var(--forest);
  margin: 0 0 12px; letter-spacing: 0.05em;
}
.ws-share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--ivory-2); border: 1px solid var(--line);
  font-size: 13px; color: var(--forest-deep);
  cursor: pointer; transition: all .2s var(--ease);
  font-family: 'Inter', sans-serif;
}
.chip:hover { background: var(--forest-deep); color: var(--ivory); border-color: var(--forest-deep); }

.ws-celebrate {
  margin-top: 28px; padding: 24px;
  background: linear-gradient(135deg, var(--sage-soft) 0%, var(--ivory-2) 100%);
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  text-align: center;
  animation: fadeUp .5s var(--ease);
}
.celebrate-line { font-family: 'Fraunces', serif; font-size: 1.6rem; color: var(--forest-deep); margin: 0 0 6px; }
.celebrate-sub { color: var(--ink-soft); margin: 0; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ QR GALLERY ============ */
.qr-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.qr-card--gallery {
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.qr-card--gallery:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(47, 74, 58, 0.14); }
.qr-card-meta h3 { font-size: 1.15rem; margin: 0 0 4px; }
.qr-card-meta p { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 12px; }

/* ============ RESOURCE CARD ============ */
.resource-card {
  display: flex; align-items: center; gap: 24px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px; max-width: 760px; margin: 0 auto;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.resource-icon {
  width: 60px; height: 60px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--gold-soft); display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.resource-body h3 { margin: 0 0 6px; }
.resource-body p { color: var(--ink-soft); margin: 0 0 8px; font-size: 0.96rem; }
.resource-cta { font-size: 13px; font-weight: 600; color: var(--gold); display: inline-flex; align-items: center; gap: 6px; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--forest-deep); color: var(--ivory-2);
  padding: 50px 0 30px; margin-top: 40px;
  position: relative;
}
.footer-inner { text-align: center; }
.footer-share {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 1.15rem; color: var(--gold-soft); margin: 0 0 8px;
}
.footer-link { color: var(--ivory); text-decoration: underline; text-underline-offset: 4px; }
.footer-link:hover { color: var(--gold-soft); }
.footer-copy { font-size: 12px; color: var(--sage); margin-top: 24px; letter-spacing: 0.05em; }

.back-to-top {
  position: absolute; right: 24px; bottom: 24px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold); color: var(--forest-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; box-shadow: var(--shadow-md);
  transition: transform .2s var(--ease);
}
.back-to-top:hover { transform: translateY(-3px); color: var(--forest-deep); background: var(--gold-soft); }

/* ============ REVEAL ANIMATIONS ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .qr-card--hero { margin: 0 auto; }
  .primary-nav {
    position: absolute; top: 70px; left: 0; right: 0;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: 12px 24px;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .primary-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .ws-row { grid-template-columns: 1fr; }
  .worksheet { padding: 24px; }
  .resource-card { flex-direction: column; text-align: center; }
}

/* ============ PRINT ============ */
@media print {
  .site-header, .hero, #qr-cards, #resources, .site-footer,
  .ws-actions, .ws-share, .nav-toggle, .back-to-top, .hero-divider {
    display: none !important;
  }
  body { background: #fff; }
  .section-alt { background: #fff; border: none; }
  .worksheet { box-shadow: none; border-color: #ccc; }
  .ws-question textarea { border-color: #999; min-height: 80px; }
}
