/* ==========================================================================
   Katrupa Mt.Zion — Design Tokens
   Palette: deep cooperative emerald + antique gold, on a warm paper ground.
   Type: Fraunces (display) / Public Sans (body) / IBM Plex Mono (figures).
   Signature: the "member passbook" ledger card in the hero.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  /* color */
  --paper: #FAF8F2;
  --paper-dim: #F2EFE5;
  --surface: #FFFFFF;
  --ink: #16231E;
  --ink-soft: #45534C;
  --muted-foreground: #6E7B73;
  --line: #E1DBC7;

  --forest-900: #0B2E24;
  --forest-800: #0E3B2E;
  --forest-700: #145C46;
  --forest-600: #1B7458;
  --forest-tint: #E7F0EA;

  --gold-500: #C9A227;
  --gold-400: #DDBB4C;
  --gold-300: #E8CD6B;
  --gold-tint: #FBF3DC;

  --ok: #1B7458;
  --pending: #B8860F;
  --rejected: #B23B3B;

  /* type */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 1px 2px rgba(11,46,36,0.06), 0 8px 24px -12px rgba(11,46,36,0.18);
  --shadow-lift: 0 16px 40px -16px rgba(11,46,36,0.32);
  --container: 1180px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.icon { width: 1.1em; height: 1.1em; }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.gold-shimmer {
  background: linear-gradient(100deg, var(--gold-500) 20%, var(--gold-300) 40%, var(--gold-500) 60%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: -220% center; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, var(--forest-700), var(--forest-800));
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-outline {
  background: transparent;
  color: var(--forest-800);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--forest-700); background: var(--forest-tint); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #0d1512; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; border-radius: 999px; }

/* ==========================================================================
   Site header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 242, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(150deg, var(--forest-700), var(--forest-900));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.logo.compact .logo-mark { width: 36px; height: 36px; font-size: 1.1rem; }
.logo-text .name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1; color: var(--ink); }
.logo-text .sub { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }

.main-nav { display: flex; gap: 34px; }
.main-nav a {
  font-size: 0.93rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 4px 0;
  transition: color .15s ease;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--gold-500); transition: width .2s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 22px; }
.header-actions .login { font-weight: 600; font-size: 0.93rem; color: var(--ink-soft); }
.header-actions .login:hover { color: var(--ink); }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.mobile-nav {
  display: none; flex-direction: column; gap: 2px; padding: 8px 24px 22px;
  border-top: 1px solid var(--line); background: var(--paper);
}
.mobile-nav a { padding: 12px 4px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-nav.open { display: flex; }

@media (max-width: 900px) {
  .main-nav, .header-actions .login { display: none; }
  .header-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 76px 24px 60px;
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: 56px;
  align-items: center;
  overflow: hidden;
}
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0; opacity: 0.35;
}
.hero-blob.one { width: 420px; height: 420px; background: var(--forest-600); top: -160px; left: -140px; }
.hero-blob.two { width: 340px; height: 340px; background: var(--gold-300); bottom: -140px; right: 6%; opacity: 0.3; }

.hero-copy { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--forest-700); background: var(--forest-tint);
  border: 1px solid rgba(11,59,46,0.14);
  padding: 7px 14px 7px 10px; border-radius: 999px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-tint); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 22px 0 18px;
  color: var(--ink);
}
.hero .lead {
  font-size: 1.08rem; line-height: 1.65; color: var(--ink-soft); max-width: 46ch; margin: 0 0 32px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

.hero-stats { display: flex; gap: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-stats .stat-value {
  font-family: var(--font-mono); font-weight: 600; font-size: 1.35rem; color: var(--forest-800);
}
.hero-stats .stat-label { font-size: 0.8rem; color: var(--muted-foreground); margin-top: 2px; }

/* --- Signature element: the member passbook --- */
.passbook-wrap { position: relative; z-index: 1; display: flex; justify-content: center; }
.passbook {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  border: 1px solid var(--line);
  transform: rotate(1.5deg);
}
.passbook-head {
  background: linear-gradient(155deg, var(--forest-800), var(--forest-900));
  color: #fff; padding: 26px 26px 22px; position: relative;
}
.passbook-head .p-eyebrow { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.65); font-weight: 600; }
.passbook-head .p-name { font-family: var(--font-display); font-size: 1.3rem; margin-top: 6px; }
.passbook-head .p-no { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; color: rgba(255,255,255,0.7); margin-top: 10px; }
.passbook-seal {
  position: absolute; top: 22px; right: 24px; width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px dashed var(--gold-400); display: flex; align-items: center; justify-content: center;
  color: var(--gold-300); font-family: var(--font-display); font-size: 1.1rem;
}
.passbook-body { padding: 6px 0; }
.passbook-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 26px; border-bottom: 1px dashed var(--line);
}
.passbook-row:last-child { border-bottom: none; }
.passbook-row .r-label { font-size: 0.88rem; color: var(--ink-soft); display: flex; align-items: center; gap: 9px; }
.passbook-row .r-label .icon { width: 17px; height: 17px; color: var(--forest-700); }
.passbook-row .r-value { font-family: var(--font-mono); font-weight: 600; font-size: 0.98rem; color: var(--ink); }
.passbook-perf {
  height: 14px;
  background-image: radial-gradient(circle, var(--paper) 4px, transparent 4.2px);
  background-size: 18px 14px;
  background-position: center;
  background-color: var(--surface);
}

