/* The Weekly Check-In - Craig Gibson / The Architect Method (client page) */

:root {
  --black: #0A0A0A;
  --charcoal: #2A2A2A;
  --gold: #C9A961;
  --gold-soft: rgba(201, 169, 97, 0.12);
  --gold-mid: rgba(201, 169, 97, 0.30);
  --off-white: #F5F2EC;
  --white: #FFFFFF;
  --text: #0A0A0A;
  --text-muted: rgba(10, 10, 10, 0.62);
  --text-on-dark: #F5F2EC;
  --text-muted-on-dark: rgba(245, 242, 236, 0.66);
  --border: rgba(10, 10, 10, 0.10);
  --danger: #B4452F;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.hide { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--black);
  background: var(--gold);
  border: none;
  border-radius: var(--radius);
  padding: 1rem 2.2rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--ease) 0.2s, box-shadow var(--ease) 0.2s, background 0.2s;
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.28);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(201, 169, 97, 0.36); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.btn-block { display: block; width: 100%; max-width: 420px; margin: 1.25rem auto 0; }

/* ---------- Header ---------- */
.header { border-bottom: 1px solid var(--border); background: var(--white); }
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo { height: 30px; width: auto; }
.header-tag {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- Views / Hero ---------- */
.view { min-height: calc(100vh - 130px); }
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}
.lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.3rem;
}
.hero-fine { margin-top: 1.5rem; font-size: 0.88rem; color: var(--text-muted); }

/* ---------- Progress ---------- */
.progress { border-bottom: 1px solid var(--border); background: var(--white); position: sticky; top: 0; z-index: 5; }
.progress-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.progress-track { flex: 1; height: 6px; background: var(--gold-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 20%; background: var(--gold); border-radius: 999px; transition: width 0.4s var(--ease); }
.progress-count { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

/* ---------- Panels ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 2.8rem 1.5rem 4rem; }
.panel { animation: fadeUp 0.35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.panel-tag {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.panel-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.8vw, 2.3rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.panel-intro { color: var(--text-muted); font-size: 1.0rem; margin-bottom: 2rem; }

/* ---------- Form fields ---------- */
.field { margin-bottom: 1.8rem; }
.field-q {
  display: block;
  font-size: 1.0rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.7rem;
  line-height: 1.45;
}
.field-hint { font-size: 0.84rem; color: var(--text-muted); margin: -0.3rem 0 0.7rem; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  padding: 0.9rem 1.05rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.18s;
}
.form-textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--gold); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23C9A961' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1.1rem center; padding-right: 2.6rem; }
.form-error { color: var(--danger); font-size: 0.86rem; margin-top: 0.6rem; }

/* Money input with prefix */
.money-wrap { position: relative; max-width: 220px; }
.money-wrap::before { content: "£"; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 500; }
.money-wrap .form-input { padding-left: 1.9rem; }

/* Yes / No toggle */
.toggle { display: inline-flex; gap: 0.6rem; }
.toggle-btn {
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.toggle-btn:hover { border-color: var(--gold-mid); }
.toggle-btn.on { border-color: var(--gold); background: var(--gold-soft); font-weight: 600; }
.toggle-btn.on::before { content: "\2713  "; color: var(--gold); }

/* Conditional reveal */
.reveal { margin-top: 1.1rem; }

/* ---------- Step nav ---------- */
.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; }
.btn-next { padding: 0.9rem 2.4rem; }
.nav-back {
  background: none; border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0.4rem 0;
}
.nav-back:hover { color: var(--gold); }
.nav-back.invisible { visibility: hidden; }

/* ---------- Loading ---------- */
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; padding: 2rem; text-align: center; }
.spinner {
  width: 46px; height: 46px;
  border: 3px solid var(--gold-soft);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-muted); font-size: 1rem; }

/* ---------- Report (after submit) ---------- */
.report { max-width: 580px; margin: 0 auto; padding: 3.2rem 1.5rem 4.5rem; }
.report-top { text-align: center; margin-bottom: 2.2rem; }
.report-top .eyebrow { margin-bottom: 1rem; }
.done-mark {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--gold-soft); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.4rem; font-size: 1.7rem; color: var(--gold);
}
.report-top h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; margin-bottom: 0.7rem;
}
.report-top #done-line { color: var(--text-muted); font-size: 1.02rem; }

.report-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem; margin-bottom: 1.2rem;
}
.report-card.reflection { background: var(--black); border-color: var(--black); }
.report-card-title {
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 1.1rem;
}

/* glance */
.glance { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.glance-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.glance-val { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--text); overflow-wrap: anywhere; }
.glance-lbl { font-size: 0.76rem; color: var(--text-muted); }
.glance-quote {
  margin-top: 1.4rem; padding: 0.9rem 0 0.3rem 1.1rem; border-left: 3px solid var(--gold);
  font-family: var(--font-display); font-style: italic; font-size: 1.08rem; line-height: 1.5; color: var(--text);
}

/* reflection (on dark) */
.reflection .report-card-title { color: var(--gold); }
.reflection-loading { display: flex; align-items: center; gap: 0.7rem; color: var(--text-muted-on-dark); font-size: 0.95rem; }
.spinner-sm { width: 18px; height: 18px; border: 2px solid rgba(245,242,236,0.2); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
.reflection-headline { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.3; color: var(--off-white); margin-bottom: 0.9rem; }
.reflection-para { color: var(--text-muted-on-dark); font-size: 1.0rem; line-height: 1.7; margin-bottom: 0.8rem; }
.reflection-focus {
  margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid rgba(245,242,236,0.14);
  color: var(--off-white); font-size: 0.98rem; line-height: 1.6; display: flex; flex-direction: column; gap: 0.35rem;
}
.focus-label { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.report-foot { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin: 1.8rem auto 0; max-width: 440px; }
.report .btn { display: block; max-width: 340px; margin: 1.6rem auto 0; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 2.5rem 1.5rem; color: var(--text-muted); font-size: 0.82rem; letter-spacing: 0.04em; }

@media (max-width: 520px) {
  .hero { padding: 3rem 1.25rem 3.5rem; }
  .btn-block, .hero .btn { width: 100%; max-width: 360px; }
  .btn-next { flex: 1; padding: 0.9rem 1rem; text-align: center; }
}
