@import "tailwindcss";

:root {
  --background: #f1f5f9;
  --foreground: #0f172a;
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-foreground: #ffffff;
  --accent: #059669;
  --accent-foreground: #ffffff;
  --muted: #64748b;
  --surface: #ffffff;
  --border: #e2e8f0;
  --header-height: 3.5rem;
  --bottom-nav-height: 4.5rem;
  --sidebar-width: 16rem;
  --home-ink: #0c1929;
  --home-steel: #16324f;
  --home-amber: #d97706;
  --home-amber-soft: #f59e0b;
  --home-sand: #f3efe6;
  --home-line: rgba(255, 255, 255, 0.12);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-primary: var(--primary);
  --color-primary-dark: var(--primary-dark);
  --color-primary-foreground: var(--primary-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-muted: var(--muted);
  --color-surface: var(--surface);
  --color-border: var(--border);
  --font-sans: var(--font-inter);
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-inter), system-ui, -apple-system, sans-serif;
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Job-site layout utilities */
.page-container {
  @apply mx-auto max-w-6xl px-4 py-6;
}

.section-heading {
  @apply text-xl font-bold text-slate-900 tracking-tight;
}

.section-link {
  @apply text-sm font-semibold text-primary hover:text-primary-dark transition-colors;
}

.search-input {
  @apply flex h-11 w-full rounded-lg border border-border bg-white px-4 text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary;
}

.search-input-icon {
  @apply flex h-11 w-full rounded-lg border border-border bg-white pl-10 pr-4 text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary;
}

.filter-chip {
  @apply inline-flex items-center rounded-md border border-border bg-white px-3 py-1.5 text-xs font-semibold text-slate-600 transition-colors hover:border-slate-300 hover:bg-slate-50;
}

.filter-chip-active {
  @apply border-primary bg-primary text-white hover:bg-primary-dark hover:border-primary-dark;
}

.stat-pill {
  @apply inline-flex items-center gap-1.5 rounded-md bg-slate-100 px-3 py-1.5 text-xs font-medium text-slate-600;
}

.loading-spinner {
  @apply h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent;
}

.auth-page {
  @apply mx-auto w-full max-w-md px-3 py-6 pb-24 sm:px-4 sm:py-8 sm:pb-10 md:max-w-lg md:pb-8 lg:px-6;
  font-family: var(--font-source-sans), var(--font-inter), system-ui, sans-serif;
}

.register-worker-page {
  @apply mx-auto w-full max-w-lg px-3 py-6 pb-24 sm:max-w-xl sm:px-4 sm:py-8 sm:pb-10 md:max-w-2xl md:pb-8 lg:max-w-3xl lg:px-6 xl:py-10;
  font-family: var(--font-source-sans), var(--font-inter), system-ui, sans-serif;
}

.auth-panel {
  overflow: hidden;
  border: 1px solid #e2ddd2;
  background: #fffdf9;
  box-shadow: 0 18px 40px rgba(12, 25, 41, 0.12);
}

.auth-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 80% at 80% 0%, rgba(217, 119, 6, 0.22), transparent 55%),
    linear-gradient(160deg, var(--home-ink) 0%, var(--home-steel) 60%, #0a1522 100%);
}

@media (min-width: 768px) {
  .auth-hero {
    padding: 2.5rem 2.5rem;
  }
}

.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(var(--home-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--home-line) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  pointer-events: none;
}

.auth-hero-inner {
  position: relative;
  z-index: 1;
}

.auth-hero-mark {
  display: flex;
  margin: 0 auto 0.85rem;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--home-amber);
}

.auth-hero-brand {
  margin-bottom: 0.75rem;
  font-family: var(--font-archivo), var(--font-inter), system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 191, 36, 0.9);
}

.auth-hero-title {
  font-family: var(--font-archivo), var(--font-inter), system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .auth-hero-title {
    font-size: 1.875rem;
  }
}

.auth-hero-subtitle {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .auth-hero-subtitle {
    margin-top: 0.75rem;
    font-size: 1rem;
  }
}

.auth-body {
  padding: 1.5rem;
  background: #fff;
}

@media (min-width: 768px) {
  .auth-body {
    padding: 2rem;
  }
}

.auth-submit {
  width: 100%;
  border: 0;
  background: var(--home-amber);
  color: #ffffff;
  box-shadow: none;
}

