:root {
      --navy-950: #06152b;
      --navy-900: #0a2540;
      --navy-850: #0e3054;
      --navy-800: #123d6b;
      --blue-700: #0077c8;
      --blue-600: #2563eb;
      --blue-500: #3b82f6;
      --blue-100: #dbeafe;
      --blue-50: #eff6ff;

      --slate-900: #0f172a;
      --slate-800: #1e293b;
      --slate-700: #334155;
      --slate-600: #475569;
      --slate-500: #64748b;
      --slate-400: #94a3b8;
      --slate-300: #cbd5e1;
      --slate-200: #e2e8f0;
      --slate-100: #f1f5f9;
      --slate-50: #f8fafc;
      --white: #ffffff;

      --emerald-600: #059669;
      --cyan-400: #22d3ee;

      --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px -1px rgba(10, 37, 64, 0.08), 0 2px 4px -2px rgba(10, 37, 64, 0.04);
      --shadow-lg: 0 10px 15px -3px rgba(10, 37, 64, 0.08), 0 4px 6px -4px rgba(10, 37, 64, 0.04);
      --shadow-xl: 0 20px 25px -5px rgba(10, 37, 64, 0.09), 0 8px 10px -6px rgba(10, 37, 64, 0.03);
    }

    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      background-color: var(--slate-50);
      color: var(--slate-600);
      font-family: var(--font-body);
      font-size: 16px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    h1, h2, h3, h4, h5, h6 {
      font-family: var(--font-heading);
      color: var(--navy-900);
      font-weight: 700;
      line-height: 1.25;
      letter-spacing: -0.02em;
    }

    button, input, select, textarea {
      font: inherit;
    }

    a {
      color: var(--blue-700);
      text-decoration: none;
      transition: color 0.15s ease;
    }
    a:hover {
      color: var(--blue-700);
    }

    img {
      max-width: 100%;
      height: auto;
      display: block;
    }

    .container {
      width: 100%;
      max-width: 1280px;
      margin-left: auto;
      margin-right: auto;
      padding-left: 24px;
      padding-right: 24px;
    }

    /* Deck Bar */
    .theme-deck-bar {
      background: var(--slate-900);
      color: var(--slate-300);
      font-size: 12px;
      font-family: var(--font-body);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      position: sticky;
      top: 0;
      z-index: 1000;
      padding: 8px 0;
    }
    .theme-deck-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }
    .deck-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(0, 119, 200, 0.35);
      border: 1px solid rgba(59, 130, 246, 0.5);
      color: var(--slate-300);
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
    }
    .deck-nav {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .deck-btn {
      color: var(--slate-300);
      padding: 4px 10px;
      border-radius: 4px;
      font-weight: 500;
      font-size: 12px;
      transition: all 0.15s ease;
    }
    .deck-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #ffffff;
    }
    .deck-btn.active {
      background: var(--blue-600);
      color: #ffffff;
      font-weight: 600;
    }
    .deck-hub-btn {
      background: rgba(255, 255, 255, 0.15);
      color: #ffffff;
      font-weight: 700;
      padding: 4px 12px;
      border-radius: 4px;
      font-size: 12px;
    }

    /* Utility Topbar */
    .topbar {
      background: #ffffff;
      border-bottom: 1px solid var(--slate-200);
      font-size: 12px;
      color: var(--slate-600);
      padding: 7px 0;
    }
    .topbar-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }
    .topbar-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .topbar-pill {
      background: var(--slate-100);
      border: 1px solid var(--slate-200);
      color: var(--navy-900);
      font-weight: 700;
      font-size: 12px;
      padding: 1px 8px;
      border-radius: 4px;
      text-transform: uppercase;
    }
    .topbar-right {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .topbar-right a {
      color: var(--slate-600);
      font-weight: 500;
    }
    .topbar-right a:hover {
      color: var(--blue-700);
    }
    .topbar-sep {
      color: var(--slate-500);
    }
    .topbar-badge {
      font-weight: 700;
      color: var(--emerald-600);
    }

    /* Site Header with Official Logo */
    .site-header {
      background: #ffffff;
      border-bottom: 1px solid var(--slate-200);
      position: relative;
      z-index: 900;
      box-shadow: 0 2px 8px rgba(10, 37, 64, 0.03);
    }
    .nav-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 76px;
    }
    .brand-link {
      display: flex;
      align-items: center;
      text-decoration: none;
    }
    .brand-logo {
      height: 42px;
      width: auto;
      display: block;
    }
    .nav-links {
      display: flex;
      align-items: center;
      gap: 26px;
      list-style: none;
    }
    .nav-item {
      font-size: 14px;
      font-weight: 600;
      color: var(--navy-900);
      padding: 8px 0;
      position: relative;
      transition: color 0.15s ease;
    }
    .nav-item:hover {
      color: var(--blue-700);
    }
    .nav-item.active {
      color: var(--blue-700);
      font-weight: 700;
    }
    .nav-item.active::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 2.5px;
      background: var(--blue-700);
      border-radius: 2px;
    }
    .btn-quote {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--blue-700);
      color: #ffffff !important;
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 700;
      padding: 10px 22px;
      border-radius: 6px;
      transition: all 0.15s ease;
    }
    .btn-quote:hover {
      background: var(--blue-600);
      box-shadow: 0 4px 8px rgba(0, 119, 200, 0.3);
      transform: translateY(-1px);
    }

    /* Hero */
    .hero-section {
      position: relative;
      background-image:
        linear-gradient(180deg,
          rgba(15, 23, 42, 0.55) 0%,
          rgba(15, 23, 42, 0.42) 45%,
          rgba(15, 23, 42, 0.72) 100%
        ),
        url('../images/real-factory/factory-cnc-gantry-hall-panoramic.jpg');
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      color: #ffffff;
      padding: 60px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      text-align: center;
      overflow: hidden;
    }
    .hero-content-center {
      max-width: 980px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      position: relative;
      z-index: 10;
    }
    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 700;
      color: #38bdf8;
      background: rgba(6, 182, 212, 0.12);
      border: 1px solid rgba(6, 182, 212, 0.3);
      padding: 4px 12px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      margin-bottom: 16px;
    }
    .hero-title {
      font-size: clamp(2rem, 4.2vw, 3rem);
      font-weight: 800;
      color: #ffffff;
      line-height: 1.16;
      margin-bottom: 22px;
      letter-spacing: -0.025em;
      text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
      max-width: 940px;
    }
    .hero-subtitle {
      font-size: 18px;
      font-weight: 400;
      color: #ffffff;
      line-height: 1.62;
      margin-bottom: 0;
      text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.95);
      max-width: 880px;
    }

    /* Section padding */
    .section-padding {
      padding: 76px 0;
    }
    .section-header {
      margin-bottom: 40px;
    }
    .section-header.text-center {
      text-align: center;
      max-width: 760px;
      margin-left: auto;
      margin-right: auto;
    }
    .section-eyebrow {
      display: inline-block;
      font-size: 12px;
      font-weight: 700;
      color: var(--blue-700);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 8px;
    }
    .section-title {
      font-size: clamp(1.75rem, 3.3vw, 2.25rem);
      font-weight: 800;
      color: var(--navy-900);
      margin-bottom: 12px;
      letter-spacing: -0.02em;
      line-height: 1.25;
    }
    .section-desc {
      font-size: 16px;
      color: var(--slate-600);
      margin-top: 8px;
      line-height: 1.6;
    }

    #pipeline {
      padding-top: 40px;
      padding-bottom: 40px;
    }
    #equipment {
      padding-top: 40px;
      padding-bottom: 40px;
    }
    .quote-section {
      padding-top: 40px;
      padding-bottom: 40px;
    }
    #pipeline .section-header.text-center {
      max-width: none;
    }
    @media (min-width: 768px) {
      #pipeline .section-title {
        white-space: nowrap;
      }
    }

    /* 5-Stage Slideshow with Guaranteed Solid Readability on Left */
    .cap-slideshow-container {
      background: #ffffff;
      border: 1px solid var(--slate-200);
      border-radius: 16px;
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      position: relative;
    }
    .cap-tabs-nav {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      background: var(--slate-100);
      border-bottom: 1px solid var(--slate-200);
    }
    .cap-tab-btn {
      padding: 18px 16px;
      background: transparent;
      border: none;
      border-right: 1px solid var(--slate-200);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 6px;
      text-align: left;
      transition: all 0.2s ease;
      position: relative;
      outline: none;
    }
    .cap-tab-btn:last-child {
      border-right: none;
    }
    .cap-tab-btn:hover {
      background: #ffffff;
    }
    .cap-tab-btn.active {
      background: #ffffff;
      box-shadow: 0 -2px 0 var(--blue-700) inset;
    }
    .cap-tab-step {
      font-size: 12px;
      font-weight: 800;
      color: var(--slate-500);
      letter-spacing: 0.05em;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .cap-tab-btn.active .cap-tab-step {
      color: var(--blue-700);
    }
    .cap-tab-title {
      font-size: 16px;
      font-weight: 700;
      color: var(--navy-900);
      line-height: 1.3;
    }
    .cap-tab-progress-bg {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: transparent;
    }
    .cap-tab-btn.active .cap-tab-progress-bg {
      background: var(--blue-100);
    }
    .cap-tab-progress-fill {
      height: 100%;
      width: 0%;
      background: var(--blue-700);
      transition: width 0.1s linear;
    }

    /* 5-Stage Viewport */
    .cap-viewport {
      position: relative;
      width: 100%;
      background: #071529;
      overflow: hidden;
    }
    .cap-slide {
      position: absolute;
      inset: 0 0 auto;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s ease;
      transform: scale(0.99);
      pointer-events: none;
    }
    .cap-slide.active {
      position: relative;
      opacity: 1;
      visibility: visible;
      transform: scale(1);
      pointer-events: auto;
      z-index: 2;
    }
    .cap-slide-img {
      display: block;
      width: 100%;
      height: auto;
    }

    #slide-2 .cap-slide-img {
      aspect-ratio: 3 / 2;
      object-fit: cover;
      object-position: center 52%;
    }

    /* GUARANTEED HIGH-CONTRAST SCRIM: Solid dark navy behind all text, fading cleanly to transparent on right */
    .cap-slide-scrim {
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, rgba(7, 21, 41, 0.7) 0%, rgba(7, 21, 41, 0.4) 340px, rgba(7, 21, 41, 0.08) 520px, transparent 650px);
      pointer-events: none;
      z-index: 3;
    }

    /* Position each panel within the space left by its saved size. */
    .cap-slide-content,
    .cap-layout-frame {
      --panel-min-width: 8.5rem;
      --panel-min-height: 4.5rem;
      --panel-display-width: clamp(min(100%, var(--panel-min-width)), var(--panel-width, 40%), 100%);
      --panel-display-height: clamp(min(100%, var(--panel-min-height)), var(--panel-height, 60%), 100%);
      position: absolute;
      top: calc((100% - var(--panel-display-height)) * var(--panel-y-ratio, 0));
      left: calc((100% - var(--panel-display-width)) * var(--panel-x-ratio, 0));
      width: var(--panel-display-width);
      height: var(--panel-display-height);
    }
    .cap-slide-content {
      padding: clamp(0.5rem, 1.6vw, 1.25rem);
      display: flex;
      flex-direction: column;
      justify-content: safe center;
      background: rgba(8, 14, 24, 0.64);
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 12px;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.65);
      overflow-y: auto;
      z-index: 10;
    }
    .cap-viewport:not(.cap-layout-editing) .cap-slide-content {
      /* Keep the saved vertical alignment as the content makes the panel taller. */
      top: calc(100% * var(--panel-y-ratio, 0));
      transform: translateY(calc(-100% * var(--panel-y-ratio, 0)));
      height: auto;
      min-height: var(--panel-display-height);
      overflow: visible;
    }
    .cap-layout-editor {
      margin: 12px 0;
      padding: 12px;
      background: var(--slate-100);
      border: 1px solid var(--slate-200);
      border-radius: 8px;
    }
    .cap-layout-editor label {
      display: block;
      font-weight: 700;
      margin-top: 8px;
    }
    .cap-layout-editor textarea {
      display: block;
      width: 100%;
      padding: 6px;
      margin: 4px 0 8px;
    }
    .cap-layout-editor button,
    .cap-layout-handle {
      padding: 5px 8px;
      border: 1px solid white;
      border-radius: 4px;
      background: var(--navy-950);
      color: white;
      font: 700 0.75rem var(--font-body);
    }
    .cap-layout-frame {
      outline: 2px dashed white;
      outline-offset: -2px;
      pointer-events: none;
      z-index: 11;
    }
    .cap-layout-handle {
      position: absolute;
      pointer-events: auto;
      touch-action: none;
      user-select: none;
    }
    .cap-layout-move { top: 0; left: 0; cursor: move; }
    .cap-layout-resize { right: 0; bottom: 0; cursor: nwse-resize; }
    .cap-layout-handle:focus-visible { outline: 2px solid var(--cyan-400); }
    .cap-layout-editing .cap-slide { transition: none; }

    .cap-stage-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 800;
      color: #0077c8;
      background: rgba(0, 119, 200, 0.15);
      border: 1px solid rgba(0, 119, 200, 0.35);
      padding: 4px 10px;
      border-radius: 4px;
      width: fit-content;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      margin-bottom: 12px;
    }
    .cap-stage-heading {
      font-size: 20px;
      font-weight: 800;
      color: #ffffff;
      line-height: 1.28;
      margin-bottom: 12px;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
      letter-spacing: -0.015em;
    }
    .cap-stage-text {
      font-size: 16px;
      color: #ffffff;
      line-height: 1.65;
      margin-bottom: 0;
    }
    .cap-spec-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      background: rgba(15, 23, 42, 0.75);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 8px;
      padding: 12px 16px;
      margin-bottom: 16px;
    }
    .cap-spec-item {
      display: flex;
      flex-direction: column;
    }
    .cap-spec-name {
      font-size: 12px;
      font-weight: 600;
      color: var(--slate-300);
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .cap-spec-val {
      font-size: 14px;
      font-weight: 700;
      color: #38bdf8;
      margin-top: 2px;
    }
    .cap-highlights-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .cap-highlights-list li {
      font-size: 12px;
      color: var(--slate-300);
      display: flex;
      align-items: flex-start;
      gap: 8px;
      line-height: 1.4;
    }
    .cap-highlights-list li svg {
      width: 16px;
      height: 16px;
      color: #38bdf8;
      flex-shrink: 0;
      margin-top: 2px;
    }

    /* Factory Infrastructure in Proper Manufacturing Order */
    .equip-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 24px;
    }
    .equip-card {
      background: #ffffff;
      border: 1px solid var(--slate-200);
      border-radius: 12px;
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      transition: all 0.25s ease;
      display: flex;
      flex-direction: column;
    }
    .equip-card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-lg);
      border-color: var(--blue-500);
    }
    .equip-card-media {
      height: 180px;
      overflow: hidden;
      position: relative;
    }
    .equip-card-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
    }
    .equip-card:hover .equip-card-media img {
      transform: scale(1.04);
    }
    .equip-card-content {
      padding: 20px;
      display: flex;
      flex-direction: column;
      flex: 1;
    }
    .equip-step-badge {
      font-size: 12px;
      font-weight: 800;
      color: var(--blue-700);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 6px;
    }
    .equip-card-content h4 {
      font-size: 20px;
      font-weight: 800;
      color: var(--navy-900);
      margin-bottom: 8px;
      line-height: 1.3;
    }
    .equip-card-content p {
      font-size: 16px;
      color: var(--slate-600);
      line-height: 1.5;
      margin-bottom: 14px;
      flex: 1;
    }
    .equip-spec-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
      margin-top: auto;
    }
    .equip-spec-table tr {
      border-top: 1px solid var(--slate-100);
    }
    .equip-spec-table td {
      padding: 5px 0;
      color: var(--slate-500);
    }
    .equip-spec-table td:last-child {
      text-align: right;
      font-size: 14px;
      font-weight: 700;
      color: var(--navy-900);
    }

    /* Corporate CTA */
    .corporate-cta-banner {
      position: relative;
      overflow: hidden;
      background: var(--white);
      color: var(--navy-900);
      border-radius: 12px;
      padding: 32px;
      box-shadow: 0 8px 24px rgba(10, 37, 64, 0.05);
      border: 1px solid var(--slate-200);
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 36px;
    }
    .corporate-cta-banner::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--blue-700), var(--cyan-400), var(--emerald-600));
    }
    .cta-banner-text {
      min-width: 0;
    }
    .cta-banner-text h3 {
      font-size: 28px;
      font-weight: 800;
      color: var(--navy-900);
      margin-bottom: 8px;
    }
    .cta-banner-text p {
      font-size: 16px;
      color: var(--slate-600);
      max-width: 720px;
      line-height: 1.65;
    }
    .cta-banner-actions {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }
    .cta-banner-primary {
      background: linear-gradient(135deg, #1670f5 0%, #1e9bf0 35%, #22c3d6 70%, #4fd992 100%);
      padding: 14px 24px;
      justify-content: center;
    }
    .cta-banner-primary:hover {
      background: linear-gradient(135deg, #1670f5 0%, #1e9bf0 35%, #22c3d6 70%, #4fd992 100%);
      box-shadow: var(--shadow-sm);
      transform: none;
    }
    .cta-banner-secondary {
      display: inline-flex;
      padding: 4px 0;
      font-size: 14px;
      font-weight: 600;
      color: var(--slate-600);
    }
    .cta-banner-secondary:hover {
      color: var(--blue-700);
      text-decoration: underline;
      text-underline-offset: 4px;
    }
    .cta-banner-actions a:focus-visible {
      outline: 3px solid var(--blue-700);
      outline-offset: 4px;
    }

    @media (max-width: 1100px) {
      .nav-inner {
        height: auto;
        min-height: 76px;
        flex-wrap: wrap;
        gap: 16px;
        padding-top: 16px;
        padding-bottom: 16px;
      }
      .nav-links {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        gap: 8px 20px;
      }
    }
    @media (max-width: 1024px) {
      .equip-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 992px) {
      .cap-tabs-nav { grid-template-columns: 1fr; }
    }
    @media (max-width: 48em) {
      .corporate-cta-banner {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
      }
      .cta-banner-actions { align-items: flex-start; }
      .cap-viewport:not(.cap-layout-editing) .cap-slide-content {
        position: static;
        transform: none;
        width: 100%;
        min-height: 0;
        border-radius: 0;
      }
    }
    @media (max-width: 640px) {
      .deck-nav,
      .topbar-left,
      .topbar-right,
      .cta-banner-actions {
        flex-wrap: wrap;
      }
      .brand-logo { height: 36px; }
      .cta-banner-actions { flex-shrink: 1; }
      .hero-title {
        line-height: 1.2;
        margin-bottom: 14px;
      }
      .equip-grid { grid-template-columns: 1fr; }
      .corporate-cta-banner { padding: 24px; }
      .cta-banner-primary { width: 100%; }
      .cta-banner-secondary { align-self: center; }
    }
