/* ══════════════════════════════════════════════════
   PRISMA — style.css
   Redesign: cinematic dark lab · Syne + JetBrains Mono
   Szekciók:
   01 Reset & Base
   02 Tokens
   03 Scrollbar
   04 Cursor
   05 Noise
   06 Loader
   07 Nav
   08 Hero
   09 Active Bar
   10 Main & Panels
   11 Picker
   12 Value Matrix
   13 Shades
   14 Mixer
   15 Harmony
   16 Palette
   17 Context Menu
   18 Toast
   19 Buttons
   20 Footer
   21 Animations & Keyframes
   22 Reveal system
   23 Responsive
══════════════════════════════════════════════════ */

/* ── 01 RESET & BASE ──────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none; /* custom cursor átveszi */
}

img,
canvas {
  display: block;
  max-width: 100%;
}
ul,
ol {
  list-style: none;
}
button {
  cursor: none;
  border: none;
  background: none;
  font-family: inherit;
}
input {
  font-family: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── 02 TOKENS ────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg: #060608;
  --bg2: #0d0d12;
  --bg3: #13131a;
  --bg4: #1a1a24;

  /* Ink */
  --ink: #f0f0f5;
  --ink2: #7a7a9a;
  --ink3: #3a3a55;
  --ink4: #1e1e2e;

  /* Accent — dinamikusan frissül JS-ből */
  --accent: #e63946;
  --accent-10: rgba(230, 57, 70, 0.1);
  --accent-20: rgba(230, 57, 70, 0.2);

  /* Borders */
  --line: rgba(255, 255, 255, 0.06);
  --line2: rgba(255, 255, 255, 0.12);
  --line3: rgba(255, 255, 255, 0.22);

  /* Type */
  --display: "Syne", sans-serif;
  --mono: "JetBrains Mono", monospace;
  --sans: "Syne", sans-serif;

  /* Spacing (8px base) */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s8: 64px;
  --s10: 80px;
  --s12: 96px;

  /* Easing */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --r: 6px;
  --r2: 12px;
  --r3: 20px;
}

/* ── 03 SCROLLBAR ─────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--ink3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink2);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--ink3) var(--bg);
}

/* ── 04 CURSOR ────────────────────────────────── */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s var(--expo),
    height 0.3s var(--expo),
    border-color 0.3s,
    opacity 0.3s;
  opacity: 0;
  mix-blend-mode: difference;
}

.cursor.visible {
  opacity: 1;
}

.cursor.hover {
  width: 56px;
  height: 56px;
  border-color: var(--ink);
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition:
    transform 0.08s linear,
    background 0.3s;
  opacity: 0;
}

.cursor-dot.visible {
  opacity: 1;
}

/* ── 05 NOISE ─────────────────────────────────── */

.noise-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  mix-blend-mode: overlay;
}

/* ── 06 LOADER ────────────────────────────────── */

.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.6s var(--expo),
    visibility 0.6s;
}

.loader.out {
  opacity: 0;
  visibility: hidden;
}

.loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}

.loader__logo {
  font-size: 3rem;
  color: var(--accent);
  animation: spin-logo 2s var(--expo) infinite;
}

.loader__name {
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--ink);
}

.loader__track {
  width: 240px;
  height: 2px;
  background: var(--bg4);
  border-radius: 1px;
  overflow: hidden;
}

.loader__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.05s linear;
}

.loader__pct {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink2);
  letter-spacing: 0.1em;
}

/* ── 07 NAV ───────────────────────────────────── */

.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s4);
  /* A tartalom felett átlátszó */
  background: linear-gradient(
    to bottom,
    rgba(6, 6, 8, 0.9) 0%,
    transparent 100%
  );
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__mark {
  font-size: 1.3rem;
  color: var(--accent);
  animation: pulse-mark 3s ease-in-out infinite;
}

.nav__name {
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--ink);
}

.nav__links {
  display: flex;
  gap: var(--s3);
}

.nav__a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink2);
  transition: color 0.2s;
  position: relative;
}

.nav__a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--accent);
  transition: right 0.3s var(--expo);
}

.nav__a:hover {
  color: var(--ink);
}
.nav__a:hover::after {
  right: 0;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.nav__clock {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink2);
  letter-spacing: 0.08em;
  min-width: 40px;
}

