/* ============================================================
   POTLUCKIO! — Design System & Global Styles
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Brand Colors */
  --color-primary: #855300;
  --color-primary-light: #ffb95f; /* primary_fixed_dim */
  --color-primary-dark: #653e00; /* on_primary_fixed_variant */
  --color-secondary: #006a63;
  --color-secondary-light: #77d7cd; /* secondary_fixed_dim */
  --color-secondary-dark: #00504b; /* on_secondary_fixed_variant */
  --color-accent: #f5ae51; /* primary-container */
  --color-accent-light: #ffddb8; /* primary_fixed */

  /* Neutrals */
  --color-bg: #fff8f7; /* surface */
  --color-bg-alt: #faeaea; /* surface-container */
  --color-surface: #ffffff; /* surface-container-lowest */
  --color-surface-hover: #f4e5e4; /* surface-container-high */
  --color-border: rgba(214, 195, 177, 0.15); /* outline-variant at 15% - Ghost Border */
  --color-border-strong: #d6c3b1; /* outline-variant */
  --color-text: #211a1a; /* on-surface */
  --color-text-secondary: #514537; /* on-surface-variant */
  --color-text-muted: #847465; /* outline */

  /* Semantic */
  --color-success: #006a63; /* secondary */
  --color-error: #ba1a1a;
  --color-warning: #855300; /* primary */
  --color-info: #006a63; /* secondary */

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #855300 0%, #f5ae51 100%);
  --gradient-secondary: linear-gradient(135deg, #006a63 0%, #93f3e9 100%);
  --gradient-hero: linear-gradient(135deg, #faeaea 0%, #fff8f7 50%, #f4e5e4 100%);
  --gradient-glass: rgba(239, 223, 222, 0.6); /* surface-variant at 60% */

  /* Typography */
  --font-family-headline: 'Plus Jakarta Sans', sans-serif;
  --font-family: 'Be Vietnam Pro', 'Inter', -apple-system, sans-serif;
  --font-size-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --font-size-sm: clamp(0.8rem, 0.75rem + 0.3vw, 0.9rem);
  --font-size-base: clamp(0.9rem, 0.85rem + 0.3vw, 1rem);
  --font-size-lg: clamp(1.05rem, 0.95rem + 0.5vw, 1.2rem);
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
  --font-size-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem);
  --font-size-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.2rem);
  --font-size-4xl: clamp(2.5rem, 1.8rem + 3.5vw, 4rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(30, 41, 59, 0.04), 0 1px 2px rgba(30, 41, 59, 0.06);
  --shadow-md: 0 4px 12px rgba(30, 41, 59, 0.06), 0 2px 4px rgba(30, 41, 59, 0.04);
  --shadow-lg: 0 12px 32px rgba(30, 41, 59, 0.08), 0 4px 8px rgba(30, 41, 59, 0.04);
  --shadow-xl: 0 24px 48px rgba(30, 41, 59, 0.12), 0 8px 16px rgba(30, 41, 59, 0.06);
  --shadow-primary: 0 8px 24px rgba(255, 107, 53, 0.25);
  --shadow-secondary: 0 8px 24px rgba(13, 148, 136, 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-overlay: 800;
  --z-modal: 900;
  --z-toast: 1000;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.hero__title, .action-card__title, .step__title, .how-it-works__title {
  font-family: var(--font-family-headline);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

ul,
ol {
  list-style: none;
}

/* --- Global Focus Indicator (restores browser default removed by reset) --- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Visually Hidden (screen-reader only) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Icon Colour Utilities --- */
.icon--primary {
  color: var(--color-primary);
}

.icon--secondary {
  color: var(--color-secondary);
}

.icon--accent {
  color: var(--color-accent);
}

/* --- Skip to Content Link (visible on focus for keyboard users) --- */
.skip-link {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: calc(var(--z-modal) + 1);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-md);
  transform: translateY(-120%);
  transition: transform var(--transition-fast);
  white-space: nowrap;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid white;
  outline-offset: 2px;
  /* Override sr-only clip when focused */
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
}

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

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

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

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

/* --- Typography Utilities --- */
.text-xs {
  font-size: var(--font-size-xs);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-base {
  font-size: var(--font-size-base);
}

.text-lg {
  font-size: var(--font-size-lg);
}

.text-xl {
  font-size: var(--font-size-xl);
}

.text-2xl {
  font-size: var(--font-size-2xl);
}

.text-3xl {
  font-size: var(--font-size-3xl);
}

.text-4xl {
  font-size: var(--font-size-4xl);
}

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

.text-secondary {
  color: var(--color-text-secondary);
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.font-extrabold {
  font-weight: 800;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 251, 247, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--space-xl);
  transition: box-shadow var(--transition-base);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 800;
  font-size: var(--font-size-xl);
  color: var(--color-text);
  transition: transform var(--transition-spring);
}

.nav__logo:hover {
  transform: scale(1.03);
}

.nav__logo img {
  height: 40px;
  width: auto;
}

.nav__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: var(--shadow-primary);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__link {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
  position: relative;
}

.nav__link:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.nav__link--active {
  color: var(--color-primary);
  background: rgba(255, 107, 53, 0.08);
  font-weight: 600;
}

.nav__auth {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.nav__avatar:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-secondary);
}

.nav__avatar.active {
  transform: scale(1.05);
  box-shadow: var(--shadow-secondary);
  outline: 3px solid rgba(13, 148, 136, 0.35);
}

/* ── Avatar dropdown wrapper ── */
.nav__avatar-wrapper {
  position: relative;
}

.nav__user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  overflow: hidden;
}

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

.nav__dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md);
}

