/* ==========================================================================
   Global Base Styles - Altijd Een Monteur House Style
   ========================================================================== */

@import url('variables.css');

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-gray-900);
  background-color: var(--color-white);
}

/* ==========================================================================
   Typography - Clean & Modern
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.01em;
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-700);
  margin-bottom: var(--space-4);
  letter-spacing: -0.005em;
}

.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-700);
  font-weight: var(--font-weight-normal);
}

.small {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-gray-500); }
.text-error { color: var(--color-error); }
.text-success { color: var(--color-success); }

/* ==========================================================================
   Links
   ========================================================================== */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
}

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

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

/* ==========================================================================
   Inputs - Distinctive & Clean
   ========================================================================== */

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

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-700);
  margin-bottom: var(--space-2);
  letter-spacing: 0;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-gray-900);
  background-color: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  appearance: none;
  outline: none;
}

/* Distinctive hover state */
.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--color-gray-300);
  background-color: var(--color-gray-50);
}

/* Eye-catching focus state */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-primary);
  background-color: var(--color-white);
  box-shadow: var(--focus-ring);
  transform: translateY(-1px);
}

/* Placeholder styling */
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-gray-400);
  opacity: 1;
}

/* Autofill styling - prevent browser from changing colors */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active,
.form-textarea:-webkit-autofill,
.form-textarea:-webkit-autofill:hover,
.form-textarea:-webkit-autofill:focus,
.form-textarea:-webkit-autofill:active,
.form-select:-webkit-autofill,
.form-select:-webkit-autofill:hover,
.form-select:-webkit-autofill:focus,
.form-select:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
  -webkit-text-fill-color: #1a1a1a !important;
  background-color: white !important;
  color: #1a1a1a !important;
}

/* Input with icon wrapper */
.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-gray-400);
  pointer-events: none;
  transition: color var(--transition-base);
}

.input-wrapper .form-input {
  padding-left: 3rem;
}

.input-wrapper:focus-within .input-icon {
  color: var(--color-primary);
}

/* Textarea specific */
.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Select specific */
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right var(--space-3) center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* State variations */
.form-input.is-valid,
.form-textarea.is-valid {
  border-color: var(--color-success);
  background-color: var(--color-success-light);
}

.form-input.is-error,
.form-textarea.is-error {
  border-color: var(--color-error);
  background-color: var(--color-error-light);
}

/* Help text */
.form-help {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
  margin-top: var(--space-2);
}

.form-error {
  font-size: var(--font-size-sm);
  color: var(--color-error);
  margin-top: var(--space-2);
}

/* ==========================================================================
   Buttons - Primary Brand Style
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

/* Primary button - Brand color */
.btn-primary {
  color: var(--color-white);
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px 0 rgba(252, 177, 61, 0.25);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px 0 rgba(252, 177, 61, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px 0 rgba(252, 177, 61, 0.25);
}

/* Secondary button - Outline */
.btn-secondary {
  color: var(--color-gray-700);
  background-color: var(--color-white);
  border-color: var(--color-gray-300);
}

.btn-secondary:hover {
  color: var(--color-gray-900);
  background-color: var(--color-gray-50);
  border-color: var(--color-gray-400);
  transform: translateY(-1px);
}

/* Ghost button */
.btn-ghost {
  color: var(--color-gray-600);
  background-color: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}

/* Danger button */
.btn-danger {
  color: var(--color-white);
  background-color: var(--color-error);
  border-color: var(--color-error);
}

.btn-danger:hover {
  background-color: #DC2626;
  border-color: #DC2626;
  transform: translateY(-1px);
}

/* Button sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

/* Full width button */
.btn-block {
  width: 100%;
}

/* Button states */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Loading state */
.btn.is-loading {
  color: transparent;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 1.25em;
  height: 1.25em;
  top: 50%;
  left: 50%;
  margin-left: -0.625em;
  margin-top: -0.625em;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Custom Checkbox
   ========================================================================== */

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-sm);
  margin-right: var(--space-2);
  position: relative;
  transition: all var(--transition-base);
  background: white;
}

.checkbox-input:checked ~ .checkbox-custom {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--transition-base);
}

.checkbox-input:checked ~ .checkbox-custom::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-label {
  color: var(--color-gray-700);
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.hidden {
  display: none;
}

.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;
}

/* ==========================================================================
   Responsive Typography
   ========================================================================== */

@media (min-width: 768px) {
  h1 { font-size: var(--font-size-5xl); }
  h2 { font-size: var(--font-size-4xl); }
  h3 { font-size: var(--font-size-3xl); }
  h4 { font-size: var(--font-size-2xl); }
  h5 { font-size: var(--font-size-xl); }
}