.auth-submit:hover:not(:disabled) {
  background: var(--home-amber-soft);
  color: #ffffff;
}

.auth-link {
  font-weight: 600;
  color: var(--home-amber);
}

.auth-link:hover {
  color: #b45309;
}

.auth-step-dot {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease;
}

@media (min-width: 768px) {
  .auth-step-dot {
    height: 2.25rem;
    width: 2.25rem;
    font-size: 0.875rem;
  }
}

.auth-step-dot-done {
  background: var(--home-amber);
  color: #ffffff;
}

.auth-step-dot-active {
  background: var(--home-ink);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.35);
}

.auth-step-dot-idle {
  background: #f1f5f9;
  color: #64748b;
}

.post-job-page {
  @apply mx-auto w-full max-w-md px-3 py-6 pb-24 sm:px-4 sm:py-8 sm:pb-10 md:max-w-xl md:pb-8 lg:max-w-2xl lg:px-6;
}

.form-select {
  @apply mt-1.5 flex h-11 w-full rounded-lg border border-border bg-white px-4 text-sm text-slate-900 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary;
}

.form-textarea {
  @apply mt-1.5 w-full rounded-lg border border-border bg-white px-4 py-3 text-sm text-slate-900 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  z-index: 0;
}

body.modal-open [data-bottom-nav] {
  display: none;
}

/* —— Home: workers-directory look —— */
.home-page {
  font-family: var(--font-source-sans), var(--font-inter), system-ui, sans-serif;
  color: var(--foreground);
}

.home-page .home-display {
  font-family: var(--font-archivo), var(--font-inter), system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(217, 119, 6, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(29, 78, 216, 0.25), transparent 50%),
    linear-gradient(160deg, var(--home-ink) 0%, var(--home-steel) 55%, #0a1522 100%);
  color: #fff;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--home-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--home-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 30%, transparent 95%);
  pointer-events: none;
}

.home-hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -40% 40%;
  z-index: 0;
  height: 70%;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.18), transparent 70%);
  animation: home-glow-drift 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  z-index: 1;
}

@keyframes home-glow-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-6%, -4%, 0) scale(1.08);
  }
}

@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-rise {
  animation: home-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-rise-delay-1 {
  animation-delay: 0.08s;
}

.home-rise-delay-2 {
  animation-delay: 0.16s;
}

.home-rise-delay-3 {
  animation-delay: 0.24s;
}

.home-search {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

@media (min-width: 640px) {
  .home-search {
    flex-direction: row;
    align-items: center;
    max-width: 48rem;
  }
}

.home-search input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 2.75rem;
  border: 0;
  background: transparent;
  padding-left: 2.5rem;
  padding-right: 1rem;
  font-size: 0.9375rem;
  color: #0f172a;
  outline: none;
}

.home-search input::placeholder {
  color: #94a3b8;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.home-section-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-amber);
}

.home-section-title {
  font-family: var(--font-archivo), var(--font-inter), system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
}

.home-trades {
  background:
    linear-gradient(180deg, #f7f4ee 0%, #f1f5f9 100%);
  border-block: 1px solid #e7e1d4;
}

.home-trade-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 6.5rem;
  padding: 1rem;
  border: 1px solid #e2ddd2;
  background: #fffdf9;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.home-trade-tile:hover {
  border-color: #c4b89f;
  background: #fff;
  transform: translateY(-2px);
}

.home-workers {
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(217, 119, 6, 0.06), transparent 50%),
    #ffffff;
}

.home-trust {
  background: var(--home-ink);
  color: #e2e8f0;
}

.home-trust-step {
  position: relative;
  padding-top: 0.25rem;
}

.home-trust-step::before {
  content: attr(data-step);
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-archivo), sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  opacity: 0.9;
}

.home-sponsor {
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.07) 0%, transparent 42%),
    linear-gradient(180deg, #f7f4ee 0%, #fffdf9 100%);
}

.home-sponsor-point {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding-top: 0.25rem;
}

.home-cta {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, #16324f 0%, #0c1929 55%, #1e3a5f 100%);
  color: #fff;
}

.home-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.15), transparent);
  transform: translateX(-100%);
  animation: home-cta-sheen 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes home-cta-sheen {
  0%,
  40% {
    transform: translateX(-100%);
  }
  70%,
  100% {
    transform: translateX(100%);
  }
}

