/* ═══════════════════════════════════════════
   BlockPattern AI — Shared Stylesheet
   ═══════════════════════════════════════════ */

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

:root {
  --bg: #060608;
  --bg2: #0c0c12;
  --surface: #111118;
  --surface2: #16161f;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.1);
  --text: #f0f0f5;
  --text-muted: rgba(240,240,245,0.45);
  --text-dim: rgba(240,240,245,0.25);
  --cyan: #00d4ff;
  --blue: #4f8dff;
  --violet: #9b6dff;
  --magenta: #e040fb;
  --grad: linear-gradient(135deg, #00d4ff 0%, #4f8dff 40%, #9b6dff 75%, #e040fb 100%);
  --grad2: linear-gradient(135deg, #00d4ff 0%, #4f8dff 60%, #9b6dff 100%);
  --glow-cyan: 0 0 60px rgba(0,212,255,0.15);
  --glow-violet: 0 0 60px rgba(155,109,255,0.15);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

/* ─── Noise overlay ─── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025; pointer-events: none; z-index: 1;
}

/* ─── Custom cursor ─── */
.cursor {
  position: fixed; width: 12px; height: 12px;
  background: var(--cyan); border-radius: 50%;
  pointer-events: none; z-index: 10000;
  mix-blend-mode: screen;
  transition: opacity 0.15s;
}
.cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1px solid rgba(0,212,255,0.4); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}
.cursor-ring.expand { width: 56px; height: 56px; border-color: rgba(155,109,255,0.5); }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: all 0.4s ease;
}
nav.scrolled {
  background: rgba(6,6,8,0.85);
  border-bottom-color: var(--border);
  backdrop-filter: blur(24px);
  padding: 16px 48px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo-mark {
  width: 32px; height: 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  transition: transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
.logo-mark:hover { transform: rotate(90deg); }
.logo-cell { border-radius: 3px; }
.logo-cell:nth-child(1) { background: var(--cyan); animation: logoShift 4s ease-in-out infinite 0s; }
.logo-cell:nth-child(2) { background: var(--blue); animation: logoShift 4s ease-in-out infinite 0.3s; }
.logo-cell:nth-child(3) { background: var(--violet); animation: logoShift 4s ease-in-out infinite 0.6s; }
.logo-cell:nth-child(4) { background: var(--magenta); animation: logoShift 4s ease-in-out infinite 0.9s; }
@keyframes logoShift { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--text);
}
.logo-text span {
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 400; letter-spacing: 0.01em;
  transition: color 0.2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 1px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta {
  padding: 10px 24px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 100px; color: var(--text);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: all 0.25s ease; position: relative; overflow: hidden;
}
.nav-cta::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad); opacity: 0; transition: opacity 0.25s;
}
.nav-cta:hover::before { opacity: 0.15; }
.nav-cta:hover { border-color: rgba(0,212,255,0.3); box-shadow: var(--glow-cyan); }
.nav-cta span { position: relative; }

/* ─── LAYOUT ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }

/* ─── TYPOGRAPHY ─── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--cyan); }
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 4.5vw, 62px); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.04em; margin-bottom: 20px;
}
.section-title em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.section-sub {
  font-size: 18px; font-weight: 300;
  color: var(--text-muted); line-height: 1.7; max-width: 520px;
}

/* ─── BUTTONS ─── */
.btn-primary {
  padding: 16px 36px; background: var(--grad); border: none;
  border-radius: 100px; color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease; letter-spacing: -0.01em;
  display: inline-block;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0); transition: background 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 60px rgba(79,141,255,0.35); }
.btn-primary:hover::after { background: rgba(255,255,255,0.1); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 15px 36px; background: transparent;
  border: 1px solid var(--border2); border-radius: 100px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 400;
  text-decoration: none; cursor: pointer; transition: all 0.25s ease;
  letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ─── PAGE HERO (inner pages) ─── */
.page-hero {
  padding: 180px 0 100px;
  position: relative; overflow: hidden;
}
.page-hero .orb {
  position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none;
}
.page-hero .orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, transparent 70%);
  top: -100px; left: -100px;
}
.page-hero .orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(155,109,255,0.08) 0%, transparent 70%);
  bottom: -50px; right: -50px;
}
.page-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 20% 50%, black 20%, transparent 80%);
}
.page-hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.page-hero-label::before { content: ''; width: 24px; height: 1px; background: var(--cyan); }
.page-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(42px, 6vw, 80px); font-weight: 800;
  line-height: 1.0; letter-spacing: -0.04em; margin-bottom: 24px;
}
.page-hero h1 em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.page-hero p {
  font-size: 20px; font-weight: 300;
  color: var(--text-muted); max-width: 580px; line-height: 1.7;
}

