/* ============================================
   MysliSrdcom — Prezentácie (rozcestník)
   Štýl nadväzuje na AI deck (dark, red accent,
   orbs, border glow rotate). Layout: hero + grid.
   ============================================ */

:root {
  --bg: #050505;
  --bg-elevated: #0f0f0f;
  --bg-card: #141414;
  --bg-card-hover: #181818;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666;

  --red: #ed1c24;
  --red-bright: #ff3a3a;
  --red-deep: #a81218;
  --red-glow: rgba(237, 28, 36, 0.45);
  --red-glow-soft: rgba(237, 28, 36, 0.18);

  --font-sans: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;

  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

::selection { background: var(--red); color: #fff; }

a { color: inherit; text-decoration: none; }

/* ================= BACKGROUND ORBS ================= */
.bg-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-layer .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.bg-layer .orb-1 {
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(237, 28, 36, 0.34) 0%, transparent 70%);
  top: -12%; left: -8%;
  animation: orbFloat1 26s ease-in-out infinite;
}
.bg-layer .orb-2 {
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(255, 58, 58, 0.24) 0%, transparent 70%);
  bottom: -14%; right: -8%;
  animation: orbFloat2 32s ease-in-out infinite;
}
.bg-layer .orb-3 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(168, 18, 24, 0.26) 0%, transparent 70%);
  top: 50%; left: 48%;
  animation: orbFloat3 22s ease-in-out infinite;
}
.bg-layer .noise {
  position: absolute; inset: 0;
  background-image: var(--noise);
  background-size: 256px 256px;
  mix-blend-mode: overlay;
  opacity: 0.55;
}
.bg-layer .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(80px, -60px) scale(1.1); }
  50% { transform: translate(-40px, -120px) scale(0.95); }
  75% { transform: translate(-100px, 40px) scale(1.05); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-70px, 80px) scale(1.08); }
  50% { transform: translate(60px, 40px) scale(0.92); }
  75% { transform: translate(30px, -90px) scale(1.12); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, 70px) scale(1.05); }
  50% { transform: translate(-80px, -30px) scale(1.1); }
  75% { transform: translate(40px, -60px) scale(0.9); }
}

/* ================= HEADER ================= */
.site-header {
  position: relative;
  z-index: 10;
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-header .logo img {
  height: 34px;
  width: auto;
}
.site-header nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
}
.site-header nav a:hover { color: var(--text); }

@media (max-width: 640px) {
  .site-header { padding: 20px 20px; }
  .site-header .logo img { height: 28px; }
}

/* ================= HERO ================= */
.hero {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 60px auto 40px;
  padding: 0 48px;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--red-glow-soft);
  border-radius: 999px;
  color: var(--red-bright);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(237, 28, 36, 0.06);
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.hero h1 {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 22px 0 18px;
}
.hero h1 .serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  color: var(--red-bright);
  letter-spacing: -0.02em;
}
.hero p.lead {
  color: var(--text-secondary);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  max-width: 620px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .hero { margin: 30px auto 24px; padding: 0 20px; }
  .hero h1 { font-size: clamp(40px, 12vw, 64px); }
}

/* ================= GRID ================= */
.deck-grid-wrap {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 40px auto 80px;
  padding: 0 48px;
}
.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
@media (max-width: 900px) {
  .deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .deck-grid-wrap { padding: 0 20px; margin: 24px auto 60px; }
}

/* ================= CARD ================= */
.deck-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  overflow: hidden;
  isolation: isolate;
}
.deck-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--border-angle),
    transparent 40%,
    var(--red) 50%,
    var(--red-bright) 55%,
    transparent 65%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 1;
}
.deck-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}
.deck-card:hover::before {
  opacity: 1;
  animation: border-spin 4s linear infinite;
}
@keyframes border-spin {
  to { --border-angle: 360deg; }
}

