/* ============================================================
   Nexora Research Foundation — stylesheet
   Tokens: navy #1b3a6b, green #2e7d32, gold #c99a3b,
           cream #f7f8fb, ink #1f2933
   ============================================================ */

:root{
  --navy: #1b3a6b;
  --navy-dark: #122c54;
  --green: #2e7d32;
  --gold: #c99a3b;
  --cream: #f7f8fb;
  --ink: #1f2933;
  --ink-soft: #4b5768;
  --line: #e3e7ee;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-h: 92px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; scroll-padding-top: var(--header-h); }
body{
  margin:0;
  font-family:var(--sans);
  color:var(--ink);
  background:var(--cream);
  -webkit-font-smoothing:antialiased;
}
img,svg{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3{ font-family:var(--serif); color:var(--navy); margin:0 0 .4em; font-weight:600; }
p{ line-height:1.65; color:var(--ink-soft); margin:0 0 1em; }
ul{ margin:0; padding:0; list-style:none; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

:focus-visible{ outline:3px solid var(--gold); outline-offset:2px; }

/* ---------------- Header ---------------- */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:100;
  height:var(--header-h);
  background:#fff;
  box-shadow:0 1px 0 var(--line);
  transition:height .25s ease, box-shadow .25s ease;
}
.site-header.scrolled{ height:72px; box-shadow:0 6px 20px rgba(27,58,107,.12); }
.header-inner{
  max-width:1280px; margin:0 auto; height:100%;
  display:flex; align-items:center; gap:28px;
  padding:0 32px;
}
.brand{ display:flex; align-items:center; gap:12px; flex-shrink:0; }
.brand-mark{ width:56px; height:56px; transition:width .25s ease,height .25s ease; }
.site-header.scrolled .brand-mark{ width:44px; height:44px; }
.brand-text{ display:flex; flex-direction:column; line-height:1.2; }
.brand-name{ font-family:var(--serif); font-weight:700; font-size:1.55rem; color:var(--navy); letter-spacing:.5px; }
.brand-sub{ font-size:.66rem; font-weight:600; color:var(--green); letter-spacing:.4px; }

.main-nav{ display:flex; gap:26px; margin-left:auto; }
.nav-link{
  font-size:.94rem; font-weight:500; color:var(--ink); position:relative; padding:6px 0;
}
.nav-link::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:2px;
  background:var(--green); transform:scaleX(0); transform-origin:left; transition:transform .2s ease;
}
.nav-link:hover::after, .nav-link.active::after{ transform:scaleX(1); }
.nav-link.active{ color:var(--green); }

.btn-join{
  display:flex; align-items:center; gap:8px;
  background:var(--navy); color:#fff; font-weight:600; font-size:.9rem;
  padding:11px 20px; border-radius:999px; white-space:nowrap;
  transition:background .2s ease, transform .2s ease;
}
.btn-join:hover{ background:var(--navy-dark); transform:translateY(-1px); }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:40px; height:40px; background:none; border:none; cursor:pointer; margin-left:auto;
}
.nav-toggle span{ height:2px; width:100%; background:var(--navy); border-radius:2px; transition:transform .25s ease, opacity .25s ease; }
.nav-toggle.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity:0; }
.nav-toggle.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero{
  position:relative; padding-top:calc(var(--header-h) + 56px);
  overflow:hidden; background:linear-gradient(180deg,#ffffff 0%, #f7f8fb 60%);
}
.hero-grid{
  max-width:1280px; margin:0 auto; padding:0 32px 60px;
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);
  gap:40px; align-items:center;
}
.tagline{
  font-weight:600; letter-spacing:.4px; color:var(--navy); margin-bottom:18px; font-size:.95rem;
}
.tagline .g{ color:var(--green); }
.tagline .a{ color:var(--gold); }
.tagline .dot{ color:var(--line); }

.hero-copy h1{
  font-size:clamp(2.1rem, 3.6vw, 3rem); line-height:1.15; margin-bottom:22px;
}
.hero-copy h1 .line{ display:block; opacity:0; transform:translateY(18px); animation:lineIn .7s ease forwards; }
.hero-copy h1 .l1{ animation-delay:.15s; }
.hero-copy h1 .l2{ color:var(--green); animation-delay:.35s; }
.hero-copy h1 .l3{ color:var(--gold); animation-delay:.55s; }
@keyframes lineIn{ to{ opacity:1; transform:translateY(0); } }

