/* ════════════════════════════════════════════════════════
   LAVACK DESIGN — Tier A Enhancement Layer (awwwards-style)
   Shared across all pages. Loaded in <head>.
   Pairs with assets/tier-a.js — safe if JS never runs.
   ════════════════════════════════════════════════════════ */

/* ── Page Transition: entrance ─────────────────────────────
   html.pt-in is set by a tiny inline <script> in <head> only
   when the previous page initiated a transition. tier-a.js
   fades the body in and removes the class. The keyframe
   fallback guarantees the page becomes visible even if the
   JS fails to run (fires after 1.2s). */
html.pt-in body {
  opacity: 0;
  animation: lvk-pt-fallback 0.4s ease 1.2s forwards;
}
@keyframes lvk-pt-fallback {
  to { opacity: 1; }
}

/* ── Page Transition: exit overlay ─────────────────────────
   Injected by tier-a.js. Wipes up from the bottom, then the
   browser navigates. Accent edge gives it the brand stamp. */
.pt-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #050505;
  transform: translateY(101%);
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
  will-change: transform;
}
.pt-overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: #00aeef;
}
.pt-overlay.active {
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Magnetic buttons ──────────────────────────────────────
   When JS drives the magnetic pull it adds .is-magnetic and
   owns the transform. CSS transform transitions must get out
   of the way or every GSAP update gets re-eased by CSS. */
.is-magnetic {
  transition-property: color, background-color, border-color, box-shadow !important;
}

/* ── Footer meta: local time + availability ───────────────── */
.lvk-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #555;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.lvk-meta .lvk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: lvk-pulse 2.4s ease-in-out infinite;
}
.lvk-meta .lvk-sep {
  color: #333;
}
.lvk-meta time {
  color: #888;
  font-variant-numeric: tabular-nums;
}
@keyframes lvk-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* ── Footer ambient visual ─────────────────────────────────
   AI-generated cyan-ink artwork (images/footer-ambient.jpg)
   injected by tier-a.js behind the big footer CTA. Masked so
   it fades in from the top; a very slow drift keeps it alive. */
.lvk-footer-ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 82%, rgba(0,0,0,0.25) 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 82%, rgba(0,0,0,0.25) 100%);
  animation: lvk-ambient-drift 45s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes lvk-ambient-drift {
  from { transform: scale(1) translateX(0); }
  to   { transform: scale(1.08) translateX(-2.5%); }
}

/* ════════════════════════════════════════════════════════
   PRESS PROOF — paper-and-ink direction (2026-07)
   Black is INK, applied in plates (hero/footer); the body of
   each page is warm PAPER. Add .section-paper to any section
   to put it on paper; these overrides re-ink the dark-first
   utility classes used across the site.
   ════════════════════════════════════════════════════════ */
.section-paper {
  background: #EFDED9 !important;
  color: #0A0A0A;
  position: relative;
}

