/* ==========================================================================
   EXPERIMENTAL DATA-ART STYLESHEET
   Merges portfolio_experimental aesthetic with CWF brand identity
   ========================================================================== */

:root {
  --cursor-ring: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none"%3E%3Ccircle cx="14" cy="14" r="9.5" stroke="%23E6E6E9" stroke-width="1.5" opacity="0.92"/%3E%3Ccircle cx="14" cy="14" r="5.5" stroke="%23FFEF00" stroke-width="1.5"/%3E%3Ccircle cx="14" cy="14" r="1.75" fill="%23FFEF00"/%3E%3C/svg%3E') 14 14;
  --cursor-ring-active: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none"%3E%3Ccircle cx="14" cy="14" r="10.5" stroke="%23FFEF00" stroke-width="1.7"/%3E%3Ccircle cx="14" cy="14" r="6.25" stroke="%23E6E6E9" stroke-width="1.35"/%3E%3Ccircle cx="14" cy="14" r="2.4" fill="%23FFEF00"/%3E%3C/svg%3E') 14 14;
  /* CWF Brand Colors - Primary */
  --void: #000000;    /* Jet Black */
  --smoke: #050505;   /* Very Dark Gray */
  --ash: #1A1A1A;     /* Surface */
  --stone: #333333;   /* Texture */
  --mist: #8B93A1;    /* Muted Text */
  --cloud: #B3B7C2;   /* Secondary Text */
  --light: #F5F5F7;   /* Primary Text */
  --white: #FFFFFF;

  /* CWF Brand Accents */
  --electric: #FFEF00;      /* Canary Yellow (Primary Signal) */
  --electric-dim: #E6C200;  /* Darker Yellow */
  --plasma: #E6E6E9;        /* Mercury Silver (Structure) */
  --plasma-dim: #9CA3AF;    /* Dim Silver */
  --solar: #FFEF00;         /* Canary */
  --cosmic: #E6E6E9;        /* Silver */
  --void-silver: #E6E6E9;   /* Silver (Neutralized) */
  --success: #FFEF00;       /* Canary */

  /* Glow Effects */
  --glow-electric: 0 0 30px rgba(255, 239, 0, 0.35);
  --glow-plasma: 0 0 30px rgba(230, 230, 233, 0.15);
  --glow-purple: 0 0 30px rgba(230, 230, 233, 0.1);

  /* Typography - Experimental fonts mapped to Brand */
  --font-display: 'Helvetica', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Helvetica', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-editorial: 'Helvetica', 'Helvetica Neue', Arial, sans-serif;
}

body {
  cursor: var(--cursor-ring), auto;
}

body * {
  cursor: inherit;
}

a,
button,
[role="button"],
.matrix-cell,
.hero-video {
  cursor: var(--cursor-ring-active), pointer;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

html {
  background-color: var(--void) !important;
}

.experimental-page {
  font-family: var(--font-mono);
  background: var(--void);
  color: var(--light);
  overflow-x: hidden;
}

.experimental-page ::-webkit-scrollbar {
  width: 2px;
}

.experimental-page ::-webkit-scrollbar-track {
  background: var(--void);
}

.experimental-page ::-webkit-scrollbar-thumb {
  background: var(--electric);
}

/* Floating particles */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--electric);
  border-radius: 50%;
  opacity: 0.6;
  animation: drift 20s linear infinite;
}

@keyframes drift {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

@keyframes waveFlow {
  0% { clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%); }
  50% { clip-path: polygon(0 0%, 100% 0%, 100% 100%, 0 100%); }
  100% { clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%); }
}

/* ==========================================================================
   SECTION 2: DATA VIZ - Waveform + Clock Side by Side
   ========================================================================== */

.data-viz-section {
  padding: 100px 60px 60px;
  margin-top: 80px;
  background: linear-gradient(180deg, var(--void) 0%, var(--smoke) 100%);
}

.data-viz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.waveform-panel {
  padding-right: 20px;
}

.clock-panel {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Smaller clock for side-by-side layout */
.clock-container-small {
  position: relative;
  width: 500px;
  height: 500px;
}

.clock-container-small .clock-ring-1 { width: 140px; height: 140px; }
.clock-container-small .clock-ring-2 { width: 260px; height: 260px; }
.clock-container-small .clock-ring-3 { width: 380px; height: 380px; }
.clock-container-small .clock-ring-4 { width: 480px; height: 480px; }

.clock-container-small .clock-center-value {
  font-size: 56px;
}

.clock-container-small .clock-item {
  width: 150px;
}

.clock-container-small .clock-name {
  font-size: 10px;
}

.clock-container-small .clock-dot {
  width: 11px;
  height: 11px;
}

.section-marker {
  position: absolute;
  top: 140px;
  left: 60px;
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--stone);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  z-index: 1;
}

.waveform-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 40px;
  margin-left: 0;
}

.waveform-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-left: 0;
}

.wave-row {
  display: flex;
  align-items: center;
  gap: 32px;
}

.wave-label {
  width: 140px;
  font-size: 11px;
  text-align: right;
  color: var(--mist);
  font-family: var(--font-mono);
}

.wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
}

