/* HiPrivateShop - Premium Standalone Gate Page
 * A luxurious, immersive authentication experience
 * Design: Warm amber/gold with deep noir atmosphere
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Primary Palette - Warm Gold */
    --hps-gold-50: #fffbeb;
    --hps-gold-100: #fef3c7;
    --hps-gold-200: #fde68a;
    --hps-gold-300: #fcd34d;
    --hps-gold-400: #fbbf24;
    --hps-gold-500: #f59e0b;
    --hps-gold-600: #d97706;
    --hps-gold-700: #b45309;
    
    /* Accent - Rose/Copper */
    --hps-rose-400: #fb7185;
    --hps-rose-500: #f43f5e;
    --hps-copper: #c2724e;
    
    /* Neutrals - Rich Noir */
    --hps-noir-950: #09090b;
    --hps-noir-900: #111114;
    --hps-noir-800: #18181b;
    --hps-noir-700: #27272a;
    --hps-noir-600: #3f3f46;
    --hps-noir-500: #71717a;
    --hps-noir-400: #a1a1aa;
    --hps-noir-300: #d4d4d8;
    --hps-noir-200: #e4e4e7;
    --hps-noir-100: #f4f4f5;
    --hps-noir-50: #fafafa;
    
    /* Semantic */
    --hps-success: #22c55e;
    --hps-error: #ef4444;
    --hps-warning: #eab308;
    
    /* Typography */
    --hps-font-display: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hps-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --hps-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --hps-space-xs: 4px;
    --hps-space-sm: 8px;
    --hps-space-md: 16px;
    --hps-space-lg: 24px;
    --hps-space-xl: 32px;
    --hps-space-2xl: 48px;
    --hps-space-3xl: 64px;
    
    /* Borders */
    --hps-radius-sm: 4px;
    --hps-radius-md: 6px;
    --hps-radius-lg: 10px;
    --hps-radius-xl: 14px;
    
    /* Shadows */
    --hps-shadow-glow: 0 0 60px rgba(251, 191, 36, 0.15);
    --hps-shadow-card: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    
    /* Transitions */
    --hps-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --hps-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--hps-font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--hps-noir-100);
    background: var(--hps-noir-950);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   Main Container & Background
   ============================================ */
