/* =================================================================
 * GPS Idea Bank v2 — public submission form (dark theme)
 *
 * CSS prefix: `ib-` (scoped via body.gps-ib-page)
 * Colors: #0a0a0f / #dc2626 / #ffffff — GPS dark theme tokens.
 * Self-contained: overrides scoped to `body.gps-ib-page`.
 * ================================================================= */

body.gps-ib-page {
	background: #0a0a0f;
	color: #e5e7eb;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.gps-ib-page .site-content,
body.gps-ib-page main,
body.gps-ib-page #page,
body.gps-ib-page .entry-content,
body.gps-ib-page .inside-article,
body.gps-ib-page .content-area,
body.gps-ib-page .inside-page-article {
	background: transparent !important;
	color: inherit;
}

/* Scope link-color override to our containers only — don't tint the theme's
 * site header, footer, or nav. */
body.gps-ib-page .ib-hero a,
body.gps-ib-page .ib-wrap a,
body.gps-ib-page .ib-thanks a { color: #f87171; }
body.gps-ib-page .ib-hero a:hover,
body.gps-ib-page .ib-wrap a:hover,
body.gps-ib-page .ib-thanks a:hover { color: #fca5a5; }

/* Hero */
.ib-hero {
	position: relative;
	overflow: hidden;
	padding: 4.5rem 1.5rem 3rem;
	background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #050508 100%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ib-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 50px 50px;
	pointer-events: none;
	z-index: 0;
}

.ib-hero-inner {
	max-width: 760px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

.ib-eyebrow {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #dc2626;
	margin-bottom: 1rem;
}

.ib-title {
	font-size: clamp(2rem, 4.5vw, 3rem);
	line-height: 1.1;
	font-weight: 800;
	margin: 0 0 1rem;
	background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.ib-lede {
	font-size: 1.125rem;
	line-height: 1.6;
	color: #9ca3af;
	max-width: 620px;
	margin: 0 0 0.5rem;
}

.ib-privacy {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.75rem;
	padding: 0.4rem 0.85rem;
	background: rgba(220, 38, 38, 0.12);
	border: 1px solid rgba(220, 38, 38, 0.35);
	color: #fca5a5;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 999px;
}

.ib-info {
	display: grid;
	gap: 0.9rem;
	margin: 2rem 0 0;
	padding: 1.5rem 1.75rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
}

.ib-info h2 {
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #dc2626;
	margin: 0;
	font-weight: 700;
}

.ib-info ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}

.ib-info li {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	color: #d1d5db;
	font-size: 0.95rem;
	line-height: 1.55;
}

.ib-info li::before {
	content: '→';
	color: #dc2626;
	font-weight: 700;
	flex-shrink: 0;
	line-height: 1.5;
}

.ib-info li strong { color: #f9fafb; font-weight: 600; }

.ib-info .ib-example {
	display: inline-block;
	margin-top: 0.25rem;
	font-size: 0.85rem;
	color: #9ca3af;
	font-style: italic;
	line-height: 1.5;
}

/* Routing aside — pointers to Tell My Story, incident forms, etc. */
.ib-routing {
	margin-top: 2.5rem;
	padding: 1.75rem 2rem;
	background: linear-gradient(135deg, rgba(220, 38, 38, 0.06), rgba(153, 27, 27, 0.04));
	border: 1px solid rgba(220, 38, 38, 0.25);
	border-radius: 12px;
}

.ib-routing h2 {
	font-size: 0.85rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fca5a5;
	margin: 0 0 0.75rem;
	font-weight: 700;
}

.ib-routing p {
	color: #d1d5db;
	font-size: 0.95rem;
	line-height: 1.55;
	margin: 0 0 1rem;
}

.ib-routing-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.7rem;
}

.ib-routing-list li {
	padding-left: 1.25rem;
	position: relative;
	color: #d1d5db;
	font-size: 0.95rem;
	line-height: 1.55;
}

.ib-routing-list li::before {
	content: '›';
	position: absolute;
	left: 0;
	top: 0;
	color: #dc2626;
	font-weight: 700;
}

.ib-routing-list a { color: #fca5a5; text-decoration: none; border-bottom: 1px solid rgba(252, 165, 165, 0.35); }
.ib-routing-list a:hover { color: #ffffff; border-bottom-color: #ffffff; }
.ib-routing-list strong { color: #fecaca; }

/* Form wrap + card */
.ib-wrap {
	max-width: 760px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 5rem;
}

.ib-form-card {
	padding: 2rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
}

.ib-field + .ib-field { margin-top: 1.5rem; }

.ib-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #f3f4f6;
	margin-bottom: 0.5rem;
}
.ib-label .ib-req  { color: #dc2626; margin-left: 0.15rem; }
.ib-label .ib-hint { color: #6b7280; font-weight: 400; margin-left: 0.3rem; }

.ib-input,
.ib-textarea,
.ib-select {
	width: 100%;
	padding: 0.8rem 0.95rem;
	background: rgba(0, 0, 0, 0.4);
	color: #f9fafb;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
	box-sizing: border-box;
}

.ib-input::placeholder,
.ib-textarea::placeholder { color: #6b7280; }

.ib-input:focus,
.ib-textarea:focus,
.ib-select:focus {
	outline: none;
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
	background: rgba(0, 0, 0, 0.55);
}

.ib-textarea {
	min-height: 180px;
	resize: vertical;
}

.ib-select {
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239ca3af'><path d='M4 6l4 4 4-4'/></svg>");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 14px;
	padding-right: 2.2rem;
}

.ib-select option {
	background: #0a0a0f;
	color: #f9fafb;
}

.ib-helper {
	display: flex;
	justify-content: space-between;
	margin-top: 0.4rem;
	font-size: 0.75rem;
	color: #6b7280;
}

.ib-helper .count-now { color: #9ca3af; }

.ib-fielderr {
	display: block;
	margin-top: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: rgba(220, 38, 38, 0.12);
	border-left: 3px solid #dc2626;
	color: #fecaca;
	font-size: 0.85rem;
	border-radius: 0 4px 4px 0;
}

.ib-input[aria-invalid="true"],
.ib-textarea[aria-invalid="true"] { border-color: #dc2626; }

.ib-global-error {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	background: rgba(220, 38, 38, 0.12);
	border: 1px solid rgba(220, 38, 38, 0.35);
	border-left: 4px solid #dc2626;
	color: #fecaca;
	border-radius: 6px;
	font-weight: 500;
}

/* Submit */
.ib-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 2rem;
}

.ib-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.9rem 2rem;
	background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
	color: #ffffff !important;
	border: none;
	border-radius: 999px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	text-decoration: none;
	transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
	box-shadow: 0 4px 20px rgba(220, 38, 38, 0.25);
}

.ib-btn:hover,
.ib-btn:focus-visible {
	transform: translateY(-1px);
	filter: brightness(1.08);
	box-shadow: 0 6px 24px rgba(220, 38, 38, 0.4);
	color: #ffffff !important;
}

.ib-btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

.ib-btn:active { transform: translateY(0); }

.ib-disclaimer {
	font-size: 0.8rem;
	color: #6b7280;
	margin: 0;
}

/* Honeypot */
.ib-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Thank-you page */
.ib-thanks {
	max-width: 560px;
	margin: 0 auto;
	padding: 5rem 1.5rem 6rem;
	text-align: center;
}

.ib-thanks-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 1.5rem;
	border-radius: 50%;
	background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(153, 27, 27, 0.18));
	border: 1px solid rgba(220, 38, 38, 0.4);
	color: #fca5a5;
	font-size: 2rem;
	font-weight: 700;
}

.ib-thanks h1 { margin: 0 0 1rem; }
.ib-thanks p  { font-size: 1.05rem; line-height: 1.6; color: #9ca3af; margin: 0 0 1rem; }
.ib-thanks .ib-btn { margin-top: 1.5rem; }

@media (max-width: 640px) {
	.ib-hero       { padding: 3rem 1.25rem 2rem; }
	.ib-wrap       { padding: 2rem 1.25rem 3rem; }
	.ib-form-card  { padding: 1.25rem; }
	.ib-title      { font-size: 1.75rem; }
	.ib-info       { padding: 1.25rem; }
	.ib-actions    { justify-content: stretch; }
	.ib-actions .ib-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ib-btn { transition: none; }
	.ib-btn:hover { transform: none; }
}
