:root {
    --red: #bf311a;
    --ink: #231f20;
    --paper: #fff;
    --backdrop: #f4f3f2;
    --line: #d9d6d2;
    --divider: #ebe9e7;
    --muted: #655e5a;
    --site-font-size: 14px;
    --legal-font-size: 13px;
    --viewport-inset: 32px;
}

* {
    box-sizing: border-box;
    font-size: inherit;
}

html {
    scroll-behavior: smooth;
    font-size: var(--site-font-size);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--viewport-inset);
    display: flex;
    color: var(--ink);
    background: var(--backdrop);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.legal-document {
    font-size: var(--legal-font-size);
}

.life-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: url('/assets/background-cells.svg');
    background-position: center;
    background-repeat: repeat;
    background-size: 800px 600px;
    opacity: 0.12;
}

.life-background.is-ready {
    background-image: none;
}

.life-background[data-life-enabled='false'] {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
    text-decoration-color: var(--red);
    text-underline-offset: 4px;
}

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

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 12px 16px;
    color: #fff;
    background: var(--ink);
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 150ms ease-out;
}

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

.site {
    --card-inset: 40px;
    --brand-logo-width: 256px;
    --divider-content-gap: 48px;

    width: min(640px, 100%);
    min-height: 320px;
    position: relative;
    z-index: 1;
    margin: auto;
    perspective: 1200px;
}

.card-rotator {
    position: relative;
    width: 100%;
    min-height: inherit;
    transform: rotateY(0deg);
    transform-style: preserve-3d;
    transition: transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.site.is-flipped .card-rotator {
    transform: rotateY(180deg);
}

.card-face {
    position: relative;
    min-width: 0;
    min-height: inherit;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 2px;
    box-shadow: 0 24px 64px rgb(35 31 32 / 12%);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0.1px);
}

.card-front {
    display: flex;
    flex-direction: column;
}

.card-back {
    position: absolute;
    inset: 0;
    display: flex;
    padding: var(--card-inset);
    transform: rotateY(180deg) translateZ(0.1px);
}

.card-life {
    display: block;
    flex: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
}

.card-flip-trigger {
    position: absolute;
    z-index: 2;
    top: 0;
    right: -16px;
    width: 32px;
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.wrap {
    width: auto;
    margin: 0 var(--card-inset);
}

.card-front > main {
    flex: 1;
}

.hero {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(256px, 0.92fr);
    align-items: start;
    align-content: center;
    gap: 64px;
    padding: var(--card-inset) 0 40px;
}

.hero-brand {
    display: flex;
    align-items: center;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--red);
}

.eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--red);
}

.hero-logo {
    display: block;
    width: min(100%, var(--brand-logo-width));
}

.hero-logo {
    height: auto;
    margin: 0;
}

.contact-panel {
    border-left: 1px solid var(--divider);
    padding: 0 0 0 var(--divider-content-gap);
}

.contact-group {
    margin-bottom: 24px;
}

.contact-group:last-child {
    margin-bottom: 0;
}

.contact-group h2 {
    color: var(--red);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.contact-group p {
    margin: 0;
    line-height: 1.5;
}

.contact-address {
    margin: 0;
    font-style: normal;
    line-height: 1.5;
}

.email {
    overflow-wrap: anywhere;
}

.footer {
    padding: 0 0 var(--card-inset);
}

.footer-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 24px;
    color: var(--ink);
}

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

.legal {
    padding: var(--card-inset) 0;
    max-width: 768px;
    overflow-wrap: anywhere;
}

.legal-logo {
    display: block;
    width: 100%;
    margin-bottom: var(--divider-content-gap);
    padding-bottom: var(--divider-content-gap);
    border-bottom: 1px solid var(--line);
}

.legal-logo img {
    display: block;
    width: min(100%, var(--brand-logo-width));
    height: auto;
}

.legal h1 {
    margin: 0 0 32px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.legal-page h1 {
    color: var(--red);
}

.legal h2 {
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 24px 0 8px;
}

.legal h3,
.legal h4 {
    margin: 16px 0 8px;
    font-weight: 600;
    line-height: 1.5;
}

.legal p,
.legal ul {
    margin: 8px 0;
    line-height: 1.65;
    color: #3d3835;
}

.legal ul {
    padding-left: 24px;
}

.legal li + li {
    margin-top: 8px;
}

.legal .legal-meta {
    margin-top: 32px;
    color: #6c6662;
}

.legal .address {
    font-style: normal;
    line-height: 1.65;
}

@media (max-width: 720px) {
    :root {
        --viewport-inset: 48px;
    }

    .site {
        --card-inset: 24px;
        --divider-content-gap: 32px;

        min-height: 0;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-bottom: 32px;
    }

    .contact-panel {
        border-left: 0;
        border-top: 1px solid var(--divider);
        padding: var(--divider-content-gap) 0 0;
    }

    .contact-group {
        margin-bottom: 24px;
    }

}

@media (max-width: 480px) {
    :root {
        --site-font-size: 11px;
        --legal-font-size: 10px;
    }

    .site {
        --card-inset: 16px;
        --brand-logo-width: 208px;
        --divider-content-gap: 24px;
    }

    .hero {
        gap: 24px;
        padding-bottom: 24px;
    }

    .contact-group {
        margin-bottom: 16px;
    }

    .contact-group h2 {
        margin-bottom: 4px;
    }

    .contact-group p {
        line-height: 1.4;
    }

    .contact-address {
        line-height: 1.4;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .footer-links {
        gap: 16px;
    }

    .legal h1 {
        margin: 0 0 24px;
    }

    .legal h2 {
        margin: 20px 0 8px;
    }

    .legal p,
    .legal ul,
    .legal .address {
        line-height: 1.55;
    }

    .legal .legal-meta {
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .skip-link {
        transition: none;
    }

    .card-rotator,
    .card-face {
        transition: none;
    }
}
