/* ══════════════════════════════════════════════════════════════
   lifi-core.css — Homepage design DNA for all sub-pages
   Extracted from homepage inline styles + design token system
   ══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --bg-base: #080b14;
  --bg-elevated: #0d1120;
  --bg-elevated-2: #10162a;
  --bg-panel: #0f1528;
  --text-main: #f0f0ec;
  --text-muted: #9da1b0;
  --text-soft: #cbd0dc;
  --accent-orange: #FE5800;
  --accent-orange-soft: #FF6B35;
  --accent-cyan: #0891B2;
  --accent-green: #10B981;
  --accent-gold: #F59E0B;
  --accent-purple: #7C3AED;
  --border-soft: rgba(255,255,255,0.08);
  --border-deep: rgba(22,27,46,0.5);
  --shadow-soft: 0 22px 44px rgba(3,7,18,0.18);
  --shadow-strong: 0 32px 72px rgba(3,7,18,0.32);
  --radius-lg: 20px;
  --radius-xl: 26px;
}

/* ── Global baseline ── */
html {
  background: var(--bg-base);
  color: var(--text-main);
  font-family: Lexend, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

/* ── Scroll Progress Bar (created by main.js) ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #fe5800, #ff6b35, #0891b2);
  z-index: 1001;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Ambient Floating Dots (created by main.js) ── */
.ambient-dots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(254, 88, 0, 0.35);
  border-radius: 50%;
  animation: ambientFloat var(--dot-dur, 8s) ease-in-out var(--dot-delay, 0s) infinite alternate;
  will-change: transform;
}

.ambient-dot:nth-child(3n) {
  background: rgba(8, 145, 178, 0.3);
  width: 2px;
  height: 2px;
}

.ambient-dot:nth-child(5n) {
  background: rgba(254, 88, 0, 0.2);
  width: 4px;
  height: 4px;
}

@keyframes ambientFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0.3; }
  50%  { opacity: 0.7; }
  100% { transform: translateY(-40px) translateX(12px); opacity: 0.2; }
}

/* ── Back to Top Button (created by main.js) ── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: rgba(13, 17, 32, 0.9);
  border: 1px solid rgba(254, 88, 0, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s, border-color 0.2s;
  z-index: 900;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  background: rgba(254, 88, 0, 0.15);
  border-color: rgba(254, 88, 0, 0.5);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
  transition: stroke 0.2s;
}

.back-to-top:hover svg { stroke: #fe5800; }

/* ── Card Tilt 3D (applied by main.js) ── */
.lifi-tilt-surface {
  transform: perspective(800px) rotateX(var(--card-tilt-x, 0deg)) rotateY(var(--card-tilt-y, 0deg));
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* ── Button Press Micro-interaction (applied by main.js) ── */
.is-pressing {
  transform: scale(0.97) !important;
  transition: transform 0.1s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* ── Section Spacing ── */
.section-shell {
  padding: clamp(60px, 7vw, 92px) 0;
  margin-bottom: 16px;
}

.section-shell.tight { padding-block: clamp(48px, 6vw, 72px); }
.section-shell.flush-top { padding-top: 16px; }

/* ── Image Accent Loading (applied by main.js) ── */
.lf-accent-media {
  overflow: hidden;
  border-radius: 16px;
  position: relative;
}

.lf-accent-ready {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.lf-accent-in {
  opacity: 1;
  transform: none;
}

/* ── Card/Component Entrance (applied by main.js) ── */
.reveal-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-in {
  opacity: 1;
  transform: none;
}

/* ── fadeInUp keyframe ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Consistent Container ── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

/* ── Heading Styles (match homepage section headings) ── */
.page-hero .section-title,
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 12px;
}

.section-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 640px;
}

/* ── Service Cards (match homepage quality) ── */
.service-card,
.example-card,
.work-metric-card {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-base) 100%);
  border: 1px solid rgba(254, 88, 0, 0.1);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 32px);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease;
}

.service-card:hover,
.example-card:hover,
.work-metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(254, 88, 0, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35),
              0 0 0 1px rgba(254, 88, 0, 0.12) inset;
}

.service-card h3,
.service-card .service-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.service-card p,
.service-card .service-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Services Grid ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ── Page Hero (consistent across all pages) ── */
.page-hero {
  padding: clamp(100px, 12vh, 160px) 0 clamp(48px, 6vh, 80px);
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254,88,0,0.12) 30%, rgba(8,145,178,0.08) 70%, transparent);
}

/* ── Breadcrumbs ── */
.breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover { color: var(--accent-orange); }

/* ── Hero Actions (CTA buttons) ── */
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ── Buttons (match homepage premium style) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  min-height: 48px;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-orange);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-orange-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(254, 88, 0, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}

.btn-secondary:hover {
  border-color: rgba(254, 88, 0, 0.3);
  color: var(--accent-orange);
  transform: translateY(-2px);
}

/* ── Stats Image Cards ── */
.stats-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.stats-image-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 280px;
  cursor: pointer;
}

.stats-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.stats-image-card:hover img {
  transform: scale(1.04);
}

.stats-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(8,11,20,0.9) 0%, transparent 100%);
}

.stats-image-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-orange);
  display: block;
}

.stats-image-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.stats-image-kicker {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(8,11,20,0.6);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
}

/* ── Final CTA Section ── */
.final-cta {
  text-align: center;
  padding: 48px 32px;
  border-radius: 20px;
  border: 1px solid rgba(254, 88, 0, 0.15);
  margin-top: 48px;
}

.final-cta h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.final-cta p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── Content Meta / Byline ── */
.content-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-top: 32px;
  text-align: center;
}

/* ── Accent Photo Band (full-bleed image section) ── */
.accent-photo-band {
  padding: 0;
}

.accent-photo-card {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.accent-photo-card img {
  width: 100%;
  height: auto;
  display: block;
}

.accent-photo-card figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(8,11,20,0.85) 0%, transparent 100%);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* ── Interactive Elements: cursor ── */
a, button, [role="button"],
.service-card, .example-card, .industry-map-card,
.faq-item, .faq-question,
.stats-image-card, .work-metric-card {
  cursor: pointer;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .ambient-dot,
  .lf-accent-ready,
  .reveal-ready {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
