:root {
    --color-bg:     #1A0808;
    --color-home-bg:#CAADAD;
    --color-pink:   #CAADAD;
    --color-olive:  #8E8E52;
    --color-cream:  #E8E8D0;
    --color-yellow: #EEEEAA;
}

@keyframes undulate {
    0%   { color: #EEEEAA; }
    20%  { color: #8E8E52; }
    40%  { color: #EEEEAA; }
    60%  { color: #E8E8D0; }
    80%  { color: #8E8E52; }
    100% { color: #EEEEAA; }
}

* {
    color: inherit;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='-9 -9 18 18'%3E%3Ccircle cx='0' cy='-5' r='3.5' fill='%23EEEEAA' stroke='%23C8A840' stroke-width='0.6'/%3E%3Ccircle cx='4.76' cy='-1.55' r='3.5' fill='%23EEEEAA' stroke='%23C8A840' stroke-width='0.6'/%3E%3Ccircle cx='2.94' cy='4.05' r='3.5' fill='%23EEEEAA' stroke='%23C8A840' stroke-width='0.6'/%3E%3Ccircle cx='-2.94' cy='4.05' r='3.5' fill='%23EEEEAA' stroke='%23C8A840' stroke-width='0.6'/%3E%3Ccircle cx='-4.76' cy='-1.55' r='3.5' fill='%23EEEEAA' stroke='%23C8A840' stroke-width='0.6'/%3E%3Ccircle cx='0' cy='-5' r='1.2' fill='none' stroke='%23C8A840' stroke-width='0.4'/%3E%3Ccircle cx='4.76' cy='-1.55' r='1.2' fill='none' stroke='%23C8A840' stroke-width='0.4'/%3E%3Ccircle cx='2.94' cy='4.05' r='1.2' fill='none' stroke='%23C8A840' stroke-width='0.4'/%3E%3Ccircle cx='-2.94' cy='4.05' r='1.2' fill='none' stroke='%23C8A840' stroke-width='0.4'/%3E%3Ccircle cx='-4.76' cy='-1.55' r='1.2' fill='none' stroke='%23C8A840' stroke-width='0.4'/%3E%3Ccircle cx='0' cy='0' r='2.2' fill='%238E8E52'/%3E%3Ccircle cx='0' cy='0' r='0.8' fill='%23EEEEAA'/%3E%3C/svg%3E") 11 11, auto;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--color-bg);
    min-height: 100vh;
    animation: undulate 40s ease-in-out infinite;
}

/* Lowercase all headings and labels */
h1, h2, h3, .corner, .topic-content p {
    text-transform: lowercase;
}

/* ── Corner navigation ── */

.corner {
    position: fixed;
    z-index: 50;
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    line-height: 1.2;
    text-decoration: none;
    text-transform: lowercase;
}

.corner-tl { top: 1.8rem; left: 2rem; }
.corner-tr { top: 1.8rem; right: 2rem; text-align: right; }
.corner-bl { bottom: 2.8rem; left: 2rem; }
.corner-br { bottom: 2.8rem; right: 2rem; text-align: right; }

.corner a {
    text-decoration: none;
}

/* ── Home ── */

body.home {
    overflow: hidden;
    height: 100vh;
    background-color: var(--color-home-bg);
    animation: none;
    color: #1A0808;
}

.photo-field {
    position: relative;
    width: 100%;
    height: 100vh;
}

.photo-field .photo {
    position: absolute;
    cursor: pointer;
    overflow: hidden;
}

.photo-field .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Scatter positions — varying sizes */
.photo-field .photo:nth-child(1) { left: 5%;  top: 28%; width: 20vw; height: 26vw; }
.photo-field .photo:nth-child(2) { left: 19%; top: 14%; width: 11vw; height: 14vw; }
.photo-field .photo:nth-child(3) { left: 26%; top: 52%; width: 13vw; height: 10vw; }
.photo-field .photo:nth-child(4) { left: 38%; top: 30%; width: 26vw; height: 32vw; }
.photo-field .photo:nth-child(5) { left: 63%; top: 15%; width: 14vw; height: 18vw; }
.photo-field .photo:nth-child(6) { left: 68%; top: 48%; width: 10vw; height: 13vw; }
.photo-field .photo:nth-child(7) { left: 78%; top: 32%; width: 16vw; height: 20vw; }

/* ── Topic pages ── */

body.topic-page {
    display: block;
    overflow-y: auto;
    padding-bottom: 60px;
}

/* Photo strip */
.photo-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: 100%;
    margin-top: 6rem;
    margin-bottom: 3rem;
}

.photo-strip .cell {
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.photo-strip .cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.photo-strip .cell:hover img {
    opacity: 0.75;
}

.photo-strip .cell.current img {
    opacity: 0.3;
}

/* Content — about, contact */

.topic-content {
    max-width: 580px;
    padding: 0 6vw 4rem;
}

.topic-content h2 {
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    font-weight: normal;
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.topic-content p {
    font-size: 0.88rem;
    line-height: 1.8;
    text-transform: none;
}

/* Service page composition — large heading left, body drifts right */

.service-content {
    padding: 1rem 6vw 6rem;
    position: relative;
    min-height: 50vh;
}

.service-content h2 {
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-weight: normal;
    line-height: 1.0;
    text-transform: lowercase;
    max-width: 62%;
    margin-bottom: 0;
}

.service-content p {
    font-size: 0.88rem;
    line-height: 1.8;
    max-width: 34%;
    margin-left: auto;
    margin-top: 5vh;
    text-transform: none;
}

/* Services list page */

.services-list {
    padding: 0 6vw 4rem;
    margin-top: 2rem;
}

.services-list a {
    display: block;
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    text-decoration: none;
    text-transform: lowercase;
    padding: 0.6rem 0;
    border-bottom: 1px solid currentColor;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.services-list a:first-child {
    border-top: 1px solid currentColor;
}

.services-list a:hover {
    opacity: 1;
}

/* ── Ticker ── */

.ticker-wrap {
    position: fixed;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    height: 30px;
    background-color: var(--color-olive);
    z-index: 100;
}

.ticker {
    display: flex;
    animation: ticker var(--ticker-speed, 30s) linear infinite;
    white-space: nowrap;
}

.ticker__item {
    padding: 0 20px;
    font-size: 16px;
    line-height: 30px;
    font-style: italic;
    color: var(--color-yellow);
}

@keyframes ticker {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ── Mobile ── */

@media (max-width: 768px) {

    /* Corners — larger tap targets, tighter to edges */
    .corner {
        font-size: 0.78rem;
    }
    .corner-tl { top: 1rem; left: 1rem; }
    .corner-tr { top: 1rem; right: 1rem; }
    .corner-bl { bottom: 2.4rem; left: 1rem; }
    .corner-br { bottom: 2.4rem; right: 1rem; }

    /* Home — switch scattered layout to 2-column grid */
    .photo-field {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: calc((100vh - 3.5rem) / 4);
        height: calc(100vh - 3.5rem);
        position: static;
    }

    .photo-field .photo {
        position: static;
        width: 100%;
        height: 100%;
    }

    /* Reset all absolute scatter positions */
    .photo-field .photo:nth-child(1),
    .photo-field .photo:nth-child(2),
    .photo-field .photo:nth-child(3),
    .photo-field .photo:nth-child(4),
    .photo-field .photo:nth-child(5),
    .photo-field .photo:nth-child(6),
    .photo-field .photo:nth-child(7) {
        left: auto; top: auto;
        width: 100%; height: 100%;
    }

    /* 7th photo spans both columns */
    .photo-field .photo:nth-child(7) {
        grid-column: 1 / -1;
    }

    /* Photo strip — 3 columns × 2 rows */
    .photo-strip {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 3.5rem;
        margin-bottom: 1.5rem;
    }

    /* Service layout — stack vertically */
    .service-content {
        padding: 1rem 5vw 5rem;
        min-height: auto;
    }

    .service-content h2 {
        font-size: clamp(2rem, 9vw, 3rem);
        max-width: 100%;
    }

    .service-content p {
        max-width: 100%;
        margin-left: 0;
        margin-top: 1.5rem;
    }

    /* Topic content */
    .topic-content {
        padding: 0 5vw 3rem;
    }

    .topic-content h2 {
        font-size: 1.4rem;
    }

    /* Services list */
    .services-list {
        padding: 0 5vw 3rem;
    }

    .services-list a {
        font-size: 1.05rem;
        padding: 0.75rem 0;
    }
}
