/* ===========================================================================
   Ceci Bates VIP Referral Portal — base stylesheet
   Design tokens derived from cecibates.com (see docs/05-style-guide.md).
   NOTE: replace --font-display / --font-body and confirm exact hex values
   against the live site's CSS before launch. The distinctive page UIs are
   built on top of these tokens during the feature build.
   =========================================================================== */

:root {
  /* Neutrals */
  --ink:        #1a1a1a;
  --body:       #3f3f3f;
  --muted:      #8a8a8a;
  --line:       #e4e0d8;
  --bg:         #ffffff;
  --bg-cream:   #f5efe5;

  /* Brand darks */
  --navy:       #1f2d3d;

  /* Accents */
  --gold:       #bfa06a;
  --gold-dark:  #a8884f;
  --terracotta: #c0613a;
  --terracotta-dark: #a44f2d;

  /* Status palette */
  --status-done:    var(--gold);
  --status-current: var(--terracotta);
  --status-future:  #cfcabf;
  --status-stop:    #9a9a9a;

  /* Type */
  --font-display: Georgia, "Times New Roman", serif;            /* swap for site serif */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-hero:    clamp(2.4rem, 5vw, 4rem);
  --fs-h1:      clamp(1.9rem, 3.5vw, 2.6rem);
  --fs-h2:      1.5rem;
  --fs-body:    1.0625rem;
  --fs-small:   0.875rem;
  --fs-eyebrow: 0.75rem;
  --lh-body:    1.6;

  /* Space / shape */
  --space-1: 0.5rem; --space-2: 1rem; --space-3: 1.5rem;
  --space-4: 2rem;   --space-6: 3rem; --space-8: 4rem; --space-12: 6rem;
  --content-max: 1200px;
  --reading-max: 760px;
  --radius: 2px;
  --radius-card: 6px;
  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--body);
  background: var(--bg);
}
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 600; line-height: 1.15; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Layout */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-3); }
.reading { max-width: var(--reading-max); }
.section { padding: var(--space-8) 0; }

/* Eyebrow label */
.eyebrow {
  font-size: var(--fs-eyebrow);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 var(--space-2);
}

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px;
}
.brand { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: var(--space-3); align-items: center; }
.nav a {
  font-size: var(--fs-small); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink);
}

/* Buttons — primary matches the contact form's terracotta CTA */
.btn {
  display: inline-block; cursor: pointer; border: 0;
  font-family: var(--font-body); font-size: var(--fs-small);
  letter-spacing: .1em; text-transform: uppercase;
  padding: .85rem 1.8rem; border-radius: var(--radius);
  transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-dark); text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-dark); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; text-decoration: none; }

/* Forms — underline-style inputs (matches the site's public forms) */
.field { margin-bottom: var(--space-3); }
.field label {
  display: block; font-size: var(--fs-eyebrow); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .4rem;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--fs-body);
  color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  padding: .55rem 0; border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--terracotta);
  box-shadow: 0 1px 0 0 var(--terracotta);
}
.field .help { font-size: var(--fs-small); color: var(--muted); margin-top: .35rem; }
.field .error { font-size: var(--fs-small); color: #c0392b; margin-top: .35rem; }

/* Cards */
.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: var(--space-4);
}

/* Messages */
.messages { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.messages li {
  padding: .75rem 1rem; border-radius: var(--radius-card); margin-bottom: .5rem;
  font-size: var(--fs-small); border: 1px solid var(--line); background: var(--bg-cream);
}
.messages li.success { border-color: #bcd9bf; }
.messages li.error   { border-color: #e3b7b1; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); margin-top: var(--space-12);
  padding: var(--space-6) 0; color: var(--muted); font-size: var(--fs-small);
}

/* Utilities */
.rule { width: 48px; height: 2px; background: var(--terracotta); border: 0; margin: 0 0 var(--space-3); }
.text-muted { color: var(--muted); }
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); }

/* ===========================================================================
   Components (added for the agent build)
   =========================================================================== */

/* Nav logout button styled as a link */
.logout-form { display: inline; margin: 0; }
.navlink {
  background: none; border: 0; cursor: pointer; padding: 0;
  font-family: var(--font-body); font-size: var(--fs-small);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.navlink:hover { text-decoration: underline; }

/* Narrow centered column for auth / single forms */
.auth { max-width: 560px; margin: var(--space-8) auto; }
.form-actions { margin-top: var(--space-4); }

/* Page heading helper */
.page-head { margin: var(--space-6) 0 var(--space-4); }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: .25rem; }

/* Stat cards */
.stat-grid { display: flex; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-4) 0; }
.stat { flex: 1; min-width: 160px; border-left: 2px solid var(--terracotta); padding-left: var(--space-2); }
.stat .num { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; color: var(--ink); }
.stat .lbl { font-size: var(--fs-eyebrow); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .8rem .5rem; border-bottom: 1px solid var(--line); }
.table th { font-size: var(--fs-eyebrow); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.table tbody tr:hover td { background: #faf8f4; }

/* Status pill */
.pill {
  display: inline-block; font-size: var(--fs-eyebrow); letter-spacing: .06em;
  text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px;
  background: var(--bg-cream); color: var(--ink); border: 1px solid var(--line);
  white-space: nowrap;
}

/* Progress tracker */
.tracker { display: flex; gap: 0; margin: var(--space-4) 0 var(--space-6); }
.tracker .step { flex: 1; text-align: center; position: relative; }
.tracker .step .dot { width: 14px; height: 14px; border-radius: 50%; margin: 0 auto .55rem; background: var(--status-future); position: relative; z-index: 1; }
.tracker .step.done .dot { background: var(--status-done); }
.tracker .step.current .dot { background: var(--status-current); box-shadow: 0 0 0 4px rgba(192,97,58,.18); }
.tracker .step .lbl { font-size: var(--fs-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tracker .step.done .lbl, .tracker .step.current .lbl { color: var(--ink); }
.tracker .step::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--status-future); z-index: 0; }
.tracker .step:first-child::before { display: none; }
.tracker .step.done::before, .tracker .step.current::before { background: var(--status-done); }
@media (max-width: 640px) {
  .tracker { flex-direction: column; gap: .75rem; align-items: flex-start; }
  .tracker .step { display: flex; align-items: center; gap: .6rem; }
  .tracker .step .dot { margin: 0; }
  .tracker .step::before { display: none; }
}

/* Notice banner */
.banner { padding: 1rem 1.25rem; border-radius: var(--radius-card); background: var(--bg-cream); border: 1px solid var(--line); margin: var(--space-3) 0; }

/* Definition rows (referral detail) */
.dl { margin: 0; }
.dl .row { display: flex; gap: var(--space-3); padding: .55rem 0; border-bottom: 1px solid var(--line); }
.dl .row dt { flex: 0 0 200px; color: var(--muted); font-size: var(--fs-small); }
.dl .row dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .dl .row { flex-direction: column; gap: .15rem; } .dl .row dt { flex: none; } }
