html, body {
  margin: 0;
  padding: 0;
  min-height: 100svh;
  width: 100%;
  cursor:url(myBall.cur),auto;
  /* cursor: none; */
  font-family: "Headers";
  /* overflow: hidden; */
  overflow-y: auto;
  cursor: auto;
  
}

:root{
  --brand-blue:#0e50c8;
  --ink:#0a1a2b;
  --paper:#ffffff;
  --muted:rgba(10,26,43,.65);
  --highlight:#EBF21B;
  --grid-max:1240px;
  --gutter:20px;
  --columns:12;
  --page-pad: 20px; /* NEW */
}

.main{ flex:1 0 auto; }

*{box-sizing:border-box}
html,body{height:100%;}
body{
  min-height:100dvh;       
  margin:0;
  color:var(--ink);
  background:var(--paper);
  display:flex;                    
  flex-direction:column;
  line-height:1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  display: flex;
  flex-direction: column;
  background-color: #0e50c8;
}

@font-face {
  font-family: "Acumin-Light";
  src: url('./fonts/Acumin-Pro/Acumin-Pro-Light.otf') ;

}

@font-face {
  font-family: "Acumin-Regular";
  src: url('./fonts/Acumin-Pro/Acumin-Pro-Book.otf') ;

}


.header {
  font-family: "Acumin-Light";
  font-weight: 500;   
  background-color: #0e50c8;
  display: flex;           
  flex-wrap: wrap;        
  gap: 4rem;   
  padding: 30px 30px;
  padding-top: 10px;
  padding-bottom: 10px;
   
  font-size: 1.1em;
  color: white;
  align-items: center;
  justify-content: space-between; 
  z-index: 999999;
  
  /* z-index: 1; */
}

.button-header {
  font-family: "Acumin-Light";
  font-weight: 500;   
  display: flex;           
  flex-wrap: wrap;        
  align-items: center;
  justify-content: center;
  gap: 4rem; 
}

.mainbody {
  
  flex: 1;       
  display: flex;
  flex-direction: column;
  font-family: "Headers";
  font-weight: 500;   
  color: #0e50c8;
  font-size: 1.5em;

}
.section-about-us {
  padding-top: 60px;
  padding-bottom: 10px;
  padding: 10px 10px;
  display: flex;           
  flex-wrap: wrap;        
  /* gap: 1rem;    */
  align-items: center;

}


.index-outer {
  font-family: "Acumin-Light";
  display: flex; 
  margin-top: 80px;
  padding-bottom: 10px;
  padding: 10px 20px;          
  flex-wrap: wrap;        
  align-items: center;
  background-color: #0e50c8;
  color: white;
  justify-content: flex-start; 
}
.index {
  font-family: "Acumin-Light";
  color: white;
  height: 100%;
  align-items: center;
  /* padding-bottom: 10px; */
  /* padding: 10px 10px; */
  display: flex;           
  flex-wrap: wrap;   
  cursor: pointer;
  
}



.index-item {
  font-family: "Acumin-Light";
  flex: 1;        /* fills rest of mainbody */
  display: flex;
  background-color: #0e50c8;
  color: white;
  display: flex;           
  flex-wrap: nowrap;      
  /* align-items: center; */
  
  gap: 2rem; 
  justify-content: space-between;
  align-items: stretch;  
  transition: max-height 420ms ease, opacity 420ms ease;
  overflow: hidden;
  max-height: 0;
opacity: 0;
}
.index-item:not(.is-hidden) {
         
  opacity: 1;
}

.index-item-text {
  flex: 1;           
  max-width: 70%; 
  font-size: 0.75em;
  /* padding-left: 10px; */
  padding-top: 100px;
  padding-right: 60px;
  margin-left: auto;
  
}



.index-item-text,
.images {
  flex: 0 0 55%;
}

img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  
}

.nav-svg {
  width: 40px;
  height: 40px;
  align-items: center;
  fill: transparent;
  stroke: white;
}
.nav-svg:hover {
  width: 40px;
  height: 40px;
  align-items: center;
  fill: white;
  stroke: #0e50c8;
}

.nav-svg2 {
  width: 20px;
  height: 19px;
  align-items: center;
  margin-left: auto;
  /* padding-right: 600px; */
  gap: 2rem;
  cursor: pointer;
}



