/*
Home V3 — full redesign (preview)
Loaded only by preview.php. Fresh markup (hp- prefix), so main.css
homepage rules don't apply; only global chrome (header/footer/fonts) does.
Brand: navy #31485a | blue #3399d1
*/

:root{
  --hp_navy:#31485a;
  --hp_navy_deep:#16242f;
  --hp_blue:#3399d1;
  --hp_ink:#22323f;
  --hp_muted:#5c6f7e;
  --hp_line:#e3eaf0;
  --hp_bg_soft:#f6f8fa;
  --hp_ease:cubic-bezier(.22,1,.36,1);
}

/* ---------- reveal system ---------- */
.hp-reveal{
  opacity:0;
  transform:translateY(30px);
  transition:opacity 1s var(--hp_ease), transform 1s var(--hp_ease);
  transition-delay:var(--d,0ms);
  will-change:opacity,transform;
}
.hp-reveal.hp-in{ opacity:1; transform:none; }

.hp-wrap{
  width:1200px;
  max-width:92vw;
  margin-inline:auto;
}
html{ scroll-behavior:smooth; }

/* frosted glass header over the hero */
header .w1200{
  background:rgba(245,244,244,.78);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.55);
}

/* ---------- 1. HERO ---------- */
#hp-hero{
  position:relative;
  width:100%;
  height:min(86vh,780px);
  min-height:600px;
  overflow:hidden;
  background:var(--hp_navy_deep);
}
#hp-hero .swiper{ position:absolute; inset:0; }
.hp-slide{
  position:relative;
  overflow:hidden;
}
.hp-slide::before{
  content:'';
  position:absolute;
  inset:0;
  background:inherit;
}
.swiper-slide-active.hp-slide::before{
  animation:hp_kb 8s var(--hp_ease) forwards;
}
@keyframes hp_kb{
  from{ transform:scale(1); }
  to{ transform:scale(1.08); }
}
/* readability scrim */
#hp-hero .hp-scrim{
  position:absolute;
  inset:0;
  z-index:2;
  background:
    linear-gradient(75deg, rgba(16,30,41,.86) 0%, rgba(16,30,41,.55) 48%, rgba(16,30,41,.22) 100%);
  pointer-events:none;
}
[dir="rtl"] #hp-hero .hp-scrim{
  background:
    linear-gradient(-75deg, rgba(16,30,41,.86) 0%, rgba(16,30,41,.55) 48%, rgba(16,30,41,.22) 100%);
}
#hp-hero .hp-scrim::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:0;
  height:160px;
  background:linear-gradient(180deg, transparent, rgba(16,30,41,.55));
}