/* ==========================================================================
   Trust strip
   ========================================================================== */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.trust-strip .container { display: flex; align-items: center; gap: 40px; padding: 22px 24px; overflow-x: auto; }
.trust-strip .t-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); white-space: nowrap; }
.trust-strip .t-item { font-family: var(--font-display); font-size: 1rem; color: var(--ink-soft); white-space: nowrap; }

/* ==========================================================================
   Features
   ========================================================================== */
.features {
  max-width: var(--container); margin: 0 auto; padding: 84px 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 30px 26px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: rgba(11,59,46,0.18); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--forest-tint); color: var(--forest-700);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.feature-icon .icon { width: 22px; height: 22px; }
.feature-card h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0 0 8px; }
.feature-card p { font-size: 0.93rem; color: var(--ink-soft); line-height: 1.6; margin: 0; }

/* ==========================================================================
   Programs
   ========================================================================== */
.programs { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.programs-inner { max-width: var(--container); margin: 0 auto; padding: 88px 24px; }
.section-head { max-width: 620px; margin-bottom: 46px; }
.section-head .eyebrow-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--forest-700); }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 10px 0 12px; font-weight: 600; }
.section-head p { color: var(--ink-soft); line-height: 1.65; margin: 0; }

.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.program-card {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px 26px;
  display: flex; flex-direction: column; background: var(--paper);
  transition: border-color .2s ease, transform .2s ease;
}
.program-card.featured { background: linear-gradient(165deg, var(--forest-800), var(--forest-900)); color: #fff; border-color: transparent; }
.program-card:hover { transform: translateY(-4px); }
.program-tier { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.program-rate { font-family: var(--font-mono); font-size: 2rem; font-weight: 600; margin: 14px 0 4px; }
.program-card.featured .program-rate { color: var(--gold-300); }
.program-note { font-size: 0.82rem; color: var(--muted-foreground); margin-bottom: 22px; }
.program-card.featured .program-note { color: rgba(255,255,255,0.65); }
.program-list { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.program-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.88rem; color: var(--ink-soft); }
.program-card.featured .program-list li { color: rgba(255,255,255,0.85); }
.program-list .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--forest-700); flex-shrink: 0; }
.program-card.featured .program-list .icon { color: var(--gold-300); }
.program-card .btn { margin-top: auto; justify-content: center; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  max-width: var(--container); margin: 88px auto; padding: 56px 48px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--forest-900), var(--forest-700));
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background: radial-gradient(500px 220px at 85% 0%, rgba(201,162,39,0.28), transparent 70%);
}
.cta-band h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 8px; position: relative; }
.cta-band p { margin: 0; color: rgba(255,255,255,0.75); max-width: 42ch; position: relative; }
.cta-band .btn-primary { background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); color: var(--ink); position: relative; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .container {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 40px 24px; flex-wrap: wrap;
}
.site-footer p { font-size: 0.85rem; color: var(--muted-foreground); margin: 0; }

/* ==========================================================================
   Motion
   ========================================================================== */
