/* ==========================================================
   YP:S
   Your Problems; Solved
   ========================================================== */


/* ----------------------------------------------------------
   FOUNDATION
   ---------------------------------------------------------- */

:root {
    --paper: #ffffff;

    /* Provisional: very deep sapphire that reads near-black */
    --ink: #07111f;

    /* Provisional warm gold */
    --gold: #c59a3d;

    --rail-width: 18rem;
    --content-max: 68rem;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-xxl: 6rem;
}


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


html {
    font-size: 100%;
    scroll-behavior: smooth;
}


body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.6;

    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}


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


a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}


a:hover {
    text-decoration-color: var(--gold);
}


a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}


/* ----------------------------------------------------------
   ACCESSIBILITY
   ---------------------------------------------------------- */

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;

    padding: 0.75rem 1rem;

    background: var(--ink);
    color: var(--paper);

    transform: translateY(-150%);
}


.skip-link:focus {
    transform: translateY(0);
}


/* ----------------------------------------------------------
   MOBILE
   ---------------------------------------------------------- */

.site {
    min-height: 100vh;
}


/* Rail */

.problem-rail {
    padding: var(--space-md);
}


.site-mark {
    display: inline-block;

    margin-bottom: var(--space-xl);

    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;

    letter-spacing: -0.06em;
    text-decoration: none;
}


.problem-nav {
    display: flex;
    flex-direction: column;
}


.problem-link {
    display: block;

    padding: 0;

    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;

    text-decoration: none;
    text-transform: uppercase;
}


.problem-link::after {
    content: "";

    display: block;

    width: 3rem;
    height: 1px;

    margin-top: var(--space-md);

    background: var(--gold);
}


.problem-link + .problem-link {
    padding-top: var(--space-md);
}


.problem-link:hover {
    text-decoration: none;
}


.problem-link.is-active {
    color: var(--gold);
}


/* Main problem */

.problem-content {
    padding:
        var(--space-sm)
        var(--space-md)
        var(--space-xl);
}


.problem {
    display: none;

    width: 100%;
    max-width: var(--content-max);
}


/* Default problem */

.problem:first-child {
    display: block;
}


/* Selected problem */

.problem:target {
    display: block;
}


/* Hide default when another problem is selected */

.problem-content:has(.problem:target) .problem:first-child:not(:target) {
    display: none;
}


/* Image */

.problem-image {
    margin: 0 0 var(--space-lg);
}


.problem-image img {
    width: 100%;
    max-width: 54rem;
    height: auto;
}


/* Header */

.problem-header {
    margin-bottom: var(--space-md);
}


.problem-header h1 {
    margin: 0 0 var(--space-xs);

    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
}


.problem-subtitle {
    margin: 0;

    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.4;
}


/* Description */

.problem-description {
    margin-top: var(--space-lg);

    font-size: 1.0625rem;
}


.problem-description p {
    margin: 0;
}


/* Contact */

.problem-action {
    margin-top: var(--space-lg);
}


.problem-action a {
    font-weight: 700;
}


/* ----------------------------------------------------------
   DESKTOP
   ---------------------------------------------------------- */

@media (min-width: 56rem) {

    .site {
        display: grid;
        grid-template-columns:
            var(--rail-width)
            minmax(0, 1fr);
    }


    /* Rail */

    .problem-rail {
        min-height: 100vh;

        padding:
            var(--space-lg)
            var(--space-lg);

        border-right: 1px solid rgba(7, 17, 31, 0.12);
    }


    .site-mark {
        margin-bottom: var(--space-xxl);
    }


    /* Main frame */

    .problem-content {
        display: flex;
        justify-content: center;

        padding:
            var(--space-xl)
            clamp(3rem, 7vw, 7rem)
            var(--space-xxl);
    }


    .problem-image {
        margin-bottom: var(--space-xl);
    }


    .problem-subtitle {
        font-size: 1.25rem;
    }


    .problem-description {
        font-size: 1.125rem;
    }

}


/* ----------------------------------------------------------
   LARGE SCREENS
   ---------------------------------------------------------- */

@media (min-width: 90rem) {

    :root {
        --rail-width: 21rem;
    }


    .problem-content {
        padding-left: 8rem;
        padding-right: 8rem;
    }

}


/* ----------------------------------------------------------
   REDUCED MOTION
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

}