/* =============================================
   licence.broker - Neubrutalist Styles
   Colors: #0a0a0a, #ff3333, #1a6b4a, #f0f000,
           #1a4a6b, #3a2a7c, #e0e0e0, #ffffff
   Fonts: Recursive (headlines), Inter (body)
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.6;
    color: #0a0a0a;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* ---- Aurora Gradient Keyframes ---- */
@keyframes auroraShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

@keyframes borderDraw {
    0% {
        clip-path: inset(0 100% 100% 0);
    }
    50% {
        clip-path: inset(0 0 50% 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounceEnter {
    0% { opacity: 0; transform: translateY(30px); }
    60% { opacity: 1; transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes badgeSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes footerPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes radialScale {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ---- HERO SECTION ---- */
#hero {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    position: relative;
}

#hero-box {
    width: 80%;
    height: 65vh;
    border: 4px solid #0a0a0a;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: borderDraw 500ms ease-out forwards;
}

#hero-aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a6b4a 0%, #3a2a7c 35%, #1a4a6b 65%, #1a6b4a 100%);
    background-size: 400% 400%;
    animation: auroraShift 12s ease infinite, fadeIn 600ms 500ms ease both;
}

#hero-title {
    font-family: 'Recursive', sans-serif;
    font-weight: 900;
    font-variation-settings: 'CASL' 1;
    font-size: clamp(32px, 6vw, 80px);
    color: #ffffff;
    position: relative;
    z-index: 2;
    letter-spacing: 0.02em;
    text-align: center;
    animation: scaleIn 300ms 1100ms ease both;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

#hero-tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(15px, 1.5vw, 18px);
    color: #0a0a0a;
    margin-top: 24px;
    text-align: center;
    animation: fadeIn 300ms 1400ms ease both;
}

/* ---- SECTION TITLES ---- */
.section-title {
    font-family: 'Recursive', sans-serif;
    font-weight: 900;
    font-variation-settings: 'CASL' 1;
    font-size: clamp(28px, 4vw, 56px);
    color: #0a0a0a;
    margin-bottom: 32px;
    letter-spacing: 0.01em;
}

/* ---- AVAILABLE SECTION ---- */
#available {
    padding: 60px 10%;
    background: #ffffff;
}

#licence-stack {
    display: flex;
    flex-direction: column;
}

/* ---- LICENCE CARDS ---- */
.licence-card {
    border: 3px solid #0a0a0a;
    background: #ffffff;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -3px;
    cursor: pointer;
    transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
}

.licence-card:first-child {
    margin-top: 0;
}

.licence-card.visible {
    animation: bounceEnter 400ms ease forwards;
}

.licence-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #0a0a0a;
    z-index: 2;
}

.licence-card.expired {
    background: #ffffff;
}

.licence-card.expired .licence-name {
    color: #e0e0e0;
}

.licence-card.expired .licence-desc {
    color: #e0e0e0;
}

.licence-card.expired .card-claim svg {
    stroke: #e0e0e0;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.licence-name {
    font-family: 'Recursive', sans-serif;
    font-weight: 700;
    font-variation-settings: 'CASL' 0.5;
    font-size: clamp(16px, 2vw, 22px);
    color: #0a0a0a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    display: inline-block;
    font-family: 'Recursive', sans-serif;
    font-weight: 700;
    font-variation-settings: 'CASL' 0.5;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 14px;
    border-radius: 100px;
    border: 2px solid #0a0a0a;
    background: linear-gradient(135deg, #1a6b4a, #3a2a7c, #1a4a6b);
    background-size: 200% 200%;
    animation: auroraShift 8s ease infinite;
    color: #ffffff;
    white-space: nowrap;
    transition: transform 200ms ease, box-shadow 200ms ease;
    opacity: 0;
    flex-shrink: 0;
}

.licence-card.visible .badge {
    animation: badgeSlide 200ms ease forwards, auroraShift 8s ease infinite;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #0a0a0a;
}

.badge-expired {
    background: #ff3333;
    animation: none;
    border-color: #ff3333;
}

.licence-card.visible .badge-expired {
    animation: badgeSlide 200ms ease forwards;
    background: #ff3333;
}

.licence-desc {
    flex: 2;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.3vw, 16px);
    color: #0a0a0a;
    min-width: 0;
}

.card-claim {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.card-claim svg {
    transition: transform 200ms ease;
}

.licence-card:hover .card-claim svg {
    transform: translateX(4px);
}

.licence-card.expired:hover .card-claim svg {
    transform: translateX(0);
}

/* ---- HOW IT WORKS SECTION ---- */
#how-it-works {
    padding: 60px 10%;
    background: #ffffff;
}

#steps-row {
    display: flex;
    gap: 0;
}

.step-block {
    flex: 1;
    border: 3px solid #0a0a0a;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: -3px;
    position: relative;
    overflow: hidden;
}

.step-block:first-child {
    margin-left: 0;
}

.step-white {
    background: #ffffff;
}

.step-aurora {
    position: relative;
}

