/*
 * Remote World - site styles.
 * One hand-written stylesheet, no build step. Edit and reload.
 *
 * Breakpoints (min-width): 640px, 768px, 1024px, 1280px, 1536px.
 */

/* ---------- Fonts (self-hosted Inter, latin subset) ---------- */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/inter-latin-400-normal.woff2") format("woff2"),
         url("fonts/inter-latin-400-normal.woff") format("woff");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("fonts/inter-latin-800-normal.woff2") format("woff2"),
         url("fonts/inter-latin-800-normal.woff") format("woff");
}

/* ---------- Tokens ---------- */

:root {
    --background: #0a0a0a;
    --highlight: #ffffff;
    --body: #9a9a9a;
    --accent: #c6f432;
    --line: #2a2a2a;
    --header-height: 3rem;
    color-scheme: dark;
}

/* ---------- Reset ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--background);
    color: var(--body);
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

h1, h2, h3, p, ul, ol {
    margin: 0;
}

h1, h2, h3 {
    font-size: inherit;
    font-weight: inherit;
}

ul, ol {
    padding: 0;
    list-style: none;
}

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

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

/* ---------- Shared pieces ---------- */

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px)  { .container { max-width: 640px;  padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 768px)  { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; padding-left: 5rem; padding-right: 5rem; } }
@media (min-width: 1536px) { .container { max-width: 1536px; padding-left: 6rem; padding-right: 6rem; } }

.accent {
    color: var(--accent);
}

.heading-1 {
    color: var(--highlight);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

@media (min-width: 640px)  { .heading-1 { font-size: 3.25rem; } }
@media (min-width: 1024px) { .heading-1 { font-size: 4rem; } }

.heading-2 {
    color: var(--highlight);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.label {
    font-size: 0.75rem;
    line-height: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.tag {
    background: var(--accent);
    color: var(--background);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1rem;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 0.375rem 0.75rem;
}

.link {
    color: var(--highlight);
    text-decoration: underline;
    text-decoration-color: var(--body);
    text-underline-offset: 4px;
}

.link:hover {
    text-decoration-color: var(--accent);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Sections that are anchor targets stop below the sticky header. */
section[id] {
    scroll-margin-top: var(--header-height);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--background);
    padding: 1rem 0;
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.wordmark,
.site-header ul {
    color: var(--highlight);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wordmark {
    white-space: nowrap;
}

.site-header ul {
    display: flex;
    gap: 0.75rem;
}

@media (min-width: 640px) { .site-header ul { gap: 1.5rem; } }

.site-header ul a:hover {
    color: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 1024px) { .hero .heading-1 { font-size: 5.5rem; } }
@media (min-width: 1280px) { .hero .heading-1 { font-size: 7rem; } }

.hero p {
    margin-top: 2rem;
    max-width: 38rem;
    font-size: 1.125rem;
    line-height: 1.625;
}

@media (min-width: 1024px) { .hero p { font-size: 1.25rem; line-height: 1.75rem; } }

/* ---------- Products ---------- */

.products {
    padding-bottom: 4rem;
}

.products .label {
    margin-bottom: 0.75rem;
}

.product-list {
    border-top: 1px solid var(--line);
}

.product-list > li {
    border-bottom: 1px solid var(--line);
}

.product {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .product {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.product p {
    margin-top: 0.25rem;
    max-width: 34rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* A product with its own site: wrap the row in <a class="product-link">. */
.product-link {
    display: block;
}

.product-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.product-link:focus-visible {
    outline-offset: -2px;
}

/* ---------- Statement band ---------- */

.statement {
    background: var(--accent);
    color: var(--background);
}

.statement p {
    padding-top: 3rem;
    padding-bottom: 3rem;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

@media (min-width: 640px) { .statement p { font-size: 2.75rem; } }

/* ---------- How we work ---------- */

.principles {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.principles .label {
    margin-bottom: 2rem;
}

.principles ol {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .principles ol {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
}

.principles li {
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
}

.principles .number {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.25rem;
}

.principles h3,
.principles li p {
    margin-top: 0.75rem;
}

.principles li p {
    line-height: 1.625;
}

/* ---------- About ---------- */

.about,
.contact {
    border-top: 1px solid var(--line);
}

.about > .container {
    display: grid;
    gap: 2rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.about .label,
.contact .label {
    margin-bottom: 1.5rem;
}

.about .heading-2 {
    font-size: 2rem;
}

.about-copy {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    font-size: 1.125rem;
    line-height: 1.625;
}

/* ---------- Client work ---------- */

.client-work {
    padding-bottom: 4rem;
}

.client-work-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    border: 1px solid var(--line);
    padding: 1.5rem;
}

@media (min-width: 640px) { .client-work-box { padding: 2rem; } }

@media (min-width: 768px) {
    .client-work-box {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2.5rem;
    }
}

.client-work .label {
    margin-bottom: 0.75rem;
}

.client-work-box p:last-child {
    margin-top: 0.75rem;
    max-width: 40rem;
    line-height: 1.625;
}

.button {
    flex-shrink: 0;
    background: var(--accent);
    color: var(--background);
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
}

.button:hover {
    background: var(--highlight);
}

/* ---------- Contact ---------- */

.contact > .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* The size follows the viewport on small screens so the email address
   always fits on one line instead of breaking mid-word. */
.contact .heading-2 {
    font-size: clamp(1.15rem, 6.2vw, 2rem);
    overflow-wrap: break-word;
}

.contact .link {
    display: block;
}

@media (min-width: 640px) { .contact .link { display: inline; } }

/* ---------- Larger screens: section spacing and sizes ---------- */

@media (min-width: 1024px) {
    .products,
    .client-work {
        padding-bottom: 6rem;
    }

    .statement p {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
        font-size: 4rem;
    }

    .principles,
    .about > .container,
    .contact > .container {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .about > .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4rem;
    }

    .about-copy {
        padding-top: 2.5rem;
    }

    .about .heading-2,
    .contact .heading-2 {
        font-size: 2.75rem;
    }

    .client-work-box {
        padding: 2.5rem;
    }
}

/* ---------- Footer ---------- */

.site-footer {
    font-size: 0.75rem;
    line-height: 1rem;
}

.site-footer > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--line);
    padding: 1.5rem 0;
}

.site-footer a:hover {
    color: var(--highlight);
}

/* ---------- Privacy policy ---------- */

.policy {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 1024px) { .policy { padding-top: 6rem; } }

.policy > .label {
    margin-top: 1.5rem;
}

.prose {
    margin-top: 2.5rem;
    max-width: 44rem;
    line-height: 1.75;
}

.prose h2 {
    color: var(--highlight);
    font-size: 1.5em;
    font-weight: 800;
    line-height: 1.33333;
    letter-spacing: -0.03em;
    margin: 2em 0 1em;
}

.prose > :first-child {
    margin-top: 0;
}

.prose > :last-child {
    margin-bottom: 0;
}

.prose p,
.prose ul {
    margin: 1.25em 0;
}

.prose ul {
    list-style: disc;
    padding-left: 1.625em;
}

.prose li {
    margin: 0.5em 0;
    padding-left: 0.375em;
}

.prose li::marker {
    color: #d1d5db;
}

.prose strong {
    color: var(--highlight);
    font-weight: 800;
}

.prose a {
    color: var(--highlight);
    text-decoration: underline;
    text-decoration-color: var(--body);
    overflow-wrap: break-word;
}

.prose a:hover {
    text-decoration-color: var(--accent);
}

/* ---------- 404 ---------- */

.not-found {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    min-height: 100vh;
    min-height: 100svh;
}
