/* ============================================
   LRX.ST - Memphis Bold Shapes URL Shortener
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: #333333;
    background-color: #F5F0EB;
    overflow-x: hidden;
    position: relative;
}

/* --- Memphis Decorative Shapes --- */
.memphis-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.memphis-shape {
    position: absolute;
    opacity: 0;
    animation: bounce-enter 500ms ease-out forwards;
}

.memphis-shape:nth-child(1)  { animation-delay: 100ms; }
.memphis-shape:nth-child(2)  { animation-delay: 250ms; }
.memphis-shape:nth-child(3)  { animation-delay: 400ms; }
.memphis-shape:nth-child(4)  { animation-delay: 150ms; }
.memphis-shape:nth-child(5)  { animation-delay: 350ms; }
.memphis-shape:nth-child(6)  { animation-delay: 500ms; }
.memphis-shape:nth-child(7)  { animation-delay: 200ms; }
.memphis-shape:nth-child(8)  { animation-delay: 450ms; }
.memphis-shape:nth-child(9)  { animation-delay: 300ms; }
.memphis-shape:nth-child(10) { animation-delay: 550ms; }
.memphis-shape:nth-child(11) { animation-delay: 600ms; }
.memphis-shape:nth-child(12) { animation-delay: 180ms; }

/* Scroll-triggered shapes */
.scroll-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.scroll-shape {
    position: absolute;
    opacity: 0;
    transform: scale(0);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.scroll-shape.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- Animations --- */
@keyframes bounce-enter {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slide-reveal {
    0% {
        opacity: 0;
        transform: skewY(-3deg) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: skewY(-3deg) translateY(0);
    }
}

@keyframes elastic-enter {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    60% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes celebration-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(3px); }
    30% { transform: translateX(-3px); }
    45% { transform: translateX(3px); }
    60% { transform: translateX(-3px); }
    75% { transform: translateX(2px); }
    90% { transform: translateX(-1px); }
}

@keyframes counter-grow {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Header --- */
.header {
    position: relative;
    height: 80px;
    background-color: #FF2D7B;
    clip-path: polygon(
        0 0, 5% 40%, 10% 0, 15% 40%, 20% 0, 25% 40%, 30% 0, 35% 40%,
        40% 0, 45% 40%, 50% 0, 55% 40%, 60% 0, 65% 40%, 70% 0, 75% 40%,
        80% 0, 85% 40%, 90% 0, 95% 40%, 100% 0, 100% 100%, 0 100%
    );
    z-index: 10;
    display: flex;
    align-items: flex-end;
    padding-bottom: 12px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 32px;
    color: #F5F5F5;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #F5F5F5;
    text-decoration: none;
    transition: color 200ms ease;
}

.nav-link:hover {
    color: #FFE156;
}

.header-circle {
    position: absolute;
    top: 10px;
    right: 60px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #FFE156;
    z-index: 11;
}

/* --- Hero / Link Shortener Zone --- */
.hero {
    position: relative;
    z-index: 5;
    padding: 60px 0 80px;
    min-height: 320px;
}

.hero-skew {
    transform: skewY(-3deg);
    opacity: 0;
    animation: slide-reveal 500ms ease-out 200ms forwards;
}

.hero-content {
    transform: skewY(3deg);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.hero-title {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 48px;
    color: #111111;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    color: #333333;
    line-height: 1.65;
    margin-bottom: 40px;
}

/* --- Shortener Form --- */
.shortener-form {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.input-shape {
    position: absolute;
    opacity: 0;
    animation: bounce-enter 500ms ease-out forwards;
    z-index: 2;
}

.input-shape-1 {
    top: -20px;
    left: -30px;
    animation-delay: 300ms;
}

.input-shape-2 {
    top: -15px;
    right: -25px;
    animation-delay: 450ms;
}

.input-shape-3 {
    bottom: -10px;
    left: -35px;
    animation-delay: 200ms;
}

.input-shape-4 {
    bottom: -18px;
    right: -30px;
    animation-delay: 550ms;
}

.input-row {
    display: flex;
    gap: 0;
    position: relative;
    z-index: 3;
}

.url-input {
    flex: 1;
    height: 56px;
    border: 4px solid #111111;
    border-radius: 0;
    border-right: none;
    padding: 0 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #333333;
    background: #FFFFFF;
    outline: none;
    box-shadow: 6px 6px 0 #FF2D7B;
    transition: box-shadow 200ms ease;
}

.url-input::placeholder {
    color: #999999;
}

.url-input:focus {
    box-shadow: 8px 8px 0 #3B28CC;
}

.shorten-btn {
    height: 56px;
    padding: 0 32px;
    background-color: #3B28CC;
    color: #F5F5F5;
    border: 4px solid #111111;
    border-radius: 0;
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 200ms ease;
    white-space: nowrap;
}

.shorten-btn:hover {
    background-color: #2a1da0;
}

.shorten-btn.celebrating {
    animation: celebration-shake 300ms ease;
}

/* --- Result Area --- */
.result-area {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 4px solid #111111;
    box-shadow: 6px 6px 0 #00BFA5;
}

.result-area.visible {
    display: flex;
}

.result-label {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #333333;
    white-space: nowrap;
}

.result-link {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #3B28CC;
    text-decoration: none;
    flex: 1;
}

.result-link:hover {
    color: #FF2D7B;
}

.copy-btn {
    padding: 8px 16px;
    background-color: #FF2D7B;
    color: #F5F5F5;
    border: 3px solid #111111;
    border-radius: 0;
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 200ms ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background-color: #e0216a;
}

/* --- Error flash for invalid URL --- */
.url-input.input-error {
    box-shadow: 8px 8px 0 #FF6B35;
}

/* --- Zigzag Dividers --- */
.zigzag-divider {
    position: relative;
    z-index: 5;
    height: 20px;
    margin: 20px 0;
    overflow: hidden;
}

.zigzag-divider svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Stats Section --- */
.stats {
    position: relative;
    z-index: 5;
    padding: 80px 40px;
    text-align: center;
}

.section-title {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 36px;
    color: #111111;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 60px;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid #111111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
}

.stat-circle.animated {
    animation: elastic-enter 500ms ease-out forwards;
}

.stat-circle-1 {
    background-color: #FF2D7B;
}

.stat-circle-2 {
    background-color: #FFE156;
}

.stat-circle-3 {
    background-color: #3B28CC;
}

.stat-number {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 48px;
    letter-spacing: 0.03em;
    line-height: 1;
}

.stat-circle-1 .stat-number,
.stat-circle-3 .stat-number {
    color: #F5F5F5;
}

.stat-circle-2 .stat-number {
    color: #111111;
}

.stat-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-circle-1 .stat-label,
.stat-circle-3 .stat-label {
    color: #F5F5F5;
}

.stat-circle-2 .stat-label {
    color: #333333;
}

/* --- Features Section --- */
.features {
    position: relative;
    z-index: 5;
    padding: 80px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.features .section-title {
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.features-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.features-col-left {
    padding-right: 40px;
}

.features-col-right {
    padding-left: 40px;
}

.features-separator {
    width: 20px;
    flex-shrink: 0;
    min-height: 300px;
    display: flex;
    align-items: stretch;
}

.features-separator svg {
    width: 100%;
    height: 100%;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-icon {
    margin-bottom: 16px;
}

.feature-title {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 18px;
    color: #111111;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.feature-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #333333;
    line-height: 1.65;
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 5;
    background-color: #111111;
    padding: 48px 40px;
    /* Terrazzo pattern overlay */
    background-image:
        radial-gradient(circle 4px at 10% 20%, rgba(255, 45, 123, 0.08) 50%, transparent 51%),
        radial-gradient(circle 3px at 25% 60%, rgba(255, 225, 86, 0.08) 50%, transparent 51%),
        radial-gradient(circle 5px at 40% 15%, rgba(59, 40, 204, 0.08) 50%, transparent 51%),
        radial-gradient(circle 3px at 55% 75%, rgba(0, 191, 165, 0.08) 50%, transparent 51%),
        radial-gradient(circle 4px at 70% 30%, rgba(255, 107, 53, 0.08) 50%, transparent 51%),
        radial-gradient(circle 3px at 85% 55%, rgba(255, 45, 123, 0.06) 50%, transparent 51%),
        radial-gradient(circle 5px at 15% 80%, rgba(59, 40, 204, 0.06) 50%, transparent 51%),
        radial-gradient(circle 4px at 60% 45%, rgba(255, 225, 86, 0.06) 50%, transparent 51%),
        radial-gradient(circle 3px at 90% 85%, rgba(0, 191, 165, 0.06) 50%, transparent 51%),
        radial-gradient(circle 4px at 35% 40%, rgba(255, 107, 53, 0.06) 50%, transparent 51%),
        radial-gradient(circle 2px at 5% 50%, rgba(255, 45, 123, 0.1) 50%, transparent 51%),
        radial-gradient(circle 3px at 78% 70%, rgba(255, 225, 86, 0.1) 50%, transparent 51%),
        radial-gradient(circle 2px at 50% 90%, rgba(59, 40, 204, 0.1) 50%, transparent 51%),
        radial-gradient(circle 4px at 22% 35%, rgba(0, 191, 165, 0.08) 50%, transparent 51%),
        radial-gradient(circle 3px at 65% 10%, rgba(255, 107, 53, 0.08) 50%, transparent 51%);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 24px;
    color: #FF2D7B;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #F5F5F5;
    text-decoration: none;
    transition: color 200ms ease;
}

.footer-link:hover {
    color: #FFE156;
}

.footer-tagline {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 14px;
    color: #00BFA5;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }

    .input-row {
        flex-direction: column;
    }

    .url-input {
        border-right: 4px solid #111111;
        border-bottom: none;
    }

    .shorten-btn {
        width: 100%;
    }

    .stats-row {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .stat-circle {
        width: 160px;
        height: 160px;
    }

    .stat-number {
        font-size: 36px;
    }

    .features-grid {
        flex-direction: column;
        gap: 40px;
    }

    .features-col-left,
    .features-col-right {
        padding: 0;
    }

    .features-separator {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .header-circle {
        display: none;
    }

    .section-title {
        font-size: 28px;
    }

    .result-area {
        flex-direction: column;
        text-align: center;
    }
}
