/* ============================================================
   WebWizards™ — global.css
   Drop <link rel="stylesheet" href="global.css"> into every
   page's <head> BEFORE the closing </head> tag.
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --bg-main:        #050712;
  --bg-alt:         #0b0f1c;
  --bg-card:        #101528;
  --accent:         #f5c14b;
  --accent-soft:    #f7d37a;
  --accent-dim:     rgba(245, 193, 75, 0.12);
  --text-main:      #f5f5f5;
  --text-muted:     #a5a8b8;
  --border-subtle:  #22263a;
  --radius:         8px;
  --radius-lg:      14px;
  --shadow-soft:    0 18px 45px rgba(0,0,0,0.55);
  --shadow-glow:    0 0 40px rgba(245,193,75,0.25);
  --font-display:   'Syne', system-ui, sans-serif;
  --font-body:      'DM Sans', system-ui, sans-serif;
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Base Reset Upgrades ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Hide default cursor — we're adding a custom one */
  cursor: none;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  background: radial-gradient(circle at top, #151a33 0, #050712 55%);
  color: var(--text-main);
  overflow-x: hidden;
  cursor: none;
}

/* Restore cursor on mobile/touch (where custom cursor is hidden) */
@media (hover: none) {
  html, body { cursor: auto; }
}

/* ── Typography Upgrade ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hero-title,
h1.hero-title,
.section-title,
h1.section-title {
  font-family: var(--font-display);
  font-weight: 800;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800 !important;
}

/* ── Custom Cursor ────────────────────────────────────────── */
#ww-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease-out-expo),
              height 0.2s var(--ease-out-expo),
              background 0.2s ease,
              opacity 0.3s ease;
  mix-blend-mode: difference;
  will-change: transform;
}

#ww-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 193, 75, 0.6);
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-out-expo),
              height 0.35s var(--ease-out-expo),
              border-color 0.3s ease,
              opacity 0.3s ease;
  will-change: transform;
}

#ww-cursor.is-hovering  { width: 6px;  height: 6px; }
#ww-cursor-ring.is-hovering { width: 56px; height: 56px; border-color: var(--accent); }
#ww-cursor.is-clicking  { width: 16px; height: 16px; }

@media (hover: none) {
  #ww-cursor, #ww-cursor-ring { display: none; }
}

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

/* ── Ambient Glow Canvas (particle field) ─────────────────── */
#ww-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ── Navigation — Full Structure ──────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: linear-gradient(to bottom, rgba(5,7,18,0.97), rgba(5,7,18,0.85));
  border-bottom: 1px solid rgba(245,193,75,0.14);
  transition: box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 40px rgba(0,0,0,0.6), 0 1px 0 rgba(245,193,75,0.22);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent);
  box-shadow: 0 0 18px rgba(245,193,75,0.45);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s ease;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-main);
}

.brand-tagline {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* Nav links */
nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

nav a {
  position: relative;
  padding-bottom: 4px;
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.25s ease;
}

nav a:hover       { color: var(--text-main); }
nav a:hover::after { width: 100%; }

/* Active nav link */
nav a.nav-active            { color: var(--text-main); }
nav a.nav-active::after     { width: 100%; }

/* Nav CTA button */
.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(245,193,75,0.7);
  color: var(--accent-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-family: var(--font-display);
  background: radial-gradient(circle at top left, rgba(245,193,75,0.18), transparent 55%);
  box-shadow: 0 0 18px rgba(245,193,75,0.3);
  cursor: none;
  position: relative;
  display: inline-block;
  transition: background 0.25s ease, transform 0.15s var(--ease-spring),
              box-shadow 0.25s ease, color 0.2s ease;
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #1a1305;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(245,193,75,0.55);
}

/* ── Mobile Hamburger Nav ─────────────────────────────────── */
.ww-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: none;
  padding: 6px;
  background: none;
  border: none;
  z-index: 1001;
}

.ww-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.25s ease;
  transform-origin: center;
}

.ww-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ww-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ww-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ww-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5,7,18,0.97);
  backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out-expo);
}

.ww-mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}

.ww-mobile-nav a {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.2s ease, letter-spacing 0.3s var(--ease-out-expo);
}

.ww-mobile-nav a:hover { color: var(--accent); letter-spacing: 0.14em; }

.ww-mobile-nav .ww-mobile-cta {
  margin-top: 10px;
  padding: 14px 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #1a1305;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-decoration: none;
}

