/* ==========================================================================
   CROWNATE CONSTRUCTION PROFESSIONAL SERVICES LIMITED (CCPSL)
   Structural Engineering Experience Engine - Page Stylesheet
   Architecture: Minimalist Monochrome Architectural Palette
   Strictly Scoped: .str- prefix to avoid modifying global styles
   ========================================================================== */

/* 1. HERO & 3D VISUALIZATION WRAPPER */
.str-hero-section {
  background-color: var(--ccpsl-black);
  color: var(--ccpsl-white);
  border-bottom: 1px solid var(--ccpsl-border-dark);
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem) 0;
  position: relative;
  overflow: hidden;
}

.str-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ccpsl-black);
  background: var(--ccpsl-white);
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.25rem;
  border-radius: 0;
}

.str-hero-badge .str-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #51cf66;
  box-shadow: 0 0 8px #51cf66;
  animation: strPulse 2s infinite ease-in-out;
}

@keyframes strPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.str-hero-title {
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ccpsl-white);
  margin-bottom: 1.25rem;
  max-width: 1050px;
}

.str-hero-desc {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.65;
  color: #c5c5c0;
  max-width: 860px;
  margin-bottom: 2rem;
}

.str-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2.5rem;
}

/* 2. 3D STRUCTURAL CANVAS STAGE */
.str-3d-stage-wrapper {
  position: relative;
  width: 100%;
  height: clamp(420px, 60vh, 620px);
  background: radial-gradient(circle at 50% 40%, #171d24 0%, #0a0e14 75%, #05070a 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.str-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.str-3d-canvas:active {
  cursor: grabbing;
}

/* 3D Top HUD Telemetry */
.str-hud-top {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  pointer-events: none;
  z-index: 10;
}

.str-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #e0e0e0;
  backdrop-filter: blur(6px);
}

.str-hud-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #fff;
  backdrop-filter: blur(6px);
}

.str-hud-mode-pill {
  color: #51cf66;
  font-weight: 700;
  text-transform: uppercase;
}

/* 3D Controls Bar (Bottom) */
.str-hud-bottom {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  z-index: 10;
}

.str-mode-switcher {
  display: inline-flex;
  background: rgba(10, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 3px;
  gap: 3px;
  backdrop-filter: blur(6px);
}

.str-mode-btn {
  background: transparent;
  border: none;
  color: #aaa;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.str-mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.str-mode-btn.active {
  background: var(--ccpsl-white);
  color: var(--ccpsl-black);
}

.str-nav-pad {
  display: inline-flex;
  gap: 4px;
}

.str-control-btn {
  background: rgba(10, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.str-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.str-control-btn.active {
  background: #51cf66;
  color: #000;
  border-color: #51cf66;
}

/* Live Element Inspector Card inside 3D Canvas */
.str-inspector-card {
  position: absolute;
  top: 4.25rem;
  right: 1rem;
  width: min(320px, calc(100% - 2rem));
  background: rgba(10, 15, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 1.1rem;
  backdrop-filter: blur(10px);
  z-index: 15;
  transition: all 0.3s ease;
  display: none;
}

.str-inspector-card.open {
  display: block;
  animation: strFadeIn 0.25s ease-out;
}

@keyframes strFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.str-inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.str-inspector-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #51cf66;
  text-transform: uppercase;
  font-weight: 700;
}

.str-inspector-close {
  background: none;
  border: none;
  color: #999;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.str-inspector-close:hover {
  color: #fff;
}

.str-inspector-title {
  font-size: 1.05rem;
  color: #fff;
  text-transform: uppercase;
  font-weight: 800;
  margin: 0 0 0.4rem 0;
}

.str-inspector-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #ccc;
  margin: 0 0 0.75rem 0;
}

.str-inspector-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.str-spec-item {
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.str-spec-label {
  color: #777;
  display: block;
}

.str-spec-val {
  color: #fff;
  font-weight: 700;
}

/* 3. QUICK ELEMENT CLICK STRIP (Beneath Hero Canvas) */
.str-quick-elements-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--ccpsl-border-dark);
  margin-top: 1.5rem;
  border: 1px solid var(--ccpsl-border-dark);
}

.str-quick-element-btn {
  background: #111;
  color: #bbb;
  border: none;
  padding: 0.9rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.str-quick-element-btn:hover,
.str-quick-element-btn.active {
  background: #1c222b;
  color: #fff;
}

.str-element-idx {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #51cf66;
  display: block;
  margin-bottom: 0.25rem;
}

.str-element-name {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
}

.str-element-role {
  font-size: 0.75rem;
  color: #888;
  display: block;
  margin-top: 0.2rem;
}

/* 4. LOAD PATH PROGRESSIVE EXPERIENCE */
.str-loadpath-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--ccpsl-white);
  border-bottom: 1px solid var(--ccpsl-border-light);
}

.str-loadpath-diagram {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.str-loadpath-step-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--ccpsl-offwhite);
  border: 1px solid var(--ccpsl-border-light);
  border-left: 4px solid var(--ccpsl-border-light);
  transition: all 0.3s ease;
  position: relative;
}

.str-loadpath-step-row:hover,
.str-loadpath-step-row.active {
  background: #fff;
  border-left-color: var(--ccpsl-black);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.str-loadpath-step-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ccpsl-black);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--ccpsl-border-light);
  padding-right: 1rem;
}

.str-loadpath-step-content h4 {
  font-size: 1.15rem;
  text-transform: uppercase;
  font-weight: 800;
  margin: 0 0 0.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.str-loadpath-step-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ccpsl-subtle-grey);
  margin: 0 0 0.75rem 0;
}

.str-loadpath-action-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ccpsl-black);
  background: var(--ccpsl-mid-grey);
  padding: 0.2rem 0.6rem;
}

