/* BlokTrading® – design tokens (Light Cement aesthetic) */
:root {
  --industrial-charcoal: #2C3E50;
  --industrial-black: #000000;
  --industrial-grey: #D1D5DB;
  --cement-light: #E5E7EB;
  --cement-raw: #D1D1D1;
  --safety-orange: #F58220;
  --steel-grey: #AFAFAF;
  --section-light: #D1D1D1; /* cement-raw for section depth */
  --concrete-white: #ffffff;
}

.bg-cement-light {
  background-color: var(--cement-light);
}

.bg-cement-raw {
  background-color: var(--cement-raw);
}

.text-industrial-black {
  color: var(--industrial-black);
}

/* Concrete grain texture – noise overlay for realistic cement feel */
.concrete-grain {
  position: relative;
  background-color: var(--cement-light);
}

.concrete-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

/* Blueprint grid – dark grey dots over light cement */
.bg-blueprint-grid {
  background-image: radial-gradient(circle, #6b7280 1px, transparent 1px);
  background-size: 30px 30px;
}

.bg-industrial-charcoal {
  background-color: var(--industrial-charcoal);
}

.bg-industrial-black {
  background-color: var(--industrial-black);
}

.text-industrial-grey {
  color: var(--industrial-grey);
}

.text-safety-orange {
  color: var(--safety-orange);
}

.border-safety-orange {
  border-color: var(--safety-orange);
}

.border-industrial-charcoal {
  border-color: var(--industrial-charcoal);
}

/* Lighter charcoal for image container edges */
.border-industrial-charcoal-light {
  border-color: #3d4f5f;
}

/* Hero slider – mechanical shutter & captions */
#hero-slider {
  isolation: isolate;
}

.hero-slide {
  transition: opacity 0.01s;
}

.hero-slide.active {
  z-index: 1;
}

.hero-shutter {
  transform-origin: center;
  will-change: transform;
}

/* Initial state: shutters open (off-screen) */
#shutter-top {
  transform: translateY(-100%);
}

#shutter-bottom {
  transform: translateY(100%);
}

.hero-caption-title {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero-caption-title {
    font-size: 0.875rem !important;
  }
}

.spec-metadata {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  color: var(--safety-orange);
}

.hero-caption .char {
  display: inline-block;
  opacity: 0;
  transform: rotateX(-90deg);
  transform-origin: bottom;
}

#slider-progress-track {
  height: 5px;
}

#slider-progress-fill {
  transition: none;
}

/* Hero overlay with subtle grid (blueprint-style) – 50% so image shows through */
.hero-overlay {
  background-color: rgba(44, 64, 72, 0.5);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Optional: grayscale image for performance strip */
.img-grayscale {
  filter: grayscale(100%);
}

/* Sepia tone for heritage images */
.img-sepia {
  filter: sepia(60%) contrast(1.1);
}

/* Architectural About section – two-column layout */
.about-arch {
  background-color: var(--section-light);
}

.about-arch-heading {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
}

.about-arch-heading .highlight {
  color: var(--safety-orange);
}

.about-arch-checklist {
  color: var(--industrial-charcoal);
}

.about-arch-checklist .check-icon {
  color: var(--safety-orange);
}

/* Parallax CTA section – The BLOK System */
.cta-blok {
  position: relative;
  background-color: var(--industrial-charcoal);
  overflow: hidden;
}

.cta-blok::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/blueprint-bg.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  opacity: 0.2;
  z-index: 0;
}

.cta-blok .cta-content {
  position: relative;
  z-index: 1;
}

.cta-blok h2 {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
  color: var(--concrete-white);
}

.cta-blok .subtext {
  color: var(--steel-grey);
}

.cta-blok .btn-industrial {
  background-color: var(--industrial-charcoal);
  color: white;
  border: none;
  border-bottom: 2px solid var(--safety-orange);
  border-radius: 4px;
  font-weight: 600;
  transition: border-width 0.2s, border-color 0.2s;
}

.cta-blok .btn-industrial:hover {
  border-bottom-width: 4px;
  border-color: var(--safety-orange);
}

/* Scrolling photo strip */
.photo-strip-track {
  animation: photoStripScroll 30s linear infinite;
}

.photo-strip:hover .photo-strip-track {
  animation-play-state: paused;
}

@keyframes photoStripScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Mobile nav: hidden by default, show when .open */
@media (max-width: 767px) {
  #main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: var(--industrial-charcoal);
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  }
  #main-nav.open {
    display: flex;
  }
}
@media (min-width: 768px) {
  #main-nav {
    display: flex;
  }
}

