/**
 * AgentaOS — Shared styles for all pages
 * Includes: variables, reset, nav, footer, cookie banner, responsive
 *
 * Usage: <link rel="stylesheet" href="/css/shared.css">
 * Pages add their own <style> block for page-specific styles.
 */

/* ===== BRAND VARIABLES ===== */
:root {
  --purple: #4400E0;
  --vibrant: #6A11CB;
  --cyan: #00B4D8;
  --blue: #0077B6;
  --slate: #1A1A24;

  --bg: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --text: #1A1A24;
  --text-muted: rgba(26, 26, 36, 0.72);
  --text-subtle: rgba(26, 26, 36, 0.55);

  --border: rgba(26, 26, 36, 0.08);
  --border-med: rgba(26, 26, 36, 0.12);

  --success: #00B4D8;
  --accent-gradient: linear-gradient(135deg, #6A11CB 0%, #00B4D8 100%);

  --font-display: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow-soft: 0 12px 40px 0 rgba(68, 0, 224, 0.08);
  --shadow-glass: 0 8px 32px 0 rgba(68, 0, 224, 0.05);
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.6; font-weight: 400; }
a { text-decoration: none; color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; }
::selection { background: rgba(0, 180, 216, 0.2); color: #1A1A24; }
.skip-link { position: absolute; top: -100px; left: 16px; background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; z-index: 9999; transition: top 0.2s; }
.skip-link:focus { top: 8px; }

/* ===== ANNOUNCEMENT BANNER ===== */
.announcement-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--bg-card); border-bottom: 1px solid var(--border-med); padding: 10px 24px; padding-top: max(10px, env(safe-area-inset-top)); font-size: 13px; }
.announcement-banner span { color: var(--text-muted); }
.announcement-banner .announcement-cta { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* ===== NAVIGATION ===== */
.nav { position: fixed; top: 37px; width: 100%; background: var(--bg); z-index: 1000; border-bottom: 1px solid var(--border); overflow: hidden; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s; }
.nav.scrolled { background: rgba(255, 255, 255, 0.8); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); border-color: var(--border-med); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: relative; }
.nav-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-brand svg { width: 24px; height: 24px; color: var(--text); }
.nav-brand span { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--slate); }
.nav-links { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--text-muted); font-size: 14px; font-weight: 400; transition: color 0.15s; }
.nav-link:hover { color: var(--text); }

/* ===== BUTTONS ===== */
.btn-primary { background: var(--purple); color: #FFFFFF; padding: 10px 24px; border-radius: var(--radius-pill); font-weight: 600; font-size: 14px; border: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 16px rgba(68, 0, 224, 0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(68, 0, 224, 0.4); }
.btn-secondary { border: 2px solid var(--blue); padding: 10px 24px; border-radius: var(--radius-pill); font-size: 14px; background: transparent; color: var(--blue); display: inline-flex; align-items: center; gap: 8px; transition: background 0.15s, border-color 0.15s; }
.btn-secondary:hover { background: rgba(0, 119, 182, 0.05); }

/* ===== MOBILE MENU ===== */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 12px; background: none; border: none; cursor: pointer; min-width: 44px; min-height: 44px; }
.nav-hamburger span { width: 20px; height: 2px; background: var(--text); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 999; padding: 93px 24px 24px; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu.active { display: flex; }
.mobile-menu-section { padding: 16px 0; border-bottom: 1px solid var(--border); }
.mobile-menu-section:last-child { border-bottom: none; }
.mobile-menu-label { font-size: 12px; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.mobile-menu-link { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; color: var(--text); font-size: 18px; font-family: var(--font-display); font-weight: 700; text-decoration: none; }
.mobile-menu-link:hover { color: var(--text-muted); }
.mobile-menu-cta { margin-top: 24px; }
.mobile-menu-cta .btn-primary { width: 100%; justify-content: center; }

/* ===== FOOTER ===== */
.footer { padding: 56px 24px 32px; background: var(--slate); color: rgba(255, 255, 255, 0.93); border-top: none; position: relative; }
.footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0, 180, 216, 0.2), transparent); }
.footer-inner { max-width: 1000px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; margin-bottom: 40px; }
.footer-brand-section { display: flex; align-items: center; gap: 10px; }
.footer-brand-section svg { width: 28px; height: 28px; color: rgba(255, 255, 255, 0.93); }
.footer-brand { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: rgba(255, 255, 255, 0.93); letter-spacing: -0.01em; }
.footer-tagline { color: rgba(255, 255, 255, 0.6); font-size: 13px; margin-top: 8px; }
.footer-trust { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.footer-trust-badge { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.55); font-size: 12px; letter-spacing: 0.02em; }
.footer-trust-badge svg { color: var(--cyan); flex-shrink: 0; }
.footer-links-grid { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.93); font-weight: 600; margin-bottom: 4px; }
.footer-link { color: rgba(255, 255, 255, 0.6); font-size: 14px; transition: color 0.15s; position: relative; }
.footer-link:hover { color: var(--cyan); }
.footer-link::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 1px; background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease; }
.footer-link:hover::after { transform: scaleX(1); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-copy { color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.footer-legal { display: flex; gap: 24px; }

/* ===== COOKIE BANNER ===== */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: var(--bg-elevated); border-top: 1px solid var(--border-med); padding: 16px 24px; padding-bottom: max(16px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 14px; color: var(--text-muted); }
.cookie-banner-text { max-width: 600px; }
.cookie-banner-text a { text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-banner-btn { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: none; font-family: var(--font-sans); min-height: 44px; }
.cookie-banner-accept { background: var(--text); color: var(--bg); }
.cookie-banner-accept:hover { filter: brightness(1.1); }
.cookie-banner-decline { background: transparent; border: 1px solid var(--border-med); color: var(--text-muted); }
.cookie-banner-decline:hover { background: var(--bg-card); }

/* ===== RESPONSIVE (shared components) ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav .btn-primary { display: none; }
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-links-grid { gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .cookie-banner { flex-direction: column; text-align: center; gap: 12px; }
}