/* —— Site chrome: header & footer —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--home-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-source-sans), var(--font-inter), system-ui, sans-serif;
}

.site-header-brand {
  font-family: var(--font-archivo), var(--font-inter), system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.site-header-mark {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  background: var(--home-amber);
  color: #ffffff;
  font-family: var(--font-archivo), sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-header-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.site-header-nav-link[data-active='true'] {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--home-amber);
}

.site-header-region {
  display: inline-flex;
  height: 2.25rem;
  max-width: 9.5rem;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  padding-left: 0.625rem;
  padding-right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

@media (min-width: 640px) {
  .site-header-region {
    max-width: 13rem;
  }
}

.site-header-region:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.site-header-region:focus {
  outline: none;
  border-color: var(--home-amber);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}

.site-footer {
  margin-top: auto;
  background:
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(217, 119, 6, 0.12), transparent 55%),
    linear-gradient(180deg, var(--home-steel) 0%, var(--home-ink) 100%);
  color: #e2e8f0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-source-sans), var(--font-inter), system-ui, sans-serif;
}

.site-footer-brand {
  font-family: var(--font-archivo), var(--font-inter), system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.site-footer-label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-amber);
}

.site-footer a {
  transition: color 0.15s ease;
}

.site-footer-link {
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
}

.site-footer-link:hover {
  color: #fff;
}

/* —— Workers directory (list + profile) —— */
.workers-directory {
  font-family: var(--font-source-sans), var(--font-inter), system-ui, sans-serif;
}

.workers-directory .home-display,
.worker-profile-page .home-display {
  font-family: var(--font-archivo), var(--font-inter), system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.browse-hero-directory {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(ellipse 70% 80% at 85% 0%, rgba(217, 119, 6, 0.2), transparent 55%),
    linear-gradient(160deg, var(--home-ink) 0%, var(--home-steel) 55%, #0a1522 100%);
}

.browse-hero-directory::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(var(--home-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--home-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
  pointer-events: none;
}

.browse-hero-directory > * {
  position: relative;
  z-index: 1;
}

.workers-directory .filter-chip-active {
  border-color: var(--home-ink);
  background: var(--home-ink);
  color: #fff;
}

.workers-directory .filter-chip-active:hover {
  border-color: var(--home-ink);
  background: var(--home-steel);
}

.workers-directory .search-input-icon:focus,
.workers-directory .search-input:focus {
  border-color: var(--home-amber);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

.worker-card {
  overflow: hidden;
  border: 1px solid #e2ddd2;
  background: #fffdf9;
  border-radius: 0;
  box-shadow: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.worker-card:hover {
  border-color: #c4b89f;
  background: #fff;
  transform: translateY(-2px);
  box-shadow: none;
}

.worker-card-rate {
  color: var(--home-amber);
  font-weight: 700;
}

.worker-card-star {
  fill: var(--home-amber);
  color: var(--home-amber);
}

.worker-profile-page {
  font-family: var(--font-source-sans), var(--font-inter), system-ui, sans-serif;
  background: #f7f4ee;
}

.worker-profile-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(217, 119, 6, 0.14) 0%, transparent 42%),
    linear-gradient(165deg, #0a1420 0%, var(--home-ink) 48%, #122033 100%);
}

.worker-profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 20%, transparent 85%);
  pointer-events: none;
}

.worker-profile-hero > * {
  position: relative;
  z-index: 1;
}

.worker-profile-section {
  border: 1px solid #e2ddd2;
  background: #fffdf9;
  padding: 1.25rem 1.15rem;
}

@media (min-width: 640px) {
  .worker-profile-section {
    padding: 1.5rem 1.5rem;
  }
}

.worker-profile-section-title {
  font-family: var(--font-archivo), var(--font-inter), system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--home-amber);
  margin-bottom: 0.85rem;
}

.worker-profile-nav-active {
  background: var(--home-ink) !important;
  color: #fff !important;
  box-shadow: inset 0 -2px 0 var(--home-amber);
}

.worker-cta-amber {
  background: var(--home-amber);
  color: #ffffff;
  border: 0;
  box-shadow: none;
}

.worker-cta-amber:hover:not(:disabled) {
  background: var(--home-amber-soft);
  color: #ffffff;
}

