/* ==========================================================================
   REVIFY — polish.css
   Fine detail pass — layered last to override component defaults
   ========================================================================== */

/* --------------------------------------------------------------------------
   Scroll progress bar — thin gold line under the nav
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 80ms linear;
  pointer-events: none;
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   Subtle page-load ease-in — prevents jarring flash of unstyled content
   -------------------------------------------------------------------------- */
@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
main { animation: pageIn 480ms var(--ease) both; }

/* --------------------------------------------------------------------------
   Hero — add subtle gradient mesh behind the headline
   -------------------------------------------------------------------------- */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(201, 169, 97, 0.035) 0%, transparent 60%);
  z-index: 1;
}

/* Hero headline micro-animation — italic "you" gets a gentle shimmer on page load */
@keyframes heroIn {
  0%   { opacity: 0; transform: translateY(14px); letter-spacing: -0.02em; }
  60%  { letter-spacing: -0.04em; }
  100% { opacity: 1; transform: none; letter-spacing: -0.04em; }
}

.hero__headline {
  animation: heroIn 1100ms var(--ease) both;
  animation-delay: 180ms;
}

.hero__meta {
  animation: pageIn 900ms var(--ease) both;
  animation-delay: 520ms;
}

/* --------------------------------------------------------------------------
   Italic text subtle "opsz" axis breathing — very subtle
   -------------------------------------------------------------------------- */
em, i, .hero__headline em {
  transition: font-variation-settings 400ms var(--ease);
}

/* On hover over a headline with italic, feel it open slightly */
h1:hover em, h2:hover em {
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 320;
}

/* --------------------------------------------------------------------------
   Cards — soft inner highlight on hover
   -------------------------------------------------------------------------- */
.card::after,
.tier::after,
.service-cell::after,
.principle::after,
.work-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%);
  opacity: 0;
  transition: opacity 420ms var(--ease);
}

.card:hover::after,
.tier:hover::after,
.service-cell:hover::after,
.principle:hover::after,
.work-item:hover::after {
  opacity: 1;
}

.service-cell, .principle {
  position: relative;
}

/* --------------------------------------------------------------------------
   Tier — featured gets a slow shimmer
   -------------------------------------------------------------------------- */
.tier--featured {
  position: relative;
  overflow: hidden;
}

.tier--featured::before {
  content: "";
  position: absolute;
  top: -100%; left: -100%;
  width: 300%; height: 300%;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(201, 169, 97, 0.06) 50%,
    transparent 60%
  );
  pointer-events: none;
  animation: shimmer 6.5s linear infinite;
}

@keyframes shimmer {
  0%   { transform: translate(-30%, -30%); }
  100% { transform: translate(30%, 30%); }
}

/* --------------------------------------------------------------------------
   Nav — tiny luminance increase for brand dot on hover
   -------------------------------------------------------------------------- */
.nav__brand:hover span {
  box-shadow: 0 0 12px rgba(201, 169, 97, 0.6);
  transition: box-shadow 360ms var(--ease);
}

.nav__brand span {
  transition: box-shadow 360ms var(--ease);
}

/* --------------------------------------------------------------------------
   Smooth scrollbar (Webkit) — quiet and gold
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 97, 0.18);
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 169, 97, 0.35);
}

/* Firefox */
html {
  scrollbar-color: rgba(201, 169, 97, 0.25) var(--bg);
  scrollbar-width: thin;
}

/* --------------------------------------------------------------------------
   Link underline — refined keyboard-friendly style
   -------------------------------------------------------------------------- */
main p a:not(.btn):not(.arrow-link),
.legal a {
  border-bottom: 1px solid var(--line-gold);
  color: var(--gold-soft);
  transition: border-color 260ms var(--ease), color 260ms var(--ease);
}

main p a:not(.btn):not(.arrow-link):hover,
.legal a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* --------------------------------------------------------------------------
   Mobile refinements
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  :root {
    --gutter: 1.25rem;
    --nav-h: 4rem;
  }

  .hero {
    min-height: auto;
    padding: 3.5rem 0 4.5rem;
  }

  .hero__headline {
    font-size: clamp(2.75rem, 12vw, 5rem);
    line-height: 0.96;
  }

  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; min-width: 12rem; }

  .page-header { padding: 3.5rem 0 2.5rem; }
  .page-header h1 { font-size: clamp(2.25rem, 10vw, 3.5rem); }

  .process-step {
    padding: 2rem 0;
  }

  .pricing__grid { gap: 0.875rem; }
  .tier { padding: 1.75rem 1.75rem 2rem; }
  .tier__rate { font-size: 2.75rem; }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer__brand { font-size: 2.75rem; }

  .manifesto__body p {
    font-size: 1.4rem;
    line-height: 1.25;
  }

  .services__grid { grid-template-columns: 1fr; }

  .pull-quote p { font-size: 2rem; }

  .final-cta h2 { font-size: clamp(2.25rem, 10vw, 3rem); }
}

/* --------------------------------------------------------------------------
   Very wide screens — avoid content stretching uncomfortably
   -------------------------------------------------------------------------- */
@media (min-width: 1900px) {
  :root { --max: 1400px; }

  .hero__headline {
    font-size: 8rem;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion — hard disable decorative animations
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero__headline,
  .hero__meta,
  main,
  .tier--featured::before {
    animation: none !important;
  }

  .reveal, .reveal-child > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .ticker__track {
    animation: none !important;
  }

  * {
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   High-contrast / forced-colors
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
  :root {
    --gold: Highlight;
    --text: CanvasText;
    --bg: Canvas;
  }
  .grain, .glow { display: none !important; }
}

/* --------------------------------------------------------------------------
   Touch target sanity
   -------------------------------------------------------------------------- */
@media (pointer: coarse) {
  .btn, .nav__cta, .arrow-link, .faq-item summary {
    min-height: 2.75rem;
  }
}

/* --------------------------------------------------------------------------
   Improve button active state
   -------------------------------------------------------------------------- */
.btn:active {
  transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   Final detail: gold accent underline under h2 page-header
   -------------------------------------------------------------------------- */
.page-header h1 {
  position: relative;
}

/* --------------------------------------------------------------------------
   Nav brand micro-tuning
   -------------------------------------------------------------------------- */
.nav__brand {
  transition: transform 320ms var(--ease);
}
.nav__brand:hover {
  transform: translateX(-1px);
}
