/* Operational Risk.ca — rebuilt styles */

:root {
  --color-primary: #607ae6;
  --color-primary-dark: #4a63c7;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #fff;
  --color-bg-alt: #f7f8fc;
  --color-footer: #2c3e50;
  --font-heading: "Roboto Slab", Georgia, serif;
  --font-body: "Open Sans", system-ui, sans-serif;
  --max-width: 1140px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 0.75em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h5 { font-size: 1rem; font-weight: 400; color: var(--color-text-light); }

p {
  margin: 0 0 1em;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid #e8eaf0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-primary);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--color-primary-dark);
}

.site-brand svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.site-brand h4 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

/* Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-primary);
  background: rgba(96, 122, 230, 0.08);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #3d4f8a 0%, #607ae6 50%, #4a63c7 100%);
  color: #fff;
  text-align: center;
  padding: 5rem 1.5rem;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero .btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.hero .btn:hover {
  background: #fff;
  color: var(--color-primary);
}

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, #3d4f8a 0%, #607ae6 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.page-hero h1 {
  color: #fff;
  margin: 0;
}

/* Sections */
.section {
  padding: 4rem 1.5rem;
}

.section-alt {
  background: var(--color-bg-alt);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-intro h2 {
  margin-bottom: 1rem;
}

.section-intro p {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

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

.card {
  text-align: center;
}

.card-image {
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  aspect-ratio: 4 / 3;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card-image img {
  transform: scale(1.04);
}

.card h3 {
  text-transform: lowercase;
}

.card h3::first-letter {
  text-transform: uppercase;
}

/* About split sections */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.split-section:last-child {
  margin-bottom: 0;
}

.split-section.reverse {
  direction: rtl;
}

.split-section.reverse > * {
  direction: ltr;
}

.split-image {
  border-radius: 6px;
  overflow: hidden;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.split-content h3 {
  margin-bottom: 1rem;
}

.split-content p {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* Contact page */
.contact-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-email {
  font-size: 1.25rem;
  font-weight: 600;
}

.contact-email a {
  color: var(--color-primary);
}

.useful-links {
  margin-bottom: 2.5rem;
}

.useful-links h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.useful-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.useful-links li {
  margin-bottom: 0.5rem;
}

.useful-links a {
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--color-footer);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .split-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .split-section.reverse {
    direction: ltr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid #e8eaf0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
  }

  .site-nav.open {
    max-height: 300px;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem 0;
  }

  .site-nav a {
    padding: 0.75rem 1.5rem;
  }

  .hero {
    padding: 3.5rem 1.5rem;
  }

  .section {
    padding: 3rem 1.5rem;
  }
}