/* Headline + display type on paper */
.section-paper .section-title,
.section-paper h2, .section-paper h3, .section-paper h4 { color: #0A0A0A; }
.section-paper .text-warm { color: #0A0A0A !important; }
.section-paper .text-white { color: #0A0A0A !important; }
.section-paper [class*="text-white/"] { color: rgba(10, 10, 10, 0.72) !important; }

/* Muted copy: annotation gray-brown instead of dark-mode grays */
.section-paper [class*="text-[#aaa]"], .section-paper [class*="text-[#999]"],
.section-paper [class*="text-[#888]"], .section-paper [class*="text-[#777]"],
.section-paper [class*="text-[#666]"], .section-paper [class*="text-[#555]"],
.section-paper [class*="text-[#ccc]"], .section-paper [class*="text-[#bbb]"] {
  color: #6B615C !important;
}

/* Surfaces & rules: pressed-paper cards, ink hairlines */
.section-paper [class*="bg-white/"] { background-color: #E6D2CB !important; }
.section-paper [class*="bg-[#0"], .section-paper [class*="bg-[#1"] { background-color: #E6D2CB !important; }
.section-paper [class*="border-white/"] { border-color: rgba(10, 10, 10, 0.14) !important; }
.section-paper .h-rule { background: linear-gradient(90deg, transparent, rgba(10, 10, 10, 0.25), transparent); }

/* Service list rows on paper */
.section-paper .service-card { border-bottom-color: rgba(10, 10, 10, 0.15); }
.section-paper .service-card:hover { background: rgba(0, 174, 239, 0.06); }
.section-paper .service-name { color: #0A0A0A; }
.section-paper .service-name:hover { color: #0A0A0A; }
.section-paper .service-num { color: #8F8378; }
.section-paper .service-desc { color: #6B615C; }

/* Buttons on paper: ink outline, cyan stamp on hover (CSS ::before fill stays) */
.section-paper .magnetic-btn { color: #0A0A0A; border-color: rgba(10, 10, 10, 0.35) !important; }

/* Cyan on paper: #005F85 (5.4:1) for small labels, #0077A8 (3.8:1,
   passes large-text AA) for big display accents. Brand cyan #00aeef
   is 1.9:1 on paper — never use it for text there. */
.section-paper .section-label { color: #005F85; }
.section-paper .text-accent { color: #0077A8 !important; }
.section-paper .draft-ink .text-accent,
.section-paper .draft-ink.inked .text-accent { color: #0077A8 !important; }
.section-paper .trust-badge {
  color: #005F85 !important;
  border-color: rgba(0, 95, 133, 0.35) !important;
  background: rgba(0, 119, 168, 0.08) !important;
}
.section-paper .text-green-400 { color: #166534 !important; }

/* Form fields on paper (contact page) */
.section-paper .form-input {
  color: #0A0A0A;
  border-bottom-color: rgba(10, 10, 10, 0.3);
}
.section-paper .form-input:focus { border-bottom-color: #0077A8; }
.section-paper .form-input::placeholder { color: #8F8378; }

/* FAQ accordions and custom cards inherit ink hairlines on paper */
.section-paper details, .section-paper .value-card { border-color: rgba(10, 10, 10, 0.15); }

/* Crop marks — print furniture on every paper plate */
.section-paper::before,
.section-paper::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  opacity: 0.45;
}
.section-paper::before {
  top: 14px; left: 14px;
  border-top: 1px solid #0A0A0A;
  border-left: 1px solid #0A0A0A;
}
.section-paper::after {
  bottom: 14px; right: 14px;
  border-bottom: 1px solid #0A0A0A;
  border-right: 1px solid #0A0A0A;
}

/* Draft-to-ink headline reveal: headlines enter as a cyan
   keyline outline and fill to solid ink. Classes are applied
   by tier-a.js only (no JS = solid type, zero risk). */
.draft-ink {
  -webkit-text-stroke: 1.2px #00aeef;
  color: transparent !important;
  transition: color 0.55s ease 0.05s, -webkit-text-stroke-color 0.55s ease 0.35s;
}
.draft-ink.inked {
  color: #0A0A0A !important;
  -webkit-text-stroke-color: transparent;
}
.draft-ink.inked .text-accent, .draft-ink .text-accent { -webkit-text-stroke: 0; color: #00aeef !important; }

/* Scroll progress bar: cyan-into-magenta (CMYK language) */
.scroll-progress { background: linear-gradient(90deg, #00aeef, #EC008C) !important; }

/* ════════════════════════════════════════════════════════
   ACCESSIBILITY LAYER (2026-07 audit fixes)
   ════════════════════════════════════════════════════════ */

/* Keyboard focus: visible ring everywhere (pages ship none) */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #00aeef !important;
  outline-offset: 3px;
}
.section-paper a:focus-visible, .section-paper button:focus-visible,
.section-paper summary:focus-visible, .section-paper input:focus-visible,
.section-paper textarea:focus-visible {
  outline-color: #005F85 !important;
}
.form-input:focus { border-bottom-width: 2px !important; }

/* Service-interest checkboxes: pages set display:none which removes
   them from keyboard/AT. Visually-hidden-but-focusable instead. */
.service-checkbox {
  display: inline-block !important;
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.service-checkbox:focus-visible + label {
  outline: 2px solid #00aeef;
  outline-offset: 3px;
}
.section-paper .service-checkbox:focus-visible + label { outline-color: #005F85; }

/* Floating CTA: keep out of the tab order while invisible */
.floating-cta:not(.visible) { visibility: hidden; }

/* Reel pause/play control (injected by tier-a.js) */
.lvk-reel-toggle {
  position: absolute;
  bottom: 14px; right: 14px;
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.lvk-reel-toggle:hover { background: rgba(0, 174, 239, 0.85); }

/* ── Hero drift: slow Ken-Burns on hero backgrounds ─────────
   Guarantees the hero never reads as a still image, on top of
   whatever motion the video itself carries. */
.hero-video {
  animation: lvk-hero-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes lvk-hero-drift {
  from { transform: scale(1) translateX(0); }
  to   { transform: scale(1.08) translateX(-1.5%); }
}

/* ── Reduced motion: neutralize the whole layer ───────────── */
@media (prefers-reduced-motion: reduce) {
  html.pt-in body { opacity: 1; animation: none; }
  .pt-overlay { display: none; }
  .lvk-meta .lvk-dot { animation: none; }
  .lvk-footer-ambient { animation: none; }
  .draft-ink { -webkit-text-stroke: 0; color: inherit !important; transition: none; }
  .hero-video { animation: none; }
}