/* ─── FOOTER ─── */
footer {
  padding: 64px 48px 40px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.8fr 1fr 1fr;
  gap: 64px; margin-bottom: 56px;
}
.footer-brand p {
  font-size: 14px; color: var(--text-muted);
  font-weight: 300; line-height: 1.7;
  margin-top: 16px; margin-bottom: 24px; max-width: 280px;
}
.footer-col h4 {
  font-family: 'Syne', sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 300; transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 32px;
}
.footer-bottom p {
  font-size: 12px; color: var(--text-dim);
  font-family: 'DM Mono', monospace; letter-spacing: 0.03em;
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a {
  color: var(--text-dim); font-size: 12px;
  font-family: 'DM Mono', monospace; text-decoration: none;
  transition: color 0.2s; letter-spacing: 0.03em;
}
.footer-bottom-links a:hover { color: var(--text-muted); }

/* ─── HAMBURGER — hidden on desktop, shown on mobile only ─── */
.hamburger {
  display: none;           /* default: hidden */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.25s;
  flex-shrink: 0;
}
.hamburger:hover { border-color: rgba(0,212,255,0.3); }
.hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text-muted); border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.25s, background 0.25s;
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--cyan); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--cyan); }

/* ─── DRAWER OVERLAY — hidden until .open ─── */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 1998;
  background: rgba(6,6,8,0.7);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
  display: none;            /* truly hidden off-canvas on desktop */
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

/* ─── MOBILE DRAWER — always off-screen until .open ─── */
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 300px; z-index: 1999;
  background: var(--bg2);
  border-left: 1px solid var(--border2);
  transform: translateX(100%);        /* off-screen right */
  visibility: hidden;                  /* also prevents focus/tab reach */
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), visibility 0.45s;
  display: flex; flex-direction: column;
  box-shadow: -40px 0 80px rgba(0,0,0,0.4);
}
.mobile-drawer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad);
}
.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px; border-bottom: 1px solid var(--border);
}
.drawer-logo {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.drawer-close {
  width: 32px; height: 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 16px; line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}
.drawer-close:hover { border-color: rgba(0,212,255,0.3); color: var(--text); }

.drawer-links {
  list-style: none; padding: 32px 28px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}
.drawer-links li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; color: var(--text-muted); text-decoration: none;
  font-size: 18px; font-weight: 400;
  font-family: 'Syne', sans-serif; letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border); transition: color 0.2s;
}
.drawer-links li:last-child a { border-bottom: none; }
.drawer-links li a:hover,
.drawer-links li a.active { color: var(--text); }
.drawer-links li a .arrow { font-size: 14px; opacity: 0.3; transition: opacity 0.2s, transform 0.2s; }
.drawer-links li a:hover .arrow { opacity: 1; transform: translateX(4px); }

.drawer-cta {
  padding: 28px; border-top: 1px solid var(--border);
}
.drawer-cta a {
  display: block; width: 100%; padding: 16px;
  background: var(--grad); border-radius: 100px;
  text-align: center; color: white; text-decoration: none;
  font-size: 15px; font-weight: 500;
  font-family: 'DM Sans', sans-serif; letter-spacing: -0.01em;
  transition: opacity 0.2s, box-shadow 0.2s;
}
.drawer-cta a:hover { opacity: 0.9; box-shadow: 0 12px 40px rgba(79,141,255,0.3); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  nav.scrolled { padding: 14px 24px; }
  .nav-links { display: none !important; }
  .nav-cta   { display: none !important; }
  .hamburger { display: flex !important; }
  .drawer-overlay { display: block; }   /* re-enable overlay on mobile */
  .container { padding: 0 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .page-hero { padding: 140px 0 80px; }
}

/* Keyframes */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.6; transform:scale(0.8); }
}
