/* Homepage styles */

.home-page {
    color: var(--text-main);
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 5rem);
    padding: 2.5rem 0 4.25rem;
}

.home-hero-copy {
    max-width: 580px;
}

.home-kicker {
    margin: 0 0 1rem;
    color: var(--accent-amber);
    font-family: var(--font-code);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-transform: uppercase;
}

.home-hero .home-kicker {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.home-hero .home-kicker span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent-cyan);
}

.home-hero h1 {
    max-width: 10ch;
    margin: 0 0 1.25rem;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: clamp(3.2rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.065em;
    line-height: 0.98;
}

.home-intro {
    max-width: 36rem;
    margin: 0;
    color: var(--text-dim);
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.75;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.35rem;
    margin-top: 1.8rem;
}

.home-page .btn-cta.btn-primary-amber {
    border-color: var(--accent-amber);
    border-radius: 5px;
    background: var(--accent-amber);
    box-shadow: none;
    color: #191a16;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
}

.home-page .btn-cta.btn-primary-amber:hover,
.home-page .btn-cta.btn-primary-amber:focus-visible {
    border-color: #f0c77f;
    background: #f0c77f;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
    color: #191a16;
    transform: translateY(-1px);
}

.home-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.home-secondary-link span,
.home-resource-arrow {
    color: var(--accent-cyan);
    transition: transform 0.2s ease;
}

.home-secondary-link:hover span,
.home-resource:hover .home-resource-arrow {
    transform: translate(3px, -2px);
}

.home-secondary-link:focus-visible,
.home-resource:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 5px;
}

.home-reassurance {
    margin: 1.1rem 0 0;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.home-reassurance span {
    margin: 0 0.35rem;
    color: var(--accent-cyan);
}

.home-puzzle-preview {
    width: 100%;
    max-width: 38rem;
    margin: 0;
    justify-self: end;
}

.home-puzzle-entry {
    display: grid;
    grid-template-columns: minmax(5.5rem, 7.25rem) minmax(0, 1fr) 1.25rem;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
}

.home-puzzle-entry img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.home-puzzle-entry-copy > span {
    color: var(--accent-amber);
    font-family: var(--font-code);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.home-puzzle-entry-copy p {
    margin: 0.2rem 0 0;
    color: var(--text-main);
    font-size: 0.86rem;
    line-height: 1.4;
}

.home-puzzle-entry-arrow {
    justify-self: center;
    color: var(--accent-cyan);
    font-size: 1.15rem;
    line-height: 1;
}

.home-puzzle-artifact {
    position: relative;
    overflow: hidden;
    padding: 0.45rem;
    border: 1px solid rgba(38, 54, 45, 0.18);
    border-radius: 4px;
    background: #e7e2d6;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.home-puzzle-artifact img {
    display: block;
    width: 100%;
    height: auto;
}

.home-puzzle-clue-highlight {
    position: absolute;
    top: 49%;
    left: 4%;
    width: 92%;
    height: 15%;
    border: 1px solid rgba(183, 128, 42, 0.65);
    border-radius: 2px;
    background: rgba(226, 180, 107, 0.06);
    pointer-events: none;
}

.home-puzzle-preview-caption {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
    align-items: center;
    gap: 1.15rem;
    margin-top: 0.9rem;
}

.home-puzzle-source {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.home-puzzle-source span,
.home-puzzle-clue > span {
    color: var(--accent-amber);
    font-family: var(--font-code);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.home-puzzle-source strong {
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 600;
}

.home-puzzle-clue {
    padding-left: 0.85rem;
    border-left: 2px solid var(--accent-cyan);
}

.home-puzzle-clue > span {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--accent-cyan);
}

.home-puzzle-clue p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.5;
}

.home-next-level {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
}

.home-next-level-heading {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.home-next-level-heading span {
    color: var(--accent-amber);
    font-family: var(--font-code);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.home-next-level-heading strong {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
}

.home-next-level-screen {
    overflow: hidden;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(226, 180, 107, 0.24);
    border-radius: 2px;
    background: #050505;
    color: #ffb000;
    font-family: var(--font-code);
    font-size: 0.59rem;
    line-height: 1.65;
    text-shadow: 0 0 5px rgba(255, 176, 0, 0.3);
    white-space: pre-wrap;
}

.home-how {
    padding: 1.4rem 0 4.4rem;
}

.home-section-heading {
    max-width: 36rem;
    margin-bottom: 1.6rem;
}

.home-section-heading .home-kicker,
.home-invitation .home-kicker {
    margin-bottom: 0.6rem;
}

.home-section-heading h2,
.home-invitation h2 {
    margin: 0;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.home-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    list-style: none;
}

.home-steps li {
    min-width: 0;
    padding: 1.35rem 1.5rem 1.4rem 0;
}

.home-steps li + li {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-color);
}

.home-step-number {
    display: block;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
    font-family: var(--font-code);
    font-size: 0.75rem;
}

.home-steps h3 {
    margin: 0 0 0.45rem;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
}

.home-steps p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.65;
}

.home-invitation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin: 0 0 4.2rem;
    padding: 1.75rem 2rem;
    border-left: 3px solid var(--accent-amber);
    background: rgba(226, 180, 107, 0.055);
}

.home-invitation > div {
    max-width: 40rem;
}

.home-invitation > div > p:last-child {
    margin: 0.55rem 0 0;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.65;
}

.home-invitation .btn-cta {
    flex: 0 0 auto;
}

.home-resources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    padding-bottom: 1.5rem;
}

