*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --neon-yellow: #f2fc00;
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff00cc;
  --dark: #111111;
  --panel-bg: rgba(10, 10, 10, 0.88);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Barlow', sans-serif;
  background: var(--dark);
  color: #fff;
}

/* ── BACKGROUND ── */
.bg {
  position: fixed; inset: 0; z-index: 0;
  background: url('../images/ckbuilders.png') 65% center / 135% auto no-repeat;
}

/* ── LAYOUT ── */
.layout {
  position: fixed; inset: 0; z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

/* ── TOP BAR ── */
.topbar {
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  position: relative;
  z-index: 100;
}

/* ── HAMBURGER ── */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  outline: none;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--neon-yellow);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── CONNECT BUTTON ── */
.connect-btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--neon-yellow);
  border: none;
  padding: 9px 20px;
  cursor: pointer;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  transition: background 0.2s ease, transform 0.15s ease;
  position: relative;
  overflow: hidden;
}
.connect-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--neon-cyan);
  transform: translateX(-110%) skewX(-8deg);
  transition: transform 0.3s ease;
}
.connect-btn:hover::before { transform: translateX(0) skewX(-8deg); }
.connect-btn span {
  position: relative;
  z-index: 1;
  display: inline-block;
  min-width: 110px;
  text-align: center;
}
.connect-btn.connected { background: var(--neon-cyan); }

/* ── SLIDE PANEL MENU ── */
.menu-panel {
  position: fixed;
  top: 0; left: 0;
  width: 240px;
  height: 100%;
  z-index: 200;
  background: var(--panel-bg);
  border-right: 1px solid rgba(242, 252, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0 60px 40px;
  pointer-events: all;
}
.menu-panel.open {
  transform: translateX(0);
}

/* scan-line effect on panel */
.menu-panel::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(242,252,0,0.015) 3px,
    rgba(242,252,0,0.015) 4px
  );
  pointer-events: none;
}

.menu-panel nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-panel nav a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  position: relative;
  width: fit-content;
  transition: color 0.2s ease;
  padding: 4px 0;
}
.menu-panel nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--neon-yellow);
  transition: width 0.3s ease;
}
.menu-panel nav a:hover,
.menu-panel nav a.is-active {
  color: var(--neon-yellow);
}
.menu-panel nav a:hover::after,
.menu-panel nav a.is-active::after { width: 100%; }

.menu-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(242,252,0,0.75);
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* ── SIDEBAR SOCIAL ICONS ── */
.menu-social {
  position: absolute;
  bottom: 32px;
  left: 40px;
  display: flex;
  gap: 18px;
  align-items: center;
  z-index: 1;
}
.menu-social a {
  color: var(--neon-cyan);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.menu-social a:hover {
  opacity: 1;
  transform: translateY(-2px);
}
.menu-social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ── TAGLINE ── */
.tagline {
  pointer-events: all;
  align-self: flex-end;
  padding: 0 32px 10px 0;
  margin-right: 5vw;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-yellow);
}
@media (max-width: 768px) {
  .tagline { font-size: 20px; padding-right: 20px; }
}

/* ── OVERLAY (click-to-close, no darkening) ── */
.overlay {
  position: fixed; inset: 0; z-index: 190;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.overlay.active { opacity: 1; pointer-events: all; }

/* ── CONTENT PANEL ── */
:root { --sidebar-w: 240px; }

.content-panel {
  position: fixed;
  top: 5vh;
  left: var(--sidebar-w);
  height: 90vh;
  /* 90% of the screen-minus-sidebar */
  width: calc((100vw - var(--sidebar-w)) * 0.9);
  z-index: 210;
  background: rgba(15, 15, 15, 0.97);
  border: 1px solid rgba(242, 252, 0, 0.18);
  border-left: none;
  display: flex;
  flex-direction: column;
  transform: translateX(-30px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.77, 0, 0.175, 1),
              opacity   0.32s ease,
              visibility 0s linear 0.32s;
}
.content-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  transition: transform 0.32s cubic-bezier(0.77, 0, 0.175, 1),
              opacity   0.32s ease,
              visibility 0s linear 0s;
}

