/* =========================================================
   Gaudau.lt – pagrindinės stilius
   ========================================================= */

:root {
  --bg: #0b1418;
  --bg-2: #0f1c22;
  --bg-3: #14262e;
  --surface: #12222a;
  --surface-2: #162a33;
  --surface-3: #1a323d;
  --line: rgba(148, 190, 210, 0.14);
  --line-strong: rgba(148, 190, 210, 0.24);
  --text: #d6e5ec;
  --text-strong: #f1f8fb;
  --muted: #8ba6b3;
  --green: #4ade80;
  --green-bright: #86efac;
  --green-soft: rgba(74, 222, 128, 0.12);
  --green-line: rgba(74, 222, 128, 0.35);
  --sand: #fbbf24;
  --sand-soft: #fde68a;
  --danger: #ef6464;
  --danger-soft: rgba(239, 100, 100, 0.14);
  --fav: #f472b6;
  --fav-soft: rgba(244, 114, 182, 0.14);
  --fav-line: rgba(244, 114, 182, 0.4);
  --overlay-bg: rgba(11, 20, 24, 0.72);
  --overlay-bg-hover: rgba(11, 20, 24, 0.9);
  --overlay-line: rgba(255, 255, 255, 0.18);
  --overlay-text: #f1f8fb;
  --overlay-accent: #86efac;
  --play-bg: rgba(74, 222, 128, 0.92);
  --play-bg-hover: rgba(134, 239, 172, 1);
  --play-text: #0b1418;
  --shade-top: rgba(11, 20, 24, 0);
  --shade-bottom: rgba(11, 20, 24, 0.85);
  --modal-backdrop: rgba(4, 10, 13, 0.72);
  --scrollbar-thumb: rgba(148, 190, 210, 0.3);
  --shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --header-h: 72px;
}

[data-theme="light"] {
  --bg: #f4f8fa;
  --bg-2: #ffffff;
  --bg-3: #e8f0f4;
  --surface: #ffffff;
  --surface-2: #f7fbfd;
  --surface-3: #eef5f8;
  --line: rgba(15, 45, 60, 0.1);
  --line-strong: rgba(15, 45, 60, 0.18);
  --text: #1f3a47;
  --text-strong: #0b1f29;
  --muted: #5a7280;
  --green: #16a34a;
  --green-bright: #15803d;
  --green-soft: rgba(22, 163, 74, 0.1);
  --green-line: rgba(22, 163, 74, 0.3);
  --sand: #b45309;
  --sand-soft: #92400e;
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --fav: #db2777;
  --fav-soft: rgba(219, 39, 119, 0.1);
  --fav-line: rgba(219, 39, 119, 0.35);
  --overlay-bg: rgba(255, 255, 255, 0.85);
  --overlay-bg-hover: rgba(255, 255, 255, 0.95);
  --overlay-line: rgba(15, 45, 60, 0.15);
  --overlay-text: #0b1f29;
  --overlay-accent: #15803d;
  --play-bg: rgba(22, 163, 74, 0.92);
  --play-bg-hover: rgba(21, 128, 61, 1);
  --play-text: #ffffff;
  --shade-top: rgba(0, 0, 0, 0);
  --shade-bottom: rgba(0, 0, 0, 0.55);
  --modal-backdrop: rgba(15, 45, 60, 0.5);
  --scrollbar-thumb: rgba(15, 45, 60, 0.25);
  --shadow: 0 24px 48px -24px rgba(15, 45, 60, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

/* Broken-image fallback: when an <img> fails to load, script.js swaps its
   src for an inline SVG placeholder and adds .is-broken-image. The rule
   below keeps the placeholder visually consistent with the surrounding
   surface so a missing thumbnail never breaks the layout. */
img.is-broken-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background-color: var(--surface-3);
  padding: 12px;
}

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

button {
  font-family: inherit;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--text-strong);
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 999;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  background-color: var(--green);
  color: #0b1418;
  font-weight: 700;
  font-size: 0.9rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--text-strong);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(11, 20, 24, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

[data-theme="light"] .site-header {
  background-color: rgba(255, 255, 255, 0.85);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-image: linear-gradient(135deg, var(--green), var(--green-bright));
  color: #0b1418;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-strong);
  background-color: var(--surface-3);
}

.nav-link.is-active {
  color: var(--green);
  background-color: var(--green-soft);
}

.nav-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  color: var(--text-strong);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--surface-3);
  border-color: var(--green-line);
  color: var(--green);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: var(--green-line);
  color: var(--green);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- Sections ---------- */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 20px;
}

