/* ============================================================================
   The Decorators Association - Pricing Benchmark Tool
   Dark Workshop Theme | Production CSS
   ============================================================================ */

/* ============================================================================
   1. CSS CUSTOM PROPERTIES & ROOT VARIABLES
   ============================================================================ */

:root {
    --ink: #0D0C0B;
    --warm-black: #141210;
    --offwhite: #F5F2EC;
    --cream: #EAE5DC;
    --volt: #C8F000;
    --orange: #E85A1A;
    --mid-gray: #6B6660;
    --light-gray: #B8B3AB;
    --rule: rgba(255,255,255,0.08);
    --rule-light: rgba(0,0,0,0.1);
}

/* ============================================================================
   2. RESET & BASE STYLES
   ============================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--warm-black);
  color: var(--offwhite);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--offwhite);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

p {
  color: var(--light-gray);
  margin-bottom: 16px;
}

a {
  color: var(--volt);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--orange);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

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

/* ============================================================================
   4. CONTAINER & LAYOUT
   ============================================================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }
}

.section {
  padding: 64px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 32px 0;
  }
}

/* ============================================================================
   5. HERO SECTION
   ============================================================================ */

.pricing-hero {
  position: relative;
  background: var(--warm-black);
  overflow: hidden;
  padding: 64px 0;
}

.pricing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 0.5;
  pointer-events: none;
}

.pricing-hero .container {
  position: relative;
  z-index: 1;
}

.pricing-hero h1 {
  color: var(--offwhite);
  margin-bottom: 16px;
  text-align: center;
}

.pricing-hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--light-gray);
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .pricing-hero {
    padding: 48px 0;
  }
}

/* ============================================================================
   6. FILTER BAR / STICKY TOOLBAR
   ============================================================================ */

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--warm-black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  
  padding: 24px 0;
  margin-bottom: 64px;
}

.filter-bar .container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 1024px) {
  .filter-bar .container {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }
}

/* Filter Section Spacing */
.filter-section {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  flex: 1;
}

.filter-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mid-gray);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .filter-bar {
    padding: 16px 0;
    margin-bottom: 48px;
  }

  .filter-bar .container {
    gap: 24px;
  }

  .filter-section {
    gap: 16px;
  }

  .filter-label {
    display: none;
  }
}

/* ============================================================================
   6.1 METHOD TABS (Segmented Control)
   ============================================================================ */

.method-tabs {
  display: flex;
  gap: 4px;
  background: #1C1916;
  padding: 4px;
  
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.method-tabs button {
  flex: 1;
  padding: 8px 16px;
  
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--light-gray);
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.method-tabs button:hover {
  color: var(--offwhite);
}

.method-tabs button.active {
  background: var(--volt);
  color: var(--warm-black);
  box-shadow: none;
}

@media (max-width: 768px) {
  .method-tabs {
    width: 100%;
  }

  .method-tabs button {
    padding: 8px;
    font-size: 0.8rem;
  }
}

/* ============================================================================
   6.2 QUANTITY TIER BUTTONS
   ============================================================================ */

.quantity-tiers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.quantity-tiers button {
  padding: 8px 24px;
  
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--light-gray);
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quantity-tiers button:hover {
  border-color: var(--volt);
  color: var(--offwhite);
}

.quantity-tiers button.active {
  background: var(--volt);
  border-color: var(--volt);
  color: var(--warm-black);
  box-shadow: none;
}

@media (max-width: 768px) {
  .quantity-tiers {
    width: 100%;
    justify-content: flex-start;
  }

  .quantity-tiers button {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

/* ============================================================================
   6.3 DROPDOWN SELECTS
   ============================================================================ */

.filter-select-group {
  display: flex;
  gap: 16px;
  flex: 1;
  flex-wrap: wrap;
}

.filter-select {
  flex: 1;
  min-width: 150px;
  padding: 8px 16px;
  background: #1C1916;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--offwhite);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23F5F0EB' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px;
}

.filter-select:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: var(--warm-black);
}

.filter-select:focus {
  outline: none;
  border-color: var(--volt);
  outline: 2px solid var(--volt); outline-offset: 2px;
}

.filter-select option {
  background: #1A1714;
  color: var(--offwhite);
}

@media (max-width: 768px) {
  .filter-select-group {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .filter-select {
    width: 100%;
    min-width: unset;
  }
}

/* ============================================================================
   7. BENCHMARK DISPLAY / VISUALIZATION
   ============================================================================ */

.benchmark-section {
  position: relative;
}

.benchmark-card {
  background: #1A1714;
  border: 1px solid rgba(255, 255, 255, 0.05);
  
  padding: 48px;
  
}

@media (max-width: 768px) {
  .benchmark-card {
    padding: 32px;
  }
}

@media (max-width: 480px) {
  .benchmark-card {
    padding: 24px;
  }
}

/* ============================================================================
   7.1 BENCHMARK VISUALIZATION BAR
   ============================================================================ */

.benchmark-visualization {
  margin: 48px 0;
}

.benchmark-chart-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mid-gray);
  margin-bottom: 24px;
}

/* Public Benchmark Band */
.benchmark-band {
  margin-bottom: 48px;
}

.benchmark-band-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--offwhite);
}

