/* RR Solutions — site styles. Colours follow the RR Solutions brand guide (navy #1E3A8A, slate greys). */

/* Inter (same typeface as the logo wordmark), variable 300–700, Latin subset. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand */
  --brand-navy: #1e3a8a;
  --brand-grey: #94a3b8;
  --brand-slate: #64748b;
  --brand-navy-dm: #7c8db5;   /* navy on dark backgrounds */
  --brand-grey-dm: #cbd5e1;   /* "Solutions" grey on dark backgrounds */

  --primary: var(--brand-navy);
  --primary-dark: #172e6e;
  --secondary: #172554;
  --dark: #0f172a;
  --overlay: rgba(15, 23, 42, 0.82);
  --bg-soft: #f1f5f9;
  --text: var(--brand-slate);
  --heading: #172554;
  --border: #e2e8f0;
  --footer-text: var(--brand-grey-dm);
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 10px 40px rgba(30, 58, 138, 0.08);
  --container: 1200px;
  --gutter: 20px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .page-header :focus-visible, .site-footer :focus-visible, .card-highlight :focus-visible { outline-color: var(--white); }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 90px 0; }
.section-soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6em;
}

.eyebrow-light { color: var(--brand-grey-dm); }

.section-head { text-align: center; max-width: 700px; margin: 0 auto 50px; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 14px 30px;
  border-radius: 6px;
  border: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); color: var(--white); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
}
.logo { display: block; flex: none; }
.logo img { width: 232px; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 32px;
}
.main-nav a {
  color: var(--heading);
  font-weight: 500;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--brand-grey); }

.header-cta { display: inline-block; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--heading);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px var(--gutter) 20px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 12px 0; }
  .main-nav a[aria-current="page"] { box-shadow: none; }
  .logo img { width: 184px; }
}

/* ---------- Hero & page headers ---------- */
.hero,
.page-header {
  position: relative;
  color: var(--white);
  background-color: var(--dark);
  background-size: cover;
  background-position: center;
}
.hero::before,
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay);
}
.hero > .container,
.page-header > .container { position: relative; }

.hero { padding: 140px 0 200px; }
.hero h1 { color: var(--white); max-width: 900px; }
.hero p { font-size: 1.15rem; max-width: 640px; color: var(--footer-text); margin-bottom: 2em; }

.page-header { padding: 110px 0; text-align: center; }
.page-header h1 { color: var(--white); margin-bottom: 0.3em; }
.page-header p { color: var(--footer-text); max-width: 760px; margin: 0 auto; }

.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--footer-text);
}
.breadcrumb li + li::before { content: "/"; margin-right: 10px; }
.breadcrumb a { color: var(--white); }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 30px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 30px;
}
.card h3 { margin-top: 18px; }
.card-block { display: block; }
.service, .post-card { transition: transform 0.2s, box-shadow 0.2s; }
.service:hover, .post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(30, 58, 138, 0.12); }
.card p:last-child { margin-bottom: 0; }

.card-highlight { background: var(--primary); color: var(--white); }
.card-highlight h3 { color: var(--white); }
.card-highlight .icon { background: rgba(255, 255, 255, 0.15); color: var(--white); }
.card-highlight .btn { background: var(--white); color: var(--primary); margin-top: 6px; }
.card-highlight .btn:hover { background: var(--bg-soft); }

.icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  color: var(--primary);
}
.icon svg { width: 28px; height: 28px; }

.features { margin-top: -120px; position: relative; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
}

.about-media { position: relative; }
.about-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about-quote {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  background: var(--overlay);
  color: var(--white);
  padding: 22px 26px;
  border-radius: var(--radius);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
@media (max-width: 500px) {
  .checklist { grid-template-columns: 1fr; }
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-weight: 500;
}
.checklist svg { flex: none; width: 20px; height: 20px; color: var(--primary); }

/* ---------- Services ---------- */
.service { display: flex; flex-direction: column; scroll-margin-top: 110px; }
.service p { flex: 1; }
.service .more { font-weight: 600; }

/* ---------- Blog ---------- */
.post-card { overflow: hidden; padding: 0; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card .body { padding: 28px 30px 32px; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.post-meta .cat { color: var(--primary); font-weight: 500; }
.post-card h3 a { color: var(--heading); }
.post-card h3 a:hover { color: var(--primary); }

.article { max-width: 760px; margin: 0 auto; font-size: 1.0625rem; line-height: 1.8; color: #475569; }
.article h2 { font-size: 1.6rem; margin-top: 1.6em; }
.article img { border-radius: var(--radius); margin: 2em 0; }
.article ul { padding-left: 1.2em; }
.article li { margin-bottom: 0.8em; }
.article strong { color: var(--heading); }
.page-header .post-meta { justify-content: center; color: var(--footer-text); margin: 0; }

/* ---------- Career ---------- */
.empty-state {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-info { display: grid; gap: 24px; }
.contact-info .card { display: flex; gap: 18px; align-items: flex-start; padding: 28px; }
.contact-info h3 { margin: 0 0 4px; font-size: 1.1rem; }
.contact-info p { margin: 0; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}
.form-grid .full { grid-column: 1 / -1; }

.field label {
  display: block;
  color: var(--heading);
  font-weight: 500;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--heading);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
}
.field input:focus,
.field textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
.field textarea { min-height: 160px; resize: vertical; }
.req { color: #d60000; }

.hp { position: absolute; left: -9999px; }

.form-status { margin-top: 16px; font-weight: 500; }
.form-status.ok { color: #0a7a3a; }
.form-status.err { color: #d60000; }

.small { font-size: 0.9rem; }

/* ---------- Social ---------- */
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}
.social a:hover { background: var(--primary); color: var(--white); }
.social svg { width: 18px; height: 18px; }
.social-light a { background: var(--bg-soft); color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: var(--footer-text);
  padding: 80px 0 0;
}
.site-footer h2,
.site-footer h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 1em; }
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: var(--white); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid .logo img { margin-bottom: 18px; }

.footer-bottom {
  margin-top: 60px;
  border-top: 1px solid #1e293b;
  padding: 24px 0;
  text-align: center;
  font-size: 0.9rem;
}