.step-aurora-bg,
.step-aurora::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a6b4a 0%, #3a2a7c 35%, #1a4a6b 65%, #1a6b4a 100%);
    background-size: 400% 400%;
    animation: auroraShift 12s ease infinite;
    z-index: 0;
}

.step-aurora .step-number,
.step-aurora .step-text {
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.step-number {
    font-family: 'Recursive', sans-serif;
    font-weight: 900;
    font-variation-settings: 'CASL' 1;
    font-size: clamp(48px, 6vw, 80px);
    color: #0a0a0a;
    line-height: 1;
    margin-bottom: 16px;
}

.step-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    color: #0a0a0a;
    line-height: 1.6;
}

/* ---- FOOTER / DIRECT ---- */
#direct {
    padding: 60px 10%;
    background: #ffffff;
}

#footer-box {
    border: 4px solid #0a0a0a;
    position: relative;
    overflow: hidden;
    padding: 48px 40px;
}

#footer-aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a6b4a 0%, #3a2a7c 35%, #1a4a6b 65%, #1a6b4a 100%);
    background-size: 400% 400%;
    animation: auroraShift 12s ease infinite, footerPulse 4s ease-in-out infinite;
    z-index: 0;
}

#footer-content {
    position: relative;
    z-index: 1;
}

.footer-title {
    font-family: 'Recursive', sans-serif;
    font-weight: 900;
    font-variation-settings: 'CASL' 1;
    font-size: clamp(28px, 4vw, 56px);
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    color: #ffffff;
    margin-bottom: 24px;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-link {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #ffffff;
    cursor: pointer;
    transition: color 150ms ease, text-shadow 150ms ease;
    position: relative;
}

.footer-link:hover {
    color: #f0f000;
    text-shadow: 0 0 8px rgba(240, 240, 0, 0.4);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f0f000;
    transition: width 200ms ease;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    user-select: none;
}

/* ---- FLOATING BROKER BUTTON ---- */
#broker-menu {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1000;
}

#broker-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #0a0a0a;
    background: linear-gradient(135deg, #1a6b4a, #3a2a7c, #1a4a6b);
    background-size: 400% 400%;
    animation: auroraShift 8s ease infinite;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 100ms ease, box-shadow 100ms ease;
    position: relative;
    z-index: 10;
    opacity: 0;
}

#broker-btn.visible {
    animation: fadeIn 300ms 1700ms ease both, auroraShift 8s ease infinite;
}

#broker-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #0a0a0a;
}

#broker-btn.active {
    transform: rotate(45deg);
}

#broker-btn.active:hover {
    transform: rotate(45deg) translate(-2px, -2px);
    box-shadow: 4px 4px 0 #0a0a0a;
}

.icon-key {
    transition: transform 200ms ease;
}

/* ---- RADIAL MENU ---- */
#radial-items {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms ease;
}

#radial-items.open {
    pointer-events: auto;
    opacity: 1;
}

.radial-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #0a0a0a;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform 150ms ease, box-shadow 100ms ease, background-color 100ms ease;
}

#radial-items.open .radial-item {
    transform: scale(1);
}

#radial-items.open .radial-item:nth-child(1) { transition-delay: 0ms; }
#radial-items.open .radial-item:nth-child(2) { transition-delay: 80ms; }
#radial-items.open .radial-item:nth-child(3) { transition-delay: 160ms; }
#radial-items.open .radial-item:nth-child(4) { transition-delay: 240ms; }
#radial-items.open .radial-item:nth-child(5) { transition-delay: 320ms; }

.radial-item:hover {
    background: #f0f000;
    transform: translate(-2px, -2px) scale(1);
    box-shadow: 4px 4px 0 #0a0a0a;
}

/* ---- SELECTION / HIGHLIGHT ---- */
::selection {
    background: #f0f000;
    color: #0a0a0a;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    #hero-box {
        width: 92%;
        height: 55vh;
    }

    #available {
        padding: 40px 5%;
    }

    .licence-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-header {
        flex-wrap: wrap;
        width: 100%;
    }

    .licence-desc {
        flex: none;
        width: 100%;
    }

    .card-claim {
        align-self: flex-end;
    }

    #how-it-works {
        padding: 40px 5%;
    }

    #steps-row {
        flex-direction: column;
    }

    .step-block {
        margin-left: 0;
        margin-top: -3px;
    }

    .step-block:first-child {
        margin-top: 0;
    }

    #direct {
        padding: 40px 5%;
    }

    #footer-box {
        padding: 32px 20px;
    }

    #broker-menu {
        bottom: 20px;
        right: 20px;
    }

    #broker-btn {
        width: 52px;
        height: 52px;
    }

    .radial-item {
        width: 44px;
        height: 44px;
    }

    #radial-items {
        bottom: 62px;
    }
}

@media (max-width: 480px) {
    #hero-box {
        width: 95%;
        height: 50vh;
    }

    #hero-title {
        font-size: clamp(28px, 8vw, 48px);
    }

    .section-title {
        font-size: clamp(24px, 6vw, 40px);
    }

    .step-number {
        font-size: clamp(40px, 10vw, 64px);
    }

    .step-block {
        padding: 28px 18px;
    }

    .licence-card {
        padding: 18px;
    }
}