.nav-svg1{
  width: 12px;
  height: 12px;
  align-items: center;
  /* padding-right: 10px; */
  cursor: pointer;
  transition: transform 200ms ease;
}
.lot {
  margin-left: auto;

}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem; 
  margin-left: auto;
}


/* .index-item.is-hidden {        
  display: none;
} */

/* .list-projects.is-hidden1 {         
  display: none;
} */

.list-projects {
  font-family: "Acumin-Light";
  color: white;
  background-color: #0e50c8;
  flex: 1 1 auto; 
  transition: max-height 420ms ease, opacity 420ms ease;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}
/* 
.list-projects:not(.is-hidden1) {
  max-height: 2000px;            
  opacity: 1;
} */

.list-projects1 {
  cursor: pointer;
  /* padding-left: 10px; */
  margin-top: 10px;
  margin-bottom: 10px;
}

.search-filter {
  background-color:#0e50c8;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem; 
  font-size: 0.6em;
}

.search-filter.is-hidden{
  display: none;
}
.rotated {
  display: inline-block;       /* or block */  
  transform-origin: 50% 50%;
  transform: rotate(90deg);
}

hr {
      margin: 0px;
      height: 1.5px;
      width: 100%; 
      border: none;
      background-color: white;
}

.square {
  height: 10px;
  width: 10px;
  /* background-color: #555; */
  border-color: white;
  border-width: 1px ;
  border-style: solid;
}
.list-projects1:hover {
  background-color: #dbe120;
  color: #0e50c8;
}

.list-item:hover {
  text-decoration-line: underline;
}

.description-text {
  font-size: 3em;
  padding-left: 10px;
  padding-right: 10px;
  flex: 1 1 auto; 
  transition: max-height 420ms ease, opacity 420ms ease;
  overflow: hidden;
  max-height: 0;
  /* max-width: 50%; */
  opacity: 0;
}

.description-text:not(.is-hidden) {
         
  opacity: 1;
}
.index-item:not(.is-hidden),
.description-text:not(.is-hidden) {
  max-height: 100vh; /* ensures visible animation */
  overflow: visible; /* allow content beyond viewport */
}
@media (max-width: 768px) {
  .index-item:not(.is-hidden),
  .description-text:not(.is-hidden) {
    max-height: none; /* allow full scroll on mobile */
  }
}

/* .header, .button-header { color: #fff; } */
/* style.css (replace the old rule) */
.header .button-header { color: inherit; }


/* Make the links inherit that white and remove underline */
.button-header a,
.button-header a:link,
.button-header a:visited {
  color: inherit;
  text-decoration: none;
}

/* Keep underline off on hover/focus/active too */
.button-header a:hover,
.button-header a:focus,
.button-header a:active {
  color: inherit;
  text-decoration: none;
}



canvas { display:block; } 


.desktop { display: none; }
.mobile  { display: none; }



/* Make header a stacking context; overlay will sit above it anyway */
.header { position: relative; z-index: 1000; }

/* Fullscreen mobile overlay: CLOSED state */
.mobile-overlay {
font-family: 'Acumin-Light';
position: fixed;
inset: 0;                      /* left:0; top:0; right:0; bottom:0 */
background: #0e50c8;
color: #fff;
z-index: 2000000000;                 /* above everything */
display: flex;
align-items: center;
justify-content: center;

/* Fill full viewport on mobile (handles iOS URL bar) */
height: 100dvh;                /* dynamic viewport; fallback next line */
min-height: 100vh;

/* Start hidden but mounted (so it can animate) */
opacity: 0;
visibility: hidden;
pointer-events: none;
transform: translateY(-8px);
transition: opacity 260ms ease, transform 260ms ease, visibility 0s linear 260ms;

/* Debug: make it visible even when closed */
border: 2px solid transparent;
}

/* OPEN state */
.mobile-overlay.open {
opacity: 1;
color: #fff;
justify-content: center; 
visibility: visible;
pointer-events: auto;
transform: translateY(0);
 
transition: opacity 260ms ease, transform 260ms ease; /* visibility shows immediately */

/* Debug: make it more visible when open */
/* border: 2px solid yellow; */
}

.mobile-overlay .nav-svg-mobile {
  width: 28px;
  height: 28px;
  display: inline-block;    
  flex: 0 0 auto;
}
.mobile-overlay .overlay-inner {
display: flex;
flex-direction: column;
gap: 16px;
text-align: center;
padding: 32px;
color: #fff;
}

.mobile-overlay a {
font-size: 1.4rem;
color: #fff;
text-decoration: none;
}
.mobile-overlay a:hover { text-decoration: underline; }

