/* ============================================
   RUDRAY JEWELS — Luxury Card Stylesheet
   Architecture: CSS Variables → Base → Components → Animations → Responsive
   ============================================ */

/* --- Design Tokens --- */
:root {
    --gold:          #C9A96E;
    --gold-light:    #E2CFA5;
    --gold-dark:     #A8884D;
    --gold-glow:     rgba(201, 169, 110, 0.35);
    --cream:         #FAF7F2;
    --cream-warm:    #F5EDE0;
    --charcoal:      #1A1A1A;
    --charcoal-soft: #2A2724;
    --offwhite:      #EDE8E0;
    --glass-bg:      rgba(12, 10, 8, 0.45);
    --glass-border:  rgba(201, 169, 110, 0.35);
    --font-display:  'Cormorant Garamond', 'Georgia', serif;
    --font-body:     'Jost', 'Helvetica Neue', sans-serif;
    --ease-luxury:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}


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

body {
    font-family: var(--font-body);
    color: var(--cream);
    background-color: #0C0A08;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* --- Background Slideshow --- */
.bg-slideshow {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: #0C0A08;
}

.bg-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.08);
    transform-origin: center center;
    transition: opacity 2.5s var(--ease-luxury),
                transform 10s linear;
    will-change: opacity, transform;
}

.bg-slide.active {
    opacity: 1;
    transform: scale(1.02);
}

.bg-slide.zoom-in {
    transform: scale(1.10);
}

/* Dark vignette overlay */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at center, rgba(12, 10, 8, 0.15) 0%, rgba(12, 10, 8, 0.30) 70%, rgba(12, 10, 8, 0.55) 100%),
        linear-gradient(to top, rgba(12, 10, 8, 0.35) 0%, transparent 50%);
    pointer-events: none;
}


/* --- Floating gold particles (CSS-only) --- */
.bg-overlay::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 15% 25%, rgba(201, 169, 110, 0.4) 50%, transparent 100%),
        radial-gradient(1px 1px at 85% 15%, rgba(201, 169, 110, 0.3) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 50% 80%, rgba(201, 169, 110, 0.35) 50%, transparent 100%),
        radial-gradient(1px 1px at 30% 60%, rgba(201, 169, 110, 0.25) 50%, transparent 100%),
        radial-gradient(1px 1px at 70% 45%, rgba(201, 169, 110, 0.3) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 20% 90%, rgba(201, 169, 110, 0.2) 50%, transparent 100%);
    animation: particleDrift 20s linear infinite;
    pointer-events: none;
}

@keyframes particleDrift {
    0%   { transform: translateY(0) translateX(0); opacity: 0.6; }
    50%  { opacity: 1; }
    100% { transform: translateY(-30px) translateX(15px); opacity: 0.6; }
}


/* --- Card Wrapper (centered) --- */
.card-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 20px;
}


/* --- Glass Card --- */
.card {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 36px 28px 32px;
    text-align: center;

    /* Glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: 20px;

    /* Outer gold glow */
    box-shadow:
        0 0 60px rgba(201, 169, 110, 0.06),
        0 16px 60px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    /* Entry: fade in at center, hold, then drift down */
    animation:
        cardFadeIn 0.8s var(--ease-out-expo) 0.3s both,
        cardDriftDown 1.4s var(--ease-luxury) 2.2s both;
    visibility: visible !important;
}

/* Gold highlight line at top edge */
.card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
    border-radius: 1px;
    animation: topLineGlow 3s ease-in-out infinite alternate;
}

@keyframes topLineGlow {
    0%   { opacity: 0.5; filter: blur(0px); }
    100% { opacity: 1;   filter: blur(0.5px); }
}

/* Step 1: appear at center */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Step 2: gently drift down after reveal */
@keyframes cardDriftDown {
    from { margin-top: 0; }
    to   { margin-top: 20vh; }
}


/* --- Card Shimmer (periodic gold sweep) --- */
.card-shimmer {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.card-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(201, 169, 110, 0.06) 35%,
        rgba(201, 169, 110, 0.18) 50%,
        rgba(201, 169, 110, 0.06) 65%,
        transparent 80%
    );
    animation: shimmerSweep 8s var(--ease-luxury) 3s infinite;
}

@keyframes shimmerSweep {
    0%   { left: -120%; }
    25%  { left: 120%; }
    100% { left: 120%; }
}


/* --- Logo --- */
.logo-container {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 24, 16, 0.95) 40%, rgba(20, 16, 10, 0.85) 100%);
    border: 1px solid rgba(201, 169, 110, 0.35);
    box-shadow:
        0 0 20px rgba(201, 169, 110, 0.12),
        inset 0 0 15px rgba(0, 0, 0, 0.3);
    animation: logoFadeIn 0.8s var(--ease-out-expo) 0.6s both;
    transition: transform 0.5s var(--ease-luxury),
                box-shadow 0.5s var(--ease-luxury);
}

/* Slow gold border pulse */
.logo-container::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.4), transparent 40%, transparent 60%, rgba(201, 169, 110, 0.4)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: logoBorderRotate 6s linear infinite;
}

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

