/* ============================================================
   RESET
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: "Courier New", monospace;
  background: #fff;
  color: #111;
  line-height: 1.4;
  overflow-x: hidden; 
  width: 100%;
}

/* ============================================================
   GENERIC CONTAINER
   ============================================================ */
.container {
  max-width: 1150px;
  margin: auto;
  padding: 0 24px;
}

/* ============================================================
   SECTION DIVIDERS
   ============================================================ */
.nav, .hero, .section-title, .collection-block,
.contact-link, .contact, .footer {
  border-bottom: 2px solid #777;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-inner {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0; 
}

.logo-small {
  height: 40px;
  width: auto;
}

.brand {
  font-size: 17px;
  font-weight: 700;      
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

/* --- Nav links + dropdown --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-link {
  font-family: "Courier New", monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  color: #111;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-link:hover { opacity: 0.5; }

/* --- Dropdown --- */
.nav-item.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ddd;
  min-width: 200px;
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1000;
}

.dropdown-menu li a {
  display: block;
  padding: 6px 16px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: #111;
}

.dropdown-menu li a:hover { background: #f3f3f3; }

/* Hover + JS-open */
.nav-item.dropdown:hover .dropdown-menu,
.dropdown-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 70px 0; }

.hero-inner {
  max-width: 1150px;
  margin: auto;
  padding: 0 24px;
}

.hero-logo { margin-bottom: 40px; }

