/* ==========================================================================
   WYNES CONSULTING — Shared design system
   One stylesheet for all pages: tokens, base, layout, components, pages.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand colours */
  --navy-900: #0b2239;
  --navy-800: #102e4a;
  --navy-700: #16395c;
  --teal-600: #0b7a75; /* 5.3:1 on white */
  --teal-700: #08615d;
  --teal-100: #e3f3f1;
  --teal-300: #8fd3cb; /* accents on navy */
  --violet-600: #5b3a8c; /* from logo */
  --violet-100: #efe9f7;
  --leaf-500: #7ab648; /* from logo, decorative only */

  /* Neutrals */
  --ink: #1c2733;
  --muted: #4a5868; /* 7.4:1 on white */
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --focus: #f2b84b;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 34, 57, 0.06), 0 2px 6px rgba(11, 34, 57, 0.05);
  --shadow: 0 6px 24px rgba(11, 34, 57, 0.08), 0 2px 6px rgba(11, 34, 57, 0.05);
  --shadow-lg: 0 18px 48px rgba(11, 34, 57, 0.14);

  /* Layout */
  --wrap: 1180px;
  --gutter: 24px;
  --header-h: 108px;
  --logo-h: 116px; /* rendered size of logo.svg (the artwork has ~13% built-in padding, trimmed below) */
}

@media (max-width: 900px) {
  :root { --header-h: 92px; --logo-h: 98px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; --header-h: 82px; --logo-h: 86px; }
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* main stretches to push the footer down on short pages; soft bg avoids a white gap */
main { flex: 1 0 auto; background: var(--bg-soft); }

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

a { color: var(--teal-700); text-underline-offset: 3px; }
a:hover { color: var(--teal-600); }

h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.2; color: var(--navy-900); }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Visually hidden, still read by screen readers & search engines */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- 3. Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  transition: height 0.3s ease;
}

.brand { display: flex; align-items: center; flex: none; }
/* overflow: hidden clips the logo's built-in white padding (see .logo margins below) */
.brand a { display: block; overflow: hidden; border-radius: 6px; }
/* The logo artwork sits inside empty padding (~10% top, ~14% sides/bottom).
   Negative margins trim that padding so the visible mark is large and aligned to the content edge. */
.brand .logo {
  --s: var(--logo-h);
  width: var(--s);
  height: var(--s);
  max-width: none;
  margin: calc(var(--s) * -0.09) calc(var(--s) * -0.125) calc(var(--s) * -0.115) calc(var(--s) * -0.13);
  transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease, transform 0.3s ease;
}
.brand a:hover .logo { transform: scale(1.04); }

/* Compact header once the page is scrolled (desktop & tablet) */
@media (min-width: 601px) {
  .site-header.is-scrolled .header-inner { height: calc(var(--header-h) - 22px); }
  .site-header.is-scrolled .logo { --s: calc(var(--logo-h) * 0.78); }
}

.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a {
  display: block;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--navy-700);
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s;
}
.nav a:hover { background: var(--bg-soft); color: var(--teal-700); }
.nav a[aria-current='page'] { background: var(--teal-100); color: var(--teal-700); }

/* Hamburger button */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--navy-900);
  border-radius: 2px;
  position: relative;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-open .nav-toggle-bar { background: transparent; }
.nav-open .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.35s ease, visibility 0s linear 0.35s;
  }
  .nav-open .nav {
    max-height: 420px;
    visibility: visible;
    transition: max-height 0.35s ease, visibility 0s;
  }
  .nav ul { flex-direction: column; padding: 12px var(--gutter) 20px; }
  .nav a { padding: 13px 16px; font-size: 0.9rem; }
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-light { background: #fff; color: var(--navy-900); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.btn-light:hover { color: var(--navy-900); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }
.btn-primary { background: var(--teal-600); color: #fff; }
.btn-primary:hover { background: var(--teal-700); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }

/* ---------- 5. Hero (home) & page banners (inner pages) ---------- */
.hero,
.page-banner {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(11, 122, 117, 0.45), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(91, 58, 140, 0.35), transparent 60%),
    linear-gradient(135deg, var(--navy-900), var(--navy-700));
}
/* soft dot pattern */
.hero::before,
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
  padding-top: 104px;
  padding-bottom: 112px;
}
.hero-rule,
.banner-rule {
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--leaf-500), #4fc3b6);
  margin-bottom: 28px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 8.4vw, 4.2rem);
  line-height: 1.08;
  overflow-wrap: break-word;
  letter-spacing: 0.01em;
  color: #fff;
  margin-bottom: 20px;
}
.hero .tagline {
  display: block;
  max-width: 30ch;
  margin-bottom: 40px;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  line-height: 1.5;
  color: #cfe9e5;
}
.hero-art { justify-self: end; width: 100%; max-width: 420px; height: auto; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-top: 72px; padding-bottom: 80px; }
  .hero-art { justify-self: start; max-width: 340px; }
}
@media (max-width: 600px) {
  .hero-art { display: none; }
}

.page-banner .wrap { position: relative; padding-top: 72px; padding-bottom: 76px; }
.page-banner h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.15;
  color: #fff;
}
@media (max-width: 600px) {
  .page-banner .wrap { padding-top: 52px; padding-bottom: 56px; }
}

/* ---------- 6. Sections ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
@media (max-width: 820px) { .section { padding: 64px 0; } }

/* minmax(0, …) lets columns shrink below their content's min width (prevents overflow) */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 7. Cards ---------- */
.card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent, var(--teal-600));
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--navy-900);
  margin-bottom: 14px;
}
.card--violet { --accent: var(--violet-600); --chip: var(--violet-100); }
@media (max-width: 600px) { .card { padding: 30px 22px; } }

.icon-chip {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--chip, var(--teal-100));
  color: var(--accent, var(--teal-600));
  margin-bottom: 22px;
}
.icon-chip svg { width: 28px; height: 28px; }

/* Long-form reading text */
.prose { font-size: 1.08rem; line-height: 1.85; color: var(--muted); max-width: 68ch; }
.prose strong { color: var(--navy-900); }

/* ---------- 8. Page specifics ---------- */

/* About */
.about-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.about-layout .card { padding: 48px 44px; }
.about-aside {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--teal-100), var(--violet-100));
  padding: 32px;
  display: grid;
  place-items: center;
  min-height: 100%;
}
.about-aside svg { width: 100%; max-width: 280px; height: auto; }
@media (max-width: 900px) {
  .about-layout { grid-template-columns: minmax(0, 1fr); }
  .about-aside { display: none; }
}
@media (max-width: 600px) { .about-layout .card { padding: 30px 22px; } }

/* Organization profile */
.profile {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 40px;
}
.profile-photo {
  position: relative;
}
.profile-photo::before {
  content: '';
  position: absolute;
  inset: 14px -14px -14px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--teal-600), var(--violet-600));
  opacity: 0.18;
}
.profile-photo img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.profile-role {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--navy-900);
  margin-bottom: 16px;
}
.profile-body p { font-size: 1.05rem; color: var(--muted); line-height: 1.8; margin: 0; }
.profile-body .name {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--teal-700);
  margin-bottom: 6px;
}
@media (max-width: 820px) {
  .profile { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 28px; text-align: left; }
  .profile-photo { max-width: 300px; }
}

/* Services */
.services-card { max-width: 860px; margin: 0 auto; padding: 52px 48px; }
.services-card .prose { max-width: none; }
.services-card a { font-weight: 600; color: var(--teal-700); }
@media (max-width: 600px) { .services-card { padding: 32px 22px; } }

/* Contact */
.contact-card { text-align: left; }
.contact-card .contact-h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--navy-900);
  margin-bottom: 10px;
}
.contact-card p { font-size: 1rem; overflow-wrap: anywhere; }
.contact-card a { font-weight: 600; color: var(--teal-700); }

/* ---------- 9. Footer ---------- */
.site-footer { background: var(--navy-900); color: #d6e0ea; flex-shrink: 0; }
.site-footer .wrap { padding-top: 72px; padding-bottom: 28px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 48px; }
.footer-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--teal-300);
  margin-bottom: 24px;
}
.footer-contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.fc { display: flex; gap: 14px; }
.fc-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: var(--teal-300);
}
.fc-icon svg { width: 20px; height: 20px; }
.fc h5 { margin-bottom: 4px; font-size: 0.8rem; letter-spacing: 0.12em; color: #fff; }
.fc p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: #d6e0ea; overflow-wrap: anywhere; }
.site-footer a { color: #d6e0ea; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-nav a { font-size: 0.88rem; letter-spacing: 0.06em; }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: #b4c2d0;
}
.footer-bottom p { margin: 0; color: #b4c2d0; }
.footer-logo {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 12px;
  padding: 5px;
}
@media (max-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .footer-contacts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 600px) {
  .site-footer .wrap { padding-top: 56px; }
  .hero h1 { letter-spacing: 0; }
  .footer-bottom { flex-direction: column-reverse; align-items: flex-start; }
}

/* ---------- 10. Scroll reveal ---------- */
/* Only hide content when JS is running (html.js), so no-JS visitors see everything */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .brand .logo, .header-inner { transition: none; }
  .card:hover, .btn:hover { transform: none; }
}