.hp-hero-inner{
  position:relative;
  z-index:3;
  height:100%;
  display:grid;
  grid-template-columns:7fr 5fr;
  gap:48px;
  align-items:center;
  padding-top:71px; /* fixed header */
}
.hp-eyebrow{
  display:inline-block;
  font-family:'Montserrat',sans-serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:3px;
  text-transform:uppercase;
  color:var(--hp_blue);
  margin-bottom:16px;
}
.hp-eyebrow::before{
  content:'';
  display:inline-block;
  width:34px;
  height:2px;
  background:var(--hp_blue);
  vertical-align:middle;
  margin-inline-end:10px;
}
.hp-hero-title{
  font-family:'Montserrat',sans-serif;
  font-size:clamp(34px,4.4vw,54px);
  font-weight:800;
  line-height:1.12;
  letter-spacing:-1px;
  color:#fff;
  margin:0 0 18px;
}
.hp-hero-sub{
  font-size:18px;
  line-height:1.6;
  color:rgba(255,255,255,.85);
  max-width:540px;
  margin-bottom:30px;
}
.hp-cta-row{ display:flex; gap:14px; flex-wrap:wrap; }
.hp-btn{
  display:inline-block;
  font-family:'Montserrat',sans-serif;
  font-size:15px;
  font-weight:600;
  padding:13px 26px;
  border-radius:6px;
  background:var(--hp_blue);
  color:#fff !important;
  position:relative;
  overflow:hidden;
  transition:background .25s ease, transform .25s var(--hp_ease);
}
.hp-btn:hover{ background:#2585ba; transform:translateY(-2px); }
.hp-btn::after{
  content:'';
  position:absolute;
  top:0; left:-130%;
  width:80%; height:100%;
  background:rgba(255,255,255,.2);
  transform:skewX(-20deg);
  transition:left .7s var(--hp_ease);
}
.hp-btn:hover::after{ left:150%; }
.hp-btn-ghost{
  background:transparent;
  border:1.5px solid rgba(255,255,255,.55);
}
.hp-btn-ghost:hover{
  background:rgba(255,255,255,.12);
  border-color:#fff;
}

/* grant — floating glass card */
.hp-grant{
  background:rgba(255,255,255,.09);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border:1px solid rgba(255,255,255,.22);
  border-radius:16px;
  padding:28px;
  color:#fff;
  box-shadow:0 24px 60px rgba(0,0,0,.28);
}
.hp-chip{
  display:inline-block;
  font-family:'Montserrat',sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:2px;
  text-transform:uppercase;
  color:#fff;
  background:var(--hp_blue);
  border-radius:4px;
  padding:5px 10px;
  margin-bottom:14px;
}
.hp-grant-title{
  font-family:'Montserrat',sans-serif;
  font-size:22px;
  font-weight:700;
  line-height:1.3;
  margin-bottom:10px;
}
.hp-grant-summary{
  font-size:14px;
  line-height:1.6;
  color:rgba(255,255,255,.82);
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  margin-bottom:16px;
}
.hp-grant-deadline{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:600;
  color:rgba(255,255,255,.9);
  border-top:1px solid rgba(255,255,255,.18);
  padding-top:14px;
  margin-bottom:18px;
}
.hp-grant-deadline i{ font-size:17px; color:var(--hp_blue); }
.hp-grant-actions{ display:flex; align-items:center; gap:16px; }
.hp-btn-light{
  background:#fff;
  color:var(--hp_navy) !important;
}
.hp-btn-light:hover{ background:#eaf3fa; }
.hp-grant-faq{
  font-size:13px;
  color:rgba(255,255,255,.75) !important;
  border-bottom:1px dashed rgba(255,255,255,.4);
  transition:color .2s ease;
}
.hp-grant-faq:hover{ color:#fff !important; }

/* hero pagination — thin bars, bottom start side */
#hp-hero .swiper-pagination{
  position:absolute;
  bottom:26px !important;
  top:auto !important;
  inset-inline-start:max(4vw,calc(50vw - 600px)) !important;
  left:auto;
  width:auto !important;
  z-index:4;
}
#hp-hero .swiper-pagination-bullet{
  background:#fff;
  opacity:.45;
  width:26px;
  height:3px;
  border-radius:2px;
  transition:all .35s var(--hp_ease);
}
#hp-hero .swiper-pagination-bullet-active{
  background:var(--hp_blue);
  opacity:1;
  width:44px;
}

/* ---------- 2. STATS — card overlapping the hero ---------- */
#hp-stats{
  position:relative;
  z-index:5;
  margin-top:-72px;
}
.hp-stats-card{
  background:#fff;
  border-radius:18px;
  box-shadow:0 30px 70px rgba(22,36,47,.16);
  padding:34px 38px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
}
.hp-stat{
  padding:4px 28px;
  border-inline-start:1px solid var(--hp_line);
}
.hp-stat:first-child{
  border-inline-start:none;
  padding-inline-start:4px;
}
.hp-stat-icon i{
  font-size:30px;
  color:var(--hp_blue);
}
.hp-stat-num{
  font-family:'Montserrat',sans-serif;
  font-size:38px;
  font-weight:800;
  letter-spacing:-1px;
  color:var(--hp_navy);
  line-height:1.15;
  font-variant-numeric:tabular-nums;
}
.hp-stat-num span{ color:var(--hp_blue); }
.hp-stat-label{
  font-size:13.5px;
  color:var(--hp_muted);
  line-height:1.45;
  padding-top:6px;
}

