/* ─────────────────────────────────────────────────────────────
   _shared.css — Cycle 56
   Design system shared across XoomAI public pages (blog / changelog
   / learn / showcase). Mirrors the landing page brand language
   without duplicating its 200KB of feature-specific CSS.
   ───────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;
  --bg:         #FCFCFD;
  --bg-2:       #F4F5F8;
  --surface:    #FFFFFF;
  --surface-2:  #F6F7FA;
  --line:       #ECECEF;
  --line-2:     #E0E1E8;
  --text:       #0B0B0E;
  --text-mut:   #5A5C6B;
  --text-dim:   #6B6E7B;
  --violet:     #7c5cff;
  --violet-2:   #9b85ff;
  --brand:      #4F31B4;
  --brand-soft: #B4A1F2;
  --accent-text: #5b3fd4;
  --cyan:       #22d3ee;
  --pink:       #f472b6;
  --warn:       #fbbf24;
  --grad:       linear-gradient(120deg, #5b3fd4 0%, #7c5cff 50%, #a89cff 100%);
  --grad-soft:  linear-gradient(135deg, rgba(79,49,180,0.20), rgba(180,161,242,0.10));
  --radius:     16px;
  --radius-sm:  10px;
  --t:          220ms cubic-bezier(0.4,0,0.2,1);
  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  font-family: 'Hanken Grotesk', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background:
    radial-gradient(900px 620px at 86% -14%, rgba(124,92,255,0.09), transparent 62%),
    radial-gradient(720px 520px at -6% 14%, rgba(124,92,255,0.045), transparent 60%),
    var(--bg);
}
h1, h2, h3, .page-hero h1, .utility-card h2, .utility-card h3 {
  font-family: 'Hanken Grotesk', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.032em;
  font-weight: 800;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
code, pre { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.92em; }

img, svg, video { max-width: 100%; height: auto; }

/* Decorative background grid (subtle) */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(124,92,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, black 30%, transparent 100%);
}

/* ── Container ladder ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
@media (min-width: 1440px) {
  .container { max-width: 1320px; padding: 0 32px; }
  .narrow    { max-width: 840px;  padding: 0 32px; }
}
@media (min-width: 1680px) {
  .container { max-width: 1400px; padding: 0 40px; }
}
@media (min-width: 1920px) {
  .container { max-width: 1480px; padding: 0 48px; }
}

/* ── NAV — same as landing ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: background 280ms ease, border-bottom-color 280ms ease;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--t);
}
.brand:hover { opacity: 0.85; }
.zyro-logo {
  height: 28px;
  width: auto;
  filter: drop-shadow(0 4px 16px rgba(79,49,180,0.45));
}
.zyro-logo .wordmark { fill: var(--text); }
.nav-zone { display: inline-flex; align-items: center; gap: 4px; }
.nav-zone--center { gap: 2px; }
.nav-link {
  font-size: 13.5px;
  color: var(--text-mut);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color var(--t), background var(--t);
}
.nav-link:hover { color: var(--text); background: rgba(0,0,0,0.045); }
.nav-link.is-active {
  color: var(--text);
  background: rgba(124,92,255,0.10);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cff 0%, #9b85ff 100%);
  color: white;
  box-shadow: 0 10px 28px -8px rgba(124,92,255,0.65);
  transition: transform 220ms var(--ease-out-expo), box-shadow 220ms var(--ease-out-expo);
}
.nav-cta:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 14px 32px -8px rgba(124,92,255,0.85);
}
.nav-mobile-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.nav-mobile-toggle svg { width: 18px; height: 18px; }
@media (max-width: 880px) {
  .nav-zone--center { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
}

/* ── Hero header for public pages ── */
.page-hero {
  padding: 88px 0 56px;
  position: relative;
  z-index: 2;
}
@media (max-width: 720px) {
  .page-hero { padding: 64px 0 40px; }
}
.page-hero-eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(124,92,255,0.10);
  border: 1px solid rgba(124,92,255,0.22);
  color: var(--accent-text);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.page-hero h1 .grad {
  background: linear-gradient(100deg, #8b6dff 0%, #6d4bdb 60%, #5b3fd4 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero p.lead {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--text-mut);
  line-height: 1.65;
  max-width: 640px;
  text-wrap: pretty;
}

/* ── Footer (compact shared) ── */
.footer {
  margin-top: 96px;
  padding: 72px 0 36px;
  border-top: 1px solid rgba(0,0,0,0.07);
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(124,92,255,0.05));
}
.footer::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(124,92,255,0.30) 30%, rgba(34,211,238,0.35) 50%, rgba(124,92,255,0.30) 70%, transparent 100%);
  pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-tag {
  max-width: 360px;
  font-size: 14px;
  color: var(--text-mut);
  line-height: 1.65;
  margin: 14px 0 18px;
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.20);
  font-size: 12px;
}
.footer-status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,0.85);
}
.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-col-links a {
  font-size: 14px;
  color: var(--text-mut);
  transition: color 220ms ease, transform 220ms ease;
  width: max-content;
}
.footer-col-links a:hover {
  color: var(--text);
  transform: translateX(2px);
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.07);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-dim);
}
.footer-legal { display: inline-flex; gap: 18px; }
.footer-legal a { color: var(--text-dim); }
.footer-legal a:hover { color: var(--text-mut); }