.hps {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: var(--hps-space-lg);
    position: relative;
    overflow: hidden;
    
    /* Rich layered background */
    background: 
        /* Ambient light spots */
        radial-gradient(ellipse 800px 600px at 20% 10%, rgba(251, 191, 36, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 600px 400px at 80% 20%, rgba(244, 63, 94, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 900px 700px at 50% 100%, rgba(251, 191, 36, 0.06) 0%, transparent 50%),
        /* Subtle noise texture via gradient */
        repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg, transparent 1deg),
        /* Base gradient */
        linear-gradient(165deg, var(--hps-noir-900) 0%, var(--hps-noir-950) 50%, #0a0a0c 100%);
}

/* ============================================
   Optional background media (image/video)
   ============================================ */
.hps__bgMedia {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hps__bgImage {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
}

.hps__bgVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hps__bgOverlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.55);
}

/* When custom media is present, avoid painting the built-in background on top of it. */
.hps[data-hps-has-bg-media="1"] {
    background: transparent !important;
}

/* Keep the gate UI above background media */
.hps {
    z-index: 1;
}

/* ============================================
   Background Animations (per scheme)
   ============================================ */

/* Base pseudo-elements for all animations */
.hps::before,
.hps::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Animation layer (behind vignette) */
.hps::before {
    z-index: 0;
}

/* Vignette effect (always present, on top of animation) */
.hps::after {
    background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

/* ----------------------------------------
   NONE (No animation)
   ---------------------------------------- */
.hps[data-hps-animation="none"]::before {
    display: none;
}

/* ----------------------------------------
   PARTICLES (Golden Noir - default)
   ---------------------------------------- */
.hps[data-hps-animation="particles"]::before,
.hps:not([data-hps-animation])::before {
    background-image: 
        radial-gradient(4px 4px at 20% 30%, rgba(245, 158, 11, 0.8), transparent),
        radial-gradient(3px 3px at 40% 70%, rgba(251, 191, 36, 0.7), transparent),
        radial-gradient(3px 3px at 90% 40%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(4px 4px at 60% 10%, rgba(244, 114, 182, 0.6), transparent),
        radial-gradient(3px 3px at 10% 80%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(3px 3px at 70% 90%, rgba(245, 158, 11, 0.7), transparent),
        radial-gradient(4px 4px at 30% 50%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(3px 3px at 85% 65%, rgba(251, 191, 36, 0.6), transparent),
        radial-gradient(4px 4px at 15% 55%, rgba(244, 114, 182, 0.5), transparent);
    background-size: 300px 300px, 250px 250px, 180px 180px, 280px 280px, 220px 220px, 350px 350px, 400px 400px, 270px 270px, 330px 330px;
    animation: hpsParticlesDrift 12s linear infinite;
    opacity: 1;
}

@keyframes hpsParticlesDrift {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-200px) translateX(100px); }
}

/* ----------------------------------------
   AURORA (Midnight Sapphire)
   ---------------------------------------- */
.hps[data-hps-animation="aurora"]::before {
    background: 
        linear-gradient(125deg, 
            rgba(59, 130, 246, 0.3) 0%, 
            transparent 25%, 
            rgba(139, 92, 246, 0.25) 50%, 
            transparent 75%, 
            rgba(59, 130, 246, 0.3) 100%
        );
    background-size: 300% 300%;
    animation: hpsAuroraFlow 6s ease-in-out infinite;
    opacity: 1;
}

@keyframes hpsAuroraFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ----------------------------------------
   WAVES (Emerald Luxe)
   ---------------------------------------- */
.hps[data-hps-animation="waves"]::before {
    background: 
        radial-gradient(ellipse 100% 60% at 20% 100%, rgba(16, 185, 129, 0.4), transparent 70%),
        radial-gradient(ellipse 80% 50% at 80% 0%, rgba(52, 211, 153, 0.35), transparent 70%),
        radial-gradient(ellipse 90% 70% at 50% 50%, rgba(16, 185, 129, 0.25), transparent 60%);
    animation: hpsWavesFlow 5s ease-in-out infinite;
    opacity: 1;
}

@keyframes hpsWavesFlow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    33% { transform: scale(1.05) rotate(1deg); }
    66% { transform: scale(0.98) rotate(-1deg); }
}

/* ----------------------------------------
   BLOBS (Rose Quartz)
   ---------------------------------------- */
.hps[data-hps-animation="blobs"]::before {
    background: 
        radial-gradient(circle 300px at 20% 30%, rgba(236, 72, 153, 0.5) 0%, transparent 70%),
        radial-gradient(circle 250px at 80% 70%, rgba(192, 132, 252, 0.45) 0%, transparent 70%),
        radial-gradient(circle 280px at 50% 90%, rgba(236, 72, 153, 0.4) 0%, transparent 70%);
    animation: hpsBlobsFloat 8s ease-in-out infinite;
    filter: blur(60px);
    opacity: 1;
}

@keyframes hpsBlobsFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -40px) scale(1.1); }
    50% { transform: translate(-40px, 40px) scale(0.9); }
    75% { transform: translate(20px, -20px) scale(1.05); }
}

/* ----------------------------------------
   GRID (Slate Modern)
   ---------------------------------------- */
.hps[data-hps-animation="grid"]::before {
    background-image: 
        linear-gradient(rgba(6, 182, 212, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: hpsGridPulse 2s ease-in-out infinite;
    opacity: 1;
}

@keyframes hpsGridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ----------------------------------------
   GRADIENT (Sunset Warmth)
   ---------------------------------------- */
.hps[data-hps-animation="gradient"]::before {
    background: linear-gradient(
        135deg,
        rgba(249, 115, 22, 0.4) 0%,
        rgba(251, 146, 60, 0.2) 25%,
        rgba(248, 113, 113, 0.35) 50%,
        rgba(251, 146, 60, 0.2) 75%,
        rgba(249, 115, 22, 0.4) 100%
    );
    background-size: 200% 200%;
    animation: hpsGradientShift 4s ease-in-out infinite;
    opacity: 1;
}

@keyframes hpsGradientShift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

/* ----------------------------------------
   NOISE (Charcoal Minimal)
   ---------------------------------------- */
.hps[data-hps-animation="noise"]::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.08;
    animation: hpsNoiseShift 0.2s steps(3) infinite;
}

@keyframes hpsNoiseShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5px, 5px); }
}