.rule{ display:flex; align-items:center; gap:8px; margin-bottom:22px; width:min(420px,90%); }
.rule .rule-navy{ flex:1; height:2px; background:var(--navy); }
.rule i{ width:6px; height:6px; border-radius:50%; background:var(--navy); display:inline-block; }
.rule .rule-gold{ flex:1; height:1px; background:var(--gold); }

.lede{ max-width:46ch; font-size:1.02rem; }

.pillars{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:30px; }
.pillar{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding-right:14px; border-right:1px solid var(--line); }
.pillar:last-child{ border-right:none; }
.pillar-icon{
  width:46px; height:46px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  border:1.5px solid currentColor; margin-bottom:6px;
}
.pillar-icon svg{ width:22px; height:22px; }
.pillar-icon.navy{ color:var(--navy); }
.pillar-icon.green{ color:var(--green); }
.pillar-icon.gold{ color:var(--gold); }
.pillar strong{ font-family:var(--serif); color:var(--ink); font-size:1rem; }
.pillar span{ font-size:.82rem; color:var(--ink-soft); line-height:1.4; }

/* --- hero visual --- */
.hero-visual{ position:relative; opacity:0; animation:fadeIn 1s ease .3s forwards; }
@keyframes fadeIn{ to{ opacity:1; } }
.globe-art{ width:100%; height:auto; }
.globe-art .globe{ animation:floaty 6s ease-in-out infinite; transform-origin:center; }
.globe-art .globe circle:nth-child(2),
.globe-art .globe path{ }
@keyframes floaty{
  0%,100%{ transform:translate(320px,250px) translateY(0) rotate(0deg); }
  50%{ transform:translate(320px,250px) translateY(-8px) rotate(2deg); }
}
.globe-art .birds path{ animation:flap 2.4s ease-in-out infinite; transform-origin:center; }
@keyframes flap{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-4px); } }