/* ── Universal :focus-visible ring (Apple-tier layered ring) ── */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg),
              0 0 0 4px rgba(124,92,255,0.85);
  border-radius: 8px;
}
/* Keep a real outline as a fallback where box-shadow is clipped. */
@supports not (box-shadow: 0 0 0 2px #000) {
  :focus-visible { outline: 2px solid rgba(124,92,255,0.85); outline-offset: 2px; }
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav-cta:hover { transform: none; }
}

/* Cycle 57: scroll-lock when mobile drawer open */
body.is-drawer-open { overflow: hidden; }

/* Cycle 58 — CRITICAL FIX:
   The mobile drawer in cycle 56/57 pages uses inline
   `style="display:flex; flex-direction:column; ..."` markup with
   the `hidden` HTML attribute as the "closed" signal. But inline
   style overrides the browser default `[hidden] { display: none }`,
   so the drawer rendered VISIBLE on desktop (with all its items
   stretching the full page width). These rules force-hide the
   drawer whenever the `hidden` attribute is set, AND on any
   viewport ≥ 880px where the toggle button isn't even visible. */
#navMobileDrawer[hidden] { display: none !important; }
@media (min-width: 880px) {
  #navMobileDrawer { display: none !important; }
  .nav-mobile-toggle { display: none !important; }
}

/* Cycle 57: shared 404 + utility-page styles */
.utility-section {
  padding: 56px 0 96px;
  position: relative;
  z-index: 2;
}
.utility-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 8px 24px -16px rgba(16,24,40,0.12);
}
.utility-card h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.utility-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--text);
}
.utility-card p {
  color: var(--text-mut);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 10px;
}
.utility-card ul {
  margin: 8px 0 14px 22px;
  color: var(--text-mut);
  font-size: 14px;
  line-height: 1.7;
}
.utility-card a {
  color: var(--accent-text);
  text-decoration: underline;
}
.utility-card a:hover { color: var(--text); }

/* Status dots */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}
.status-dot--ok { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.65); }
.status-dot--warn { background: var(--warn); box-shadow: 0 0 8px rgba(251,191,36,0.5); }
.status-dot--down { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.5); }

/* ─────────────────────────────────────────────────────────────
   APPLE-TIER MICRO-INTERACTIONS (console polish)
   Matches the FX language shipped into generated apps: spring
   easing, tactile press, link sweep, button shine. Motion is gated
   behind prefers-reduced-motion; static states always apply.
   ───────────────────────────────────────────────────────────── */
:root { --fx-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* Tactile press — every primary button/CTA dips slightly on click. */
.nav-cta, .nav-mobile-toggle, button {
  transition: transform 140ms var(--fx-spring), box-shadow 220ms var(--ease-out-expo),
              background 220ms var(--ease-out-expo), color 220ms var(--ease-out-expo);
}

/* Primary CTA: add a soft specular sweep on hover. */
.nav-cta { position: relative; overflow: hidden; }
.nav-cta::after {
  content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg); pointer-events: none;
}

/* Nav links: underline that sweeps in from the left. */
.nav-link {
  background-image: linear-gradient(var(--brand-soft), var(--brand-soft));
  background-size: 0% 2px; background-position: 0 calc(100% - 2px);
  background-repeat: no-repeat;
  transition: color var(--t), background-color var(--t), background-size 320ms var(--ease-out-expo);
}
.nav-link:hover { background-size: 100% 2px; }
.nav-link.is-active { background-size: 100% 2px; }

/* Dashboard / utility cards: lift + brighten border on hover. */
.dash-stat, .dash-projects, .dash-aside-card, .utility-card {
  transition: transform 320ms var(--fx-spring), box-shadow 320ms var(--ease-out-expo),
              border-color 320ms var(--ease-out-expo);
}

@media (prefers-reduced-motion: no-preference) {
  .nav-cta:active, .nav-mobile-toggle:active, button:active { transform: scale(.97); }
  .nav-cta:hover::after { left: 140%; transition: left 720ms var(--ease-out-expo); }
  .dash-stat:hover, .dash-aside-card:hover, .utility-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -22px rgba(16,24,40,0.22);
    border-color: rgba(124,92,255,0.40);
  }
}