/* ----------------------------------------
   SNOW (Arctic Snow)
   ---------------------------------------- */
.hps[data-hps-animation="snow"]::before {
    background-image: 
        radial-gradient(4px 4px at 10% 20%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(3px 3px at 30% 50%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(4px 4px at 50% 10%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(3px 3px at 70% 60%, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(4px 4px at 90% 30%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(3px 3px at 20% 80%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 45% 35%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(3px 3px at 75% 85%, rgba(255, 255, 255, 0.7), transparent);
    background-size: 150px 150px, 130px 130px, 180px 180px, 110px 110px, 200px 200px, 160px 160px, 140px 140px, 170px 170px;
    animation: hpsSnowFall 6s linear infinite;
    opacity: 1;
}

@keyframes hpsSnowFall {
    0% { transform: translateY(-50px) translateX(0); }
    100% { transform: translateY(150px) translateX(30px); }
}

/* ----------------------------------------
   STEAM (Espresso Cream) - Dramatic foggy wisps
   ---------------------------------------- */
.hps[data-hps-animation="steam"]::before {
    background: 
        radial-gradient(ellipse 60% 50% at 10% 90%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 75%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(ellipse 70% 55% at 45% 100%, rgba(255, 255, 255, 0.65), transparent 55%),
        radial-gradient(ellipse 40% 35% at 25% 65%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(ellipse 45% 40% at 70% 85%, rgba(255, 255, 255, 0.55), transparent 60%);
    filter: blur(60px);
    animation: hpsSteamFloat 6s ease-in-out infinite;
    opacity: 1;
}

.hps[data-hps-animation="steam"]::after {
    background: 
        radial-gradient(ellipse 55% 45% at 20% 80%, rgba(240, 235, 230, 0.6), transparent 55%),
        radial-gradient(ellipse 45% 35% at 75% 70%, rgba(240, 235, 230, 0.5), transparent 55%),
        radial-gradient(ellipse 60% 50% at 55% 95%, rgba(240, 235, 230, 0.55), transparent 50%),
        radial-gradient(ellipse 35% 30% at 40% 55%, rgba(240, 235, 230, 0.45), transparent 55%);
    filter: blur(80px);
    animation: hpsSteamFloat2 8s ease-in-out infinite;
    animation-delay: -3s;
    opacity: 1;
}

@keyframes hpsSteamFloat {
    0% { 
        transform: translateY(0) translateX(0) scale(1); 
        opacity: 0.8;
    }
    25% {
        transform: translateY(-15%) translateX(5%) scale(1.15);
        opacity: 1;
    }
    50% { 
        transform: translateY(-25%) translateX(-3%) scale(1.25); 
        opacity: 0.9;
    }
    75% {
        transform: translateY(-12%) translateX(-6%) scale(1.1);
        opacity: 1;
    }
    100% { 
        transform: translateY(0) translateX(0) scale(1); 
        opacity: 0.8;
    }
}

@keyframes hpsSteamFloat2 {
    0% { 
        transform: translateY(0) translateX(0) scale(1); 
        opacity: 0.7;
    }
    33% { 
        transform: translateY(-18%) translateX(-8%) scale(1.2); 
        opacity: 0.9;
    }
    66% {
        transform: translateY(-30%) translateX(4%) scale(1.3);
        opacity: 0.85;
    }
    100% { 
        transform: translateY(0) translateX(0) scale(1); 
        opacity: 0.7;
    }
}

/* ============================================
   Shell (Main Layout Container)
   ============================================ */
.hps__shell {
    position: relative;
    z-index: 2;
    width: min(1140px, 100%);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--hps-space-lg);
    animation: hpsFadeIn 0.8s var(--hps-ease-out) both;
}

@keyframes hpsFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1024px) {
    .hps__shell {
        grid-template-columns: 1.1fr 0.9fr;
        gap: var(--hps-space-3xl);
        align-items: center;
    }
}

/* Wide mode for address registration */
.hps[data-hps-wide="1"][data-tab="register"] .hps__shell {
    width: min(1380px, 100%);
}

@media (min-width: 1024px) {
    .hps[data-hps-wide="1"][data-tab="register"] .hps__shell {
        grid-template-columns: 0.85fr 1.15fr;
    }
}

/* ============================================
   Centered Layout Mode (no sidebar)
   ============================================ */
.hps--centered .hps__shell {
    width: min(520px, 100%);
    grid-template-columns: 1fr;
}

.hps--centered[data-hps-wide="1"][data-tab="register"] .hps__shell {
    width: min(1100px, 100%);
}

@media (min-width: 1024px) {
    .hps--centered .hps__shell {
        grid-template-columns: 1fr;
    }
    
    .hps--centered[data-hps-wide="1"][data-tab="register"] .hps__shell {
        grid-template-columns: 1fr;
    }
}

/* Card header (for centered mode) */
.hps__cardHeader {
    display: flex;
    flex-direction: column;
    gap: var(--hps-space-md);
    padding: var(--hps-space-lg);
    padding-bottom: 0;
}

.hps__cardTopRow {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 44px;
}

.hps__cardLogo {
    display: block;
    width: auto;
    max-width: 140px;
    height: auto;
    max-height: 44px;
    object-fit: contain;
}

.hps__cardMessage {
    padding: var(--hps-space-md);
    border-radius: var(--hps-radius-md);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--hps-gold-500) 6%, transparent) 0%,
        color-mix(in srgb, var(--hps-gold-500) 2%, transparent) 100%
    );
    border: 1px solid color-mix(in srgb, var(--hps-gold-500) 15%, transparent);
    width: 100%;

    font-size: 14px;
    line-height: 1.5;
    color: var(--hps-noir-600);
}

.hps__cardMessage p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--hps-noir-600);
    margin: 0;
}

.hps__cardMessage p + p {
    margin-top: 2px;
}

.hps__cardMessage strong {
    font-weight: 600;
    color: var(--hps-noir-800);
}

/* Animated lock icon in card header */
.hps__cardIcon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: var(--hps-radius-md);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--hps-gold-500) 12%, transparent) 0%,
        color-mix(in srgb, var(--hps-gold-500) 4%, transparent) 100%
    );
    border: 1px solid color-mix(in srgb, var(--hps-gold-500) 20%, transparent);
    color: var(--hps-gold-500);
    animation: hpsIconFloat 3s ease-in-out infinite;
}

