/*
 * Theme Name:  Stellar
 * Theme URI:   https://nameastar.com
 * Description: A premium cinematic WordPress theme for Name a Star — an immersive space experience where customers name a real star and receive an official certificate.
 * Version:     1.0.0
 * Author:      Name a Star
 * Author URI:  https://nameastar.com
 * License:     GPL-2.0-or-later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: stellar
 * Tags:        dark, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, translation-ready, e-commerce
 *
 * @package Stellar
 * @since   1.0.0
 */

/* ============================================================
   DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   ============================================================ */

:root {
	/* Color Palette */
	--color-void:           #0a0a1a;
	--color-nebula:         #0d1b2a;
	--color-cosmos:         #1b2838;
	--color-stardust:       #8892b0;
	--color-moonlight:      #ccd6f6;
	--color-supernova:      #f0c27f;
	--color-supernova-hover:#ffd700;
	--color-aurora:         #64ffda;
	--color-white-star:     #e6f1ff;
	--color-red-giant:      #ff6b6b;

	/* Glassmorphism */
	--glass-bg:             rgba(27, 40, 56, 0.6);
	--glass-border:         rgba(100, 255, 218, 0.1);
	--glass-blur:           blur(12px);

	/* Typography Scale */
	--font-heading:         'Playfair Display', Georgia, serif;
	--font-body:            'Inter', system-ui, -apple-system, sans-serif;
	--font-accent:          'Space Mono', 'Courier New', monospace;
	--font-display:         'Cinzel', Georgia, serif;

	/* Spacing */
	--section-padding:      clamp(60px, 10vw, 120px);
	--container-max:        1280px;
	--container-padding:    clamp(16px, 5vw, 80px);

	/* Transitions */
	--transition-fast:      0.2s ease;
	--transition-base:      0.3s ease;
	--transition-slow:      0.6s ease;

	/* Shadows / Glows */
	--glow-gold:            0 0 20px rgba(240, 194, 127, 0.4), 0 0 60px rgba(240, 194, 127, 0.15);
	--glow-aurora:          0 0 20px rgba(100, 255, 218, 0.3), 0 0 40px rgba(100, 255, 218, 0.1);
	--glow-card:            0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(100, 255, 218, 0.05);

	/* Border Radius */
	--radius-sm:            6px;
	--radius-md:            12px;
	--radius-lg:            20px;
	--radius-xl:            32px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
	scroll-behavior: smooth;
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	background-color: var(--color-void);
	color: var(--color-stardust);
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.7;
	overflow-x: hidden;
}

/* Screen reader only */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Skip link */
.skip-link {
	position: absolute;
	top: -100%;
	left: 16px;
	background: var(--color-supernova);
	color: var(--color-void);
	padding: 12px 24px;
	border-radius: var(--radius-sm);
	font-weight: 700;
	text-decoration: none;
	z-index: 10000;
	transition: top var(--transition-fast);
}

.skip-link:focus {
	top: 16px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--color-moonlight);
	line-height: 1.2;
	font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
	color: var(--color-stardust);
	margin-bottom: 1rem;
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--color-aurora);
	text-decoration: none;
	transition: color var(--transition-fast), opacity var(--transition-fast);
}

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

a:focus-visible {
	outline: 2px solid var(--color-supernova);
	outline-offset: 3px;
	border-radius: 2px;
}

strong, b { color: var(--color-moonlight); font-weight: 700; }
em, i { color: var(--color-stardust); }

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

.stellar-container {
	width: 100%;
	max-width: var(--container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

.stellar-section {
	padding-top: var(--section-padding);
	padding-bottom: var(--section-padding);
	position: relative;
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */

.stellar-section-title {
	text-align: center;
	margin-bottom: clamp(40px, 6vw, 80px);
}

.stellar-section-title .label {
	display: inline-block;
	font-family: var(--font-accent);
	font-size: 0.75rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-aurora);
	margin-bottom: 16px;
}

.stellar-section-title h2 {
	margin-bottom: 16px;
}

.stellar-section-title .divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 16px;
}

.stellar-section-title .divider::before,
.stellar-section-title .divider::after {
	content: '';
	height: 1px;
	width: 60px;
	background: linear-gradient(90deg, transparent, var(--color-supernova), transparent);
}

.stellar-section-title .divider-star {
	color: var(--color-supernova);
	font-size: 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 32px;
	border-radius: var(--radius-md);
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all var(--transition-base);
	text-decoration: none;
	min-height: 48px;
	position: relative;
	overflow: hidden;
}

.btn::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.05);
	opacity: 0;
	transition: opacity var(--transition-fast);
}