/* Hide desktop items on small screens, show hamburger */
.desktop { display: none; }
.mobile  { display: none; }

@media (max-width: 500px) {
.mobile  { display: inline-flex; align-items: center; }
.desktop { display: none; }
.logo_PROJCT { flex: 1; }
.nav-right { margin-left: auto; z-index: 10000; }
.logo-svg {z-index: 100000;}

/* Ensure hamburger button is clickable */
#mobileTrigger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  z-index: 10001;
  position: relative;
}

.hamburger {
  pointer-events: none;
  z-index: 100001;
}
.description-text {font-size: 1.6em;}
body {overflow: auto;}
.search-filter {font-size: 0.3em;}
.index-item {
  flex-direction: column;      
  gap: 1rem;
}


.index-item-text,
.index-item-images {
  flex: 0 0 auto;              
  max-width: 100%;
}


.index-item-text { padding-top: 16px; }


.index-item-images img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
}


@media (min-width: 501px) {
.desktop { display: flex; }
.mobile  { display: none; }
.mobile-overlay { display: none; }
}
.nav-svg-mobile {
width: 20px;
height: 20px;
align-items: center;
fill: transparent;
stroke: white;
}


.cursor-circle { pointer-events: none; }




#container {
background: #0e50c8;   /* blue behind the white lines */
color: #fff;
display: flex;
flex-direction: column;
width: 60%;
margin-bottom: 30px;
}

.box {
padding: 5px 10px;
box-sizing: border-box;
}


.box {
  font-size: 0.85em;
border-top: 1px solid #fff;
padding-left: 0;
}





/* ===== Theming (per page accent) =====
:root { --accent: #0e50c8; }                  /* default blue */
html[data-theme="yellow"] { --accent: #dbe120; } /* example 2nd page */

/* ===== Page color fade overlay ===== */
.page-wipe {
position: fixed;
inset: 0;
background: var(--accent);
opacity: 0;
pointer-events: none;
z-index: 999;
transition: opacity 420ms ease-in-out; /* duration matches JS timeout */
}

/* Swup phases toggle these */
html.transitioning[data-phase="leave"] .page-wipe { opacity: 1; }  /* fade in color */
html.transitioning[data-phase="enter"] .page-wipe { opacity: 0; }  /* fade back out */


.transition-fade { transition: opacity 640ms ease-in-out; }
html.transitioning .transition-fade { opacity: 0.9; }

.reveal {
opacity: 0;
transform: translateY(10px);
transition: opacity 320ms ease, transform 420ms ease;
will-change: opacity, transform;
}
.reveal.is-visible {
opacity: 1;
transform: translateY(0);
}

.reveal {
transition-delay: var(--reveal-delay, 0ms);
} */

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
.page-wipe,
.transition-fade,
.reveal {
  transition: none !important;
  transform: none !important;
}
}


html { scrollbar-gutter: stable both-edges; }
.header {  box-sizing: border-box; }
.logo-svg { width: 100px; height: 25px; display: block; object-fit: contain; }

#machine {
flex: 1;            
width: 100%;
height: calc(100vh - 80px); /* Subtract header height */
position: relative;
z-index: 1;
}

#machine canvas { 
display: block; 
position: absolute;
top: 0;
left: 0;
z-index: 1;
}

.team-grid_inner {

--card-min: 11rem;   

--card-max: 15.5rem; 

grid-column-gap: 0.4rem;
grid-row-gap: 1.75rem;
grid-template-rows: auto auto;
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--card-min)), 1fr));
grid-auto-columns: 1fr;
justify-items: stretch;
display: grid;
margin-bottom: 50px;
}

.team-grid_item {
  display: flex;
  flex-flow: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--card-max);
}

/* circular image: scales with card width */
.team-grid_image-wrapper {
position: relative;
width: 100%;
aspect-ratio: 1 / 1;   
border-radius: 50%;
overflow: hidden;
}
.team-grid_image-up {
  transition: opacity 0.1s ease-in-out;
  opacity: 1;
}

.team-grid_image-wrapper:hover .team-grid_image-up {
  opacity: 0;
}