/* Natív color picker — stílusos kis gombként */
.global-picker {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line2);
  border-radius: 50%;
  background: var(--bg3);
  cursor: none;
  padding: 2px;
  transition:
    border-color 0.2s,
    transform 0.2s var(--spring);
}

.global-picker:hover {
  border-color: var(--accent);
  transform: scale(1.12);
}

/* ── 08 HERO ──────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Canvas háttér: animated gradient mesh */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__body {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--s4);
  max-width: 900px;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: clamp(0.6rem, 1.5vw, 0.78rem);
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--s3);
}

/* Villogó élő pont */
.blink-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.4s ease-in-out infinite;
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 0.9;
  margin-bottom: var(--s4);
}

.hero__line {
  overflow: hidden;
}

.hero__solid {
  display: block;
  font-family: var(--display);
  font-size: clamp(4rem, 14vw, 5rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* Körvonalas szó */
.hero__outline {
  display: block;
  font-family: var(--display);
  font-size: clamp(4rem, 14vw, 4rem);
  font-weight: 800;
  color: transparent;
  letter-spacing: -0.02em;
  -webkit-text-stroke: 2px var(--accent);
}

.hero__sub {
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.8vw, 0.9rem);
  color: var(--ink2);
  letter-spacing: 0.08em;
  margin-bottom: var(--s5);
}

/* Seed gömbök sora */
.seed-row {
  display: flex;
  gap: var(--s1);
  justify-content: center;
  flex-wrap: wrap;
}

.seed {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: none;
  transition:
    transform 0.3s var(--spring),
    border-color 0.2s,
    box-shadow 0.3s;
  position: relative;
}

.seed::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--c);
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.3s,
    transform 0.3s var(--spring);
}

.seed:hover {
  transform: scale(1.3) translateY(-4px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--c) 60%, transparent);
}

.seed:hover::after {
  opacity: 1;
  transform: scale(1);
}

.seed.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--c);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: var(--s4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.scroll-hint__mouse {
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--ink2);
  border-radius: 11px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}

.scroll-hint__wheel {
  width: 3px;
  height: 6px;
  background: var(--ink2);
  border-radius: 2px;
  animation: scroll-wheel 1.8s ease-in-out infinite;
}

.scroll-hint__txt {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--ink3);
}

/* ── 09 ACTIVE BAR ────────────────────────────── */

.active-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 8, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--s4);
  gap: var(--s2);
  /* Alap: rejtett, megjelenik scroll után */
  transform: translateY(-100%);
  transition: transform 0.4s var(--expo);
}

.active-bar.show {
  transform: translateY(0);
}

.active-bar__left {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.active-bar__swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  background: var(--accent);
  transition: background 0.3s;
  flex-shrink: 0;
}

.active-bar__vals {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.active-bar__hex {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.active-bar__rgb {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink2);
}

.active-bar__right {
  display: flex;
  gap: var(--s1);
}

.ab-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 14px;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  color: var(--ink2);
  background: var(--bg3);
  transition:
    border-color 0.2s,
    color 0.2s,
    transform 0.15s var(--spring);
}

.ab-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
}

.ab-btn--save {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-10);
}

.ab-btn--save:hover {
  background: var(--accent-20);
}

/* ── 10 MAIN & PANELS ─────────────────────────── */

.main {
  width: min(100%, 1140px);
  margin-inline: auto;
  padding: var(--s8) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s12);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s var(--expo),
    transform 0.7s var(--expo);
}

.panel.in-view {
  opacity: 1;
  transform: translateY(0);
}

.panel__hd {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}

.panel__num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 7px;
  border-radius: var(--r);
  line-height: 1;
  flex-shrink: 0;
  margin-top: 5px;
  letter-spacing: 0.06em;
}

.panel__h2 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
  line-height: 1.1;
}

.panel__p {
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  color: var(--ink2);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* ── 11 PICKER ────────────────────────────────── */

.picker-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--s3);
  align-items: start;
}

.drop-zone {
  position: relative;
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  background: var(--bg2);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  overflow: hidden;
  transition:
    border-color 0.3s,
    background 0.3s;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg2));
}

.drop-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
  text-align: center;
  padding: var(--s5);
  pointer-events: none;
  transition: opacity 0.3s;
}

