/* ==========================================================================
   AI Price Calc (aipricecalc.com) - Premium Dark Mode Developer Design System
   Aesthetic: High-Tech FinOps / Linear / Vercel style dark theme
   ========================================================================== */

:root {
  --bg-primary: #08090d;
  --bg-secondary: #0e1117;
  --bg-tertiary: #161b22;
  --bg-card: rgba(18, 22, 31, 0.75);
  --bg-card-hover: rgba(28, 34, 48, 0.85);
  --bg-input: #0b0e14;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --border-highlight: rgba(99, 102, 241, 0.3);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-inverse: #030712;
  
  --accent-primary: #6366f1;       /* Electric Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;          /* Cyber Cyan */
  --accent-emerald: #10b981;       /* Savings Green */
  --accent-amber: #f59e0b;         /* Caution / Gold */
  --accent-rose: #f43f5e;          /* Premium / Alert */
  --accent-purple: #a855f7;        /* OpenAI / Frontier */

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 90% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
              var(--bg-primary);
  background-attachment: fixed;
}

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

strong {
  color: #fff;
  font-weight: 650;
}

em {
  font-style: italic;
  color: #c7d2fe;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.15rem 0.4rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  color: #e0e7ff;
}

button, input, select {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  background: var(--accent-primary);
  color: #fff;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.nav-cta:hover {
  background: var(--accent-primary-hover);
  color: #fff;
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 2.5rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-pill-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
  color: #fff;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 25%, #a5b4fc 65%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-decoration: none;
  display: inline;
}

.hero-subtitle {
  max-width: 780px;
  margin: 0 auto 2.25rem;
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Quick Metrics Ribbon */
.metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: left;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
}

.metric-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  margin-bottom: 0.2rem;
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tag-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.tag-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.tag-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.tag-indigo { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
.tag-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

/* Interactive Table Control Bar */
.table-controls-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.search-input-group {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.unit-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.unit-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.unit-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.cat-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.cat-chip.active {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-color: var(--accent-primary);
}

/* Real-Time Pricing Table */
.pricing-table-container {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
  margin-bottom: 3.5rem;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.pricing-table th {
  background: rgba(14, 17, 23, 0.95);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  user-select: none;
}

.pricing-table th.sortable {
  cursor: pointer;
}

.pricing-table th.sortable:hover {
  color: #fff;
}

.pricing-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.pricing-table tr:hover td {
  background: var(--bg-card-hover);
}

.model-name-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.model-title {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.provider-pill {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fff;
  font-size: 0.92rem;
}

.price-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cache-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: all var(--transition-fast);
}

.table-action-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.pricing-table th:last-child,
.pricing-table td:last-child {
  text-align: right;
  white-space: nowrap;
  min-width: 150px;
}

/* Quick FinOps Calculator Widget */
.calc-section {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 4rem;
  box-shadow: var(--shadow-card);
}

.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-heading {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 650px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 880px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-field label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.calc-field-value {
  color: #fff;
  font-family: var(--font-mono);
}

.range-slider {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
  border: 2px solid #fff;
}

.calc-results {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.results-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.results-comparison-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.calc-res-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
}

.calc-res-item.highlight {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.calc-res-model {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
}

.calc-res-bill {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.savings-callout {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  color: var(--accent-emerald);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

/* Comparison Shortcut Grid */
.comparisons-section {
  margin-bottom: 4rem;
}

.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.comp-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

.comp-models {
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.comp-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.comp-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* FAQ Section */
.faq-section {
  margin-bottom: 4.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.faq-answer {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 0.75rem;
  max-width: 320px;
  line-height: 1.5;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Monetization & GPU Cloud Affiliate Cards */
.gpu-affiliate-section {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 4rem;
  box-shadow: var(--shadow-card);
}

.gpu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.gpu-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.gpu-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
}

.gpu-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gpu-card-price {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin: 0.5rem 0 0.25rem;
}

.gpu-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.gpu-btn {
  background: var(--accent-primary);
  color: #fff;
  text-align: center;
  padding: 0.55rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.gpu-btn:hover {
  background: var(--accent-primary-hover);
}

/* Native B2B Ad Slot */
.ad-slot-container {
  margin: 2.5rem 0;
  padding: 1rem;
  background: rgba(14, 17, 23, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  text-align: center;
}

.ad-slot-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