.hps__cardIcon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 1px 4px color-mix(in srgb, var(--hps-gold-500) 30%, transparent));
}

@keyframes hpsIconFloat {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(calc(-50% - 3px)); }
}

/* ============================================
   Side Panel (Branding & Message)
   ============================================ */
.hps__side {
    padding: var(--hps-space-md);
    animation: hpsSlideIn 0.9s var(--hps-ease-out) 0.1s both;
}

@keyframes hpsSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hps__sideHeader {
    position: relative;
    margin-bottom: var(--hps-space-xl);
    padding-right: 70px;
}

.hps__sideHeaderText {
    min-width: 0;
}

/* Floating lock icon */
.hps__logo--floating {
    position: absolute;
    right: 0;
    top: 0;
}

.hps__logo {
    width: 56px;
    height: 56px;
    border-radius: var(--hps-radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* Glass effect with accent tint */
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--hps-gold-500) 15%, transparent) 0%,
        color-mix(in srgb, var(--hps-gold-500) 5%, transparent) 100%
    );
    border: 1px solid color-mix(in srgb, var(--hps-gold-500) 25%, transparent);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: var(--hps-gold-400);
    
    animation: hpsFloatIcon 4s ease-in-out infinite;
}

@keyframes hpsFloatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hps__logoIcon {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--hps-gold-500) 30%, transparent));
}

