/* Shared visual layer that Tailwind utilities can't express cleanly.
   Matched to the Lumóra reference: white/near-black sections, rounded full-bleed
   "sheet" blocks, color supplied by photography rather than a brand accent. */

html {
  scroll-behavior: smooth;
  /* Anchor jumps land below the sticky header. */
  scroll-padding-top: 100px;
}

body {
  background-color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible focus ring on every interactive element — black on light sections,
   flipped to white inside a [data-on-dark] ancestor. */
:focus-visible {
  outline: 2px solid #1A191C;
  outline-offset: 3px;
  border-radius: 2px;
}

[data-on-dark] :focus-visible {
  outline-color: #FFFFFF;
}

/* Wordmark glyph — used in the header + footer only. */
.mark {
  display: inline-flex;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

a:hover .mark {
  transform: rotate(90deg);
}

/* Gradient legibility layer over full-bleed photography (hero, project cards). */
.photo-fade-b {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.7) 22%, rgba(10,10,10,0.3) 48%, transparent 78%);
}

/* Melts the hero photo's sky into the grey title panel above it, as the reference does. */
.hero-fade-t {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, #EDEDEE 0%, rgba(237,237,238,0.55) 8%, rgba(237,237,238,0) 22%);
}

.photo-fade-t {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,10,10,0.55) 0%, transparent 30%);
}

/* Evens out contrast on project-card photos so light UI screenshots read as
   legibly as dark atmospheric photography, without a separate overlay div. */
.card-photo {
  filter: brightness(0.4) saturate(0.85);
}

/* Accordion rows in the Services section. */
.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease;
}

.acc-row[data-open="true"] .acc-body {
  grid-template-rows: 1fr;
  opacity: 1;
}

.acc-body > div {
  overflow: hidden;
}

.acc-plus .acc-v {
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.acc-row[data-open="true"] .acc-plus .acc-v {
  transform: scaleY(0);
}

/* Horizontal drag-to-scroll project carousel (Our Projects). */
[data-carousel] {
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

[data-carousel].is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

[data-carousel-thumb] {
  transition: left 0.1s linear;
}

/* Mobile nav panel, toggled via main.js */
#mobile-nav {
  transform-origin: top;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
}

#mobile-nav[data-open="false"] {
  opacity: 0;
  transform: scaleY(0.96) translateY(-8px);
  pointer-events: none;
}

#mobile-nav[data-open="true"] {
  opacity: 1;
  transform: scaleY(1) translateY(0);
  pointer-events: auto;
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
}

/* FAQ accordion — hide the native marker, turn the plus into a close mark when open. */
.faq summary::-webkit-details-marker { display: none; }
.faq-icon { transition: transform 300ms cubic-bezier(0.34,1.56,0.64,1); }
.faq[open] .faq-icon { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .faq-icon { transition: none; } }

/* Process step visuals — one slow loop per card, transform/opacity only. */
.pv-lens { animation: pv-scan 7s cubic-bezier(0.45,0,0.55,1) infinite alternate; }
@keyframes pv-scan { from { transform: translateX(0); } to { transform: translateX(84px); } }