/* ===== BLOKS Component Specification ===== */
.blok-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 767px) {
  .blok-spec-grid {
    grid-template-columns: 1fr;
  }
  .blok-spec-row {
    grid-template-columns: 1fr;
  }
}

.blok-spec-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  gap: 2rem;
  align-items: start;
}

.blok-spec-image {
  background-color: var(--industrial-charcoal);
  border: 1px solid #3d4f5f;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem;
  box-sizing: border-box;
}

.blok-spec-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.blok-spec-box {
  border: 2px solid var(--safety-orange);
  padding: 1.25rem 1.5rem;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.8125rem;
}

.blok-spec-box .shape-name {
  font-family: inherit;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--industrial-charcoal);
  margin-bottom: 0.5rem;
}

.blok-spec-box .shape-desc {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.blok-spec-box .spec-label {
  color: var(--safety-orange);
  margin-top: 0.5rem;
}

/* Hard product cards: Square, Circle, Quadrant – charcoal with white text */
.blok-spec-box-hard {
  background-color: var(--industrial-charcoal);
  color: white;
}

.blok-spec-box-hard .shape-name {
  color: white;
}

.blok-spec-box-hard .shape-desc {
  color: rgba(255, 255, 255, 0.85);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 2px solid var(--safety-orange);
  color: var(--safety-orange);
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  background-color: var(--safety-orange);
  color: white;
}

/* System Integration – dimension lines */
.sys-integration {
  position: relative;
  background-color: var(--cement-light);
  overflow: hidden;
}

.sys-integration::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/dimension-lines.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  pointer-events: none;
}

.sys-integration .sys-content {
  position: relative;
  z-index: 1;
}

/* ===== BLOK Tech-Select Configurator ===== */
.blok-configurator {
  background-color: var(--industrial-charcoal);
  color: var(--industrial-grey);
  padding: 2rem;
  border-radius: 8px;
}

.configurator-layout {
  display: grid;
  grid-template-columns: 80px 1fr 280px;
  gap: 1.5rem;
  align-items: start;
  min-height: 400px;
}

@media (max-width: 1023px) {
  .configurator-layout {
    grid-template-columns: 1fr;
  }
  .config-sidebar {
    flex-direction: row !important;
    flex-wrap: wrap;
  }
}

.config-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.config-shape-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: var(--steel-grey);
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.config-shape-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--industrial-grey);
}

.config-shape-btn.active {
  background: rgba(245, 130, 32, 0.2);
  border: 2px solid var(--safety-orange);
  border-color: var(--safety-orange);
  color: var(--safety-orange);
  box-shadow: 0 0 12px rgba(245, 130, 32, 0.4);
}

.config-shape-btn svg {
  width: 24px;
  height: 24px;
}

.config-viewport {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--safety-orange);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.viewport-unit-id {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--safety-orange);
  z-index: 2;
}

.viewport-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.configurator-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewport-dimensions {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.config-specs {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(245, 130, 32, 0.5);
  border-radius: 4px;
  padding: 1.25rem;
}

.specs-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--safety-orange);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.specs-desc {
  font-size: 0.8125rem;
  color: var(--steel-grey);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.spec-group {
  margin-bottom: 1rem;
}

.spec-group .spec-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--safety-orange);
  margin-bottom: 0.5rem;
}

.spec-dimensions {
  color: var(--steel-grey);
  line-height: 1.6;
}

.spec-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.spec-segmented button {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: var(--steel-grey);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.spec-segmented button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--industrial-grey);
}

.spec-segmented button.active {
  background: rgba(245, 130, 32, 0.3);
  border-color: var(--safety-orange);
  color: var(--safety-orange);
}

/* Photo Gallery Carousel */
.gallery-carousel {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.gallery-carousel-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--safety-orange);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.gallery-carousel-desc {
  font-size: 0.8125rem;
  color: var(--steel-grey);
  margin-bottom: 1rem;
}

.gallery-carousel-wrap {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 1rem;
  overflow: hidden;
}

.gallery-carousel-viewport {
  overflow: hidden;
  width: 100%;
  min-height: 140px;
}

.gallery-carousel-track {
  display: flex;
  width: max-content;
  transition: transform 1.2s ease-in-out;
  will-change: transform;
}

.gallery-slide {
  flex: 0 0 33.333%;
  padding: 0 0.25rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 4px;
}