/* Kicker (Shop name) */
.hps__kicker {
    font-family: var(--hps-font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--hps-gold-400);
    margin-bottom: var(--hps-space-sm);
    opacity: 0.9;
}

/* Main title */
.hps__title {
    font-family: var(--hps-font-display);
    font-size: clamp(32px, 5vw, 43px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--hps-noir-50);
    
    /* Subtle gradient text */
    background: linear-gradient(
        135deg,
        var(--hps-noir-50) 0%,
        var(--hps-gold-200) 50%,
        var(--hps-noir-100) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    animation: hpsTitleShimmer 8s ease-in-out infinite;
}

@keyframes hpsTitleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Message block */
.hps__message {
    margin-top: var(--hps-space-xl);
    padding-left: var(--hps-space-md);
    border-left: 2px solid var(--hps-gold-500);
    position: relative;
}

/* Glowing border effect */
.hps__message::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--hps-gold-400);
    filter: blur(4px);
    opacity: 0.6;
}

.hps__messageBody {
    font-size: 15px;
    line-height: 1.75;
    color: var(--hps-noir-300);
    max-width: 50ch;
}

.hps__messageBody :first-child {
    margin-top: 0;
}

.hps__messageBody :last-child {
    margin-bottom: 0;
}

.hps__messageBody a {
    color: var(--hps-gold-400);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.hps__messageBody a:hover {
    color: var(--hps-gold-300);
}

/* ============================================
   Main Card (Forms Container)
   ============================================ */
.hps__card {
    position: relative;
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(250, 250, 250, 0.92) 100%
    );
    border-radius: var(--hps-radius-xl);
    box-shadow: var(--hps-shadow-card);
    overflow: hidden;
    
    /* Subtle inner glow */
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    animation: hpsCardIn 0.9s var(--hps-ease-out) 0.2s both;
}

@keyframes hpsCardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Golden accent line at top of card */
.hps__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--hps-gold-400) 20%,
        var(--hps-gold-500) 50%,
        var(--hps-gold-400) 80%,
        transparent 100%
    );
    opacity: 0.8;
}

/* ============================================
   Loading Overlay
   ============================================ */
.hps__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
    animation: hpsOverlayIn 0.3s ease-out;
}

@keyframes hpsOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hps__overlay[hidden] {
    display: none;
}

.hps__overlayContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hps-space-md);
    text-align: center;
    padding: var(--hps-space-xl);
    width: min(360px, 88%);
    box-sizing: border-box;
    border-radius: var(--hps-radius-md);
    background: white;
    border: 1px solid var(--hps-noir-200);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.hps__spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--hps-noir-200);
    border-top-color: var(--hps-gold-500);
    animation: hpsSpin 0.8s linear infinite;
}

@keyframes hpsSpin {
    to { transform: rotate(360deg); }
}

.hps__successIcon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: var(--hps-success);
    font-weight: 700;
    font-size: 20px;
    animation: hpsSuccessPop 0.4s var(--hps-ease-spring);
}

@keyframes hpsSuccessPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.hps__overlayTitle {
    font-family: var(--hps-font-display);
    font-weight: 600;
    font-size: 18px;
    color: var(--hps-noir-900);
}

.hps__overlayDesc {
    font-size: 14px;
    color: var(--hps-noir-500);
}

/* ============================================
   Shop Logo
   ============================================ */
.hps__shopLogo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--hps-space-xl) var(--hps-space-lg) var(--hps-space-md);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--hps-gold-500) 3%, transparent) 0%,
        transparent 100%
    );
}

.hps__shopLogoImg {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.08));
}

/* ============================================
   Tabs
   ============================================ */
.hps__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 16px var(--hps-space-lg) 0;
    background: var(--hps-noir-100);
    border-radius: var(--hps-radius-sm);
    padding: 3px;
    gap: 3px;
}

.hps__tabs .hps__tab:only-child {
    grid-column: 1 / -1;
}

.hps__tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--hps-noir-500);
    border-radius: 3px;
    transition: all 0.25s var(--hps-ease-out);
}

.hps__tab:hover:not([aria-selected="true"]) {
    color: var(--hps-noir-700);
    background: rgba(0, 0, 0, 0.03);
}