.content-panel-bar {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.content-panel-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(242, 252, 0, 0.25);
  background: transparent;
  color: var(--neon-yellow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.content-panel-close:hover {
  background: rgba(242, 252, 0, 0.1);
  transform: translateX(-2px);
}
.content-panel-close svg { width: 18px; height: 18px; }

.content-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 40px 40px 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(242,252,0,0.3) transparent;
  outline: none;
}
.content-panel-body::-webkit-scrollbar { width: 8px; }
.content-panel-body::-webkit-scrollbar-thumb {
  background: rgba(242,252,0,0.3);
}

/* Fade content during swap */
.content-panel-body.swapping { opacity: 0; transition: opacity 0.12s ease; }
.content-panel-body { transition: opacity 0.15s ease; }

/* Loaded page content */
.page h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 44px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--neon-yellow);
  margin-bottom: 18px;
  line-height: 1;
}
.page h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin: 28px 0 10px;
}
.page p {
  font-family: 'Barlow', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255,255,255,0.85);
  margin-bottom: 14px;
  max-width: 70ch;
}
.page a {
  color: var(--neon-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 240, 255, 0.35);
}
.page a:hover { border-bottom-color: var(--neon-cyan); }
.page ul.contact-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.page ul.contact-list li {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
}

/* ── IMAGES INSIDE .page ── */

/* Solo image — full content width, with breathing room */
.page img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
}

/* Captioned image: <figure><img><figcaption>caption</figcaption></figure> */
.page figure { margin: 22px 0; }
.page figure img { margin: 0 0 8px; }
.page figcaption {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

/* Image grid — square tiles that auto-fit the panel width.
   Markup:
     <div class="image-grid">
       <a href="https://..."><img src="images/foo.png" alt="..."></a>
       <a href="https://..."><img src="images/bar.png" alt="..."></a>
     </div>
   Items can also be bare <img> if not linkable. */
.page .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.page .image-grid > * {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.page .image-grid > a:hover {
  border-color: rgba(242, 252, 0, 0.5);
  transform: translateY(-2px);
}
.page .image-grid img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0;
}

/* Side-by-side image + text.
   Markup:
     <div class="image-row">
       <img src="images/foo.jpg" alt="...">
       <div><p>Text on the right…</p></div>
     </div>
   Add the --reverse modifier to flip the image to the right side. */
.page .image-row {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 22px 0;
}
.page .image-row > img,
.page .image-row > figure {
  flex: 0 0 45%;
  margin: 0;
}
.page .image-row > div { flex: 1; }
.page .image-row--reverse { flex-direction: row-reverse; }

@media (max-width: 768px) {
  .page .image-row,
  .page .image-row.image-row--reverse {
    flex-direction: column;
  }
  .page .image-row > img,
  .page .image-row > figure {
    flex: none;
    width: 100%;
  }
  .page .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* Mobile: panel fills the screen, sidebar tucks behind */
@media (max-width: 768px) {
  .content-panel {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    border: none;
  }
  .page h2 { font-size: 32px; }
  .content-panel-body { padding: 20px 22px 32px; }
}

/* ── CAROUSELS ── */
.carousel-wrapper {
  pointer-events: all;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.carousel-wrapper::before,
.carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.carousel-wrapper::before { left: 0; background: linear-gradient(to right, rgba(0,0,0,0.5), transparent); }
.carousel-wrapper::after  { right: 0; background: linear-gradient(to left,  rgba(0,0,0,0.5), transparent); }

.carousel-track {
  display: flex;
  padding: 16px 0;
  width: max-content;
  will-change: transform;
}

.carousel-track.top    { animation: scrollLeft  80s linear infinite; }
.carousel-track.bottom { animation: scrollRight 80s linear infinite; }

/* Pause whichever track the cursor is over */
.carousel-wrapper:hover .carousel-track { animation-play-state: paused; }

/* Nudge the upper carousel closer to the top bar */
.carousel-wrapper:has(.carousel-track.top) { margin-top: -20px; }

@keyframes scrollLeft  { from { transform: translateX(0); } to { transform: translateX(-25%); } }
@keyframes scrollRight { from { transform: translateX(-25%); } to { transform: translateX(0); } }

.carousel-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  width: 304px;
  margin-right: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.3s ease;
}
.carousel-card:hover {
  border-color: rgba(242, 252, 0, 0.5);
}

.c-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: 160px;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,0.04);
  opacity: 0.75;
  transition: opacity 0.3s ease;
}
.c-img.contain {
  object-fit: contain;
  background: rgba(0,0,0,0.35);
}
.carousel-card:hover .c-img {
  opacity: 1;
}

.c-caption {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-align: center;
  line-height: 1.3;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  html, body { overflow-y: auto; }
  .layout { position: relative; min-height: 100vh; }
  .bg { background-size: cover; }
  .carousel-card { width: 246px; }
  .c-img { height: 130px; }
}
