/* ========================================
   100xGood Design System — Components
   Updated: April 2026
   ======================================== */

/* ===================
   BUTTONS
   =================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  color: var(--btn-primary-text);
}

.btn-outline {
  background: transparent;
  color: var(--btn-outline-text);
  border-color: var(--btn-outline-border);
  position: relative;
}

.btn-outline::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid var(--btn-outline-border);
  opacity: 0.3;
  border-radius: 3px;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.btn-outline:hover {
  background: var(--btn-primary-hover);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-hover);
}

.btn-outline:hover::after { opacity: 0; }

.btn-bracket { position: relative; }

.btn-sm { padding: 0.5rem 1rem; font-size: var(--text-xs); }
.btn-lg { padding: 0.85rem 2rem; font-size: var(--text-base); }

/* ===================
   SECTION LABELS (diamond bullet)
   =================== */

.section-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--amethyst);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.section-label-amethyst::before { background: var(--amethyst); }
.section-label-jade::before { background: var(--jade); }
.section-label-citrine::before { background: var(--citrine); }
.section-label-rose::before { background: var(--rose-quartz); }
.section-label-violet::before { background: var(--violet-topaz); }

/* Bracket label (Plex Mono with terminal brackets) */
.bracket-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.bracket-label::before { content: '├─'; opacity: 0.5; }
.bracket-label::after { content: '─┤'; opacity: 0.5; }

/* ===================
   CARDS
   =================== */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.card-bordered {
  border-left-width: 3px;
  padding-left: var(--space-6);
}

.card-bordered-amethyst { border-left-color: var(--amethyst); }
.card-bordered-jade { border-left-color: var(--jade); }
.card-bordered-citrine { border-left-color: var(--citrine); }
.card-bordered-rose { border-left-color: var(--rose-quartz); }
.card-bordered-violet { border-left-color: var(--violet-topaz); }

/* Feature card (centered, with icon) */
.feature-card {
  text-align: center;
  padding: var(--space-8);
}

.feature-card-icon {
  color: var(--icon-color);
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: center;
}

.feature-card-icon svg {
  width: 48px;
  height: 48px;
}

.feature-card h4 { margin-bottom: var(--space-3); }

.feature-card p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ===================
   GEMSTONE ICON SYSTEM
   Documented in ICON_SYSTEM.md

   Usage: Inline the SVG from ICON_SYSTEM.md per service/industry, and either:
   - Wrap with <span class="gem-icon">...</span> for default Amethyst
   - Override color per card: <span class="gem-icon" style="--icon-color: #5F509D">...</span>
   =================== */

.gem-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--icon-color);
}

.gem-icon svg {
  width: 48px;
  height: 48px;
}

.gem-icon-sm { width: 32px; height: 32px; }
.gem-icon-sm svg { width: 24px; height: 24px; }

.gem-icon-lg { width: 72px; height: 72px; }
.gem-icon-lg svg { width: 64px; height: 64px; }

/* Feature card with gem icon — centered variant */
.feature-card.gem-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.feature-card.gem-card .gem-icon {
  margin-bottom: 0.25rem;
}

/* Methodology pillar with gem icon */
.methodology-phase .gem-icon {
  margin-bottom: var(--space-4);
}

/* ===================
   HERO DIAGRAM FRAME
   Documented in HERO_DIAGRAMS.md

   Usage:
   <div class="hero-diagram">
     <span class="bracket-bl"></span><span class="bracket-br"></span>
     <div class="diagram-eyebrow diagram-eyebrow-jade">◆ Pipeline health</div>
     ... diagram content ...
     <div class="harmony-bar harmony-bar-accent">
       <div></div><div></div><div></div><div></div><div></div><div></div>
     </div>
   </div>
   =================== */

.hero-diagram {
  background: var(--opal);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .hero-diagram {
  background: var(--obsidian);
}

/* Top brackets via pseudo-elements */
.hero-diagram::before,
.hero-diagram::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--amethyst);
  border-style: solid;
  opacity: 0.4;
  pointer-events: none;
}

.hero-diagram::before {
  top: 12px; left: 12px;
  border-width: 1.5px 0 0 1.5px;
}

.hero-diagram::after {
  top: 12px; right: 12px;
  border-width: 1.5px 1.5px 0 0;
}

/* Bottom brackets via spans */
.hero-diagram .bracket-bl,
.hero-diagram .bracket-br {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--amethyst);
  border-style: solid;
  opacity: 0.4;
  pointer-events: none;
}

.hero-diagram .bracket-bl {
  bottom: 12px; left: 12px;
  border-width: 0 0 1.5px 1.5px;
}

.hero-diagram .bracket-br {
  bottom: 12px; right: 12px;
  border-width: 0 1.5px 1.5px 0;
}

/* Diagram eyebrow (Plex Mono + diamond bullet) */
.diagram-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.diagram-eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--amethyst);
  transform: rotate(45deg);
  display: inline-block;
  flex-shrink: 0;
}

