:root {
    --c-bg: #121745;
    --c-bg-deep: #0a0d2e;
    --c-accent: #399934;
    --c-accent-soft: #4fbf48;
    --c-text: #f4f6ff;
    --c-text-mute: #b9c0e2;

    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--c-text);
    background: radial-gradient(ellipse at center, #1a2160 0%, var(--c-bg) 45%, var(--c-bg-deep) 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    overflow: hidden;
    position: relative;
    text-align: center;
}

/* subtle animated waves background */
body::before,
body::after {
    content: "";
    position: absolute;
    left: -25%;
    right: -25%;
    height: 60vh;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(57, 153, 52, 0.08), transparent 60%);
    filter: blur(40px);
    z-index: 0;
    animation: drift 18s ease-in-out infinite alternate;
}

body::before {
    top: -20vh;
}

body::after {
    bottom: -20vh;
    animation-delay: -9s;
    background: radial-gradient(ellipse at center, rgba(79, 100, 220, 0.18), transparent 60%);
}

@keyframes drift {
    0%   { transform: translateX(-4%) translateY(0) scale(1); }
    100% { transform: translateX(4%)  translateY(-3%) scale(1.05); }
}

#confetti {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 640px;
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.logo-wrap {
    width: clamp(220px, 42vw, 420px);
    aspect-ratio: 2828 / 2153;
    perspective: 800px;
    cursor: pointer;
    user-select: none;
    padding: clamp(1rem, 3vw, 1.75rem) clamp(1.25rem, 4vw, 2.25rem);
    background: linear-gradient(160deg, #ffffff 0%, #f4f6ff 100%);
    border-radius: 28px;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 0 40px rgba(57, 153, 52, 0.25);
    animation: float 4.5s ease-in-out infinite;
    will-change: transform;
}

.logo {
    width: 100%;
    height: 100%;
    display: block;
    transform-origin: center center;
    transition: transform 0.18s ease-out;
    will-change: transform;
}

.logo-wrap.boing {
    animation: boing 0.6s var(--ease-bounce);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-0.4deg); }
    50%      { transform: translateY(-14px) rotate(0.4deg); }
}

@keyframes boing {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.18, 0.85); }
    55%  { transform: scale(0.92, 1.1); }
    100% { transform: scale(1); }
}

.tagline {
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    line-height: 1.5;
    color: var(--c-text);
    max-width: 36ch;
}

.tagline strong {
    color: var(--c-accent-soft);
    font-weight: 600;
}

.wink {
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    color: var(--c-text-mute);
    font-style: italic;
    letter-spacing: 0.01em;
}

.contact {
    margin-top: 0.5rem;
    font-style: normal;
}

.mail {
    --pad-y: 0.85rem;
    --pad-x: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: var(--pad-y) var(--pad-x);
    border-radius: 999px;
    border: 1.5px solid rgba(57, 153, 52, 0.55);
    background: rgba(57, 153, 52, 0.08);
    color: var(--c-text);
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.mail::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(57, 153, 52, 0.45), transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.mail:hover,
.mail:focus-visible {
    transform: translateY(-2px);
    background: rgba(57, 153, 52, 0.18);
    border-color: var(--c-accent);
    box-shadow: 0 10px 30px rgba(57, 153, 52, 0.25);
    outline: none;
}

.mail:hover::after,
.mail:focus-visible::after {
    opacity: 1;
}

.mail-icon {
    color: var(--c-accent-soft);
    font-size: 1.1em;
}

.footer {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--c-text-mute);
    opacity: 0.6;
    font-size: 0.8rem;
    z-index: 1;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translate(-50%, 20px);
    background: var(--c-accent);
    color: #fff;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s var(--ease-bounce);
    z-index: 10;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 480px) {
    .card { gap: 1.1rem; }
    .footer { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
    .logo-wrap,
    body::before,
    body::after {
        animation: none !important;
    }
    .logo-wrap.boing {
        animation: none !important;
    }
    .mail,
    .toast {
        transition: none !important;
    }
}
