/* ==========================================================================
   CASTERLY CROWN — CREATIVE CORE STYLESHEET
   Accents & Animations using original brand colors: #ecd400 (primary)
   ========================================================================== */

:root {
  --cc-yellow: #ecd400;
  --cc-yellow-glow: rgba(236, 212, 0, 0.4);
  --cc-navy: #1b2d5a;
  --cc-dark: #080e1c;
  --cc-surface: #0f182c;
  --cc-border: rgba(236, 212, 0, 0.25);
  --cc-cyan: #00f0ff;
  --cc-green: #00e676;
  --cc-mono: 'Space Mono', 'SF Mono', 'Courier New', monospace;
  --cc-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   1. FAST SELF-WRITING SVG LOGO & PRELOADER (Original Clean White Canvas)
   -------------------------------------------------------------------------- */
#preloader_wrap {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  transition: opacity 0.35s ease, transform 0.35s ease;
  overflow: hidden;
}

#preloader_wrap.preloader--hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
}

.preloader-content-box {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(220px, 70vw, 380px);
}

.preloader-logo-svg {
  width: 100%;
  height: auto;
  max-height: 220px;
}

/* Drawing strokes - Polished Platinum / Silver */
.cc-draw-path {
  fill: transparent;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.35s ease-in-out, stroke 0.35s ease-in-out;
}

.cc-draw-crown {
  stroke: #5a6068;
  stroke: url(#cc-silver-stroke);
  stroke-width: 3.5;
}

.cc-draw-text {
  stroke: #363a40;
  stroke: url(#cc-silver-text);
  stroke-width: 2.8;
}

/* Active drawn state - Luxurious Liquid Silver / Platinum Fill */
.cc-drawn .cc-draw-path {
  fill: #363a40;
}

.cc-drawn .cc-draw-crown {
  fill: #78808a;
  fill: url(#cc-silver-crown);
  stroke: #5a6068;
  stroke: url(#cc-silver-stroke);
}

.cc-drawn .cc-draw-text {
  fill: #2a2d32;
  fill: url(#cc-silver-text);
  stroke: #2a2d32;
  stroke: url(#cc-silver-text);
}

/* Preloader status bar - Metallic Chrome / Silver Progress */
.preloader-status-container {
  width: 100%;
  max-width: 260px;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.preloader-status-bar {
  width: 100%;
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-status-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #363a40 0%, #9aa2ab 50%, #363a40 100%);
  box-shadow: 0 0 10px rgba(154, 162, 171, 0.45);
  transition: width 0.08s linear;
}

.preloader-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--cc-mono);
  font-size: 0.65rem;
  color: #727982;
  letter-spacing: 0.08em;
}

.preloader-meta-title {
  color: #363a40;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Optional Pure Monochrome Black Mode */
#preloader_wrap.preloader--black .cc-draw-crown,
#preloader_wrap.preloader--black .cc-draw-text {
  stroke: #231F20 !important;
}
#preloader_wrap.preloader--black .cc-drawn .cc-draw-crown,
#preloader_wrap.preloader--black .cc-drawn .cc-draw-text,
#preloader_wrap.preloader--black.cc-drawn .cc-draw-crown,
#preloader_wrap.preloader--black.cc-drawn .cc-draw-text {
  fill: #231F20 !important;
  stroke: #231F20 !important;
}
#preloader_wrap.preloader--black .preloader-status-fill {
  background: #231F20 !important;
  box-shadow: none !important;
}
#preloader_wrap.preloader--black .preloader-meta-title {
  color: #231F20 !important;
}

/* Header logo interactive hover */
.header__logo svg .cc-header-path {
  transition: fill 0.3s ease, filter 0.3s ease;
}

.header__logo:hover svg .cc-header-path {
  fill: #ecd400 !important;
}

/* --------------------------------------------------------------------------
   2. VERIFIED ACCREDITATION BADGES (Replacing fake AWS)
   -------------------------------------------------------------------------- */
.cc-verified-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.cc-badge-link {
  display: inline-block;
  transition: transform 0.25s ease;
  text-decoration: none;
}

.cc-badge-link:hover {
  transform: translateY(-2px);
}

.cc-badge-img {
  height: 38px;
  width: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   3. ROBOTIC AUTOMATION BOT DRIVING CONSOLE (Active on Automation.html)
   -------------------------------------------------------------------------- */
.cc-bot-console-section {
  position: relative;
  background: #060913;
  padding: 5rem 0;
  overflow: hidden;
  border-top: 1px solid var(--cc-border);
  border-bottom: 1px solid var(--cc-border);
}

.cc-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--cc-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cc-yellow);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding: 4px 10px;
  background: rgba(236, 212, 0, 0.08);
  border-left: 3px solid var(--cc-yellow);
}

.cc-bot-console-wrapper {
  background: #090f1d;
  border: 1px solid rgba(236, 212, 0, 0.25);
  border-radius: 8px;
  padding: clamp(1.5rem, 3.5vw, 3rem);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  position: relative;
}

.cc-console-hud-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cc-console-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cc-pulse-radar {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 10px #00e676;
  animation: radarPulse 1.5s infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.8); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.7; }
}

