/* ==========================================================================
   Splash page - "Portal has moved" countdown redirect
   Standalone stylesheet. No external dependencies.

   Contrast ratios against #ffffff (WCAG 2.1 AA needs 4.5:1 text, 3:1 non-text):
     --color-primary        #3f61ad   6.0:1   (also white-on-blue = 6.0:1)
     --color-primary-hover  #36559a   7.2:1
     --color-secondary      #4b6fb8   4.9:1   (text and border)
     --color-text           #222222  15.9:1
   --color-border is decorative only (conveys no state or boundary meaning).
   ========================================================================== */

:root {
	--color-primary: #3f61ad;
	--color-primary-hover: #36559a;
	--color-secondary: #4b6fb8;
	--color-secondary-bg-hover: #f5f8ff;
	--color-text: #222222;
	--color-panel: #f5f6f7;
	--color-border: #d6dae1;
	--color-topbar: #1b5daa;
	--color-surface: #ffffff;
	--color-page: #eef0f3;
	--color-focus: #1b1b1b;

	--radius: 0.625rem;
	--font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	/* Never set a px font-size on html - it breaks user font-size preferences. */
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 1.5rem 1rem;
	background-color: var(--color-page);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.5;
}

a {
	color: var(--color-primary);
}

a:hover {
	color: var(--color-primary-hover);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

/* Available to assistive technology, not shown visually. */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100vh;
	left: 1rem;
	z-index: 10;
	padding: 0.5rem 1rem;
	background-color: var(--color-surface);
	color: var(--color-primary);
	border: 2px solid var(--color-primary);
	border-radius: 0 0 var(--radius) var(--radius);
	font-weight: 600;
	text-decoration: underline;
}

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

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

.splash {
	display: block;
	max-width: 60rem;
	margin: 0 auto;
	padding: 2rem clamp(1rem, 4vw, 3.5rem) 1.75rem;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-top: 4px solid var(--color-topbar);
	border-radius: var(--radius);
}

.splash-header {
	text-align: center;
}