.benchmark-band-label::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--volt);
}

/* Bar Track */
.bar-track {
  position: relative;
  height: 40px;
  background: #1C1916;
  
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Bar Fill with Gradient */
.bar-fill {
  position: absolute;
  height: 100%;
  background: var(--volt);
  
  display: flex;
  align-items: center;
  transition: all 0.4s ease;
}

/* Tick Marks on Bar */
.bar-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
}

.tick {
  position: relative;
  flex: 1;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.tick:last-child {
  border-right: none;
}

.tick-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--mid-gray);
  font-weight: 600;
  white-space: nowrap;
}

.bar-prices {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  pointer-events: none;
}

.price-marker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
}

.price-marker-value {
  font-size: 0.875rem;
  color: var(--warm-black);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.price-marker-label {
  font-size: 0.65rem;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Member Band (Phase 2) */
.benchmark-band.member-band {
  opacity: 0.6;
}

.benchmark-band.member-band .benchmark-band-label {
  color: var(--mid-gray);
}

.benchmark-band.member-band .benchmark-band-label::before {
  background: var(--volt);
  opacity: 0.4;
}

.benchmark-band.member-band .bar-fill {
  background: var(--volt);
  opacity: 0.4;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 16px;
  background: rgba(200, 240, 0, 0.1);
  border: 1px solid rgba(200, 240, 0, 0.3);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--volt);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: 8px;
}

@media (max-width: 768px) {
  .bar-track {
    height: 36px;
  }

  .tick-label {
    font-size: 0.7rem;
    margin-top: 4px;
  }

  .price-marker-value {
    font-size: 0.8rem;
  }

  .price-marker-label {
    display: none;
  }
}

/* ============================================================================
   7.2 BENCHMARK CALLOUT TEXT
   ============================================================================ */

.benchmark-callout {
  margin-top: 48px;
  padding: 24px;
  background: rgba(200, 240, 0, 0.08);
  border-left: 3px solid var(--volt);
  
}

.benchmark-callout p {
  color: var(--offwhite);
  margin: 0;
  line-height: 1.7;
}

.benchmark-callout strong {
  color: var(--volt);
  font-weight: 700;
}

.benchmark-callout code {
  font-family: 'Space Mono', monospace;
  background: #1C1916;
  padding: 2px 6px;
  
  color: var(--volt);
}

/* ============================================================================
   8. STATUS / DATA SOURCE BAR
   ============================================================================ */

.status-bar {
  background: rgba(245, 240, 235, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px;
  margin: 64px 0;
  font-size: 0.875rem;
  color: var(--light-gray);
  line-height: 1.6;
}

.status-bar .container {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (max-width: 768px) {
  .status-bar {
    padding: 16px;
  }

  .status-bar .container {
    gap: 16px;
  }

  .status-bar {
    font-size: 0.8rem;
  }
}

/* ============================================================================
   9. SUBMIT / MEMBER CTA SECTION
   ============================================================================ */

.member-section {
  background: #1A1714;
  border: 1px solid rgba(255, 255, 255, 0.05);
  
  padding: 48px;
  text-align: center;
}

.member-section h2 {
  color: var(--offwhite);
  margin-bottom: 16px;
}

.member-section p {
  color: var(--light-gray);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.member-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 48px;
  background: var(--volt);
  color: var(--warm-black);
  border: 2px solid var(--volt);
  
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  box-shadow: none;
}

.member-cta:hover {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: none;
  transform: translateY(-2px);
}

.member-cta:active {
  transform: translateY(0);
}

.member-cta svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .member-section {
    padding: 32px;
  }

  .member-cta {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================================
   10. FOOTER AREA
   ============================================================================ */

.pricing-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 48px 0;
  color: var(--mid-gray);
  font-size: 0.875rem;
  text-align: center;
}

.pricing-footer p {
  margin: 0;
  color: var(--mid-gray);
}

.pricing-footer a {
  color: var(--volt);
  font-weight: 600;
}

.pricing-footer a:hover {
  color: var(--orange);
}

/* ============================================================================
   11. ACCESSIBILITY & FOCUS STATES
   ============================================================================ */

/* Keyboard Navigation Focus Rings */
button:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
  border-radius: 4px;
}

select:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
  .filter-bar {
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  }

  .benchmark-card {
    border: 2px solid rgba(255, 255, 255, 0.12);
  }

  button {
    border-width: 2px;
  }
}

/* ============================================================================
   12. UTILITY CLASSES
   ============================================================================ */

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

.no-wrap {
  white-space: nowrap;
}

.text-center {
  text-align: center;
}

.text-orange {
  color: var(--volt);
}

.text-cyan {
  color: var(--volt);
}

.text-gold {
  color: var(--orange);
}

.text-muted {
  color: var(--mid-gray);
}

/* ============================================================================
   13. RESPONSIVE PRINT STYLES
   ============================================================================ */

@media print {
  .filter-bar,
  .status-bar {
    display: none;
  }

  .benchmark-card {
    border: 1px solid #ccc;
    background: white;
    color: black;
  }

  .benchmark-visualization {
    break-inside: avoid;
  }
}

/* ============================================================================
   14. DARK MODE ENHANCEMENTS (Systems already in dark mode)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  /* Already dark by default, but can add enhancements here */
  .filter-select {
    background-color: #1C1916;
  }
}

