/* style-flair.css — additive polish/motion layer on top of style.css.
   Remove the <link> for this file to revert to the classic look.
   Designed to be additive only: every rule either adds motion/depth or
   refines an existing element. No layout repositioning. */

/* ── Motion vocabulary ────────────────────────────────────────────── */
:root {
  --ease: cubic-bezier(.2, .9, .25, 1);
  --t-fast: 140ms;
  --t-med: 260ms;
  --t-slow: 420ms;
}

/* Honor users who don't want motion. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Sticky header gets glass + lifts a shadow when you scroll ──── */
.site-header {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
          backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(20, 42, 32, 0.06);
  transition: box-shadow var(--t-med) var(--ease),
              background var(--t-med) var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 10px 30px -18px rgba(20, 42, 32, 0.35);
  background: rgba(255, 255, 255, 0.92);
}

/* Animated underline on nav links */
.main-nav a {
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 2px;
  background: var(--brass, #b8893c);
  transition: right var(--t-med) var(--ease);
}
.main-nav a:hover::after { right: 0; }

/* ── Buttons get a subtle press + lift ───────────────────────────── */
.btn {
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-med) var(--ease),
              background-color var(--t-fast) var(--ease),
              filter var(--t-fast) var(--ease);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -10px rgba(20, 42, 32, 0.45);
  filter: brightness(1.04);
}
.btn:active { transform: translateY(0); filter: brightness(.96); }

/* ── Cards lift on hover ─────────────────────────────────────────── */
.pc, .product-card, .tier-card, .value-card, .faq, .qr-photo, .quote-row,
.lot-card, .panel-card {
  transition: transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.pc:hover, .product-card:hover, .tier-card:hover, .value-card:hover,
.lot-card:hover, .panel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -22px rgba(20, 42, 32, 0.4);
}

/* Photo zoom on product/lot hover */
.qr-photo, .pc-photo, .product-photo {
  overflow: hidden;
}
.qr-photo, .pc-photo, .product-photo,
.qr-photo > *, .pc-photo > *, .product-photo > * {
  transition: transform var(--t-slow) var(--ease);
}
.pc:hover .pc-photo, .product-card:hover .product-photo,
.quote-row:hover .qr-photo { transform: scale(1.03); }

/* ── Hero gets a soft animated gradient overlay ──────────────────── */
.page-head {
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: '';
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 15% 0%, rgba(184, 137, 60, 0.10), transparent 60%),
    radial-gradient(45% 70% at 95% 20%, rgba(70, 130, 90, 0.10), transparent 60%);
  z-index: 0;
  animation: heroBreath 14s ease-in-out infinite alternate;
}
.page-head > * { position: relative; z-index: 1; }
@keyframes heroBreath {
  from { transform: translate3d(-1%, 0, 0) scale(1); opacity: .9; }
  to   { transform: translate3d(2%, 1%, 0) scale(1.06); opacity: 1; }
}

/* ── Scroll-triggered fade/rise (paired with js/flair.js) ───────── */
.flair-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease),
              transform var(--t-slow) var(--ease);
  will-change: opacity, transform;
}
.flair-reveal.visible {
  opacity: 1;
  transform: none;
}
/* Stagger children within a revealed group */
.flair-reveal.visible > * {
  animation: flairRiseIn var(--t-slow) var(--ease) both;
}
.flair-reveal.visible > *:nth-child(2) { animation-delay: 60ms; }
.flair-reveal.visible > *:nth-child(3) { animation-delay: 120ms; }
.flair-reveal.visible > *:nth-child(4) { animation-delay: 180ms; }
.flair-reveal.visible > *:nth-child(5) { animation-delay: 240ms; }
.flair-reveal.visible > *:nth-child(6) { animation-delay: 300ms; }
@keyframes flairRiseIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── Compliance bar gets a quieter, classier treatment ──────────── */
.compliance-bar {
  letter-spacing: 0.02em;
  background: linear-gradient(90deg,
    rgba(20, 42, 32, 0.95),
    rgba(20, 42, 32, 0.8) 50%,
    rgba(20, 42, 32, 0.95));
}

/* ── Quote count badge pulses softly when it changes ────────────── */
.quote-count {
  transition: transform var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.quote-count.bumped {
  animation: bump 360ms var(--ease);
}
@keyframes bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ── Footer link hover wakes up too ─────────────────────────────── */
.site-footer a {
  transition: color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
  display: inline-block;
}
.site-footer a:hover { transform: translateX(2px); }

/* ── Page-level fade on load so first paint feels alive ─────────── */
main, .section, .page-head {
  animation: pageFadeIn var(--t-slow) var(--ease) both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── COA / image modal ──────────────────────────────────────────── */
.coa-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 18, 12, 0.78);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: coaFade var(--t-med) var(--ease) both;
}
@keyframes coaFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.coa-modal-card {
  background: #fff;
  border-radius: 10px;
  max-width: min(900px, 96vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  animation: coaPop var(--t-slow) var(--ease) both;
}
@keyframes coaPop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.coa-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(20, 42, 32, 0.1);
  background: #faf8f4;
}
.coa-modal-title { font-weight: 600; color: #2a5a3a; }
.coa-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #6f7c72;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background var(--t-fast) var(--ease);
}
.coa-modal-close:hover { background: rgba(20, 42, 32, 0.08); color: #2a5a3a; }
.coa-modal-body {
  flex: 1;
  overflow: auto;
  padding: 12px;
  background: #f4f1ea;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.coa-modal-body img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 10px 30px -16px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  display: block;
}
.coa-modal-foot {
  padding: 10px 16px;
  border-top: 1px solid rgba(20, 42, 32, 0.1);
  background: #faf8f4;
  text-align: right;
}
body.modal-open { overflow: hidden; }
