/* ==========================================================
   DESIGNTECH - Base Styles, Reset, Utilities & UI Components
   ========================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-subtle);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-grey);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  color: var(--text-muted);
  font-size: var(--text-base);
  margin-bottom: 0.75rem;
}

p:last-child {
  margin-bottom: 0;
}

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

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

img, svg {
  display: block;
  max-width: 100%;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-wide {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-sm {
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled, .btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background-color: var(--primary-coral);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(249, 115, 96, 0.28);
}

.btn-primary:hover {
  background-color: var(--deep-coral);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(232, 93, 63, 0.35);
}

.btn-secondary {
  background-color: var(--soft-beige);
  color: var(--charcoal);
  border-color: var(--border-main);
}

.btn-secondary:hover {
  background-color: #ede3d7;
  color: var(--charcoal);
}

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

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

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-coral {
  background-color: var(--light-coral);
  color: var(--deep-coral);
  border: 1px solid rgba(249, 115, 96, 0.25);
}

.badge-subtle {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-main);
}

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

/* Cards */
.dt-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(232, 221, 210, 0.95);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: 0 4px 20px -2px rgba(41, 37, 36, 0.05), 0 1px 3px rgba(41, 37, 36, 0.03);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.dt-card:hover {
  box-shadow: 0 10px 28px -4px rgba(41, 37, 36, 0.09);
  border-color: rgba(249, 115, 96, 0.4);
}

.dt-card-interactive {
  cursor: pointer;
}

.dt-card-interactive:hover {
  transform: translateY(-3px);
  border-color: var(--primary-coral);
  box-shadow: 0 10px 28px rgba(249, 115, 96, 0.18);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.95rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-coral);
  box-shadow: 0 0 0 3px rgba(249, 115, 96, 0.15);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

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

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-action-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.input-action-btn:hover {
  color: var(--primary-coral);
}

.form-helper {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  display: none;
}

.form-group.has-error .form-input {
  border-color: var(--color-error);
}

.form-group.has-error .form-error {
  display: block;
}

/* Modals */
.dt-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(41, 37, 36, 0.45);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.dt-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.dt-modal {
  background-color: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-normal);
  overflow: hidden;
}

.dt-modal-backdrop.active .dt-modal {
  transform: translateY(0) scale(1);
}

.dt-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dt-modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-main);
}

.dt-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  display: flex;
}

.dt-modal-close:hover {
  color: var(--primary-coral);
  background-color: var(--light-coral);
}

.dt-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.dt-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: var(--bg-subtle);
}

/* Toast Container */
.dt-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.dt-toast {
  pointer-events: auto;
  background-color: var(--charcoal);
  color: var(--white);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 420px;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
  border-left: 4px solid var(--primary-coral);
}

.dt-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.dt-toast-success {
  border-left-color: var(--color-success);
}

.dt-toast-error {
  border-left-color: var(--color-error);
}

.dt-toast-info {
  border-left-color: var(--primary-coral);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  padding: 0.5rem 0;
  z-index: var(--z-sticky);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-fast);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  font-size: var(--text-sm);
  color: var(--text-main);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-subtle);
  color: var(--primary-coral);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 0.4rem 0;
}

/* Section Common Styling */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-tag {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 0.85rem;
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-muted);
}

/* ==========================================================
   Cookie Consent Popup Banner (Site Load)
   ========================================================== */
.dt-cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: auto;
  max-width: 500px;
  width: calc(100% - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-2xl);
  box-shadow: 0 18px 48px rgba(41, 37, 36, 0.16), 0 4px 12px rgba(41, 37, 36, 0.08);
  padding: 1.5rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.dt-cookie-banner.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dt-cookie-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.dt-cookie-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xl);
  background: var(--light-coral);
  color: var(--primary-coral);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dt-cookie-text {
  flex: 1;
}

.dt-cookie-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.dt-cookie-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.55;
}

.dt-cookie-desc a {
  color: var(--primary-coral);
  text-decoration: underline;
  font-weight: 600;
}

.dt-cookie-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

@media (max-width: 600px) {
  .dt-cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
    padding: 1.25rem;
  }
  .dt-cookie-actions {
    flex-direction: column-reverse;
    width: 100%;
  }
  .dt-cookie-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
