@import url('fonts.css');

/* ===== CSS Variables ===== */
:root {
    --color-primary: #3A3A3A;
    --color-secondary: #C9C9B1;
    --color-bg-light: #F2EEEB;
    --color-bg-hero: #1a1a1a;
    --color-white: #ffffff;
    --color-dark: #2A2A2A;
    --color-accent: #D4A853;

    --font-heading: 'Switzer-Variable', 'Inter', sans-serif;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --container-width: 1170px;
    --header-height: 80px;

    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}

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

picture {
    display: contents;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-bg-light);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Container ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: var(--container-width);
    z-index: 1000;
    background: linear-gradient(97deg, rgba(255, 255, 255, 0.8) 0%, rgba(242, 238, 235, 0.56) 100%);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.logo img {
    height: 24px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #191919;
    transition: opacity var(--transition-fast);
}

.nav-link:hover {
    opacity: 0.7;
}

/* ===== Button ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 32px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: #000000;
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #222;
    transform: translateY(-1px);
}

#navCandidatesBtn {
    background-color: #C54630;
}

#navCandidatesBtn:hover {
    background-color: #A03928;
}

.btn-full {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    /* Allow content to sticky-scroll out */
    z-index: 20;
    /* Ensure content stays on top of subsequent sections */
}

.hero-bg-clipper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 386px;
    background: linear-gradient(to top, #F2EEEB 0%, rgba(242, 238, 235, 0) 100%);
    z-index: 5;
    pointer-events: none;
}

.hero-parallax {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 120%;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
}

.parallax-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

.parallax-back {
    z-index: 1;
}

.parallax-front {
    z-index: 2;
}

.parallax-front img {
    object-position: center bottom;
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content .container {
    width: 100%;
    max-width: var(--container-width);
    text-align: left;
}

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 800;
    line-height: 1.05;
    color: var(--color-white);
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
}

.hero-underline {
    width: 500px;
    height: 4px;
    background-color: var(--color-white);
    margin-top: 30px;
}

.hero-paragraph {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
    /* Adjusted for larger text */
    color: var(--color-white);
    max-width: 550px;
    /* Increased width to accommodate larger font */
    margin-top: 24px;
    position: relative;
    transition: color var(--transition-medium);
}

.hero-paragraph.dark {
    color: var(--color-dark);
}

/* ===== Features Section ===== */
.features {
    position: relative;
    background-color: var(--color-bg-light);
    padding: 100px 0 100px;
    min-height: 100vh;
}

.features-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.features-left {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.features-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
    color: #B68830;
    margin-bottom: 32px;
}

.features-paragraph {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--color-dark);
    max-width: 480px;
}

.sticky-text-wrapper {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
}

.sticky-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-white);
    max-width: 380px;
    transition: color var(--transition-medium);
}

.sticky-text.dark {
    color: var(--color-dark);
}

/* ===== Features Grid ===== */
.features-right {
    padding-top: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.feature-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.profile-img.round {
    border-radius: 50%;
}

/* ===== Progress Circle ===== */
.progress-circle {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle svg {
    width: 80%;
    height: 80%;
    transform: rotate(-90deg);
}

.progress-ring {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 3;
    stroke-linecap: round;
}

.progress-dot {
    fill: var(--color-accent);
}

.progress-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.progress-value {
    font-size: clamp(28px, 4.5vw, 40px);
    font-weight: 700;
    color: var(--color-dark);
    font-family: 'Playfair Display', serif;
}

.progress-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark);
    font-family: 'Playfair Display', serif;
    margin-top: 4px;
}

/* ===== Concentric Circles ===== */
.concentric-circles {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.concentric-circles svg {
    width: 100%;
    height: 100%;
}

.concentric-circles circle {
    fill: none;
    stroke: var(--color-secondary);
    stroke-width: 1.5;
}

.outer-circle {
    stroke-width: 2;
}

.inner-circle {
    transition: transform 0.1s ease-out;
}

.inner-text {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 700;
    fill: #B68830;
    pointer-events: none;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--color-white);
    border-radius: 20px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-medium);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

/* Specific Max Widths */
#modalOverlayClient .modal,
#modalOverlayFreelancer .modal {
    max-width: 560px;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--color-dark);
    cursor: pointer;
    opacity: 0.6;
    transition: all var(--transition-fast);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.modal-close svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.modal-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    /* Reduced from 32px */
    color: var(--color-dark);
}

