/* Goose.re Custom Animations & Utilities */

/* Fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Slide in from left (sidebar) */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s ease-out forwards;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
}

/* Scale up (modals) */
@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-up {
    animation: scaleUp 0.2s ease-out forwards;
}

/* Skeleton loading pulse */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

/* Smooth transitions */
.transition-smooth {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger children animations */
.stagger-children>*:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger-children>*:nth-child(n+6) {
    animation-delay: 0.3s;
}

/* Countdown circle animation */
@keyframes countdown {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: 113;
    }
}

/* Accent color override class */
.accent-accent {
    accent-color: var(--color-accent);
}

/* Custom background image styling */
.hero-bg-grass {
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

.dark .hero-bg-grass {
    opacity: 0.25;
}

/* CTA background image of a goose in the sky */
.cta-bg-sky {
    background-image: url('/assets/img/backgrounds/gooses-in-sky-hd.jpg');
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.dark .cta-bg-sky {
    opacity: 0.8;
}

/* Inline editable preview overrides to ignore global form styling */
.preview-input {
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.dark .preview-input {
    background-color: var(--surface) !important;
}

.preview-input:focus {
    outline: none !important;
    box-shadow: none !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.dark .preview-input:focus {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Ensure all buttons and interactive elements show pointer cursor */
button,
select,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"] {
    cursor: pointer;
}

/* Ensure disabled buttons show not-allowed cursor */
button:disabled,
button[disabled],
input:disabled,
input[disabled],
select:disabled,
[role="button"][disabled] {
    cursor: not-allowed !important;
}

/* Scroll-reveal system — elements start invisible and slide up on viewport entry */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide-up entrance for cards */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* Hero background image container with fade effects */
.hero-bg-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-bg-image {
    background-image: url('/assets/img/backgrounds/goose-on-grass-hd.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    opacity: 0.16;
    /* Dimmed background image so text is highly legible */
    transition: opacity 0.3s ease;
}

.dark .hero-bg-image {
    opacity: 0.12;
    /* Slightly dimmer in dark mode for high contrast */
}

/* Premium visible grid overlay with yellow/amber glow matching the branding */
.hero-visible-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255, 193, 7, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 193, 7, 0.08) 1px, transparent 1px);
    mask-image: radial-gradient(circle at 50% 55%, black 40%, transparent 95%);
    -webkit-mask-image: radial-gradient(circle at 50% 55%, black 40%, transparent 95%);
}

.dark .hero-visible-grid {
    background-image:
        linear-gradient(to right, rgba(255, 193, 7, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 193, 7, 0.05) 1px, transparent 1px);
}

/* Product navigation — compact, product-specific interface previews */
.product-mega-menu {
    width: min(920px, calc(100vw - 32px));
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% -25%, rgba(255, 193, 7, 0.08), transparent 42%),
        color-mix(in srgb, var(--surface) 97%, transparent);
    box-shadow: 0 28px 70px rgba(9, 9, 11, 0.18), 0 8px 24px rgba(9, 9, 11, 0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.dark .product-mega-menu {
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.product-menu-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 4px 15px;
}

.product-menu-eyebrow {
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.product-menu-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 750;
    letter-spacing: -0.015em;
}

.product-menu-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 1px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
}

.product-menu-hint i {
    font-size: 8px;
}

.product-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.product-menu-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 64%, transparent);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(var(--product-rgb), 0.08), transparent 42%),
        color-mix(in srgb, var(--surface-alt) 52%, var(--surface));
    box-shadow: 0 1px 2px rgba(9, 9, 11, 0.03);
    color: var(--text-primary);
    isolation: isolate;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}



.product-menu-card:hover {
    z-index: 2;
    border-color: rgba(var(--product-rgb), 0.38);
    background-color: color-mix(in srgb, var(--surface-alt) 78%, var(--surface));
    box-shadow: 0 14px 30px rgba(9, 9, 11, 0.10), 0 0 0 1px rgba(var(--product-rgb), 0.05);
    transform: translateY(-3px);
}

.product-menu-card:hover::before {
    opacity: 1;
}

.product-menu-card-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-menu-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--product-rgb), 0.13);
    border-radius: 10px;
    background: rgba(var(--product-rgb), 0.13);
    color: var(--product-color);
    font-size: 14px;
}

.product-menu-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: -0.01em;
    transition: color 200ms ease;
}

.product-menu-card:hover .product-menu-name {
    color: var(--product-color);
}

.product-menu-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 9px;
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity 200ms ease, transform 200ms ease, color 200ms ease;
}