/* ---------- section headers ---------- */
.hp-sec-head{
  text-align:center;
  max-width:660px;
  margin:0 auto 46px;
}
.hp-sec-head .hp-eyebrow{ margin-bottom:12px; }
.hp-sec-head .hp-eyebrow::before{ display:none; }
.hp-sec-head .hp-eyebrow::after{
  content:'';
  display:block;
  width:40px;
  height:3px;
  background:var(--hp_blue);
  margin:10px auto 0;
  transform:scaleX(0);
  transition:transform .8s var(--hp_ease) .3s;
}
.hp-sec-head.hp-in .hp-eyebrow::after{ transform:scaleX(1); }
.hp-sec-title{
  font-family:'Montserrat',sans-serif;
  font-size:clamp(28px,3vw,36px);
  font-weight:800;
  letter-spacing:-.6px;
  color:var(--hp_ink);
  margin:0 0 14px;
}
.hp-sec-sub{
  font-size:16.5px;
  line-height:1.6;
  color:var(--hp_muted);
}

/* ---------- 3. INSTRUMENTS — editorial duo ---------- */
#hp-instruments{ padding:96px 0 0; }
.hp-duo{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}
.hp-duo-panel{
  position:relative;
  aspect-ratio:2/1;
  min-height:220px;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(16,30,41,.10);
  transition:transform .5s var(--hp_ease), box-shadow .5s var(--hp_ease);
}
/* image layer — sits under the scrim so it can zoom on hover without cropping at rest */
.hp-duo-panel::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:0;
  background:inherit;
  transition:transform 1.3s var(--hp_ease);
}
/* blue ring accent that fades in on hover */
.hp-duo-panel::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:3;
  border-radius:18px;
  border:2px solid transparent;
  pointer-events:none;
  transition:border-color .4s ease;
}
.hp-duo-panel:hover{
  transform:translateY(-7px);
  box-shadow:0 24px 54px rgba(16,30,41,.24);
}
.hp-duo-panel:hover::before{ transform:scale(1.06); }
.hp-duo-panel:hover::after{ border-color:rgba(51,153,209,.55); }
/* dark on the left (behind text), clear on the right (reveals the graphic) */
.hp-duo-scrim{
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(90deg, rgba(16,30,41,.85) 0%, rgba(16,30,41,.5) 40%, rgba(16,30,41,0) 66%);
}
.hp-duo-content{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  width:56%;
  box-sizing:border-box;
  z-index:2;
  padding:28px 30px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.hp-duo-num{
  font-family:'Montserrat',sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:3px;
  color:var(--hp_blue);
  margin-bottom:8px;
}
.hp-duo-title{
  font-family:'Montserrat',sans-serif;
  font-size:22px;
  font-weight:800;
  color:#fff;
  line-height:1.22;
  margin-bottom:9px;
}
.hp-duo-summary{
  font-size:13.5px;
  line-height:1.55;
  color:rgba(255,255,255,.85);
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
  margin-bottom:15px;
}
.hp-duo-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:'Montserrat',sans-serif;
  font-size:14.5px;
  font-weight:600;
  color:#fff !important;
  padding-bottom:3px;
  border-bottom:2px solid var(--hp_blue);
  transition:border-color .25s ease, gap .3s var(--hp_ease);
}
.hp-duo-link:hover{ border-color:#fff; gap:12px; }
.hp-duo-link i{ font-size:20px; color:var(--hp_blue); }

/* ---------- 4. ABOUT — offset frame photo + editorial text ---------- */
#hp-about{
  margin-top:96px;
  background:var(--hp_bg_soft);
  padding:96px 0;
}
.hp-about-grid{
  display:grid;
  grid-template-columns:minmax(0,5fr) minmax(0,6fr);
  gap:72px;
  align-items:center;
}
.hp-about-photo{
  position:relative;
}
.hp-about-photo::after{
  content:'';
  position:absolute;
  inset:0;
  border:2.5px solid var(--hp_blue);
  border-radius:18px;
  transform:translate(18px,18px);
  z-index:0;
  transition:transform .6s var(--hp_ease);
}
[dir="rtl"] .hp-about-photo::after{ transform:translate(-18px,18px); }
.hp-about-photo:hover::after{ transform:translate(10px,10px); }
[dir="rtl"] .hp-about-photo:hover::after{ transform:translate(-10px,10px); }
.hp-about-photo picture,
.hp-about-photo img{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  border-radius:18px;
  object-fit:cover;
}
.hp-about-text{ text-align:start; min-width:0; padding-inline-start:24px; }
.hp-about-text .hp-eyebrow{ margin-bottom:10px; }
.hp-about-title{
  font-family:'Montserrat',sans-serif;
  font-size:clamp(26px,2.8vw,34px);
  font-weight:800;
  letter-spacing:-.5px;
  color:var(--hp_ink);
  margin:0 0 18px;
}
.hp-about-body{
  font-size:16px;
  line-height:1.75;
  color:#43566a;
  display:-webkit-box;
  -webkit-line-clamp:7;
  -webkit-box-orient:vertical;
  overflow:hidden;
  margin-bottom:26px;
}
.hp-btn-navy{
  background:var(--hp_navy);
}
.hp-btn-navy:hover{ background:var(--hp_blue); }

