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

:root {
  --bg: #02040a;
  --bg-deep: #050b17;
  --surface: rgba(5, 12, 25, 0.4);
  --surface-strong: rgba(6, 14, 28, 0.7);
  --line: rgba(110, 172, 255, 0.15);
  --line-strong: rgba(104, 188, 255, 0.3);
  --text: #eff6ff;
  --muted: #8ca3be;
  --blue: #1898ff;
  --blue-bright: #63c6ff;
  --blue-glow: rgba(24, 152, 255, 0.4);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --radius: 20px;
  --container: 1400px;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

* {
  box-sizing: border-box;
  cursor: none !important; /* Custom cursor */
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Effects */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: 
    radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(24, 152, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 12%, rgba(0, 181, 255, 0.05), transparent 30%),
    radial-gradient(circle at 10% 80%, rgba(10, 68, 145, 0.1), transparent 30%),
    var(--bg-deep);
  transition: background 0.1s ease;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.03;
  pointer-events: none;
  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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Grid Lines Overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: 
    linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
  background-size: 100px 100px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 10%, rgba(0,0,0,0) 70%);
}

/* Custom Cursor */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--blue-bright);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
}
#custom-cursor.hovering {
  width: 50px;
  height: 50px;
  background-color: rgba(99, 198, 255, 0.1);
  border-color: rgba(99, 198, 255, 0.5);
  backdrop-filter: blur(2px);
}
#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  background-color: var(--blue-bright);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
}

/* Typography */
h1, h2, h3, h4, .syne {
  font-family: 'Syne', sans-serif;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 7vw, 6.5rem); font-weight: 700; text-transform: uppercase; }
h2 { font-size: clamp(2.2rem, 4vw, 4rem); font-weight: 700; text-transform: uppercase; }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); font-weight: 600; }

p { color: var(--muted); }
a { color: inherit; text-decoration: none; }

/* Layout Shell */
.page-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

/* Header */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 4rem);
  max-width: var(--container);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(2, 5, 12, 0.6);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: all 0.4s ease;
}
.site-header.scrolled {
  top: 0.5rem;
  padding: 0.8rem 2rem;
  background: rgba(2, 5, 12, 0.85);
  border-color: var(--line-strong);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 1.2rem;
  text-transform: uppercase;
}
.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--blue), transparent);
  border: 1px solid var(--blue-bright);
  border-radius: 10px;
  box-shadow: 0 0 15px var(--blue-glow);
  color: #fff;
}

.site-nav {
  display: flex;
  gap: 2.5rem;
}
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  transition: color 0.3s;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--blue-bright);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--text);
}
.site-nav a:hover::after, .site-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Glass Cards / Angle Frames */
.glass-card {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 30, 56, 0.4) 0%, rgba(6, 12, 24, 0.6) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3rem;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(99, 198, 255, 0.06), transparent 40%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s;
}
.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 198, 255, 0.4);
  box-shadow: 0 15px 40px rgba(24, 152, 255, 0.15);
}
.glass-card:hover::before {
  opacity: 1;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.5rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  border-radius: 100px;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border: none;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover {
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 10px 30px var(--blue-glow);
}
.btn-primary:hover::before {
  opacity: 1;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-outline:hover {
  border-color: var(--blue-bright);
  background: rgba(24, 152, 255, 0.1);
  transform: scale(1.05);
}

/* Specific Sections */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
  position: relative;
}
.hero-content {
  max-width: 900px;
  z-index: 10;
}
.eyebrow {
  display: inline-block;
  color: var(--blue-bright);
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--blue-glow);
  border-radius: 100px;
  background: rgba(24, 152, 255, 0.05);
}
.hero p.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  max-width: 700px;
  margin-top: 2rem;
  color: #b5cadd;
}

/* Animated Title */
.title-reveal span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) rotate(5deg);
  animation: textReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes textReveal {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* Stats / Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: -3rem;
  z-index: 10;
  position: relative;
}
.metric {
  text-align: left;
  padding: 2.5rem;
}
.metric-num {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 800;
  color: var(--blue-bright);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.metric-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 8rem 0;
  position: relative;
}
.section-header {
  margin-bottom: 5rem;
  max-width: 800px;
}

/* Feature Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.bento-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.bento-card.large {
  grid-column: span 2;
}
.bento-card .icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: rgba(24, 152, 255, 0.1);
  border: 1px solid rgba(24, 152, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: var(--blue-bright);
}
.bento-card .icon svg {
  width: 30px; height: 30px;
}
.bento-card h3 {
  margin-bottom: 1rem;
}

/* Portfolio Layout */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
.portfolio-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.portfolio-item:nth-child(even) {
  direction: rtl;
}
.portfolio-item:nth-child(even) > * {
  direction: ltr;
}
.portfolio-visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: linear-gradient(45deg, rgba(24,152,255,0.1), rgba(2,5,12,0.8));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.portfolio-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20z' fill='%231898ff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.portfolio-content h3 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}
.tag-list {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--blue-bright);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 5rem 0 2rem;
  margin-top: 5rem;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 5rem;
}
.footer-col h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: #fff;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
}
.footer-col ul li {
  margin-bottom: 1rem;
}
.footer-col ul li a {
  color: var(--muted);
  transition: color 0.3s;
}
.footer-col ul li a:hover {
  color: var(--blue-bright);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Responsive */
@media (hover: none) and (pointer: coarse) {
  * { cursor: auto !important; }
  #custom-cursor, #cursor-dot { display: none !important; }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}
.menu-toggle svg { width: 30px; height: 30px; }

@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 2rem;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card.large {
    grid-column: span 1;
  }
  .portfolio-item {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .portfolio-item:nth-child(even) {
    direction: ltr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .page-shell {
    padding: 0 1.2rem;
  }
  .site-header {
    width: calc(100% - 2rem);
    padding: 1rem 1.5rem;
  }
  .logo {
    font-size: 1rem;
  }
  .logo-mark {
    width: 35px;
    height: 35px;
  }
  .menu-toggle {
    display: block;
  }
  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(2, 5, 12, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
  }
  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav a {
    font-size: 1.5rem;
  }
  .hero {
    padding-top: 10rem;
    min-height: auto;
    padding-bottom: 5rem;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Legal Pages */
.doc-layout {
  padding-top: 12rem;
  padding-bottom: 8rem;
  max-width: 800px;
  margin: 0 auto;
}
.doc-header {
  margin-bottom: 4rem;
}
.doc-body section {
  margin-bottom: 3rem;
}
.doc-body h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #fff;
}
.doc-body p, .doc-body ul {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.doc-body ul {
  padding-left: 1.5rem;
  color: var(--muted);
}
.doc-body li {
  margin-bottom: 0.5rem;
}