.section-head {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.section-kicker {
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.15;
}

.section-lede {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 640px;
  line-height: 1.6;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7rem 1.15rem;
  border-radius: 11px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background-image: linear-gradient(135deg, var(--green), var(--green-bright));
  color: #0b1418;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(74, 222, 128, 0.6);
}

.btn-ghost {
  background-color: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background-color: var(--surface-3);
  border-color: var(--green-line);
  color: var(--text-strong);
}

.btn:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
}

.btn-primary:focus-visible {
  outline-color: var(--text-strong);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.btn-ghost:focus-visible {
  outline-color: var(--green);
  border-color: var(--green-line);
  color: var(--text-strong);
}

/* ---------- Hero ---------- */
.hero-section {
  padding-top: clamp(32px, 5vw, 56px);
}

.hero {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr 1fr;
  }
}

.hero-kicker {
  color: var(--green-bright);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  background-image: linear-gradient(135deg, var(--green), var(--green-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  line-height: 1.65;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stats dt {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.hero-stats dd {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: 100%;
  max-width: 380px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background-image: linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 56px -24px rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .hero-card:hover {
  box-shadow: 0 28px 56px -24px rgba(15, 45, 60, 0.3);
}

/* Reduced motion: the hero card keeps its resting position and never
   lifts on hover. The transition is also disabled so the card does not
   animate its shadow or transform for users who request reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .hero-card {
    transition: none;
  }

  .hero-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  [data-theme="light"] .hero-card:hover {
    box-shadow: var(--shadow);
  }
}

.hero-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-strong);
}

.hero-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.hero-card-body {
  padding: 16px 18px 20px;
  display: grid;
  gap: 12px;
}

.hero-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.hero-card-row span {
  color: var(--muted);
}

.hero-card-row strong {
  color: var(--text-strong);
  font-weight: 600;
}

/* ---------- Hero: recent catches ---------- */
.hero-recent {
  position: relative;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.hero-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-recent-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-recent-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--green-line);
  background-color: var(--green-soft);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hero-recent-link:hover {
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
}

.hero-recent-link:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
}

[data-theme="light"] .hero-recent-link:focus-visible {
  outline-color: var(--green);
  color: #ffffff;
}

.hero-recent-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--surface-3);
  min-width: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Per-item share button that copies a deep link to the catch. */
.hero-recent-share {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin-left: auto;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-recent-share:hover {
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green);
  transform: translateY(-1px);
}

.hero-recent-share:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .hero-recent-share:focus-visible {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Reduced motion: keep the focus ring but skip any transform so the
   share button does not shift position while focused. */
@media (prefers-reduced-motion: reduce) {
  .hero-recent-share:focus-visible {
    transform: none;
    transition: none;
  }
}

/* Visible keyboard focus ring for the hero recent-catches "show more"
   toggle. Uses the same green accent as the rest of the hero card so the
   focus state is clearly distinguishable from hover. */
.hero-recent-more:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  border-color: var(--green-line);
  background-color: var(--green-soft);
  color: var(--text-strong);
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .hero-recent-more:focus-visible {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Fallback focus ring for browsers that do not support :focus-visible.
   Uses :focus so keyboard users on older engines still see a clear
   indicator on the hero recent-catches "show more" toggle. The
   :focus-visible rule above takes precedence in modern browsers. */
.hero-recent-more:focus {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  border-color: var(--green-line);
  background-color: var(--green-soft);
  color: var(--text-strong);
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .hero-recent-more:focus {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Suppress the fallback ring for mouse users in browsers that support
   :focus-visible, so the ring only appears for keyboard navigation. */
.hero-recent-more:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
  border-color: var(--line-strong);
  background-color: var(--surface-3);
  color: var(--text);
}

.hero-recent-share svg {
  width: 14px;
  height: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-recent-share {
    transition: none;
  }

  .hero-recent-share:hover {
    transform: none;
  }
}

/* Toast confirming the deep link was copied. */
.hero-recent-toast {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 5;
  max-width: calc(100% - 24px);
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--green-line);
  background-color: var(--bg-2);
  color: var(--text-strong);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.hero-recent-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hero-recent-toast.is-error {
  border-color: var(--danger);
  color: var(--danger);
}

/* Reduced motion: the hero recent-catches toast snaps into view instead
   of animating its opacity/transform. The toast is still shown/hidden via
   the .is-visible class, but without any transition so it appears
   instantly for users who request reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .hero-recent-toast {
    transition: none;
    opacity: 0;
    transform: translate(-50%, 0);
  }

  .hero-recent-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.hero-recent-item:hover {
  background-color: var(--surface-2);
  border-color: var(--green-line);
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-recent-item {
    transition: none;
  }

  .hero-recent-item:hover {
    transform: none;
  }
}

.hero-recent-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: var(--green-soft);
  color: var(--green);
  flex-shrink: 0;
}

.hero-recent-icon svg {
  width: 15px;
  height: 15px;
}

.hero-recent-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.hero-recent-species {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-recent-location {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-recent-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 1.1rem 0.9rem;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background-color: var(--surface-3);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
}

.hero-recent-empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--green-line);
  background-color: var(--green-soft);
  color: var(--green);
  flex-shrink: 0;
}

.hero-recent-empty-icon svg {
  width: 20px;
  height: 20px;
}

.hero-recent-empty-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hero-recent-empty-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong);
}

.hero-recent-empty-hint {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.45;
}

.hero-recent-empty-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
  padding: 0.45rem 0.85rem;
  border-radius: 9px;
  border: 1px solid var(--green-line);
  background-color: var(--green-soft);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-recent-empty-cta:hover {
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  transform: translateY(-1px);
}

.hero-recent-empty-cta:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .hero-recent-empty-cta:focus-visible {
  outline-color: var(--green);
}

/* Visible keyboard focus ring for the hero empty-state CTA link. The link
   is the primary action inside the empty recent-catches card, so it needs
   a clearly distinguishable focus state that works on both themes. */
.hero-recent-empty-cta:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .hero-recent-empty-cta:focus-visible {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Fallback focus ring for browsers that do not support :focus-visible.
   Uses :focus so keyboard users on older engines still see a clear
   indicator on the hero empty-state CTA link. The :focus-visible rule
   above takes precedence in modern browsers. */
.hero-recent-empty-cta:focus {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .hero-recent-empty-cta:focus {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Suppress the fallback ring for mouse users in browsers that support
   :focus-visible, so the ring only appears for keyboard navigation. */
.hero-recent-empty-cta:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green);
}

@media (prefers-reduced-motion: reduce) {
  .hero-recent-empty-cta:focus-visible,
  .hero-recent-empty-cta:focus {
    transition: none;
  }
}

.hero-recent-empty-cta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-recent-empty-cta {
    transition: none;
  }

  .hero-recent-empty-cta:hover {
    transform: none;
  }
}

/* Reduced motion: disable the empty-state CTA hover lift so the button
   does not shift position for users who request reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .hero-recent-empty-cta:hover,
  .hero-recent-empty-cta:focus-visible {
    transform: none;
  }
}

/* Loading state: shown while the hero recent list is being populated.
   The markup sets aria-busy="true" on the list and renders a skeleton
   placeholder item; JS clears the busy flag and replaces the skeleton
   with real data (or the empty state) once it is ready. */
.hero-recent-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background-color: var(--surface-3);
  list-style: none;
}

.hero-recent-loading-bar {
  position: relative;
  display: block;
  height: 10px;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--surface-2);
}

.hero-recent-loading-bar-short {
  width: 55%;
}

.hero-recent-loading-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(148, 190, 210, 0.18) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: hero-recent-shimmer 1.4s ease-in-out infinite;
}

[data-theme="light"] .hero-recent-loading-bar::after {
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(15, 45, 60, 0.1) 50%,
    transparent 100%
  );
}

@keyframes hero-recent-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-recent-loading-bar::after {
    animation: none;
    background-image: none;
  }

  .hero-recent-loading-bar {
    animation: hero-recent-loading-pulse 1.6s ease-in-out infinite;
  }

  @keyframes hero-recent-loading-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
  }
}