.team-grid_image-down {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* make sure images fill the circle nicely */
.team-grid_image-wrapper img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
  .team-grid_info {
    font-family: 'Acumin-Light';
    flex-flow: column;
    justify-content: center;
    align-items: center;
    display: flex;
    }

 
     .team-grid_name {
        font-size: 1.125rem;
        margin: 0px;
        }
.team-grid_post {
          margin: 5px;
          text-align: center;
          color: var(--color--gray-accent);
          font-size: clamp(0.9rem, 0.8rem + 0.4vw, 1rem);
        }

        #defaultCanvas0 { position: fixed; inset: 0; z-index: 0; }
.header { position: relative; z-index: 1000; }

/* Overlay above everything, clickable only when open */
.mobile-overlay {
  
  position: fixed; inset: 0; background:#0e50c8; color:#fff;
  z-index: 2000;
  
  display:flex; align-items:center; justify-content:center;
  height: 100dvh; min-height: 100vh;
  opacity:0; visibility:hidden; pointer-events:none;
  transform: translateY(-8px);
  transition: opacity .26s ease, transform .26s ease, visibility 0s linear .26s;
}
.mobile-overlay.open {
  opacity:1; visibility:visible; pointer-events:auto; transform:none;
}
.mobile-overlay a { display:inline-block; padding:12px 8px; color:#fff; text-decoration:none; }

/* Close button sits on top of overlay */
.mobile-close {
  position: fixed; top:12px; right:25px; z-index:2100;
  padding-right: 0px;
  background:transparent; border:0; padding-top:8px; cursor:pointer;
}

/* Hamburger visible/clickable on mobile when overlay is closed */
@media (max-width: 500px) {
  #mobileTrigger {
    display:inline-flex !important; align-items:center; justify-content:center;
    min-width:44px; min-height:44px; position:relative; z-index:1001;
  }
}

/* Kill all canvas hit-testing while the menu is open (covers #defaultCanvas0, #defaultCanvas1, etc.) */
body.menu-open canvas,
body.menu-open #machine,
body.menu-open #machine * {
  pointer-events: none !important;
}

/* Overlay and its children remain interactive when open */
.mobile-overlay.open,
.mobile-overlay.open * {
  pointer-events: auto !important;
  touch-action: auto !important;
}

/* Make sure the stacking order is sane */
#defaultCanvas0 { z-index: 0; }
.header         { z-index: 1000; }
.mobile-overlay { z-index: 2000; }
.mobile-close   { z-index: 2100; }


 .header{
  position: fixed;
  inset: 0 0 auto 0;           /* top:0;left:0;right:0 */
  z-index: 1000;
  padding-inline: var(--page-pad, 20px);
  /* background: transparent;   */
  background-color: #0e50c8;
  transition:
    transform .28s ease,
    background-color .24s ease,
    backdrop-filter .24s ease,
    box-shadow .24s ease;
}


.header.is-solid{
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

/* Hidden state */
.header.is-hidden{ transform: translateY(-100%); }

@media (prefers-reduced-motion: reduce){
  .header{ transition: none; }
  .header.is-hidden{ transform: none; }
}


/* Optional hover */
.header a:hover,
.header a:focus { text-decoration: underline; }

/* Make the image column a fixed-ratio box the image fully covers */
.index-item-images {
  position: relative;
  flex: 1;
  max-width: 70%;
  background: #000;     /* neutral backdrop so no yellow peeks */
  padding: 0;           /* remove inner gutter */
  margin-top: 100px;    /* your desired offset (or 0) */
  overflow: hidden;
  min-height: 360px;
  aspect-ratio: 16 / 10;
  margin-left: 10px;
  margin-right: 10px;
}

/* Slider track */
.index-item-images .slides {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  transition: transform 360ms ease;
}

/* Each slide covers the whole area */
.index-item-images img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;   /* remove inline-image whitespace */
}
.slider { background: transparent; padding: 0; overflow: hidden; }



/* Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(14,80,200,.9);
  color: #fff;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}
.slider-arrow.prev { left: 10px; }
.slider-arrow.next { right: 10px; }

/* Mobile tweaks */
@media (max-width: 500px) {
  .index-item-images { 
    max-width: 100%;
    margin-top: 0;
    min-height: 240px;       /* smaller height on phones */
    aspect-ratio: 16 / 11;
  }
}



/* --- Base modal scaffold --- */
.tip-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity .24s ease, visibility 0s linear .24s;
  z-index: 9999;
  font-family: "Acumin-Light";
  font-weight: 500;  
}
.tip-modal.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transition: opacity .24s ease;
}

.tip-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
}

/* --- Panel --- */
.tip-panel {
  font-family: 'Acumin-Light';
  position: relative;
  width: min(60vw, 980px);
  background: #124fc7;          /* brand blue */
  color: #fff;
  /* border-radius: 16px; */
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 14px 50px rgba(0,0,0,.18);
  transform: translateY(8px) scale(.985);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}
.tip-modal.is-open .tip-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* --- Shared content styles --- */
.tip-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 20px);
  text-align: center;
}

.tip-num {
  font-weight: 300;
  font-size: clamp(30px, 4.8vw, 50px);
  line-height: 1;
  margin: 6px 0 10px;
  opacity: .98;
}

.tip-col p {
  margin: 0;
  font-size: clamp(12px, 2.1vw, 20px);
  line-height: 1.35;
}
.tip-col p strong { font-weight: 700; }

.tip-foot {
  grid-column: 1 / -1;
  margin: clamp(10px, 2.1vw, 18px) 0 0;
  font-size: clamp(12px, 1.7vw, 18px);
  opacity: .95;
}

/* --- Button --- */
.tip-btn {

  display: block;        /* lets margin auto work */
  margin: 24px auto 0; 
  margin: clamp(14px, 3vw, 26px) auto 6px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: #cee000;           /* brand lime */
  color: #124fc7;                /* brand blue */
  font-weight: 800;
  cursor: pointer;
}

/* --- Desktop/Mobile copy swap --- */
.tip-desktop { display: none; }
.tip-mobile  { display: grid; }

@media (min-width: 860px) {
  .tip-desktop { display: grid; }
  .tip-mobile  { display: none; }
  .search-filter {      gap: 0.65rem 1rem;
  }
}

/* Stack columns on very narrow screens */
@media (max-width: 540px) {
  .tip-content { grid-template-columns: 1fr; }
  .filter-item .label{
    font-size: 0.8rem;   
}
.search-filter {    gap: 0.05rem 0.5rem;}
}

/* Motion-reduced */
@media (prefers-reduced-motion: reduce) {
  .tip-modal, .tip-panel { transition: none; }
}

.highlighted-text {
font-size: 1.25em;
font-family: 'Acumin-Light';
}

.index-item.no-images .index-item-images {
  display: none;
}

.index-item.no-images .index-item-text {
  max-width: 100%;
  padding-right: 20px; 
}



.index-item-images .slides { touch-action: pan-y; }

 html, body { -webkit-overflow-scrolling: touch; } 



@media (max-width: 768px) {
  .index-item:not(.is-hidden),
  .description-text:not(.is-hidden),
  .list-projects:not(.is-hidden1) {
    max-height: 100000px; 

  }
}
/* Base: animate max-height only; keep content clipped to container */
.index-item,
.description-text,
.list-projects {
  transition: max-height 0.5s ease, opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;            /* IMPORTANT: prevents bleeding into next section */
  will-change: max-height;
}

/* Closed state */
.index-item.is-hidden,
.description-text.is-hidden,
.list-projects.is-hidden1 {
  max-height: 0;
  opacity: 0;
  transform: translateY(8px);
}

.index-item:not(.is-hidden),
.description-text:not(.is-hidden),
.list-projects:not(.is-hidden1) {
  max-height: 9999px;         
  opacity: 1;
  transform: none;
}


.search-filter {
  display: flex;
  flex-wrap: wrap;
  /* gap: 0.65rem 1rem; */
  align-items: center;

  margin: 10px 10px;
}

.filter-item {
  --text: #ffffff;
  --text-active: #ffffff;         
  --chip-bg-hover: rgba(255,255,255,0.12);
  font-family: 'Acumin-Light';
  font-weight: 300;           
  font-size: 1rem;              
  letter-spacing: .02em;

  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .35rem .7rem;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 9999px;
  display:inline-flex;
  align-items:center; 
  line-height: 1;    
  transition: background-color .18s ease, color .18s ease;
}

.filter-item .square{
  transform: translateY(-1px); /* try -1px or -2px to taste */
}
.filter-item .label{ line-height: 1;}

.filter-item .square {
  width: 18px;
  align-self:center;
  height: 18px;
  border: 1.5px solid rgba(255,255,255,.7);
  background: transparent;
  border-radius: 3px;
  transition: background-color .18s ease, border-color .18s ease;
}

/* Hover: chip gets subtle bg, square turns white, text flips to dark */
.filter-item:hover {
  background: var(--chip-bg-hover);
  color: var(--text-active);
}
.filter-item:hover .square {
  background: #fff;
  border-color: #fff;
}

/* Active (selected) state */
.filter-item.active {
  background: var(--chip-bg-hover);
  color: var(--text-active);
}
.filter-item.active .square {
  background: #fff;
  border-color: #fff;
}

/* Project cards demo (optional) */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.project-card {
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
}
.project-card.is-hidden { display: none; }


/* keep your existing hover */
.list-projects1:hover {
  background-color: var(--highlight); /* #EBF21B */
  color: var(--brand-blue);           /* #0e50c8 */
}

/* persistent highlight applied by the filter */
.list-projects1.is-highlight {
  background-color: var(--highlight);
  color: var(--brand-blue);
  transition: background-color .2s ease, color .2s ease;
}



.footer-meta{
  grid-column: 1 / 9;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(12px, 3vw, 36px);
}
.footer-meta p{
  margin: 0;
  line-height: 1.35;
  font-size: clamp(14px, 1.1vw, 18px);
  color: rgba(255,255,255,.95);
}

/* Logo block (right side) */
.footer-brand{
  grid-column: 9 / -1;     /* room for logo + newsletter beside it */
  grid-row: 1;
  justify-self: start;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-logo{ display:block; width: clamp(110px, 12vw, 200px); height:auto; }

/* Optional social links (left side) */
.footer-social{
  grid-column: 1 / 9;
  display: flex;
  gap: clamp(20px, 6vw, 80px);
  margin: 0;
}

/* ===== NEWSLETTER (right side) =====
   Put the newsletter as a SIBLING of .footer-brand so it can be wider.
*/
.footer-newsletter{
  grid-column: 9 / -1;     /* same column as logo; spans wide */
  grid-row: 2;             /* sits visually under the logo */
  width: 100%;
  max-width: 960px;        /* control line length */
}

.newsletter-title{
  margin: 0 0 .5rem 0;
  font-family: "Acumin-Light";
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .95rem;
  color: #fff;
  opacity: .9;
}
.newsletter-row{
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,.75);
  padding: .35rem 0;
}
.newsletter input{
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
  padding: .35rem 0;
}
.newsletter input::placeholder{ color: rgba(255,255,255,.7); }
.newsletter-submit{
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  padding: .35rem 0;
}
.newsletter-submit:hover{ text-decoration: underline; }

