/* ============================================
   MODELING MATCH - Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg: #F7F0E8;
  --bg-card: #FFFFFF;
  --primary: #B5522A;
  --primary-dark: #8E3F1F;
  --primary-light: #E8D5C8;
  --text: #1A1A1A;
  --text-muted: #777;
  --border: #E4D9CE;
  --border-light: #EDE5DB;
  --success: #4CAF50;
  --shadow: rgba(0,0,0,0.06);
  --shadow-md: rgba(0,0,0,0.12);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

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

button {
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}

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

/* ============================================
   NAVIGATION
   ============================================ */

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 72px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

body:not(.is-agency) .agency-only {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

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

.btn-outline:hover {
  background: var(--text);
  color: white;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: 1.5px solid var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-dark {
  background: var(--text);
  color: white;
  border: 1.5px solid var(--text);
}

.btn-dark:hover {
  background: #333;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
  border-radius: 8px;
}

/* ============================================
   HAMBURGER MENU (mobile)
   ============================================ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: min(calc(100vh - 72px), 620px);
  overflow: hidden;
}

.hero-content {
  padding: 80px 48px 80px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-content p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 420px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 12px;
}

.stat-box {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 110px;
}

.stat-box .stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.stat-box .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0 100px 0;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  transition: transform 0.6s ease;
}

.hero-image:hover img {
  transform: scale(1.02);
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(170deg, #E8D5C4 0%, #C9A48A 35%, #A87060 65%, #7A4A38 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
}

/* ============================================
   SECTION LAYOUT
   ============================================ */

section {
  padding: 80px 80px;
}

.section-title {
  font-size: clamp(28px, 3vw, 38px);
  text-align: center;
  margin-bottom: 60px;
}

/* ============================================
   HOW IT WORKS
   ============================================ */

.how-it-works {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.step {
  text-align: left;
}

.step-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  color: var(--text);
}

.step h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: white;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid var(--border-light);
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   PRICING SECTION
   ============================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: white;
  border-radius: 12px;
  padding: 36px 32px;
  border: 1.5px solid var(--border);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.pricing-card.featured .badge {
  background: white;
  color: var(--text);
}

.price {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  margin: 16px 0 4px;
}

.price sup {
  font-size: 20px;
  vertical-align: super;
}

.price-period {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
}

.pricing-features li {
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-card.featured .pricing-features li {
  border-color: rgba(255,255,255,0.15);
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 600;
  font-size: 13px;
}

.pricing-card.featured .pricing-features li::before {
  color: rgba(255,255,255,0.9);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--text);
  color: white;
  padding: 60px 80px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  max-width: 280px;
  margin-top: 12px;
}

.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.7);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ============================================
   PAGE HEADER (inner pages)
   ============================================ */

.page-header {
  text-align: center;
  padding: 60px 80px 40px;
}

.page-header h1 {
  font-size: clamp(32px, 4vw, 52px);
  margin-bottom: 12px;
}

.page-header p {
  font-size: 16px;
  color: var(--text-muted);
}

/* ============================================
   SEARCH PAGE
   ============================================ */

.search-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  min-height: calc(100vh - 72px);
}

.search-left {
  padding: 48px;
  border-right: 1px solid var(--border);
}

.search-left h1 {
  font-size: clamp(28px, 3.5vw, 44px);
  margin-bottom: 12px;
}

.search-left > p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.upload-zone {
  border: 2px dashed var(--primary);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  background: rgba(181, 82, 42, 0.03);
  transition: all 0.2s;
  margin-bottom: 24px;
  position: relative;
}

.upload-zone:hover, .upload-zone.drag-over {
  background: rgba(181, 82, 42, 0.07);
  border-color: var(--primary-dark);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
  color: var(--primary);
}

.upload-zone h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  margin-bottom: 8px;
}

.upload-zone p {
  font-size: 14px;
  color: var(--text-muted);
}

.upload-zone a {
  color: var(--primary);
  font-weight: 500;
}

.uploaded-previews {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.preview-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  filter: brightness(0.85) grayscale(0.3);
}

.preview-thumb:hover {
  border-color: var(--primary);
  filter: none;
}

.search-describe {
  margin-bottom: 24px;
}

.search-describe label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.search-describe textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  resize: none;
  height: 80px;
  transition: border-color 0.2s;
}

.search-describe textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.search-right {
  padding: 48px;
  background: white;
}

.search-right h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.match-card {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  background: var(--bg);
}

.match-card:hover {
  transform: translateY(-2px);
}

.match-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
}

.match-card-img-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.match-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.match-card-info {
  padding: 10px 12px 12px;
}

.match-card-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
}

.match-card-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.attributes-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.attributes-panel h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
}

.attribute-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attr-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text);
}