.cc-console-sys-title {
  font-family: var(--cc-mono);
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
}

.cc-console-sys-title span {
  color: var(--cc-yellow);
}

.cc-console-gears {
  display: flex;
  gap: 0.5rem;
}

.cc-gear-btn {
  font-family: var(--cc-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 3px;
  background: #0f182c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8892b0;
  cursor: pointer;
  transition: all 0.2s;
}

.cc-gear-btn.active,
.cc-gear-btn:hover {
  background: var(--cc-yellow);
  border-color: var(--cc-yellow);
  color: #060913;
  box-shadow: 0 0 12px var(--cc-yellow-glow);
}

.cc-console-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 2.5rem;
}

@media (max-width: 991px) {
  .cc-console-grid { grid-template-columns: 1fr; }
}

.cc-telemetry-cluster {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cc-tachometer-box {
  background: #0d1526;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.cc-tacho-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-family: var(--cc-mono);
  font-size: 0.72rem;
  color: #8892b0;
}

.cc-tacho-dial-wrap {
  position: relative;
  width: 200px;
  height: 120px;
  margin: 0 auto;
  overflow: hidden;
}

.cc-tacho-arc {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 14px solid #141f38;
  border-top-color: var(--cc-yellow);
  border-right-color: var(--cc-yellow);
  transform: rotate(-45deg);
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.cc-tacho-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 95px;
  background: #ff3366;
  transform-origin: bottom center;
  transform: rotate(-60deg);
  transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
  border-radius: 2px;
  box-shadow: 0 0 10px #ff3366;
}

.cc-tacho-needle-pivot {
  position: absolute;
  bottom: -6px;
  left: calc(50% - 8px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #ff3366;
}

.cc-tacho-readout {
  text-align: center;
  margin-top: 1rem;
}

.cc-tacho-num {
  font-family: var(--cc-mono);
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.cc-tacho-unit {
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--cc-yellow);
  margin-top: 0.25rem;
}

.cc-metric-pills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cc-metric-tile {
  background: #0d1526;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1.25rem;
}

.cc-metric-tile-label {
  font-family: var(--cc-mono);
  font-size: 0.68rem;
  color: #8892b0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.cc-metric-tile-val {
  font-family: var(--cc-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
}

.cc-metric-tile-val.highlight {
  color: var(--cc-yellow);
}

.cc-bot-terminal-box {
  background: #050811;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  min-height: 360px;
}

.cc-terminal-header {
  background: #0a1122;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cc-terminal-dots {
  display: flex;
  gap: 6px;
}

.cc-terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.cc-terminal-dot.red { background: #ff5f56; }
.cc-terminal-dot.yellow { background: #ffbd2e; }
.cc-terminal-dot.green { background: #27c93f; }

.cc-terminal-title {
  font-family: var(--cc-mono);
  font-size: 0.7rem;
  color: var(--cc-cyan);
  letter-spacing: 0.12em;
}

.cc-terminal-body {
  padding: 1.25rem;
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  line-height: 1.8;
  color: #94a3b8;
  flex-grow: 1;
  overflow-y: auto;
  max-height: 300px;
}

.cc-terminal-line {
  margin-bottom: 0.35rem;
  display: flex;
  gap: 0.5rem;
}

.cc-term-time { color: #475569; }
.cc-term-bot { color: var(--cc-yellow); font-weight: 600; }
.cc-term-success { color: var(--cc-green); }
.cc-term-cyan { color: var(--cc-cyan); }

.cc-terminal-footer {
  padding: 1rem 1.25rem;
  background: #0a1122;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.cc-terminal-cta-btn {
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 8px 16px;
  background: var(--cc-cyan);
  color: #060913;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.cc-terminal-cta-btn:hover {
  background: #ffffff;
}

.cc-terminal-inject-btn {
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  background: transparent;
  color: var(--cc-yellow);
  border: 1px solid var(--cc-yellow);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.cc-terminal-inject-btn:hover {
  background: rgba(236, 212, 0, 0.15);
}

.cc-data-highway-wrap {
  margin-top: 2rem;
  background: #070c17;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 1.5rem;
}

.cc-highway-nodes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .cc-highway-nodes { grid-template-columns: 1fr; }
}

.cc-highway-node {
  background: #0c1424;
  border: 1px solid rgba(236, 212, 0, 0.2);
  border-radius: 4px;
  padding: 1rem 0.8rem;
  text-align: center;
  transition: border-color 0.3s;
}

.cc-highway-node.active {
  border-color: var(--cc-yellow);
  background: #111c34;
}

.cc-node-num {
  font-family: var(--cc-mono);
  font-size: 0.65rem;
  color: var(--cc-yellow);
  letter-spacing: 0.15em;
  margin-bottom: 0.2rem;
}

.cc-node-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. CROWNAI FREE INTERACTIVE SUPPORT CHAT WIDGET
   -------------------------------------------------------------------------- */
.cc-ai-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #090e1a;
  border: 1px solid #ecd400;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(236, 212, 0, 0.25);
  cursor: pointer;
  font-family: var(--cc-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
}

.cc-ai-chat-launcher:hover {
  background: #ecd400;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(236, 212, 0, 0.4);
}

.cc-ai-chat-launcher .cc-launcher-pulse {
  width: 9px;
  height: 9px;
  background: #00e676;
  border-radius: 50%;
  box-shadow: 0 0 8px #00e676;
  animation: ccPulse 1.8s infinite;
}

@keyframes ccPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.cc-ai-chat-window {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 110px);
  z-index: 9995;
  background: #070c18;
  border: 1px solid rgba(236, 212, 0, 0.35);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(236, 212, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-ai-chat-window.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.cc-chat-header {
  padding: 14px 18px;
  background: #0c1426;
  border-bottom: 1px solid rgba(236, 212, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cc-chat-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ecd400;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #000;
  font-size: 1rem;
}

.cc-chat-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.cc-chat-subtitle {
  font-family: var(--cc-mono);
  font-size: 0.68rem;
  color: #00e676;
  letter-spacing: 0.05em;
}

.cc-chat-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}

.cc-chat-close-btn:hover {
  color: #ffffff;
}

.cc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: radial-gradient(circle at top right, rgba(236, 212, 0, 0.04), transparent 70%), #070c18;
}

.cc-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

.cc-chat-msg.bot {
  align-self: flex-start;
}

.cc-chat-msg.user {
  align-self: flex-end;
}

.cc-chat-bubble {
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.55;
}

.cc-chat-msg.bot .cc-chat-bubble {
  background: #111a30;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-top-left-radius: 2px;
}

.cc-chat-msg.user .cc-chat-bubble {
  background: #ecd400;
  color: #000000;
  font-weight: 500;
  border-top-right-radius: 2px;
}

.cc-chat-meta {
  font-size: 0.65rem;
  font-family: var(--cc-mono);
  color: #64748b;
  margin-top: 4px;
}

.cc-chat-msg.user .cc-chat-meta {
  text-align: right;
  color: #94a3b8;
}

.cc-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  background: #090e1a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cc-chip-btn {
  background: #131e36;
  border: 1px solid rgba(236, 212, 0, 0.25);
  color: #e2e8f0;
  font-size: 0.72rem;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cc-chip-btn:hover {
  border-color: #ecd400;
  color: #ecd400;
  background: #1a2744;
}

.cc-chat-input-row {
  padding: 12px 16px;
  background: #0a1020;
  border-top: 1px solid rgba(236, 212, 0, 0.2);
  display: flex;
  gap: 8px;
  align-items: center;
}

.cc-chat-input {
  flex: 1;
  background: #131c33;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--cc-sans);
}

.cc-chat-input:focus {
  border-color: #ecd400;
}

.cc-chat-send-btn {
  background: #ecd400;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #000;
  cursor: pointer;
  transition: background 0.2s;
}

.cc-chat-send-btn:hover {
  background: #ffe31a;
}

.cc-chat-disclaimer {
  font-size: 0.62rem;
  color: #64748b;
  text-align: center;
  padding: 6px 12px 10px;
  background: #0a1020;
  font-family: var(--cc-mono);
}