.splash-title {
	margin: 0 0 1.5rem;
	font-size: clamp(1.375rem, 1rem + 1.6vw, 1.75rem);
	font-weight: 700;
	/* Underline comes from CSS, not a <u> element. */
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.splash-subtitle {
	margin: 0;
	font-size: clamp(1.0625rem, 0.95rem + 0.7vw, 1.3125rem);
	font-weight: 700;
}

.splash-address {
	margin: 0.35rem 0 0;
	font-size: clamp(1.0625rem, 0.95rem + 0.7vw, 1.3125rem);
	font-weight: 700;
	/* Long URLs must not force horizontal scrolling at 320px. */
	overflow-wrap: break-word;
	word-break: break-word;
}

.splash-points {
	margin: 1.75rem 0 0;
	padding-left: 1.5rem;
	font-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
}

.splash-points li + li {
	margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   Countdown
   -------------------------------------------------------------------------- */

.countdown-lead {
	margin: 2rem 0 0.75rem;
	font-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
	text-align: center;
}

.countdown-panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	/* min-height, never height: fixed heights clip when users override
	   text spacing (WCAG 1.4.12). */
	min-height: 8rem;
	padding: 1.25rem 1rem;
	background-color: var(--color-panel);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
}

.countdown-value {
	color: var(--color-primary);
	font-size: clamp(2.5rem, 1.75rem + 3.5vw, 3.5rem);
	font-weight: 700;
	line-height: 1.1;
	/* Digits keep a constant width so the panel does not jog as 30 -> 9. */
	font-variant-numeric: tabular-nums;
}

.countdown-label {
	margin-top: 0.4rem;
	font-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
}

/* Status message under the buttons: "Countdown paused." / "Countdown resumed." /
   "Redirecting now...". min-height reserves the line while the message is empty,
   so the first message does not shove the footer down. */
.countdown-status {
	min-height: 1.6em;
	margin: 1.125rem 0 0;
	color: var(--color-primary);
	font-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
	text-align: center;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.button-group {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.25rem;
	margin-top: 2rem;
}

.btn {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-width: 15rem;
	min-height: 3.25rem;
	padding: 0.75rem 1.5rem;
	border-radius: var(--radius);
	font-family: inherit;
	font-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
	font-weight: 400;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Buttons must stay usable at 320px, so they stack rather than overflow. */
@media (max-width: 34rem) {
	.button-group {
		flex-direction: column;
		align-items: stretch;
	}

	.btn {
		min-width: 0;
		width: 100%;
	}
}

/* Controls that only work with JavaScript stay hidden until splash.js adds the
   `js` class, so a dead control is never presented. This must out-specify the
   `.btn` display above, hence html:not(.js) rather than a bare .js-only. */
html:not(.js) .js-only {
	display: none;
}

.btn-primary {
	background-color: var(--color-primary);
	border: 2px solid var(--color-primary);
	color: #ffffff;
}

.btn-primary:hover,
.btn-primary:active {
	background-color: var(--color-primary-hover);
	border-color: var(--color-primary-hover);
	color: #ffffff;
}

.btn-secondary {
	background-color: var(--color-surface);
	border: 2px solid var(--color-secondary);
	color: var(--color-secondary);
}

.btn-secondary:hover,
.btn-secondary:active {
	background-color: var(--color-secondary-bg-hover);
	border-color: var(--color-primary-hover);
	color: var(--color-primary-hover);
}

/* Focus indicator. The dark ring alone only reaches ~2.9:1 against the blue
   primary button, so an outer white ring guarantees a >=3:1 edge on both
   white and blue backgrounds (WCAG 2.4.11 / 2.4.13). */
:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
}

.btn-primary:focus-visible {
	box-shadow: 0 0 0 5px var(--color-surface);
}

/* Fallback for browsers without :focus-visible support. */
@supports not selector(:focus-visible) {
	.btn:focus,
	a:focus {
		outline: 3px solid var(--color-focus);
		outline-offset: 2px;
	}
}

/* --------------------------------------------------------------------------
   No-JavaScript notice
   -------------------------------------------------------------------------- */

.noscript-note {
	margin: 1.5rem 0 0;
	padding: 0.875rem 1rem;
	background-color: var(--color-panel);
	border-left: 4px solid var(--color-primary);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.splash-footer {
	margin-top: 2.5rem;
	font-size: 1rem;
}

.splash-footer hr {
	height: 0;
	margin: 0 0 1.5rem;
	border: 0;
	border-top: 1px solid var(--color-border);
}

.splash-footer p {
	margin: 0 0 0.75rem;
}

.contact-list {
	margin: 0;
}

/* Label and value read as one line ("Email: support@example.gov"), which a
   float achieves without display:inline - that can strip <dl> semantics in
   some screen reader / browser pairings. */
.contact-list dt {
	clear: left;
	float: left;
	margin-right: 0.4rem;
	font-weight: 700;
}

.contact-list dd {
	margin: 0 0 0.4rem;
	overflow-wrap: break-word;
}

/* Narrow screens: a long label plus a value on one line wraps awkwardly, so
   stack them instead. */
@media (max-width: 34rem) {
	.contact-list dt {
		float: none;
		margin-right: 0;
	}

	.contact-list dd {
		margin-bottom: 0.75rem;
	}
}

/* --------------------------------------------------------------------------
   User preference and forced-colors overrides
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}

/* Windows High Contrast / forced colors: keep every boundary visible. */
@media (forced-colors: active) {
	.splash,
	.countdown-panel,
	.noscript-note {
		border: 1px solid CanvasText;
	}

	.btn {
		border: 2px solid ButtonText;
		forced-color-adjust: none;
		background-color: ButtonFace;
		color: ButtonText;
	}

	.btn:hover,
	.btn:active {
		background-color: ButtonFace;
		color: ButtonText;
	}

	:focus-visible {
		outline: 3px solid CanvasText;
	}
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
	body {
		padding: 0;
		background-color: #ffffff;
	}

	.splash {
		max-width: none;
		border: 0;
	}

	.skip-link,
	.button-group,
	.countdown-lead,
	.countdown-panel,
	.countdown-status {
		display: none !important;
	}

	/* Every link on this page already shows its own destination as its text
	   (the URL, the phone number, the address), so nothing needs appending. */
	a {
		color: #000000;
	}
}
