/* ============================================================
   MyAiGuys · Unified design system
   One palette, one type system, shared across every page.
   ============================================================ */

:root {
  /* Surfaces — warm paper */
  --bg:            #f3eddf;
  --bg-deep:       #ebe3d2;
  --surface:       #ffffff;
  --surface-warm:  #ede5d2;
  --border:        #ddd1b6;
  --border-soft:   #e8dec8;

  /* Ink */
  --text:          #0d0d0d;
  --text-soft:     #4a443a;
  --text-faint:    #8a8275;

  /* Electric blue */
  --primary:            #1e68ff;
  --primary-deep:       #0f4ad9;
  --primary-soft:       #5e8fff;
  --primary-tint:       rgba(30, 104, 255, 0.08);
  --primary-tint-strong:rgba(30, 104, 255, 0.14);

  --imsg-blue: #0a84ff;
  --warn:      #b88737;
  --warn-tint: rgba(184, 135, 55, 0.10);
  --good:      #34c759;

  /* Type */
  --pixel: 'Press Start 2P', monospace;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'Space Mono', monospace;

  /* Depth */
  --shadow:    0 1px 3px rgba(13,13,13,.05), 0 4px 14px rgba(13,13,13,.04);
  --shadow-md: 0 6px 24px rgba(13,13,13,.08), 0 2px 8px rgba(13,13,13,.04);
  --shadow-lg: 0 20px 60px rgba(13,13,13,.18), 0 8px 24px rgba(13,13,13,.08);

  --nav-h: 66px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--primary); color: #fff; }

/* ── Pixel wordmark ── */
.wordmark {
  font-family: var(--pixel);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  -webkit-font-smoothing: none;
}
.wordmark .br { color: var(--primary); }
.wordmark .dk { color: var(--text); }
.wordmark .bl { color: var(--primary); }
@media (max-width: 420px) { .wordmark { font-size: 13px; } }

/* ── Navbar ── */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  height: var(--nav-h);
  background: rgba(243, 237, 223, 0.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
nav.site-nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 6px 20px rgba(13,13,13,.04);
}

.nav-logo { display: flex; align-items: center; text-decoration: none; transition: transform .3s var(--ease-spring); }
.nav-logo:hover { transform: translateY(-1px); }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links > li { display: flex; }
.nav-links a {
  position: relative;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .2s var(--ease), background .2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav-links a:not(.nav-cta):hover { color: var(--text); background: rgba(13,13,13,.04); }
.nav-links a.nav-accent { color: var(--primary); }
.nav-links a.nav-accent::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 2px; border-radius: 2px;
  background: var(--primary);
}

.nav-guy-ico {
  width: 18px; height: 22px;
  background-image: url('../images/guy-walk.png');
  background-size: 400% 100%;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.12));
}

.nav-cta {
  margin-left: 8px;
  background: var(--primary);
  color: #fff;
  padding: 9px 18px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 14px rgba(30,104,255,.28);
  transition: background .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
.nav-cta:hover { background: var(--primary-deep); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 22px rgba(30,104,255,.36); }
.nav-cta:active { transform: translateY(0); }

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  background: none; border: none; cursor: pointer;
  border-radius: 10px;
  z-index: 1002;
}
.nav-hamburger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform .3s var(--ease-spring), opacity .2s var(--ease);
}
.nav-hamburger span:nth-child(1) { top: 15px; }
.nav-hamburger span:nth-child(2) { top: 21px; }
.nav-hamburger span:nth-child(3) { top: 27px; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile full-screen menu ── */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--nav-h) 28px 40px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
}
.nav-mobile.open { opacity: 1; visibility: visible; transform: none; }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.nav-mobile li { opacity: 0; transform: translateY(14px); }
.nav-mobile.open li { animation: mobItemIn .45s var(--ease) forwards; }
.nav-mobile.open li:nth-child(1) { animation-delay: .06s; }
.nav-mobile.open li:nth-child(2) { animation-delay: .12s; }
.nav-mobile.open li:nth-child(3) { animation-delay: .18s; }
.nav-mobile.open li:nth-child(4) { animation-delay: .26s; }
@keyframes mobItemIn { to { opacity: 1; transform: none; } }
.nav-mobile a {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  border-bottom: 1px solid var(--border-soft);
}
.nav-mobile a .nav-guy-ico { width: 26px; height: 32px; }
.nav-mobile a.nav-accent { color: var(--primary); }
.nav-mobile .nav-cta-mobile {
  margin-top: 28px;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(30,104,255,.3);
}
.nav-mobile-foot {
  margin-top: auto;
  padding-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}

body.nav-open { overflow: hidden; }

/* ── Footer ── */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--bg);
}
.footer-logo { display: flex; align-items: center; text-decoration: none; flex: 1; opacity: .85; }
.footer-links { display: flex; gap: 28px; list-style: none; flex: 1; justify-content: center; }
.footer-links a { font-size: 14px; color: var(--text-faint); text-decoration: none; transition: color .2s; font-weight: 500; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--text-faint); flex: 1; text-align: right; font-family: var(--mono); letter-spacing: 0.02em; }

/* ── Shared buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 16px; font-weight: 600;
  font-family: var(--sans);
  padding: 16px 30px;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 20px rgba(30,104,255,.26);
  transition: background .2s var(--ease), transform .18s var(--ease-spring), box-shadow .2s var(--ease);
}
.btn-primary svg { transition: transform .25s var(--ease-spring); }
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 12px 30px rgba(30,104,255,.36); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 16px; font-weight: 500;
  padding: 16px 8px;
  border-bottom: 1.5px solid transparent;
  transition: color .2s, border-color .2s, gap .2s var(--ease-spring);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); gap: 12px; }

/* ── Scroll reveal ──
   Base state is ALWAYS visible (never stranded hidden). interactions.js plays a
   one-time fade-up via the Web Animations API only on elements that scroll in
   from below the fold; anything already on screen at load is left untouched. */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  footer.site-footer { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { justify-content: flex-start; flex-wrap: wrap; gap: 18px; }
  .footer-copy { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
