/* ═══════════════════════════════════════════════════════════════════════
   THEME LAYER — denní a noční režim
   Načítá se po styles.css a motion.css.

   Noční režim: bílo-tyrkysový akcent na nočních plochách (výchozí).
   Denní režim: tyrkysovo-mátový akcent na světlých plochách.
   Přepínač je vpravo nahoře v navigaci; volba se pamatuje.
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══ PŘEPÍNAČ ═══════════════════════════════════════════════════════ */
.theme-toggle {
  position: relative; flex: 0 0 auto;
  width: 66px; height: 34px; padding: 0; margin-left: 10px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--glass-2); cursor: pointer; overflow: hidden;
  transition: background .35s var(--ease-soft), border-color .35s;
}
.theme-toggle:hover { border-color: var(--ink-ghost); }
.theme-toggle__icons {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 9px; color: var(--ink-mute); pointer-events: none;
}
.theme-toggle__icons svg { width: 15px; height: 15px; }
.theme-toggle__knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--grad-gateway); box-shadow: 0 6px 16px -8px rgba(20,184,166,.95);
  transition: transform .45s var(--ease-out), background .35s;
}
html[data-theme="light"] .theme-toggle__knob { transform: translateX(32px); }
html[data-theme="light"] .theme-toggle { background: #ffffffcc; }
.theme-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (max-width:760px) {
  .theme-toggle { margin-left: auto; width: 58px; height: 32px; }
  .theme-toggle__knob { width: 24px; height: 24px; }
  html[data-theme="light"] .theme-toggle__knob { transform: translateX(26px); }
  .nav__burger { margin-left: 8px; }
}

/* ═══ DENNÍ REŽIM ════════════════════════════════════════════════════ */
html[data-theme="light"] {
  /* plochy: denní varianta téhož jazyka */
  --void: #f3faf9; --abyss: #eef7f6; --deep: #e7f2f1;
  --panel: #ffffff; --panel-2: #f7fcfb; --inset: #eef7f6;
  --night: #eaf5f4; --citadel: #f2f9f8; --glass: #ffffff;

  /* text */
  --ink: #061a1e; --ink-dim: #37575a; --ink-mute: #527074; --ink-ghost: #6d8b8d;

  /* zóny: tyrkysová škála čitelná na světlém */
  --framework: #0b7f76; --system: #12a396; --product: #16b8a8;
  --cyan: #0e9c92; --orange: #23b3a2; --green: #2fa47f; --hub: #0d7d74;

  /* akcent na světlém: tmavší tyrkys → máta */
  /* akcent drží dostatečný kontrast: bílý text na tlačítkách, tmavý na gradientovém písmu */
  --grad-gateway: linear-gradient(115deg, #075f59 0%, #0b7f76 52%, #0e8478 100%);
  --grad-home: linear-gradient(115deg, #0b7f76, #16b8a8);
  --spectrum: linear-gradient(90deg, #0b7f76 0%, #16b8a8 34%, #56dcc9 66%, #a7f3d0 100%);

  /* linky a sklo */
  --line: rgba(6, 26, 30, .10); --line-2: rgba(6, 26, 30, .18);
  --glass-1: rgba(6, 26, 30, .028); --glass-2: rgba(6, 26, 30, .05); --glass-3: rgba(6, 26, 30, .085);
  color-scheme: light;
}

/* přechod mezi režimy — plynulý, ale krátký */
html.theme-anim body,
html.theme-anim .card, html.theme-anim .ref, html.theme-anim .steps li,
html.theme-anim .nav, html.theme-anim .marquee, html.theme-anim .brief,
html.theme-anim .vcard, html.theme-anim .foot {
  transition: background-color .45s var(--ease-soft), color .45s var(--ease-soft), border-color .45s var(--ease-soft);
}

/* atmosféra: světlo, ne tma */
html[data-theme="light"] .atmos__photo { opacity: .12; mix-blend-mode: multiply; }
html[data-theme="light"] .atmos__grid {
  opacity: .5;
  background-image:
    linear-gradient(rgba(6, 26, 30, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 26, 30, .05) 1px, transparent 1px) !important;
}
html[data-theme="light"] .atmos__glow--a { background: radial-gradient(circle, rgba(22, 184, 168, .26), transparent 66%); }
html[data-theme="light"] .atmos__glow--b { background: radial-gradient(circle, rgba(86, 220, 201, .22), transparent 66%); }

/* navigace a lišty */
html[data-theme="light"] .nav {
  background: linear-gradient(180deg, rgba(243, 250, 249, .92), rgba(243, 250, 249, .55) 72%, transparent);
}
html[data-theme="light"] .nav.is-stuck { background: rgba(243, 250, 249, .94); }
html[data-theme="light"] .swan::after { background: var(--void); }
html[data-theme="light"] .progress { background: var(--spectrum); }

/* karty, bloky, panely */
html[data-theme="light"] .card,
html[data-theme="light"] .ref {
  background: linear-gradient(165deg, #ffffff, rgba(255, 255, 255, .55) 60%, rgba(238, 247, 246, .9));
  box-shadow: 0 22px 50px -44px rgba(4, 40, 40, .55);
}
html[data-theme="light"] .card:hover { box-shadow: 0 34px 70px -46px rgba(4, 40, 40, .6); }
html[data-theme="light"] .btn--primary,
html[data-theme="light"] .nav__cta { color: #ffffff !important; }
html[data-theme="light"] .btn--primary:hover,
html[data-theme="light"] .nav__cta:hover { box-shadow: 0 26px 54px -22px rgba(11, 127, 118, .55); }
html[data-theme="light"] .card::after {
  background: radial-gradient(circle, color-mix(in srgb, var(--accent, #16b8a8) 16%, transparent), transparent 65%);
}
html[data-theme="light"] .chips li,
html[data-theme="light"] .badge { background: rgba(255, 255, 255, .8); }
html[data-theme="light"] .steps li,
html[data-theme="light"] .stat,
html[data-theme="light"] .creds > div { border-color: var(--line); }

/* formuláře */
html[data-theme="light"] .brief,
html[data-theme="light"] .vcard,
html[data-theme="light"] .form {
  background: linear-gradient(165deg, #ffffff, rgba(247, 252, 251, .92));
  box-shadow: 0 40px 90px -70px rgba(4, 40, 40, .5);
}
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .field select {
  background: #ffffff; color: var(--ink); border-color: var(--line-2);
}
html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] .field textarea::placeholder { color: #8fa9ab; }
html[data-theme="light"] .opt span { background: rgba(255, 255, 255, .85); }
html[data-theme="light"] .opt input:checked + span {
  background: linear-gradient(120deg, rgba(22, 184, 168, .16), rgba(86, 220, 201, .12));
  color: var(--ink);
}
html[data-theme="light"] .honeypot { opacity: 0; }

/* dialog, animace spuštění práce, opony */
html[data-theme="light"] dialog.idea::backdrop,
html[data-theme="light"] .launch { background: rgba(6, 26, 30, .45); }
html[data-theme="light"] .idea__box,
html[data-theme="light"] .launch__card {
  background: linear-gradient(165deg, #ffffff, #f2f9f8);
  box-shadow: 0 60px 120px -70px rgba(4, 40, 40, .5);
}
html[data-theme="light"] .marquee {
  background: linear-gradient(180deg, rgba(238, 247, 246, .9), rgba(243, 250, 249, .3));
}
html[data-theme="light"] .preload { background: var(--void); }
html[data-theme="light"] .preload__name { background: var(--grad-gateway); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .preload::before {
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(22, 184, 168, .18), transparent 70%),
    radial-gradient(40% 40% at 78% 70%, rgba(86, 220, 201, .16), transparent 70%);
}

/* 3D panel a světla v denním režimu */
html[data-theme="light"] .revolve__face {
  background: linear-gradient(160deg, #ffffff, #edf6f5);
  border-color: rgba(6, 26, 30, .14);
  box-shadow: 0 28px 56px -44px rgba(4, 40, 40, .6), inset 0 1px 0 #ffffff;
}
html[data-theme="light"] .revolve__face span { color: #6d8b8d; }
html[data-theme="light"] .hero__light--1 { background: radial-gradient(circle, rgba(22, 184, 168, .20), transparent 68%); }
html[data-theme="light"] .hero__light--2 { background: radial-gradient(circle, rgba(86, 220, 201, .18), transparent 70%); }
html[data-theme="light"] .orb__ring { border-color: rgba(11, 127, 118, .3); }
html[data-theme="light"] .orb__ring--2 { border-color: rgba(22, 184, 168, .35); }
html[data-theme="light"] .launch { backdrop-filter: blur(6px); }

/* kurzor v denním režimu */
html[data-theme="light"] .cursor { mix-blend-mode: normal; }
html[data-theme="light"] .cursor::before { background: #0b7f76; box-shadow: 0 0 14px rgba(11, 127, 118, .55); }
html[data-theme="light"] .cursor::after {
  border-color: rgba(11, 127, 118, .22);
  background: radial-gradient(circle, rgba(22, 184, 168, .10), rgba(86, 220, 201, .05) 44%, transparent 70%);
}
html[data-theme="light"] .cursor.is-hot::after {
  border-color: rgba(11, 127, 118, .4);
  background: radial-gradient(circle, rgba(22, 184, 168, .16), rgba(86, 220, 201, .08) 46%, transparent 72%);
}
html[data-theme="light"] .cursor__label { background: rgba(255, 255, 255, .95); color: var(--ink); }

/* scrollbar a výběr textu */
html[data-theme="light"] ::selection { background: rgba(22, 184, 168, .28); color: #04181a; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: var(--void); }
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(11, 127, 118, .55), rgba(86, 220, 201, .6));
  border-color: var(--void);
}
html[data-theme="light"] { scrollbar-color: rgba(11, 127, 118, .45) transparent; }

@media (prefers-reduced-motion: reduce) {
  html.theme-anim body, html.theme-anim .card, html.theme-anim .nav { transition: none; }
  .theme-toggle__knob { transition: none; }
}
