/* Morris Artist Directory — front-end styles
   Design goals: match the approved layout (centered title, intro, dark
   search button) and meet WCAG 2.1 AA (contrast, visible focus, real labels). */

.mad-directory {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1rem;
}

.mad-dir-title {
	text-align: center;
	font-weight: 800;
	font-size: clamp(2rem, 4vw, 2.75rem);
	color: #1f2933;
	margin: 1rem 0 0.5rem;
}

.mad-dir-intro {
	text-align: center;
	max-width: 820px;
	margin: 0 auto 1.5rem;
	/* #52606d on white = 7.0:1, comfortably above AA. */
	color: #52606d;
	line-height: 1.6;
}

/* Search bar */
.mad-search {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	max-width: 900px;
	margin: 1.5rem auto;
	flex-wrap: wrap;
}

/* Label stays available to screen readers while keeping the approved look.
   Remove this rule to show a visible label instead. */
.mad-search label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.mad-search input[type="search"] {
	flex: 1 1 260px;
	padding: 0.85rem 1rem;
	border: 1px solid #9aa5b1;
	border-radius: 6px;
	font-size: 1rem;
}

.mad-btn {
	background: #1f2933;
	color: #fff;
	border: 0;
	padding: 0.85rem 1.5rem;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	font-size: 1rem;
	line-height: 1.2;
}

.mad-btn:hover { background: #323f4b; }

.mad-search-status {
	text-align: center;
	color: #52606d;
}
.mad-search-status a { margin-left: 0.5rem; }

/* Grid of cards */
.mad-grid {
	list-style: none;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	padding: 0;
	margin: 1.5rem 0 0;
}

.mad-card article {
	border: 1px solid #cbd2d9;
	border-radius: 8px;
	padding: 1.25rem;
	height: 100%;
	background: #fff;
}

.mad-card img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	margin-bottom: 0.75rem;
}

.mad-card-name {
	font-size: 1.25rem;
	margin: 0 0 0.25rem;
}
.mad-card-name a { color: #1f2933; text-decoration: none; }
.mad-card-name a:hover { text-decoration: underline; }

.mad-card-talent { color: #52606d; margin: 0 0 0.5rem; }
.mad-card-bio { color: #3e4c59; margin: 0; }

/* Profile page */
.mad-profile-wrap { max-width: 780px; margin: 0 auto; padding: 1.5rem 1rem; }
.mad-profile-name { color: #1f2933; margin-bottom: 0.25rem; }
.mad-profile-talent { color: #52606d; font-size: 1.1rem; margin-top: 0; }
.mad-profile-image img { max-width: 100%; height: auto; border-radius: 8px; }
.mad-profile-bio { margin: 1.25rem 0; line-height: 1.7; color: #333; }

.mad-profile-links ul { list-style: none; padding: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.mad-profile-links a {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid #1f2933;
	border-radius: 6px;
	color: #1f2933;
	text-decoration: none;
}

.mad-profile-contact {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e4e7eb;
}

/* Forms (intake + contact) */
.mad-intake,
.mad-contact { max-width: 640px; }

.mad-field { margin: 0 0 1.1rem; }
.mad-field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.mad-field input[type="text"],
.mad-field input[type="email"],
.mad-field input[type="url"],
.mad-field input[type="search"],
.mad-field select,
.mad-field textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid #9aa5b1;
	border-radius: 6px;
	font-size: 1rem;
}
.mad-field fieldset { border: 1px solid #cbd2d9; border-radius: 6px; padding: 0.75rem 1rem; }
.mad-field legend { font-weight: 600; padding: 0 0.35rem; }
.mad-help { display: block; color: #52606d; font-size: 0.9rem; margin-top: 0.25rem; }
.mad-req { color: #b91c1c; }

/* Notices */
.mad-notice { padding: 0.9rem 1.1rem; border-radius: 6px; margin: 0 0 1.25rem; }
.mad-notice-success { background: #e3f9e5; border: 1px solid #31b237; color: #0a4d12; }
.mad-notice-error { background: #ffe3e3; border: 1px solid #e12d39; color: #781213; }

/* Visible keyboard focus everywhere — WCAG 2.4.7 */
.mad-directory a:focus-visible,
.mad-directory button:focus-visible,
.mad-directory input:focus-visible,
.mad-profile-wrap a:focus-visible,
.mad-profile-wrap button:focus-visible,
.mad-profile-wrap input:focus-visible,
.mad-profile-wrap textarea:focus-visible,
.mad-profile-wrap select:focus-visible,
.mad-intake :focus-visible,
.mad-contact :focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: 2px;
}
