/* NirmanDost — Site-wide polish (drop-in, no markup changes)
 * Adds subtle hover lift to primary buttons, accessibility-friendly focus rings,
 * smoother modals, gentler transitions. Respects prefers-reduced-motion.
 */

/* ── Smooth scrolling (gentle) ─────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Focus-visible rings (accessibility) ───────────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid rgba(212,80,10,.45);
  outline-offset: 2px;
  border-radius: 8px;
  transition: outline-offset .12s ease-out;
}
button:focus-visible, a:focus-visible {
  outline-offset: 3px;
}

/* ── Primary button micro-interactions ─────────────────────────────────── */
/* Covers your main CTA classes without changing markup. */
.btn-nav, .btn-s, .btn-l, .btn-cta, .btn-primary, .nav-btn,
button.cta, .cta-btn, .gate-btn, .modal-btn, .btn-feat {
  transition: transform .15s cubic-bezier(.05,.7,.1,1),
              box-shadow .18s ease-out,
              filter .18s ease-out !important;
  will-change: transform;
}
.btn-nav:hover, .btn-s:hover, .btn-l:hover, .btn-cta:hover, .btn-primary:hover,
button.cta:hover, .cta-btn:hover, .gate-btn:hover, .modal-btn:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.04);
}
.btn-nav:active, .btn-s:active, .btn-l:active, .btn-cta:active, .btn-primary:active,
button.cta:active, .cta-btn:active, .gate-btn:active, .modal-btn:active {
  transform: translateY(0) scale(.985);
  transition-duration: .08s;
}

/* ── Nav link hover ────────────────────────────────────────────────────── */
.nav-links li a {
  transition: color .15s ease-out, background-color .15s ease-out, transform .15s ease-out !important;
}
.nav-links li a:hover {
  transform: translateY(-1px);
}

/* ── Cards lift gently on hover (only where we have a card class) ──────── */
.feat-card, .pc, .pro-card, .app-card {
  transition: transform .2s cubic-bezier(.05,.7,.1,1),
              box-shadow .22s ease-out,
              border-color .18s ease-out !important;
}
.feat-card:hover, .pro-card:hover, .app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(28,17,8,.10);
}

/* ── Inputs: gentler focus ─────────────────────────────────────────────── */
input:not([type=checkbox]):not([type=radio]):focus,
select:focus,
textarea:focus {
  transition: border-color .15s, box-shadow .15s;
}

/* ── Toast nudge (where used) ──────────────────────────────────────────── */
.toast, .nd-toast {
  transition: opacity .25s ease-out, transform .25s cubic-bezier(.05,.7,.1,1) !important;
}

/* ── Gentle entrance for hero on first load ────────────────────────────── */
@keyframes ndHeroIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.hero, .hero-inner, [class*="hero-top"] > h1,
.hero h1, .hero p, .hero .hero-actions, .hero .hero-pill {
  animation: ndHeroIn .55s cubic-bezier(.05,.7,.1,1) both;
}
.hero h1 { animation-delay: .04s; }
.hero p, .hero-sub { animation-delay: .12s; }
.hero-actions, .hero .btn-cta { animation-delay: .20s; }

/* ── Tighter image render on logos / emblem ────────────────────────────── */
.nav-logo-img img { image-rendering: -webkit-optimize-contrast; }

/* ── Hide legacy per-page Unit Converter FABs (broken emoji + position badge).
 * The global SVG converter (.nu-fab from nirman-units.js) replaces them site-wide. */
#convFab, #convPanel { display: none !important; }

/* ── Theme toggle sun/moon icon (moon shows in light mode → tap for dark; sun shows in dark → tap for light) ── */
.btn-theme svg { width: 18px; height: 18px; display: block; transition: transform .25s cubic-bezier(.05,.7,.1,1); }
.btn-theme:hover svg { transform: rotate(-14deg) scale(1.08); }
.btn-theme .ic-sun { display: none; }
[data-theme="dark"] .btn-theme .ic-moon { display: none; }
[data-theme="dark"] .btn-theme .ic-sun { display: block; }


/* ── Section heading underline that grows on hover (only where headings allow) ── */
h2.sec-title, .sec-title {
  position: relative;
}

/* ── Reduce motion if requested by user (full respect) ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
