/* YENERI Works — single-page site styles
   Colours are sampled from the supplied logo (approximate; recheck against a vector file). */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/fraunces-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --navy: #2C273C;        /* "ENERI" — body text, headings */
  --green: #52675A;       /* leaf — the single accent: primary button, links, focus */
  --green-dark: #3F5146;  /* hover state of the accent */
  --sage: #959A8C;        /* loop — decorative borders only */
  --taupe: #928F83;       /* "works" — decoration only, never small text */
  --muted: #55516A;       /* secondary text, checked for 4.5:1 on white and tint */
  --line: #DCDFD6;        /* hairlines and card borders (decorative) */
  --tint: #F4F5F1;        /* very light sage section background */
  --white: #FFFFFF;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --measure: 68ch;
  --wrap: 1120px;
  --gutter: 16px;
  --section-pad: clamp(64px, 9vw, 112px);
  --radius: 6px;
  --header-h: 72px;       /* set from JS to the real header height */
}
@media (min-width: 600px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1.125rem;    /* 18px */
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.6em; color: var(--navy); }
h1 { font-size: clamp(2.25rem, 5.4vw, 3.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.625rem); letter-spacing: -0.005em; }
h3 { font-size: clamp(1.375rem, 2.2vw, 1.625rem); font-weight: 500; }
h4 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75em; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }
li::marker { color: var(--green); }
a { color: var(--green); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--green-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
abbr[title] { text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.lead { font-size: clamp(1.1875rem, 1.8vw, 1.375rem); line-height: 1.5; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 12px 16px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 12px 22px;
  font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; line-height: 1.25;
  text-align: center; text-decoration: none; border-radius: var(--radius);
  border: 2px solid var(--green); cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--green); }
.btn-secondary:hover { background: var(--green); color: var(--white); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 1440px; margin: 0 auto; padding: 10px var(--gutter);
}
.brand { display: flex; align-items: center; min-height: 44px; flex: 0 0 auto; margin-right: auto; }
.brand img { height: 36px; width: auto; }
.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 2px;
  color: var(--navy); text-decoration: none; font-size: 1rem; font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--green); }
.nav a[aria-current="true"] { color: var(--green); border-bottom-color: var(--green); }
.header-cta { font-size: 1rem; padding: 10px 20px; min-height: 44px; white-space: nowrap; }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 12px;
  background: var(--white); color: var(--navy);
  border: 1px solid var(--muted); border-radius: var(--radius);
  font: 600 1rem/1 var(--font-body); cursor: pointer;
}
.menu-toggle:hover { border-color: var(--navy); }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 18px; height: 2px; background: currentColor; content: ""; position: relative;
}
.menu-icon::before { position: absolute; top: -6px; }
.menu-icon::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