/* "Rodyti daugiau / Rodyti mažiau" toggle under the hero recent list. */
.hero-recent-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 2px;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-recent-more[hidden] {
  display: none;
}

.hero-recent-more:hover {
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--text-strong);
}

.hero-recent-more:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: var(--green-line);
  background-color: var(--green-soft);
  color: var(--text-strong);
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .hero-recent-more:focus-visible {
  outline-color: var(--green);
}

.hero-recent-more-count {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.5;
}

.hero-recent-more:hover .hero-recent-more-count {
  border-color: var(--green-line);
  color: var(--green);
}

.hero-recent-more-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.hero-recent-more[aria-expanded="true"] .hero-recent-more-icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .hero-recent-more,
  .hero-recent-more-icon {
    transition: none;
  }

  /* Reduced motion: keep the chevron rotation as a static state change so
     it snaps between collapsed and expanded instead of animating. */
  .hero-recent-more[aria-expanded="true"] .hero-recent-more-icon {
    transform: rotate(180deg);
  }
}

/* Visible keyboard focus ring for the hero recent-catches toast dismiss
   button. The toast is a transient status message, but when it contains a
   dismiss control the button needs a clearly distinguishable focus state
   that works on both themes. */
.hero-recent-toast-dismiss {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-recent-toast-dismiss:hover {
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green);
}