/* ============================================
   CASTINGS PAGE
   ============================================ */

.castings-layout {
  padding: 0 80px 80px;
}

.castings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}

.tab-btn {
  padding: 12px 28px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.category-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.category-select {
  appearance: none;
  -webkit-appearance: none;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 36px 7px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.category-select:hover {
  border-color: var(--primary);
}

.category-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(181,82,42,0.1);
}

.category-select-arrow {
  position: absolute;
  right: 12px;
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
  line-height: 1;
}

.casting-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1.5px solid var(--border-light);
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.casting-card:hover {
  box-shadow: 0 4px 20px var(--shadow-md);
}

.casting-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.agency-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.agency-info {
  flex: 1;
}

.agency-info .agency-name {
  font-size: 14px;
  font-weight: 600;
}

.agency-info .posted-time {
  font-size: 12px;
  color: var(--text-muted);
}

.casting-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.casting-card .description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.casting-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.casting-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.casting-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.casting-meta {
  display: flex;
  gap: 20px;
  align-items: center;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.casting-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.meta-icon {
  font-size: 14px;
}

.casting-actions {
  display: flex;
  gap: 10px;
}

.btn-save {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-save:hover, .btn-save.saved {
  border-color: var(--primary);
  color: var(--primary);
}

/* AI Match Panel */
.match-panel {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1.5px solid var(--border-light);
  position: sticky;
  top: 90px;
}

.match-panel h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  margin-bottom: 20px;
}

.donut-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.donut-chart {
  position: relative;
  width: 90px;
  height: 90px;
}

.donut-chart svg {
  transform: rotate(-90deg);
}

.donut-score {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.donut-score .score-label {
  font-size: 10px;
  color: var(--text-muted);
}

.donut-score .score-value {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.match-label {
  font-size: 13px;
  color: var(--text-muted);
}

.match-label strong {
  font-size: 28px;
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  display: block;
  line-height: 1;
}

.match-criteria {
  list-style: none;
  margin-bottom: 24px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.match-criteria li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 6px 0;
}

.check-icon {
  width: 18px;
  height: 18px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  flex-shrink: 0;
}

.top-candidates h4 {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.top-candidates .sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.candidate-avatars {
  display: flex;
  gap: 10px;
}

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

.candidate-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  margin-bottom: 4px;
}

.candidate-avatar-wrapper {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 0 auto 4px;
}

.candidate-avatar-img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.candidate-avatar-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--bg);
}

.candidate-score-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.candidate-name {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  max-width: 54px;
  line-height: 1.3;
}

/* ============================================
   ONBOARDING PAGE
   ============================================ */

.onboarding-header {
  text-align: center;
  padding: 40px 80px 32px;
}

.onboarding-header .logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin-bottom: 32px;
  color: var(--text);
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1;
}

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}

