/* =========================================================
   Y's Decision Visa Consultancy, main stylesheet
   Colours and fonts follow the official Y'S DECISION BRAND GUIDELINES:
     Dark green #18392B · Cream #F9EBA6 · Grey #C7C7C7 · Black #000000
     Montserrat (titles/headlines) · Open Sans (body, sub-heads)
   Layout and motion are based on the Airo prototype.
   Change brand values ONLY in :root below.
   ========================================================= */

/* ---------- Self-hosted brand fonts (no Google tracking) ---------- */
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/opensans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/opensans-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/opensans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/opensans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Brand palette (from brand guidelines) */
  --green:        #18392b;  /* primary */
  --cream:        #f9eba6;  /* accent */
  --grey:         #c7c7c7;  /* decorative only, too light for text on white */
  --black:        #000000;

  /* Supporting tints (derived from the palette) */
  --green-dark:   #0f261c;  /* deep sections, footer bar */
  --green-hover:  #224f3c;
  --cream-soft:   #fdf8e4;  /* light section background */
  --surface:      #f7f6f1;  /* cards / alternating sections */
  --border:       #e3e1d8;
  --ink:          #1b201d;  /* body text on light (15:1) */
  --muted:        #4e5a53;  /* secondary text on light (7:1) */
  --on-dark-soft: rgba(255, 255, 255, 0.82);

  /* Fonts */
  --font-heading: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body:    "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  /* Layout & motion */
  --container: 76rem;
  --radius: 6px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 1rem; color: var(--green); }
