@font-face{
  font-family:'Recoleta-bold';
  src:url('fonts/Recoleta-Bold.woff2') format('woff2'),
      url('fonts/Recoleta-Bold.ttf') format('truetype');
  font-weight:600;
  font-display:swap;
}

:root{
  --black:#000000;
  --white:#ffffff;
  --blue:#1c75bc;
  --cyan:#6ec1e4;
  --gray-text:#7a7a7a;
  --gray-nav:#9c9c9c;
  --card-bg:#f5f5f5;
  --font-head:'Recoleta-bold', Georgia, serif;
  --font-body:'Bai Jamjuree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sidebar-w:400px;
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth; scrollbar-gutter:stable;}  /* stops the page shifting sideways when a popup locks scrolling */
body{
  margin:0;
  font-family:var(--font-body);
  background:var(--white);
  color:var(--gray-text);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%; height:auto; display:block;}
a{color:inherit; text-decoration:none;}
ul{list-style:none; margin:0; padding:0;}
h1,h2,h3{font-family:var(--font-head); font-weight:600; color:var(--black); margin:0;}
p{margin:0 0 1em;}

.btn{
  display:inline-block;
  background:var(--blue);
  color:var(--white);
  font-family:var(--font-head);
  font-weight:600;
  font-size:16px;
  padding:12px 28px;
  border-radius:4px;
  border:none;
  cursor:pointer;
  transition:opacity .2s ease;
}
.btn:hover{opacity:.88;}

/* ---------- Sidebar (desktop) ---------- */
.sidebar{
  position:fixed;
  top:0; left:0;
  width:var(--sidebar-w);
  height:100vh;
  background:var(--black);
  padding:50px 30px 30px;
  display:flex;
  flex-direction:column;
  align-items:center;
  z-index:1000;
  overflow-y:auto;
}
.sidebar-logo{display:block; width:180px; margin-bottom:36px; flex-shrink:0;}
.sidebar-nav{width:100%;}
.sidebar-nav ul{display:flex; flex-direction:column; align-items:center; gap:22px;}
.nav-link{
  font-family:var(--font-head);
  font-weight:600;
  font-size:19px;
  color:var(--gray-nav);
  transition:color .2s ease;
}
.nav-link:hover, .nav-link.active{color:var(--white);}

.sidebar-footer{margin-top:auto; width:100%; text-align:center; padding-top:30px; flex-shrink:0;}
.sidebar-social{display:flex; justify-content:center; gap:18px; margin-bottom:20px;}
.sidebar-social a{color:var(--white); opacity:.85; transition:opacity .2s ease;}
.sidebar-social a:hover{opacity:1;}
.sidebar-footer hr{border:none; border-top:1px solid rgba(255,255,255,.15); margin:0 0 16px;}
.sidebar-copy{color:var(--gray-nav); font-size:11px; margin:0; line-height:1.5;}

/* ---------- Mobile bar ---------- */
.mobile-bar{
  display:none;
  position:fixed; top:0; left:0; right:0; z-index:1100;
  height:70px;
  background:var(--black);
  align-items:center; justify-content:space-between;
  padding:0 20px;
}
.mobile-brand img{height:44px; width:auto;}
.hamburger{
  width:36px; height:36px; background:none; border:none; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
}
.hamburger span{width:24px; height:2px; background:var(--white); display:block; transition:all .3s ease;}
.hamburger.active span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.hamburger.active span:nth-child(2){opacity:0;}
.hamburger.active span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ---------- Content ---------- */
.content{margin-left:var(--sidebar-w);}

section{position:relative; padding:70px 60px; overflow:hidden;}

.wireframe-corner{
  position:absolute; top:0; right:0;
  width:420px; height:420px;
  background:url('images/wireframe-bg.jpg') no-repeat top right;
  background-size:cover;
  opacity:.5;
  pointer-events:none;
  mask-image:linear-gradient(to bottom left, black 30%, transparent 70%);
  -webkit-mask-image:linear-gradient(to bottom left, black 30%, transparent 70%);
}
.wireframe-corner-bottom{top:auto; bottom:0; right:0;}

/* ---------- Hero ---------- */
.hero{padding-top:90px; padding-bottom:40px;}
.hero-text{max-width:700px;}
.hero h1{font-size:40px; line-height:1.05; margin-bottom:22px;}
.hero-text p{font-size:18px; color:var(--black); max-width:560px;}

/* ---------- Photo gallery (marquee) ----------
   Motion is driven by script.js (requestAnimationFrame), so speed changes
   ease smoothly instead of restarting a CSS animation. Without JS, or with
   reduced motion turned on, each row is a plain swipeable strip. */
.photo-grid{padding:0; display:flex; flex-direction:column; gap:14px;}

.marquee-row{
  width:100%;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.marquee-row::-webkit-scrollbar{display:none;}
.marquee-track{
  display:flex;
  width:max-content;
  gap:14px;
  padding:0 7px;
}

.photo-grid.marquee-on .marquee-row{
  overflow:hidden;
  touch-action:pan-y;       /* vertical swipes scroll the page, horizontal ones drag the strip */
  cursor:grab;
  user-select:none;
  -webkit-user-select:none;
}
.photo-grid.marquee-on .marquee-row.is-dragging,
.photo-grid.marquee-on .marquee-row.is-dragging .photo-cell{cursor:grabbing;}
.photo-grid.marquee-on .marquee-track{will-change:transform; backface-visibility:hidden;}

.photo-cell{
  flex:0 0 auto;
  width:260px;
  aspect-ratio:1/1;
  overflow:hidden;
  border:2px solid var(--blue);
  border-radius:6px;
  background:#111;
  cursor:zoom-in;
}
.photo-cell img{
  width:100%; height:100%; object-fit:cover;
  -webkit-user-drag:none;
  pointer-events:none;
}

/* ---------- About ---------- */
.about{text-align:center; padding-top:80px;}
.about h2{font-size:40px; margin-bottom:24px;}
.about-lede{max-width:900px; margin:0 auto 60px; color:var(--gray-text); font-size:16px;}

.pillars{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  max-width:1100px;
  margin:0 auto 70px;
}
.pillar-icon{display:inline-flex; color:var(--black); margin-bottom:14px;}
.pillar h3{font-size:25px; margin-bottom:16px;}
.pillar p{color:var(--gray-text); font-size:15px; max-width:420px; margin:0 auto;}

.team-head{margin-bottom:40px;}
.team-head .pillar-icon{margin-bottom:10px;}
.team-head h2{font-size:32px;}

.team-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:30px;
  max-width:1100px;
  margin:0 auto;
}
.team-card{text-align:left;}
.team-photo{aspect-ratio:1/1; overflow:hidden;}
.team-photo img{width:100%; height:100%; object-fit:cover;}
.team-info{background:var(--card-bg); padding:16px 20px 20px;}
.team-info h3{font-size:22px; color:var(--cyan); line-height:1.2; margin-bottom:6px;}
.team-info p{color:var(--gray-text); font-size:15px; margin:0;}

/* ---------- Benefits ---------- */
.benefits{
  background:var(--black);
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:center;
  padding-top:80px; padding-bottom:80px;
}
.benefits h2{color:var(--white); font-size:38px; line-height:1.15;}
.benefits-text p{color:rgba(255,255,255,.85); font-size:16px; margin-bottom:24px;}

/* ---------- Join ---------- */
.join{text-align:center; padding-top:90px; padding-bottom:100px;}
.join h2{font-size:40px; margin-bottom:20px;}
.join p{color:var(--gray-text); font-size:16px; max-width:500px; margin:0 auto 30px;}

/* ---------- Site modals (membership popups) ---------- */
.site-modal{
  display:none;
  position:fixed; inset:0; z-index:1900;
  background:rgba(0,0,0,.55);
  padding:24px;
  overflow-y:auto;
}
.site-modal.active{display:flex; align-items:flex-start; justify-content:center;}
.site-modal-dialog{width:100%; max-width:640px; margin:40px auto;}
.site-modal-content{
  background:var(--white);
  border-radius:5px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}
.site-modal-header{
  background:var(--blue);
  padding:15px 20px;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
}
.site-modal-header h5{
  font-family:var(--font-head);
  font-size:20px;
  font-weight:600;
  color:var(--white);
  margin:0;
}
.site-modal-close{
  background:none; border:none; cursor:pointer;
  color:var(--white);
  font-size:24px; line-height:1;
  flex-shrink:0;
}
.site-modal-body{
  padding:20px;
  color:var(--black);
  font-family:'Montserrat', sans-serif;
  font-size:16px;
  line-height:1.6;
  max-height:70vh;
  overflow-y:auto;
}
.site-modal-body p{margin:0 0 14px;}
.site-modal-body p:last-child{margin-bottom:0;}
.site-modal-body strong{font-weight:600;}

/* ---------- Lightbox ---------- */
.lightbox{
  position:fixed; inset:0; z-index:2000;
  background:rgba(0,0,0,.92);
  display:none; align-items:center; justify-content:center;
  padding:30px;
  touch-action:pinch-zoom;   /* lets one-finger swipes change photo */
}
.lightbox.active{display:flex;}
.lightbox img{max-width:84vw; max-height:84vh; object-fit:contain; user-select:none; -webkit-user-drag:none; transition:opacity .2s ease;}
.lightbox img.is-loading{opacity:.35;}
.lightbox-close{
  position:absolute; top:24px; right:28px;
  background:none; border:none; color:var(--white);
  font-size:2.2rem; line-height:1; cursor:pointer;
}
.lightbox-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:48px; height:64px;
  background:rgba(255,255,255,.08); border:none; border-radius:4px;
  color:var(--white); font-size:2.6rem; line-height:1; cursor:pointer;
  transition:background .2s ease;
}
.lightbox-nav:hover{background:rgba(255,255,255,.18);}
.lightbox-prev{left:20px;}
.lightbox-next{right:20px;}
.lightbox button:focus{outline:none;}
.lightbox button:focus-visible{outline:2px solid var(--cyan); outline-offset:2px;}
.lightbox-count{
  position:absolute; bottom:18px; left:0; right:0; margin:0;
  text-align:center; color:rgba(255,255,255,.7); font-size:14px;
}

/* ================= Responsive ================= */
@media (max-width: 992px){
  .sidebar{display:none;}
  .mobile-bar{display:flex;}
  .content{margin-left:0; padding-top:70px;}
  section[id]{scroll-margin-top:70px;}   /* menu links land below the fixed top bar */

  .sidebar.mobile-open{
    display:flex;
    position:fixed; inset:0; height:100vh;
    width:100%; z-index:1050;
    padding:90px 30px 30px;
  }

  section{padding:50px 24px;}
  .hero{padding-top:50px;}
  .hero h1{font-size:32px;}
  .photo-cell{width:200px;}
  .pillars{grid-template-columns:1fr; gap:40px;}
  .team-grid{grid-template-columns:repeat(2, 1fr);}
  .benefits{grid-template-columns:1fr; text-align:left;}
  .wireframe-corner{width:260px; height:260px;}
}

@media (max-width: 560px){
  .team-grid{grid-template-columns:1fr 1fr; gap:18px;}
  .photo-cell{width:150px;}
  .about h2, .join h2{font-size:30px;}
  .benefits h2{font-size:28px;}
  section{padding:40px 18px;}
  .lightbox{padding:12px;}
  .lightbox img{max-width:100%; max-height:78vh;}
  .lightbox-nav{top:auto; bottom:12px; transform:none; width:44px; height:44px; font-size:2rem;}
  .lightbox-count{bottom:24px;}
}
