/* =========================================================
   PILLAR — Shared components (load on EVERY page)  ·  LIGHT PALETTE
   Header · Social rail · Back-to-top · Footer
   ========================================================= */
:root{
  /* greens */
  --teal:#1f5a4c; --teal-deep:#17453a; --teal-soft:#2f7a66;
  --mint:#eef3ef; --sage:#dfeae2; --leaf:#8fb339;
  /* golds (gold-ink is the darker one used for TEXT on light backgrounds) */
  --gold-100:#f3e6bd; --gold-300:#dcb865; --gold-500:#c49a45; --gold-ink:#8a6420;
  /* neutrals */
  --cream:#fbf7ec; --paper:#fffdf7; --ink:#24352d; --muted:#566a60;
  --glass:rgba(255,253,247,.78); --line:rgba(31,90,76,.16);
  --serif:"Cormorant Garamond","Times New Roman",serif;
  --sans:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --ease:cubic-bezier(.22,.7,.2,1);
  --gold-grad:linear-gradient(135deg,#f0d994 0%,#d4ae5b 45%,#b48a3a 100%);

  /* ====== LOGO SIZE CONTROLS — edit these to resize ======
     Height drives the size; keep width at "auto" to preserve the logo's
     proportions, or set a fixed value (e.g. 220px) to force a width. */
  --header-logo-h:120px;          /* header logo height              */
  --header-logo-h-scrolled:76px; /* header logo height after scrolling */
  --header-logo-w:auto;           /* header logo width              */
  --footer-logo-h:148px;          /* footer logo height (was 74px)  */
  --footer-logo-w:auto;           /* footer logo width              */
  --menu:"Outfit",var(--sans);     /* menu font (loaded by components.js) */
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--sans);background:var(--cream);color:var(--ink);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
ul,ol{list-style:none}
:focus-visible{outline:2px solid var(--teal);outline-offset:3px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ico{width:1em;height:1em;display:block;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ico.fill{fill:currentColor;stroke:none}

/* ---------------- HEADER ---------------- */
.site-header{
  position:fixed;inset:0 0 auto 0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:12px clamp(20px,3vw,56px);
  background:linear-gradient(180deg,rgba(251,247,236,.92),rgba(251,247,236,0));
  transition:padding .4s var(--ease),background .4s,box-shadow .4s;
}
.site-header.scrolled{
  padding-block:6px;background:rgba(255,253,247,.92);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  box-shadow:0 1px 0 var(--line),0 10px 30px rgba(23,69,58,.08);
}

/* Brand lockup: bare PNG logo with the institute name on its RIGHT (the "PILLAR" word is removed) */
.brand{flex:none;display:flex;flex-direction:row;align-items:center;gap:10px;max-width:420px}
.brand-logo{display:block;flex:none;background:none;border-radius:0;padding:0;box-shadow:none;transition:transform .4s var(--ease)}
.brand:hover .brand-logo{transform:translateY(-1px)}
.site-header .brand-logo img{display:block;height:var(--header-logo-h);width:var(--header-logo-w);max-width:none;object-fit:contain;filter:drop-shadow(0 6px 14px rgba(23,69,58,.18));transition:height .4s var(--ease)}
.site-header.scrolled .brand-logo img{height:var(--header-logo-h-scrolled)}
.brand-text{display:block;min-width:0;max-width:215px}
.brand-title{display:block;font-family:var(--serif);font-weight:1000;font-size:clamp(15px,1.25vw,19px);line-height:1.2;letter-spacing:.02em;color:var(--teal-deep);transition:font-size .4s var(--ease)}
.site-header.scrolled .brand-title{font-size:clamp(14px,1.05vw,16px)}

.main-nav ul{display:flex;align-items:center;flex-wrap:nowrap;gap:clamp(10px,1.1vw,22px)}
.main-nav a{position:relative;display:block;padding:8px 0;font-family:var(--menu);font-size:clamp(12.5px,.92vw,14.5px);font-weight:1000;letter-spacing:.01em;color:var(--teal-deep);transition:color .3s;white-space:nowrap}
.main-nav a:not(.nav-cta)::after{content:"";position:absolute;left:0;bottom:2px;height:1.5px;width:100%;background:var(--gold-500);transform:scaleX(0);transform-origin:left;transition:transform .4s var(--ease)}
.main-nav a:hover,.main-nav a.active{color:var(--gold-ink)}
.main-nav a:hover::after,.main-nav a.active::after{transform:scaleX(1)}
.main-nav .nav-cta{padding:11px 22px;border-radius:999px;background:var(--gold-grad);color:#1c1405;font-weight:600;box-shadow:0 6px 22px rgba(196,154,69,.35);transition:transform .3s var(--ease),box-shadow .3s}
.main-nav .nav-cta:hover{color:#1c1405;transform:translateY(-2px);box-shadow:0 10px 28px rgba(196,154,69,.5)}

.nav-toggle{display:none;flex:none;width:48px;height:48px;border-radius:50%;border:1px solid var(--line);background:rgba(255,255,255,.85);backdrop-filter:blur(8px);flex-direction:column;align-items:center;justify-content:center;gap:5px;box-shadow:0 6px 18px rgba(23,69,58,.12)}
.nav-toggle span{width:18px;height:1.5px;background:var(--teal-deep);transition:transform .35s var(--ease),opacity .3s}
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}

/* ---------------- SOCIAL RAIL (appears on scroll, every page) ---------------- */
.social-rail{
  position:fixed;right:18px;bottom:96px;z-index:45;
  display:flex;flex-direction:column;gap:10px;padding:10px 8px;border-radius:999px;
  background:var(--glass);border:1px solid var(--line);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 18px 44px rgba(23,69,58,.18);
  opacity:0;visibility:hidden;transform:translateX(24px);
  transition:opacity .45s,transform .45s var(--ease),visibility .45s;
}
.social-rail.show{opacity:1;visibility:visible;transform:none}
.social-rail a{position:relative;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;font-size:19px;color:var(--teal);border:1px solid transparent;transition:background .3s,color .3s,border-color .3s,transform .3s var(--ease)}
.social-rail a:hover{background:var(--gold-grad);color:#1c1405;transform:scale(1.08)}
.social-rail a::before{content:attr(data-label);position:absolute;right:calc(100% + 12px);top:50%;transform:translate(6px,-50%);padding:6px 12px;border-radius:8px;background:var(--teal-deep);font-size:11px;letter-spacing:.12em;text-transform:uppercase;white-space:nowrap;color:#fff;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s}
.social-rail a:hover::before,.social-rail a:focus-visible::before{opacity:1;transform:translate(0,-50%)}

.to-top{position:fixed;right:18px;bottom:28px;z-index:45;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font-size:22px;color:var(--teal);background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 10px 28px rgba(23,69,58,.16);opacity:0;visibility:hidden;transition:opacity .4s,visibility .4s,background .3s,color .3s}
.to-top.show{opacity:1;visibility:visible}
.to-top:hover{background:var(--gold-grad);color:#1c1405}

/* ---------------- FOOTER ---------------- */
.site-footer{
  position:relative;overflow:hidden;color:var(--ink);
  background-color:var(--sage);
  background-image:
    linear-gradient(180deg,rgba(238,243,239,.55),rgba(223,234,226,.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260' fill='none' stroke='%231f5a4c' stroke-opacity='.16' stroke-width='1.2'%3E%3Cpath d='M30 230C40 150 90 90 170 60C160 140 110 200 30 230Z' fill='%231f5a4c' fill-opacity='.04'/%3E%3Cpath d='M30 230C80 160 120 115 170 60M80 175l30 10M100 150l36 6M122 124l30 2M62 196l26 12'/%3E%3Cpath d='M190 250C196 200 224 170 258 156C256 206 232 238 190 250Z' fill='%231f5a4c' fill-opacity='.035'/%3E%3Cpath d='M190 250C214 214 236 184 258 156'/%3E%3Cpath d='M200 40c14-18 34-26 52-24-4 20-20 36-52 24Z'/%3E%3C/svg%3E");
  background-size:auto,260px 260px;
}
.site-footer::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:var(--gold-grad)}
.footer-grid{
  max-width:1500px;margin:0 auto;
  display:grid;grid-template-columns:1.05fr 1.35fr 1.1fr;gap:clamp(28px,4vw,72px);
  padding:28px clamp(20px,6vw,125px) 20px;
}
/* Footer brand: logo on top, institute name BELOW it ("PILLAR" word removed) */
.footer-brand{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.footer-brand .brand-logo{padding:0;border-radius:0;background:none;box-shadow:none}
.footer-brand .brand-logo img{display:block;height:var(--footer-logo-h);width:var(--footer-logo-w);max-width:100%;object-fit:contain}
.footer-title{display:block;max-width:360px;font-family:var(--serif);font-weight:700;font-size:clamp(19px,1.5vw,23px);line-height:1.2;letter-spacing:.03em;color:var(--teal-deep)}
.footer-col h4{font-size:14px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--teal-deep);margin-bottom:12px}
.footer-col h4:not(:first-child){margin-top:20px}
.footer-brand + h4{margin-top:14px}
.footer-address{font-size:16px;line-height:1.65;color:var(--muted);font-style:normal;max-width:340px}
.footer-links{display:grid;grid-template-columns:1fr 1fr;column-gap:24px}
.footer-links a{display:block;padding:7px 0;font-size:16px;color:var(--muted);transition:color .3s,transform .3s var(--ease)}
.footer-links a:hover{color:var(--gold-ink);transform:translateX(4px)}
.contact-list li{display:flex;align-items:center;gap:14px;margin-bottom:12px}
.contact-list .ci{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:8px;background:var(--teal);color:#fff;font-size:19px}
.contact-list a:hover{color:var(--gold-ink)}
.contact-list small{color:var(--muted);font-size:14px}
.footer-social{display:flex;flex-wrap:wrap;gap:14px}
.footer-social a{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--teal);color:#fff;font-size:19px;transition:background .3s,color .3s,transform .3s var(--ease)}
.footer-social a:hover{background:var(--gold-300);color:#1c1405;transform:translateY(-3px)}
/* ---- Animated footer icons ---- */
.contact-list .ci,.footer-social a{position:relative;animation:ficon-float 4.2s ease-in-out infinite}
.footer-social a:nth-child(2){animation-delay:.35s}.footer-social a:nth-child(3){animation-delay:.7s}
.footer-social a:nth-child(4){animation-delay:1.05s}.footer-social a:nth-child(5){animation-delay:1.4s}
.contact-list li:nth-child(2) .ci{animation-delay:.5s}.contact-list li:nth-child(3) .ci{animation-delay:1s}
/* soft pulse ring */
.contact-list .ci::after,.footer-social a::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:0 0 0 0 rgba(196,154,69,.55);animation:ficon-ring 3.2s ease-out infinite}
.footer-social a:nth-child(2)::after{animation-delay:.4s}.footer-social a:nth-child(3)::after{animation-delay:.8s}
.footer-social a:nth-child(4)::after{animation-delay:1.2s}.footer-social a:nth-child(5)::after{animation-delay:1.6s}
.contact-list li:nth-child(2) .ci::after{animation-delay:.6s}.contact-list li:nth-child(3) .ci::after{animation-delay:1.2s}
/* icon glyph tilts on hover */
.contact-list .ci .ico,.footer-social a .ico{transition:transform .45s var(--ease)}
.footer-social a:hover .ico,.contact-list li:hover .ci .ico{transform:rotate(-12deg) scale(1.18)}
.contact-list li:hover .ci{background:var(--gold-300);color:#1c1405;transition:background .3s,color .3s}
@keyframes ficon-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes ficon-ring{0%{box-shadow:0 0 0 0 rgba(196,154,69,.55)}70%,100%{box-shadow:0 0 0 12px rgba(196,154,69,0)}}

.footer-bottom{max-width:1500px;margin:0 auto;padding:0 clamp(20px,6vw,125px)}
.footer-bottom .inner{display:flex;flex-wrap:wrap;gap:12px 28px;align-items:center;padding:14px 0 16px;border-top:1px solid rgba(31,90,76,.2);font-size:14.5px;color:var(--muted)}
.footer-bottom a:hover{color:var(--gold-ink)}
.footer-bottom .tag{margin-left:auto;font-family:var(--serif);font-style:italic;font-size:19px;color:var(--gold-ink)}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width:1400px){
  .nav-toggle{display:flex}
  .main-nav{position:fixed;inset:0;z-index:-1;display:flex;align-items:center;justify-content:center;background:rgba(251,247,236,.98);backdrop-filter:blur(18px);opacity:0;visibility:hidden;transition:opacity .4s,visibility .4s;overflow-y:auto;padding:110px 20px 40px}
  .main-nav.open{opacity:1;visibility:visible}
  .main-nav ul{flex-direction:column;gap:4px;text-align:center}
  .main-nav a{font-family:var(--menu);font-size:clamp(22px,5vw,30px);font-weight:500;letter-spacing:.02em;text-transform:none;padding:9px 0}
  .main-nav .nav-cta{margin-top:14px;font-family:var(--sans);font-size:13px;text-transform:uppercase;letter-spacing:.14em}
  .site-header{z-index:60}
  .nav-toggle,.brand{position:relative;z-index:2}
}
@media (max-width:1000px){
  .footer-grid{grid-template-columns:1fr 1fr}
  .footer-col.brandcol{grid-column:1/-1}
  :root{--header-logo-h:84px;--header-logo-h-scrolled:62px;--footer-logo-h:120px}
  .brand-text{max-width:200px}
}
@media (max-width:640px){
  .site-header{padding:8px 16px;gap:10px}
  :root{--header-logo-h:58px;--header-logo-h-scrolled:48px;--footer-logo-h:104px}
  .brand{gap:8px}
  .brand-text{max-width:150px}
  .brand-title,.site-header.scrolled .brand-title{font-size:12px;line-height:1.15}
  .footer-grid{grid-template-columns:1fr;padding-top:24px}
  .footer-bottom .tag{margin-left:0;width:100%}
  .social-rail{right:10px;bottom:84px;gap:4px;padding:6px 5px}
  .social-rail a{width:36px;height:36px;font-size:17px}
  .social-rail a::before{display:none}
  .to-top{right:10px;bottom:20px;width:46px;height:46px}
}
@media (max-width:380px){.brand-text{display:none}}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important}
}


