/*
Theme Name: Lapis Creative
Author: Lapis Studio
Description: Portfolio & Creative Agency Theme với hiệu ứng hiện đại, tối ưu tốc độ cao.
Version: 1.0.0
Text Domain: lapis-creative
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Syne:wght@600;700;800&display=swap');

:root {
  --bg-obsidian: #05070e;
  --bg-surface: rgba(15, 22, 42, 0.55);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.45);
  --lapis-primary: #2563eb;
  --lapis-bright: #3b82f6;
  --lapis-cyan: #38bdf8;
  --lapis-gold: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-obsidian);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  background: radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.16), transparent 40%),
              radial-gradient(circle at 85% 60%, rgba(56, 189, 248, 0.10), transparent 45%),
              var(--bg-obsidian);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Hiệu ứng nhiễu hạt (Film Grain) chuẩn Awwwards */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Con trỏ phát sáng nhẹ */
.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Floating Glass Header */
.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1232px;
  z-index: 1000;
  background: rgba(8, 12, 24, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.35s ease;
}

.brand-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-gem {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--lapis-cyan), var(--lapis-primary));
  transform: rotate(45deg);
  border-radius: 3px;
  box-shadow: 0 0 16px var(--lapis-bright);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Magnetic Button */
.btn-lapis {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lapis-primary), #1d4ed8);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
  cursor: pointer;
}

.btn-lapis:hover {
  box-shadow: 0 12px 35px rgba(56, 189, 248, 0.5);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--border-glass);
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 160px 0 100px;
  position: relative;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-size: 64px 64px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
  z-index: 1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--lapis-cyan);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lapis-cyan);
  box-shadow: 0 0 10px var(--lapis-cyan);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6.5vw, 5.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.text-gradient {
  background: linear-gradient(120deg, #ffffff 15%, var(--lapis-cyan) 55%, var(--lapis-bright) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 620px;
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 42px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* Infinite Marquee */
.marquee-wrapper {
  padding: 28px 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(10, 15, 30, 0.4);
  overflow: hidden;
  display: flex;
  user-select: none;
}

.marquee-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: marqueeScroll 28s linear infinite;
}

.marquee-item {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  gap: 48px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.marquee-item span {
  color: var(--lapis-cyan);
  font-size: 0.9rem;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Section Headers */
.section-block {
  padding: 120px 0;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--lapis-cyan);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

/* Bento Portfolio Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

.project-card {
  position: relative;
  border-radius: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease;
  text-decoration: none;
  color: inherit;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.14), transparent 40%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 3;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
}

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }

.project-media {
  width: 100%;
  height: 360px;
  overflow: hidden;
  position: relative;
  background: #0b1120;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-media img {
  transform: scale(1.06);
}

.project-info {
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  position: relative;
  z-index: 4;
}

.project-cat {
  font-size: 0.8rem;
  color: var(--lapis-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  display: block;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.project-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.project-card:hover .project-arrow {
  background: var(--lapis-primary);
  border-color: var(--lapis-primary);
  transform: rotate(45deg);
}

/* Services Interactive List */
.service-list {
  border-top: 1px solid var(--border-glass);
}

.service-row {
  padding: 34px 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  transition: all 0.35s ease;
}

.service-row:hover {
  background: rgba(37, 99, 235, 0.06);
  padding-left: 32px;
}

.service-num {
  font-family: var(--font-display);
  color: var(--lapis-cyan);
  font-size: 1rem;
  font-weight: 700;
  min-width: 48px;
}

.service-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 700;
  flex: 1;
}

.service-desc {
  max-width: 420px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Metrics Bar */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.metric-box {
  padding: 36px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
}

.metric-val {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--lapis-cyan);
  line-height: 1.1;
  margin-bottom: 8px;
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer CTA */
.site-footer {
  padding: 120px 0 48px;
  border-top: 1px solid var(--border-glass);
  background: linear-gradient(to top, rgba(37, 99, 235, 0.12), transparent);
}

.footer-cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 36px;
}

.footer-bottom {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .span-7, .span-5 { grid-column: span 12; }
  .nav-links { display: none; }
  .service-row { flex-direction: column; align-items: flex-start; }
  .metrics-grid { grid-template-columns: 1fr; }
}