/* ===== LEGAL STRIP (bottom bar) ===== */
.footer-legal{
  background: var(--brand-blue);
  color: rgba(255,255,255,.9);
  border-top: 1px solid rgba(255,255,255,.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 10px var(--page-pad);
  font-family: "Acumin-Light";
  font-size: .85rem;
  padding-block: clamp(12px, 2.6vh, 24px);
}
.footer-legal a{ color: inherit; text-decoration: none; }
.footer-legal a:hover{ text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width:1024px){
  .footer-meta{ grid-column: 1 / 10; }
}
@media (max-width:860px){
  .footer-meta{
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .footer-brand{
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 6px;
  }
  .footer-social{
    grid-column: 1 / -1;
    gap: 16px;
  }
  .footer-newsletter{
    grid-column: 1 / -1;
    grid-row: auto;
    max-width: none;
    padding-top: 4%;
  }
  .footer-legal{ font-size: .8rem; }
}

/* Desktop tweak: bring newsletter closer to logo without overlap */
@media (min-width:1024px){
  /* tighter vertical row gap while keeping column gap = var(--gutter) */
  .site-footer{ gap: 6px var(--gutter); align-items: start; }

  .footer-brand{ align-self: start; margin-bottom: 0; }
  .footer-newsletter{ margin-top: 0; }

  .newsletter-title{ margin: 0 0 .35rem 0; }
  .newsletter-row{ padding: .25rem 0; }

  /* allow a slightly longer newsletter on large screens */
  .footer-newsletter{ max-width: 960px; }
}

/* Wide screens: pull content inward a touch if desired */
@media (min-width:1440px){
  .site-footer{ padding-inline: max(var(--page-pad), 5vw); }
  .footer-legal{ padding-inline: max(var(--page-pad), 5vw); }
}





/* ===== Make the index area fill the viewport; push footer below the fold ===== */
:root { --header-h: 80px; } /* adjust if your header is not ~80px tall */

#swup.mainbody{
  display: flex !important;
  flex-direction: column !important;
  /* fill the viewport beneath the fixed header */
  min-height: calc(100dvh - var(--header-h)) !important;
}

/* bars above the list are content-height only */
.index-outer,
.search-filter{
  flex: 0 0 auto !important;
}

/* the LIST takes all remaining space */
.list-projects{
  flex: 1 1 auto !important;   /* GROW */
  min-height: 0 !important;    /* allow flexbox to size correctly */
  overflow: visible !important;

  /* kill animation caps so height isn't limited */
  max-height: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* footer should come after the full-height swup block */
.site-footer{ margin-top: 0 !important; border-top-color: rgba(255, 255, 255, 0.25);
  border-top-style: solid;
  border-top-width: 1px;
  box-sizing: border-box;}


  

  :root {
    --rail-blue: #124fc7;                 /* same blue as your UI */
    --headerH: 0px;                       /* JS will update this */
  }
  
  /* Right rail container */
  .tags-rail{
    position: fixed;
    right: 0;
    top: calc(var(--headerH) + env(safe-area-inset-top, 0px));
    bottom: 0;
    width: 128px;                         /* thin column */
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;                /* right align */
    overflow-y: auto;
    pointer-events: auto;
    z-index: 50;                          /* above canvas, below menus if needed */
  }
  
  /* Pills: blue outline + blue text */
  .tags-rail .rail-tag{
    display: block;
    margin: 0;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    color: var(--rail-blue);
    background: rgba(255,255,255,0.96);   /* light chip bg */
    border: 1.5px solid var(--rail-blue);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    text-align: right;                    /* right text align */
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
      /* 🔑 keep to one line and avoid tall chips */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%; 
  }
  
  .tags-rail .rail-tag:hover{
    background: var(--rail-blue);
    color: #fff;
  }
  
  /* small, unobtrusive scrollbar */
  .tags-rail::-webkit-scrollbar{ width: 6px; }
  .tags-rail::-webkit-scrollbar-thumb{
    background: rgba(18,79,199,.25);
    border-radius: 3px;
  }
/* base rail layout */
#tagsRail {
  display: flex;             /* we always keep it in the layout */
  position: fixed;
  right: 0;
  top: calc(var(--headerH) + env(safe-area-inset-top, 0px));
  bottom: 0;
  width: 128px;
  padding: 10px 10px 12px;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  overflow-y: auto;
  z-index: 50;
  
  /* 🔑 slide from the right by default (closed) */
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* only in graph mode at all */
body:not(.mode-graph) #tagsRail {
  display: none;
}

/* when tags are open */
body.mode-graph.tags-open #tagsRail {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}



/* only show in graph mode */
body:not(.mode-graph) .tags-toggle {
  display: none;
}

/* hide on the mobile layout if you want it gone there too */
body.layout-bottom .tags-toggle {
  display: none;
}
@media (max-width: 900px) {
  .tags-toggle { display: none; }
}

/* arrow rotation */
.tags-toggle-arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

/* when tags are open, rotate → to ↓ */
body.tags-open .tags-toggle-arrow {
  transform: rotate(90deg);
} 
/* respect your mobile/layout-bottom overrides */
body.layout-bottom .tags-rail { display: none !important; }

/* WRAPPER is fixed in the top-right corner */
.tags-rail-wrapper {
  position: fixed;
  right: 0;
  top: calc(var(--headerH) + env(safe-area-inset-top, 0px));
  z-index: 50;
}

/* only show wrapper in graph mode */
body:not(.mode-graph) .tags-rail-wrapper {
  display: none;
}

/* TAGS TOGGLE stays at the top, no longer fixed */
.tags-toggle {
  position: relative;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--rail-blue);
  background: transparent;
}

/* arrow rotation */
.tags-toggle-arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}
body.tags-open .tags-toggle-arrow {
  transform: rotate(90deg);  /* → becomes ↓ */
}

/* RAIL is positioned under the toggle */
/* #tagsRail.tags-rail,
.tags-rail {
  position: absolute;
  right: 0;
  top: 100%;             /* 🔑 directly below the toggle */
  /* width: 128px;
  bottom: auto;

  max-height: calc(100vh - 140px); 
  overflow-y: auto;               
  overflow-x: hidden;

  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  /* max-height: calc(100vh - 120px); */


  /* slide-in animation from the right */
  /* transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out; */
} */ */

/* Hide scrollbar in WebKit browsers (Chrome, Safari) */
.tags-rail::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Hide scrollbar in Firefox */
.tags-rail {
  scrollbar-width: none;
}