.logo-container:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow:
        0 0 40px var(--gold-glow),
        inset 0 0 15px rgba(0, 0, 0, 0.3);
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(2) saturate(1.2);
    transition: transform 0.5s var(--ease-luxury);
}

.logo-container:hover .logo {
    transform: scale(1.1);
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}


/* --- Typography --- */
.brand-name {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream);
    margin-bottom: 10px;
    animation: textReveal 0.7s var(--ease-out-expo) 0.8s both;
}

/* Subtle gold text shimmer on brand name */
.brand-name::after {
    content: 'Rudray Jewellers';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(201, 169, 110, 0.35) 50%,
        transparent 70%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: textShimmer 5s ease-in-out 3.5s infinite;
}

@keyframes textShimmer {
    0%   { background-position: 200% center; }
    20%  { background-position: -200% center; }
    100% { background-position: -200% center; }
}

.subtitle {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 400;
    font-style: italic;
    color: var(--gold-light);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    animation: textReveal 0.7s var(--ease-out-expo) 0.9s both;
}

.tagline {
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--offwhite);
    opacity: 0.85;
    max-width: 300px;
    margin: 0 auto 20px;
    letter-spacing: 0.02em;
    animation: textReveal 0.7s var(--ease-out-expo) 1s both;
}

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


/* --- Gold Divider --- */
.gold-divider {
    position: relative;
    z-index: 1;
    width: 100px;
    height: 1px;
    margin: 0 auto 22px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: dividerExpand 0.8s var(--ease-out-expo) 1.1s both;
}

@keyframes dividerExpand {
    from {
        opacity: 0;
        width: 0;
    }
    to {
        opacity: 1;
        width: 100px;
    }
}

.divider-diamond {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--gold);
    transform: translate(-50%, -50%) rotate(45deg);
    animation: diamondPulse 3s ease-in-out 2s infinite;
}

@keyframes diamondPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(201, 169, 110, 0); }
    50%      { box-shadow: 0 0 8px rgba(201, 169, 110, 0.5); }
}


/* --- Buttons --- */
.buttons {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 24px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.45s var(--ease-luxury);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.45s var(--ease-luxury);
}

.btn-icon {
    flex-shrink: 0;
    transition: transform 0.35s var(--ease-luxury);
}


/* Primary button — gold outline */
.btn-primary {
    color: var(--gold-light);
    border: 1px solid var(--gold);
    background: transparent;
    animation: btnSlideUp 0.5s var(--ease-out-expo) 1.25s both;
}

.btn-primary::before {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

.btn-primary:hover {
    color: var(--charcoal);
    border-color: var(--gold);
    box-shadow: 0 4px 24px var(--gold-glow);
}

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

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.btn-primary:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}


/* Secondary button — subtle outline */
.btn-secondary {
    color: var(--offwhite);
    border: 1px solid rgba(201, 169, 110, 0.35);
    background: rgba(201, 169, 110, 0.05);
    animation: btnSlideUp 0.5s var(--ease-out-expo) 1.4s both;
}

.btn-secondary::before {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.20), rgba(201, 169, 110, 0.10));
}

.btn-secondary:hover {
    color: var(--gold-light);
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.15);
}

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

.btn-secondary:hover .btn-icon {
    transform: rotate(15deg) scale(1.1);
}

.btn-secondary:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}


/* Button text sits above the ::before fill */
.btn-text,
.btn-icon,
.btn-revueo-logo {
    position: relative;
    z-index: 1;
}

/* Revueo logo in button */
.btn-revueo-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(0.85);
    transition: filter 0.35s var(--ease-luxury);
}

.btn-secondary:hover .btn-revueo-logo {
    filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(10deg) brightness(0.85);
}

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


/* --- Responsive --- */

/* Small phones */
@media (max-width: 380px) {
    .card {
        padding: 28px 20px 24px;
    }

    .brand-name {
        font-size: 24px;
        letter-spacing: 0.12em;
    }

    .tagline {
        font-size: 12px;
    }

    .logo-container {
        width: 64px;
        height: 64px;
    }

    .logo {
        width: 40px;
        height: 40px;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
    .card {
        max-width: 400px;
        padding: 40px 32px 36px;
    }
}

/* Desktop */
@media (min-width: 769px) {
    @keyframes cardDriftDown {
        from { margin-top: 0; }
        to   { margin-top: 14vh; }
    }

    .card {
        max-width: 420px;
        padding: 44px 40px 40px;
    }

    .brand-name {
        font-size: 34px;
    }

    .tagline {
        font-size: 14px;
    }

    .btn {
        padding: 15px 28px;
    }

    .btn-primary:hover {
        transform: translateY(-3px);
    }

    .btn-secondary:hover {
        transform: translateY(-3px);
    }

    .logo-container {
        width: 90px;
        height: 90px;
        margin-bottom: 22px;
    }

    .logo {
        width: 56px;
        height: 56px;
    }
}


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

    .bg-slide {
        transition: opacity 0.5s ease !important;
    }

    .bg-slide.active {
        transform: scale(1) !important;
    }

    .bg-slide.zoom-in {
        transform: scale(1) !important;
    }
}

.btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.logo-container:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
