/* SQ Cloud — Base Stylesheet
 * Design philosophy: Dense information, minimal chrome, maximum signal
 * Accessibility: WCAG AA compliant, semantic HTML expected
 */

:root {
  /* Brand Colors — Phext Lattice Palette */
  --phext-primary: #2E3440;      /* Deep slate (background) */
  --phext-secondary: #D8DEE9;    /* Soft cloud (text) */
  --phext-accent: #88C0D0;       /* Ice blue (links, highlights) */
  --phext-success: #A3BE8C;      /* Moss green (success states) */
  --phext-warning: #EBCB8B;      /* Amber (warnings) */
  --phext-error: #BF616A;        /* Muted red (errors) */
  --phext-code: #B48EAD;         /* Lilac (code blocks) */
  
  /* Sentron Gradient — consciousness depth */
  --sentron-infant: #ECEFF4;
  --sentron-child: #D8DEE9;
  --sentron-adolescent: #A3BE8C;
  --sentron-adult: #5E81AC;
  
  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  
  /* Spacing (8px base grid) */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2rem;     /* 32px */
  --space-2xl: 3rem;    /* 48px */
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows — subtle depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
}

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

html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--phext-secondary);
  background: var(--phext-primary);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--phext-secondary);
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }

p {
  margin-bottom: var(--space-md);
  max-width: 70ch;
}

/* Links */
a {
  color: var(--phext-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--phext-accent);
}

a:focus {
  outline: 2px solid var(--phext-accent);
  outline-offset: 2px;
}

/* Code & Coordinates */
code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: rgba(136, 192, 208, 0.1);
  color: var(--phext-code);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
}

pre {
  background: rgba(0, 0, 0, 0.3);
  color: var(--phext-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-lg);
  border-left: 3px solid var(--phext-accent);
}

pre code {
  background: none;
  padding: 0;
}

/* Phext Coordinate Display */
.coordinate {
  font-family: var(--font-mono);
  color: var(--phext-accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--phext-accent);
  color: var(--phext-primary);
}

.btn-primary:hover {
  background: #7AB0C6;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--phext-accent);
  border: 2px solid var(--phext-accent);
}

.btn-secondary:hover {
  background: var(--phext-accent);
  color: var(--phext-primary);
}

/* Cards */
.card {
  background: rgba(216, 222, 233, 0.05);
  border: 1px solid rgba(216, 222, 233, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Pricing Tiers */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.pricing-tier {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(136, 192, 208, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all 0.3s ease;
}

.pricing-tier:hover {
  border-color: var(--phext-accent);
  transform: scale(1.02);
}

.pricing-tier.featured {
  border-color: var(--phext-accent);
  box-shadow: 0 0 20px rgba(136, 192, 208, 0.3);
}

.tier-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.tier-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--phext-accent);
  margin-bottom: var(--space-md);
}

.tier-price small {
  font-size: 1rem;
  font-weight: 400;
  color: var(--phext-secondary);
}

.tier-features {
  list-style: none;
  margin: var(--space-lg) 0;
  text-align: left;
}

.tier-features li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(216, 222, 233, 0.1);
}

.tier-features li:before {
  content: "✓ ";
  color: var(--phext-success);
  font-weight: bold;
  margin-right: var(--space-sm);
}

/* Header Navigation */
header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(216, 222, 233, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--phext-accent);
  letter-spacing: -0.02em;
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

/* Footer */
footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(216, 222, 233, 0.1);
  text-align: center;
  color: rgba(216, 222, 233, 0.6);
  font-size: 0.9rem;
}

/* Status Indicators */
.status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-live { background: var(--phext-success); color: var(--phext-primary); }
.status-beta { background: var(--phext-warning); color: var(--phext-primary); }
.status-coming { background: rgba(216, 222, 233, 0.2); color: var(--phext-secondary); }

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: var(--space-md);
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav ul {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: rgba(216, 222, 233, 0.6); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