/* ---------- 4b. ANIMATED F4J LOGO (About section, plays on scroll) ---------- */
.hp-logo{
  position:relative;
  width:100%;
  max-width:400px;
  margin-inline:auto;
}
.hp-logo .mark{
  position:relative;
  width:100%;
  aspect-ratio:903/600;
}
.hp-logo .mark img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  opacity:0;
  will-change:transform,opacity;
}
.hp-logo .wordmark{
  display:block;
  width:100%;
  margin-top:3%;
  opacity:0;
  clip-path:inset(0 50% 0 50%);
}
/* meeting pulses */
.hp-logo .pulse{
  position:absolute;
  left:51%; top:55%;
  width:12px; height:12px;
  border-radius:50%;
  border:2px solid #0096a5;
  transform:translate(-50%,-50%) scale(0);
  opacity:0;
  pointer-events:none;
}
.hp-logo .pulse.p2{ border-color:var(--hp_blue); }
/* play state — added by the scroll observer */
.hp-logo.playing .mark      { animation:hpl_settle .5s cubic-bezier(.34,1.56,.64,1) 1.18s both; }
.hp-logo.playing .piece-slate{ animation:hpl_fromLeft 1.05s cubic-bezier(.22,1.15,.32,1) .10s forwards; }
.hp-logo.playing .piece-teal { animation:hpl_fromTopRight 1.05s cubic-bezier(.22,1.15,.32,1) .26s forwards; }
.hp-logo.playing .piece-blue { animation:hpl_fromBottom 1.05s cubic-bezier(.22,1.15,.32,1) .42s forwards; }
.hp-logo.playing .pulse      { animation:hpl_ring .9s cubic-bezier(.2,.7,.3,1) 1.30s forwards; }
.hp-logo.playing .pulse.p2   { animation-delay:1.42s; }
.hp-logo.playing .wordmark   { animation:hpl_unveil .85s cubic-bezier(.25,.9,.3,1) 1.55s forwards; }
@keyframes hpl_fromLeft{ from{opacity:0;transform:translate(-26%,4%) rotate(-5deg);} 60%{opacity:1;} to{opacity:1;transform:translate(0,0) rotate(0);} }
@keyframes hpl_fromTopRight{ from{opacity:0;transform:translate(20%,-22%) rotate(6deg);} 60%{opacity:1;} to{opacity:1;transform:translate(0,0) rotate(0);} }
@keyframes hpl_fromBottom{ from{opacity:0;transform:translate(14%,24%) rotate(4deg);} 60%{opacity:1;} to{opacity:1;transform:translate(0,0) rotate(0);} }
@keyframes hpl_settle{ 0%{transform:scale(1);} 35%{transform:scale(1.025);} 100%{transform:scale(1);} }
@keyframes hpl_ring{ 0%{opacity:.9;transform:translate(-50%,-50%) scale(0);} 100%{opacity:0;transform:translate(-50%,-50%) scale(24);} }
@keyframes hpl_unveil{ from{opacity:0;clip-path:inset(0 50% 0 50%);transform:translateY(10px);} 40%{opacity:1;} to{opacity:1;clip-path:inset(0 0 0 0);transform:translateY(0);} }

