/* custom.css — Custom styles for whitepaper web presentation */

/* ============================================================
   1. CSS Variables & Base
   ============================================================ */
:root {
  --ccb-dark: #0a5294;
  --ccb-mid: #1e88c7;
  --ccb-light: #e8f4fd;
  --ccb-deep: #0a3d6b;
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;
  --accent-green: #22c55e;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow-x: hidden;
}

.font-data {
  font-family: "Arial Black", "Helvetica Neue", system-ui;
}

/* ============================================================
   2. Background Patterns
   ============================================================ */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(10,82,148,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,82,148,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.bg-dots-pattern {
  background-image: radial-gradient(rgba(10,82,148,0.06) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ============================================================
   3. Component Classes
   ============================================================ */

/* Data card — lifts on hover */
.card-data {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  border: 1px solid #f1f5f9;
  padding: 24px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card-data:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* Pain-point card — red left border */
.card-pain {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  border-left: 4px solid var(--accent-red);
  padding: 24px;
}

/* Technology card — light-blue gradient */
.card-tech {
  background: linear-gradient(135deg, var(--ccb-light), #ffffff);
  border-radius: 12px;
  border: 1px solid #dbeafe;
  padding: 24px;
}

/* CCB-branded table */
.table-ccb {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-ccb thead {
  background-color: var(--ccb-dark);
  color: #ffffff;
}

.table-ccb th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.table-ccb td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.table-ccb tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.table-ccb tbody tr:hover {
  background-color: #eff6ff;
}

/* Section title with left accent bar */
.section-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--ccb-dark);
  position: relative;
  padding-left: 24px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background-color: var(--ccb-mid);
  border-radius: 3px;
}

/* Rounded icon container */
.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ccb-dark), var(--ccb-mid));
}

.icon-circle svg {
  width: 24px;
  height: 24px;
  color: #ffffff;
}

/* Pulsing highlight text */
.pulse-highlight {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ============================================================
   4. Animation Keyframes
   ============================================================ */
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 0px transparent; }
  50%       { text-shadow: 0 0 20px rgba(10,82,148,0.3); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes scrollArrow {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(8px); }
}

/* ============================================================
   5. 3D Illustration Base Styles
   ============================================================ */
.perspective-container {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.pyramid-layer {
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

/* ============================================================
   6. Responsive Basics
   ============================================================ */
@media (max-width: 768px) {
  .section-title { font-size: 1.875rem; }
}

/* ============================================================
   7. Keyboard navigation overlays
   ============================================================ */
#page-counter {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(10, 61, 107, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: "Arial Black", "Helvetica Neue", system-ui;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  pointer-events: none;
  user-select: none;
}

#kb-hint {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(10, 61, 107, 0.9);
  backdrop-filter: blur(8px);
  color: #e8f4fd;
  font-size: 13px;
  padding: 10px 24px;
  border-radius: 24px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