.deck-card .title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.deck-card h3 {
  font-size: clamp(15px, 1.5vw, 21px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  hyphens: auto;
}
.deck-card .arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
  flex-shrink: 0;
}
.deck-card .arrow svg {
  width: 12px; height: 12px;
  stroke: var(--text-secondary);
  transition: stroke 0.3s var(--ease), transform 0.3s var(--ease);
}
.deck-card:hover .arrow {
  background: var(--red);
  transform: rotate(-45deg);
}
.deck-card:hover .arrow svg { stroke: #fff; }

.deck-card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.deck-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.deck-card:hover .thumb img { transform: scale(1.04); }

.deck-card .meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.deck-card .meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

@media (max-width: 640px) {
  .deck-card { padding: 12px; gap: 10px; }
  .deck-card h3 { font-size: 14px; }
  .deck-card .meta { font-size: 11px; gap: 4px 6px; }
  .deck-card .meta .dot { display: none; }
  .deck-card .meta > span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
    opacity: 0.5;
  }
  .deck-card .arrow { width: 24px; height: 24px; }
}

/* ================= EMPTY STATE ================= */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

/* ================= FOOTER ================= */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 40px 48px 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--text-secondary); transition: color 0.2s var(--ease); }
.site-footer a:hover { color: var(--text); }
.site-footer .brand-line em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--red-bright);
  font-weight: 400;
}

@media (max-width: 640px) {
  .site-footer { padding: 28px 20px; font-size: 12px; flex-direction: column; text-align: center; }
}

/* ================= THEME TOGGLE BUTTON ================= */
.theme-toggle {
  position: fixed;
  bottom: 16px;
  left: 18px;
  z-index: 40;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20, 20, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  background: rgba(40, 40, 48, 0.75);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}
.theme-toggle:active { transform: scale(0.96); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.theme-toggle .th-ic {
  width: 18px;
  height: 18px;
  display: block;
}
.theme-toggle .th-ic-moon { display: none; }
html[data-theme="light"] .theme-toggle .th-ic-sun { display: none; }
html[data-theme="light"] .theme-toggle .th-ic-moon { display: block; }

/* ============================================
   LIGHT THEME
   Aktivácia: <html data-theme="light"> (toggle button alebo Enter key).
   Stratégia: override CSS vars + explicitné overrides pre hardcoded rgba.
   ============================================ */
html[data-theme="light"] {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #8a8a8a;

  --red-glow: rgba(237, 28, 36, 0.35);
  --red-glow-soft: rgba(237, 28, 36, 0.22);
}

/* Grid lines — čierne namiesto bielych */
html[data-theme="light"] .bg-layer .grid {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}
/* Noise — multiply blend pre svetlé pozadie */
html[data-theme="light"] .bg-layer .noise {
  opacity: 0.22;
  mix-blend-mode: multiply;
}
/* Orby — polovičná opacity */
html[data-theme="light"] .bg-layer .orb-1 {
  background: radial-gradient(circle, rgba(237, 28, 36, 0.2) 0%, transparent 70%);
}
html[data-theme="light"] .bg-layer .orb-2 {
  background: radial-gradient(circle, rgba(255, 58, 58, 0.16) 0%, transparent 70%);
}
html[data-theme="light"] .bg-layer .orb-3 {
  background: radial-gradient(circle, rgba(168, 18, 24, 0.18) 0%, transparent 70%);
}

/* Eyebrow — jemnejší red tint */
html[data-theme="light"] .eyebrow {
  background: rgba(237, 28, 36, 0.08);
  border-color: rgba(237, 28, 36, 0.28);
  color: var(--red);
}

/* Card — translucent white */
html[data-theme="light"] .deck-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .deck-card:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.18);
}

/* Arrow — light chrome */
html[data-theme="light"] .deck-card .arrow {
  background: rgba(0, 0, 0, 0.05);
}

/* Thumb — light surface + soft shadow */
html[data-theme="light"] .deck-card .thumb {
  background: #f0f0f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Theme toggle button — light chrome */
html[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.7);
}
html[data-theme="light"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.22);
  color: #000;
}
