/* ========================================
   license.broker - Memphis Design Styles
   ======================================== */

/* CSS Custom Properties - Memphis Sepia Palette */
:root {
    --cream-ground: #f0e4d0;
    --memphis-teal: #6a8c8c;
    --memphis-peach: #e8c4a0;
    --memphis-coral: #c46a58;
    --memphis-mustard: #c4a030;
    --memphis-lavender: #8a7aac;
    --black-outline: #2a2418;
    --text-primary: #2a2418;
    --text-secondary: #6a5a48;
    --skeleton-gray: #d8ccb8;

    --font-main: 'Albert Sans', sans-serif;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--cream-ground);
    overflow-x: hidden;
}

/* ========================================
   HERO SECTION
   ======================================== */
#hero {
    position: relative;
    min-height: 100vh;
    background: var(--cream-ground);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(40px, 8vh, 100px) clamp(20px, 5vw, 60px);
    overflow: hidden;
}

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

/* Dots */
.memphis-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    transform: translateY(-100px);
}

.dot-1 {
    width: 40px;
    height: 40px;
    background: var(--memphis-coral);
    top: 8%;
    left: 12%;
}

.dot-2 {
    width: 24px;
    height: 24px;
    background: var(--memphis-mustard);
    top: 15%;
    right: 18%;
}

.dot-3 {
    width: 56px;
    height: 56px;
    background: var(--memphis-lavender);
    top: 25%;
    left: 5%;
}

.dot-4 {
    width: 18px;
    height: 18px;
    background: var(--memphis-teal);
    top: 60%;
    right: 8%;
}

.dot-5 {
    width: 32px;
    height: 32px;
    background: var(--memphis-coral);
    bottom: 25%;
    left: 20%;
}

.dot-6 {
    width: 22px;
    height: 22px;
    background: var(--memphis-mustard);
    bottom: 15%;
    right: 25%;
}

.memphis-dot.animate-in {
    animation: dotBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dotBounceIn {
    0% {
        opacity: 0;
        transform: translateY(-100px);
    }
    60% {
        opacity: 1;
        transform: translateY(10px);
    }
    80% {
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Triangles */
.memphis-triangle {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    transform: rotate(180deg);
}

.tri-1 {
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 44px solid var(--memphis-mustard);
    top: 12%;
    right: 10%;
}

.tri-2 {
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 31px solid var(--memphis-teal);
    top: 45%;
    left: 8%;
}

.tri-3 {
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid var(--memphis-coral);
    bottom: 30%;
    right: 15%;
}

.tri-4 {
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 26px solid var(--memphis-lavender);
    bottom: 20%;
    left: 30%;
}

.memphis-triangle.animate-in {
    animation: triangleRotateIn 0.4s ease-out forwards;
}

@keyframes triangleRotateIn {
    0% {
        opacity: 0;
        transform: rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg);
    }
}

/* Squiggles */
.memphis-squiggle {
    position: absolute;
    width: 160px;
    height: 30px;
    opacity: 0;
}

.memphis-squiggle path {
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
}

.squiggle-1 {
    top: 18%;
    left: 25%;
    transform: rotate(-15deg);
}

.squiggle-2 {
    bottom: 35%;
    right: 10%;
    transform: rotate(10deg);
}

.memphis-squiggle.animate-in {
    opacity: 1;
}

.memphis-squiggle.animate-in path {
    animation: squiggleDraw 0.6s ease-out forwards;
}

@keyframes squiggleDraw {
    0% {
        stroke-dashoffset: 320;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Zigzag decorations in hero */
.memphis-zigzag {
    position: absolute;
    opacity: 0;
}

.zigzag-hero-1 {
    width: 140px;
    height: 20px;
    top: 35%;
    right: 20%;
    transform: rotate(5deg);
}

.zigzag-hero-2 {
    width: 100px;
    height: 20px;
    bottom: 40%;
    left: 15%;
    transform: rotate(-8deg);
}

.memphis-zigzag.animate-in {
    animation: fadeScaleIn 0.4s ease-out forwards;
}

@keyframes fadeScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(var(--rotate, 0deg));
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(var(--rotate, 0deg));
    }
}

.zigzag-hero-1.animate-in {
    animation: zigzagIn1 0.4s ease-out forwards;
}

@keyframes zigzagIn1 {
    0% { opacity: 0; transform: scale(0.5) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(5deg); }
}

.zigzag-hero-2.animate-in {
    animation: zigzagIn2 0.4s ease-out forwards;
}

@keyframes zigzagIn2 {
    0% { opacity: 0; transform: scale(0.5) rotate(-8deg); }
    100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Memphis Lamp Brand Icon */
.memphis-lamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
}

.memphis-lamp .lamp-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--memphis-coral);
    border: 3px solid var(--black-outline);
    opacity: 0;
    transform: translateY(20px);
}