.product-menu-card:hover .product-menu-arrow {
    color: var(--product-color);
    opacity: 1;
    transform: translate(0, 0);
}

.product-menu-description {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 10.5px;
    line-height: 1.45;
}

.product-menu-mockup {
    position: relative;
    height: 142px;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(9, 9, 11, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: border-color 220ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .product-menu-mockup {
    border-color: rgba(255, 255, 255, 0.08);
    background: #111115;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.product-menu-card:hover .product-menu-mockup {
    border-color: rgba(var(--product-rgb), 0.22);
    transform: translateY(-1px);
}

/* Link manager preview */
.mockup-toolbar {
    display: flex;
    height: 31px;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
    background: color-mix(in srgb, var(--surface-alt) 45%, transparent);
}

.mockup-toolbar-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text-muted) 44%, transparent);
}

.mockup-toolbar-dot:nth-child(1) { background: #fb7185; }
.mockup-toolbar-dot:nth-child(2) { background: #fbbf24; }
.mockup-toolbar-dot:nth-child(3) { background: #34d399; }

.mockup-toolbar-label {
    margin-left: 4px;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 650;
}

.mockup-add-button {
    display: inline-flex;
    width: 15px;
    height: 15px;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: rgba(var(--product-rgb), 0.14);
    color: var(--product-color);
    font-size: 6px;
}

.link-preview-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
}

.link-preview-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--border) 48%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--surface-alt) 48%, transparent);
}

.link-preview-logo {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(var(--product-rgb), 0.14);
    color: var(--product-color);
    font-size: 9px;
    font-weight: 800;
}

.link-preview-logo-alt {
    background: rgba(99, 102, 241, 0.13);
    color: #818cf8;
}

.link-preview-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    line-height: 1.2;
}

.link-preview-copy strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-preview-copy span {
    overflow: hidden;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-preview-clicks {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--text-secondary);
    font-size: 7px;
    font-weight: 700;
}

.link-preview-clicks i {
    color: var(--product-color);
    font-size: 6px;
}

/* Analytics preview */
.analytics-mockup {
    display: flex;
    flex-direction: column;
    padding: 11px 12px 8px;
}

.analytics-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.analytics-preview-head > div {
    display: flex;
    flex-direction: column;
}

.analytics-preview-label {
    color: var(--text-muted);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.analytics-preview-head strong {
    margin-top: 1px;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.analytics-preview-growth {
    padding: 3px 5px;
    border: 1px solid rgba(var(--product-rgb), 0.14);
    border-radius: 6px;
    background: rgba(var(--product-rgb), 0.1);
    color: var(--product-color);
    font-size: 7px;
    font-weight: 750;
}

.analytics-chart {
    position: relative;
    height: 68px;
    margin-top: 3px;
}

.analytics-chart svg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.analytics-grid-line {
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: color-mix(in srgb, var(--border) 44%, transparent);
}

.analytics-grid-line-one { top: 18%; }
.analytics-grid-line-two { top: 50%; }
.analytics-grid-line-three { top: 82%; }

.analytics-chart-fill { fill: url(#productChartFill); }
.analytics-chart-line { fill: none; stroke: #10b981; stroke-linecap: round; stroke-width: 2.4; }
.analytics-chart-point { fill: #10b981; stroke: var(--surface); stroke-width: 2; }

.analytics-preview-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 6.5px;
    font-weight: 600;
}

.analytics-preview-foot span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.analytics-preview-foot b {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #10b981;
}

.analytics-preview-foot span:nth-child(2) b { background: #6366f1; }
.analytics-preview-foot .analytics-live { margin-left: auto; color: #10b981; }
.analytics-live i { font-size: 4px; }

/* Bio page builder preview */
.pages-mockup {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 70% 25%, rgba(var(--product-rgb), 0.16), transparent 42%),
        var(--surface);
}

.dark .pages-mockup {
    background:
        radial-gradient(circle at 70% 25%, rgba(var(--product-rgb), 0.14), transparent 45%),
        #111115;
}

.page-preview-sidebar {
    position: absolute;
    top: 12px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-preview-tool {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--surface-alt) 70%, transparent);
    color: var(--text-muted);
    font-size: 7px;
}

.page-preview-tool.active {
    border-color: rgba(var(--product-rgb), 0.2);
    background: rgba(var(--product-rgb), 0.13);
    color: var(--product-color);
}

.page-preview-phone {
    position: relative;
    display: flex;
    width: 108px;
    height: 128px;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--text-primary) 80%, transparent);
    border-radius: 17px 17px 7px 7px;
    background: var(--surface);
    box-shadow: 0 11px 22px rgba(9, 9, 11, 0.18);
}

.page-preview-phone::before {
    position: absolute;
    top: 3px;
    left: 50%;
    z-index: 2;
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: rgba(9, 9, 11, 0.62);
    content: '';
    transform: translateX(-50%);
}

.page-preview-cover {
    width: 100%;
    height: 31px;
    flex: 0 0 31px;
    background:
        radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.65), transparent 20%),
        linear-gradient(135deg, #312e81, #818cf8 55%, #f0abfc);
}

.page-preview-avatar {
    display: inline-flex;
    width: 25px;
    height: 25px;
    margin-top: -13px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: #f5f3ff;
    color: #6366f1;
    font-size: 8px;
}

.page-preview-phone strong {
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 7.5px;
    line-height: 1.1;
}

.page-preview-phone small {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 5.5px;
}

.page-preview-button {
    display: flex;
    width: calc(100% - 18px);
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
    padding: 4px 6px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--surface-alt) 76%, var(--surface));
    color: var(--text-secondary);
    font-size: 5.5px;
    font-weight: 650;
}

