/* 
  ===============================================
  1. GLOBAL TOKENS (Async Extensions)
  ===============================================
*/
:root {
  --color-accent: hsl(var(--hue), 80%, 50%);
  --color-accent-hover: hsl(var(--hue), 80%, 45%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-accent: hsl(var(--hue), 70%, 60%);
    --color-accent-hover: hsl(var(--hue), 70%, 55%);
  }
}

/* 
  ===============================================
  2. ACCESSIBILITY & INTERACTION
  ===============================================
*/
/* Standardized focus visible state */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* 
  ===============================================
  3. LAYOUT PATTERNS (Macro-Architecture)
  ===============================================
*/
/* The Stack: Vertical rhythm with configurable gap */
.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.stack > * + * {
  margin-top: var(--stack-gap, var(--step-4));
}

/* Auto Grid: Responsive grid without media queries */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--grid-gap, var(--step-8));
}

/* Cluster: Horizontal flex with wrapping */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, var(--step-4));
}

/* Section Padding: Global vertical rhythm */
.section-pad {
  padding-top: var(--step-section);
  padding-bottom: var(--step-section);
}

/* 
  ===============================================
  4. VISUAL UTILITIES
  ===============================================
*/
/* Glassmorphism */
.glass {
  background-color: var(--color-surface-100); /* Fallback */
  background-color: var(--color-surface-alpha);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
}

/* Card */
.card {
  background-color: var(--color-surface-200);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--step-8);
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), border-color var(--trans-fast);
}

@media (prefers-reduced-motion: no-preference) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-text-500);
  }
}

/* 
  ===============================================
  5. UI COMPONENTS (Base)
  ===============================================
*/
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--step-3) var(--step-6);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--trans-base), color var(--trans-base), opacity var(--trans-base), transform var(--trans-fast);
}

.btn-primary {
  background-color: var(--color-text-900);
  color: var(--color-surface-100);
}

@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
  }
  .btn-primary:active {
    transform: translateY(0);
  }
}

/* Form Elements */
.input-field {
  width: 100%;
  padding: var(--step-4);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface-100);
  color: var(--color-text-900);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-base);
  transition: border-color var(--trans-fast);
}

.input-field:focus {
  outline: none;
  border-color: var(--color-text-900);
}

textarea.input-field {
  min-height: 120px;
  resize: vertical;
}

/* Form Status Messages (JS dependency) */
.form-status {
  font-size: var(--text-sm);
  min-height: 20px;
}
.form-status.success { color: #2e7d32; }
.form-status.error { color: #d32f2f; }

@media (prefers-color-scheme: dark) {
  .form-status.success { color: #81c784; }
  .form-status.error { color: #e57373; }
}

/* Typography Helpers */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-500); }
.text-title { font-size: var(--text-2xl); letter-spacing: var(--tracking-tight); font-weight: 700; margin-bottom: var(--step-8); }
.text-hero { font-size: var(--text-hero); letter-spacing: var(--tracking-tight); font-weight: 700; line-height: 1.1; }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

/* 
  ===============================================
  6. DRAWING ICONS & SOCIAL
  ===============================================
*/
/* Unicode Icons */
.ui-icon { font-weight: 400; line-height: 1; user-select: none; display: inline-block; }

/* Competency Icons: Pure CSS Drawings */
.drawing-icon { width: 48px; height: 48px; position: relative; display: flex; align-items: center; justify-content: center; color: var(--color-accent); flex-shrink: 0; }
.drawing-icon::before, .drawing-icon::after { content: ''; position: absolute; background: currentColor; }

.icon-arch::before { width: 28px; height: 2px; bottom: 10px; }
.icon-arch::after { width: 4px; height: 16px; bottom: 12px; left: 10px; box-shadow: 10px 0 0 0 currentColor, 20px 0 0 0 currentColor; }

.icon-d2c::before { width: 24px; height: 24px; border: 2px solid currentColor; border-radius: 50%; background: transparent; }
.icon-d2c::after { width: 8px; height: 8px; border-radius: 1px; }

.icon-cee::before { width: 2px; height: 24px; left: 14px; }
.icon-cee::after { width: 0; height: 0; background: transparent; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 12px solid currentColor; left: 16px; }

.icon-cap::before { width: 5px; height: 10px; bottom: 12px; left: 10px; box-shadow: 9px -7px 0 0 currentColor, 18px -14px 0 0 currentColor; }
.icon-cap::after { width: 28px; height: 2px; bottom: 10px; }

.icon-infra::before { width: 18px; height: 18px; border: 2px solid currentColor; top: 10px; left: 10px; border-radius: 2px; background: transparent; }
.icon-infra::after { width: 18px; height: 18px; border: 2px solid currentColor; bottom: 10px; right: 10px; border-radius: 2px; background: transparent; }

.icon-risk::before { width: 22px; height: 26px; border: 2px solid currentColor; border-radius: 0 0 11px 11px; background: transparent; }
.icon-risk::after { width: 2px; height: 12px; top: 14px; }

.icon-social { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 32px; height: 32px; background-color: var(--color-text-900); color: var(--color-surface-100); border-radius: 50%; font-family: Arial, Helvetica, sans-serif; font-weight: bold; line-height: 1; transition: transform var(--trans-fast), filter var(--trans-fast); }
.icon-social:hover { transform: translateY(-2px); filter: brightness(1.2); }
.icon-fb { align-items: flex-end; padding-bottom: 0.2rem; font-size: 1.2rem; }
.icon-in { font-size: 0.85rem; padding-right: 1px; }
.icon-wa { border-bottom-left-radius: 4px; font-size: 1.1rem; }
.icon-wa span { transform: rotate(-15deg); margin-top: -1px; }
.icon-tg { font-size: 1.1rem; }
.icon-tg span { transform: rotate(-35deg) translate(2px, -1px); font-size: 0.8rem; }
