/*
Theme Name: Sorted Solutions
Theme URI: https://sortedllc.com
Author: Sorted LLC
Description: Recruiting operations consulting — helping companies build stronger internal hiring teams.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sorted
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand — deep navy primary */
  --navy:       #1e293b;
  --navy-dark:  #0f172a;
  --navy-light: #334155;

  /* Accent — steel blue */
  --accent:       #3b82a1;
  --accent-hover: #2d6a85;
  --accent-light: #e8f4f8;

  /* Surfaces */
  --bg:          #fafbfc;
  --bg-alt:      #f1f5f9;
  --bg-warm:     #e2e8f0;
  --surface:     #ffffff;
  --white:       #ffffff;

  /* Text — charcoal/dark gray */
  --text-primary:   #1e293b;
  --text-secondary: #475569;
  --text-muted:     #64748b;
  --text-faint:     #94a3b8;

  /* On-dark text */
  --text-on-dark:       rgba(255, 255, 255, 0.95);
  --text-on-dark-muted: rgba(255, 255, 255, 0.65);
  --text-on-dark-faint: rgba(255, 255, 255, 0.5);
  --text-on-dark-dim:   rgba(255, 255, 255, 0.4);
  --text-on-dark-ghost: rgba(255, 255, 255, 0.3);

  /* Borders */
  --border:        #cbd5e1;
  --border-light:  #e2e8f0;

  /* Spacing (4pt scale) */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(59, 130, 161, 0.35);
  --focus-ring-light: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== ACCESSIBILITY ===== */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--navy);
  color: var(--white);
  padding: var(--space-sm) var(--space-md);
  border-radius: 0 0 4px 4px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 200;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Focus styles */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* ===== NAVIGATION ===== */
.site-nav {
  background: var(--surface);
  padding: var(--space-md) clamp(var(--space-lg), 4vw, var(--space-3xl));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand img {
  height: 56px;
  width: auto;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--navy);
}

.nav-links .btn-nav {
  background: var(--accent);
  color: var(--white);
  padding: 10px var(--space-lg);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-links .btn-nav:hover {
  background: var(--accent-hover);
}

.nav-links .btn-nav:focus-visible {
  box-shadow: 0 0 0 3px rgba(59, 130, 161, 0.35), 0 0 0 5px var(--white);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--navy);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle.active .icon-open { display: none; }
.nav-toggle.active .icon-close { display: block; }

/* ===== HERO BANNER ===== */
.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-banner-buttons {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-btn {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  display: block;
  border-radius: 4px;
  transition: opacity 0.15s;
}

.hero-btn:hover {
  opacity: 0.82;
}

.hero-btn:focus-visible {
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 6px var(--white);
}

/* "Schedule a Conversation" — pixel-measured from cropped image (1659x760) */
.hero-btn-schedule {
  top: 85%;
  left: 3.5%;
  width: 20.5%;
  height: 4.5%;
}

/* "See How We Work" — pixel-measured from cropped image (1659x760) */
.hero-btn-services {
  top: 85%;
  left: 25%;
  width: 17%;
  height: 4.5%;
}

/* ===== PROOF POINTS BAR ===== */
.proof-bar {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-lg) clamp(var(--space-xl), 6vw, var(--space-3xl));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xl);
}

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

.proof-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1;
}

.proof-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.3;
  max-width: 160px;
}

.proof-badge {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--bg-alt);
  padding: var(--space-xs) var(--space-md);
  border-radius: 4px;
  letter-spacing: 0.05em;
  line-height: 1;
}

.proof-divider {
  width: 1px;
  height: 40px;
  background: var(--border-light);
}

/* Keep btn-primary for use elsewhere */
.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 14px var(--space-xl);
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-block;
}

.btn-primary:hover { background: var(--accent-hover); }

/* ===== SECTION SHARED ===== */
.industries {
  background: var(--bg);
  padding: var(--space-4xl) clamp(var(--space-xl), 6vw, var(--space-3xl));
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-tag {
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  display: block;
  text-transform: uppercase;
}

.section-header h2 {
  color: var(--navy);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.section-header h2 em {
  color: var(--accent);
  font-style: italic;
}

/* ===== PROBLEM / APPROACH CARDS ===== */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
}

.industry-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: var(--space-2xl) var(--space-lg);
  text-align: left;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.industry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(30, 41, 59, 0.08);
}

.industry-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: 8px;
  color: var(--accent);
}

.industry-card h3 {
  color: var(--navy);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.industry-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 45ch;
}

/* ===== SERVICES / ABOUT SECTIONS ===== */
.why-sorted {
  background: var(--bg-alt);
  padding: var(--space-4xl) clamp(var(--space-xl), 6vw, var(--space-3xl));
}

.why-sorted-inner {
  display: flex;
  gap: var(--space-3xl);
  align-items: flex-start;
  max-width: 1060px;
  margin: 0 auto;
}

.why-left {
  flex: 1;
}

.why-left .section-tag {
  text-align: left;
}

