/* =====================================================
   Anniversary Card — Styles
   Aesthetic: Romantic · Floral · Luxury Gold
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Cinzel:wght@400;600&display=swap');

/* ─── CSS Variables ─────────────────────────────────── */
.anc-wrapper {
    --anc-accent:       #c9956c;
    --anc-accent-light: #e8c9a8;
    --anc-gold:         #d4af6e;
    --anc-gold-dark:    #a07840;
    --font-display:     'Cinzel', serif;
    --font-body:        'Cormorant Garamond', serif;
    --transition:       0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── Dark (romantic) background ───────────────────── */
.anc-wrapper.anc-bg-dark {
    --bg:           #0d0a0e;
    --bg-card:      rgba(255,255,255,0.04);
    --bg-card-glow: rgba(201,149,108,0.08);
    --border:       rgba(201,149,108,0.25);
    --text-primary: #f5ede4;
    --text-muted:   rgba(245,237,228,0.55);
    --shadow-card:  0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,149,108,0.12);
}

/* ─── Light (floral) background ────────────────────── */
.anc-wrapper.anc-bg-light {
    --bg:           #fdf6f0;
    --bg-card:      rgba(255,255,255,0.85);
    --bg-card-glow: rgba(201,149,108,0.05);
    --border:       rgba(180,120,80,0.2);
    --text-primary: #2a1810;
    --text-muted:   rgba(42,24,16,0.5);
    --shadow-card:  0 20px 60px rgba(180,100,60,0.12), 0 0 0 1px rgba(201,149,108,0.15);
}

/* ─── Wrapper & Canvas ──────────────────────────────── */
.anc-wrapper {
    position: relative;
    width: 100%;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    overflow: hidden;
    padding: 40px 16px;
    box-sizing: border-box;
}

.anc-bg-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,149,108,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(180,100,60,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.anc-bg-light::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,200,170,0.3) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 20% 100%, rgba(255,180,150,0.15) 0%, transparent 60%);
    pointer-events: none;
}

#anc-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ─── Card ──────────────────────────────────────────── */
.anc-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 32px 40px;
    box-shadow: var(--shadow-card);
    text-align: center;
    box-sizing: border-box;

    /* Entry animation */
    animation: anc-card-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes anc-card-in {
    from { opacity: 0; transform: translateY(32px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Corner decorations */
.anc-card::before,
.anc-card::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-color: var(--anc-accent);
    border-style: solid;
    opacity: 0.35;
    border-radius: 4px;
}
.anc-card::before {
    top: 16px; left: 16px;
    border-width: 1px 0 0 1px;
}
.anc-card::after {
    bottom: 16px; right: 16px;
    border-width: 0 1px 1px 0;
}

/* ─── Ring / Medallion ──────────────────────────────── */
.anc-ring {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    animation: anc-rotate 30s linear infinite;
}

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

.anc-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.anc-ring-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--anc-accent);
    /* Counter-rotate so icon stays upright */
    animation: anc-counter-rotate 30s linear infinite;
    text-shadow: 0 0 20px rgba(201,149,108,0.6);
}

@keyframes anc-counter-rotate {
    to { transform: rotate(-360deg); }
}

/* ─── Names ─────────────────────────────────────────── */
.anc-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
    animation: anc-fade-up 0.8s 0.2s both;
}

.anc-name {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 6vw, 1.75rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-transform: uppercase;
}

.anc-amp {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    color: var(--anc-accent);
    font-weight: 300;
    line-height: 1;
}

/* ─── Label ──────────────────────────────────────────── */
.anc-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--anc-accent);
    margin: 0 0 28px;
    animation: anc-fade-up 0.8s 0.3s both;
}

/* ─── Counter ───────────────────────────────────────── */
.anc-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    animation: anc-fade-up 0.8s 0.4s both;
}

.anc-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    background: var(--bg-card-glow);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px 10px;
}

.anc-num {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    font-weight: 600;
    line-height: 1;
    color: var(--anc-accent);
    letter-spacing: -0.02em;
    display: block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.anc-num.anc-pop {
    transform: scale(1.2);
}

.anc-unit-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.anc-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--anc-accent);
    opacity: 0.5;
    margin-bottom: 18px;
    flex-shrink: 0;
}

/* ─── Divider ───────────────────────────────────────── */
.anc-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    animation: anc-fade-up 0.8s 0.5s both;
}

.anc-divider span:not(.anc-divider-gem) {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--anc-accent), transparent);
    opacity: 0.4;
    display: block;
}

.anc-divider-gem {
    font-size: 10px;
    color: var(--anc-accent);
    flex-shrink: 0;
    opacity: 0.7;
}

/* ─── Message ───────────────────────────────────────── */
.anc-message {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-primary);
    opacity: 0.9;
    margin: 0 0 24px;
    padding: 0;
    quotes: none;
    animation: anc-fade-up 0.8s 0.55s both;
}

/* ─── Date ───────────────────────────────────────────── */
.anc-since {
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
    animation: anc-fade-up 0.8s 0.65s both;
}

.anc-since time {
    color: var(--anc-accent-light);
}

/* ─── Shared fade-up keyframe ──────────────────────── */
@keyframes anc-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive tweaks ─────────────────────────────── */
@media (max-width: 380px) {
    .anc-card {
        padding: 40px 20px 32px;
        border-radius: 20px;
    }
    .anc-unit {
        min-width: 54px;
        padding: 10px 6px 8px;
    }
    .anc-counter {
        gap: 6px;
    }
}

@media (min-width: 768px) {
    .anc-card {
        padding: 60px 48px 52px;
    }
}

/* ─── Reduced motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .anc-card,
    .anc-ring,
    .anc-ring-icon,
    .anc-names,
    .anc-label,
    .anc-counter,
    .anc-divider,
    .anc-message,
    .anc-since {
        animation: none;
    }
}