.memphis-lamp .lamp-rect {
    width: 28px;
    height: 40px;
    background: var(--memphis-mustard);
    border: 3px solid var(--black-outline);
    margin-top: -3px;
    opacity: 0;
    transform: translateY(20px);
}

.memphis-lamp .lamp-trapezoid {
    width: 60px;
    height: 24px;
    background: var(--memphis-teal);
    border: 3px solid var(--black-outline);
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
    margin-top: -3px;
    opacity: 0;
    transform: translateY(20px);
}

.memphis-lamp .lamp-base {
    width: 80px;
    height: 10px;
    background: var(--memphis-lavender);
    border: 3px solid var(--black-outline);
    margin-top: -3px;
    opacity: 0;
    transform: translateY(20px);
}

.memphis-lamp.animate-in .lamp-base {
    animation: lampPartIn 0.3s ease-out forwards;
    animation-delay: 0ms;
}

.memphis-lamp.animate-in .lamp-trapezoid {
    animation: lampPartIn 0.3s ease-out forwards;
    animation-delay: 150ms;
}

.memphis-lamp.animate-in .lamp-rect {
    animation: lampPartIn 0.3s ease-out forwards;
    animation-delay: 300ms;
}

.memphis-lamp.animate-in .lamp-circle {
    animation: lampPartIn 0.3s ease-out forwards;
    animation-delay: 450ms;
}

@keyframes lampPartIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Title */
.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1;
}

.hero-title .word {
    display: block;
    font-weight: 800;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
}

.hero-title .word.animate-in {
    animation: wordIn 0.3s ease-out forwards;
}

@keyframes wordIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.word-license {
    font-size: clamp(40px, 7vw, 84px);
    letter-spacing: 0.06em;
}

.word-broker {
    font-size: clamp(28px, 5vw, 60px);
    letter-spacing: 0.12em;
    color: var(--memphis-coral);
}

.hero-tagline {
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 18px);
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(10px);
    max-width: 500px;
}

.hero-tagline.animate-in {
    animation: fadeUp 0.5s ease-out forwards;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Hero Bottom Zigzag Border */
.hero-zigzag-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 3;
}

/* ========================================
   MARKETPLACE SECTION
   ======================================== */
#marketplace {
    background: var(--memphis-teal);
    padding: clamp(40px, 8vh, 100px) clamp(20px, 5vw, 60px);
    position: relative;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: clamp(24px, 4vw, 48px);
    color: var(--cream-ground);
}

#evaluate .section-title,
#about .section-title {
    color: var(--text-primary);
}

/* Small Memphis Lamp (section headers) */
.memphis-lamp-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.memphis-lamp-small .lamp-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--memphis-coral);
    border: 2px solid var(--black-outline);
}

.memphis-lamp-small .lamp-rect {
    width: 10px;
    height: 14px;
    background: var(--memphis-mustard);
    border: 2px solid var(--black-outline);
    margin-top: -2px;
}

.memphis-lamp-small .lamp-trapezoid {
    width: 24px;
    height: 10px;
    background: var(--memphis-teal);
    border: 2px solid var(--black-outline);
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
    margin-top: -2px;
}

