/* ==========================================================================
   OmniPalm Main Stylesheet
   Meta's AI Agent
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Primary Colors - Deep Blues */
  --color-primary-900: #1a237e;
  --color-primary-800: #283593;
  --color-primary-700: #303f9f;
  --color-primary-600: #3949ab;
  --color-primary-500: #3f51b5;
  
  /* Accent Colors */
  --color-cyan: #00e5ff;
  --color-cyan-dark: #00b8d4;
  --color-cyan-light: #18ffff;
  --color-orange: #ff6e40;
  --color-orange-dark: #ff5722;
  --color-orange-light: #ff8a65;
  
  /* Neutral Grays */
  --color-gray-900: #0d1117;
  --color-gray-850: #161b22;
  --color-gray-800: #21262d;
  --color-gray-700: #30363d;
  --color-gray-600: #484f58;
  --color-gray-500: #6e7681;
  --color-gray-400: #8b949e;
  --color-gray-300: #b1bac4;
  --color-gray-200: #c9d1d9;
  --color-gray-100: #e6edf3;
  --color-gray-50: #f0f6fc;
  
  /* Semantic Colors */
  --color-success: #3fb950;
  --color-warning: #d29922;
  --color-error: #f85149;
  --color-info: #58a6ff;
  
  /* Background Colors */
  --bg-primary: var(--color-gray-900);
  --bg-secondary: var(--color-gray-850);
  --bg-tertiary: var(--color-gray-800);
  --bg-elevated: var(--color-gray-700);
  
  /* Text Colors */
  --text-primary: var(--color-gray-100);
  --text-secondary: var(--color-gray-400);
  --text-muted: var(--color-gray-500);
  --text-link: var(--color-cyan);
  
  /* Border Colors */
  --border-default: var(--color-gray-700);
  --border-muted: var(--color-gray-800);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1070;
  
  /* Container */
  --container-max: 1280px;
  --container-narrow: 960px;
  --container-wide: 1440px;
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: radial-gradient(ellipse 100% 80% at 50% -20%, rgba(30, 40, 60, 0.5) 0%, transparent 60%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-cyan-light);
}

a:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

strong, b {
  font-weight: var(--font-semibold);
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
}

code {
  font-size: 0.9em;
  padding: 0.125em 0.375em;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--color-cyan);
}

pre {
  overflow-x: auto;
  padding: var(--space-4);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

pre code {
  padding: 0;
  background: none;
  font-size: var(--text-sm);
}

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

svg {
  display: block;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
}

/* Inline SVGs in text should not be block */
a svg, button svg, span svg, .btn svg, .icon svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
  overflow: hidden;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* Visually Hidden (Accessible) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-tooltip);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-cyan);
  color: var(--color-gray-900);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-cyan { color: var(--color-cyan); }
.text-orange { color: var(--color-orange); }

/* Display Utilities */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flex Utilities */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Margin Utilities */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Padding Utilities */
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.py-20 { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

/* Background Utilities */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }

/* Border Utilities */
.border { border: 1px solid var(--border-default); }
.border-t { border-top: 1px solid var(--border-default); }
.border-b { border-bottom: 1px solid var(--border-default); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

/* Section Spacing */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  overflow: hidden;
}

.section--sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--lg {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-12);
}

.section-header__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.section-header__title {
  margin-bottom: var(--space-4);
}

.section-header__description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Highlight Text */
.highlight {
  color: var(--color-cyan);
}

.highlight--orange {
  color: var(--color-orange);
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background-color: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-muted);
  transition: background-color var(--transition-base);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.header__logo:hover {
  color: var(--text-primary);
}

.header__logo-icon {
  width: 36px;
  height: 36px;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.header__nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

.header__nav-link--active {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.header__social-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

.header__social-link svg {
  width: 20px;
  height: 20px;
}

/* Mobile Menu Toggle */
.header__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.header__menu-toggle:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

.header__menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  padding: var(--space-16) 0 var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.footer__logo:hover {
  color: var(--text-primary);
}

.footer__logo-icon {
  width: 32px;
  height: 32px;
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.footer__meta-badge {
  display: inline-block;
  margin-top: var(--space-2);
}

.footer__meta-logo {
  height: 18px;
  width: auto;
  display: block;
  opacity: 0.8;
}

.footer__meta-logo:hover {
  opacity: 1;
}

.footer__column-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-cyan);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-muted);
}

.footer__copyright {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.footer__legal-link {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer__legal-link:hover {
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */
.main {
  padding-top: 64px; /* Header height */
}

/* Page Header */
.page-header {
  padding: var(--space-16) 0 var(--space-12);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
}

.page-header__inner {
  max-width: 800px;
}

.page-header__title {
  margin-bottom: var(--space-4);
}

.page-header__description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: 0;
}

.page-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.page-header__breadcrumb a {
  color: var(--text-secondary);
}

.page-header__breadcrumb a:hover {
  color: var(--color-cyan);
}

.page-header__breadcrumb-separator {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
}

.hero__content {
  max-width: 800px;
  margin: 0 auto;
}

.hero__meta-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.hero__meta-by {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--font-medium);
  text-transform: lowercase;
}

.hero__meta-logo {
  height: 60px;
  width: auto;
  display: block;
}

.hero__title {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

.hero__terminal {
  max-width: 700px;
  margin: 0 auto var(--space-8);
}

/* Responsive Hero */
@media (max-width: 767px) {
  .hero__title {
    font-size: var(--text-3xl);
  }
  
  .hero__subtitle {
    font-size: var(--text-lg);
  }
  
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