.hps__tab[aria-selected="true"] {
    background: white;
    color: var(--hps-noir-900);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ============================================
   Panes (Form Sections)
   ============================================ */
.hps__pane {
    padding: var(--hps-space-lg);
    animation: hpsPaneIn 0.35s var(--hps-ease-out);
}

@keyframes hpsPaneIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hps__pane[hidden] {
    display: none;
}

.hps__paneTitle {
    font-family: var(--hps-font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--hps-noir-900);
    margin-bottom: var(--hps-space-xs);
}

.hps__paneDesc {
    font-size: 14px;
    color: var(--hps-noir-500);
    margin-bottom: var(--hps-space-lg);
}

/* ============================================
   Error Messages
   ============================================ */
.hps__errors {
    margin-bottom: var(--hps-space-md);
    padding: var(--hps-space-md);
    border-radius: var(--hps-radius-sm);
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #991b1b;
    font-size: 13px;
    animation: hpsShake 0.4s ease-out;
}

@keyframes hpsShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.hps__errors ul {
    margin: 0;
    padding-left: var(--hps-space-lg);
}

.hps__errors li {
    margin: 4px 0;
}

/* ============================================
   Forms
   ============================================ */
.hps__form {
    display: grid;
    gap: var(--hps-space-md);
}

/* ============================================
   Registration Grid (with address)
   ============================================ */
.hps__registerGrid {
    display: grid;
    gap: var(--hps-space-lg);
}

@media (min-width: 768px) {
    .hps__registerGrid--withAddress {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: var(--hps-space-xl);
    }
}

.hps__registerCol {
    display: grid;
    gap: var(--hps-space-md);
    align-content: start;
}

.hps__addressFields {
    display: grid;
    gap: var(--hps-space-md);
    align-content: start;
}

/* ============================================
   Two-Column Row
   ============================================ */
.hps__row2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--hps-space-md);
}

@media (min-width: 480px) {
    .hps__row2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   Form Fields
   ============================================ */
.hps__field {
    position: relative;
}

.hps__field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--hps-noir-600);
    margin-bottom: var(--hps-space-xs);
    text-transform: uppercase;
}

.hps__input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--hps-radius-sm);
    border: 1px solid var(--hps-noir-200);
    background: white;
    color: var(--hps-noir-900);
    font-size: 15px;
    outline: none;
    transition: 
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.hps__input::placeholder {
    color: var(--hps-noir-400);
}

.hps__input:hover {
    border-color: var(--hps-noir-300);
}

.hps__input:focus {
    border-color: var(--hps-gold-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hps-gold-500) 15%, transparent);
}

/* Select styling */
select.hps__input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.hps__help {
    margin-top: var(--hps-space-xs);
    font-size: 12px;
    color: var(--hps-noir-500);
}

/* ============================================
   Checkboxes
   ============================================ */
.hps__checks {
    display: grid;
    gap: var(--hps-space-sm);
    margin-top: var(--hps-space-xs);
}

.hps__check {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: var(--hps-space-sm);
    align-items: flex-start;
    font-size: 13px;
    color: var(--hps-noir-600);
    cursor: pointer;
}

.hps__checkInput {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--hps-gold-500);
    cursor: pointer;
}

.hps__checkLabel {
    line-height: 1.5;
}

.hps__checkLabel a {
    color: var(--hps-gold-600);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hps__checkLabel em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    font-size: 12px;
    color: var(--hps-noir-500);
}

/* ============================================
   Radio Buttons
   ============================================ */
.hps__radioLabel {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--hps-noir-600);
    margin-bottom: var(--hps-space-sm);
    text-transform: uppercase;
}

.hps__radios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hps__radio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--hps-noir-600);
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 3px;
    border: 1px solid var(--hps-noir-200);
    background: white;
    transition: all 0.15s ease;
    user-select: none;
}

.hps__radio:hover {
    border-color: var(--hps-noir-300);
    background: var(--hps-noir-50);
}

.hps__radio:has(.hps__radioInput:checked) {
    border-color: var(--hps-gold-500);
    background: var(--hps-gold-500);
    color: white;
    font-weight: 600;
}

