/* CIBM Bank IT status page.
   Colors, type and shapes follow the bank website (cibmbank-dev/src/scss/_variables.scss). */

:root {
  --brand: #2C94CB;
  --brand-navy: #1E1E3B;
  --brand-sky: #36C5E6;
  --brand-text: #2376A2;   /* blue that passes AA on white */
  --light: #F3F6F9;
  --body: #2B2F3A;
  --muted: #5F6675;
  --line: rgba(30, 30, 59, .1);
  --radius: .5rem;
  --radius-lg: .75rem;
  --shadow-sm: 0 1px 3px rgba(30, 30, 59, .08);
  --shadow: 0 .5rem 1.5rem rgba(30, 30, 59, .1);

  /* Status colors: solid for dots and icons, tint for backgrounds, ink for text */
  --ok: #1E8E3E;       --ok-tint: #E6F4EA;       --ok-ink: #17602B;
  --warn: #F2B01E;     --warn-tint: #FFF4D6;     --warn-ink: #6F4A00;
  --bad: #D93025;      --bad-tint: #FDE8E6;      --bad-ink: #A1211A;
  --maint: #2C94CB;    --maint-tint: #E3F1F9;    --maint-ink: #1B5E82;
  --unknown: #8A90A0;  --unknown-tint: #ECEEF2;  --unknown-ink: #4A5060;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--light);
}

h1, h2, h3 { color: var(--brand-navy); font-weight: 700; line-height: 1.25; margin: 0; }
p { margin: 0; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { color: var(--brand-navy); text-decoration: underline; }

.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1rem; }

.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 10;
  background: #fff; padding: .5rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: .5rem; }

/* ---- Header */
.site-header { background: #fff; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .75rem; padding-bottom: .75rem; }
.site-header img { height: 44px; width: auto; display: block; }
.header-label { font-weight: 600; color: var(--brand-navy); font-size: .95rem; text-align: right; }

/* ---- Hero */
.hero { background: var(--brand-navy); color: rgba(255, 255, 255, .9); padding: 3rem 0 5.5rem; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin-bottom: .5rem; }
.hero .lead { font-size: 1.1rem; max-width: 40rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-sky); margin-bottom: .5rem;
}

main { flex: 1; padding-bottom: 3.5rem; }

/* ---- Overall status card (overlaps the hero) */
.overall {
  --c: var(--unknown); --tint: var(--unknown-tint); --ink: var(--unknown-ink);
  display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.25rem;
  margin-top: -3rem; padding: 1.5rem;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  border-left: 8px solid var(--c);
}
.overall-icon {
  flex: none; width: 3.25rem; height: 3.25rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--tint); color: var(--ink);
}
.overall-icon svg { width: 1.75rem; height: 1.75rem; }
.overall-text { flex: 1 1 16rem; }
.overall-text h2 { font-size: 1.4rem; }
.overall-text p { color: var(--muted); font-size: .9rem; }

.counts { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }

/* ---- Status colors, shared by the card, pills, rows and notices */
.s-operational { --c: var(--ok);      --tint: var(--ok-tint);      --ink: var(--ok-ink); }
.s-maintenance { --c: var(--maint);   --tint: var(--maint-tint);   --ink: var(--maint-ink); }
.s-degraded    { --c: var(--warn);    --tint: var(--warn-tint);    --ink: var(--warn-ink); }
.s-down        { --c: var(--bad);     --tint: var(--bad-tint);     --ink: var(--bad-ink); }
.s-unknown     { --c: var(--unknown); --tint: var(--unknown-tint); --ink: var(--unknown-ink); }

.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .2rem .7rem .2rem .55rem; border-radius: 999px;
  background: var(--tint); color: var(--ink);
  font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--c); flex: none; }

/* ---- Sections */
.section-title {
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 2.25rem 0 .75rem;
}

/* ---- Notices */
.notice {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--c); padding: 1rem 1.25rem; margin-bottom: .75rem;
}
.notice-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-bottom: .25rem; }
.notice h3 { font-size: 1.05rem; }
.notice time { color: var(--muted); font-size: .85rem; margin-left: auto; }
.notice p { font-size: .95rem; }
.notice .when { font-weight: 600; color: var(--brand-navy); }
.notice .affects { color: var(--muted); font-size: .85rem; margin-top: .25rem; }

/* ---- Services table */
.table-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.status-table { width: 100%; border-collapse: collapse; }
.status-table th, .status-table td { padding: .75rem 1rem; text-align: left; vertical-align: middle; }
.status-table thead th { background: var(--brand-navy); color: #fff; font-weight: 600; font-size: .9rem; }
.status-table .group th {
  background: #EAF4FA; color: var(--brand-navy); font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding-top: .55rem; padding-bottom: .55rem;
}
.status-table .service { border-top: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--c); }
.status-table .service:not(.s-operational) { background: var(--tint); }
.status-table .service:not(.s-operational) .pill { background: #fff; }
.service th { font-weight: 600; color: var(--brand-navy); width: 42%; }
.service .desc { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); line-height: 1.4; }
.service .note { font-size: .9rem; }
.col-status { width: 10.5rem; }

.legend {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none;
  margin: 1rem 0 0; padding: 0; font-size: .85rem; color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: .5rem; }

.callout {
  background: #fff; border-left: 4px solid var(--brand); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-top: 1.5rem;
}

/* ---- Footer */
.site-footer { background: var(--brand-navy); color: rgba(255, 255, 255, .75); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; padding-top: 1.75rem; padding-bottom: 1.75rem; }
.site-footer img { height: 40px; width: auto; display: block; }
.footer-note { margin-left: auto; }

/* ---- Phones: each service becomes a small two-line block */
@media (max-width: 600px) {
  .header-label { font-size: .8rem; }
  .hero { padding-top: 2.25rem; }
  .overall { padding: 1.1rem; }
  .status-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .status-table, .status-table tbody { display: block; }
  .status-table tr { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .status-table .group th { grid-column: 1 / -1; }
  .service th, .col-status { width: auto; }
  .service .note { grid-column: 1 / -1; padding-top: 0; }
  .service .note:empty { display: none; }
  .footer-note { margin-left: 0; }
}
