/* Inviteza v0.3.2 — subtle motion layer */

/* Header polish */
.iz-header {
    transition: box-shadow .3s ease, background-color .3s ease, border-color .3s ease;
}

.iz-header.is-scrolled {
    background: rgba(250,248,242,.985);
    border-bottom-color: rgba(21,63,53,.12);
    box-shadow: 0 10px 32px rgba(15,48,40,.07);
}

.iz-logo-nav,
.iz-logo-footer {
    transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}

.iz-logo-link:hover .iz-logo-nav {
    transform: translateY(-1px) scale(1.018);
}

/* Buttons: small, premium micro-interactions */
.iz-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform .22s cubic-bezier(.2,.8,.2,1),
                box-shadow .22s ease,
                background .22s ease,
                border-color .22s ease;
}

.iz-btn::after {
    content: "";
    position: absolute;
    top: -130%;
    left: -45%;
    width: 36%;
    height: 360%;
    z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    transform: rotate(18deg) translateX(-220%);
    transition: transform .65s cubic-bezier(.2,.8,.2,1);
    pointer-events: none;
}

.iz-btn:hover::after {
    transform: rotate(18deg) translateX(520%);
}

.iz-btn:hover {
    transform: translateY(-2px);
}

.iz-btn:active {
    transform: translateY(0) scale(.985);
}

/* Scroll reveal system. JS only enables this when motion is allowed. */
html.iz-motion-enabled .iz-reveal {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity .7s cubic-bezier(.2,.8,.2,1),
                transform .7s cubic-bezier(.2,.8,.2,1);
    transition-delay: var(--iz-delay, 0ms);
    will-change: opacity, transform;
}

html.iz-motion-enabled .iz-reveal.iz-reveal-left {
    transform: translate3d(-24px, 0, 0);
}

html.iz-motion-enabled .iz-reveal.iz-reveal-right {
    transform: translate3d(24px, 0, 0);
}

html.iz-motion-enabled .iz-reveal.iz-reveal-scale {
    transform: translate3d(0, 14px, 0) scale(.975);
}

html.iz-motion-enabled .iz-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* Homepage hero */
.iz-home-photo-frame {
    --iz-tilt-x: 0deg;
    --iz-tilt-y: 0deg;
    --iz-photo-lift: 0px;
    transform: perspective(1000px)
               rotateX(var(--iz-tilt-x))
               rotateY(var(--iz-tilt-y))
               translateY(var(--iz-photo-lift));
    transform-style: preserve-3d;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
    will-change: transform;
}

.iz-home-photo-wrap:hover .iz-home-photo-frame {
    --iz-photo-lift: -4px;
    box-shadow: 0 42px 100px rgba(17,56,46,.23);
}

.iz-home-couple-photo {
    transition: transform 1.05s cubic-bezier(.2,.8,.2,1), filter .5s ease;
    will-change: transform;
}

.iz-home-photo-wrap:hover .iz-home-couple-photo {
    transform: scale(1.025);
}

.iz-home-photo-caption {
    transition: transform .45s cubic-bezier(.2,.8,.2,1);
}

.iz-home-photo-wrap:hover .iz-home-photo-caption {
    transform: translateY(-3px);
}

.iz-floating-card {
    will-change: transform;
}

html.iz-motion-enabled .iz-floating-one {
    animation: izFloatOne 5.2s ease-in-out infinite;
}

html.iz-motion-enabled .iz-floating-two {
    animation: izFloatTwo 5.8s ease-in-out infinite .45s;
}

@keyframes izFloatOne {
    0%,100% { transform: translate3d(0,0,0) rotate(.25deg); }
    50% { transform: translate3d(0,-8px,0) rotate(-.35deg); }
}

@keyframes izFloatTwo {
    0%,100% { transform: translate3d(0,0,0) rotate(-.25deg); }
    50% { transform: translate3d(0,7px,0) rotate(.35deg); }
}

/* Cards */
.iz-feature-card,
.iz-stat-card,
.iz-event-card,
.iz-invite-info-card,
.iz-dashboard-section,
.iz-form-card,
.iz-share-card,
.iz-auth-shell {
    transition: transform .3s cubic-bezier(.2,.8,.2,1),
                box-shadow .3s ease,
                border-color .3s ease,
                background-color .3s ease;
}

.iz-feature-card:hover,
.iz-stat-card:hover,
.iz-invite-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 46px rgba(15,48,40,.09);
}

.iz-feature-icon,
.iz-empty-icon,
.iz-invite-section-icon,
.iz-floating-icon {
    transition: transform .35s cubic-bezier(.2,.8,.2,1), background-color .25s ease;
}

.iz-feature-card:hover .iz-feature-icon,
.iz-invite-info-card:hover > span {
    transform: translateY(-2px) scale(1.07) rotate(2deg);
}

.iz-event-card:hover .iz-event-arrow {
    transform: translateX(4px);
}

.iz-event-arrow {
    display: inline-block;
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
}

/* Dashboard counter animation */
.iz-stat-card strong.iz-counting {
    font-variant-numeric: tabular-nums;
}

/* Forms */
.iz-field input,
.iz-field textarea,
.iz-field select {
    transition: border-color .2s ease,
                box-shadow .2s ease,
                background-color .2s ease,
                transform .2s ease;
}

.iz-field input:focus,
.iz-field textarea:focus,
.iz-field select:focus {
    transform: translateY(-1px);
}

.iz-theme-preview,
.iz-attendance-options span {
    transition: transform .25s cubic-bezier(.2,.8,.2,1),
                box-shadow .25s ease,
                border-color .25s ease,
                background-color .25s ease;
}

.iz-theme-option:hover .iz-theme-preview,
.iz-attendance-options label:hover span {
    transform: translateY(-2px);
}

/* Public invitation */
.iz-invite-ornament {
    transition: transform .45s cubic-bezier(.2,.8,.2,1);
}

html.iz-motion-enabled .iz-invite-ornament {
    animation: izOrnamentGlow 4.8s ease-in-out infinite;
}

@keyframes izOrnamentGlow {
    0%,100% { transform: rotate(0deg) scale(1); box-shadow: 0 0 0 rgba(226,201,131,0); }
    50% { transform: rotate(6deg) scale(1.045); box-shadow: 0 0 28px rgba(226,201,131,.12); }
}

.iz-rsvp-success {
    transform-origin: center;
}

html.iz-motion-enabled .iz-rsvp-success {
    animation: izSuccessPop .65s cubic-bezier(.2,.9,.25,1.2) both;
}

html.iz-motion-enabled .iz-rsvp-success-icon {
    animation: izSuccessCheck .7s cubic-bezier(.2,.9,.25,1.2) .12s both;
}

@keyframes izSuccessPop {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes izSuccessCheck {
    0% { transform: scale(.4) rotate(-18deg); }
    70% { transform: scale(1.12) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Smooth mobile menu rather than appearing abruptly */
@media (max-width: 900px) {
    .iz-menu {
        display: flex !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        max-height: 0;
        overflow: hidden;
        transform: translateY(-10px);
        transform-origin: top;
        transition: opacity .24s ease,
                    transform .24s cubic-bezier(.2,.8,.2,1),
                    max-height .3s ease,
                    visibility .24s;
    }

    .iz-menu.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 430px;
        transform: translateY(0);
    }
}

/* Accessibility: motion should never be mandatory. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .iz-home-photo-frame,
    .iz-home-couple-photo,
    .iz-floating-card,
    .iz-reveal {
        transform: none !important;
        opacity: 1 !important;
    }
}