.pv-pick { transform-box: fill-box; transform-origin: center; animation: pv-pick 2.4s cubic-bezier(0.34,1.56,0.64,1) infinite; }
@keyframes pv-pick { 0%, 100% { opacity: .15; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.pv-mod { animation: pv-mod 4.8s cubic-bezier(0.34,1.56,0.64,1) infinite both; transform-box: fill-box; transform-origin: center; }
@keyframes pv-mod { 0% { opacity: 0; transform: translateY(6px); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.pv-ring { transform-box: view-box; transform-origin: 120px 70px; animation: pv-ring 3.6s ease-out infinite; }
@keyframes pv-ring { 0% { opacity: .15; transform: scale(.85); } 30% { opacity: 1; } 100% { opacity: .15; transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  .pv-lens, .pv-pick, .pv-mod, .pv-ring { animation: none; }
  .pv-pick, .pv-ring { opacity: 1; }
}

/* ---------- Lead form dialog ---------- */
html:has(.lead-dialog[open]) { overflow: hidden; }
.lead-dialog::backdrop { background: rgba(26, 25, 28, 0.45); backdrop-filter: blur(6px); }
.lead-dialog[open] .lead-panel { animation: lead-in 420ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.lead-dialog[open]::backdrop { animation: lead-fade 240ms ease-out; }
@keyframes lead-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes lead-fade { from { opacity: 0; } to { opacity: 1; } }
.lead-step:not([hidden]) { animation: lead-step 320ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes lead-step { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.lead-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lead-progress span { height: 4px; border-radius: 999px; background: #E4E3E1; }
.lead-progress span.is-on { background: #1A191C; }

.lead-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #3A393C; }
.lead-input {
  display: block; width: 100%; border-radius: 16px; border: 1px solid #E4E3E1; background: #F6F6F6;
  padding: 14px 16px; font-size: 15px; line-height: 1.5; color: #1A191C;
}
.lead-input::placeholder { color: #9A9A96; }
.lead-input:hover { border-color: #9A9A96; }
.lead-input:focus { outline: none; border-color: #1A191C; background: #FFFFFF; }
.lead-input[aria-invalid="true"] { border-color: #FF4A1E; }

.lead-chip {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px;
  border-radius: 16px; border: 1px solid #E4E3E1; background: #F6F6F6;
  font-size: 15px; font-weight: 600; color: #3A393C; cursor: pointer; text-align: center;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lead-chip:hover { border-color: #9A9A96; }
.lead-chip:active { transform: scale(0.98); }
.lead-chip:has(input:checked) { background: #1A191C; border-color: #1A191C; color: #FFFFFF; }
.lead-chip:has(input:focus-visible) { outline: 2px solid #1A191C; outline-offset: 3px; }
.lead-group-invalid .lead-chip { border-color: #FF4A1E; }

@media (prefers-reduced-motion: reduce) {
  .lead-dialog[open] .lead-panel, .lead-dialog[open]::backdrop, .lead-step:not([hidden]) { animation: none; }
}
/* `hidden` must win over the layout utilities on form controls. */
#lead-form [hidden] { display: none !important; }

/* ---------- Motion: hero intro, marquee, scroll reveals ---------- */
/* 1. Hero intro — one orchestrated load sequence. */
[data-intro] { animation: intro-up 900ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--d, 0ms); }
[data-intro-img] { animation: intro-img 1400ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both; }
[data-intro-x] { animation: intro-x 700ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--d, 0ms); }
@keyframes intro-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes intro-img { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes intro-x { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

/* 2. Services marquee — endless, pauses on hover. */
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 3 + 4. Scroll reveals — armed by JS only, so content is never hidden without it. */
.reveal-armed [data-reveal] { opacity: 0; transform: translateY(20px); }
.reveal-armed [data-reveal-pop] { transform: translateY(20px) scale(0.96); }
.reveal-armed.is-in [data-reveal] {
  opacity: 1; transform: none;
  transition: opacity 600ms ease-out, transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--i, 0) * 140ms);
}
/* Process visuals only play once their card is revealed and the section is on screen. */
.reveal-armed [data-reveal]:not(.is-playing) :is(.pv-lens, .pv-pick, .pv-mod, .pv-ring, [class^="av-"]),
.reveal-armed:not(.is-visible) :is(.pv-lens, .pv-pick, .pv-mod, .pv-ring, [class^="av-"]) { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  [data-intro], [data-intro-img], [data-intro-x] { animation: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; padding: 0 24px; }
  .marquee-track > [aria-hidden="true"] { display: none; }
  .marquee-track > div { flex-wrap: wrap; justify-content: center; row-gap: 16px; padding-right: 0; }
}

/* Sticky header — a soft shadow fades in once the page has scrolled. */
.sticky-nav::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(26, 25, 28, 0.06), rgba(26, 25, 28, 0));
  opacity: 0; transition: opacity 250ms ease-out;
}
.sticky-nav.is-scrolled::after { opacity: 1; }

/* About visuals — same language as the process cards. */
.av-rise { transform-box: fill-box; transform-origin: center; animation: av-rise 4.2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite both; }
@keyframes av-rise { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 14%, 84% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.av-ping { transform-box: fill-box; transform-origin: center; animation: av-ping 2.1s ease-out infinite; }
@keyframes av-ping { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.5); } }

.av-hand { transform-box: view-box; transform-origin: 120px 70px; animation: av-turn 6s linear infinite; }
.av-hand-slow { transform-box: view-box; transform-origin: 120px 70px; animation: av-turn 72s linear infinite; }
@keyframes av-turn { to { transform: rotate(360deg); } }

.av-gather { animation: av-gather 5.2s cubic-bezier(0.65, 0, 0.35, 1) infinite both; }
@keyframes av-gather { 0%, 22% { transform: none; } 55%, 88% { transform: translate(var(--tx), var(--ty)); } 100% { transform: none; } }
.av-cut { transform-box: fill-box; transform-origin: center; animation: av-cut 5.2s ease-in-out infinite both; }
@keyframes av-cut { 0%, 12% { opacity: 1; transform: none; } 30%, 92% { opacity: 0; transform: scale(.2); } 100% { opacity: 1; transform: none; } }

.av-left { animation: av-left 4.8s cubic-bezier(0.65, 0, 0.35, 1) infinite alternate; }
.av-right { animation: av-right 4.8s cubic-bezier(0.65, 0, 0.35, 1) infinite alternate; }
@keyframes av-left { from { transform: translateX(-10px); } to { transform: none; } }
@keyframes av-right { from { transform: translateX(10px); } to { transform: none; } }
.av-lens { animation: av-lens 4.8s cubic-bezier(0.65, 0, 0.35, 1) infinite alternate; }
@keyframes av-lens { from { opacity: .15; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  [class^="av-"] { animation: none !important; }
  .av-ping { opacity: 0; }
}
