/* ════════════════════════════════════════════════════════════
   Izzat Brand OS · FOCUS POLISH · v1
   ════════════════════════════════════════════════════════════
   Premium focus ring uniforme + selection highlight + button
   press micro-feedback + link underline accent on hover.
   Respeita prefers-reduced-motion.
   ════════════════════════════════════════════════════════════ */

/* ───── 1. Focus ring uniforme ───── */
*:focus { outline: none; }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm, 6px);
  transition: outline-offset .15s var(--ease);
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.btn:focus-visible {
  outline-offset: 4px;
}

/* Inputs custom focus */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ───── 2. Selection highlight com brand color ───── */
::selection {
  background: var(--accent);
  color: #fff;
  text-shadow: none;
}
::-moz-selection {
  background: var(--accent);
  color: #fff;
}

/* ───── 3. Button press micro-feedback ───── */
button:active,
.btn:active,
[role="button"]:active {
  transform: scale(0.98);
  transition: transform 80ms var(--ease);
}

/* ───── 4. Link underline accent on hover (sutil) ───── */
a:not(.btn):not(.nav__link):not(.iz-launcher-app):not(.nav-link):not(.brand-card):not(.tool-card) {
  text-underline-offset: 3px;
  transition: text-decoration-color .2s var(--ease);
}
a:not(.btn):not(.nav__link):not(.iz-launcher-app):not(.nav-link):hover {
  text-decoration-color: var(--accent);
}

/* ───── 5. Hover lift utility (premium) ───── */
.hover-lift {
  transition: transform var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease);
  will-change: transform;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-lg);
}
.hover-lift:active {
  transform: translateY(-2px);
  transition-duration: 80ms;
}

/* ───── 6. Smooth gradient transitions ───── */
.gradient-shift {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  background-size: 200% 200%;
  transition: background-position var(--duration-slow) var(--ease);
}
.gradient-shift:hover {
  background-position: 100% 100%;
}

/* ───── 7. Pulse ring accent (badges live/status) ───── */
.pulse-accent {
  position: relative;
}
.pulse-accent::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  animation: pulse-ring 2s var(--ease) infinite;
}
@keyframes pulse-ring {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.15); }
}

/* ───── 8. Tabular numbers ───── */
.stat__number,
.metric__value,
[data-ticker],
code,
kbd,
samp,
pre {
  font-variant-numeric: tabular-nums;
}

/* ───── 9. Image loading skeleton ───── */
img {
  background: linear-gradient(110deg,
              rgba(0,0,0,0.04) 8%,
              rgba(0,0,0,0.08) 18%,
              rgba(0,0,0,0.04) 33%);
  background-size: 200% 100%;
  animation: img-skeleton-sweep 1.5s ease-in-out infinite;
}
img[data-loaded="true"],
img[loading="lazy"][data-loaded="true"] {
  background: transparent;
  animation: none;
}
/* Imagens com background transparente declarado (SVG inline icons) */
img[src*=".svg"],
img.no-skeleton {
  background: transparent;
  animation: none;
}
@keyframes img-skeleton-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ───── 10. Smooth scroll + anchor offset ───── */
html {
  scroll-behavior: smooth;
}
section[id],
[id][data-anchor] {
  scroll-margin-top: calc(var(--nav-height, 64px) + 24px);
}

/* ───── Reduced motion · respect ───── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *:focus-visible { transition: none; }
  button:active, .btn:active, [role="button"]:active { transform: none; transition: none; }
  .hover-lift { transition: none; }
  .hover-lift:hover { transform: none; }
  .gradient-shift { transition: none; }
  .pulse-accent::after { animation: none; }
  img {
    animation: none;
    background: rgba(0,0,0,0.04);
  }
}
