/* ===========================================================
   REMUDA — Quality Management Consulting
   Stylesheet v0.2 (May 2026) — aligned to brand guide
   -----------------------------------------------------------
   Brand colors:
     Deep Blue   #335573  (primary)
     Off-White   #F5F2F0  (background)
     Warm Grey   #D4CECA  (secondary surfaces, dividers)
     Graphite    #4A4A49  (primary text)
   Web typeface: Inter (per brand guide).
   =========================================================== */

:root {
  --bg:           #F5F2F0;
  --surface:      #FFFFFF;
  --text:         #4A4A49;
  --text-muted:   #6B6660;
  --line:         #E2DDD7;
  --warm-grey:    #D4CECA;
  --accent:       #335573;
  --accent-hover: #284260;
  --accent-soft:  #E8EDF2;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md:   1.25rem;
  --fs-lg:   1.75rem;
  --fs-xl:   2.5rem;
  --fs-2xl:  3.5rem;
  --fs-3xl:  4.5rem;

  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: 6.5rem;
  --s-8: 9rem;

  --max-wide: 1200px;
  --max-prose: 68ch;

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

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

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

/* Anchor offset for sticky header */
section[id], main { scroll-margin-top: 80px; }

/* Skip-to-content link — visible on focus only */
.skip-link {
  position: fixed;
  top: var(--s-2);
  left: var(--s-3);
  background: var(--accent);
  color: #fff;
  padding: var(--s-2) var(--s-3);
  border: 0;
  border-radius: 2px;
  font-size: var(--fs-sm);
  z-index: 100;
  transform: translateY(-200%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus { transform: translateY(0); color: #fff; outline: 2px solid #fff; outline-offset: 2px; }

/* Visible focus for keyboard nav across all interactive elements */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.btn:focus-visible { outline-offset: 3px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 120ms var(--ease), border-color 120ms var(--ease);
}
a:hover { color: var(--accent); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.005em;
  line-height: 1.15;
  margin: 0 0 var(--s-3);
}

h1 { font-size: var(--fs-2xl); line-height: 1.08; letter-spacing: 0; }
h2 { font-size: var(--fs-xl); line-height: 1.12; }
h3 { font-size: var(--fs-lg); line-height: 1.2; }
h4 { font-size: var(--fs-md); font-weight: 500; color: var(--text); letter-spacing: 0.01em; }

p { margin: 0 0 var(--s-3); max-width: var(--max-prose); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0 var(--s-3);
}

.lead {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
  max-width: var(--max-prose);
  font-weight: 400;
}

.muted { color: var(--text-muted); }

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--s-4);
}

@media (min-width: 768px) {
  .wrap { padding: 0 var(--s-5); }
}

section { padding: var(--s-7) 0; }
section + section { border-top: 1px solid var(--line); }

/* ---------- Header / nav ---------- */
.site-header {
  padding: var(--s-3) 0;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.brand {
  border: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

.nav { display: flex; align-items: center; gap: var(--s-4); }
.nav a {
  border: 0;
  font-size: var(--fs-sm);
  color: var(--text);
  position: relative;
  font-weight: 400;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.lang-switch {
  display: inline-flex;
  gap: var(--s-1);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: var(--s-3);
}
.lang-switch a { border: 0; color: var(--text-muted); }
.lang-switch a.is-active { color: var(--accent); font-weight: 600; }
.lang-switch .sep { opacity: 0.4; }

/* Mobile menu */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; min-height: 44px; min-width: 44px; }
  .nav {
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--warm-grey);
    box-shadow: 0 6px 18px -10px rgba(74, 74, 73, 0.18);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--s-4);
    gap: var(--s-3);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms var(--ease), transform 180ms var(--ease);
  }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .lang-switch { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--s-8) 0 var(--s-6);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: end;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: var(--s-6);
  }
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, var(--fs-3xl));
  line-height: 1.05;
  margin-bottom: var(--s-4);
  font-weight: 500;
  letter-spacing: -0.005em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.hero-aside {
  border-left: 1px solid var(--warm-grey);
  padding-left: var(--s-4);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 36ch;
}

/* ---------- Hero image (brand visual) ---------- */
.hero-visual {
  margin-top: var(--s-3);
  overflow: hidden;
  background: var(--warm-grey);
  aspect-ratio: 21 / 9;
  max-height: 420px;
}
.hero { padding: var(--s-7) 0 var(--s-5); }
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Story section (REMUDA = RE + MUDA) ---------- */
.story { padding: var(--s-7) 0; background: var(--surface); }
.story-lead {
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  line-height: 1.2;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: -0.005em;
  max-width: 22ch;
  margin: 0 0 var(--s-5);
}
.story-define {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin: var(--s-4) 0;
  border-top: 1px solid var(--line);
  padding-top: var(--s-4);
}
@media (min-width: 700px) {
  .story-define { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}
.story-define > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-4); align-items: baseline; }
.story-define .term {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1;
}
.story-define .meaning { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; margin: 0; }
.story-conclude {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
  max-width: 56ch;
  margin: var(--s-5) 0 0;
}