#evaluate .memphis-lamp-small .lamp-trapezoid,
#about .memphis-lamp-small .lamp-trapezoid {
    background: var(--memphis-lavender);
}

/* Marketplace List */
.marketplace-list {
    max-width: 1000px;
    margin: 0 auto;
}

/* License Entry */
.license-entry {
    display: flex;
    align-items: center;
    padding: 24px 20px;
    gap: 20px;
    position: relative;
}

/* Skeleton state */
.license-entry[data-skeleton="true"] .entry-content,
.license-entry[data-skeleton="true"] .entry-status {
    opacity: 0;
}

.license-entry[data-skeleton="true"]::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 70px;
    right: 20px;
    height: 60px;
    background: var(--skeleton-gray);
    border-radius: 4px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.license-entry.loaded::before {
    display: none;
}

.license-entry.loaded .entry-content,
.license-entry.loaded .entry-status {
    animation: entryFadeIn 0.1s ease-out forwards;
}

@keyframes entryFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Entry Shape Indicator */
.entry-shape {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-indicator {
    border: 2.5px solid var(--black-outline);
}

.shape-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--memphis-coral);
}

.shape-square {
    width: 32px;
    height: 32px;
    background: var(--memphis-mustard);
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 32px solid var(--memphis-lavender);
    border-top: none;
    background: transparent;
}

/* Entry Content */
.entry-content {
    flex: 1;
    min-width: 0;
}

.entry-label {
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream-ground);
    opacity: 0.75;
}

.entry-name {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: clamp(18px, 2.5vw, 26px);
    color: var(--cream-ground);
    margin: 4px 0;
}

.entry-details {
    font-size: clamp(13px, 1.3vw, 16px);
    color: var(--cream-ground);
    opacity: 0.8;
    line-height: 1.5;
}

/* Entry Status */
.entry-status {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.status-badge {
    width: 20px;
    height: 20px;
    border: 2px solid var(--black-outline);
}

.status-available {
    border-radius: 50%;
    background: var(--memphis-teal);
    border-color: var(--cream-ground);
}

.status-pending {
    background: var(--memphis-coral);
    border-color: var(--cream-ground);
}

.status-reserved {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid var(--memphis-mustard);
    border-top: none;
    background: transparent;
}

.status-text {
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream-ground);
    opacity: 0.7;
}

/* Zigzag Dividers */
.zigzag-divider {
    height: 16px;
    overflow: hidden;
}

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

/* ========================================
   EVALUATE SECTION
   ======================================== */
#evaluate {
    background: var(--memphis-peach);
    padding: clamp(40px, 8vh, 100px) clamp(20px, 5vw, 60px);
    position: relative;
}

.evaluate-intro {
    max-width: 700px;
    margin-bottom: 48px;
    color: var(--text-secondary);
    font-size: clamp(15px, 1.5vw, 18px);
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
}

@media (max-width: 900px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

/* Comparison Frame */
.comparison-frame {
    position: relative;
    padding: 32px 24px;
    background: var(--cream-ground);
    border: 4px solid var(--black-outline);
    opacity: 0;
}

.comparison-frame.animate-in {
    animation: frameBorderDraw 0.4s ease-out forwards;
}

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

.frame-1 {
    border-color: var(--memphis-coral);
}

.frame-2 {
    border-color: var(--memphis-mustard);
}

.frame-3 {
    border-color: var(--memphis-lavender);
}

/* Corner Decorations */
.frame-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
}

.comparison-frame.animate-in .frame-corner {
    animation: cornerScaleIn 0.2s ease-out forwards;
}

.comparison-frame.animate-in .corner-tl {
    animation-delay: 0.4s;
}
.comparison-frame.animate-in .corner-tr {
    animation-delay: 0.5s;
}
.comparison-frame.animate-in .corner-bl {
    animation-delay: 0.6s;
}
.comparison-frame.animate-in .corner-br {
    animation-delay: 0.7s;
}