.hero-recent-toast-dismiss:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .hero-recent-toast-dismiss:focus-visible {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.hero-recent-toast-dismiss svg {
  width: 12px;
  height: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-recent-toast-dismiss {
    transition: none;
  }
}

/* Screen-reader-only live region announcing recent-catch updates. */
.hero-recent-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Screen-reader-only live region announcing the expanded/collapsed state
   and visible item count of the hero recent-catches list. */
.hero-recent-toggle-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-recent-link {
    transition: none;
  }
}

/* ---------- Video section: screen-reader-only live region ---------- */
.video-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Video section: per-card share button ---------- */
.video-card-share {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--overlay-line);
  background-color: var(--overlay-bg);
  color: var(--overlay-text);
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.video-card-share:hover {
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  transform: translateY(-1px);
}

/* Reduced motion: keep the hover color change but skip the translateY
   lift so the share control does not shift position for users who
   request reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .video-card-share:hover {
    transform: none;
  }
}

/* Visible keyboard focus ring for the per-card share button. The button
   sits on top of the video thumbnail, so the ring uses the bright green
   accent plus a soft halo to stay clearly distinguishable from the
   thumbnail image on both themes. */
.video-card-share:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .video-card-share:focus-visible {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Reduced motion: keep the focus ring but skip any transform so the
   share button does not shift position while focused. */
@media (prefers-reduced-motion: reduce) {
  .video-card-share:focus-visible {
    transform: none;
    transition: none;
  }
}

.video-card-share svg {
  width: 16px;
  height: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .video-card-share {
    transition: none;
  }

  .video-card-share:hover {
    transform: none;
  }
}

/* ---------- Video section: focus-visible states ---------- */
.video-submit:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Visible keyboard focus ring for the video favorites filter toggle. */
.video-fav-filter:focus-visible {
  outline: 2px solid var(--fav);
  outline-offset: 3px;
  border-color: var(--fav-line);
  background-color: var(--fav-soft);
  color: var(--fav);
  box-shadow: 0 0 0 4px var(--fav-soft);
}

[data-theme="light"] .video-fav-filter:focus-visible {
  outline-color: var(--fav);
}

/* Visible keyboard focus ring for the video gallery "show more" toggle. */
.video-more-btn:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  border-color: var(--green-line);
  background-color: var(--green-soft);
  color: var(--text-strong);
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .video-more-btn:focus-visible {
  outline-color: var(--green);
}

/* Reduced motion: disable the "show more" icon rotation transition so the
   chevron snaps between states instead of animating. */
@media (prefers-reduced-motion: reduce) {
  .video-more-btn,
  .video-more-icon {
    transition: none;
  }

  .video-more-btn[aria-expanded="true"] .video-more-icon {
    transform: rotate(180deg);
  }
}

/* Visible keyboard focus ring for the video empty-state reset and add
   actions. Matches the video-submit focus treatment (bright green
   outline plus a soft halo) so every control in the video empty state
   has a consistent, clearly distinguishable focus indicator on both
   themes. */
.video-empty-reset:focus-visible,
.video-empty-add:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .video-empty-reset:focus-visible,
[data-theme="light"] .video-empty-add:focus-visible {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Fallback focus ring for browsers that do not support :focus-visible.
   Uses :focus so keyboard users on older engines still see a clear
   indicator on the video empty-state actions. The :focus-visible rule
   above takes precedence in modern browsers. */
.video-empty-reset:focus,
.video-empty-add:focus {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .video-empty-reset:focus,
[data-theme="light"] .video-empty-add:focus {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Suppress the fallback ring for mouse users in browsers that support
   :focus-visible, so the ring only appears for keyboard navigation. */
.video-empty-reset:focus:not(:focus-visible),
.video-empty-add:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .video-empty-reset:focus-visible,
  .video-empty-add:focus-visible,
  .video-empty-reset:focus,
  .video-empty-add:focus {
    transition: none;
  }
}

/* Visible keyboard focus ring for the video form URL and title inputs.
   Matches the video-submit focus treatment (bright green outline plus a
   soft halo) so every control in the video form has a consistent,
   clearly visible keyboard focus indicator on both themes. */
.video-form-fields input:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .video-form-fields input:focus-visible {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

@media (prefers-reduced-motion: reduce) {
  .video-form-fields input:focus-visible {
    transition: none;
  }
}

/* Fallback focus ring for browsers that do not support :focus-visible.
   Uses :focus so keyboard users on older engines still see a clear
   indicator on the video form inputs. The :focus-visible rule above
   takes precedence in modern browsers. */
.video-form-fields input:focus {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

[data-theme="light"] .video-form-fields input:focus {
  outline-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Suppress the fallback ring for mouse users in browsers that support
   :focus-visible, so the ring only appears for keyboard navigation. */
.video-form-fields input:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-toggle:hover {
  background-color: var(--surface-3);
  border-color: var(--green-line);
  color: var(--green);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.nav-toggle-icon {
  width: 20px;
  height: 20px;
}

.nav-toggle .nav-toggle-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-close {
  display: block;
}

/* ---------- Responsive header ---------- */
@media (max-width: 900px) {
  .header-inner {
    gap: 12px;
  }

  .brand-text small {
    display: none;
  }

  .site-nav {
    gap: 2px;
  }

  .nav-link {
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-left: 0;
    padding: 10px 16px 14px;
    border-bottom: 1px solid var(--line);
    background-color: var(--bg-2);
    box-shadow: var(--shadow);
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    padding: 0.7rem 0.85rem;
    font-size: 0.92rem;
    border-radius: 10px;
  }

  .theme-toggle {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .nav-toggle {
    transition: none;
  }
}

@media (max-width: 640px) {
  .brand-text strong {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-mark svg {
    width: 20px;
    height: 20px;
  }

  .hero-stats {
    gap: 18px;
  }

  .hero-stats dd {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .nav-link,
  .theme-toggle,
  .skip-link {
    transition: none;
  }
}