/* ---------- Image break (visual rhythm between sections) ---------- */
.image-break { padding: 0; background: var(--warm-grey); }
.image-break img {
  width: 100%;
  height: clamp(220px, 26vw, 360px);
  object-fit: cover;
  display: block;
}

/* ---------- Services list — question-driven variant ---------- */
.services-list .question {
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--accent);
  line-height: 1.3;
  margin: 0 0 var(--s-2);
  max-width: 38ch;
  letter-spacing: 0;
}
.services-list .service-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0 var(--s-2);
}

/* ---------- Feature pullquote (larger, standalone moment) ---------- */
.pullquote-large {
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  line-height: 1.25;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding: var(--s-3) 0 var(--s-3) var(--s-5);
  margin: var(--s-5) 0 0;
  max-width: 30ch;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* ---------- Person (Robert intro) ---------- */
.person {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: start;
}
@media (min-width: 820px) {
  .person { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: var(--s-6); }
}
.person-photo {
  aspect-ratio: 4 / 5;
  background: var(--warm-grey);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0;
}
.person-photo img.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-photo .placeholder-mark { width: 45%; max-width: 130px; opacity: 0.28; }
.person-intro h2 { margin-bottom: var(--s-3); max-width: 24ch; }
.person-intro p { font-size: var(--fs-md); line-height: 1.55; max-width: 50ch; margin-bottom: var(--s-3); }
.person-signature {
  font-size: var(--fs-md);
  color: var(--accent);
  margin-top: var(--s-3);
  font-weight: 500;
  letter-spacing: 0.005em;
}

/* ---------- Reassurance callout ---------- */
.reassurance {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: var(--s-4) var(--s-5);
  margin: 0 0 var(--s-5);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
  max-width: 56ch;
}
.reassurance strong { color: var(--accent); font-weight: 500; }

/* ---------- Buttons / CTAs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.btn-ghost:hover { background: var(--accent); color: #fff; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  font-size: var(--fs-sm);
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
}
.arrow-link:hover { color: var(--accent); }
.arrow-link::after { content: "→"; transition: transform 200ms var(--ease); }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- Services list (numbered, editorial) ---------- */
.services-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
@media (min-width: 900px) {
  .services-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-6); }
}

.services-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services-list > li {
  border-bottom: 1px solid var(--line);
  padding: var(--s-4) 0;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: var(--s-4);
  align-items: start;
  transition: background 200ms var(--ease);
}
.services-list > li:hover { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.services-list .num {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 6px;
}
.services-list .title {
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: var(--accent);
  margin: 0 0 var(--s-1);
}
.services-list .desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0;
  line-height: 1.55;
}
.services-list .go {
  align-self: center;
  border: 0;
  color: var(--text);
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.services-list .go::after { content: " →"; color: var(--accent); }

@media (max-width: 680px) {
  .services-list > li { grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-3) 0; }
  .services-list .num { font-size: var(--fs-xs); letter-spacing: 0.18em; padding-top: 0; color: var(--text-muted); }
  .services-list .go { margin-top: var(--s-1); display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Two-column content ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s-6); }
}
.two-col .col-small { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- Contact card ---------- */
.contact-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
}
@media (min-width: 760px) {
  .contact-strip { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
}
.contact-strip dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}
.contact-strip dd {
  margin: 0;
  font-size: var(--fs-base);
}
.contact-strip a {
  border-bottom: 1px solid transparent;
  color: var(--accent);
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.contact-strip a:hover { border-bottom-color: var(--accent); color: var(--accent-hover); }

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--s-6) 0 var(--s-4);
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 820px) {
  .site-footer .wrap { grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s-5); align-items: start; }
}
.site-footer .brand-logo { height: 22px; margin-bottom: var(--s-2); }
.brand-slogan {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 var(--s-3);
  font-weight: 400;
}
.site-footer h5 {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 var(--s-2);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { border: 0; color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ---------- Reveal on scroll (subtle) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Page content (service / text pages) ---------- */
.page-head {
  padding: var(--s-7) 0 var(--s-5);
}
.page-head h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  max-width: 24ch;
}
.page-body {
  padding-bottom: var(--s-7);
}
.page-body h2 {
  margin-top: var(--s-5);
  font-size: var(--fs-xl);
}
.page-body h3 {
  margin-top: var(--s-4);
  font-size: var(--fs-lg);
}
.page-body ul, .page-body ol { max-width: var(--max-prose); padding-left: 1.2em; }
.page-body li { margin-bottom: 6px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  border: 0;
  margin-bottom: var(--s-4);
}
.back-link::before { content: "←"; }
.back-link:hover { color: var(--accent); }

/* ---------- Utility ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: var(--s-5); }
}

.divider-top { border-top: 1px solid var(--line); padding-top: var(--s-5); }

.pullquote {
  font-size: var(--fs-lg);
  line-height: 1.35;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding: var(--s-2) 0 var(--s-2) var(--s-4);
  margin: var(--s-4) 0;
  max-width: 46ch;
  font-weight: 400;
  letter-spacing: 0.005em;
}

/* Hide internal TODO notes from production. They remain in markup for the team. */
.todo-note { display: none; }