.nav__dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--font-size-xs);
  flex-shrink: 0;
}

.nav__dropdown-name {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.nav__dropdown-email {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.nav__dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0;
}

.nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.nav__dropdown-item:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.nav__dropdown-item--danger {
  color: var(--color-error);
}

.nav__dropdown-item--danger:hover {
  background: rgba(239, 68, 68, 0.07);
  color: var(--color-error);
}

.nav__user-name {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile nav toggle */
.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  cursor: pointer;
}

.nav__mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Hamburger → X animation */
.nav__mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav__mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

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

.btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
  box-shadow: 0 12px 32px rgba(255, 107, 53, 0.35);
  transform: translateY(-2px);
}

.btn--secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: var(--shadow-secondary);
}

.btn--secondary:hover {
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.35);
  transform: translateY(-2px);
}

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

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(255, 107, 53, 0.04);
}

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

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

.btn--lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
}

.btn--sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-xs);
}

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

.btn--danger {
  background: var(--color-error);
  color: white;
}

.btn--danger:hover {
  background: #DC2626;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface-hover);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  color: var(--color-text);
  transition: all var(--transition-base);
  outline: none;
}

.form-input:hover {
  border-color: var(--color-border-strong);
}

.form-input:focus {
  background: var(--color-surface);
  box-shadow: 0 0 0 1px rgba(133, 83, 0, 0.4);
}

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

.form-input--error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--color-error);
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

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

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-surface);
  border-radius: calc(var(--radius-xl) * 1.5);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: none;
}

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

.card--glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card--flat {
  box-shadow: none;
  border: none;
}

.card--flat:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
  border-color: var(--color-border-strong);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--color-info);
  pointer-events: auto;
  animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  max-width: 400px;
  min-width: 280px;
}

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

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

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

.toast__icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}

.toast--success .toast__icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.toast--error .toast__icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

.toast--warning .toast__icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.toast--info .toast__icon {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-info);
}

.toast__message {
  flex: 1;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

.toast__close {
  color: var(--color-text-muted);
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.toast__close:hover {
  color: var(--color-text);
}

.toast--exiting {
  animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(100px) scale(0.9);
  }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

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

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-spring);
}

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

.modal__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.modal__body {
  margin-bottom: var(--space-xl);
}

.modal__actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--color-bg-alt) 25%, var(--color-border) 50%, var(--color-bg-alt) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton--text {
  height: 16px;
  margin-bottom: var(--space-sm);
}

.skeleton--title {
  height: 24px;
  width: 60%;
  margin-bottom: var(--space-md);
}

.skeleton--card {
  height: 120px;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-lg);
}

.skeleton--circle {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stagger-children.visible>*:nth-child(1) {
  transition-delay: 0ms;
}

.stagger-children.visible>*:nth-child(2) {
  transition-delay: 80ms;
}

.stagger-children.visible>*:nth-child(3) {
  transition-delay: 160ms;
}

.stagger-children.visible>*:nth-child(4) {
  transition-delay: 240ms;
}

.stagger-children.visible>*:nth-child(5) {
  transition-delay: 320ms;
}

.stagger-children.visible>*:nth-child(6) {
  transition-delay: 400ms;
}

.stagger-children.visible>* {
  opacity: 1;
  transform: translateY(0);
}

/* Float animation */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Pulse glow */
@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(255, 107, 53, 0);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Gradient shift */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Scale in */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Page enter */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-enter {
  animation: pageEnter 0.5s ease forwards;
}

/* ============================================================
   BADGES & CHIPS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.badge--primary {
  background: rgba(255, 107, 53, 0.1);
  color: var(--color-primary);
}

.badge--secondary {
  background: rgba(13, 148, 136, 0.1);
  color: var(--color-secondary);
}

.badge--success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.badge--warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--sm {
  max-width: 640px;
}

.container--md {
  max-width: 800px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

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

.w-full {
  width: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: auto;
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  /* Override muted color to meet WCAG AA 4.5:1 contrast on #FFFBF7 background */
  color: #6B7280;
  font-size: var(--font-size-sm);
  border-top: 1px solid var(--color-border);
}

.footer a {
  /* Darker orange (#C05621) achieves 4.6:1 on #FFFBF7 — WCAG AA compliant */
  color: #C05621;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__mobile-toggle {
    display: flex;
  }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
  }

  .container {
    padding: 0 var(--space-md);
  }

  .modal {
    max-width: 100%;
    margin: var(--space-md);
    padding: var(--space-xl);
  }

  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    top: var(--space-md);
  }

  .toast {
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .nav__inner {
    height: 60px;
  }

  .nav__auth .nav__user-name {
    display: none;
  }
}