/* ============================================================================
   15. ANIMATION KEYFRAMES
   ============================================================================ */

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-slide-down {
  animation: slideInDown 0.4s ease ease-out;
}

.animate-slide-up {
  animation: slideInUp 0.4s ease ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.2s ease ease-out;
}

/* ============================================================================
   16. ADDITIONAL STATES & ELEMENTS
   ============================================================================ */

/* Filter Row Layout */
.filter-row {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  width: 100%;
}

@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
}

/* Empty / No-Data / Loading States */
.benchmark-empty,
.benchmark-no-data,
.benchmark-loading {
  text-align: center;
  padding: 64px 32px;
}

.benchmark-empty .empty-icon,
.benchmark-no-data .empty-icon {
  font-size: 3rem;
  margin-bottom: 24px;
  opacity: 0.6;
}

.benchmark-empty h3,
.benchmark-no-data h3 {
  color: var(--offwhite);
  margin-bottom: 8px;
}

.benchmark-empty p,
.benchmark-no-data p {
  color: var(--light-gray);
  max-width: 400px;
  margin: 0 auto;
}

.benchmark-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--volt);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Bar Price Labels (below the bar) */
.bar-price-labels {
  position: relative;
  height: 40px;
  margin-top: 4px;
}

.bar-price-label {
  position: absolute;
  transform: translateX(-50%);
  text-align: center;
}

.bar-price-label .price-value {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--offwhite);
  display: block;
}

.bar-price-label .price-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--mid-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bar-price-label.label-lo .price-value { color: var(--orange); }
.bar-price-label.label-mid .price-value { color: var(--volt); }
.bar-price-label.label-hi .price-value { color: var(--orange); }

/* Bar Scale */
.bar-scale {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  margin-bottom: 4px;
}

.bar-scale span {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--mid-gray);
}

/* Source Tag */
.benchmark-source-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--mid-gray);
  margin-left: auto;
}

@media (max-width: 768px) {
  .benchmark-source-tag {
    display: none;
  }
}

/* Member Teaser */
.member-teaser {
  margin-top: 16px;
  padding: 16px;
  background: rgba(200, 240, 0, 0.05);
  border: 1px solid rgba(200, 240, 0, 0.15);
  
}

.member-teaser p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--light-gray);
}

.member-teaser a {
  color: var(--volt);
  font-weight: 600;
}

/* Lock Icon */
.lock-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Submit teaser text */
.submit-teaser {
  font-style: italic;
  font-size: 0.875rem !important;
  color: var(--mid-gray) !important;
}

/* Mid marker line on bar */
.bar-mid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--warm-black);
  opacity: 0.5;
  z-index: 2;
}