.diagram-eyebrow-jade::before { background: var(--jade); }
.diagram-eyebrow-citrine::before { background: var(--citrine); }
.diagram-eyebrow-rose::before { background: var(--rose-quartz); }
.diagram-eyebrow-violet::before { background: var(--violet-topaz); }

/* ===================
   HERO DIAGRAM PATTERN 1: FUNNEL
   =================== */

.funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.funnel-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.funnel-bar {
  flex: 1;
  height: 40px;
  border: 1px solid;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.funnel-label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
}

.funnel-number {
  font-family: var(--font-display-sans);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  min-width: 32px;
  text-align: right;
}

@media (max-width: 600px) {
  .funnel-stage { flex-direction: column; gap: 2px; }
  .funnel-number { text-align: center; font-size: 18px; }
  .funnel-bar { max-width: 100% !important; }
}

/* ===================
   HERO DIAGRAM PATTERN 4: PROCESS FLOW
   =================== */

.process-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 0 var(--space-4);
}

.process-number {
  font-family: var(--font-display-sans);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.process-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-heading);
}

.process-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
}

.process-arrow {
  padding: 0 4px;
  margin-top: -20px;
  color: var(--border);
}

@media (max-width: 600px) {
  .process-flow { flex-direction: column; gap: var(--space-4); }
  .process-arrow { transform: rotate(90deg); margin-top: 0; }
}

/* ===================
   HERO DIAGRAM PATTERN 5: STAT COMPARISON
   =================== */

.stat-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}

.stat-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-display-sans);
  font-weight: 800;
  font-size: 48px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-block .stat-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-heading);
  margin-top: 4px;
}

.stat-context {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 60px;
  background: var(--border);
}

.stat-before .stat-value { color: var(--cement); }

@media (max-width: 500px) {
  .stat-compare { flex-direction: column; gap: var(--space-6); }
  .stat-divider { width: 40px; height: 1px; }
}

/* ===================
   STAT COLORS (text utility)
   =================== */

.stat-color-1 { color: var(--stat-1); }
.stat-color-2 { color: var(--stat-2); }
.stat-color-3 { color: var(--stat-3); }
.stat-color-4 { color: var(--stat-4); }
.stat-color-5 { color: var(--stat-5); }

/* ===================
   FORMS
   =================== */

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-default);
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--amethyst);
}

.form-input::placeholder { color: var(--text-muted); }

.form-label {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}

.form-group { margin-bottom: var(--space-4); }

/* ===================
   LISTS
   =================== */

.list-check {
  list-style: none;
}

.list-check li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: var(--text-sm);
}

.list-check li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--jade);
  border-radius: var(--radius-full);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* Diamond-bulleted list (matches section-label motif) */
.list-diamond {
  list-style: none;
}

.list-diamond li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: var(--text-sm);
}

.list-diamond li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--amethyst);
  transform: rotate(45deg);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* ===================
   BADGES
   =================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.25rem 0.75rem;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.badge-default {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.badge-primary {
  background: var(--amethyst);
  color: var(--white);
}

.badge-success {
  background: var(--jade);
  color: var(--white);
}

.badge-minsk {
  background: var(--minsk);
  color: var(--white);
}

.badge-minsk-subtle {
  background: rgba(71, 57, 130, 0.12);
  color: var(--minsk);
}

.badge-citrine {
  background: var(--citrine);
  color: var(--obsidian);
}

.badge-citrine-subtle {
  background: rgba(205, 168, 73, 0.15);
  color: var(--citrine-deep);
}

.badge-violet {
  background: rgba(95, 80, 157, 0.1);
  color: var(--violet-topaz);
}

.badge-rose {
  background: rgba(245, 192, 192, 0.15);
  color: var(--eggplant);
}

.badge-jade-subtle {
  background: rgba(92, 177, 152, 0.12);
  color: var(--jade);
}

/* ===================
   LINKS
   =================== */

.link-arrow {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: none;
  text-decoration: none;
}

.link-arrow:hover { color: var(--amethyst); }

.link-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.link-arrow:hover::after { transform: translateX(4px); }

/* ===================
   TESTIMONIALS
   =================== */

.testimonial {
  position: relative;
  padding-left: var(--space-6);
}

.testimonial::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -0.5rem;
  font-family: var(--font-display-serif);
  font-size: 3rem;
  color: var(--amethyst);
  line-height: 1;
}

.testimonial-text {
  font-family: var(--font-display-serif);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-heading);
  margin-bottom: var(--space-4);
}

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

.testimonial-avatar {
  width: 48px;
  height: 48px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display-sans);
  font-weight: 700;
  color: var(--amethyst);
}

.testimonial-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-heading);
}