/* Hide scrollbar in old Edge / IE */
.tags-rail {
  -ms-overflow-style: none;
}
/* when open, slide in */
body.mode-graph.tags-open #tagsRail {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* keep your existing pill styles */
.tags-rail .rail-tag {
  /* ... your existing styles ... */
}

/* Base rail – desktop rules (you already have something like this) */
#tagsRail {
  position: fixed;
  right: 0;
  top: calc(var(--headerH) + env(safe-area-inset-top, 0px));
  bottom: 0;
  width: 128px;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* slide in when tags-open is active – already in your CSS */
body.mode-graph.tags-open #tagsRail {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* 🔹 MOBILE RAIL: smaller + tighter */
@media (max-width: 900px) {
  #tagsRail {
    width: 96px;
    padding: 6px 6px 10px;
    gap: 6px;
  }

  #tagsRail .rail-tag {
    font-size: 11px;
    line-height: 1.2;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
  }
}
#tagsRail::-webkit-scrollbar {
  width: 0;
  height: 0;
}
#tagsRail {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.share-node-button {
  padding: 5px 15px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* hover: white bg, blue text */
.share-node-button:hover {
  background-color: #ffffff;
  color: #124fc7; /* your panel blue */
}


.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 233333000;
}
.popup-overlay.is-visible {
  display: flex;
}
.popup-card {
  z-index: 100000000000;
  background: #124fc7;
  color: #ffffff;
  padding: 32px 40px;
  width: min(640px, 90vw);
  
}
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.popup-title {
  font-size: 22px;
  font-weight: 500;
}
.popup-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
}
.popup-text {
  margin-bottom: 16px;
}
.popup-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  margin-bottom: 16px;
  font-size: 14px;
}
.popup-button {
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background: #0f3fb0;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
}
.popup-button:hover {
  background: #ffffff;
  color: #124fc7;
}

/* bottom view switch (Graph / Tags) */
.view-tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 60;

  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: #f2f2f2;

}

/* only show in graph mode */
body:not(.mode-graph) .view-tabs {
  display: none;
}

.view-tab {
  border: none;
  outline: none;
  background: transparent;
  padding: 5px 16px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

/* default state: Graph active, Tags inactive */
.view-tab-graph {
  background: #ffffff;
  color: #111111;
}
.view-tab-tags {
  background: transparent;
  color: #8f8f8f;
}

/* when tags are open, flip the highlight */
body.tags-open .view-tab-graph {
  background: transparent;
  color: #8f8f8f;
}
body.tags-open .view-tab-tags {
  background: #ffffff;
  color: #111111;
}

/* TAGS RAIL (still on the right) */
#tagsRail {
  position: fixed;
  right: 0;
  top: calc(var(--headerH) + env(safe-area-inset-top, 0px));
  bottom: 0;
  width: 128px;

  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  max-height: calc(100vh - 120px);
  overflow-y: auto; */
  /* overflow-x: hidden;

  /* slide off-screen by default */
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* only relevant in graph mode */
body:not(.mode-graph) #tagsRail {
  display: none;
}

/* when tags are open, rail slides in */
body.mode-graph.tags-open #tagsRail {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.view-tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 60;
}

/* desktop = center between panel and right edge */
@media (min-width: 900px) {
  body:not(.layout-bottom) .view-tabs {
    left: calc(var(--panelW) + (100vw - var(--panelW)) / 2);
    transform: translateX(-50%);
  }
}
/* Center the mobile menu only on the nodes page */
body.nodes-page #mobileOverlay {
  position: fixed;
  inset: 0;
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
}

/* Make sure the inner menu block sits in the center */
body.nodes-page #mobileOverlay .overlay-inner {
  margin: 0 auto !important;
  display: flex;
  flex-direction: column;
}

/* Close button stays in the corner, regardless of centering */
body.nodes-page #mobileOverlay .mobile-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* base rail (desktop rules) stays as you already have it */

/* MOBILE: make rail start below header + blue top panel */
@media (max-width: 900px) {
  #tagsRail {
    top: calc(
      var(--headerH, 0px) +
      var(--graphTopPanelH, 0px) +
      env(safe-area-inset-top, 0px)
    );
    width: 96px;
    padding: 6px 6px 10px;
    gap: 6px;
  }

  #tagsRail .rail-tag {
    font-size: 11px;
    line-height: 1.2;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
  }
}