.home-resource {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem 1rem;
    padding: 1.2rem 0 1rem;
    border-top: 1px solid var(--border-color);
    color: inherit;
    text-decoration: none;
}

.home-resource-index,
.home-resource-title,
.home-resource-detail {
    grid-column: 1;
}

.home-resource-index {
    color: var(--accent-amber);
    font-family: var(--font-code);
    font-size: 0.67rem;
    letter-spacing: 0.08em;
}

.home-resource-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.home-resource-detail {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.55;
}

.home-resource-arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    font-size: 1.1rem;
}

.home-resource:hover .home-resource-title {
    color: var(--accent-cyan);
}

.home-modal-kicker {
    margin: 0 2rem 0.7rem 0;
    color: var(--accent-amber);
    font-family: var(--font-code);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-page .demo-modal-card h2 {
    margin-bottom: 0.6rem;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1.65rem;
}

.home-modal-copy {
    margin-bottom: 1.25rem;
    color: var(--text-dim);
    font-size: 0.92rem;
}

.home-demo-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.home-page input.demo-modal-input {
    margin-bottom: 0;
    border-color: var(--border-color);
    border-radius: 5px;
    background: #101613;
    color: var(--text-main);
    font-family: var(--font-main);
}

.home-page input.demo-modal-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(131, 205, 188, 0.12);
}

.home-modal-note {
    margin: 0.85rem 0 0;
    color: var(--text-dim);
    font-size: 0.75rem;
}

@media (max-width: 900px) {
    .home-hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-top: 1.25rem;
    }

    .home-hero-copy {
        max-width: 42rem;
    }

    .home-hero h1 {
        max-width: 12ch;
        font-size: clamp(3.25rem, 9vw, 4.5rem);
    }

    .home-puzzle-preview {
        width: min(100%, 38rem);
        justify-self: center;
    }
}

@media (max-width: 600px) {
    .home-hero {
        gap: 2rem;
        padding: 0.75rem 0 3.2rem;
    }

    .home-hero h1 {
        font-size: clamp(2.9rem, 14vw, 4rem);
    }

    .home-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-actions .btn-cta {
        width: 100%;
    }

    .home-puzzle-preview-caption {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .home-next-level {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .home-puzzle-entry {
        grid-template-columns: minmax(5rem, 6rem) minmax(0, 1fr) 1rem;
        gap: 0.65rem;
        padding: 0.55rem;
    }

    .home-puzzle-entry-copy p {
        font-size: 0.78rem;
    }

    .home-how {
        padding-bottom: 3.2rem;
    }

    .home-steps {
        grid-template-columns: 1fr;
    }

    .home-steps li,
    .home-steps li + li {
        padding: 1rem 0;
        border-left: 0;
    }

    .home-steps li + li {
        border-top: 1px solid var(--border-color);
    }

    .home-step-number {
        margin-bottom: 0.4rem;
    }

    .home-invitation {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.2rem;
        margin-bottom: 3.2rem;
        padding: 1.35rem 1.15rem;
    }

    .home-invitation .btn-cta {
        width: 100%;
    }

    .home-resources {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}