.progress-step.completed::after,
.progress-step.active::after {
  background: var(--primary);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.progress-step.completed .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.progress-step.active .step-circle {
  border-color: var(--primary);
  color: var(--primary);
  background: white;
}

.step-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.progress-step.active .step-label {
  color: var(--primary);
  font-weight: 500;
}

.onboarding-body {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  padding: 0 80px 80px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.upload-area-large {
  border: 2px dashed var(--primary);
  border-radius: 16px;
  background: rgba(181, 82, 42, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-height: 360px;
}

.upload-area-large:hover, .upload-area-large.drag-over {
  background: rgba(181, 82, 42, 0.07);
}

.upload-area-large input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-camera-icon {
  font-size: 56px;
  color: var(--primary);
  margin-bottom: 16px;
}

.upload-area-large h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.upload-area-large p {
  font-size: 13px;
  color: var(--text-muted);
}

.uploaded-photos-strip {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.photo-thumb-wrapper {
  position: relative;
}

.photo-thumb {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border);
}

.photo-thumb-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid var(--border);
}

.photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: var(--text);
  color: white;
  border-radius: 50%;
  border: none;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

/* Portfolio Details Form */
.portfolio-form {
  background: white;
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--border-light);
}

.portfolio-form h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

.form-control::placeholder {
  color: #BBB;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.toggle-group {
  margin-bottom: 16px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.toggle-row label {
  font-size: 13px;
  color: var(--text);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: var(--border);
  cursor: pointer;
  transition: 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* AI Analysis Preview */
.ai-preview {
  margin-top: 20px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.ai-preview h3 {
  font-size: 15px;
  margin-bottom: 14px;
}

.ai-metrics {
  display: flex;
  gap: 20px;
  justify-content: center;
}

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

.ai-metric-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 auto 6px;
}

.ai-metric-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   MODAL / AUTH
   ============================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

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

.modal {
  background: white;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: modalIn 0.2s ease;
  margin: auto;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--bg);
}

.modal h2 {
  font-size: 26px;
  margin-bottom: 6px;
}

.modal .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.modal-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}

.modal-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.modal-tab.active {
  background: white;
  color: var(--text);
  box-shadow: 0 1px 4px var(--shadow);
}

.modal-form .form-group {
  margin-bottom: 14px;
}

.modal-form .form-control {
  background: var(--bg);
}

.modal-form .btn-primary {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 15px;
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.modal-divider::before, .modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-social {
  width: 100%;
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.btn-social:hover {
  border-color: var(--text-muted);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--text);
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  pointer-events: none;
}

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

.toast.success {
  background: var(--success);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  nav {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  /* Hide static Sign In / Get Started buttons on mobile — they live in the drawer */
  .nav-actions {
    display: none;
  }

  /* Show nav-actions again once JS has filled it with the logged-in avatar */
  .nav-actions.nav-actions--logged-in {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
    margin-left: 16px;
  }

  /* Prevent iOS Safari auto-zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  .hero {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .hero-content {
    padding: 48px 24px;
  }

  .hero-image {
    height: 360px;
    overflow: hidden;
  }

  section {
    padding: 60px 24px;
  }

  .steps-grid,
  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .search-layout {
    grid-template-columns: 1fr;
  }

  .search-right {
    border-top: 1px solid var(--border);
  }

  .castings-layout {
    grid-template-columns: 1fr;
    padding: 0 24px 60px;
  }

  .onboarding-body {
    grid-template-columns: 1fr;
    padding: 0 24px 60px;
  }

  .onboarding-header {
    padding: 32px 24px 24px;
  }

  .page-header {
    padding: 40px 24px 28px;
  }

  .search-left,
  .search-right {
    padding: 32px 24px;
  }
}

@media (max-width: 640px) {
  .hero-cta {
    flex-direction: column;
  }

  .hero-stats {
    flex-wrap: wrap;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .matches-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ============================================
   MOBILE NAV MENU
   ============================================ */

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  padding: 90px 32px 32px;
  flex-direction: column;
  gap: 0;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 20px;
  font-family: 'Playfair Display', serif;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

/* ============================================
   CASTINGS TABS BAR — default padding (overridden in media queries)
   ============================================ */

.castings-tabs-bar {
  padding: 0 80px 16px;
}

/* ============================================
   RESPONSIVE — 768px (tablets & large phones)
   ============================================ */

@media (max-width: 768px) {
  .castings-tabs-bar {
    padding: 0 24px 12px;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .castings-tabs {
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .castings-tabs::-webkit-scrollbar { display: none; }

  .tab-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .casting-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .casting-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  .casting-actions {
    width: 100%;
  }

  footer {
    padding: 48px 24px 24px;
  }
}

/* ============================================
   RESPONSIVE — 640px (phones)
   ============================================ */

@media (max-width: 640px) {
  .modal-overlay {
    padding: 16px;
  }

  .modal {
    padding: 28px 20px !important;
    max-width: calc(100vw - 32px) !important;
    border-radius: 12px;
  }

  .castings-tabs-bar {
    padding: 0 16px 10px;
    gap: 8px !important;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  .casting-card {
    padding: 16px;
  }

  .casting-card h3 {
    font-size: 17px;
  }

  .casting-actions {
    flex-wrap: wrap;
  }

  /* Toast — full-width centered at bottom */
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }

  section {
    padding: 48px 16px;
  }

  nav {
    padding: 0 16px;
  }

  .castings-layout {
    padding: 0 16px 48px;
  }

  .page-header {
    padding: 28px 16px 20px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .search-left,
  .search-right {
    padding: 24px 16px;
  }

  .onboarding-body {
    padding: 0 16px 48px;
  }

  .onboarding-header {
    padding: 20px 16px 16px;
  }

  .step-label {
    display: none;
  }

  footer {
    padding: 40px 16px 20px;
  }

  .footer-grid {
    gap: 24px;
  }
}

/* ============================================
   RESPONSIVE — 480px (small phones)
   ============================================ */

@media (max-width: 480px) {
  .modal {
    padding: 20px 16px !important;
    border-radius: 10px;
  }

  .modal h2 {
    font-size: 20px;
  }

  .modal .subtitle {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .modal-tabs {
    margin-bottom: 16px;
  }

  .btn {
    padding: 9px 18px;
    font-size: 13px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 14px;
  }

  .hero-content {
    padding: 32px 16px;
  }

  .casting-card {
    padding: 14px;
  }

  .casting-meta {
    flex-direction: column;
    gap: 4px;
  }

  .upload-zone {
    padding: 32px 16px;
  }
}