.modal-description {
    font-size: 16px;
    line-height: 1.5;
    color: #4A4A4A;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    /* Increased weight */
    margin-bottom: 8px;
    color: #888;
    /* Lighter label color from design */
}

/* Common Input Styles */
.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid #999;
    /* Darker border */
    border-radius: 4px;
    /* Slightly sharper radius */
    background-color: var(--color-white);
    transition: all var(--transition-fast);
}

/* Select Styling */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '↓';
    /* Simple arrow */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    color: #666;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: var(--color-white);
    /* Accessibility Ring */
    box-shadow: 0 0 0 4px rgba(58, 58, 58, 0.1);
}

/* Validation Feedback (Interaction Only) */
.form-group input:not(:placeholder-shown):valid {
    border-color: #4CAF50;
    /* Green */
}

.form-group input:not(:placeholder-shown):invalid {
    border-color: #E53935;
    /* Red */
}

.form-group input::placeholder {
    color: #999;
}

.form-group .required {
    color: #E53935;
    margin-left: 2px;
}

.captcha-box {
    width: 200px;
    background-color: #D9D9D9;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    font-size: 16px;
    color: #000;
}

.modal-form .btn {
    margin-top: 12px;
}

/* Captcha */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.captcha-img {
    border: 1px solid #ddd;
    border-radius: 6px;
    display: block;
    height: 48px;
    width: auto;
}

.captcha-refresh-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 6px 10px;
    color: #555;
    transition: color 0.2s, border-color 0.2s;
}

.captcha-refresh-btn:hover {
    color: #000;
    border-color: #000;
}

