/* ============================================================
   Balanced Pro — "private client stationery"
   Cream paper · deep ink navy · aged gold hairlines
   Cormorant Garamond (display) · Source Sans 3 (UI/forms)
   ============================================================ */

:root {
  --ink:        #1d2b3a;   /* deep ink navy — primary text & surfaces */
  --ink-deep:   #15202d;
  --ink-soft:   #5d6672;
  --paper:      #faf7f0;   /* cream page */
  --paper-warm: #f4efe3;   /* warmer panel cream */
  --card:       #fffdf8;   /* raised card */
  --gold:       #a8834b;   /* aged gold */
  --gold-soft:  #cfb98d;
  --line:       #e3dccb;   /* hairline */
  --line-dark:  #2e3f52;
  --green:      #33684b;
  --red:        #a04338;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:    'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16.5px;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* faint paper grain */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(29,43,58,0.028) 1px, transparent 1px);
  background-size: 5px 5px;
}
body > * { position: relative; z-index: 1; }

.wrap { max-width: 1020px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

h1, h2, h3, h4, .brand {
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}
h1 { font-size: 2.9rem; line-height: 1.12; margin-bottom: 1rem; }
h2 { font-size: 2rem;  margin: 2.5rem 0 1rem; }
h3 { font-size: 1.35rem; margin: 1.25rem 0 0.6rem; }

p { margin-bottom: 1rem; }
a { color: var(--ink); text-decoration-color: var(--gold-soft); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

main { flex: 1; padding: 3rem 1.5rem 5rem; }

/* --- small-caps label (the signature detail) --- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

/* --- Header: hairline top bar + engraved wordmark --- */
.site-header {
  background: var(--paper);
  border-top: 3px double var(--gold);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 1.4rem; padding-bottom: 1.3rem;
  flex-wrap: wrap; gap: 0.9rem;
}
.brand {
  font-size: 1.65rem; text-decoration: none; letter-spacing: 0.045em;
}
.brand em { font-style: normal; color: var(--gold); }
.main-nav { display: flex; gap: 1.7rem; flex-wrap: wrap; align-items: baseline; }
.main-nav a {
  text-decoration: none;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--ink); border-bottom-color: var(--gold); }
.nav-muted  { color: var(--ink-soft) !important; }
.nav-admin  { color: var(--gold) !important; }

/* --- Footer --- */
.site-footer {
  background: var(--ink-deep); color: #b9c2cd;
  padding: 3rem 0 2.5rem; margin-top: auto; font-size: 0.9rem;
  border-top: 3px double var(--gold);
}
.footer-brand {
  font-family: var(--display); font-size: 1.5rem;
  color: var(--gold-soft); margin-bottom: 0.6rem; letter-spacing: 0.04em;
}
.footer-legal { font-size: 0.76rem; color: #7d8998; margin-top: 1.2rem; line-height: 1.6; }

/* --- Flash messages --- */
.flash { padding: 0.9rem 1.2rem; border-radius: 2px; margin-top: 1.2rem; font-size: 0.95rem; border: 1px solid; }
.flash-success { background: #edf3ee; color: var(--green); border-color: #c4d6c9; }
.flash-error   { background: #f6ebe9; color: var(--red);   border-color: #e0c4bf; }
.flash-info    { background: #edf0f4; color: var(--ink);   border-color: #c9d2dc; }

/* --- Cards --- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2rem;
  margin: 1.1rem 0;
  box-shadow: 0 1px 0 rgba(29,43,58,0.03);
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* numbered offering panels (landing) */
.offering { position: relative; padding-top: 2.4rem; }
.offering .numeral {
  font-family: var(--display); font-size: 2.1rem; color: var(--gold);
  line-height: 1; display: block; margin-bottom: 0.75rem;
}
.offering::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 42px; height: 1px; background: var(--gold);
}

/* --- Forms --- */
form .field { margin-bottom: 1.15rem; }
label {
  display: block; font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 0.35rem; color: var(--ink);
}
label .req { color: var(--gold); }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 0.7rem 0.85rem;
  border: 1px solid #cfc7b2; border-radius: 2px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168,131,75,0.14);
}
.hint { font-size: 0.83rem; color: var(--ink-soft); margin-top: 0.3rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
p.hint { margin-bottom: 0.6rem; }

.btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.75rem 1.9rem; border-radius: 2px;
  font: 600 0.8rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; transition: all 0.18s ease;
}
.btn:hover { background: var(--ink-deep); color: var(--gold-soft); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #8d6c3a; border-color: #8d6c3a; color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.72rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* --- Tables --- */
table.data { width: 100%; border-collapse: collapse; background: var(--card); }
table.data th, table.data td {
  padding: 0.75rem 0.95rem; text-align: left;
  border-bottom: 1px solid var(--line); font-size: 0.93rem;
}
table.data th {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--paper-warm);
}
table.data tr:hover td { background: #fbf8f1; }

/* --- Status badges --- */
.badge {
  display: inline-block; padding: 0.24rem 0.8rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.badge-pending  { background: #f1e9d4; color: #79602c; }
.badge-active   { background: #e5ebf2; color: var(--ink); }
.badge-success  { background: #e8efe9; color: var(--green); }
.badge-shipped  { background: var(--ink); color: var(--gold-soft); }

/* --- Progress timeline --- */
.timeline { list-style: none; margin: 1.75rem 0; }
.timeline li {
  position: relative; padding: 0 0 1.5rem 2.3rem;
  border-left: 1px solid var(--line);
  margin-left: 0.55rem;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -0.5rem; top: 0.15rem;
  width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--line);
}
.timeline li.done::before  { background: var(--green); border-color: var(--green); }
.timeline li.now::before   { background: var(--gold);  border-color: var(--gold); box-shadow: 0 0 0 4px rgba(168,131,75,0.18); }
.timeline li.done { border-left-color: #b9ccbf; }
.timeline .t-label { font-weight: 600; color: var(--ink); }
.timeline .t-date  { font-size: 0.8rem; color: var(--ink-soft); }

/* --- Hero (landing) --- */
.hero { text-align: center; padding: 4.5rem 0 3.5rem; }
.hero h1 {
  font-size: 3.6rem; max-width: 760px; margin: 0 auto 1.3rem; font-weight: 500;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p.lead {
  font-family: var(--display); font-style: italic;
  font-size: 1.35rem; color: var(--ink-soft);
  max-width: 540px; margin: 0 auto 2.2rem;
}
.hero-rule {
  width: 64px; height: 1px; background: var(--gold);
  margin: 1.6rem auto; border: none; position: relative;
}
.hero-rule::after {
  content: '◆'; position: absolute; top: -0.62em; left: 50%;
  transform: translateX(-50%); color: var(--gold);
  font-size: 0.55rem; background: var(--paper); padding: 0 0.5em;
}
@media (max-width: 640px) { .hero h1 { font-size: 2.5rem; } }

/* discretion statement band (kept inside the content column to avoid
   horizontal overflow; the double-rule frame gives it presence) */
.statement {
  background: var(--ink-deep);
  color: #d8dee6;
  margin: 3.5rem 0 0;
  padding: 3.6rem 1.5rem;
  text-align: center;
  border-top: 3px double var(--gold);
  border-bottom: 3px double var(--gold);
}
.statement blockquote {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: 1.9rem; line-height: 1.4;
  max-width: 680px; margin: 0 auto;
  color: var(--gold-soft);
}
.statement .eyebrow { color: var(--gold); margin-bottom: 1.4rem; }
@media (max-width: 640px) { .statement blockquote { font-size: 1.4rem; } }

/* editorial pull-quote testimonials */
.pullquote {
  border-top: 1px solid var(--line);
  padding: 1.9rem 0.25rem 0.5rem;
}
.pullquote p.q {
  font-family: var(--display); font-style: italic;
  font-size: 1.22rem; line-height: 1.5; color: var(--ink);
}
.pullquote .attr {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold);
}

/* --- FAQ --- */
details.faq {
  background: var(--card); border: 1px solid var(--line); border-radius: 2px;
  padding: 1.1rem 1.4rem; margin-bottom: 0.65rem;
}
details.faq summary {
  font-family: var(--display); font-size: 1.15rem; color: var(--ink);
  cursor: pointer; list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; float: right; color: var(--gold); font-size: 1.35rem; line-height: 1; }
details.faq[open] summary::after { content: '\2212'; }
details.faq p { margin: 0.8rem 0 0.3rem; color: var(--ink-soft); font-size: 0.96rem; }

/* --- Books --- */
.book-card { display: flex; gap: 1.4rem; align-items: flex-start; }
.book-cover {
  width: 110px; min-width: 110px; aspect-ratio: 2/3;
  background: var(--ink-deep); color: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-family: var(--display); font-size: 0.85rem; padding: 0.7rem;
  border: 1px solid var(--line-dark); border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(29,43,58,0.12);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }

/* --- Search results --- */
.search-hit { border-left: 2px solid var(--gold); padding-left: 1.1rem; margin-bottom: 1.4rem; }
.search-hit mark { background: #eadfbf; padding: 0 2px; }

/* --- Locked feature --- */
.locked { opacity: 0.6; }
.lock-note {
  background: var(--paper-warm); border: 1px dashed var(--gold-soft); border-radius: 2px;
  padding: 1.05rem 1.3rem; font-size: 0.92rem; color: #79602c;
}

/* --- Admin --- */
.kv { display: grid; grid-template-columns: 210px 1fr; gap: 0.4rem 1.1rem; font-size: 0.95rem; }
.kv dt {
  font-weight: 600; font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); padding-top: 0.15rem;
}
.kv dd { margin: 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 0.55rem; } }

/* --- Payment page --- */
.price-line { font-family: var(--display); font-size: 1.9rem; color: var(--ink); }
.plan-option {
  display: block;
  border: 1px solid var(--line); border-radius: 2px;
  padding: 1.6rem; cursor: pointer; background: var(--card);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-option.selected { border-color: var(--gold); background: #fdfaf2; box-shadow: 0 0 0 1px var(--gold); }
.plan-option h3 { margin-top: 0.4rem; }

/* --- Auth pages --- */
.auth-card { max-width: 440px; margin: 2.5rem auto; }

/* --- PDF viewer --- */
.pdf-toolbar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.85rem; }
#pdf-canvas-holder { background: #232b34; border-radius: 2px; padding: 1.2rem; text-align: center; overflow: auto; }
#pdf-canvas-holder canvas { max-width: 100%; box-shadow: 0 6px 22px rgba(0,0,0,0.45); }

/* --- Blog --- */
.post { border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
.post h3 { margin: 0 0 0.3rem; }
.post h3 a { text-decoration: none; }
.post .post-meta {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.45rem;
}

/* --- Next Steps: checklist rows --- */
.checklist-row {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding: 0.9rem 0; border-bottom: 1px solid var(--line);
}
.checklist-row:last-child { border-bottom: none; }
.checklist-row input[type=checkbox] {
  width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--gold);
  flex-shrink: 0;
}
.checklist-row .title { font-weight: 600; color: var(--ink); }
.checklist-row.done .title { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--gold-soft); }
.checklist-row .desc { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.2rem; }

/* --- Next Steps: progress bar --- */
.progress-bar {
  height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 0.6rem 0 0.3rem;
}
.progress-bar > div { height: 100%; background: var(--gold); transition: width 0.4s ease; }
.progress-label { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.04em; }

/* --- Next Steps: asset inventory --- */
.asset-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.asset-row:last-child { border-bottom: none; }
.asset-row .a-type { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.asset-row .a-desc { font-weight: 600; }
.asset-row select.status-select {
  padding: 0.35rem 0.6rem; font-size: 0.82rem; width: auto;
}
@media (max-width: 620px) { .asset-row { grid-template-columns: 1fr; } }

.exemption-flag {
  display: inline-block; margin-top: 0.4rem; font-size: 0.78rem;
  color: #79602c; background: var(--paper-warm); border: 1px dashed var(--gold-soft);
  padding: 0.3rem 0.6rem; border-radius: 2px;
}

/* --- Next Steps: tip cards --- */
.tip-card { border-left: 2px solid var(--gold); padding-left: 1.1rem; margin-bottom: 1.5rem; }
.tip-card summary {
  cursor: pointer; font-family: var(--display); font-size: 1.15rem; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem;
}
.tip-card summary::-webkit-details-marker { display: none; }
.tip-card summary::after {
  content: '+ Read more'; flex-shrink: 0; font-family: var(--sans); font-size: 0.68rem;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold);
}
.tip-card[open] summary::after { content: '\2212 Close'; }
.tip-card .tip-summary { font-size: 0.9rem; color: var(--ink-soft); margin: 0.15rem 0 0; }
.tip-card .tip-body { margin-top: 0.75rem; font-size: 0.94rem; }

/* --- Binder tabs (dashboard/next-steps, clients with Family + Business) --- */
.binder-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.binder-tabs a {
  display: inline-block; padding: 0.7rem 1.1rem; margin-bottom: -1px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent;
}
.binder-tabs a.active { color: var(--ink); border-bottom-color: var(--gold); }
.binder-tabs a:hover { color: var(--gold); }

/* --- Next Steps: jump nav (mobile section shortcuts) --- */
.jump-nav {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.4rem;
}
.jump-nav a {
  display: inline-block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.4rem 0.95rem;
}
.jump-nav a:hover { border-color: var(--gold); color: var(--gold); }
#rules-worth-knowing, #checklist, #asset-inventory, #protection-tips { scroll-margin-top: 1.5rem; }

/* --- Next Steps: renewal notice --- */
.renewal-notice {
  background: var(--paper-warm); border: 1px solid var(--gold-soft); border-radius: 2px;
  padding: 1.1rem 1.4rem; margin-bottom: 1.25rem;
}

/* --- gentle page entrance --- */
@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise 0.5s ease both; }
  main > *:nth-child(2) { animation-delay: 0.06s; }
  main > *:nth-child(3) { animation-delay: 0.12s; }
  main > *:nth-child(4) { animation-delay: 0.18s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}