.str-loadpath-arrow-down {
  text-align: center;
  font-size: 1.2rem;
  color: #888;
  margin: -0.25rem 0;
}

/* 5. STRUCTURAL DRAWING TO PHYSICAL STRUCTURE */
.str-blueprint-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: #0d1218;
  color: #fff;
  border-bottom: 1px solid var(--ccpsl-border-dark);
}

.str-blueprint-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 992px) {
  .str-blueprint-grid {
    grid-template-columns: 1.35fr 1fr;
  }
}

.str-blueprint-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  background: #0a0f16;
  border: 1px solid #1f2b3a;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.str-blueprint-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.str-blueprint-node {
  cursor: pointer;
  transition: all 0.2s ease;
}

.str-blueprint-node:hover rect,
.str-blueprint-node.active rect {
  fill: rgba(81, 207, 102, 0.25) !important;
  stroke: #51cf66 !important;
  stroke-width: 2px !important;
}

.str-blueprint-details-pane {
  background: #131922;
  border: 1px solid #233142;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.str-blueprint-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.75rem;
}

.str-blueprint-tab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #bbb;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.str-blueprint-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.str-blueprint-tab-btn.active {
  background: var(--ccpsl-white);
  color: var(--ccpsl-black);
  border-color: var(--ccpsl-white);
}

/* 6. BEFORE / INTERVENTION / AFTER SPLIT SLIDER */
.str-compare-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--ccpsl-offwhite);
  border-bottom: 1px solid var(--ccpsl-border-light);
}

.str-compare-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.str-compare-tab-btn {
  background: var(--ccpsl-white);
  border: 1px solid var(--ccpsl-border-light);
  color: var(--ccpsl-black);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.str-compare-tab-btn:hover {
  border-color: var(--ccpsl-black);
}

.str-compare-tab-btn.active {
  background: var(--ccpsl-black);
  color: var(--ccpsl-white);
  border-color: var(--ccpsl-black);
}

.str-slider-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  height: clamp(340px, 50vw, 480px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--ccpsl-border-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  user-select: none;
}

.str-slider-before,
.str-slider-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.str-slider-after-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid #51cf66;
  box-shadow: 2px 0 12px rgba(81, 207, 102, 0.4);
}

.str-slider-after-wrap .str-slider-after {
  width: 960px;
}

.str-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #51cf66;
  border: 3px solid #000;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  z-index: 5;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #000;
  font-weight: 800;
}

.str-slider-tag {
  position: absolute;
  top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  z-index: 4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.str-tag-before {
  right: 1rem;
  background: rgba(0, 0, 0, 0.85);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.4);
}

.str-tag-after {
  left: 1rem;
  background: rgba(0, 0, 0, 0.85);
  color: #51cf66;
  border: 1px solid rgba(81, 207, 102, 0.4);
}

.str-compare-narrative {
  max-width: 960px;
  margin: 1.5rem auto 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.str-narrative-card {
  background: var(--ccpsl-white);
  border: 1px solid var(--ccpsl-border-light);
  padding: 1rem 1.25rem;
}

.str-narrative-phase {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #777;
  text-transform: uppercase;
  font-weight: 700;
}

.str-narrative-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0.25rem 0 0.35rem 0;
  text-transform: uppercase;
}

.str-narrative-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ccpsl-subtle-grey);
  margin: 0;
}

/* 7. LIVE STRUCTURAL INTELLIGENCE SECTION */
.str-intel-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--ccpsl-offwhite);
  border-bottom: 1px solid var(--ccpsl-border-light);
}

.str-intel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.str-intel-filter-list {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.str-intel-pill {
  background: var(--ccpsl-white);
  border: 1px solid var(--ccpsl-border-light);
  color: var(--ccpsl-black);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.str-intel-pill:hover {
  border-color: var(--ccpsl-black);
}

.str-intel-pill.active {
  background: var(--ccpsl-black);
  color: var(--ccpsl-white);
  border-color: var(--ccpsl-black);
}

.str-intel-search-wrap {
  position: relative;
  min-width: 240px;
}

.str-intel-search-input {
  width: 100%;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  border: 1px solid var(--ccpsl-border-light);
  background: var(--ccpsl-white);
  color: var(--ccpsl-black);
}

.str-intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.str-news-card {
  background: var(--ccpsl-white);
  border: 1px solid var(--ccpsl-border-light);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.str-news-card:hover {
  border-color: var(--ccpsl-black);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.str-news-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.str-news-source {
  font-weight: 700;
  color: var(--ccpsl-black);
  text-transform: uppercase;
}

.str-news-date {
  color: #888;
}

.str-news-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #1a56db;
  margin-bottom: 0.5rem;
  display: block;
}

.str-news-headline {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 0.65rem 0;
  color: var(--ccpsl-black);
}

.str-news-summary {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ccpsl-subtle-grey);
  margin: 0 0 1rem 0;
}

.str-news-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ccpsl-black);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease;
}

.str-news-link:hover {
  color: #1a56db;
}

/* 8. STRUCTURAL ENQUIRY FORM */
.str-form-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--ccpsl-white);
  border-bottom: 1px solid var(--ccpsl-border-light);
}

.str-form-container {
  max-width: 860px;
  margin: 0 auto;
  background: var(--ccpsl-offwhite);
  border: 1px solid var(--ccpsl-border-light);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.str-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .str-form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.str-ref-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: none;
}

.str-ref-code {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #166534;
  letter-spacing: 0.05em;
}

/* 9. ACCESSIBILITY & PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
  .str-hero-badge .str-pulse-dot,
  .str-slider-after-wrap,
  .str-inspector-card,
  .str-loadpath-step-row {
    animation: none !important;
    transition: none !important;
  }
}
