/* =============================================================================
   GLOBAL STYLES — Greg Siele Portfolio
   Shared: design tokens, reset, nav, footer, glass utilities, animations
   ============================================================================= */

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Color */
  --bg:             #05060f;
  --bg-alt:         #080b18;
  --surface:        rgba(255, 255, 255, 0.04);
  --surface-md:     rgba(255, 255, 255, 0.07);
  --surface-high:   rgba(255, 255, 255, 0.11);
  --border:         rgba(255, 255, 255, 0.08);
  --border-bright:  rgba(255, 255, 255, 0.18);
  --accent:         #3b6ff5;
  --accent-2:       #60a5fa;
  --accent-glow:    rgba(59, 111, 245, 0.35);
  --purple:         #7c3aed;
  --purple-glow:    rgba(124, 58, 237, 0.25);
  --text:           #f1f5f9;
  --text-muted:     #94a3b8;
  --text-subtle:    #475569;
  --green:          #22c55e;

  /* Space */
  --sp-xs:   0.5rem;
  --sp-sm:   1rem;
  --sp-md:   1.5rem;
  --sp-lg:   2rem;
  --sp-xl:   3rem;
  --sp-2xl:  5rem;
  --sp-3xl:  8rem;

  /* Radius */
  --r-sm:    8px;
  --r-md:    14px;
  --r-lg:    20px;
  --r-xl:    28px;
  --r-2xl:   40px;
  --r-full:  9999px;

  /* Type */
  --font-body:    'Space Grotesk', system-ui, sans-serif;
  --font-head:    'Archivo', system-ui, sans-serif;

  /* Glass */
  --glass-blur:   blur(22px) saturate(180%) brightness(1.05);
  --glass-bg:     rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);

  /* Layout */
  --container: 1240px;
  --nav-h:     72px;

  /* Motion */
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:  cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:   150ms;
  --t-base:   250ms;
  --t-slow:   400ms;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; border: none; outline: none; background: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; }

/* ── Skip Link ──────────────────────────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

/* ── Ambient Background ─────────────────────────────────────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  will-change: transform;
  animation: orb-drift var(--dur, 22s) ease-in-out infinite alternate;
}
.orb-1 { width: 700px; height: 700px; background: var(--accent);  top: -250px;  left: -200px; --dur: 20s; }
.orb-2 { width: 500px; height: 500px; background: var(--purple);  top: 25%;     right: -150px; --dur: 26s; }
.orb-3 { width: 450px; height: 450px; background: var(--accent-2); bottom: -80px; left: 30%; --dur: 23s; animation-direction: alternate-reverse; }

@keyframes orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(50px, -40px) scale(1.06); }
}

/* ── Container ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Liquid Glass Utilities ─────────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(18px) saturate(160%) brightness(1.04);
  -webkit-backdrop-filter: blur(18px) saturate(160%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.18);
  border-left-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

/* Liquid shimmer layer */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    112deg,
    transparent 30%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 70%
  );
  border-radius: inherit;
  pointer-events: none;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    background var(--t-base),
    border-color var(--t-base);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.14), transparent);
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--t-base);
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: #4d7ef7;
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── Typography Utilities ───────────────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 45%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.7;
}

/* ── Section Spacing ────────────────────────────────────────────────────────── */
section { padding-block: var(--sp-3xl); }
.section-header { margin-bottom: var(--sp-xl); }

/* ── GSAP Reveal Base States ────────────────────────────────────────────────── */
.reveal       { opacity: 0; transform: translateY(32px); }
.reveal-left  { opacity: 0; transform: translateX(-32px); }
.reveal-right { opacity: 0; transform: translateX(32px); }
.reveal-scale { opacity: 0; transform: scale(0.94); }

.stagger-group .stagger-item {
  opacity: 0;
  transform: translateY(28px);
}

/* ── ─────────────── NAVIGATION ──────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition:
    background var(--t-slow) var(--ease-io),
    border-color var(--t-slow),
    box-shadow var(--t-slow);
}
.site-nav.scrolled {
  background: rgba(5, 6, 15, 0.88);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}
.nav-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-img {
  height: 40px;
  width: auto;
  max-width: 160px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: opacity var(--t-base);
}
.nav-logo:hover .nav-logo-img { opacity: 0.8; }

.nav-logo-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--r-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-base), background var(--t-base);
  position: relative;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--text); background: rgba(59, 111, 245, 0.14); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent-2);
  border-radius: 50%;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background var(--t-base);
}
.nav-hamburger:hover { background: var(--surface-md); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-base);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: rgba(5, 6, 15, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 999;
  padding: 2rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-head);
  padding: 0.75rem 2rem;
  border-radius: var(--r-lg);
}

/* ── ────────────────── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  background: rgba(5, 6, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding-block: 4rem 2.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr repeat(2, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .nav-logo { margin-bottom: 1.25rem; }
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 28ch;
}
.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--t-base);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.85rem; color: var(--text-subtle); }
.footer-socials { display: flex; gap: 0.625rem; }
.social-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--t-base) var(--ease);
  cursor: pointer;
  text-decoration: none;
}
.social-icon svg { width: 15px; height: 15px; }
.social-icon:hover {
  background: var(--surface-md);
  border-color: var(--border-bright);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ── Page Hero (shared across inner pages) ──────────────────────────────────── */
.page-hero {
  padding-top: calc(var(--nav-h) + 5rem);
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}
.page-hero .label { margin-bottom: 1rem; }
.page-hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  line-height: 1.05;
}
.page-hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.7;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 600px) {
  :root { --sp-3xl: 5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