/* ===== Spacer ===== */
.spacer {
    height: 100vh;
    background: linear-gradient(to bottom, var(--color-bg-light), #e8e6e0);
}


/* ===== Requests Section ===== */
.requests {
    position: relative;
    padding: 100px 0;
    min-height: 800px;
    background-color: var(--color-bg-light);
    overflow: hidden;
}

.requests-heading {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    color: #837555;
    font-size: 44px;
    line-height: 54px;
    font-weight: 800;
    max-width: 800px;
    z-index: 2;
    pointer-events: none;
}

.requests-container {
    position: relative;
    height: 800px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.scatter-card {
    position: absolute;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, opacity;
}

.text-card {
    cursor: default;
}

.text-card p {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-dark);
    margin: 0;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.text-card:hover {
    z-index: 10;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.text-card:hover p {
    opacity: 1;
}

.empty-card {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: none;
}

/* ===== Beta Section ===== */
.beta {
    padding: 100px 0;
    background-color: var(--color-bg-light);
}

.beta-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.beta-content {
    width: 45%;
}

.beta-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 16px;
}

.beta-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    color: #C17D5B;
    /* Accent Brown */
    margin-bottom: 24px;
}

.beta-text {
    font-size: 18px;
    line-height: 1.6;
    color: #4A4A4A;
    margin-bottom: 40px;
    max-width: 420px;
}

.beta-cta-wrapper {
    position: relative;
    display: inline-block;
}

.btn-beta {
    background-color: #C17D5B;
    color: var(--color-white);
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-beta:hover {
    background-color: #A06548;
    transform: translateY(-2px);
}

.tooltip-decoration {
    position: absolute;
    bottom: -40px;
    right: -60px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: floatTooltip 3s ease-in-out infinite;
}

.cursor-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.tooltip-box {
    background-color: #999;
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    position: relative;
}

.tooltip-box::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 4px 4px 4px 0;
    border-style: solid;
    border-color: transparent #999 transparent transparent;
}

.beta-image-wrapper {
    width: 50%;
    position: relative;
}

.beta-img {
    width: 100%;
    height: auto;
    border-radius: 70px;
    display: block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.crown-icon-img {
    position: absolute;
    top: -50px;
    /* Adjusted for image size */
    right: -30px;
    width: 100px;
    /* Guessing size */
    height: auto;
    transform: rotate(20deg);
    z-index: 10;
    animation: floatCrown 3s ease-in-out infinite;
}

.cursor-icon-img {
    height: 54px;
    /* Adjust based on asset */
    width: auto;
    border-radius: 0;
}

@keyframes floatTooltip {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes floatCrown {

    0%,
    100% {
        transform: translateY(0) rotate(20deg);
    }

    50% {
        transform: translateY(-6px) rotate(20deg);
    }
}

@media (max-width: 992px) {
    .beta-container {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .beta-content,
    .beta-image-wrapper {
        width: 100%;
    }

    .beta-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .beta-title {
        font-size: 36px;
    }

    .tooltip-decoration {
        right: -30px;
    }
}

/* ===== Join World Section ===== */
.join-world {
    position: relative;
    padding: 120px 0;
    background-image: url('../assets/images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.join-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.join-blob {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.blob-top-left {
    top: 0;
    left: 0;
    width: 340px;
    height: 340px;
}

.blob-bottom-right {
    bottom: 0;
    right: 0;
    width: 400px;
    height: 400px;
}

.blob-top-left img {
    object-position: left top;
}

.blob-bottom-right img {
    object-position: right bottom;
}

.join-blob img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.blob-behind {
    position: absolute;
    z-index: 1;
}

.blob-front {
    position: absolute;
    z-index: 2;
}

.join-content {
    width: 45%;
}

.join-title {
    font-family: var(--font-heading);
    font-size: 64px;
    font-weight: 900;
    line-height: 1.05;
    color: #000;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.join-text {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 450px;
    font-weight: 500;
}

.btn-black {
    background-color: #000;
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-black:hover {
    transform: translateY(-2px);
    background-color: #222;
}

.join-image-wrapper {
    width: 50%;
}

.join-img {
    width: 100%;
    height: auto;
    border-radius: 70px;
    box-shadow: none;
    display: block;
}

@media (max-width: 992px) {
    .join-container {
        flex-direction: column;
        gap: 50px;
        text-align: center;
    }

    .join-content,
    .join-image-wrapper {
        width: 100%;
    }

    .join-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .join-title {
        font-size: 48px;
    }
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0;
    background-color: var(--color-bg-light);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo img {
    height: 32px;
    width: auto;
}

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

.footer-link {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 500;
    font-size: 14px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-dark);
    border-radius: 50%;
    color: var(--color-dark);
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--color-dark);
    color: var(--color-white);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .features-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sticky-text-wrapper {
        position: relative;
        top: 0;
        transform: none;
    }

    .sticky-text {
        color: var(--color-dark);
        max-width: 100%;
    }

    .features-grid {
        max-width: 400px;
        margin: 0 auto;
    }

    /* Force sticky paragraph to be static on smaller screens */
    .hero-paragraph,
    #stickyParagraph {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {

    /* Global Mobile Fixes */
    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    /* Header - Fix Horizontal Scroll */
    .header {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        margin: 0;
        border-radius: 0;
        backdrop-filter: blur(20px);
        padding: 0 20px;
    }

    .nav {
        gap: 10px;
    }

    .nav-link {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: auto;
        height: auto;
        padding-bottom: 90px;
        /* Increased padding */
    }

    .hero-content {
        padding-top: 100px;
        /* Header height + space */
        height: auto;
        min-height: 80vh;
    }

    .hero-title {
        font-size: 36px;
        max-width: 100%;
    }

    .hero-paragraph {
        font-size: 18px;
        max-width: 100%;
    }

    .hero-underline {
        margin-top: 20px;
    }

    /* Beta Section */
    .beta-container {
        gap: 60px;
        /* Requested gap increase */
    }

    /* Features */
    .features {
        padding: 90px 0;
        /* Increased by 30px */
    }

    .features-container {
        gap: 40px;
    }

    /* Requests Section */
    .requests {
        padding: 60px 0;
        height: auto;
        min-height: auto;
    }

    .requests-heading {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        font-size: 32px;
        line-height: 40px;
        text-align: center;
        margin-bottom: 32px;
        width: 100%;
    }

    .requests-container {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 0 20px;
    }

    .scatter-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        transform: none !important;
        margin-bottom: 10px;
    }

    .scatter-card.empty-card {
        display: none;
    }

    .scatter-card.text-card p {
        opacity: 1;
    }

    /* Join World */
    .join-world {
        padding: 90px 0;
        /* Increased by 30px */
        background-position: center;
    }

    .join-image-wrapper {
        display: none;
        /* Requested hide */
    }

    .join-title {
        font-size: 36px;
    }

    .join-text {
        font-size: 16px;
    }

    .join-container {
        gap: 40px;
    }

    /* Blobs adjustment */
    .blob-top-left {
        width: 150px;
        height: 150px;
    }

    .blob-bottom-right {
        width: 200px;
        height: 200px;
    }

    .modal {
        margin: 20px;
        padding: 32px;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .btn-black {
        width: 100%;
        padding: 16px 20px;
    }

    .beta-title {
        font-size: 32px;
    }

    .modal {
        padding: 24px;
        width: calc(100% - 32px);
        /* Fixed typo */
    }
}