/* ============================================================
   polish.css — Micro-interactions, Mobile, Accessibility, Loader
   ============================================================ */

/* ─── Custom Cursor (DISABLED - no JS implementation) ─── */
/*
@media (pointer: fine) {
  * { cursor: none !important; }

  .cursor-dot {
    position: fixed;
    width: 6px; height: 6px;
    background: var(--harvest);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 80ms, background 150ms;
    top: 0; left: 0;
  }

  .cursor-ring {
    position: fixed;
    width: 28px; height: 28px;
    border: 1px solid rgba(200,131,10,0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width 200ms var(--ease-out-expo),
                height 200ms var(--ease-out-expo),
                border-color 200ms;
    top: 0; left: 0;
  }

  body:has(a:hover) .cursor-ring,
  body:has(button:hover) .cursor-ring {
    width: 44px; height: 44px;
    border-color: rgba(200,131,10,0.7);
  }
}
*/

/* ─── Animated Link Underline ─── */
a.animated-link {
  background-image: linear-gradient(var(--harvest), var(--harvest));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--duration-base) var(--ease-out-expo);
  text-decoration: none;
}
a.animated-link:hover { background-size: 100% 1px; }

/* ─── Ticker ─── */
.ticker-wrap {
  overflow: hidden;
  border-top: var(--border-hairline);
  border-bottom: var(--border-hairline);
  padding-block: var(--space-4);
  background: var(--ink-3);
}

.ticker-inner {
  display: flex;
  gap: var(--space-12);
  width: max-content;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--mist);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.ticker-item::after { content: '◆'; color: var(--harvest); font-size: 0.5em; }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Gov Procurement: Credential Chips ─── */
.credential-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-block: var(--space-10);
  border-top: var(--border-hairline);
  border-bottom: var(--border-hairline);
}

.credential-chip {
  padding: var(--space-2) var(--space-5);
  border: var(--border-hairline);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fog);
  letter-spacing: var(--tracking-wide);
  background: var(--ink-3);
}

/* ─── Page Loader ─── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-4);
  transition: opacity var(--duration-slow) var(--ease-out-expo),
              visibility var(--duration-slow);
}

.page-loader.is-loaded { opacity: 0; visibility: hidden; pointer-events: none; }

.page-loader__wordmark {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-style: italic;
  color: var(--white);
  letter-spacing: var(--tracking-snug);
}

.page-loader__bar {
  width: 120px; height: 1px;
  background: var(--ink-4);
  position: relative;
  overflow: hidden;
}

.page-loader__bar::after {
  content: '';
  position: absolute;
  left: -100%; top: 0;
  width: 100%; height: 100%;
  background: var(--harvest);
  animation: loaderBar 1.2s var(--ease-out-expo) forwards;
}

@keyframes loaderBar { to { left: 0; } }

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE OVERRIDES
   Breakpoints: 480 / 640 / 768 / 1024px
═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .hero__instruments { display: none; }
  .hero__text { grid-column: span 12 !important; }
  .component-grid { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-instrument { border-right: none; border-bottom: var(--border-hairline); }
  .stat-instrument:last-of-type { border-bottom: none; }
  .timeline-items { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  [class*="col-md-"] { grid-column: span 12 !important; }
  .hero { min-height: 100svh; padding-bottom: var(--space-16); }
  .hero__coords { display: none; }
  .process-step { grid-template-columns: 60px 1px 1fr; gap: 0 var(--space-4); }
  .stats-section .grid-container { display: flex; flex-direction: column; }
  .config-grid { grid-template-columns: 1fr; }
  .comparison-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparison-table { min-width: 600px; }
  .blog-card { grid-column: span 12 !important; }
  .blog-card--featured .blog-card__inner { min-height: 240px; }
  .rfq-context { order: 2; }
  .rfq-form-col { order: 1; }
  .footer-main { display: flex; flex-direction: column; gap: var(--space-12); }
  .timeline-items { grid-template-columns: 1fr; }
  .timeline-track { display: none; }
  .founder-portrait__frame { aspect-ratio: 4/3; }
}

@media (max-width: 480px) {
  :root { --space-section: 4rem; }
  .eyebrow::before { width: 14px; }
  .form-row--2col { flex-direction: column; }
  .form-radio-group { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 1fr; }
  .process-step__connector { display: none; }
  .config-card--featured::before { left: var(--space-4); }
  .blog-card__title { font-size: var(--text-3xl); }
  .founder-quote { font-size: var(--text-2xl); padding-left: var(--space-5); }
}

/* ═══════════════════════════════════════════
   PERFORMANCE & ACCESSIBILITY
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .cursor-dot, .cursor-ring { display: none; }
  .ticker-inner { animation: none; }
  .page-loader { display: none; }
}

:focus-visible {
  outline: 2px solid var(--harvest);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection { background: rgba(200,131,10,0.25); color: var(--white); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ghost); }

img { max-width: 100%; height: auto; display: block; }
img[loading="lazy"] { opacity: 0; transition: opacity var(--duration-slow); }
img[loading="lazy"].loaded { opacity: 1; }

/* ═══════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════ */
@media print {
  .site-nav, .hero__canvas, .cursor-dot, .cursor-ring,
  .ticker-wrap, .hero__scroll-cue, .nav-drawer, .page-loader { display: none !important; }
  body { background: white; color: black; }
  a { color: black; }
  .rfq-form-panel { border: 1px solid #ccc; }
}
