/* ─── CC Fest · Animations ────────────────────────────────────────────
 * Owner: Shristi
 *
 * This file is loaded after styles.css and owns all motion on the site.
 * Target elements via the .anim-* hook classes already on the HTML —
 * never change layout, color, or typography here.
 *
 * Scroll-triggered reveals: animations.js adds .is-visible to
 * .anim-scroll elements when they enter the viewport. Everything
 * else triggers on page load.
 *
 * Always add a counterpart rule inside the prefers-reduced-motion
 * block at the bottom whenever you add a new animation.
 * ─────────────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'caslon';
    src: url('assets/caslon/LibreCaslonCondensed-Medium.woff2') format('woff2');
    font-style: normal;
    font-display: swap;
}

:root{
  font-size: 16px;
   --cc-orange: #f44c2d;
   --cc-power-green: #84D136;
   --cc-neutral: #b7b7b7;
   --pill-bg: #1e1f22;
   --pill-fg: #f5f5f5;
}

/* ── Keyframes ─────────────────────────────────────────────────────── */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ruleExpand {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

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


/* ── Page-load: nav ────────────────────────────────────────────────── */

.anim-nav {
  animation: slideDown 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}


/* ── Page-load: hero ───────────────────────────────────────────────── */

.anim-hero-title {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.anim-hero-rule {
  animation: ruleExpand 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.anim-hero-sub {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}


/* ── Scroll-triggered: default hidden state ────────────────────────── */
/* Hidden states are gated behind .js (added by an inline <script> in  */
/* <head> before this file loads). Without JS the class is never set,  */
/* so content is always visible — no JS, no invisible sections.        */
/* animations.js adds .is-visible when the element enters the viewport. */

.js .anim-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.anim-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── Scroll-triggered: staggered chips ────────────────────────────── */
/* Each .anim-chip gets its delay set by animations.js via              */
/* --stagger-delay so chips cascade in left-to-right.                  */

.js .anim-chip {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--stagger-delay, 0ms),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--stagger-delay, 0ms);
}

.anim-chip.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── Upcoming band ─────────────────────────────────────────────────── */

.js .anim-upcoming-copy {
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.anim-upcoming-copy.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.js .anim-upcoming-meta {
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.25s,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}

.anim-upcoming-meta.is-visible {
  opacity: 1;
  transform: translateX(0);
}


/* ── Reduced motion: disable everything ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .anim-nav,
  .anim-hero-title,
  .anim-hero-rule,
  .anim-hero-sub {
    animation: none;
  }

  /* Cover both the .js-gated and un-gated forms so reduced-motion users
     always see content immediately regardless of JS state. */
  .js .anim-scroll,
  .js .anim-chip,
  .js .anim-upcoming-copy,
  .js .anim-upcoming-meta {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .anim-stage-main[data-mode="creative-commons"] {
    animation: none;
    clip-path: none;
  }
}

/* ---------- base canvas ---------- */

.anim-stage {
  /* Single source of truth for the monogram's width, shared with
     .cc-text below via calc() so the labels track its actual size/
     position from up here — even though they're no longer nested
     inside .monogram-wrap. */
  --mono-w: min(1200px, 80vmin, 90vw);
  position: relative;
  height: 95dvh;
  width: 100vw;
  min-height: 480px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  overflow: hidden;

}

/* ---------- mode buttons ---------- */


.modes-list {
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  top: clamp(16px, 3vh, 36px);
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  align-items: flex-end;
  gap: 8px;
  z-index: 2;
}

.modes-list > .mode-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: caslon, 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(0.8rem, 1.1vw, 0.9rem);
  font-weight: normal;
  background: var(--paper);
  color: var(--accent);
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.modes-list > .mode-btn:hover {
  transform: translateY(-4px);
}

.modes-list > .mode-btn:active {
  transform: translateY(0);
}

.modes-list > .mode-btn.is-active {
  background: var(--cc-neutral);
  color: var(--accent-ink);
}

.modes-list > .mode-btn:focus-visible {
  outline: 2px solid var(--cc-neutral);
  outline-offset: 2px;
}

/* ---------- monogram stage ---------- */

.anim-stage-main {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: 1px solid green;
}

.monogram-wrap {
    position: relative;
    width: min(1200px, 80vmin, 90vw);
    aspect-ratio: 1072.4 / 618.16;
}

.cc-mono {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.cc-path {
    fill: var(--cc-orange);
    transition: fill 0.3s ease, stroke 0.3s ease, opacity 0.3s ease;
}

.cc-text {
    position: absolute;
    top: 50%;
    font-weight: 500;
    font-size: clamp(1rem, 3.1vmin, 2rem);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    font-family: caslon;
    text-align: left;
    -webkit-user-select: none;
    user-select: none;
}

.cc-text-left {
    left: calc(50% - 0.14 * var(--mono-w));
    transform: translate(-50%, -50%);
    color: var(--ink);
    
}

.cc-text-right {
    left: calc(50% + 0.35 * var(--mono-w));
    transform: translate(-50%, -50%);
    color: var(--cc-neutral);
}

/* fx-layer hooks: one full-bleed overlay per mode-specific effect
   Hidden until a mode's own rule turns it on, e.g.
   [data-mode="coding"] .fx-scanlines { display: block; } */
.fx-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: none;
}

/* =====================================================================
   MODE 1 — Creativity: animated rainbow gradient fill
   ===================================================================== */

[data-mode="creativity"] .cc-path {
    fill: none;
    stroke: var(--cc-orange);
    stroke-width: 0.6rem;
}

/* Hand-drawn scribble doodles (creativity-scribble.js computes each
   path's real length and drives the stroke-dashoffset reveal through
   the mask below, so the fill "draws in" instead of popping in). */
.cc-scribble-group {
    opacity: 0;
    display: none;
    pointer-events: none;
}

[data-mode="creativity"] .cc-scribble-group {
    opacity: 1;
    display: block;
}

.cc-scribble {
    fill: var(--cc-orange);
}

/* Once a side has finished drawing in, creativity-scribble.js adds this
   class so the ink keeps subtly trembling in place — an SVG turbulence
   filter continuously displaces the rendered shape by a few units,
   giving it a hand-held, "alive" wobble instead of going static. */
.cc-scribble-alive {
    filter: url(#scribbleWiggle);
}

/* =====================================================================
   MODE 2 — Change: p5.js polygon morph, driven by change-sketch.js.
   The static Cs hide; #changeCanvas (an .fx-layer, like the others)
   shows and takes over, drawing two vertex-built circles/polygons in
   the exact same spots at the exact same radius.
   ===================================================================== */

[data-mode="change"] .cc-path {
    opacity: 0;
}

[data-mode="change"] .fx-change {
    display: block;
}

/* p5's <canvas> defaults to inline-level, which leaves a few stray
   pixels of baseline gap inside its host — pin it to block-level. */
.fx-change canvas {
    display: block;
    overflow: visible;
}

/* =====================================================================
   MODE 3 — Connection
   ===================================================================== */

[data-mode="connection"] .cc-path {
    opacity: 0;
}

[data-mode="connection"] .fx-connection-canvas {
    display: block;
    /* .fx-layer sets pointer-events: none (it's usually a decorative,
       non-interactive overlay) — this one needs hover, so opt back in,
       only while it's actually the visible layer. */
    pointer-events: auto;
    /* margin-top: clamp(2rem, 2vmin, 2vh); */
}

.cc-connection-piece {
    fill: var(--cc-orange);
    /* pointer-events: auto (the default SVG behavior, "visiblePainted")
       restricts hit-testing to each piece's own filled area — hovering
       empty space inside the canvas's (much larger) viewBox shouldn't
       count, only actually touching a piece should. */
    pointer-events: auto;
    transition: d 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Small per-piece delay so the scatter/reassembly reads as a cascade
   rather than all 7 pieces snapping in lockstep. */
.cc-connection-piece-2 { transition-delay: 0.02s; }
.cc-connection-piece-3 { transition-delay: 0.04s; }
.cc-connection-piece-4 { transition-delay: 0.06s; }
.cc-connection-piece-5 { transition-delay: 0.08s; }
.cc-connection-piece-6 { transition-delay: 0.1s; }
.cc-connection-piece-7 { transition-delay: 0.12s; }

/* Hovering any one piece bubbles up to :hover on the whole canvas, so
   all 7 scatter together rather than only the one under the pointer. */
.fx-connection-canvas:hover .cc-connection-piece-1 {
    d: path("M1415.968 163.7912C1428.432 153.2903 1441.832 138.6913 1426.888 123.6238C1415.256 111.894 1395 128.6945 1386.384 136.1186C1342.744 173.721 1294.592 195.8304 1236.416 199.4576C1177.016 203.7552 1117.944 187.4296 1069.168 153.2352C1054.8 143.2123 1042.856 132.5351 1029.72 120.9337C1027.072 120.3806 1023.328 120.1937 1020.536 119.9694C1001.888 125.0362 995.584 141.0958 1009.84 155.4657C1102.664 249.0184 1250.896 267.0248 1364.8 202.22C1382.328 192.2488 1400.52 176.9224 1415.968 163.7912Z");
}

.fx-connection-canvas:hover .cc-connection-piece-2 {
    d: path("M1284.84 833.9296C1268.616 835.5208 1248.816 834.916 1248.464 813.6976C1248.192 797.18 1274.36 794.4112 1285.688 793.4296C1343.08 788.4496 1392.536 769.4184 1435.752 730.308C1480.304 690.7912 1509.872 637.1072 1519.456 578.316C1522.312 561.032 1523.008 545.028 1523.88 527.5224C1525.336 525.24 1527.808 522.4336 1529.6 520.2784C1546.248 510.4664 1562.144 517.1688 1562.472 537.4088C1564.624 669.1776 1474.008 787.856 1348.08 824.1384C1328.704 829.7216 1305.032 832.0392 1284.84 833.9296Z");
}

.fx-connection-canvas:hover .cc-connection-piece-3 {
    d: path("M512.3072 424.192C528.7432 421.532 545.3312 427.9608 555.688 441.0016C566.0448 454.0416 568.56 471.6616 562.2528 487.0776C555.9544 502.4944 541.8248 513.3048 525.2936 515.348C500.4016 518.4248 477.6272 500.9912 474.0864 476.1472C470.5464 451.3024 487.544 428.1968 512.3072 424.192Z");
}

.fx-connection-canvas:hover .cc-connection-piece-4 {
    d: path("M819.5072 752.992C835.9432 750.332 852.5312 756.7608 862.888 769.8016C873.2448 782.8416 875.76 800.4616 869.4528 815.8776C863.1544 831.2944 849.0248 842.1048 832.4936 844.148C807.6016 847.2248 784.8272 829.7912 781.2864 804.9472C777.7464 780.1024 794.744 756.9968 819.5072 752.992Z");
}

.fx-connection-canvas:hover .cc-connection-piece-5 {
    d: path("M409.9072 94.5917C426.3432 91.9323 442.9312 98.3606 453.288 111.4013C463.6448 124.4419 466.16 142.0618 459.8528 157.4778C453.5544 172.8947 439.4248 183.7048 422.8936 185.748C398.0016 188.8248 375.2272 171.3915 371.6864 146.5474C368.1464 121.7025 385.144 98.597 409.9072 94.5917Z");
}

.fx-connection-canvas:hover .cc-connection-piece-6 {
    d: path("M562.2152 679.6768C555.7856 709.772 535.1712 696.7936 512.0304 695.1448C435.4912 689.692 362.3544 745.4288 344.3584 819.588C341.9168 829.6504 335.22 838.4072 324.1656 839.02C319.0936 839.3208 314.1256 837.4976 310.4512 833.988C305.5872 829.348 304.148 824.0984 303.9032 817.66C305.5728 807.4728 308.2944 798.8016 311.7376 789.1296C344.5152 697.0736 440.172 642.1736 536.4352 656.5024C550.5936 658.6096 562.608 662.8368 562.2152 679.6768Z");
}

.fx-connection-canvas:hover .cc-connection-piece-7 {
    d: path("M263.5424 452.6248C284.4136 430.0088 261.9184 420.66 247.2202 402.7104C198.6042 343.3432 201.929 251.4488 252.116 193.9624C258.9256 186.1616 262.2136 175.64 256.336 166.2578C253.656 161.9417 249.2995 158.936 244.3135 157.9599C237.717 156.6642 232.5989 158.5174 227.1992 162.0331C219.8421 169.274 214.33 176.5008 208.4174 184.8928C152.1425 264.7792 162.4949 374.584 229.7396 444.94C239.6298 455.288 250.0151 462.6616 263.5424 452.6248Z");
}

/* =====================================================================
   MODE 4 — Celebration 
   ===================================================================== */

[data-mode="celebration"] .fx-confetti {
    display: block;
}

.fx-confetti canvas {
    display: block;
    width: 100%;
    height: 100%;
}


/* The Cs are the confetti cannons in this mode: celebration-confetti.js
   rotates them (around their own center) to track the mouse, and fires
   confetti from the open counter-space while mousedown is held. */
[data-mode="celebration"] .cc-path {
    cursor: pointer;
    transform-box: fill-box;
    transform-origin: center;
}

/* =================================
   MODE 5 — Collaboration: the two Cs drift apart and re-merge 
========*/

.cc-string {
    stroke: var(--ink);
    stroke-width: 12px;
    opacity: 0;
}

[data-mode="collaboration"] .cc-string {
    opacity: 1;
}

[data-mode="collaboration"] .cc-path-left {
    transform-box: fill-box;
    transform-origin: center;
    transform: scaleX(-1);
}

[data-mode="collaboration"] .cc-unit-left {
    transform-box: fill-box;
    transform-origin: 50% 0%;
    translate: 12.006% 0;
    animation: firstball 0.9s alternate ease-in infinite;
}

[data-mode="collaboration"] .cc-unit-right {
    transform-box: fill-box;
    transform-origin: 50% 0%;
    translate: -12.006% 0;
    animation: lastball 0.9s alternate ease-out infinite;
}

@keyframes firstball {
  0% {
    transform: rotate(30deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

@keyframes lastball {
  50% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-30deg);
  }
}

/* =====================================================================
   MODE 6 — Creative Commons: © flashes over the labels, then the C
   multiplies into a tiled grid across the canvas
   ===================================================================== */

[data-mode="creative-commons"] .cc-path {
    opacity: 0;
}

/* Tiled wallpaper: */
.anim-stage-main {
    background-image: none;
    background-repeat: repeat;
    background-size: 40vmin 40vmin;
    background-position: 35% 50%;
}

.anim-stage-main[data-mode="creative-commons"] {
    background-image: url('assets/animation/creative-commons.png');
    /* steps() turns the left-to-right clip-path sweep into discrete jumps,
       so columns of the tiled copyright mark snap into view one at a time
       instead of a smooth continuous wipe. */
    animation: ccColumnReveal 1.4s steps(20, end) forwards;
}

@keyframes ccColumnReveal {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

.cc-copyright {
    position: absolute;
    top: 50%;
    width: 55.78%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    opacity: 0;
    display: none;
    pointer-events: none;
}

.cc-copyright-left { left: 28.82%; }
.cc-copyright-right { left: 79.74%; }

[data-mode="creative-commons"] .cc-copyright {
    display: block;
    opacity: 0;
    /* animation: ccRevealLabel 0.4s steps(1) forwards; */
}

@keyframes ccRevealLabel {
    to { opacity: 0; visibility: hidden; }
}

/* =====================================================================
   MODE 7 — Conversations: the Cs morph into chomping Pac-Man circles
   ===================================================================== */

.cc-pacman {
    fill: var(--cc-orange);
    opacity: 0;
    display: none;
    transform-box: view-box;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    pointer-events: none;
}

.cc-pacman-left {
    transform-origin: 204.892px 260.069px;
}

.cc-pacman-right {
    transform-origin: 750.933px 260.069px;
}

[data-mode="conversations"] .cc-pacman {
    display: block;
}

/* both sides: form change (C -> Pac-Man) happens on mode select, not hover */
[data-mode="conversations"] .cc-path-left,
[data-mode="conversations"] .cc-path-right {
    opacity: 0;
}

[data-mode="conversations"] .cc-pacman-left,
[data-mode="conversations"] .cc-pacman-right {
    opacity: 1;
}

/* hover only adds: the right pacman flips to face left, then chomps */
#monogramWrap[data-mode="conversations"]:hover .cc-pacman-right {
    transform: rotate(180deg);
    animation: pacmanChompRight 0.36s steps(1, jump-end) 0.3s infinite;
}

[data-mode="conversations"] .cc-text-right {color: var(--cc-neutral); mix-blend-mode: difference;}

@keyframes pacmanChompRight {
    0%, 100% { d: path("M 934.830 76.173 A 260.069 260.069 0 1 0 934.830 443.966 L 750.933 260.069 Z"); }
    50%      { d: path("M 1011.002 260.069 A 260.069 260.069 0 1 0 490.864 260.069 A 260.069 260.069 0 1 0 1011.002 260.069 L 750.933 260.069 Z"); }
}

/* =====================================================================
   MODE 8 — Community: the Cs become horseshoe magnets
   ===================================================================== */

[data-mode="community"] .cc-path {
    opacity: 0;
}

.cc-magnet {
    opacity: 0;
    display: none;
}

[data-mode="community"] .cc-magnet {
    opacity: 1;
    display: block;
    z-index: 1;
}

.cc-magnet-prong {
    fill: #f8f8f8;
    stroke: #000;
    stroke-width: 3px;

    vector-effect: non-scaling-stroke;
}

.cc-magnet-red {
    fill: #f44c2d;
    stroke: #000;
    stroke-width: 3px;
    vector-effect: non-scaling-stroke;
   
}

.cc-magnet-blue {
    fill: #2f35e2;
    stroke: #000;
    stroke-width: 3px;
    vector-effect: non-scaling-stroke;
}

.cc-magnet-move {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hovering anywhere on the monogram sends both magnets flying apart
   toward the edges of the stage, then snaps them back together. The
   right one comes back rotated 180° so its poles land inverted against
   the left one — red meets blue instead of red meeting red. */
#monogramWrap[data-mode="community"]:hover .cc-magnet-move-left {
    animation: magnetRepel 1.4s forwards;
}

#monogramWrap[data-mode="community"]:hover .cc-magnet-move-right {
    animation: magnetRepelFlip 1.4s forwards;
}

@keyframes magnetRepel {
    0%   { transform: translateX(0); animation-timing-function: ease-in-out; }
    65%  { transform: translateX(calc(-42vw / min(1200px, 80vmin, 90vw) * 1072.4px)); animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
    100% { transform: translateX(0); }
}

@keyframes magnetRepelFlip {
    0%   { transform: translateX(0) rotate(0deg); animation-timing-function: ease-in-out; }
    65%  { transform: translateX(calc(42vw / min(1200px, 80vmin, 90vw) * 1072.4px)) rotate(0deg); animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
    100% { transform: translateX(0) rotate(180deg); }
}

/* Sparks flash in right as the magnets land back on each other (the
   1.4s repel/snap above completes at the same moment), then hold
   steady while still hovering and fade if you leave early. Each spark
   is a clipped window over two stacked copies of the bolt art (see
   .cc-magnet-spark-flow) so the chevrons can scroll infinitely without
   ever showing a seam. */
.cc-magnet-spark {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#monogramWrap[data-mode="community"]:hover .cc-magnet-spark {
    animation: magnetSparkIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s forwards;
}

@keyframes magnetSparkIn {
    0%   { opacity: 0; transform: scale(0.4); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: scale(1); }
}

/* The top spark flows down toward the seam, the bottom one flows up
   toward it — opposite directions, so the field appears to circulate
   in one continuous loop through both poles rather than two mirrored
   copies of the same motion. */
.cc-magnet-spark-flow-top {
    animation: magnetSparkFlowDown 1.1s linear infinite;
}

.cc-magnet-spark-flow-bottom {
    animation: magnetSparkFlowUp 1.1s linear infinite;
}

@keyframes magnetSparkFlowDown {
    from { transform: translateY(0); }
    to   { transform: translateY(163.782px); }
}

@keyframes magnetSparkFlowUp {
    from { transform: translateY(0); }
    to   { transform: translateY(-163.782px); }
}


/* =====================================================================
   MODE 9 — Curiosity: hover to curl the Cs into a question mark (default)
   ===================================================================== */

[data-mode="curiosity"] .cc-path {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(0.32, 1, 0.4, 1);
}

#monogramWrap[data-mode="curiosity"]:hover .cc-path-left {
    transform: translateX(-16%) translateY(-16%) rotate(135deg);
}

#monogramWrap[data-mode="curiosity"]:hover .cc-path-right {
    transform: translateX(16%) translateY(-16%) rotate(135deg);
}

.curiosity-dot {
    position: absolute;
    top: 100%;
    /* 20.12% = the cc-path's inner (hole) circle diameter as a % of the
       monogram's width — matches the C's own inner radius exactly, so
       the dot scales with the glyph instead of the viewport. */
    width: 17.4957%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--ink);
    transform: translate(-50%, -15%) scale(0.3);
    opacity: 0;
    display: none;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s, opacity 0.3s ease 0.15s;
    pointer-events: none;
}

#monogramWrap[data-mode="curiosity"] .curiosity-dot {
    display: block;
}

.curiosity-dot-left { left: 14.48%; }
.curiosity-dot-right { left: 80.51%; }

#monogramWrap[data-mode="curiosity"]:hover .curiosity-dot {
    transform: translate(-50%, -32%) scale(1);
    opacity: 1;
}

/* =====================================================================
   MODE 10 — Coding: power on or off
   ===================================================================== */

[data-mode="coding"] .cc-path {
    opacity: 0;
}

.cc-power-ring,
.cc-power-line {
    /* coding-power.js alternates this custom property between
       var(--cc-orange) and var(--cc-power-green) to suggest an on/off
       signal, and overrides it immediately on click. */
    fill: var(--cc-power-color, var(--cc-orange));
    opacity: 0;
    display: none;
}

[data-mode="coding"] .cc-power-ring,
[data-mode="coding"] .cc-power-line {
    display: block;
}

[data-mode="coding"] .cc-power-ring {
    opacity: 1;
}

.cc-power-spin {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    transform: rotate(90deg);
}

[data-mode="coding"] .cc-power-spin {
    transition: transform 0.6s cubic-bezier(0.32, 1, 0.4, 1);
}

[data-mode="coding"] .cc-power-line {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s, opacity 0.3s ease 0.15s;
}

#monogramWrap[data-mode="coding"]:hover .cc-power-spin {
    transform: rotate(0deg);
}

#monogramWrap[data-mode="coding"]:hover .cc-power-line {
    opacity: 1;
    transform: scale(1);
}

/* Click feedback: coding-power.js toggles .is-pressed on mousedown and
   clears it on release, giving the icon a quick "press" before its
   signal color flips. */
[data-mode="coding"] .cc-power-left,
[data-mode="coding"] .cc-power-right {
    cursor: pointer;
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.15s ease;
}

[data-mode="coding"] .cc-power-left.is-pressed,
[data-mode="coding"] .cc-power-right.is-pressed {
    transform: scale(0.88);
}