.wave-bar {
  width: 8px;
  background: currentColor;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

/* Service-specific colors using CWF palette */
.wave-row.ai .wave-bar { color: var(--electric); }
.wave-row.security .wave-bar { color: var(--plasma); }
.wave-row.forecast .wave-bar { color: var(--cosmic); }
.wave-row.apps .wave-bar { color: var(--void-silver); }
.wave-row.infra .wave-bar { color: var(--success); }

.wave-value {
  font-family: var(--font-editorial);
  font-size: 48px;
  font-weight: 300;
  min-width: 80px;
}

.wave-row.ai .wave-value { color: var(--electric); }
.wave-row.security .wave-value { color: var(--plasma); }
.wave-row.forecast .wave-value { color: var(--cosmic); }
.wave-row.apps .wave-value { color: var(--void-silver); }
.wave-row.infra .wave-value { color: var(--success); }

/* ==========================================================================
   RADIAL CLOCK (shared base styles used by .clock-container-small)
   ========================================================================== */

.clock-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--ash);
}

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.clock-center-value {
  font-family: var(--font-editorial);
  font-size: 72px;
  font-weight: 300;
  color: var(--white);
}

.clock-center-label {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--mist);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.clock-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  transform-origin: 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.clock-dot.primary { background: var(--electric); box-shadow: var(--glow-electric); }
.clock-dot.secondary { background: var(--plasma); box-shadow: var(--glow-plasma); }
.clock-dot.tertiary { background: var(--mist); box-shadow: none; }

.clock-name {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--cloud);
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ==========================================================================
   SECTION 5: MATRIX GRID
   ========================================================================== */

.matrix-section {
  min-height: auto;
  padding: 60px;
  background: var(--void);
  position: relative;
  overflow: hidden;
}

.matrix-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--electric);
  overflow: hidden;
  word-break: break-all;
}

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

.matrix-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 60px;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.matrix-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(230, 230, 233, 0.2); /* Use silver border */
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: rgba(18, 18, 22, 0.6);
  backdrop-filter: blur(8px);
}

.matrix-cell:hover {
  border-color: var(--electric);
  box-shadow: inset 0 0 40px rgba(255, 239, 0, 0.15), 0 10px 30px rgba(0,0,0,0.4);
  transform: translateY(-4px);
}

.matrix-cell.active { border-color: var(--electric); background: rgba(255, 239, 0, 0.08); }
.matrix-cell.highlight { border-color: var(--plasma); background: rgba(230, 230, 233, 0.08); }
.matrix-cell.subtle { border-color: var(--stone); }

.matrix-cell-index {
  font-size: 32px; /* Larger */
  font-family: var(--font-editorial);
  font-weight: 300;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.matrix-cell.active .matrix-cell-index { color: var(--electric); }
.matrix-cell.highlight .matrix-cell-index { color: var(--plasma); }
.matrix-cell.subtle .matrix-cell-index { color: var(--stone); }

.matrix-cell-name {
  font-size: 11px; /* Slightly larger */
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #D1D5DB; /* Lighter color */
  text-align: center;
  line-height: 1.4;
  font-family: var(--font-mono);
  font-weight: 500;
}

.matrix-cell-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.matrix-cell-indicator.ai { background: var(--electric); }
.matrix-cell-indicator.security { background: var(--plasma); }
.matrix-cell-indicator.forecast { background: var(--cosmic); }
.matrix-cell-indicator.apps { background: var(--void-silver); }

/* ==========================================================================
   SECTION 7: KINETIC TYPOGRAPHY
   ========================================================================== */

.typo-section {
  min-height: 100vh;
  padding: 8vh 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.typo-line {
  display: block; /* Stack vertically */
  width: max-content; /* Fit to text width */
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.2em 0;
}

.typo-line-0 {
  font-size: 4.2vw;
  background: repeating-linear-gradient(
    -45deg,
    var(--electric),
    var(--electric) 1.5vw,
    #000 1.5vw,
    #000 2vw
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideRight 40s linear infinite;
}

.typo-line-1 {
  font-size: 5vw;
  color: transparent;
  -webkit-text-stroke: 1px var(--plasma);
  animation: slideLeft 30s linear infinite; /* Alternating direction */
}

.typo-line-2 {
  font-size: 2.8vw;
  background: repeating-linear-gradient(
    -45deg,
    var(--electric),
    var(--electric) 1.1vw,
    #000 1.1vw,
    #000 1.5vw
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideRight 25s linear infinite; /* Alternating direction */
}

.typo-line-3 {
  font-size: 3.85vw;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.05;
  color: #ff2a36;
  -webkit-text-stroke: 0;
  -webkit-text-fill-color: currentColor;
  text-shadow:
    0 0 1px rgba(255, 54, 70, 0.95),
    0 0 8px rgba(255, 54, 70, 0.85),
    0 0 18px rgba(255, 54, 70, 0.62),
    0 0 34px rgba(255, 54, 70, 0.36);
  filter: saturate(1.25) brightness(1.32);
  animation: slideLeft 35s linear infinite;
}

.typo-line-4 {
  font-size: 2.1vw;
  background: repeating-linear-gradient(
    -45deg,
    var(--solar),
    var(--solar) 0.75vw,
    #000 0.75vw,
    #000 1vw
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideRight 20s linear infinite; /* Alternating direction */
}

.typo-line-5 {
  font-size: 7vw;
  color: transparent;
  -webkit-text-stroke: 1px var(--cosmic);
  animation: slideRight 28s linear infinite;
}

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

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .data-viz-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .clock-container-small {
    width: 350px;
    height: 350px;
  }

  .matrix-section {
    padding: 80px 40px;
  }

  .waveform-container {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .waveform-container {
    margin-left: 0;
  }

  .wave-row {
    flex-wrap: wrap;
    gap: 16px;
  }

  .wave-label {
    width: 100%;
    text-align: left;
  }

  .section-marker {
    display: none;
  }

  .typo-line {
    font-size: 20vw !important;
  }
}
