/* kodakGP — cross-platform polish, smoother scroll, safe-area, motion */

/* iOS/Android polish */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  min-height: 100vh;
  min-height: 100dvh;
}
body,
main {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.footer,
.site-footer {
  padding-bottom: max(30px, env(safe-area-inset-bottom));
}
.kodak-fab,
.toast-host,
#desk-prefs {
  bottom: max(20px, env(safe-area-inset-bottom)) !important;
}

/* Larger tap targets on touch */
@media (pointer: coarse) {
  button,
  .button,
  a.button,
  .btn,
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
  }
  select,
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="password"] {
    min-height: 44px;
    font-size: 16px; /* prevent iOS zoom on focus */
  }
}

/* Smoother momentum scroll for scrollable regions */
main,
.wrap,
.admin-wrap,
.kodak-rail-body,
.rate-board,
.qr-vault-grid {
  -webkit-overflow-scrolling: touch;
}

/* Sticky-safe backdrop for the topbar during scroll */
.nav,
.site-header {
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}

/* Motion — richer entrance for reveals */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.55s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Subtle hover lift for actionable cards */
.lot,
.pay-method,
.qr-vault-card,
.rail-vault-card {
  transition: background 0.22s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.22s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) {
  .lot:hover,
  .pay-method:hover,
  .qr-vault-card:hover,
  .rail-vault-card:hover {
    transform: translateY(-2px);
  }
}

/* Selection color aligned to brand */
::selection {
  background: #d83b32;
  color: #efede7;
}

/* Focus rings — visible + on-brand */
:focus-visible {
  outline: 2px solid #ff6b56;
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Admin orders table */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font: 11px "DM Mono", monospace;
  margin-top: 12px;
}
.orders-table th,
.orders-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(239, 237, 231, 0.08);
  text-align: left;
  vertical-align: top;
}
.orders-table th {
  color: #96938a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 9px;
}
.orders-table td code {
  color: #ff6b56;
}
.orders-empty {
  color: #96938a;
  font: 11px "DM Mono", monospace;
  padding: 14px 0;
}

/* Fix admin card full-width */
.admin-card.full {
  grid-column: 1 / -1;
}

/* Order status pill */
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(216, 59, 50, 0.15);
  color: #ff6b56;
  border: 1px solid rgba(216, 59, 50, 0.35);
  font: 9px "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 8px;
}
.status-pill.paid {
  background: rgba(145, 189, 155, 0.15);
  color: #91bd9b;
  border-color: rgba(145, 189, 155, 0.4);
}

/* Anchor scroll offset for sticky header */
:target {
  scroll-margin-top: 90px;
}

/* Smooth mobile nav dropdown */
.nav nav {
  transition: max-height 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hero rate flicker mitigation */
#hero-rate,
#rate-updated,
#fresh-label {
  transition: color 0.3s ease;
}

/* Sparkline glow on hover */
.rate-board:hover svg path[stroke] {
  filter: drop-shadow(0 0 6px rgba(216, 59, 50, 0.5));
}

/* Prevent text overflow on tiny screens */
@media (max-width: 380px) {
  .mast-copy h1 {
    font-size: 46px !important;
  }
  .rate-number strong {
    font-size: 58px !important;
  }
  .section-head h2 {
    font-size: 42px !important;
  }
}
