/* RSI flyers — public one-page flyer styling.
   Standalone (does not load the portal stylesheet). --accent is set per flyer
   by an inline :root rule in the page head. Designed to read well on a phone,
   on a tablet in front of a customer, and on paper. */
:root {
  --rsi-blue:      #00529B;
  --rsi-blue-dark: #003E7E;
  --accent:        #6CB33F;
  --ink:           #1c2430;
  --muted:         #5a6b7b;
  --line:          #e2e8ef;
  --bg:            #eef2f6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 24px 16px;
  font-family: var(--font); line-height: 1.55; color: var(--ink);
  background: var(--bg);
}

/* Sheet ------------------------------------------------------------------ */
.flyer {
  max-width: 820px; margin: 0 auto; background: #fff;
  border-radius: 12px; box-shadow: 0 3px 18px rgba(0,40,90,.10);
  padding: 40px 44px 28px;
}

/* Header ----------------------------------------------------------------- */
.flyer-head { border-bottom: 4px solid var(--accent); padding-bottom: 18px; margin-bottom: 24px; }
.flyer-logo { max-height: 62px; width: auto; margin-bottom: 16px; }
.flyer-logo-text { font-weight: 600; color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.flyer-logo-text span {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-right: 8px;
  vertical-align: middle; border-radius: 50%; background: var(--rsi-blue); color: #fff;
  font-weight: 800; letter-spacing: .5px; border: 3px solid var(--accent);
}
.flyer-headline {
  margin: 0; font-size: 2.1rem; line-height: 1.15;
  color: var(--rsi-blue); letter-spacing: -.5px;
}
.flyer-sub { margin: 8px 0 0; font-size: 1.12rem; color: var(--muted); }

/* Body ------------------------------------------------------------------- */
.flyer-hero { margin: 0 0 24px; }
.flyer-hero img { width: 100%; height: auto; border-radius: 8px; display: block; }

.flyer-intro { font-size: 1.1rem; margin: 0 0 22px; }

.flyer-points { list-style: none; padding: 0; margin: 0 0 24px; }
.flyer-points li { position: relative; padding: 5px 0 5px 30px; }
.flyer-points li::before {
  content: ""; position: absolute; left: 4px; top: 12px;
  width: 9px; height: 15px; border: solid var(--accent);
  border-width: 0 3px 3px 0; transform: rotate(45deg);
}

.flyer-body { margin-bottom: 26px; }
.flyer-body h2, .flyer-body h3, .flyer-body h4 { color: var(--rsi-blue); margin: 22px 0 8px; line-height: 1.25; }
.flyer-body h2 { font-size: 1.35rem; } .flyer-body h3 { font-size: 1.15rem; } .flyer-body h4 { font-size: 1.02rem; }
.flyer-body p { margin: 0 0 12px; }
.flyer-body ul, .flyer-body ol { margin: 0 0 14px; padding-left: 22px; }
.flyer-body li { margin-bottom: 5px; }
.flyer-body img { max-width: 100%; height: auto; border-radius: 6px; }
.flyer-body a { color: var(--rsi-blue); }
.flyer-body blockquote {
  margin: 0 0 14px; padding: 8px 16px; border-left: 4px solid var(--accent);
  background: #f7faf4; color: var(--muted);
}
.flyer-body table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: .94rem; }
.flyer-body th, .flyer-body td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.flyer-body th { background: #f5f8fb; }

/* Call to action --------------------------------------------------------- */
.flyer-cta { margin: 0 0 28px; }
.btn-cta {
  display: inline-block; padding: 14px 30px; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 1.05rem;
  text-decoration: none;
}
.btn-cta:hover { filter: brightness(.92); }

/* Enquiry form ----------------------------------------------------------- */
.flyer-form {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 24px 26px; margin-bottom: 26px; background: #fafcfe;
}
.flyer-form h2 { margin: 0 0 16px; color: var(--rsi-blue); font-size: 1.3rem; }
.flyer-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.flyer-form input, .flyer-form textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px;
  border: 1px solid #c9d4de; border-radius: 7px; font: inherit; font-weight: 400; color: var(--ink);
  background: #fff;
}
.flyer-form input:focus, .flyer-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.flyer-form textarea { resize: vertical; }
.flyer-form .f-row { display: flex; gap: 16px; }
.flyer-form .f-row label { flex: 1 1 0; }
.flyer-form button {
  padding: 13px 30px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--rsi-blue); color: #fff; font-weight: 700; font-size: 1rem; font-family: inherit;
}
.flyer-form button:hover { background: var(--rsi-blue-dark); }
.form-ok  { margin: 0; padding: 14px 16px; border-radius: 8px; background: #eaf6e2; color: #33691e; font-weight: 600; }
.form-err { margin: 0 0 14px; padding: 12px 14px; border-radius: 8px; background: #fdecea; color: #b0271a; font-weight: 600; }
/* Honeypot — off-screen rather than display:none, which some bots detect. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Index of flyers -------------------------------------------------------- */
.flyer-index { list-style: none; padding: 0; margin: 0 0 26px; }
.flyer-index li { border-bottom: 1px solid var(--line); }
.flyer-index li:last-child { border-bottom: 0; }
.flyer-index a { display: block; padding: 16px 4px; text-decoration: none; color: var(--ink); }
.flyer-index a:hover { background: #f6f9fc; }
.fi-title { display: block; font-weight: 700; font-size: 1.1rem; color: var(--rsi-blue); }
.fi-sub   { display: block; color: var(--muted); font-size: .94rem; margin-top: 2px; }

/* Footer ----------------------------------------------------------------- */
.flyer-foot { border-top: 2px solid var(--line); padding-top: 18px; }
.foot-contact { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 8px; font-weight: 600; }
.foot-contact a { color: var(--rsi-blue); text-decoration: none; }
.foot-contact a:hover { text-decoration: underline; }
.foot-legal { margin: 0; color: var(--muted); font-size: .82rem; }
.foot-print { margin: 14px 0 0; }
.btn-print {
  padding: 8px 16px; border: 1px solid #c9d4de; border-radius: 7px;
  background: #fff; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem;
}
.btn-print:hover { border-color: var(--accent); color: var(--ink); }

.draft-bar {
  max-width: 820px; margin: 0 auto 14px; padding: 10px 16px; border-radius: 8px;
  background: #fff4d6; color: #7a5600; font-weight: 700; text-align: center; font-size: .92rem;
}

/* Small screens ---------------------------------------------------------- */
@media (max-width: 620px) {
  body { padding: 12px 10px; }
  .flyer { padding: 26px 20px 20px; border-radius: 10px; }
  .flyer-headline { font-size: 1.6rem; }
  .flyer-sub { font-size: 1rem; }
  .flyer-intro { font-size: 1.02rem; }
  .flyer-form { padding: 18px 16px; }
  .flyer-form .f-row { display: block; }
  .btn-cta { display: block; text-align: center; }
}

/* Paper ------------------------------------------------------------------
   Staff and customers save flyers as PDF from the browser's print dialog,
   so the printed sheet is the deliverable — not an afterthought. */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; padding: 0; font-size: 11pt; }
  .flyer { max-width: none; box-shadow: none; border-radius: 0; padding: 0; }
  .flyer-form, .flyer-cta, .btn-print, .foot-print, .draft-bar { display: none !important; }
  .flyer-headline { font-size: 24pt; }
  .flyer-sub { font-size: 12pt; }
  .flyer-intro { font-size: 11.5pt; }
  .flyer-hero img { max-height: 78mm; object-fit: cover; }
  .flyer-head { break-after: avoid; }
  .flyer-points li, .flyer-body h2, .flyer-body h3, .flyer-body img, .flyer-body table { break-inside: avoid; }
  .flyer-body h2, .flyer-body h3 { break-after: avoid; }
  .flyer-foot { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  /* Spell out link targets that a reader cannot click on paper. */
  .flyer-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #555; word-break: break-all; }
}
