/* The Journey Church - Discipleship Operating System
   Palette and type come from app/brand.py. Do not hardcode hex values here. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bone);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: "Montserrat", "Inter", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.wrap { width: min(1120px, 92vw); margin: 0 auto; }
.narrow { width: min(720px, 92vw); margin: 0 auto; }
.eyebrow {
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.9rem;
}
.eyebrow.dark { color: var(--moss); }
.muted { color: rgba(26, 26, 26, 0.62); }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.forest { background: var(--forest); color: var(--bone); }
.section.forest .muted { color: rgba(242, 240, 231, 0.68); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-weight: 600; font-size: 0.9rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.gold { background: var(--gold); color: var(--forest); }
.btn.forest { background: var(--forest); color: var(--bone); }
.btn.ghost { border-color: currentColor; background: transparent; }
.btn.small { padding: 0.5rem 1rem; font-size: 0.8rem; }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: var(--forest); color: var(--bone);
}
.masthead .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.85rem 0;
}
.masthead img { height: 42px; width: auto; display: block; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.nav a {
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; color: rgba(242, 240, 231, 0.82);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }

@media (max-width: 820px) {
  .masthead .wrap { flex-wrap: wrap; gap: 0.7rem 1rem; }
  .masthead img { height: 34px; }
  .nav { width: 100%; margin-left: 0; gap: 1rem; flex-wrap: wrap; }
  .nav a { font-size: 0.74rem; }
  .nav .btn { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero {
  background: var(--forest); color: var(--bone);
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  position: relative; overflow: hidden;
}
.hero h1 { max-width: 16ch; }
.hero .accent { color: var(--gold); }
.hero p { max-width: 46ch; font-size: 1.08rem; color: rgba(242, 240, 231, 0.78); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
/* Signature element: the winding path from the logo mark, used as the
   structural motif for a church whose whole product is a journey. */
.hero .trail {
  position: absolute; right: -6%; top: 0; height: 100%; width: 40%;
  opacity: 0.5; pointer-events: none;
}
@media (max-width: 780px) { .hero .trail { display: none; } }

/* ---------- cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid rgba(47, 62, 36, 0.12);
  border-radius: 14px;
  padding: 1.6rem;
}
.card h3 { margin-bottom: 0.4rem; }
.card .btn { margin-top: 0.8rem; }
.card.flag { border-left: 4px solid var(--gold); }

.values { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.values span {
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.5rem 0.9rem; border-radius: 999px;
  border: 1px solid rgba(242, 240, 231, 0.28);
}

/* ---------- forms ---------- */
.form { display: grid; gap: 1rem; max-width: 560px; }
.field label {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 0.8rem 0.9rem;
  font-family: inherit; font-size: 1rem;
  border: 1px solid rgba(47, 62, 36, 0.25);
  border-radius: 10px; background: var(--white); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.flash {
  padding: 0.9rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem;
  border-left: 4px solid var(--gold); background: var(--white);
  font-size: 0.92rem;
}

/* ---------- giving embed ---------- */
.embed {
  background: var(--white); border-radius: 14px;
  border: 1px solid rgba(47, 62, 36, 0.12); overflow: hidden;
}
.embed iframe { display: block; width: 100%; min-height: 760px; border: 0; }
.embed .fallback { padding: 2rem; text-align: center; }

/* ---------- staff dashboard ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } }
.side {
  background: var(--forest); color: var(--bone);
  padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 0.25rem;
}
.side img { height: 38px; margin-bottom: 1.4rem; }
.side a {
  display: block; padding: 0.62rem 0.85rem; border-radius: 9px;
  font-size: 0.9rem; font-weight: 500; text-decoration: none;
  color: rgba(242, 240, 231, 0.76);
}
.side a:hover { background: rgba(242, 240, 231, 0.08); color: var(--bone); }
.side a.on { background: var(--gold); color: var(--forest); font-weight: 600; }
.side .spacer { flex: 1; }
.main { padding: clamp(1.4rem, 3vw, 2.4rem); background: var(--bone); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat { background: var(--white); border-radius: 12px; padding: 1.1rem 1.2rem; border: 1px solid rgba(47, 62, 36, 0.12); }
.stat .n { font-family: "Montserrat", sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; }
.stat .l { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(26, 26, 26, 0.55); margin-top: 0.35rem; }
.stat.alert .n { color: #B45309; }

/* the journey rail: the same trail motif, as data */
.rail { display: flex; gap: 0.5rem; align-items: flex-end; background: var(--white); border: 1px solid rgba(47, 62, 36, 0.12); border-radius: 12px; padding: 1.3rem; overflow-x: auto; }
.rail .step { flex: 1 1 0; min-width: 108px; text-align: left; }
.rail .bar { height: 8px; border-radius: 999px; background: var(--moss); margin-bottom: 0.55rem; }
.rail .step .name { font-family: "Montserrat", sans-serif; font-size: 0.78rem; font-weight: 600; }
.rail .step .n { font-size: 1.35rem; font-weight: 700; font-family: "Montserrat", sans-serif; }
.rail .step .stuck { font-size: 0.72rem; color: #B45309; font-weight: 600; }

table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid rgba(47, 62, 36, 0.1); font-size: 0.92rem; }
th { font-family: "Montserrat", sans-serif; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(26, 26, 26, 0.55); }
tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 0.22rem 0.7rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; background: rgba(72, 91, 56, 0.12); }
.pill.warn { background: #FDF3E3; color: #B45309; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0.8rem 0 0.8rem 1.1rem; border-left: 2px solid rgba(47, 62, 36, 0.15); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 1.15rem; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.timeline .when { font-size: 0.76rem; color: rgba(26, 26, 26, 0.5); }

/* ---------- member app ---------- */
.appbar { background: var(--forest); color: var(--bone); padding: 1rem 0; }
.appbar .wrap { display: flex; align-items: center; gap: 1rem; }
.appbar img { height: 34px; }
.tabbar { position: sticky; bottom: 0; background: var(--white); border-top: 1px solid rgba(47, 62, 36, 0.12); display: flex; }
.tabbar a { flex: 1; text-align: center; padding: 0.9rem 0.4rem; font-size: 0.76rem; font-weight: 600; text-decoration: none; font-family: "Montserrat", sans-serif; color: rgba(26, 26, 26, 0.55); }
.tabbar a.on { color: var(--forest); box-shadow: inset 0 3px 0 var(--gold); }

.steps { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.steps li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.9rem 0; border-bottom: 1px solid rgba(47, 62, 36, 0.1); }
.steps .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--moss); margin-top: 0.35rem; flex: none; }
.steps li.done .dot { background: var(--gold); border-color: var(--gold); }
.steps li.now .dot { background: var(--moss); box-shadow: 0 0 0 4px rgba(72, 91, 56, 0.18); }

/* ---------- footer ---------- */
.foot { background: var(--forest); color: rgba(242, 240, 231, 0.72); padding: 2.6rem 0; font-size: 0.9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: space-between; align-items: center; }
.foot a { color: rgba(242, 240, 231, 0.82); text-decoration: none; margin-right: 1rem; }
.foot a:hover { color: var(--gold); }

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