p { margin: 0 0 1rem; }
a { color: var(--green); text-underline-offset: 3px; }
ul { margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

/* Accessibility helpers */
.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: 1rem; top: -100px; z-index: 100; background: var(--green); color: #fff; padding: .75rem 1rem; border-radius: var(--radius); font-weight: 600; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--cream); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-heading); font-weight: 700; text-decoration: none;
  border-radius: var(--radius); border: 2px solid transparent; cursor: pointer;
  transition: gap .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { gap: .75rem; }
.btn-primary { background: var(--green); color: #fff; }              /* on light backgrounds */
.btn-primary:hover { background: var(--green-hover); }
.btn-cream { background: var(--cream); color: var(--green); }        /* on dark backgrounds */
.btn-cream:hover { background: #fff3c4; }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-sm { padding: .6rem 1.15rem; font-size: .85rem; }
.btn-lg { padding: .95rem 1.75rem; font-size: 1rem; }

.text-link {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--green); font-family: var(--font-heading); font-weight: 700; font-size: .875rem; text-decoration: none;
  transition: gap .2s var(--ease);
}
.text-link:hover { gap: .75rem; text-decoration: underline; }

/* Short accent rule above titles */
.rule { display: block; width: 3rem; height: 3px; background: var(--green); margin-bottom: 1.25rem; border-radius: 2px; }
.on-dark .rule { background: var(--cream); }

.eyebrow {
  display: inline-block; margin-bottom: 1rem;
  font-family: var(--font-heading); font-size: .75rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--green);
}
.on-dark .eyebrow { color: var(--cream); }

/* ---------- Header (white so the full-colour logo always reads) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: #fff; border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(15, 38, 28, .08); border-color: var(--border); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo img { width: 180px; height: auto; }
@media (min-width: 1024px) { .logo img { width: 200px; } }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { list-style: none; display: flex; gap: 1.6rem; }
.site-nav ul a {
  position: relative; color: var(--ink); text-decoration: none;
  font-family: var(--font-heading); font-size: .9rem; font-weight: 600; padding: .25rem 0;
}
.site-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--green);
  transition: right .25s var(--ease);
}
.site-nav ul a:hover::after, .site-nav ul a[aria-current="page"]::after { right: 0; }
.site-nav ul a[aria-current="page"] { color: var(--green); }

/* Mobile menu */
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.menu-bar, .menu-bar::before, .menu-bar::after {
  content: ""; position: absolute; left: 10px; width: 24px; height: 2px; background: var(--green);
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.menu-bar { top: 21px; }
.menu-bar::before { left: 0; top: -7px; }
.menu-bar::after { left: 0; top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bar::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #fff;
    flex-direction: column; align-items: stretch; gap: 2rem; padding: 2rem 1.25rem;
    transform: translateX(100%); visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s;
  }
  .site-nav.is-open { transform: none; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; font-size: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
  .site-nav ul a::after { display: none; }
}

main { padding-top: var(--header-h); }

/* ---------- Home hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 600px at 85% 20%, rgba(249,235,166,.10), transparent 60%),
    linear-gradient(135deg, var(--green-dark) 0%, var(--green) 70%);
  min-height: calc(62vh - var(--header-h)); display: flex; align-items: center;
}
.hero-content { position: relative; z-index: 1; padding-top: 3rem; padding-bottom: 3rem; }
.hero-text { max-width: 44rem; }
.hero h1 { color: #fff; font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.25rem); line-height: 1.1; margin-bottom: 1.1rem; letter-spacing: -.01em; }
.hero h1 .accent { color: var(--cream); }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--on-dark-soft); max-width: 38rem; margin-bottom: 1.75rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Hero entrance animation */
.hero-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.75rem; align-items: center; }
@media (min-width: 960px) { .hero-content { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; } }
.hero-text > * { animation: rise .8s var(--ease) both; }
.hero-text > *:nth-child(2) { animation-delay: .1s; }
.hero-text > *:nth-child(3) { animation-delay: .2s; }
.hero-text > *:nth-child(4) { animation-delay: .3s; }
.hero-flags { list-style: none; margin: 0; padding: 0; justify-self: center; display: grid; grid-template-columns: repeat(2, auto); justify-content: center;
  gap: 1rem 1.75rem; animation: rise .8s var(--ease) .35s both; }
/* Canada on its own row, then Australia + New Zealand, then United Kingdom + Ireland */
.hero-flags li { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; }
.hero-flags li:nth-child(1) { grid-column: 1 / -1; }
.hero-flags img { display: block; width: 7.5rem; height: 3.75rem; object-fit: cover; object-position: center; border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.35); transition: transform .3s var(--ease); }
.hero-flags li:hover img { transform: scale(1.05); }
.hero-flags span { font-family: var(--font-heading); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream); }
@media (min-width: 960px) { .hero-flags { gap: 1.1rem 2.25rem; } .hero-flags img { width: 9rem; height: 4.5rem; } .hero-flags span { font-size: .82rem; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Inner-page hero ---------- */
.page-hero {
  position: relative; overflow: hidden; color: #fff; padding: 4.5rem 0 4rem;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}
.page-hero h1 { color: #fff; font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .75rem; position: relative; z-index: 1; }
.page-hero p { color: var(--on-dark-soft); max-width: 40rem; margin: 0; position: relative; z-index: 1; font-size: 1.1rem; }
.page-hero .eyebrow { position: relative; z-index: 1; }

/* ---------- Highlights strip ---------- */
.highlights { background: var(--cream-soft); border-bottom: 1px solid var(--border); padding: 2.5rem 0; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; text-align: center; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-value { font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.35rem, 3vw, 1.75rem); color: var(--green); margin: 0 0 .2rem; }
.stat-label { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--surface); }
.section-dark { background: var(--green); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 3.25rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin: 0; }
.section-head p { color: var(--muted); max-width: 30rem; margin: 0; }
.section-dark .section-head p { color: var(--on-dark-soft); }
@media (min-width: 900px) { .section-head { flex-direction: row; justify-content: space-between; align-items: flex-end; } }

/* ---------- Service cards (home) ---------- */
/* 1px gap on a tinted background draws the thin lines between cards */
.card-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 640px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }
/* an odd last card fills the empty cell so no grey gap shows */
@media (min-width: 640px) and (max-width: 1023px) { .card-grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .card-grid > li:last-child:nth-child(4n+3) { grid-column: span 2; } }
.card {
  background: #fff; padding: 2.25rem 1.75rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem;
  transition: background-color .3s var(--ease);
}
.card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.card p { font-size: .92rem; color: var(--muted); margin: 0; }
.card-line { display: block; width: 2rem; height: 3px; border-radius: 2px; background: var(--cream); box-shadow: inset 0 0 0 1px rgba(24,57,43,.15); margin-bottom: 1.25rem; transition: width .3s var(--ease), background-color .3s var(--ease); }
.card:hover, .card:focus-within { background: var(--cream-soft); }
.card:hover .card-line, .card:focus-within .card-line { width: 4rem; background: var(--green); box-shadow: none; }
.card:hover .text-link { gap: .75rem; }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; position: relative; padding-top: 3.5rem; }
.step::before {
  content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0;
  font-family: var(--font-heading); font-weight: 800; font-size: 2.25rem; line-height: 1; color: var(--cream);
}
.step h3 { color: #fff; font-size: 1.1rem; }
.step p { color: var(--on-dark-soft); font-size: .95rem; margin: 0; }

/* ---------- Values ---------- */
.values { list-style: none; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .values { grid-template-columns: repeat(2, 1fr); } }
.value { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 1.75rem; }
.value h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.value p { color: var(--muted); margin: 0; }

/* ---------- Program chips ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .65rem; }
.chips li {
  background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .55rem 1.1rem;
  font-family: var(--font-heading); font-size: .88rem; font-weight: 600; color: var(--green);
}

/* ---------- Two-column prose (about) ---------- */
.split { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }
.prose p { color: var(--muted); font-size: 1.04rem; }

/* ---------- Services page detail blocks ---------- */
.service-list { display: grid; gap: 1.25rem; }
.service-item {
  display: grid; gap: .5rem 2.5rem; grid-template-columns: 1fr; padding: 2.25rem 0; border-top: 1px solid var(--border);
}
.service-item:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .service-item { grid-template-columns: 18rem 1fr; } }
.service-item .num { font-family: var(--font-heading); font-weight: 800; color: var(--green); opacity: .35; font-size: .95rem; letter-spacing: .1em; }
.service-item h2 { font-size: 1.45rem; font-weight: 800; margin-bottom: .25rem; }
.service-item p { color: var(--muted); }
.service-item p:last-child { margin-bottom: 0; }

/* ---------- FAQ accordion (native <details>, works without JS) ---------- */
.faq { max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.35rem 3rem 1.35rem 0; position: relative;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.08rem; color: var(--green);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .5rem; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq summary:hover { color: var(--green-hover); }
.faq .answer { padding: 0 0 1.5rem; color: var(--muted); }
.faq .answer ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.faq .answer li { margin-bottom: .3rem; }
.faq-group { margin-bottom: 3.5rem; }
.faq-group > h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 1.25rem; }
.note {
  background: var(--cream-soft); border: 1px solid #efe1a0; border-radius: var(--radius);
  padding: 1rem 1.25rem; font-size: .92rem; color: var(--ink);
}

/* ---------- Contact page ---------- */
.contact-grid { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.25fr; } }
.contact-list { list-style: none; display: grid; gap: 1.25rem; margin-bottom: 2rem; }
.contact-list li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 1rem; align-items: start; }
.contact-icon { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--cream-soft); color: var(--green); display: grid; place-items: center; }
.contact-list h3 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .15rem; color: var(--muted); }
.contact-list p, .contact-list a { margin: 0; font-weight: 600; color: var(--ink); }
.contact-list a { color: var(--green); }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .4rem; }
.form-card > p { color: var(--muted); }
.form-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field .req { color: #9b1c1c; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #b9bdb5; border-radius: var(--radius); padding: .75rem .85rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(24,57,43,.18); }
.field [aria-invalid="true"] { border-color: #9b1c1c; }
.field-hint { font-size: .82rem; color: var(--muted); margin: .3rem 0 0; }
.field-error { font-size: .85rem; color: #9b1c1c; margin: .3rem 0 0; font-weight: 600; }
.field-error:empty { display: none; }
.field label.check, .check { display: grid; grid-template-columns: 1.25rem 1fr; gap: .65rem; align-items: start; font-size: .92rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--green); }
.form-status { margin-top: 1.25rem; padding: 1rem 1.25rem; border-radius: var(--radius); font-weight: 600; }
.form-status[hidden] { display: none; }
.form-status.is-success { background: #e7f3ec; color: #14532d; border: 1px solid #b7dcc4; }
.form-status.is-error { background: #fdecec; color: #8a1c1c; border: 1px solid #f3c2c2; }

/* ---------- Legal/prose page ---------- */
.legal { max-width: 48rem; }
.legal h2 { font-size: 1.35rem; font-weight: 800; margin-top: 2.5rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.25rem; margin-bottom: 1rem; }

/* ---------- Call to action band ---------- */
.cta { background: var(--green-dark); color: #fff; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(to right, transparent, var(--cream), transparent); opacity: .6; }
.cta-inner { display: flex; flex-direction: column; gap: 2rem; }
.cta h2 { color: #fff; font-weight: 800; font-size: clamp(1.9rem, 4.5vw, 3rem); }
.cta p { color: var(--on-dark-soft); max-width: 36rem; margin: 0; }
.cta-action { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.cta-action .small { font-size: .88rem; color: var(--on-dark-soft); margin: 0; }
@media (min-width: 900px) { .cta-inner { flex-direction: row; align-items: center; justify-content: space-between; } .cta-action { align-items: flex-end; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: .93rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; padding-top: 4rem; padding-bottom: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.4fr 1.2fr; } }
.footer-grid .logo img { width: 190px; margin-bottom: 1rem; }
.footer-title { font-family: var(--font-heading); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: 1rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--green); text-decoration: underline; }
.site-footer .social-links { display: flex; gap: .6rem; margin-top: 1.1rem; }
.site-footer .social-links li { margin: 0; }
.site-footer .social-links a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1.5px solid var(--border); color: var(--green);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.site-footer .social-links a:hover { background: var(--green); border-color: var(--green); color: #fff; text-decoration: none; }
.footer-legal { background: var(--green); color: var(--on-dark-soft); font-size: .82rem; padding: 1.5rem 0; }
.footer-legal p { margin: 0 0 .5rem; }
.footer-legal p:last-child { margin: 0; }
.footer-legal a { color: var(--cream); }

/* ---------- Scroll reveal (enabled by main.js) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   CLIENT GALLERY
   - .carousel : swipeable photo strip (home + gallery page)
   - .masonry  : full photo wall (gallery page)
   - .lightbox : full-screen viewer (<dialog>)
   ========================================================= */

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel-track {
  list-style: none; margin: 0; padding: .5rem 1.25rem 1.5rem;
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.25rem; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
  .carousel-track { padding-inline: max(2.5rem, calc((100vw - var(--container)) / 2 + 2.5rem)); scroll-padding-inline: max(2.5rem, calc((100vw - var(--container)) / 2 + 2.5rem)); }
}
.carousel-item { flex: 0 0 auto; scroll-snap-align: start; }
.photo-btn {
  display: block; padding: 0; border: 0; background: var(--surface); cursor: zoom-in;
  border-radius: 14px; overflow: hidden; position: relative;
  box-shadow: 0 10px 30px rgba(15, 38, 28, .12);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.photo-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .45s var(--ease); }
.photo-btn::after { /* soft green sheen on hover */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to top, rgba(24,57,43,.35), transparent 45%); opacity: 0; transition: opacity .45s var(--ease);
}
.photo-btn:hover, .photo-btn:focus-visible { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15, 38, 28, .2); }
.photo-btn:hover img, .photo-btn:focus-visible img { transform: scale(1.05); }
.photo-btn:hover::after, .photo-btn:focus-visible::after { opacity: 1; }
.photo-btn:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.carousel .photo-btn { height: clamp(260px, 42vw, 420px); }
.carousel .photo-btn.is-portrait { width: calc(clamp(260px, 42vw, 420px) * .75); }
.carousel .photo-btn.is-landscape { width: calc(clamp(260px, 42vw, 420px) * 1.33); }
.carousel .photo-btn.is-square { width: clamp(260px, 42vw, 420px); }

.carousel-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .25rem; }
.carousel-progress { flex: 1; height: 3px; background: var(--border); border-radius: 3px; overflow: hidden; max-width: 22rem; }
.carousel-progress span { display: block; height: 100%; width: 0; background: var(--green); border-radius: 3px; transition: width .2s linear; }
.carousel-buttons { display: flex; gap: .6rem; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--green); background: #fff; color: var(--green); cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { background: var(--green); color: #fff; }
.icon-btn:active { transform: scale(.94); }
.icon-btn[disabled] { opacity: .35; cursor: default; background: #fff; color: var(--green); }
.section-dark .icon-btn, .on-dark .icon-btn { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.section-dark .icon-btn:hover { background: var(--cream); border-color: var(--cream); color: var(--green); }

/* ---------- Masonry wall ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-btn {
  font-family: var(--font-heading); font-weight: 700; font-size: .85rem; color: var(--green);
  background: #fff; border: 1.5px solid var(--border); border-radius: 999px; padding: .55rem 1.15rem; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.filter-btn:hover { border-color: var(--green); }
.filter-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.masonry { list-style: none; margin: 0; padding: 0; columns: 2 160px; column-gap: .75rem; }
@media (min-width: 640px)  { .masonry { columns: 3; column-gap: 1rem; } }
@media (min-width: 1024px) { .masonry { columns: 4; column-gap: 1.1rem; } }
.masonry li { break-inside: avoid; margin-bottom: .75rem; }
@media (min-width: 640px) { .masonry li { margin-bottom: 1rem; } }
.masonry li[hidden] { display: none; }
.masonry .photo-btn { width: 100%; border-radius: 12px; box-shadow: 0 6px 18px rgba(15, 38, 28, .1); }
.masonry .photo-btn img { height: auto; }

/* Fade-in as each photo loads */
.photo-btn img { opacity: 0; }
.photo-btn img.is-loaded, .no-js .photo-btn img { opacity: 1; transition: opacity .5s var(--ease), transform .7s var(--ease); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0;
  background: rgba(8, 20, 15, .96); color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 20, 15, .9); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; animation: lb-in .3s var(--ease); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; }
.lb-count { font-family: var(--font-heading); font-weight: 700; font-size: .9rem; letter-spacing: .08em; color: var(--on-dark-soft); }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 4.5rem; touch-action: pan-y; }
.lb-stage img {
  max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); user-select: none; -webkit-user-drag: none;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}
.lb-stage img.is-switching { opacity: 0; transform: scale(.97); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lightbox .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); color: #fff; }
.lightbox .icon-btn:hover { background: var(--cream); border-color: var(--cream); color: var(--green); }
.lightbox :focus-visible { outline-color: var(--cream); }
.lb-thumbs { display: flex; gap: .5rem; overflow-x: auto; padding: 1rem 1.25rem 1.25rem; scrollbar-width: none; justify-content: flex-start; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumbs button { flex: 0 0 auto; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; opacity: .5; transition: opacity .2s var(--ease), border-color .2s var(--ease); }
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button:hover { opacity: .85; }
.lb-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--cream); }
@media (max-width: 640px) {
  .lb-stage { padding: 0 .75rem; }
  .lb-nav { top: auto; bottom: -.25rem; transform: none; }
  .lb-prev { left: calc(50% - 56px); } .lb-next { right: calc(50% - 56px); }
  .lightbox[open] { grid-template-rows: auto minmax(0,1fr) 4.5rem; }
  .lb-stage img { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
  .lb-thumbs { display: none; }
}
body.lb-open { overflow: hidden; }

/* ---------- Gallery stats band ---------- */
.gallery-intro { display: flex; flex-wrap: wrap; gap: 2rem 3.5rem; margin-top: 1.75rem; position: relative; z-index: 1; }
.gallery-intro div { font-family: var(--font-heading); }
.gallery-intro strong { display: block; font-size: 2rem; font-weight: 800; color: var(--cream); line-height: 1.1; }
.gallery-intro span { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-soft); }

@media (prefers-reduced-motion: reduce) {
  .photo-btn img { opacity: 1 !important; }
  .carousel-track { scroll-behavior: auto; }
}

/* =========================================================
   SMOOTH PAGE TRANSITIONS (cross-document View Transitions)
   When moving between pages, the header stays still and the
   page content fades/glides in, no white flash.
   Supported: Chrome & Edge 126+, Safari 18.2+. Other browsers
   simply load pages normally (no code needed).
   ========================================================= */
@view-transition { navigation: auto; }

/* Name the parts that animate separately */
.site-header { view-transition-name: site-header; }
main         { view-transition-name: page-content; }

/* Header: no animation, it stays perfectly still */
::view-transition-old(site-header),
::view-transition-new(site-header) { animation: none; mix-blend-mode: normal; }

/* Page content: old page fades up and out, new page glides in */
::view-transition-old(page-content) {
  animation: vt-out .22s cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(page-content) {
  animation: vt-in .42s cubic-bezier(0, 0, 0.2, 1) .06s both;
}
/* Everything else (e.g. footer) cross-fades quickly */
::view-transition-old(root) { animation: vt-fade-out .2s ease both; }
::view-transition-new(root) { animation: vt-fade-in .35s ease both; }

@keyframes vt-out     { to   { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in      { from { opacity: 0; transform: translateY(18px); } }
@keyframes vt-fade-out{ to   { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* Respect visitors who prefer less motion: instant swap, no movement */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Office map (Contact page) ---------- */
.map-card { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); box-shadow: 0 18px 44px rgba(15, 38, 28, .12); }
.map-frame { display: block; width: 100%; height: clamp(360px, 52vw, 520px); border: 0; }
.map-overlay { position: absolute; left: 1.25rem; top: 1.25rem; display: flex; flex-direction: column; gap: .75rem; max-width: 22rem; pointer-events: none; }
.map-overlay > * { pointer-events: auto; }
.map-pin-card { display: grid; grid-template-columns: 2.75rem 1fr; gap: .85rem; align-items: center;
  background: #fff; border-radius: 14px; padding: .9rem 1.1rem; box-shadow: 0 10px 28px rgba(15, 38, 28, .18); }
.map-pin { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--cream); }
.map-name { font-family: var(--font-heading); font-weight: 800; color: var(--green); margin: 0 0 .15rem; font-size: .98rem; }
.map-addr { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.45; }
.map-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-ghost { background: #fff; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--cream-soft); }
@media (max-width: 640px) {
  .map-overlay { position: static; max-width: none; padding: 1rem; background: var(--surface); }
  .map-pin-card { box-shadow: none; border: 1px solid var(--border); }
  .map-frame { height: 320px; }
}

/* =========================================================
   HOME HERO, plain green banner (owner removed the Y emblem
   and cream curve, Oct 2026). No logo or watermark in the hero.
   ========================================================= */
.hero::after { display: none; }                       /* no faint Y watermark */
.hero .hero-content > * { max-width: 40rem; }

/* Phones & tablets: banner hugs its text instead of filling the screen */
@media (max-width: 900px) {
  .hero { min-height: 0; }
}
/* ---------- Partner institutions (country pages) ---------- */
.pi-tabs { background: var(--cream-soft); border-bottom: 1px solid var(--border); position: relative; z-index: 2; }
.pi-tabs ul { list-style: none; margin: 0; padding: .6rem 0; display: flex; gap: .5rem; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.pi-tabs a { display: inline-block; padding: .55rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; color: var(--green);
  font-family: var(--font-heading); font-weight: 700; font-size: .85rem; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.pi-tabs a:hover { border-color: var(--green); }
.pi-tabs a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }
.pi-count { margin-top: 1rem; font-size: 1.05rem; }
.pi-count strong { color: var(--cream); font-family: var(--font-heading); font-size: 1.5rem; margin-right: .25rem; }
.pi-tools { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 640px) { .pi-tools { grid-template-columns: 1.4fr 1fr 1fr; } }
.pi-field { display: flex; flex-direction: column; gap: .35rem; }
.pi-field label { font-family: var(--font-heading); font-weight: 700; font-size: .8rem; letter-spacing: .04em; color: var(--green); }
.pi-field input, .pi-field select { font: inherit; width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: var(--ink); }
.pi-field input:focus, .pi-field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(24,57,43,.15); }
.pi-status { margin: 0 0 1.25rem; color: var(--muted); font-size: .9rem; }
.pi-empty { text-align: center; color: var(--muted); padding: 2rem 0; }
.pi-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .pi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pi-grid { grid-template-columns: repeat(3, 1fr); } }
.pi-grid li[hidden] { display: none; }
.pi-card { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.pi-card:hover { transform: translateY(-2px); border-color: rgba(24,57,43,.35); box-shadow: 0 10px 24px rgba(15,38,28,.09); }
.pi-logo { flex: 0 0 120px; width: 120px; height: 64px; background: #fff; border: 1px solid var(--border); border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.pi-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.pi-initials { background: var(--cream-soft); color: var(--green); font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; letter-spacing: .02em; }
.pi-body { min-width: 0; }
.pi-body h3 { font-size: 1rem; line-height: 1.3; margin: 0 0 .25rem; overflow-wrap: anywhere; }
.pi-meta { margin: 0 0 .25rem; font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--green); }
.pi-group + .pi-group { margin-top: 2.5rem; }
.pi-group[hidden] { display: none; }
.pi-group-title { font-size: 1.35rem; margin: 0 0 1rem; }
.pi-group-title span { color: var(--muted); font-weight: 600; font-size: 1rem; }
.pi-by { margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.pi-link { font-weight: 700; font-size: .9rem; color: var(--green); }
.pi-ask { margin: 0; font-size: .9rem; color: var(--muted); }
.pi-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .pi-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pi-tiles { grid-template-columns: repeat(4, 1fr); } }
.pi-tile { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.pi-tile h2 { font-size: 1.35rem; margin: 0; }
.pi-tile p { margin: 0; }
.pi-tile .pi-tile-count { font-family: var(--font-heading); font-weight: 700; color: var(--green); }
.pi-tile .btn { margin-top: auto; }
.pi-note-wrap { padding: 1.25rem 0; background: var(--surface); }
.pi-note { margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }
