/* Ratebay Care Technologies — Corporate Stylesheet */
/* Last updated: November 2024 — Mark Tennant, Head of IT */

:root {
  --primary:   #1B4F8A;
  --primary-d: #153D6C;
  --secondary: #2980B9;
  --accent:    #1E8449;
  --accent-l:  #27AE60;
  --light:     #EBF5FB;
  --lighter:   #F4F9FD;
  --border:    #D6E4F0;
  --dark:      #1A252F;
  --text:      #2C3E50;
  --muted:     #7F8C8D;
  --white:     #FFFFFF;
  --warn:      #E67E22;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 {
  font-family: 'DM Serif Display', Georgia, serif;
  color: var(--primary-d);
  line-height: 1.25;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; color: var(--text); }
p:last-child { margin-bottom: 0; }

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--primary); }

ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }

/* ── LAYOUT ── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--lighter);
  padding: 72px 0;
}

.section-dark {
  background: var(--primary-d);
  padding: 72px 0;
  color: var(--white);
}

.section-dark h2, .section-dark h3, .section-dark p { color: var(--white); }

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-l);
  margin-bottom: 0.75rem;
  display: block;
}

.section-label-light {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
  display: block;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 24px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
}

/* ── NAV ── */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1140px;
  margin: 0 auto;
  height: 64px;
}

.nav-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--primary-d);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo:hover { text-decoration: none; }

.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--light);
  color: var(--primary);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--primary);
  background: var(--light);
}

.nav-cta {
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 8px 18px !important;
  border-radius: 4px !important;
}

.nav-cta:hover {
  background: var(--primary-d) !important;
  text-decoration: none !important;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 60%, var(--secondary) 100%);
  padding: 96px 0 80px;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -80px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 100px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}

.hero h1 { color: white; font-size: 2.8rem; margin-bottom: 1rem; }
.hero .lead { font-size: 1.15rem; color: rgba(255,255,255,0.85); max-width: 580px; margin-bottom: 2rem; }

.hero-sub {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
  display: block;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--white);
  color: var(--primary);
}

.btn-primary:hover { background: var(--light); color: var(--primary-d); }

.btn-outline {
  border: 2px solid rgba(255,255,255,0.6);
  color: white;
  margin-left: 12px;
}

.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.1); color: white; }

.btn-blue {
  background: var(--primary);
  color: white;
}

.btn-blue:hover { background: var(--primary-d); color: white; }

.btn-green {
  background: var(--accent);
  color: white;
}

.btn-green:hover { background: #196F3D; color: white; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon svg { width: 26px; height: 26px; }

/* ── TEAM CARDS ── */
.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
}

.team-avatar {
  height: 320px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 3rem;
  color: white;
}

.team-body { padding: 20px; }
.team-name { font-size: 1.05rem; font-weight: 600; color: var(--primary-d); margin-bottom: 4px; }
.team-role { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.team-email { font-size: 0.8rem; color: var(--secondary); font-family: monospace; }
.team-bio { font-size: 0.88rem; color: var(--text); margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }

/* ── NEWS CARDS ── */
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 0.2s;
}

.news-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.news-date {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.news-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.tag-press { background: var(--light); color: var(--primary); }
.tag-product { background: #EAF7EF; color: var(--accent); }
.tag-partnership { background: #FEF9E7; color: var(--warn); }
.tag-award { background: #F4ECF7; color: #6C3483; }

/* ── JOB LISTINGS ── */
.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  transition: box-shadow 0.2s;
}

.job-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.job-title { font-size: 1.1rem; font-weight: 600; color: var(--primary-d); margin-bottom: 6px; }
.job-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.job-meta span { margin-right: 16px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.job-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  background: var(--light);
  color: var(--primary);
  border: 1px solid var(--border);
  font-family: monospace;
}

/* ── PARTNER LOGOS ── */
.partner-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  background: var(--white);
}

.partner-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-d);
  margin-bottom: 6px;
}

.partner-type {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-l);
  font-weight: 700;
  margin-bottom: 12px;
}

/* ── STATS ── */
.stat-block { text-align: center; padding: 24px; }
.stat-number {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.8rem;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 0.9rem; color: rgba(255,255,255,0.75); }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.breadcrumb a { color: var(--secondary); }
.breadcrumb span { margin: 0 6px; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 100%);
  padding: 52px 0 48px;
  color: white;
}

.page-hero h1 { color: white; font-size: 2rem; margin-bottom: 0.5rem; }
.page-hero p { color: rgba(255,255,255,0.8); font-size: 1.05rem; max-width: 600px; margin: 0; }

/* ── ALERTS ── */
.alert {
  padding: 14px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.alert-info { background: var(--light); border-left: 4px solid var(--secondary); color: var(--primary-d); }
.alert-success { background: #EAF7EF; border-left: 4px solid var(--accent-l); color: #1D6A3A; }

/* ── FORM ── */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
input, textarea, select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(41,128,185,0.12);
}
textarea { min-height: 120px; resize: vertical; }

/* ── DIVIDER ── */
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.2rem;
  color: white;
  margin-bottom: 12px;
}

.footer-tagline { font-size: 0.88rem; color: rgba(255,255,255,0.5); line-height: 1.6; }

.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer-col ul li a:hover { color: white; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); text-decoration: none; }

/* ── UTILITIES ── */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-small { font-size: 0.88rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.flex { display: flex; }
.gap-2 { gap: 16px; }
.items-center { align-items: center; }

/* ── NHS BADGE ── */
.nhs-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.nhs-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #005EB8;
  flex-shrink: 0;
}

/* ── ICO REGISTRATION ── */
.ico-ref {
  font-family: monospace;
  font-size: 0.85rem;
  background: var(--light);
  padding: 2px 8px;
  border-radius: 3px;
  color: var(--primary);
}

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

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .nav-links { display: none; }
  .section, .section-alt, .section-dark { padding: 48px 0; }
  .hero { padding: 64px 0 56px; }
  .hero h1 { font-size: 2rem; }
}
