/* ==========================================================================
   Olivia Hodson Cancer Fund - application system
   Brand colours are taken from ohcf.org so the form feels like the site.
   ========================================================================== */

:root {
  --navy:        #012858;
  --navy-light:  #1a4a7a;
  --navy-50:     #eaeff5;
  --pink:        #e66270;
  --pink-hover:  #d14d5b;
  --pink-light:  #fce8ea;
  --blue:        #a8d5e2;
  --blue-light:  #d4eef5;
  --blue-bg:     #edf7fa;
  --teal:        #2a9d8f;
  --teal-light:  #e0f5f1;
  --amber:       #d4860b;
  --amber-light: #fef3e2;
  --purple:      #7c3aed;
  --purple-light:#ede9fe;
  --green:       #15803d;
  --green-light: #dcfce7;
  --red:         #b91c1c;
  --red-light:   #fee2e2;

  --ink:         #374151;
  --ink-light:   #6b7280;
  --ink-faint:   #9ca3af;
  --line:        #e5e7eb;
  --surface:     #ffffff;
  --radius:      8px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Must outrank .btn { display: inline-flex } and friends. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: Lato, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--blue-bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1240px; }

h1, h2, h3, h4 { color: var(--navy); font-weight: 900; line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 16px; }
a  { color: var(--pink); }
a:hover { color: var(--pink-hover); }

/* --- Header / footer ----------------------------------------------------
   Mirrors the lockup on ohcf.org: the bunny mark and wordmark on the left,
   then a rule and the "special purpose fund at" GOSH credit.  The logo files
   are optional - see public/assets/images/README.md - and the lockup falls
   back to the wordmark alone when they are absent.
   ------------------------------------------------------------------------ */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 96px; flex-wrap: wrap;
}

.brand-lockup { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { height: 66px; width: auto; display: block; }
.brand-name {
  font-size: 15px; font-weight: 900; color: var(--navy);
  text-transform: uppercase; letter-spacing: .045em; line-height: 1.25;
}

.brand-partner {
  display: flex; align-items: center; gap: 10px;
  padding-left: 20px; border-left: 1px solid var(--line);
}
.brand-partner-label {
  font-size: 10px; font-weight: 700; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: .12em; line-height: 1.3;
}
.brand-partner-mark {
  height: 54px; width: auto; display: block;
  opacity: .6; transition: opacity .2s;
}
.brand-partner-mark:hover { opacity: 1; }

.header-nav { display: flex; gap: 4px; }
.header-nav a {
  padding: 8px 14px; font-size: 13px; font-weight: 700;
  color: var(--navy); text-decoration: none; border-radius: 4px;
}
.header-nav a:hover { color: var(--pink); background: var(--blue-bg); }

.page { padding: 36px 20px 64px; }

.site-footer { background: var(--navy); color: rgba(255,255,255,.42); margin-top: auto; font-size: 14px; }

.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px; padding-top: 44px; padding-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-mark { height: 40px; width: auto; filter: brightness(0) invert(1); opacity: .5; }
.footer-name {
  font-size: 12px; font-weight: 900; color: rgba(255,255,255,.6);
  text-transform: uppercase; letter-spacing: .045em; line-height: 1.3;
}
.footer-blurb { max-width: 24rem; margin: 0; }

.site-footer h4 {
  font-size: 11px; font-weight: 900; color: rgba(255,255,255,.6);
  text-transform: uppercase; letter-spacing: .09em; margin: 0 0 12px;
}
.site-footer ul { list-style: none; margin: 0 0 16px; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.62); text-decoration: none; }
.site-footer a:hover { color: var(--pink); }
.footer-partner-mark {
  height: 34px; width: auto; filter: brightness(0) invert(1);
  opacity: .4; transition: opacity .2s;
}
.footer-partner-mark:hover { opacity: .7; }

.footer-bar { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bar p { margin: 0; padding: 16px 0; font-size: 12px; }

/* --- Cards -------------------------------------------------------------- */

.card {
  background: var(--surface); border-radius: var(--radius);
  padding: 28px; margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-tight { padding: 20px; }
.card-accent { border-left: 4px solid var(--pink); }

.lede { font-size: 17px; color: var(--ink-light); }

/* --- Deadline banner ---------------------------------------------------- */

.deadline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 20px;
}
.deadline-round { font-weight: 900; font-size: 17px; }
.deadline-when  { color: var(--blue); font-weight: 700; font-size: 14px; }
.deadline-closed { background: var(--ink-light); }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: 0; border-radius: 4px;
  background: var(--pink); color: #fff;
  font: inherit; font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--pink-hover); color: #fff; }
