/* Brochure component styling — nav, home hero, content pages, portfolio, legal,
 * footer, and the light/dark mode toggle.
 *
 * Ported 1:1 from the Isoastra UI vanilla-extract `site.css.ts` (and
 * `mode-toggle.css.ts`) so the static site is visually identical to production. */

/* ---------- Site nav ---------- */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    background-color: color-mix(in srgb, var(--color-bg) 92%, transparent);
}

.site-nav__inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "wordmark" "links";
    align-items: center;
    gap: 0.875rem 1rem;
}

@media (min-width: 700px) {
    .site-nav__inner {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
    }
}

.site-nav__wordmark {
    grid-area: wordmark;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--color-fg);
    white-space: nowrap;
}

.site-nav__wordmark:hover {
    color: var(--color-accent);
}

.site-nav__links {
    grid-area: links;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

@media (min-width: 700px) {
    .site-nav__links {
        gap: 2rem;
    }
}

.site-nav__links a {
    font-size: 0.875rem;
    color: var(--color-fg-muted);
    transition: color 0.15s ease;
}

.site-nav__links a:hover,
.site-nav__links a.is-active {
    color: var(--color-fg);
}

/* ---------- Home ---------- */

.home-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 4rem 1.5rem;
}

.home-wordmark {
    font-family: var(--font-heading);
    font-size: clamp(1.875rem, 6vw, 3rem);
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--color-accent);
}

.home-wordmark .letter {
    display: inline-block;
    opacity: 0;
    animation-name: letterReveal;
    animation-duration: 0.3s;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

.home-wordmark .letter:nth-child(1) { animation-delay: 0ms; }
.home-wordmark .letter:nth-child(2) { animation-delay: 100ms; }
.home-wordmark .letter:nth-child(3) { animation-delay: 200ms; }
.home-wordmark .letter:nth-child(4) { animation-delay: 300ms; }
.home-wordmark .letter:nth-child(5) { animation-delay: 400ms; }
.home-wordmark .letter:nth-child(6) { animation-delay: 500ms; }
.home-wordmark .letter:nth-child(7) { animation-delay: 600ms; }
.home-wordmark .letter:nth-child(8) { animation-delay: 700ms; }

@keyframes letterReveal {
    to { opacity: 1; }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.home-tagline,
.home-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    animation-name: fadeIn;
    animation-duration: 0.9s;
    animation-timing-function: ease;
    animation-delay: 1s;
    animation-fill-mode: forwards;
}

.home-tagline {
    max-width: 28rem;
    text-align: center;
    color: var(--color-fg-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.home-nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
}

.home-nav__link {
    font-size: 0.875rem;
    color: var(--color-fg-muted);
    letter-spacing: 0;
    transition: color 0.2s ease;
}

.home-nav__link:hover {
    color: var(--color-fg);
}

/* ---------- Content pages ---------- */

.content-page {
    max-width: 42rem;
    margin: 0 auto;
    padding: 8rem 1.5rem 4rem;
    width: 100%;
}

.content-page__heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.content-page__body p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--color-fg);
}

.content-page__body p:last-child {
    margin-bottom: 0;
}

.content-page__contact {
    margin-top: 2.5rem;
    font-size: 1rem;
    color: var(--color-accent);
}

.content-page__contact a:hover {
    color: var(--color-accent-hover);
}

/* ---------- Portfolio ---------- */

.portfolio {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem 4rem;
}

.portfolio__stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
}

.portfolio__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.portfolio__heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.portfolio__intro p {
    color: var(--color-fg-muted);
    line-height: 1.6;
}

.portfolio__entry {
    max-width: 32rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.portfolio__category {
    color: var(--color-accent);
    font-size: 0.875rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.portfolio__name {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--color-fg);
}

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

.portfolio__desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-fg-muted);
}

/* ---------- Legal ---------- */

.legal {
    max-width: 48rem;
    margin: 0 auto;
    padding: 8rem 1.5rem 4rem;
    width: 100%;
}

.legal__heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.legal__updated {
    color: var(--color-fg-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.legal__sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.legal__section-heading {
    color: var(--color-accent);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.legal__section p {
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.legal__list {
    padding-inline-start: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    line-height: 1.7;
}

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

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--color-border);
}

.site-footer__inner {
    max-width: 64rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 640px) {
    .site-footer__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }
}

.site-footer__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-footer__mode {
    display: flex;
}

.site-footer__contact {
    gap: 1rem;
}

@media (min-width: 640px) {
    .site-footer__contact {
        justify-content: flex-end;
    }
}

.site-footer__links a {
    color: var(--color-fg-muted);
    font-size: 0.875rem;
    transition: color 0.15s ease;
}

.site-footer__links a:hover {
    color: var(--color-fg);
}

.site-footer__links a[href^="mailto:"] {
    color: var(--color-accent);
}

.site-footer__links a[href^="mailto:"]:hover {
    color: var(--color-accent-hover);
}

.site-footer__copy {
    max-width: 64rem;
    margin: 2rem auto 2rem;
    padding: 0 1.5rem;
    font-size: 0.75rem;
    color: var(--color-fg-muted);
    opacity: 0.5;
    text-align: center;
}

@media (min-width: 640px) {
    .site-footer__copy {
        text-align: left;
    }
}

/* ---------- Mode toggle (footer) ---------- */

.site-footer__mode button {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-fg-muted);
    cursor: pointer;
    padding: 0.25rem 0.6rem;
    font-size: 1rem;
    line-height: 1;
    border-radius: 0.25rem;
    transition: color 0.15s, border-color 0.15s;
}

.site-footer__mode button:hover {
    color: var(--color-fg);
    border-color: var(--color-fg-muted);
}