.drop-zone.has-img .drop-idle {
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  font-size: 2.8rem;
  color: var(--accent);
  opacity: 0.6;
  animation: float 3.5s ease-in-out infinite;
}

.drop-txt {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.drop-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink2);
}

.img-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  cursor: none;
}

.drop-zone.has-img .img-canvas {
  display: block;
}

/* Nagyítós loupe */
.loupe {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  display: none;
  transform: translate(-50%, -50%);
  border: 2px solid var(--line3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.drop-zone.has-img .loupe {
  display: block;
}

.loupe-c {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.loupe-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Loupe keresztszál */
.loupe::before,
.loupe::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
.loupe::before {
  width: 1px;
  height: 100%;
  left: 50%;
}
.loupe::after {
  width: 100%;
  height: 1px;
  top: 50%;
}

/* Kinyert szín infó oszlop */
.picked-result {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.picked-big {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r2);
  background: var(--bg3);
  border: 1px solid var(--line);
  transition: background 0.2s;
}

.picked-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picked-hint {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink3);
}

.picked-row {
  display: flex;
  gap: var(--s1);
  align-items: baseline;
}

.picked-row__lbl {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 44px;
  flex-shrink: 0;
}

.picked-row__val {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink);
}

/* ── 12 VALUE MATRIX ──────────────────────────── */

.hex-entry {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  overflow: hidden;
  width: fit-content;
  transition: border-color 0.2s;
}

.hex-entry:focus-within {
  border-color: var(--accent);
}

.hex-entry__hash {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
  padding: 10px 10px 10px 16px;
  user-select: none;
}

.hex-entry__field {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px 4px;
  width: 110px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Villogó kursor effekt */
.hex-entry__caret {
  width: 2px;
  height: 1.1rem;
  background: var(--accent);
  margin-right: 12px;
  animation: caret-blink 0.9s step-end infinite;
}

.val-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s1);
}

.val-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: var(--s2);
  cursor: none;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition:
    border-color 0.25s,
    background 0.25s,
    transform 0.2s var(--spring);
}

/* Sheen effekt hover-re */
.val-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.val-card:hover {
  border-color: var(--line3);
  background: var(--bg3);
  transform: translateY(-3px);
}

.val-card:hover::after {
  opacity: 1;
}

.val-card.copied {
  border-color: var(--accent);
  background: var(--accent-10);
}

.val-card--wide {
  grid-column: span 2;
}

.val-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.val-card__tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--ink3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.val-card__copy-icon {
  font-size: 0.75rem;
  color: var(--ink3);
  opacity: 0;
  transition: opacity 0.2s;
}

.val-card:hover .val-card__copy-icon {
  opacity: 1;
}

.val-card__val {
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.8vw, 0.85rem);
  color: var(--ink);
  word-break: break-all;
}

/* ── 13 SHADES ────────────────────────────────── */

/* Nagy, teljes szélességű strip */
.shade-strip {
  display: flex;
  height: 100px;
  border-radius: var(--r2);
  overflow: hidden;
}

.shade-sw {
  flex: 1;
  cursor: none;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  transition: flex 0.35s var(--expo);
}

.shade-sw:hover {
  flex: 3;
}

.shade-sw.is-base {
  /* Jelölés: kis rombusz alul */
  border-bottom: 3px solid rgba(255, 255, 255, 0.6);
}

.shade-sw__lbl {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.2s,
    transform 0.2s;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.shade-sw:hover .shade-sw__lbl {
  opacity: 1;
  transform: translateY(0);
}

/* Kontraszt sor */
.contrast-wrap {
  display: flex;
  gap: var(--s2);
  align-items: center;
  flex-wrap: wrap;
}

.contrast-box {
  flex: 1;
  min-width: 160px;
  border-radius: var(--r2);
  padding: var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s2);
  border: 1px solid var(--line);
}

.contrast-box__text {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  /* Szín dinamikusan állítódik */
}

.contrast-box__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cb-lbl {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #888;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cb-val {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
}

.wcag-col {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.wcag-chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line2);
  color: var(--ink2);
  text-align: center;
  transition:
    border-color 0.3s,
    color 0.3s,
    background 0.3s;
}

.wcag-chip.pass {
  border-color: #22c55e;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.wcag-chip.fail {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-10);
}

/* ── 14 MIXER ─────────────────────────────────── */

.mixer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--s4);
  align-items: center;
}