.btn:hover::before {
	opacity: 1;
}

.btn-primary {
	background: linear-gradient(135deg, var(--color-supernova), #d4a55a);
	color: var(--color-void);
	border-color: var(--color-supernova);
	box-shadow: var(--glow-gold);
}

.btn-primary:hover {
	background: linear-gradient(135deg, var(--color-supernova-hover), var(--color-supernova));
	color: var(--color-void);
	box-shadow: 0 0 30px rgba(240, 194, 127, 0.6), 0 0 80px rgba(240, 194, 127, 0.2);
	transform: translateY(-2px);
}

.btn-secondary {
	background: transparent;
	color: var(--color-aurora);
	border-color: var(--color-aurora);
}

.btn-secondary:hover {
	background: rgba(100, 255, 218, 0.1);
	color: var(--color-aurora);
	box-shadow: var(--glow-aurora);
	transform: translateY(-2px);
}

.btn-lg {
	padding: 20px 48px;
	font-size: 1.1rem;
}

.btn-sm {
	padding: 10px 20px;
	font-size: 0.875rem;
}

/* Pulse glow animation on primary CTA */
@keyframes btn-pulse {
	0%, 100% { box-shadow: var(--glow-gold); }
	50%       { box-shadow: 0 0 40px rgba(240, 194, 127, 0.7), 0 0 100px rgba(240, 194, 127, 0.3); }
}

.btn-pulse {
	animation: btn-pulse 3s ease-in-out infinite;
}

/* ============================================================
   GLASSMORPHISM CARDS
   ============================================================ */

.glass-card {
	background: var(--glass-bg);
	backdrop-filter: var(--glass-blur);
	-webkit-backdrop-filter: var(--glass-blur);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--glow-card);
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.glass-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(100, 255, 218, 0.15);
}

/* ============================================================
   FORMS
   ============================================================ */

.stellar-form-field {
	margin-bottom: 24px;
}

.stellar-form-field label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-moonlight);
	margin-bottom: 8px;
	letter-spacing: 0.02em;
}

.stellar-form-field input,
.stellar-form-field select,
.stellar-form-field textarea {
	width: 100%;
	background: rgba(27, 40, 56, 0.8);
	border: 1px solid rgba(100, 255, 218, 0.2);
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	color: var(--color-white-star);
	font-family: var(--font-body);
	font-size: 1rem;
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
	-webkit-appearance: none;
	appearance: none;
}

.stellar-form-field input:focus,
.stellar-form-field select:focus,
.stellar-form-field textarea:focus {
	outline: none;
	border-color: var(--color-supernova);
	box-shadow: 0 0 0 3px rgba(240, 194, 127, 0.15);
}

.stellar-form-field input::placeholder,
.stellar-form-field textarea::placeholder {
	color: var(--color-stardust);
	opacity: 0.6;
}

.stellar-form-field select option {
	background: var(--color-cosmos);
	color: var(--color-white-star);
}

.stellar-form-field textarea {
	min-height: 120px;
	resize: vertical;
}

.field-error {
	display: block;
	font-size: 0.8rem;
	color: var(--color-red-giant);
	margin-top: 6px;
}

.field-hint {
	display: block;
	font-size: 0.8rem;
	color: var(--color-stardust);
	margin-top: 6px;
	opacity: 0.8;
}

/* ============================================================
   IMAGES
   ============================================================ */

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

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */

.alignleft  { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: 1em; }
.alignwide  { margin-left: calc(-1 * var(--container-padding)); margin-right: calc(-1 * var(--container-padding)); }
.alignfull  { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--color-stardust); text-align: center; margin-top: 8px; }
.sticky { /* handled by theme */ }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* ============================================================
   PAGINATION
   ============================================================ */

.stellar-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 60px;
}

.stellar-pagination a,
.stellar-pagination span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-sm);
	font-family: var(--font-accent);
	font-size: 0.875rem;
	transition: all var(--transition-fast);
	color: var(--color-stardust);
	border: 1px solid rgba(100, 255, 218, 0.15);
}

.stellar-pagination a:hover {
	color: var(--color-supernova);
	border-color: var(--color-supernova);
	box-shadow: var(--glow-gold);
}

.stellar-pagination .current {
	background: var(--color-supernova);
	color: var(--color-void);
	border-color: var(--color-supernova);
	font-weight: 700;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

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