.gallery-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 2px solid var(--safety-orange);
  background: rgba(0, 0, 0, 0.6);
  color: var(--safety-orange);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gallery-carousel-btn:hover {
  background: var(--safety-orange);
  color: var(--industrial-black);
}

.gallery-carousel-prev { left: 0.5rem; }
.gallery-carousel-next { right: 0.5rem; }

.gallery-carousel-dots {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--safety-orange);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}

.gallery-dot.active {
  background: var(--safety-orange);
}

/* Services photo gallery – 4 photos, popup zoom */
.services-gallery-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  padding: 0;
  border: none;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: opacity 0.2s;
}
.services-gallery-thumb:hover { opacity: 0.9; }

.services-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Services lightbox */
.services-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.services-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.services-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.services-lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 1;
}

.services-lightbox-content img {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.services-lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 36px;
  height: 36px;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.services-lightbox-close:hover {
  background: var(--safety-orange);
  color: var(--industrial-black);
  border-color: var(--safety-orange);
}

/* CRT flicker */
.configurator-image.crt-flicker {
  animation: crtFlicker 0.15s ease-out;
}

@keyframes crtFlicker {
  0% { opacity: 1; }
  20% { opacity: 0.3; }
  40% { opacity: 1; }
  60% { opacity: 0.5; }
  80% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* Download Tech Spec button in configurator */
.btn-download-techspec {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 2px solid var(--safety-orange);
  color: var(--safety-orange);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-download-techspec:hover {
  background: var(--safety-orange);
  color: var(--industrial-black);
}

.btn-download-ready {
  text-align: center;
  text-decoration: none;
}

/* Contact form success popup */
.contact-success-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.contact-success-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-success-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.contact-success-panel {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  margin: 1rem;
  padding: 2rem 2.5rem;
  background: var(--cement-light);
  border: 2px solid var(--safety-orange);
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.contact-success-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--industrial-black);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

.contact-success-close:hover {
  color: var(--safety-orange);
}

.contact-success-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--safety-orange);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.contact-success-text {
  color: var(--industrial-black);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Tech Spec Lead Form Modal */
.tecspec-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.tecspec-modal.open {
  pointer-events: auto;
  opacity: 1;
}

.tecspec-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.tecspec-modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--cement-raw);
  border: 2px solid #000000;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  padding: 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s ease-out;
}

.tecspec-modal.open .tecspec-modal-panel {
  transform: translateX(0);
}

.tecspec-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--industrial-black);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.tecspec-modal-close:hover {
  color: var(--safety-orange);
}

.tecspec-modal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--safety-orange);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.tecspec-modal-subtitle {
  font-size: 0.875rem;
  color: var(--industrial-black);
  margin-bottom: 1.5rem;
}

.tecspec-form input[type="text"],
.tecspec-form input[type="tel"],
.tecspec-form input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--cement-light);
  border: 1px solid #000000;
  color: var(--industrial-black);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.tecspec-form input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.tecspec-form input:focus {
  outline: none;
  border-color: var(--safety-orange);
}

.tecspec-field {
  margin-bottom: 1rem;
}

.tecspec-error {
  display: block;
  font-size: 0.75rem;
  color: #e74c3c;
  margin-top: 0.25rem;
}

.tecspec-terms .tecspec-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--industrial-black);
  cursor: pointer;
}

.tecspec-terms input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--safety-orange);
}

.tecspec-form-msg {
  margin: 0 0 0.5rem;
  min-height: 0;
}

.tecspec-submit {
  width: 100%;
  margin-top: 1rem;
  padding: 0.875rem;
  background: var(--safety-orange);
  border: none;
  color: var(--industrial-black);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.tecspec-submit:hover {
  opacity: 0.9;
}

.tecspec-success {
  padding: 1rem 0;
}

.tecspec-success-msg {
  font-size: 0.875rem;
  color: var(--industrial-black);
  margin-bottom: 1rem;
}

.tecspec-success.hidden {
  display: none !important;
}

.tecspec-form.hidden {
  display: none !important;
}

/* Download button flicker on success */
.btn-download-ready.flicker-in {
  animation: downloadFlickerIn 0.4s ease-out;
}

@keyframes downloadFlickerIn {
  0% { opacity: 0; transform: scale(0.95); }
  30% { opacity: 0.3; }
  50% { opacity: 1; }
  70% { opacity: 0.7; }
  100% { opacity: 1; transform: scale(1); }
}