.mixer__slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s1);
}

.mixer__slot--r {
  align-items: flex-end;
}

.mixer__lbl {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--ink3);
  letter-spacing: 0.14em;
}

.mixer__swatch {
  width: 100%;
  height: 80px;
  border-radius: var(--r2);
  border: 1px solid var(--line2);
  transition: background 0.3s;
  position: relative;
}

/* Native picker overlay-ként a swatch-ra */
.mixer__pick {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: none;
  width: 100%;
  height: 100%;
}

.mixer__txt {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  outline: none;
  transition: border-color 0.2s;
}

.mixer__txt:focus {
  border-color: var(--accent);
}

/* Vizuális keverés animáció közép */
.mixer__mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  min-width: 160px;
}

.mix-vis {
  display: flex;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line2);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.mix-vis__a,
.mix-vis__b {
  flex: var(--flex, 1);
  transition:
    flex 0.15s var(--ease),
    background 0.3s;
}

.mix-vis__out {
  width: 0;
  position: relative;
  transition: background 0.3s;
}

/* Range csúszka */
.mx-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: linear-gradient(to right, var(--ca, #e63946), var(--cb, #3b82f6));
  border-radius: 2px;
  outline: none;
}

.mx-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--line3);
  cursor: none;
  transition: transform 0.2s var(--spring);
}

.mx-range::-webkit-slider-thumb:active {
  transform: scale(1.3);
}
.mx-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--bg);
  cursor: none;
}

.mx-range-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--ink3);
}

#mx-pct {
  color: var(--ink2);
}

.mix-out-hex {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.06em;
}

/* 11 lépéses strip */
.mix-strip {
  display: flex;
  height: 64px;
  border-radius: var(--r2);
  overflow: hidden;
}

.mix-sw {
  flex: 1;
  cursor: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  transition: flex 0.3s var(--expo);
}

.mix-sw:hover {
  flex: 2.5;
}

.mix-sw__lbl {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.2s;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.mix-sw:hover .mix-sw__lbl {
  opacity: 1;
}

/* ── 15 HARMONY ───────────────────────────────── */

.harmony-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--s5);
  align-items: start;
}

.wheel-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  flex-shrink: 0;
}

.wheel-c {
  border-radius: 50%;
  display: block;
}

/* Harmónia pontok a kerék felett */
.wheel-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wheel-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  transform: translate(-50%, -50%);
  transition:
    background 0.3s,
    transform 0.3s var(--spring);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: none;
  pointer-events: auto;
}

.wheel-dot:hover {
  transform: translate(-50%, -50%) scale(1.4);
}
.wheel-dot.base {
  border-color: var(--accent);
}

.harmony-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.h-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.h-tab {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 7px 14px;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  color: var(--ink2);
  background: var(--bg2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s,
    transform 0.15s var(--spring);
}

.h-tab:hover {
  border-color: var(--line3);
  color: var(--ink);
  transform: translateY(-1px);
}

.h-tab--on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-10);
}

.h-swatches {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

.h-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: none;
  transition: transform 0.25s var(--spring);
}

.h-swatch:hover {
  transform: translateY(-6px);
}

.h-swatch__block {
  width: 72px;
  height: 72px;
  border-radius: var(--r2);
  border: 1px solid var(--line2);
  transition:
    border-color 0.2s,
    box-shadow 0.3s;
}

.h-swatch:hover .h-swatch__block {
  border-color: var(--line3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.h-swatch__hex {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--ink2);
}

.h-swatch__role {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── 16 PALETTE ───────────────────────────────── */

.pal-toolbar {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}

.pal-btn {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line2);
  color: var(--ink2);
  background: var(--bg2);
  cursor: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s,
    transform 0.15s var(--spring);
}

.pal-btn:hover {
  border-color: var(--line3);
  color: var(--ink);
  transform: translateY(-1px);
}

.pal-btn--add {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-10);
}

.pal-btn--add:hover {
  background: var(--accent-20);
}

.pal-btn--del:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 60px;
  align-content: flex-start;
}

.pal-empty {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink3);
}

/* Chip */
.pal-chip {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--r);
  border: 1px solid var(--line2);
  cursor: none;
  transition:
    transform 0.25s var(--spring),
    border-color 0.2s,
    box-shadow 0.25s;
}