.btn:disabled { background: var(--ink-faint); cursor: not-allowed; }
.btn-secondary { background: var(--navy-50); color: var(--navy); }
.btn-secondary:hover { background: #dde5ef; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--navy-50); color: var(--navy); }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-danger:hover { background: #fecaca; color: var(--red); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row-split { justify-content: space-between; }

/* --- Forms -------------------------------------------------------------- */

.field { margin-bottom: 26px; }
.field:last-child { margin-bottom: 0; }

.field label.field-label {
  display: block; font-weight: 700; color: var(--navy);
  margin-bottom: 6px; font-size: 15px;
}
.field .help { font-size: 13.5px; color: var(--ink-light); margin: 0 0 8px; }
.required-star { color: var(--pink); }
.optional { font-weight: 400; color: var(--ink-faint); font-size: 13px; }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid #d1d5db; border-radius: 6px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--navy-light);
}
.field-error input, .field-error select, .field-error textarea { border-color: var(--pink); background: #fffafa; }
.error-text { color: var(--red); font-size: 13.5px; font-weight: 700; margin: 6px 0 0; }

.input-prefix { display: flex; align-items: stretch; }
.input-prefix span {
  display: flex; align-items: center; padding: 0 12px;
  background: var(--navy-50); border: 1px solid #d1d5db; border-right: 0;
  border-radius: 6px 0 0 6px; font-weight: 700; color: var(--navy);
}
.input-prefix input { border-radius: 0 6px 6px 0; }
.input-suffix { display: flex; align-items: center; gap: 10px; }
.input-suffix input { max-width: 140px; }
.input-suffix span { color: var(--ink-light); font-size: 14px; }

.checkbox { display: flex; gap: 12px; align-items: flex-start; }
.checkbox input { margin-top: 5px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--pink); }
.checkbox label { font-weight: 400; font-size: 14.5px; }

.counter { font-size: 12.5px; color: var(--ink-faint); text-align: right; margin-top: 4px; }
.counter.over { color: var(--red); font-weight: 700; }

/* --- Step navigation ---------------------------------------------------- */

.steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; padding: 0; list-style: none; }
.steps li { flex: 1 1 auto; }
.steps a, .steps span {
  display: block; text-align: center; padding: 9px 8px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  border-radius: 6px; background: #fff; color: var(--ink-light);
  border: 1px solid var(--line);
}
.steps .is-current a, .steps .is-current span { background: var(--navy); color: #fff; border-color: var(--navy); }
.steps .is-done a { background: var(--teal-light); color: var(--teal); border-color: transparent; }
.step-count { font-size: 13px; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: .08em; }

/* --- Flash messages ----------------------------------------------------- */

.flash {
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px;
  font-size: 14.5px; font-weight: 700; border-left: 4px solid;
}
.flash-success { background: var(--teal-light); border-color: var(--teal); color: #17635a; }
.flash-error   { background: var(--red-light);  border-color: var(--red);  color: #8e1616; }
.flash-info    { background: var(--blue-light); border-color: var(--navy-light); color: var(--navy); }

.error-summary { background: var(--red-light); border-left: 4px solid var(--red); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; }
.error-summary h2 { color: #8e1616; font-size: 15px; margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-left: 18px; font-size: 14px; }
.error-summary a { color: #8e1616; }

/* --- Attachments -------------------------------------------------------- */

.file-list { list-style: none; margin: 0 0 16px; padding: 0; }
.file-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; background: var(--navy-50); border-radius: 6px; margin-bottom: 8px;
  font-size: 14px;
}
.file-meta { color: var(--ink-light); font-size: 12.5px; }

/* --- Review / summary --------------------------------------------------- */

.summary { margin: 0; }
.summary div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary dt { font-weight: 700; color: var(--navy); font-size: 14px; margin-bottom: 4px; }
.summary dd { margin: 0; white-space: pre-wrap; font-size: 15px; }
.summary dd.empty { color: var(--ink-faint); font-style: italic; }

/* --- Utility ------------------------------------------------------------ */

.muted { color: var(--ink-light); }
.small { font-size: 13.5px; }
.mono  { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 24px; } .mb-3 { margin-bottom: 24px; }
.reference {
  display: inline-block; padding: 6px 14px; border-radius: 6px;
  background: var(--navy); color: #fff; font-weight: 900; letter-spacing: .04em;
}
.divider { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .header-inner { min-height: 0; padding-top: 14px; padding-bottom: 14px; gap: 10px; }
  .brand-mark { height: 52px; }
  .brand-partner { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .card { padding: 20px; }
  .page { padding: 24px 16px 48px; }
  .steps a, .steps span { font-size: 11px; padding: 8px 4px; }
  .btn { width: 100%; }
  .btn-row-split { flex-direction: column-reverse; }
}
