/* SmartCards — public styles. Embeddable, scoped under .smartcards-root.
   Brug shortcoden [smartcards] inde på en side; widget'en lægger sig pænt
   i flowet og overtager IKKE viewporten. */

.smartcards-root {
    --sc-bg: #ebe9e4;
    --sc-ink: #1a1a1a;
    --sc-ink-2: #6a6a6a;
    --sc-ink-3: #9a9a9a;
    --smartcards-height: 640px;

    position: relative;
    width: 100%;
    height: var(--smartcards-height);
    min-height: 480px;
    overflow: hidden;
    border-radius: 16px;
    background: radial-gradient(ellipse at center top, #f1efe9 0%, var(--sc-bg) 70%, #e3e0da 100%);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--sc-ink);
}

.smartcards-root *,
.smartcards-root *::before,
.smartcards-root *::after {
    box-sizing: border-box;
}

.smartcards-root.has-heading {
    display: flex;
    flex-direction: column;
}

.smartcards-heading {
    flex-shrink: 0;
    margin: 0;
    padding: 28px 24px 6px;
    text-align: center;
}

.smartcards-stage {
    position: absolute;
    inset: 0;
}

.smartcards-root.has-heading .smartcards-stage {
    position: relative;
    inset: auto;
    flex: 1;
    min-height: 0;
}

.smartcards-fan {
    position: absolute;
    width: 0;
    height: 0;
    bottom: 60px;
    left: 50%;
}

.smartcards-card-wrap {
    position: absolute;
    width: 270px;
    height: 440px;
    bottom: 0;
    left: -135px;
    transform-origin: 50% 115%;
    transform: rotate(var(--rot, 0deg));
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.22, 0.8, 0.32, 1), z-index 0s;
    will-change: transform;
    cursor: pointer;
}

.smartcards-card-wrap[data-i="0"] { --rot: -48deg; z-index: 1; }
.smartcards-card-wrap[data-i="1"] { --rot: -36deg; z-index: 2; }
.smartcards-card-wrap[data-i="2"] { --rot: -24deg; z-index: 3; }
.smartcards-card-wrap[data-i="3"] { --rot: -12deg; z-index: 4; }
.smartcards-card-wrap[data-i="4"] { --rot: 0deg;   z-index: 5; }
.smartcards-card-wrap[data-i="5"] { --rot: 12deg;  z-index: 6; }
.smartcards-card-wrap[data-i="6"] { --rot: 24deg;  z-index: 7; }
.smartcards-card-wrap[data-i="7"] { --rot: 36deg;  z-index: 8; }
.smartcards-card-wrap[data-i="8"] { --rot: 48deg;  z-index: 9; }

.smartcards-card-wrap:hover {
    transform: translateY(-40px) rotate(var(--rot, 0deg));
    z-index: 50;
}

/* Scroll-reveal. Respekterer prefers-reduced-motion via JS-guard. */

/* Desktop fan-reveal: stagger fra venstre mod højre */
@media (min-width: 769px) {
    .smartcards-root.is-pre-reveal .smartcards-card-wrap {
        opacity: 0;
        transform: translateY(60px) rotate(0deg) !important;
        transition: none;
    }

    .smartcards-root.is-revealing .smartcards-card-wrap {
        transition: transform 0.75s cubic-bezier(0.22, 0.8, 0.32, 1), opacity 0.5s ease-out;
    }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="0"] { transition-delay:   0ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="1"] { transition-delay:  70ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="2"] { transition-delay: 140ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="3"] { transition-delay: 210ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="4"] { transition-delay: 280ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="5"] { transition-delay: 350ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="6"] { transition-delay: 420ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="7"] { transition-delay: 490ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i="8"] { transition-delay: 560ms; }
}

/* Mobile carousel-reveal: stagger fra centrum og ud (active → peek-1 → peek-2) */
@media (max-width: 768px) {
    .smartcards-root.is-pre-reveal .smartcards-card-wrap[data-i] {
        opacity: 0 !important;
        transition: none;
    }

    .smartcards-root.is-revealing .smartcards-card-wrap[data-i].is-active { transition-delay:   0ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i].is-prev,
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i].is-next   { transition-delay: 120ms; }
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i].is-prev-2,
    .smartcards-root.is-revealing .smartcards-card-wrap[data-i].is-next-2 { transition-delay: 240ms; }
}