.pal-chip:hover {
  transform: scale(1.18) translateY(-3px);
  border-color: var(--line3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.pal-chip__x {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line2);
  color: var(--ink2);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  cursor: none;
  line-height: 1;
}

.pal-chip:hover .pal-chip__x {
  opacity: 1;
}

/* ── 17 CONTEXT MENU ──────────────────────────── */

.ctx-menu {
  position: fixed;
  z-index: 9990;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  padding: 8px;
  min-width: 190px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.94) translateY(-6px);
  transform-origin: top left;
  transition:
    opacity 0.18s var(--expo),
    transform 0.18s var(--expo);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.ctx-menu.open {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1) translateY(0);
}

.ctx-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.ctx-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  flex-shrink: 0;
}

.ctx-hex {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}

.ctx-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink2);
  letter-spacing: 0.04em;
  cursor: none;
  transition:
    background 0.15s,
    color 0.15s;
}

.ctx-item:hover {
  background: var(--bg3);
  color: var(--ink);
}

.ctx-item--danger:hover {
  background: var(--accent-10);
  color: var(--accent);
}

.ctx-sep {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

/* ── 18 TOAST ─────────────────────────────────── */

.toast {
  position: fixed;
  bottom: var(--s4);
  right: var(--s3);
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  padding: 12px var(--s2);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition:
    opacity 0.28s var(--expo),
    transform 0.28s var(--expo);
  max-width: 300px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast--ok {
  border-left: 3px solid #22c55e;
}
.toast--err {
  border-left: 3px solid var(--accent);
}
.toast--inf {
  border-left: 3px solid var(--accent);
}

/* ── 19 FOOTER ────────────────────────────────── */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s4);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: var(--s2);
}

.footer__mark {
  font-size: 1.2rem;
  color: var(--accent);
}

.footer__name {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer__yr {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink3);
  letter-spacing: 0.08em;
}

/* ── 20 REVEAL SYSTEM ─────────────────────────── */

/* JS-reveal: hero elemek animációja */
.js-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s var(--expo),
    transform 0.7s var(--expo);
}

.js-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Hero cím sorok — belülről jönnek elő */
.hero__line .hero__solid,
.hero__line .hero__outline {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition:
    transform 0.8s var(--expo),
    opacity 0.8s var(--expo);
}

.hero__line.revealed .hero__solid,
.hero__line.revealed .hero__outline {
  transform: translateY(0);
  opacity: 1;
}

/* ── 21 KEYFRAMES ─────────────────────────────── */

@keyframes spin-logo {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(90deg) scale(1.05);
  }
  75% {
    transform: rotate(270deg) scale(0.95);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes scroll-wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  80% {
    transform: translateY(12px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

@keyframes pulse-mark {
  0%,
  100% {
    text-shadow: 0 0 8px var(--accent);
  }
  50% {
    text-shadow:
      0 0 20px var(--accent),
      0 0 40px var(--accent);
  }
}

@keyframes caret-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Val card ripple */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.4;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.val-card .ripple-el {
  position: absolute;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: var(--accent);
  animation: ripple 0.5s var(--ease) forwards;
  pointer-events: none;
  transform-origin: center;
}

/* ── 22 PREFERS REDUCED MOTION ────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-reveal,
  .hero__line .hero__solid,
  .hero__line .hero__outline,
  .panel {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── 23 RESPONSIVE ────────────────────────────── */

@media (max-width: 900px) {
  .picker-wrap {
    grid-template-columns: 1fr;
  }
  .harmony-layout {
    grid-template-columns: 1fr;
  }
  .wheel-wrap {
    margin-inline: auto;
  }
  .val-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .val-card--wide {
    grid-column: span 2;
  }
  .mixer {
    grid-template-columns: 1fr;
    gap: var(--s3);
  }
  .mix-vis {
    margin-inline: auto;
  }
  .mx-range {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .nav__links {
    display: none;
  }
  .val-grid {
    grid-template-columns: 1fr 1fr;
  }
  .main {
    padding: var(--s5) var(--s2);
    gap: var(--s10);
  }
  .nav {
    padding: var(--s2) var(--s2);
  }
  .hero__body {
    padding: 0 var(--s2);
  }
  .contrast-wrap {
    flex-direction: column;
  }
  .footer {
    flex-direction: column;
    text-align: center;
  }
}
