/* ===== A to Z Residential — modern/futuristic ===== */
:root {
  --bg: #0a0a0c;
  --bg-2: #111114;
  --fg: #f6f6f8;
  --muted: #8a8a92;
  --line: rgba(255,255,255,0.10);
  --line-2: rgba(255,255,255,0.18);
  --blue: oklch(0.66 0.17 248);
  --blue-2: oklch(0.78 0.15 248);
  --blue-glow: oklch(0.66 0.17 248 / 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-feature-settings: 'ss01' on, 'ss02' on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: 'zero' on; }

/* Grain overlay */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 200;
  transform: translate3d(-100px,-100px,0);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 14px var(--blue-glow);
  transition: transform 0.08s var(--ease-out), width 0.25s var(--ease), height 0.25s var(--ease);
}
.cursor-ring {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.45);
  transition: transform 0.18s var(--ease-out), width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.cursor-ring.hover {
  width: 64px; height: 64px; border-color: var(--blue);
  background: color-mix(in oklab, var(--blue) 8%, transparent);
}
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  transition: background 0.45s var(--ease), backdrop-filter 0.45s var(--ease), border-color 0.45s var(--ease), padding 0.45s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 14px 40px;
  background: rgba(10,10,12,0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { height: 44px; width: auto; transition: height 0.4s var(--ease); }
.nav.scrolled .nav-logo img { height: 36px; }
.nav-logo .tag {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); border-left: 1px solid var(--line-2);
  padding-left: 14px; line-height: 1.4;
}
.nav-logo .tag b { color: var(--fg); font-weight: 500; display: block; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; padding: 10px 16px;
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg); opacity: 0.85;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-link:hover { opacity: 1; }
.nav-link .num {
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  color: var(--blue); margin-right: 6px; opacity: 0.8;
}
.nav-link::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 4px;
  height: 1px; background: var(--blue); transform-origin: left;
  transform: scaleX(0); transition: transform 0.45s var(--ease-out);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-services { position: relative; }
.nav-services .caret {
  display: inline-block; margin-left: 6px; font-size: 10px;
  transition: transform 0.3s var(--ease);
}
.nav-services:hover .caret, .nav-services.open .caret { transform: rotate(180deg); }
.services-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -8px);
  min-width: 360px; padding: 14px; pointer-events: none; opacity: 0;
  background: rgba(14,14,18,0.92); backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02) inset;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease-out);
}
.nav-services:hover .services-menu, .nav-services.open .services-menu {
  pointer-events: auto; opacity: 1; transform: translate(-50%, 0);
}
.service-item {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: 10px; transition: background 0.3s var(--ease);
}
.service-item:hover { background: rgba(255,255,255,0.04); }
.service-item .ico {
  width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid var(--line-2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.service-item:hover .ico { border-color: var(--blue); background: color-mix(in oklab, var(--blue) 10%, transparent); }
.service-item .title {
  font-size: 14px; letter-spacing: 0.02em; font-weight: 500;
}
.service-item .sub {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em;
}
.service-item .arrow { margin-left: auto; color: var(--muted); transition: transform 0.3s var(--ease), color 0.3s var(--ease); }
.service-item:hover .arrow { transform: translateX(4px); color: var(--blue); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-cta:hover { border-color: var(--blue); color: var(--blue); }
.nav-cta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 8px var(--blue-glow); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