.animate-rise { opacity: 0; transform: translateY(16px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.animate-rise:nth-child(2) { animation-delay: .08s; }
.animate-rise:nth-child(3) { animation-delay: .16s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .passbook { transform: none; margin-top: 10px; }
  .features, .program-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 28px; }
}

/* ==========================================================================
   Dashboard shell
   ========================================================================== */
.dash-body { margin: 0; background: var(--paper-dim); font-family: var(--font-body); color: var(--ink); }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 264px; z-index: 60;
  background: linear-gradient(180deg, var(--forest-900), #0a251d);
  color: #fff; display: flex; flex-direction: column; padding: 22px 16px;
  transition: transform .25s ease;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 22px; }
.sidebar .logo-text .name { color: #fff; }
.sidebar-close { display: none; background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; color: rgba(255,255,255,0.68);
  font-family: var(--font-body); font-size: 0.93rem; font-weight: 500;
  padding: 12px 14px; border-radius: 10px; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: rgba(201,162,39,0.16); color: var(--gold-300); }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(11,46,36,0.4); z-index: 55; }

.dash-main { margin-left: 264px; min-height: 100vh; }
.dash-header {
  position: sticky; top: 0; z-index: 40; background: rgba(250,248,242,0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 18px 30px;
}
.dash-header .left { display: flex; align-items: center; gap: 16px; }
.dash-header h1 { font-family: var(--font-display); font-size: 1.35rem; margin: 0; font-weight: 600; }
.dash-header .welcome { margin: 2px 0 0; font-size: 0.86rem; color: var(--muted-foreground); }
.dash-header .right { display: flex; align-items: center; gap: 14px; }
.sidebar-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; }

.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-soft);
  transition: border-color .15s ease, color .15s ease;
}
.icon-btn:hover { border-color: var(--forest-700); color: var(--forest-800); }
.icon-btn .dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--forest-tint); color: var(--forest-800);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display);
}

.logout-btn.btn { border-color: var(--line); color: var(--rejected); }
.logout-btn.btn:hover { border-color: var(--rejected); background: rgba(178,59,59,0.08); }
.logout-btn.btn .icon { width: 16px; height: 16px; }
@media (max-width: 560px) {
  .logout-btn.btn { padding: 9px; }
  .logout-btn .logout-label { display: none; }
}

.dash-content { max-width: 1200px; margin: 0 auto; padding: 30px; display: flex; flex-direction: column; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 24px; box-shadow: var(--shadow-soft);
}
.card.accent { background: linear-gradient(155deg, var(--forest-800), var(--forest-900)); color: #fff; border: none; }
.card.accent .eyebrow-label { color: rgba(255,255,255,0.65); }
.card.tinted { background: linear-gradient(155deg, #fff, var(--forest-tint)); }
.card.side-accent { border-left: 3px solid var(--forest-700); }

.eyebrow-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 8px; }
.big-figure { font-family: var(--font-mono); font-size: 2rem; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.big-figure .unit { font-size: 0.85rem; font-weight: 500; color: var(--muted-foreground); font-family: var(--font-body); }
.mini-figure { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; margin: 4px 0 14px; display: flex; align-items: baseline; gap: 6px; }

.balance-actions { display: flex; gap: 10px; margin-top: 18px; }

.stat-triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-top: 1px dashed var(--line); padding-top: 14px; }
.stat-triple .label { font-size: 0.72rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.stat-triple .value { font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem; }
.text-ok { color: var(--ok); }
.text-pending { color: var(--pending); }
.text-rejected { color: var(--rejected); }

.vcard.small {
  border-radius: var(--radius-md); padding: 22px; height: 100%; min-height: 168px;
  background: linear-gradient(150deg, #1b2a24, #0a1712);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
}
.vcard.small::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(240px 140px at 100% 0%, rgba(201,162,39,0.25), transparent 70%);
}
.vcard .top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.vcard .title { font-family: var(--font-display); font-size: 1rem; }
.vcard .chip { width: 34px; height: 24px; border-radius: 5px; background: linear-gradient(155deg, var(--gold-300), var(--gold-500)); }
.vcard .number { font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: 0.12em; margin: 20px 0; position: relative; }
.vcard .details { display: flex; justify-content: space-between; position: relative; }
.vcard .label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.55); margin-bottom: 3px; }
.vcard .value { font-size: 0.85rem; font-weight: 600; }

.referral-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 16px; }
.referral-grid .r-label { font-size: 0.78rem; color: var(--muted-foreground); margin-bottom: 4px; }
.referral-grid .r-value { font-family: var(--font-mono); font-weight: 600; }

@media (max-width: 1080px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; }
  .sidebar-overlay.open { display: block; }
  .dash-main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .grid-3 { grid-template-columns: 1fr; }
}