/*
 * Ping Site Shield — Front-End Stylesheet
 * Shared styles for Coming Soon and Maintenance mode templates.
 *
 * All classes are prefixed with pss- to prevent collisions with any
 * theme styles that might be loaded in future phases.
 *
 * Structure
 *   1. Custom properties (design tokens)
 *   2. Reset & base
 *   3. Layout — shared
 *   4. Image
 *   5. CTA button
 *   6. Coming Soon — page-specific
 *   7. Maintenance — page-specific
 *   8. Responsive
 */

/* ==========================================================================
   1. Custom Properties
   ========================================================================== */

:root {
	/* Coming soon palette — warm amber/teal pulled from the steampunk artwork */
	--pss-cs-bg:          #1e2f30;
	--pss-cs-surface:     rgba(255, 255, 255, 0.03);
	--pss-cs-accent:      #d4a94a;
	--pss-cs-accent-dark: #b8892e;
	--pss-cs-text:        #f0e0c0;
	--pss-cs-muted:       rgba(240, 224, 192, 0.55);

	/* Maintenance palette — slightly cooler, deeper */
	--pss-mt-bg:          #111618;
	--pss-mt-surface:     rgba(255, 255, 255, 0.03);
	--pss-mt-accent:      #e8c97a;
	--pss-mt-accent-dark: #c9a84a;
	--pss-mt-text:        #e8ddd0;
	--pss-mt-muted:       rgba(232, 221, 208, 0.55);

	/* Shared */
	--pss-radius-pill:    50px;
	--pss-radius-img:     10px;
	--pss-transition:     0.3s ease;
	--pss-font-body:      'Georgia', 'Times New Roman', serif;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

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

html,
body {
	height: 100%;
}

body {
	font-family: var(--pss-font-body);
	-webkit-font-smoothing: antialiased;
	overflow: hidden; /* No scroll on full-screen pages */
}

/* ==========================================================================
   2b. Preview Banner — Phase 6
   Shown only during admin preview renders (pss_is_preview = true).
   Fixed to top so it never interferes with the template layout below.
   ========================================================================== */

.pss-preview-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	padding: 10px 20px;
	font-family: var(--pss-font-body);
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	font-weight: 700;
}

.pss-preview-banner--coming-soon {
	background: #fef3cd;
	color: #7a5800;
	border-bottom: 2px solid #d4a94a;
}

.pss-preview-banner--maintenance {
	background: #fce8e8;
	color: #8a1a1a;
	border-bottom: 2px solid #e8c97a;
}

/* ==========================================================================
   3. Layout — shared
   ========================================================================== */

/* Full-viewport flex column — logo (optional) → image → button */
.pss-page-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100vh;
	width: 100%;
	padding: 20px 16px 24px;
	gap: 22px;
}

/* ==========================================================================
   3b. Logo
   ========================================================================== */

.pss-logo-wrap {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 320px;
}

.pss-logo-image {
	display: block;
	max-width: 100%;
	max-height: 80px;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Image container: grows to fill remaining space, never overflows */
.pss-image-container {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-height: 0;      /* Critical — allows flex child to shrink */
	width: 100%;
	max-width: 1280px;
	position: relative;
}

/* ==========================================================================
   4. Image
   ========================================================================== */

.pss-hero-image {
	display: block;
	width: 100%;
	height: 100%;
	max-height: calc(100vh - 160px); /* Accounts for logo + button + gaps + padding */
	object-fit: contain;
	object-position: center;
	border-radius: var(--pss-radius-img);
}

/* Fallback heading shown when no image is set */
.pss-image-fallback {
	font-size: clamp(1.4rem, 4vw, 2.4rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-align: center;
	line-height: 1.25;
}

/* ==========================================================================
   5. CTA Button — shared base
   ========================================================================== */

.pss-cta-button {
	display: inline-block;
	flex-shrink: 0;
	padding: 13px 44px;
	background: transparent;
	font-family: var(--pss-font-body);
	font-size: 0.9rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	border-width: 2px;
	border-style: solid;
	border-radius: var(--pss-radius-pill);
	cursor: pointer;
	position: relative;
	overflow: hidden;
	transition:
		color          var(--pss-transition),
		box-shadow     var(--pss-transition),
		transform      0.18s ease;
}

/* Sliding fill — sweeps left-to-right on hover */
.pss-cta-button::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--pss-transition);
	z-index: 0;
}

.pss-cta-button span {
	position: relative;
	z-index: 1;
}

.pss-cta-button:hover {
	transform: translateY(-2px);
}

.pss-cta-button:hover::before {
	transform: scaleX(1);
}

.pss-cta-button:active {
	transform: translateY(0);
	box-shadow: none !important;
}

/* ==========================================================================
   6. Coming Soon — page-specific
   ========================================================================== */

.pss-coming-wrapper {
	background-color: var(--pss-cs-bg);
}

.pss-coming-wrapper .pss-image-fallback {
	color: var(--pss-cs-text);
}

/* CTA — gold on teal */
.pss-coming-wrapper .pss-cta-button {
	color: var(--pss-cs-accent);
	border-color: var(--pss-cs-accent);
}

.pss-coming-wrapper .pss-cta-button::before {
	background: var(--pss-cs-accent);
}

.pss-coming-wrapper .pss-cta-button:hover {
	color: #1a2424;
	box-shadow: 0 0 28px rgba(212, 169, 74, 0.5);
}

/* ==========================================================================
   7. Maintenance — page-specific
   ========================================================================== */

.pss-maintenance-wrapper {
	background-color: var(--pss-mt-bg);
}

.pss-maintenance-wrapper .pss-image-fallback {
	color: var(--pss-mt-text);
}

/* CTA — warm amber on near-black */
.pss-maintenance-wrapper .pss-cta-button {
	color: var(--pss-mt-accent);
	border-color: var(--pss-mt-accent);
}

.pss-maintenance-wrapper .pss-cta-button::before {
	background: var(--pss-mt-accent);
}

.pss-maintenance-wrapper .pss-cta-button:hover {
	color: #111618;
	box-shadow: 0 0 28px rgba(232, 201, 122, 0.45);
}

/* ==========================================================================
   8. Responsive
   ========================================================================== */

/* Small phones */
@media (max-width: 480px) {
	.pss-page-wrapper {
		padding: 14px 12px 18px;
		gap: 18px;
	}

	.pss-hero-image {
		max-height: calc(100vh - 95px);
		border-radius: 7px;
	}

	.pss-cta-button {
		padding: 11px 30px;
		font-size: 0.8rem;
	}
}

/* Tablets */
@media (min-width: 481px) and (max-width: 1024px) {
	.pss-hero-image {
		max-height: calc(100vh - 110px);
	}
}

/* Large desktop */
@media (min-width: 1280px) {
	.pss-page-wrapper {
		gap: 32px;
	}
}

/* Landscape phones — tighten spacing */
@media (max-height: 500px) and (orientation: landscape) {
	.pss-page-wrapper {
		padding: 10px 12px;
		gap: 12px;
	}

	.pss-hero-image {
		max-height: calc(100vh - 72px);
	}

	.pss-cta-button {
		padding: 9px 26px;
		font-size: 0.78rem;
	}
}