.testimonial-role {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Attribution bar (alternative to avatar — for real client attributions) */
.attribution {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.attribution::before {
  content: '';
  width: 2px;
  height: 32px;
  background: var(--amethyst);
  border-radius: 1px;
}

/* ===================
   CODE BLOCKS
   =================== */

.code-block {
  background: var(--obsidian);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--rose-quartz);
  overflow-x: auto;
}

.code-block .keyword { color: var(--amethyst); }
.code-block .string { color: var(--jade); }
.code-block .comment { color: var(--cement); }
.code-block .function { color: var(--citrine); }

/* ===================
   CORNER BRACKETS (Brand Motif)
   =================== */

.corner-brackets {
  position: relative;
}

.corner-brackets::before,
.corner-brackets::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--amethyst);
  border-style: solid;
  opacity: 0.45;
  pointer-events: none;
}

.corner-brackets::before {
  top: 1rem; left: 1rem;
  border-width: 2px 0 0 2px;
}

.corner-brackets::after {
  top: 1rem; right: 1rem;
  border-width: 2px 2px 0 0;
}

/* Full 4-corner variant (requires .corner divs with tl/tr/bl/br modifiers) */
.corner-brackets-full { position: relative; }

.corner-brackets-full .corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--amethyst);
  border-style: solid;
  opacity: 0.45;
  pointer-events: none;
}

.corner-brackets-full .corner-tl { top: 1rem; left: 1rem; border-width: 2px 0 0 2px; }
.corner-brackets-full .corner-tr { top: 1rem; right: 1rem; border-width: 2px 2px 0 0; }
.corner-brackets-full .corner-bl { bottom: 1rem; left: 1rem; border-width: 0 0 2px 2px; }
.corner-brackets-full .corner-br { bottom: 1rem; right: 1rem; border-width: 0 2px 2px 0; }

/* Bracket color variants */
.corner-brackets-jade::before,
.corner-brackets-jade::after,
.corner-brackets-full.corner-brackets-jade .corner { border-color: var(--jade); }

.corner-brackets-rose::before,
.corner-brackets-rose::after,
.corner-brackets-full.corner-brackets-rose .corner { border-color: var(--rose-quartz); }

.corner-brackets-citrine::before,
.corner-brackets-citrine::after,
.corner-brackets-full.corner-brackets-citrine .corner { border-color: var(--citrine); }

.corner-brackets-violet::before,
.corner-brackets-violet::after,
.corner-brackets-full.corner-brackets-violet .corner { border-color: var(--violet-topaz); }

/* ===================
   PROGRESS BARS
   =================== */

.progress {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--violet-topaz), var(--amethyst));
  border-radius: 3px;
  transition: width var(--transition-base);
}

.progress-jade .progress-fill { background: var(--jade); }
.progress-citrine .progress-fill { background: linear-gradient(90deg, var(--jade), var(--citrine)); }

/* ===================
   HARMONY BAR (Brand Motif)
   =================== */

.harmony-bar {
  display: flex;
  height: 4px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
}

.harmony-bar > div { flex: 1; }

/* 6-color accent (used on cards, diagrams, deck slides) */
.harmony-bar-accent > div:nth-child(1) { background: var(--minsk); }
.harmony-bar-accent > div:nth-child(2) { background: var(--violet-topaz); }
.harmony-bar-accent > div:nth-child(3) { background: var(--amethyst); }
.harmony-bar-accent > div:nth-child(4) { background: var(--rose-quartz); }
.harmony-bar-accent > div:nth-child(5) { background: var(--jade); }
.harmony-bar-accent > div:nth-child(6) { background: var(--citrine); }

/* 12-color full palette (used on covers and footers only) */
.harmony-bar-full > div:nth-child(1)  { background: var(--black); }
.harmony-bar-full > div:nth-child(2)  { background: var(--obsidian); }
.harmony-bar-full > div:nth-child(3)  { background: var(--eggplant); }
.harmony-bar-full > div:nth-child(4)  { background: var(--minsk); }
.harmony-bar-full > div:nth-child(5)  { background: var(--violet-topaz); }
.harmony-bar-full > div:nth-child(6)  { background: var(--amethyst); }
.harmony-bar-full > div:nth-child(7)  { background: var(--rose-quartz); }
.harmony-bar-full > div:nth-child(8)  { background: var(--jade); }
.harmony-bar-full > div:nth-child(9)  { background: var(--citrine); }
.harmony-bar-full > div:nth-child(10) { background: var(--cement); }
.harmony-bar-full > div:nth-child(11) { background: var(--opal); }
.harmony-bar-full > div:nth-child(12) { background: var(--white); }

/* ===================
   HIGHLIGHT MARKER
   =================== */

.highlight {
  background: rgba(205, 168, 73, 0.2);
  color: var(--eggplant);
  padding: 0.05rem 0.25rem;
  border-radius: 2px;
}

/* ===================
   TREND INDICATORS
   =================== */

.trend-up {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-display-sans);
  font-weight: 800;
  color: var(--jade);
}

.trend-up::before { content: '↑'; }

.trend-down {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-display-sans);
  font-weight: 800;
  color: #c0665e;
}

.trend-down::before { content: '↓'; }