/* HERO LOGO FADE-IN */
.logo-large {
  height: 270px;
  width: auto;
  opacity: 0;
  --tx: -60px;
  --scale: 1;
  transform: translateX(var(--tx)) scale(var(--scale));
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.logo-large.animate-in {
  opacity: 1;
  --tx: 0px;
}

/* HERO TITLE BLOCK */
.hero-title-block {
  position: relative;
  display: flex;
}

.hero h1 {
  max-width: 1000px;
  font-weight: 500;
  font-size: 60px;
  line-height: 1.15;
}

/* RIGHT-SIDE VERTICAL LOGO RAIL */
.vertical-logo-rail-wrapper {
  position: absolute;
  top: 40px;
  right: -400px;
  width: 260px;
  height: 330px;
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
}

.vertical-logo-rail {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-vertical {
  height: 126px; 
  width: auto; 
  opacity: 0; 
  transform: rotate(90deg) scale(0.8) translateX(100px);
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease-in;
}

.logo-vertical.slide-in-right {
  opacity: 1; 
  transform: rotate(90deg) scale(0.8) translateX(0); 
}

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  padding: 24px 0;
}
.section-title p {
  font-size: 14px;
  opacity: 0.8;
}

/* ============================================================
   COLLECTION BLOCKS
   ============================================================ */
.collection-block.fullwidth {
  width: 100%;
  padding: 60px 0;
}

.row-heading {
  max-width: 1150px;
  margin: 0 auto 24px auto;
  padding: 0 24px;
  text-align: right;
}

.row-heading h2 {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.row-heading p {
  margin-top: 4px;
  font-size: 13px;
  color: #444;
}

/* --- Speed Slider --- */
.speed-slider {
  margin-top: 10px;
  width: 180px;
  height: 2px;
  background: #ddd;
  border-radius: 999px;
  appearance: none;
}
.speed-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #111;
  cursor: pointer;
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { width: 100%; overflow: hidden; }

.marquee-inner {
  display: flex;
  gap: 45px;
  width: max-content; 
  padding-right: 45px;
  animation-name: marquee-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  /* Duration is now set via JS */
  will-change: transform; 
}

.marquee:hover .marquee-inner { animation-play-state: paused; }

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-inner {
    animation: none;
    transform: translateX(0) !important;
  }
}

/* ============================================================
   TILES
   ============================================================ */
.tile {
  width: 300px;
  height: 300px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 6px;
  position: relative;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* HOVER OVERLAY */
.hover-tile span {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Courier New", monospace;
  font-size: 15px;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 12px 18px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(6px);
}
.hover-tile:hover span { opacity: 1; }

/* ============================================================
   ABOUT + CONTACT
   ============================================================ */
.contact-link { padding: 20px 0; }

.contact { padding: 40px 0; }

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap; 
}

.contact-logo {
  height: 22px;
  transform: scale(1.82);
}

.contact-text {
  flex-grow: 1; 
  text-align: center; 
}

.contact-text,
.contact-cta .contact-label { 
  font-size: 14px;
}

.contact-email-icon img {
  height: 20px;
  display: block;
}

/* ============================================================
   PARALLAX WORDMARK
   ============================================================ */
.giant-wordmark-container {
  width: 100%;
  overflow: hidden;
  padding: 60px 24px;
}

.giant-wordmark {
  font-family: "Courier New", monospace;
  font-weight: 700;
  text-transform: lowercase;
  font-size: clamp(13vw, 16vw, 360px); 
  line-height: 0.8;
  letter-spacing: 0.01em;
  white-space: nowrap;
  will-change: transform;
}

/* ============================================================
   LIGHTBOX OVERLAY BASE
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.lightbox-overlay.open { display: flex; }

.lightbox-inner {
  background: #fff;
  max-width: 1400px;
  width: 95%;
  max-height: 98vh; 
  padding: 24px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* ============================================================
   LIGHTBOX CONTENT — 3-COLUMN FLEX GRID
   ============================================================ */
.lightbox-content {
  display: flex;
  gap: 24px;
  height: calc(98vh - 80px); 
}

/* ============================================================
   COLUMN 1: CODE PANEL 
   ============================================================ */
.lightbox-text {
  flex: 1; 
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
  overflow: hidden;
}

.lightbox-code-title {
  font-size: 16px;
  letter-spacing: 0.07em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* Code wrapper fills remaining height */
.code-wrapper {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

/* Code block styles */
.lightbox-code-block {
  background: #000;
  border: 1px solid #222;
  color: #e6e6e6;
  padding: 18px 0 18px 48px; 
  border-radius: 8px;
  font-size: 13px;
  overflow-x: auto;
  height: 100%;
  position: relative;
}

/* Line numbering */
.lightbox-code-block::before {
  content: attr(data-lines);
  position: absolute;
  left: 0;
  top: 18px;
  width: 40px;
  padding-right: 8px;
  text-align: right;
  color: #666;
  white-space: pre;
  font-size: 13px;
  line-height: 1.4;
  font-family: "Courier New", monospace;
}

.lightbox-code-block code {
  font-family: "Courier New", monospace;
  white-space: pre;
  display: block;
}

/* Syntax highlight classes */
.lightbox-code-block .kw { color: #ff7b72; }
.lightbox-code-block .fn { color: #ffa657; }
.lightbox-code-block .str { color: #a5d6ff; }
.lightbox-code-block .com { color: #6e7681; font-style: italic; }
.lightbox-code-block .num { color: #79c0ff; }

/* Toolbar under code */
.code-toolbar {
  display: flex;
  gap: 12px;
}

/* ============================================================
   COLUMN 2: IMAGE PANEL 
   ============================================================ */
.lightbox-image-panel {
  flex: 1.6; 
  display: flex;
  flex-direction: column;
  height: 100%;
}

.image-title {
  display: none; 
}

.lightbox-image-wrapper {
  flex: 1;
  display: flex;
  padding: 10px;
  justify-content: center;
  align-items: center;
  position: relative;
}

.lightbox-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Loader spinner */
.lightbox-image-wrapper.loading img { opacity: 0; }
.lightbox-image-wrapper.loading .loader { display: block; }

.loader {
  display: none;
  width: 40px;
  height: 40px;
  border: 4px solid #ddd;
  border-top: 4px solid #111;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
  inset: 0;
  margin: auto;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ============================================================
   COLUMN 3: DESCRIPTION PANEL 
   ============================================================ */
.lightbox-description-panel {
  flex: 0.8; 
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.hash-info-title {
  font-size: 16px;
  letter-spacing: 0.07em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-top: 5px; 
}

.lightbox-description {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  overflow-y: auto;
  white-space: pre-wrap;
}


/* ============================================================
   BUTTONS — TOOLBAR STYLING
   ============================================================ */
.lb-btn,
.toolbar-right #downloadBtn,
.lightbox-sizes button,
.lightbox-formats button {
  padding: 6px 14px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-family: "Courier New", monospace;
  letter-spacing: 0.03em;
  text-decoration: none;
  height: 36px; 
  display: flex; 
  align-items: center;
  justify-content: center;
}

.lb-btn:hover,
.toolbar-right #downloadBtn:hover,
.lightbox-sizes button:hover,
.lightbox-formats button:hover,
.lb-btn.active {
  background: #111;
  color: #fff;
}

/* Toolbar under image */
.toolbar-right {
  margin-top: 10px;
  padding: 0 10px;
}

.unified-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.lightbox-sizes,
.lightbox-formats {
  display: flex;
  gap: 8px;
}

.lightbox-sizes button.active,
.lightbox-formats button.active {
  background: #111;
  color: #fff;
}


/* ============================================================
   MOBILE OPTIMIZATION
   ============================================================ */
@media (max-width: 950px) {

  .nav-inner {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .nav-logo {
    justify-content: center;
    width: 100%;
  }

  .logo-small { height: 40px; }
  
  .nav-links {
    gap: 20px 30px; 
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }
  
  .nav-link { font-size: 13px; }

  .hero { padding: 40px 0; }
  
  .hero h1 {
    font-size: 28px; 
    text-align: center;
    padding: 0 10px; 
  }
  
  .logo-large {
    height: 100px; 
    margin: 0 auto 30px auto;
    display: block;
    transform: none !important; 
    opacity: 1 !important;
  }
  
  .hero-title-block {
    display: block; 
    text-align: center;
  }

  .vertical-logo-rail-wrapper { display: none; }

  .marquee-inner {
    animation: none !important;
    transform: none !important;
    /* Ensure padding is removed so calculations are accurate for seamless loop */
    padding-right: 0px !important; 
    width: max-content;
  }

  .marquee {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* Momentum scroll on iOS */
    cursor: grab;
    scrollbar-width: none; /* Hide scrollbar Firefox */
  }
  
  .marquee::-webkit-scrollbar { display: none; }

  .speed-slider { display: none; }

  .lightbox-overlay {
    align-items: flex-start; 
    overflow-y: auto;
  }

  .lightbox-inner {
    max-height: none; 
    min-height: 100vh; 
    overflow-y: visible; 
    padding: 60px 16px 80px 16px; 
    width: 100%;
    border-radius: 0;
  }

  .lightbox-content {
    flex-direction: column; 
    height: auto; 
    gap: 30px;
  }

  .lightbox-image-panel {
    order: 1;
    flex: none;
    height: auto;
  }

  .lightbox-description-panel {
    order: 2;
    flex: none;
    height: auto;
    overflow: visible;
  }

  .lightbox-text {
    order: 3;
    flex: none;
    height: auto;
    border-top: 1px solid #eee; 
    padding-top: 20px;
  }
  
  .code-wrapper {
    max-height: 300px; 
    border: 1px solid #eee;
  }

  .lightbox-image-wrapper {
    min-height: 300px;
    max-height: 50vh;
    background: #f9f9f9; 
  }

  .lightbox-close {
    position: fixed; 
    top: 15px;
    right: 15px;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .contact-row {
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
  }

  .contact-text {
    width: 100%;
    font-size: 12px;
    line-height: 1.6;
    padding: 0 10px;
  }

  .unified-toolbar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .lightbox-sizes, .lightbox-formats {
    justify-content: center;
  }
  
  #downloadBtn {
    width: 100%; 
    margin-top: 10px;
  }
  
  .collection-block.fullwidth {
    padding: 40px 0;
  }
  
  .row-heading {
    text-align: center; 
  }
}