@keyframes cornerScaleIn {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

.corner-tl { top: -10px; left: -10px; }
.corner-tr { top: -10px; right: -10px; }
.corner-bl { bottom: -10px; left: -10px; }
.corner-br { bottom: -10px; right: -10px; }

.corner-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--memphis-coral);
    border: 2px solid var(--black-outline);
}

.corner-triangle {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid var(--memphis-mustard);
}

.corner-square {
    width: 14px;
    height: 14px;
    background: var(--memphis-teal);
    border: 2px solid var(--black-outline);
}

/* Frame Content */
.frame-content {
    opacity: 0;
}

.comparison-frame.animate-in .frame-content {
    animation: fadeUp 0.4s ease-out 0.8s forwards;
}

.frame-label {
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.frame-name {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: clamp(18px, 2.2vw, 24px);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.frame-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frame-details li {
    font-size: clamp(13px, 1.3vw, 15px);
    color: var(--text-primary);
    line-height: 1.4;
}

.frame-details li strong {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
#about {
    background: var(--cream-ground);
    padding: clamp(40px, 8vh, 100px) clamp(20px, 5vw, 60px);
    position: relative;
    overflow: hidden;
}

.about-layout {
    display: flex;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

@media (max-width: 768px) {
    .about-layout {
        flex-direction: column;
        gap: 40px;
    }
}

/* About Decorative Shapes */
.about-shapes {
    position: relative;
    flex-shrink: 0;
    width: 160px;
    min-height: 300px;
}

@media (max-width: 768px) {
    .about-shapes {
        width: 100%;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }
}

.about-dot {
    position: absolute;
    border-radius: 50%;
}

.about-dot-1 {
    width: 44px;
    height: 44px;
    background: var(--memphis-coral);
    border: 3px solid var(--black-outline);
    top: 10%;
    left: 20%;
}

.about-dot-2 {
    width: 28px;
    height: 28px;
    background: var(--memphis-mustard);
    border: 3px solid var(--black-outline);
    top: 40%;
    left: 60%;
}

.about-dot-3 {
    width: 36px;
    height: 36px;
    background: var(--memphis-lavender);
    border: 3px solid var(--black-outline);
    bottom: 20%;
    left: 10%;
}

@media (max-width: 768px) {
    .about-dot {
        position: static;
    }
}

.about-triangle {
    position: absolute;
    width: 0;
    height: 0;
}

.about-tri-1 {
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid var(--memphis-teal);
    top: 25%;
    right: 0;
}

.about-tri-2 {
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 24px solid var(--memphis-coral);
    bottom: 35%;
    left: 50%;
}

@media (max-width: 768px) {
    .about-triangle {
        position: static;
    }
}

.about-squiggle {
    position: absolute;
    bottom: 5%;
    left: 0;
    width: 130px;
    height: 30px;
}

@media (max-width: 768px) {
    .about-squiggle {
        position: static;
    }
}

/* About Content */
.about-content {
    flex: 1;
}

.about-content .section-title {
    margin-bottom: 24px;
}

.about-content .memphis-lamp-small {
    margin-bottom: 16px;
    align-items: flex-start;
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 600px;
    line-height: 1.75;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* Closing Zigzag */
.closing-zigzag {
    width: 100%;
    height: 40px;
    margin-top: clamp(40px, 6vh, 80px);
    display: block;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 600px) {
    .license-entry {
        flex-wrap: wrap;
        padding: 16px 12px;
        gap: 12px;
    }

    .entry-shape {
        width: 36px;
        height: 36px;
    }

    .shape-circle {
        width: 28px;
        height: 28px;
    }

    .shape-square {
        width: 24px;
        height: 24px;
    }

    .entry-content {
        flex: 1;
        min-width: calc(100% - 100px);
    }

    .entry-status {
        width: 100%;
        flex-direction: row;
        justify-content: flex-end;
        gap: 8px;
    }

    .comparison-grid {
        gap: 24px;
    }

    .hero-title .word-license {
        font-size: clamp(36px, 12vw, 60px);
    }

    .hero-title .word-broker {
        font-size: clamp(24px, 8vw, 44px);
    }
}