/* ---------- 5. PARTNERS — labels interleaved with logos ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap');
#hp-partners{ padding:34px 0 30px; }
.hp-partners-row{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:nowrap;
  gap:10px 18px;
}
.hp-partners-label{
  font-family:'Playfair Display',Georgia,serif;
  font-style:italic;
  font-weight:500;
  font-size:16px;
  color:#94a2ad;
  white-space:nowrap;
}
.hp-partners-label.hp-partners-first{
  font-style:normal;
  font-weight:600;
  font-size:16px;
  color:var(--hp_ink);
}
/* every logo gets the same compact cell, centered both ways */
.hp-partner{
  width:104px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.hp-partner picture{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
}
.hp-partner img{
  max-width:100%;
  max-height:38px;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}
@media all and (max-width:1199px){
  .hp-partners-row{ flex-wrap:wrap; gap:12px 20px; }
}

/* ---------- preview badge ---------- */
#v2_preview_badge{
  position:fixed;
  bottom:16px;
  left:16px;
  z-index:9999;
  background:var(--hp_navy);
  color:#fff;
  font-size:12px;
  font-weight:700;
  letter-spacing:1px;
  padding:8px 14px;
  border-radius:4px;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  opacity:.92;
}
[dir="rtl"] #v2_preview_badge{ left:auto; right:16px; }

/* ---------- responsive ---------- */
@media all and (max-width:1199px){
  #hp-hero{ height:auto; min-height:0; }
  .hp-hero-inner{
    grid-template-columns:1fr;
    gap:30px;
    padding:130px 0 70px;
  }
  .hp-hero-sub{ font-size:16px; }
  #hp-stats{ margin-top:-40px; }
  .hp-stats-card{
    grid-template-columns:1fr 1fr;
    gap:22px 0;
    padding:26px;
  }
  .hp-stat:nth-child(3){ border-inline-start:none; padding-inline-start:4px; }
  .hp-duo{ grid-template-columns:1fr; }
  .hp-duo-panel{ aspect-ratio:auto; min-height:300px; }
  /* narrow screens: text spans the full width over a bottom scrim */
  .hp-duo-scrim{
    background:linear-gradient(180deg, rgba(16,30,41,.25) 30%, rgba(16,30,41,.9) 100%);
  }
  .hp-duo-content{
    position:relative;
    left:auto;
    top:auto;
    width:100%;
    height:auto;
    justify-content:flex-end;
    min-height:300px;
  }
  .hp-about-grid{ grid-template-columns:1fr; gap:44px; }
  #hp-instruments{ padding-top:70px; }
  #hp-about{ padding:70px 0; margin-top:70px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  .hp-reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
  .swiper-slide-active.hp-slide::before{ animation:none; }
  .hp-sec-head .hp-eyebrow::after{ transform:scaleX(1); transition:none; }
  .hp-duo-panel:hover{ transform:none; }
  .hp-duo-panel:hover::before{ transform:none; }
  .hp-logo .mark img, .hp-logo .wordmark{ opacity:1 !important; clip-path:none !important; transform:none !important; animation:none !important; }
  .hp-logo .pulse{ animation:none !important; }
}