/* Collapsed menu: a panel under the header */
.nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(44, 39, 60, 0.08);
  padding: 8px var(--gutter) 16px;
}
.nav.is-open a { font-size: 1.125rem; padding: 4px 0; border-bottom: 0; }
.nav.is-open a[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

/* Phones: logo + menu on one row, the primary button on a slim second row */
@media (max-width: 699px) {
  .header-inner { flex-wrap: wrap; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .brand img { height: 30px; }
  .header-cta { order: 3; flex: 1 0 100%; font-size: 0.9375rem; padding: 6px 12px; }
}
/* Wide screens: full nav in the bar */
@media (min-width: 1240px) {
  .menu-toggle { display: none; }
  .nav, .nav.is-open { display: block; position: static; box-shadow: none; border: 0; padding: 0; }
  .nav ul { display: flex; gap: 18px; }
  .nav a { font-size: 0.9688rem; }
  .brand { margin-right: 8px; }
  .nav { margin-left: auto; }
  .brand img { height: 40px; }
}

/* ---------- Sections ---------- */
section[id] { scroll-margin-top: var(--header-h); }
.section { padding: var(--section-pad) 0; }
.section-tint { background: var(--tint); }
.section h2 { max-width: 24ch; }
.section-intro { max-width: var(--measure); margin-bottom: clamp(32px, 5vw, 48px); }
.eyebrow { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }

/* ---------- Home ---------- */
.home { padding-top: clamp(56px, 10vw, 128px); }
.home h1 { max-width: 20ch; margin-bottom: 0.45em; }
.home .lead { max-width: 60ch; margin-bottom: 1.5em; }
.home .intro { max-width: var(--measure); color: var(--navy); }
.tiles {
  list-style: none; padding: 0; margin: clamp(32px, 5vw, 56px) 0 0;
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
@media (min-width: 800px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.tiles li { margin: 0; }
.tile {
  display: flex; flex-direction: column; height: 100%;
  padding: 24px 24px 22px; border: 1px solid var(--line); border-top: 3px solid var(--sage);
  border-radius: var(--radius); background: var(--white);
  color: var(--navy); text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tile-title { display: block; font-family: var(--font-display); font-size: 1.3125rem; font-weight: 600; line-height: 1.25; margin-bottom: 0.5em; }
.tile p { font-size: 1.0625rem; color: var(--muted); margin-bottom: 1.25em; }
.tile .go { margin-top: auto; font-weight: 600; color: var(--green); font-size: 1rem; }
.tile .go::after { content: " \2192"; }
.tile:hover { border-color: var(--sage); border-top-color: var(--green); box-shadow: 0 6px 18px rgba(44, 39, 60, 0.07); color: var(--navy); }
.tile:hover .go { text-decoration: underline; text-underline-offset: 0.18em; }
.tile:focus-visible { border-top-color: var(--green); }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }
.strip {
  margin: clamp(28px, 4vw, 40px) 0 0; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 1rem; color: var(--muted); font-weight: 600;
}
.strip .sep { color: var(--muted); padding: 0 0.35em; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 8px 64px; }
@media (min-width: 960px) { .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.about-grid h3 { margin-top: 0.4em; }
.profile {
  margin-top: clamp(48px, 7vw, 80px); padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--line);
  display: grid; gap: 32px 56px;
}
.profile > h3 { margin: 0; }
@media (min-width: 860px) {
  .profile { grid-template-columns: 300px minmax(0, 1fr); }
  .profile > h3 { grid-column: 1 / -1; }
}
.profile-photo > img { width: 100%; max-width: 360px; border-radius: var(--radius); }
.profile-links { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; max-width: 360px; }
.profile-links li { margin: 0; }
.profile-link {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: var(--radius); color: var(--navy); text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.profile-link:hover { color: var(--navy); border-color: var(--sage); border-left-color: var(--green-dark); box-shadow: 0 4px 14px rgba(44, 39, 60, 0.08); }
.profile-link:hover .profile-link-text { text-decoration: underline; text-underline-offset: 0.18em; }
.profile-link-icon { flex: 0 0 28px; width: 28px; height: 28px; color: var(--green); }
.profile-link-text { display: block; font-weight: 600; line-height: 1.3; }
.profile-link-note { display: block; font-size: 0.875rem; color: var(--muted); line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .profile-link { transition: none; } }
.profile-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin-bottom: 0.6em; }
.profile-body { max-width: var(--measure); }
.expertise { padding: 16px 20px; background: var(--white); border-left: 3px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0; }
.creds { display: flex; gap: 24px; align-items: flex-start; margin-top: 28px; flex-wrap: wrap; }
.creds ul { flex: 1 1 280px; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; flex: 0 0 auto; }
.badges img { width: 96px; height: 96px; mix-blend-mode: multiply; }

/* ---------- Programmes ---------- */
.programmes { display: grid; gap: 24px; }
@media (min-width: 960px) { .programmes { grid-template-columns: 1fr 1fr; gap: 32px; } }
.programme {
  display: flex; flex-direction: column;
  padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white);
}
.programme h3 { font-weight: 600; }
.programme .label { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.programme .details { padding-left: 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0 6px; margin: 4px 0 20px; }
.programme .details li { font-size: 1.0625rem; }
.programme .actions { margin-top: auto; padding-top: 12px; }
.file-note { display: block; margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }

/* ---------- Consultancy ---------- */
.consult-grid { display: grid; gap: 32px 48px; }
@media (min-width: 860px) { .consult-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.consult-grid > div { border-top: 3px solid var(--sage); padding-top: 20px; }
.consult-grid ul { padding-left: 1.1em; }

/* ---------- Visual Capturing gallery ---------- */
.gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.gallery li { margin: 0; }
.gallery button {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); cursor: zoom-in; overflow: hidden; position: relative;
}
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; }
.gallery button:hover { border-color: var(--sage); }
.gallery .enlarge {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(255, 255, 255, 0.94); color: var(--navy);
  font: 600 0.875rem/1 var(--font-body); padding: 8px 10px; border-radius: 4px;
  border: 1px solid var(--line);
}

.lightbox {
  width: min(96vw, 1400px); max-height: 94vh; padding: 0; border: 0; border-radius: var(--radius);
  background: var(--white); color: var(--navy);
}
.lightbox::backdrop { background: rgba(44, 39, 60, 0.82); }
.lightbox figure { margin: 0; padding: 56px 16px 16px; }
.lightbox img { width: auto; max-width: 100%; max-height: calc(94vh - 96px); margin: 0 auto; }
.lightbox figcaption:empty { display: none; }
.lightbox figcaption { padding: 12px 4px 0; font-size: 1rem; color: var(--muted); }
.lightbox .close { position: absolute; top: 8px; right: 8px; min-height: 44px; padding: 8px 16px; }

/* ---------- Who We Work With ---------- */
.client-logos {
  list-style: none; padding: 0; margin: 0 0 clamp(56px, 8vw, 88px);
  display: grid; gap: 28px 24px; grid-template-columns: repeat(2, 1fr); align-items: center;
}
@media (min-width: 600px) { .client-logos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .client-logos { grid-template-columns: repeat(4, 1fr); gap: 36px 32px; } }
.client-logos li { display: flex; justify-content: center; align-items: center; min-height: 64px; margin: 0; }
.client-logos img {
  height: 44px; width: auto; max-width: 160px; object-fit: contain;
  filter: grayscale(1); mix-blend-mode: multiply; opacity: 0.85;
}
/* Near-square crests carry small text; give them more height so they read evenly with wide logos */
.client-logos img.logo-square { height: 68px; }

.testimonials { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .testimonials { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.testimonial {
  margin: 0; padding: clamp(22px, 3vw, 32px); background: var(--white);
  border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: var(--radius);
}
.testimonial blockquote { margin: 0 0 18px; }
.testimonial blockquote p { font-size: 1.0625rem; }
.testimonial blockquote p:last-child { margin-bottom: 0; }
.testimonial figcaption { font-size: 0.9688rem; color: var(--muted); line-height: 1.45; }
.testimonial figcaption strong { display: block; color: var(--navy); font-weight: 600; }

/* ---------- Contact ---------- */
.contact-panel {
  display: grid; gap: 32px 56px;
  padding: clamp(28px, 5vw, 56px); border-radius: var(--radius);
  background: var(--tint); border: 1px solid var(--line);
}
@media (min-width: 900px) { .contact-panel { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.contact-panel h2 { max-width: 20ch; }
.expectation { font-size: clamp(1.1875rem, 1.8vw, 1.375rem); margin-bottom: 0.4em; }
.form-action { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.form-action .note { font-size: 0.9375rem; color: var(--muted); }
.direct { margin: 0; }
.direct dt { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.direct dd { margin: 4px 0 20px; font-size: 1.1875rem; font-weight: 600; color: var(--navy); }
.direct a { display: inline-flex; align-items: center; min-height: 44px; }
.direct dd + dd { margin-top: -16px; }   /* second email option sits directly under the first */

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 1rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0; }
.footer-links a, .footer-plain { display: inline-flex; align-items: center; min-height: 44px; }
/* Plain text (not links), underlined at the project owner's request */
.footer-plain { color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* ---------- Privacy page ---------- */
.legal { padding: clamp(48px, 8vw, 96px) 0; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.legal .prose p { margin-bottom: 1.1em; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; margin-top: 16px; }