@media (max-width: 640px) {
  nav { display: none !important; }
  .ww-hamburger { display: flex !important; }
  .ww-mobile-nav { display: flex !important; }
}

/* ── Scroll Reveal ────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out-expo),
              transform 0.75s var(--ease-out-expo);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.3s; }
[data-reveal][data-delay="4"] { transition-delay: 0.45s; }
[data-reveal][data-delay="5"] { transition-delay: 0.6s; }

/* ── Card Hover Glow ──────────────────────────────────────── */
.service-card,
.why-card,
.project-card,
.card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out-expo),
              box-shadow 0.35s ease,
              border-color 0.35s ease !important;
}

.service-card::before,
.why-card::before,
.project-card::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
    rgba(245,193,75,0.08) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

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

.service-card > *,
.why-card > *,
.project-card > *,
.card > * {
  position: relative;
  z-index: 1;
}

.service-card:hover,
.why-card:hover,
.project-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: var(--shadow-soft), var(--shadow-glow) !important;
  border-color: rgba(245,193,75,0.35) !important;
}

/* ── Gradient Text Utility ────────────────────────────────── */
.text-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section Label Pulse ──────────────────────────────────── */
.section-label {
  position: relative;
  display: inline-block;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px var(--accent); opacity: 1; }
  50%       { box-shadow: 0 0 14px var(--accent-soft); opacity: 0.7; }
}

/* ── Accent Divider ───────────────────────────────────────── */
.ww-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 14px 0 22px;
  border-radius: 2px;
}

/* ── Glassmorphic hero card ───────────────────────────────── */
.hero-right,
aside.hero-right {
  background: rgba(16, 21, 40, 0.72) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(245,193,75,0.18) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04) !important;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.hero-right:hover,
aside.hero-right:hover {
  border-color: rgba(245,193,75,0.32) !important;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

/* ── Page-load fade in ────────────────────────────────────── */
.ww-page-enter {
  animation: page-fade-in 0.6s var(--ease-out-expo) both;
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Animated gradient border on CTA section ─────────────── */
section.cta {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

section.cta::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--accent) 0deg,
    var(--accent-soft) 60deg,
    transparent 120deg,
    transparent 240deg,
    var(--accent) 360deg
  );
  animation: border-spin 6s linear infinite;
  z-index: -1;
}

section.cta::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: calc(var(--radius-lg) - 2px);
  background: var(--bg-card);
  z-index: -1;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes border-spin {
  to { --angle: 360deg; }
}

/* ── Button upgrades ──────────────────────────────────────── */
.btn-primary,
button.btn-primary {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  transition: transform 0.2s var(--ease-spring),
              box-shadow 0.25s ease,
              filter 0.2s ease !important;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 20px 50px rgba(245,193,75,0.7) !important;
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98) !important;
}

.btn-secondary,
button.btn-secondary {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  transition: transform 0.2s var(--ease-spring),
              box-shadow 0.25s ease !important;
}

.btn-secondary:hover {
  transform: translateY(-2px) !important;
}

/* ── Hero logo glow pulse ─────────────────────────────────── */
.hero-logo {
  animation: logo-float 5s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(245,193,75,0.28));
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0px); filter: drop-shadow(0 0 20px rgba(245,193,75,0.22)); }
  50%      { transform: translateY(-8px); filter: drop-shadow(0 8px 32px rgba(245,193,75,0.38)); }
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--accent), rgba(245,193,75,0.3));
  border-radius: 3px;
}

/* ── Selection ────────────────────────────────────────────── */
::selection {
  background: rgba(245,193,75,0.28);
  color: var(--text-main);
}

/* ── Footer upgrade ───────────────────────────────────────── */
footer {
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "✦";
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 160px;
  color: rgba(245,193,75,0.03);
  pointer-events: none;
  font-family: var(--font-display);
}

/* ── Floating accent particles (CSS only, supplemental) ────── */
@keyframes float-up {
  0%   { transform: translateY(0) scale(1); opacity: 0.7; }
  100% { transform: translateY(-80px) scale(0.4); opacity: 0; }
}

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title, h1.hero-title { font-size: 30px !important; }
  .section-title { font-size: 22px !important; }

  section.cta::before { display: none; }
  section.cta::after  { display: none; }
  section.cta {
    border: 1px solid rgba(245,193,75,0.25);
    background: var(--bg-card);
  }
}