.smartcards-card-wrap.is-lifted {
    transform: translate(0, -120px) rotate(0deg) scale(1.05) !important;
    z-index: 100;
}

.smartcards-card {
    position: relative;
    width: 270px;
    height: 440px;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.22, 0.8, 0.32, 1);
    cursor: pointer;
}
.smartcards-card.is-flipped { transform: rotateY(180deg); }

.smartcards-face {
    position: absolute;
    width: 270px;
    height: 440px;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.10),
        0 24px 48px -8px rgba(0, 0, 0, 0.14);
}

.smartcards-back::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 35%);
    pointer-events: none;
    z-index: 3;
}
.smartcards-back::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    pointer-events: none;
    z-index: 4;
}

.smartcards-back {
    padding: 28px 22px 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}
.smartcards-back .smartcards-text { position: relative; z-index: 2; }
.smartcards-back .smartcards-brand {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.02em;
    opacity: 1;
    margin: 0;
}
.smartcards-back .smartcards-tier {
    font-size: 28px;
    font-weight: 300;
    margin: 2px 0 0;
    letter-spacing: -0.005em;
    line-height: 1.05;
}

.smartcards-back .smartcards-tagline-wrap {
    position: absolute;
    top: 50%;
    left: 28px;
    right: 28px;
    transform: translate(0, -50%);
    text-align: center;
    z-index: 2;
    pointer-events: none;
}
@media (min-width: 769px) {
    .smartcards-back .smartcards-tagline-wrap { display: none; }
}
.smartcards-back .smartcards-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.005em;
    color: var(--tagline-color, currentColor);
    opacity: 1;
    max-width: 230px;
    margin: 0 auto;
}
.back-basic .smartcards-tagline { opacity: 0.92; }

.smartcards-back .smartcards-bubble,
.smartcards-back .smartcards-bubble-2 {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}
.smartcards-back .smartcards-bubble {
    bottom: -110px;
    left: 50%;
    transform: translateX(-52%);
    width: 270px;
    height: 270px;
    background: radial-gradient(circle, var(--bubble, rgba(0,0,0,0.18)) 0%, var(--bubble, rgba(0,0,0,0.18)) 50%, transparent 78%);
}
.smartcards-back .smartcards-bubble-2 {
    bottom: -40px;
    left: 50%;
    transform: translateX(-38%);
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, var(--bubble-2, rgba(0,0,0,0.10)) 0%, var(--bubble-2, rgba(0,0,0,0.10)) 55%, transparent 80%);
}