.page-preview-button i { color: var(--product-color); font-size: 5px; }

.page-preview-socials {
    display: flex;
    gap: 7px;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 6px;
}

.page-preview-status {
    position: absolute;
    right: 9px;
    bottom: 9px;
    padding: 4px 6px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: 0 4px 12px rgba(9, 9, 11, 0.1);
    color: #10b981;
    font-size: 6.5px;
    font-weight: 750;
}

/* Secondary product cards */
.product-menu-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.product-menu-card-secondary {
    min-height: 126px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.product-secondary-copy {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 11px;
}

.product-secondary-copy > div {
    min-width: 0;
}

.product-menu-card-secondary .product-menu-description {
    max-width: 180px;
    margin-top: 5px;
}

.product-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
    color: var(--product-color);
    font-size: 8px;
    font-weight: 750;
}

.product-secondary-link i {
    font-size: 7px;
    transition: transform 180ms ease;
}

.product-menu-card:hover .product-secondary-link i {
    transform: translateX(2px);
}

.qr-preview {
    position: relative;
    display: flex;
    width: 94px;
    height: 90px;
    flex: 0 0 94px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(var(--product-rgb), 0.16);
    border-radius: 13px;
    background:
        radial-gradient(circle at 50% 50%, rgba(var(--product-rgb), 0.13), transparent 66%),
        var(--surface);
    color: var(--product-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.dark .qr-preview { background-color: #111115; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.qr-preview > .fa-qrcode { font-size: 42px; }

.qr-preview-logo {
    position: absolute;
    top: 36px;
    left: 39px;
    display: flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(9, 9, 11, 0.18);
}

.qr-preview-logo img { width: 11px; height: auto; }

.qr-preview-scan-line {
    position: absolute;
    z-index: 2;
    top: 19px;
    left: 22px;
    width: 50px;
    height: 1px;
    background: #fbbf24;
    box-shadow: 0 0 6px #fbbf24;
    opacity: 0.8;
    transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.product-menu-card:hover .qr-preview-scan-line { transform: translateY(43px); }

.qr-preview-badge {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 3px 5px;
    border: 1px solid rgba(var(--product-rgb), 0.17);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: 0 3px 8px rgba(9, 9, 11, 0.1);
    color: var(--product-color);
    font-size: 6px;
    font-weight: 750;
}

.code-preview {
    display: flex;
    width: 176px;
    height: 90px;
    flex: 0 0 176px;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 9px 10px;
    border: 1px solid #27272a;
    border-radius: 13px;
    background: #09090b;
    box-shadow: 0 9px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    color: #d4d4d8;
    user-select: none;
}

.code-preview-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 7px;
}

.code-preview-toolbar span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fb7185;
}

.code-preview-toolbar span:nth-child(2) { background: #fbbf24; }
.code-preview-toolbar span:nth-child(3) { background: #34d399; }

.code-preview-toolbar small {
    margin-left: auto;
    color: #71717a;
    font-family: var(--font-mono);
    font-size: 6px;
}

.code-preview code {
    display: block;
    overflow: hidden;
    color: #d4d4d8;
    font-family: var(--font-mono);
    font-size: 6.4px;
    line-height: 1.55;
    text-overflow: clip;
    white-space: nowrap;
}

.code-pink { color: #f472b6; }
.code-green { color: #6ee7b7; }
.code-blue { color: #60a5fa; }

@media (prefers-reduced-motion: reduce) {
    .product-menu-card,
    .product-menu-mockup,
    .product-menu-arrow,
    .product-secondary-link i,
    .qr-preview-scan-line {
        transition: none;
    }
}
