/* Ravenwood Consultancy Ltd: website styles (Midnight, DESIGN.md v2.1) */

/* ---- Brand tokens: verbatim :root block from assets/brand-tokens.css ---- */
:root {
  /* Primary: Midnight navy */
  --primary-50:  #EEF2F7;
  --primary-100: #E9EEF4; /* Ice */
  --primary-200: #AFC0D3; /* Mist */
  --primary-300: #8197B0;
  --primary-400: #546E8C;
  --primary-500: #2C4563;
  --primary-600: #13233A; /* DEFAULT: Midnight */
  --primary-700: #0F1C2F;
  --primary-800: #0B1524;
  --primary-900: #070E18;

  /* Secondary: Copper (accent only) */
  --secondary-50:  #F8EEE6;
  --secondary-300: #DBA67E;
  --secondary-500: #C27C4A; /* DEFAULT: Copper */
  --secondary-600: #985C31; /* Dark Copper: copper text on white and light tints */
  --secondary-700: #7A4826;

  /* Neutrals */
  --neutral-50:  #F6F8FA;
  --neutral-100: #EEF2F7;
  --neutral-200: #D5D9DE; /* Rule */
  --neutral-300: #C3C9D1;
  --neutral-400: #8B95A1;
  --neutral-500: #5E6B7A; /* Slate */
  --neutral-700: #3E4752;
  --neutral-900: #1B2430; /* Ink */

  /* Semantic */
  --success: #2E7D4F;
  --warning: #B26A00;
  --error:   #B42318;

  /* Surfaces */
  --surface-bg: #FFFFFF;
  --surface-overlay: rgba(7, 14, 24, 0.6);

  /* Typography */
  --font-sans: 'Lato', Calibri, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Spacing (8pt grid) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 72px;
  --space-3xl: 128px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(7, 14, 24, 0.08);
  --shadow-md: 0 4px 8px rgba(7, 14, 24, 0.10);
  --shadow-lg: 0 8px 16px rgba(7, 14, 24, 0.12);

  /* Motion */
  --duration-fast: 150ms;
  --duration-default: 250ms;
  --duration-slow: 350ms;
  --ease-out: ease-out;
  --ease-in-out: ease-in-out;

  /* Layout */
  --container-max: 1152px;
  --header-height: 76px;
}

/* ---- Fonts: self-hosted Lato (latin subset), no third-party requests ---- */
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/lato-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/lato-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 900; font-display: swap; src: url(/fonts/lato-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/lato-latin-400-italic.woff2) format('woff2'); }

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-bg);
  color: var(--neutral-900);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; }

h1 {
  margin-bottom: var(--space-md);
  font-size: clamp(2rem, 1rem + 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--primary-600);
}

h2 {
  margin-bottom: var(--space-md);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-600);
}

h3 {
  margin-bottom: var(--space-sm);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--primary-600);
}

p + p { margin-top: var(--space-md); }

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--neutral-700);
}

.eyebrow {
  margin-bottom: var(--space-sm);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary-600);
}

.eyebrow--on-navy { color: var(--secondary-300); }

a {
  color: var(--primary-600);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--primary-200);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--duration-fast) var(--ease-out);
}

a:hover { text-decoration-color: var(--secondary-600); }

:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--primary-600);
  color: var(--surface-bg);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { top: 16px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 4px;
  background: var(--primary-600);
  color: var(--surface-bg);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out);
}

.btn:hover { background: var(--primary-500); color: var(--surface-bg); }
.btn:active { background: var(--primary-700); color: var(--surface-bg); }

/* ---- Sections ---- */
.section { padding-block: 72px; }
.section--ice { background: var(--primary-100); }
.page-intro { padding-block: 72px 0; }

@media (min-width: 768px) {
  .section { padding-block: 80px; }
  .page-intro { padding-block: 80px 0; }
}

@media (min-width: 1024px) {
  .section { padding-block: 120px; }
  .page-intro { padding-block: 120px 0; }
}

.section-head { max-width: 720px; margin-bottom: 40px; }

.split { display: grid; gap: 24px; align-items: center; }

@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
}

.split .actions { margin-top: 0; }

.pull-quote { margin-block: 40px 0; }

.pull-quote p { margin: 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 32px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-bg);
  border-bottom: 1px solid var(--neutral-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 44px;
  color: var(--primary-600);
  text-decoration: none;
}

.brand img { height: 32px; width: auto; flex-shrink: 0; }

.wordmark {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-600);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--neutral-300);
  border-radius: 4px;
  background: var(--surface-bg);
  color: var(--primary-600);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle svg { flex-shrink: 0; width: 20px; height: 20px; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-600);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { border-bottom-color: var(--secondary-600); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--secondary-600); }
.site-nav .btn { color: var(--surface-bg); border-bottom: 0; }
.site-nav .btn:hover { border-bottom: 0; }

@media (min-width: 1280px) {
  .brand { gap: 18px; }
  .brand img { height: 36px; }
  .wordmark { font-size: 14px; }
}

/* Mobile navigation: only when JavaScript is available, otherwise the links wrap in the header */
@media (max-width: 1023.98px) {
  .js .nav-toggle { display: inline-flex; }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-bg);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-md);
  }

  .js .site-nav.is-open { display: block; }

  .js .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
  }

  .js .site-nav li { border-bottom: 1px solid var(--neutral-200); }
  .js .site-nav li:last-child { border-bottom: 0; }
  .js .site-nav a { width: 100%; border-bottom: 0; }
  .js .site-nav .nav-cta { padding-top: 16px; }
  .js .site-nav .nav-cta .btn { width: 100%; }
}