/* Tier presets */
.smartcards-root .back-free          { background: radial-gradient(ellipse at 30% 15%, #1a7f4f 0%, #0F6B3F 45%, #084c2c 100%); --bubble: rgba(0,0,0,0.18); --bubble-2: rgba(0,0,0,0.10); --tagline-color: #ffffff; }
.smartcards-root .back-plus          { background: radial-gradient(ellipse at 30% 15%, #d6b573 0%, #C8A35A 45%, #a8853f 100%); --bubble: rgba(0,0,0,0.13); --bubble-2: rgba(0,0,0,0.07); --tagline-color: #ffffff; }
.smartcards-root .back-basic         { background: radial-gradient(ellipse at 30% 15%, #f7f3e8 0%, #F0EBDE 45%, #d8d2c2 100%); color: #2c2a26; --bubble: rgba(0,0,0,0.07); --bubble-2: rgba(0,0,0,0.04); --tagline-color: #2c2419; }
.smartcards-root .back-basic .smartcards-brand,
.smartcards-root .back-basic .smartcards-tier { color: #2c2a26; }
.smartcards-root .back-plus5         { background: radial-gradient(ellipse at 30% 15%, #714532 0%, #5A3625 45%, #3d2419 100%); --bubble: rgba(0,0,0,0.22); --bubble-2: rgba(0,0,0,0.12); --tagline-color: #ffffff; }
.smartcards-root .back-mover         { background: radial-gradient(ellipse at 30% 15%, #ecb14b 0%, #DCA135 45%, #b07f1e 100%); --bubble: rgba(0,0,0,0.14); --bubble-2: rgba(0,0,0,0.07); --tagline-color: #ffffff; }
.smartcards-root .back-business      { background: radial-gradient(ellipse at 30% 15%, #4189d2 0%, #2A72BC 45%, #1c548f 100%); --bubble: rgba(0,0,0,0.16); --bubble-2: rgba(0,0,0,0.09); --tagline-color: #ffffff; }
.smartcards-root .back-business-plus { background: radial-gradient(ellipse at 30% 15%, #c43a5a 0%, #8B1A3B 45%, #4d0d22 100%); --bubble: rgba(0,0,0,0.20); --bubble-2: rgba(0,0,0,0.11); --tagline-color: #ffffff; }
.smartcards-root .back-pro-partner   { background: radial-gradient(ellipse at 30% 15%, #2a2a2a 0%, #1A1A1A 45%, #0a0a0a 100%); color: #d4af37; --bubble: rgba(255,255,255,0.07); --bubble-2: rgba(255,255,255,0.04); --tagline-color: #f0d68a; }
.smartcards-root .back-pro-partner .smartcards-brand,
.smartcards-root .back-pro-partner .smartcards-tier { color: #d4af37; }
.smartcards-root .back-publisher     { background: radial-gradient(ellipse at 30% 15%, #7553c2 0%, #5E3FA0 45%, #422b73 100%); --bubble: rgba(0,0,0,0.16); --bubble-2: rgba(0,0,0,0.09); --tagline-color: #ffffff; }

/* Front */
.smartcards-front {
    background: #fdfdfb;
    transform: rotateY(180deg);
    padding: 0;
    display: flex;
    flex-direction: column;
    color: #1a1a1a;
}

.smartcards-front-header {
    padding: 26px 22px 20px;
    position: relative;
    color: #fff;
}
.smartcards-front-header.back-basic { color: #2c2a26; }
.smartcards-front-header.back-pro-partner { color: #d4af37; }

.smartcards-front-header-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    opacity: 0.72;
}
.smartcards-front-header-tier {
    font-family: 'DM Sans', sans-serif;
    font-size: 22px;
    font-weight: 300;
    margin-top: 1px;
    letter-spacing: -0.005em;
    line-height: 1.05;
    color: var(--tagline-color, currentColor);
}
.smartcards-front-header-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 14px;
    opacity: 1;
    text-align: center;
}

.smartcards-front-body {
    flex: 1;
    padding: 18px 22px 18px;
    display: flex;
    flex-direction: column;
}
.smartcards-front-body .smartcards-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin: 0;
}
.smartcards-front .smartcards-role {
    font-size: 9px;
    color: var(--sc-ink-2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 4px;
}
.smartcards-front .smartcards-rule {
    width: 28px;
    height: 1.5px;
    margin: 16px 0 14px;
    opacity: 0.85;
}
.smartcards-front .smartcards-contact {
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 11px;
    color: #2a2a2a;
    line-height: 1.4;
}
.smartcards-front .smartcards-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.smartcards-front .smartcards-row svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.6;
}
.smartcards-front .smartcards-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smartcards-front .smartcards-qr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #ececea;
}
.smartcards-front .smartcards-qr-label {
    flex: 1;
    min-width: 0;
}
.smartcards-front .smartcards-qr-label-small {
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #1a1a1a;
}
.smartcards-front .smartcards-qr-label-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 12px;
    color: #6a6a65;
    margin-top: 4px;
    line-height: 1.3;
}
.smartcards-front .smartcards-qr-code {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}
.smartcards-front .smartcards-qr-code svg {
    width: 100%;
    height: 100%;
    display: block;
}

.smartcards-front .smartcards-footer {
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.smartcards-front .smartcards-footer .smartcards-fb {
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8a8a85;
}
.smartcards-front .smartcards-footer .smartcards-ft {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Hint, nav, dots, tier-label — alle ABSOLUTE inde i .smartcards-stage */
.smartcards-hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--sc-ink-3);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 1000;
    background: rgba(255,255,255,0.7);
    padding: 8px 18px;
    border-radius: 100px;
    backdrop-filter: blur(8px);
    margin: 0;
}

.smartcards-nav {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 200;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.18s, opacity 0.2s;
    color: #1a1a1a;
    display: none;
    backdrop-filter: blur(8px);
    padding: 0;
}
.smartcards-nav:active { transform: translateY(-50%) scale(0.92); }
.smartcards-nav:disabled { opacity: 0.3; pointer-events: none; }
.smartcards-nav-prev { left: 12px; }
.smartcards-nav-next { right: 12px; }

.smartcards-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 7px;
    z-index: 200;
}
.smartcards-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    transition: background 0.3s, transform 0.3s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border: none;
    padding: 0;
}
.smartcards-dot.is-active {
    background: rgba(0, 0, 0, 0.72);
    transform: scale(1.35);
}

.smartcards-tier-label {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--sc-ink);
    letter-spacing: 0.01em;
    z-index: 200;
    display: none;
    pointer-events: none;
    text-align: center;
}
.smartcards-tier-label-small {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sc-ink-3);
    margin-bottom: 2px;
    font-weight: 500;
}

/* Mobile carousel */
@media (max-width: 768px) {
    .smartcards-hint { display: none; }

    .smartcards-nav { display: flex; }
    .smartcards-dots { display: flex; }
    .smartcards-tier-label { display: block; }

    .smartcards-card-wrap:hover { transform: scale(0.5); }
    .smartcards-card-wrap.is-active:hover { transform: translate(0, 0) rotate(0deg) scale(1); }
    .smartcards-card-wrap.is-prev:hover    { transform: translate(-18px, 0) rotate(-7deg) scale(0.95); }
    .smartcards-card-wrap.is-prev-2:hover  { transform: translate(-32px, 4px) rotate(-13deg) scale(0.88); }
    .smartcards-card-wrap.is-next:hover    { transform: translate(18px, 0) rotate(7deg) scale(0.95); }
    .smartcards-card-wrap.is-next-2:hover  { transform: translate(32px, 4px) rotate(13deg) scale(0.88); }

    .smartcards-fan {
        bottom: 50%;
        left: 50%;
    }

    .smartcards-card-wrap[data-i] {
        bottom: auto;
        top: -220px;
        left: -135px;
        transform-origin: 50% 100%;
        transform: scale(0.5);
        opacity: 0;
        pointer-events: none;
        z-index: 0;
        transition:
            transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .smartcards-card-wrap[data-i].is-active {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
        pointer-events: auto;
        z-index: 50;
    }
    .smartcards-card-wrap[data-i].is-prev {
        transform: translate(-18px, 0) rotate(-7deg) scale(0.95);
        opacity: 1;
        pointer-events: auto;
        z-index: 40;
    }
    .smartcards-card-wrap[data-i].is-prev-2 {
        transform: translate(-32px, 4px) rotate(-13deg) scale(0.88);
        opacity: 0.92;
        pointer-events: auto;
        z-index: 30;
    }
    .smartcards-card-wrap[data-i].is-next {
        transform: translate(18px, 0) rotate(7deg) scale(0.95);
        opacity: 1;
        pointer-events: auto;
        z-index: 40;
    }
    .smartcards-card-wrap[data-i].is-next-2 {
        transform: translate(32px, 4px) rotate(13deg) scale(0.88);
        opacity: 0.92;
        pointer-events: auto;
        z-index: 30;
    }

    .smartcards-card-wrap.is-lifted {
        transform: translate(0, 0) rotate(0deg) scale(1) !important;
        z-index: 100 !important;
    }
}

@media (max-width: 400px) {
    .smartcards-card-wrap[data-i],
    .smartcards-card-wrap[data-i] .smartcards-card,
    .smartcards-card-wrap[data-i] .smartcards-face {
        width: 240px;
        height: 390px;
    }
    .smartcards-card-wrap[data-i] {
        top: -195px;
        left: -120px;
    }
}