.why-left h2 {
  color: var(--navy);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.why-left > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  max-width: 52ch;
}

.why-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature-card {
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: 6px;
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: 0 4px 16px rgba(30, 41, 59, 0.06);
}

.feature-card h4 {
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.65;
}

/* ===== CAPABILITIES GRID ===== */
.capabilities {
  background: var(--surface);
  padding: var(--space-4xl) clamp(var(--space-xl), 6vw, var(--space-3xl));
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
}

.capability-item {
  padding: var(--space-lg);
  border-left: 3px solid var(--accent);
  background: var(--bg);
  border-radius: 0 6px 6px 0;
}

.capability-item h4 {
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.capability-item p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.65;
}

/* ===== CTA BAND ===== */
.cta-band {
  background: var(--navy);
  padding: var(--space-3xl) clamp(var(--space-xl), 6vw, var(--space-3xl));
  text-align: center;
}

.cta-band h2 {
  color: var(--white);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  max-width: 55ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-band > p {
  color: var(--text-on-dark-muted);
  font-size: 0.9375rem;
  margin-bottom: var(--space-xl);
}

.cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  padding: 14px var(--space-xl);
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.btn-white:hover {
  background: var(--bg-alt);
}

.btn-white:focus-visible {
  box-shadow: var(--focus-ring-light);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy-dark);
  padding: var(--space-2xl) clamp(var(--space-xl), 6vw, var(--space-3xl));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left .footer-brand {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.footer-brand img {
  height: 48px;
  width: auto;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  color: var(--text-on-dark-faint);
  font-size: 0.75rem;
  margin-bottom: var(--space-xs);
}

.footer-email {
  color: var(--text-on-dark-dim);
  font-size: 0.75rem;
}

.footer-email a {
  color: var(--text-on-dark-dim);
  transition: color 0.2s;
}

.footer-email a:hover { color: var(--white); }

.footer-email a:focus-visible {
  box-shadow: var(--focus-ring-light);
}

.footer-right {
  text-align: right;
}

.footer-badges {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-bottom: var(--space-sm);
}

.footer-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: var(--space-xs) var(--space-md);
  border-radius: 3px;
  font-size: 0.6875rem;
  color: var(--text-on-dark-faint);
  letter-spacing: 0.03em;
}

.footer-copy {
  color: var(--text-on-dark-ghost);
  font-size: 0.6875rem;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-2xl);
  max-width: 480px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  color: var(--navy);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.modal > p,
#contactForm > p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-lg);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: var(--space-xs);
  border-radius: 4px;
}

.modal-close:hover { color: var(--navy); }

/* ===== FORMS ===== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 161, 0.12);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.btn-submit {
  background: var(--accent);
  color: var(--white);
  padding: 12px var(--space-lg);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-top: var(--space-sm);
  transition: background 0.2s;
}

.btn-submit:hover { background: var(--accent-hover); }

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.form-success .check {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  color: var(--accent);
}

.form-success h3 {
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.form-success p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .industries { padding: var(--space-3xl) var(--space-xl); }
  .why-sorted { padding: var(--space-3xl) var(--space-xl); }
  .capabilities { padding: var(--space-3xl) var(--space-xl); }
  .why-sorted-inner { flex-direction: column; gap: var(--space-2xl); }
  .cta-band { padding: var(--space-2xl) var(--space-xl); }
  .site-footer { flex-direction: column; gap: var(--space-lg); text-align: center; }
  .footer-right { text-align: center; }
  .footer-badges { justify-content: center; }
  .site-nav { padding: 12px var(--space-lg); }
  .nav-brand img { height: 44px; }
  .nav-links { gap: var(--space-md); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 16px rgba(30, 41, 59, 0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: var(--space-sm) 0;
    font-size: 1rem;
  }
  .nav-links .btn-nav {
    text-align: center;
    width: 100%;
    padding: 12px var(--space-lg);
  }
  .industries-grid { gap: var(--space-md); }
  .capabilities-grid { grid-template-columns: 1fr 1fr; }
  .hero-banner-buttons { display: none; }
  .proof-bar { gap: var(--space-lg); padding: var(--space-md) var(--space-lg); }
  .proof-number { font-size: 1.375rem; }
  .proof-label { font-size: 0.75rem; max-width: 120px; }
  .proof-divider { height: 32px; }
}

@media (max-width: 600px) {
  .cta-buttons { flex-direction: column; align-items: center; }
  .form-row { grid-template-columns: 1fr; }
  .nav-brand img { height: 36px; }
  .modal { padding: var(--space-lg); }
  .modal h2 { font-size: 1.125rem; }
  .capabilities-grid { grid-template-columns: 1fr; }
  .proof-bar { flex-direction: column; gap: var(--space-md); text-align: center; }
  .proof-item { flex-direction: column; gap: var(--space-xs); }
  .proof-label { max-width: none; }
  .proof-divider { width: 60px; height: 1px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .industry-card:hover { transform: none; }
}