.quote-chip{
  position:absolute; right:0; bottom:6%; background:var(--navy); color:#fff;
  padding:22px 30px; border-radius:14px; max-width:280px; text-align:right;
  box-shadow:0 18px 40px rgba(18,44,84,.35);
  opacity:0; transform:translateY(14px); animation:lineIn .7s ease .9s forwards;
}
.quote-chip .qmark{ font-family:var(--serif); font-size:2rem; color:var(--gold); line-height:.4; display:block; }
.quote-chip .qmark.end{ text-align:right; }
.quote-chip p{ font-family:var(--serif); color:#fff; font-size:1.15rem; margin:6px 0; }
.quote-chip em{ color:var(--gold); font-style:normal; }

.hero-strip{
  background:var(--navy); color:#fff; display:flex; flex-wrap:wrap;
  justify-content:center; gap:28px 48px; padding:20px 32px;
}
.strip-item{ display:flex; align-items:center; gap:10px; font-size:.92rem; font-weight:500; }
.strip-item svg{ width:20px; height:20px; color:var(--gold); flex-shrink:0; }

/* ---------------- Generic sections ---------------- */
.section{ padding:88px 32px; }
.section.alt{ background:#fff; }
.section-inner{ max-width:1180px; margin:0 auto; }
.eyebrow-plain{ color:var(--gold); font-weight:600; margin-bottom:10px; font-size:.95rem; }
.section h2{ font-size:clamp(1.7rem,2.6vw,2.3rem); max-width:22ch; margin-bottom:20px; }

.two-col{ display:grid; grid-template-columns:1.1fr .9fr; gap:60px; align-items:center; }
.two-col.reverse{ grid-template-columns:.9fr 1.1fr; }
.two-col.reverse > *:first-child{ order:2; }

.stat-list{ display:grid; grid-template-columns:1fr 1fr; gap:28px; }
.stat-list li{ padding:22px; background:var(--cream); border-radius:16px; border:1px solid var(--line); }
.stat-list strong{ display:block; font-family:var(--serif); font-size:2rem; color:var(--navy); }
.stat-list span{ font-size:.88rem; color:var(--ink-soft); }

.work-grid, .project-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; margin-top:36px; }
.work-card{
  background:#fff; border:1px solid var(--line); border-radius:18px; padding:32px 26px;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.work-card:hover{ transform:translateY(-6px); box-shadow:0 22px 40px rgba(27,58,107,.1); border-color:transparent; }
.work-icon{
  width:52px; height:52px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  margin-bottom:18px; border:1.5px solid currentColor;
}
.work-icon svg{ width:24px; height:24px; }
.work-icon.navy{ color:var(--navy); } .work-icon.green{ color:var(--green); } .work-icon.gold{ color:var(--gold); }

.project-card{
  background:var(--cream); border-radius:18px; padding:30px 26px; border:1px solid var(--line);
  display:flex; flex-direction:column; gap:10px;
}
.tag{
  align-self:flex-start; font-size:.76rem; font-weight:600; padding:5px 12px; border-radius:999px;
  background:rgba(27,58,107,.1); color:var(--navy);
}
.tag.green{ background:rgba(46,125,50,.1); color:var(--green); }
.tag.gold{ background:rgba(201,154,59,.14); color:#96731f; }

.resource-list li{
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding:18px 0; border-bottom:1px solid var(--line);
}
.resource-list li:first-child{ border-top:1px solid var(--line); }
.resource-list span{ font-weight:500; }
.resource-list a{ color:var(--green); font-weight:600; font-size:.92rem; }
.resource-list a:hover{ text-decoration:underline; }

.contact-info li{ padding:6px 0; color:var(--ink-soft); font-size:.95rem; }
.contact-form{ display:flex; flex-direction:column; gap:16px; background:#fff; padding:30px; border-radius:18px; border:1px solid var(--line); }
.contact-form label{ display:flex; flex-direction:column; gap:6px; font-size:.85rem; font-weight:600; color:var(--navy); }
.contact-form input, .contact-form textarea{
  font-family:var(--sans); font-size:.95rem; padding:11px 13px; border-radius:10px;
  border:1.4px solid var(--line); resize:vertical; background:var(--cream);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.contact-form input:focus, .contact-form textarea:focus{ border-color:var(--green); box-shadow:0 0 0 3px rgba(46,125,50,.12); outline:none; }
.btn-submit{
  background:var(--green); color:#fff; font-weight:600; padding:13px; border:none; border-radius:10px;
  cursor:pointer; font-size:.95rem; transition:background .2s ease, transform .2s ease;
}
.btn-submit:hover{ background:#245f27; transform:translateY(-1px); }
.form-note{ font-size:.85rem; color:var(--green); min-height:1em; margin:0; }

/* ---------------- Footer ---------------- */
.site-footer{ background:var(--navy); color:#cfd9ea; padding:26px 32px; }
.footer-inner{ max-width:1180px; margin:0 auto; display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:.85rem; }
.footer-tag{ color:var(--gold); font-weight:600; }

.to-top{
  position:fixed; right:22px; bottom:22px; width:46px; height:46px; border-radius:50%;
  background:var(--navy); color:#fff; border:none; font-size:1.1rem; cursor:pointer;
  box-shadow:0 12px 28px rgba(27,58,107,.35); opacity:0; visibility:hidden; transform:translateY(10px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s ease; z-index:90;
}
.to-top.show{ opacity:1; visibility:visible; transform:translateY(0); }

/* ---------------- Reveal on scroll ---------------- */
.reveal{ opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in-view{ opacity:1; transform:translateY(0); }

/* ---------------- Responsive ---------------- */
@media (max-width:1024px){
  .hero-grid{ grid-template-columns:1fr; }
  .hero-visual{ max-width:520px; margin:0 auto; }
  .quote-chip{ position:static; margin-top:18px; text-align:left; max-width:none; }
  .two-col, .two-col.reverse{ grid-template-columns:1fr; }
  .two-col.reverse > *:first-child{ order:0; }
  .work-grid, .project-grid{ grid-template-columns:1fr 1fr; }
}

@media (max-width:860px){
  .main-nav{
    position:fixed; top:var(--header-h); left:0; right:0; background:#fff;
    flex-direction:column; padding:14px 32px 24px; gap:6px;
    box-shadow:0 14px 24px rgba(27,58,107,.12);
    transform:translateY(-12px); opacity:0; pointer-events:none;
    transition:opacity .2s ease, transform .2s ease;
  }
  .main-nav.open{ transform:translateY(0); opacity:1; pointer-events:auto; }
  .nav-link{ padding:12px 0; border-bottom:1px solid var(--line); }
  .nav-toggle{ display:flex; }
  .btn-join{ display:none; }
  .header-inner{ gap:14px; }
  .brand-sub{ display:none; }
  .work-grid, .project-grid{ grid-template-columns:1fr; }
  .pillars{ grid-template-columns:1fr; }
  .pillar{ border-right:none; border-bottom:1px solid var(--line); padding-bottom:14px; }
  .stat-list{ grid-template-columns:1fr; }
}

@media (max-width:480px){
  .header-inner{ padding:0 18px; }
  .hero-grid{ padding:0 18px 40px; }
  .section{ padding:60px 18px; }
  .quote-chip{ padding:18px 20px; }
}