/* Hide the actual radio input */
.hps__radioInput {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.hps__radioText {
    display: block;
}

/* ============================================
   Section Titles
   ============================================ */
.hps__sectionTitle {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--hps-noir-500);
    padding-bottom: var(--hps-space-sm);
    border-bottom: 1px solid var(--hps-noir-200);
    margin-bottom: var(--hps-space-sm);
}

/* ============================================
   Submit Button
   ============================================ */
.hps__submit {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--hps-radius-sm);
    border: 0;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    
    /* Luxurious gold gradient */
    background: linear-gradient(
        180deg,
        var(--hps-gold-400) 0%,
        var(--hps-gold-500) 100%
    );
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    
    box-shadow: 
        0 2px 8px color-mix(in srgb, var(--hps-gold-500) 30%, transparent),
        0 1px 2px rgba(0, 0, 0, 0.08);
    
    transition: 
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.hps__submit:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px color-mix(in srgb, var(--hps-gold-500) 40%, transparent),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.hps__submit:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px color-mix(in srgb, var(--hps-gold-500) 30%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hps__form.is-busy .hps__submit {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Meta Links (Forgot password, etc.)
   ============================================ */
.hps__meta {
    display: flex;
    justify-content: space-between;
    gap: var(--hps-space-md);
    margin-top: var(--hps-space-sm);
    font-size: 13px;
}

.hps__link {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--hps-noir-500);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.hps__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--hps-gold-500);
    transition: width 0.25s var(--hps-ease-out);
}

.hps__link:hover {
    color: var(--hps-gold-600);
}

.hps__link:hover::after {
    width: 100%;
}

/* ============================================
   Divider (unused but kept for compatibility)
   ============================================ */
.hps__divider {
    height: 1px;
    margin: var(--hps-space-md) 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--hps-noir-200) 50%,
        transparent 100%
    );
}

/* ============================================
   Bullets (feature list, if used)
   ============================================ */
.hps__bullets {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--hps-noir-300);
}

.hps__bullets li {
    display: flex;
    gap: var(--hps-space-sm);
    align-items: flex-start;
    margin: var(--hps-space-sm) 0;
    font-size: 14px;
}

.hps__bullets li span:last-child {
    max-width: 48ch;
}

@media (min-width: 992px) {
    .hps__bullets {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--hps-space-sm) var(--hps-space-lg);
    }
    .hps__bullets li {
        margin: 0;
    }
}

.hps__bulletIcon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--hps-gold-500) 20%, transparent) 0%,
        color-mix(in srgb, var(--hps-gold-500) 10%, transparent) 100%
    );
    border: 1px solid color-mix(in srgb, var(--hps-gold-500) 30%, transparent);
    position: relative;
}

.hps__bulletIcon::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 10px;
    height: 5px;
    border-left: 2px solid var(--hps-gold-400);
    border-bottom: 2px solid var(--hps-gold-400);
    transform: translateY(-1px) rotate(-45deg);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .hps {
        padding: var(--hps-space-md);
    }
    
    .hps__cardHeader {
        padding: var(--hps-space-md);
        padding-bottom: 0;
    }
    
    .hps__pane {
        padding: var(--hps-space-md);
    }
    
    .hps__tabs {
        margin: 16px var(--hps-space-md) 0;
    }
    
    .hps__sideHeader {
        padding-right: 60px;
    }
    
    .hps__logo {
        width: 48px;
        height: 48px;
    }
    
    .hps__logoIcon {
        width: 22px;
        height: 22px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .hps {
        background: white;
        padding: 20px;
    }
    
    .hps::before,
    .hps::after {
        display: none;
    }
    
    .hps__card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .hps__side {
        color: #333;
    }
    
    .hps__title {
        background: none;
        -webkit-text-fill-color: #111;
        color: #111;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   High Contrast Mode Support
   ============================================ */
@media (prefers-contrast: high) {
    .hps__input {
        border-width: 2px;
    }
    
    .hps__tab[aria-selected="true"] {
        outline: 2px solid var(--hps-noir-900);
    }
    
    .hps__submit {
        border: 2px solid var(--hps-gold-700);
    }
}