@media (max-width: 479.98px) {
  .brand img { height: 32px; }
  .wordmark { font-size: 13px; }
}

/* ---- Hero ---- */
.hero-grid { display: grid; gap: 40px; align-items: center; }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; }
}

.hero-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 40px 32px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--primary-600);
  color: var(--primary-200);
  box-shadow: var(--shadow-md);
}

.hero-panel__watermark {
  position: absolute;
  top: -8%;
  right: -14%;
  width: 84%;
  max-width: 460px;
  opacity: 0.09;
  pointer-events: none;
}

.hero-panel__emblem {
  position: absolute;
  top: 32px;
  left: 32px;
  width: 52px;
  height: auto;
}

.hero-panel__text {
  position: relative;
  max-width: 340px;
  font-size: 16px;
  line-height: 1.6;
}


/* ---- Trust bar ---- */
.trust-bar {
  border-bottom: 1px solid var(--neutral-200);
  background: var(--surface-bg);
}

.trust-bar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  list-style: none;
  padding-block: 20px;
}

.trust-bar li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-500);
}

.trust-bar li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--secondary-600);
}

/* ---- Cards ---- */
.card-grid { display: grid; gap: 24px; }

@media (min-width: 640px) {
  .card-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  padding: 24px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--surface-bg);
  box-shadow: var(--shadow-sm);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--primary-100);
  color: var(--secondary-600);
}

.card__icon svg { width: 24px; height: 24px; }

.card p { color: var(--neutral-700); }

/* ---- Icons ---- */
.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Key figures ---- */
.figures { display: grid; gap: 24px; }

@media (min-width: 768px) {
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.figure {
  padding: 32px 24px;
  border-radius: 8px;
  background: var(--primary-100);
  box-shadow: var(--shadow-sm);
}

.figure__value {
  display: block;
  margin-bottom: 8px;
  font-size: 48px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--secondary-600);
}

.figure__label {
  font-size: 16px;
  line-height: 1.5;
  color: var(--neutral-500);
}

.source {
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--neutral-500);
}

/* ---- Steps ---- */
.step__num {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary-600);
}

/* ---- Pull statement ---- */
.pull-quote {
  padding-left: 24px;
  border-left: 3px solid var(--secondary-600);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--primary-600);
}

/* ---- Bullets: small square, Dark Copper ---- */
.bullets { list-style: none; }

.bullets li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--secondary-600);
}

/* ---- Services page ---- */
.service {
  padding-block: 56px;
  border-top: 1px solid var(--neutral-200);
}

.page-intro + .service { border-top: 0; }

.stage {
  padding-block: 48px;
  border-top: 1px solid var(--neutral-200);
}

.stage:first-child { border-top: 0; padding-top: 0; }

.stage h2 { margin-bottom: 16px; }

.output { margin-top: 16px; color: var(--neutral-700); }

.output strong { color: var(--secondary-600); }

.service h2 { margin-bottom: 24px; }

.service h3 {
  margin-top: 24px;
  font-size: 1.25rem;
  color: var(--secondary-600);
}

.service h3:first-of-type { margin-top: 0; }

/* ---- Case studies and definition lists ---- */
.case {
  padding-block: 48px;
  border-top: 1px solid var(--neutral-200);
}

.case h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }

.case-points,
.contact-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.case-points dt,
.contact-list dt {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary-600);
}

.case-points dd,
.contact-list dd { margin-top: 4px; color: var(--neutral-900); }

@media (min-width: 768px) {
  .case-points,
  .contact-list { grid-template-columns: 200px minmax(0, 1fr); gap: 16px 32px; }

  .case-points dt,
  .contact-list dt { margin-top: 2px; }

  .case-points dd,
  .contact-list dd { margin-top: 0; }
}

.note {
  padding: 24px;
  border-radius: 8px;
  background: var(--primary-100);
  color: var(--neutral-700);
}

/* ---- Director block ---- */
.director-copy p { color: var(--neutral-900); }

.director-copy p + p { margin-top: 16px; }

/* ---- CTA band ---- */
.cta-band p { color: var(--neutral-700); }

/* ---- Footer ---- */
.site-footer {
  background: var(--primary-600);
  color: var(--primary-200);
}

.site-footer :focus-visible { outline-color: var(--secondary-300); }

.site-footer__main { padding-block: 72px 48px; }

.footer-grid { display: grid; gap: 40px; }

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
}

.footer-brand img { width: 40px; height: auto; margin-bottom: 16px; }

.footer-brand .wordmark { color: var(--surface-bg); }

.footer-brand p { margin-top: 16px; color: var(--primary-200); }

.site-footer h2 {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary-500);
}

.footer-links {
  display: grid;
  gap: 8px;
  list-style: none;
  color: var(--primary-200);
}

.footer-links a {
  font-weight: 400;
  color: var(--primary-200);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--surface-bg);
  text-decoration: underline;
  text-decoration-color: var(--surface-bg);
}

.legal-strip {
  background: var(--primary-800);
  color: var(--primary-200);
  font-size: 14px;
  line-height: 1.5;
}

.legal-strip .container { padding-block: 16px; }

.legal-strip p { margin: 0; }

/* ---- Motion: fade and 10px slide on scroll, only when JavaScript and motion are allowed ---- */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-ready .reveal {
    opacity: 1;
    transform: none;
  }
}
