:root {
    --paper: #f4f0e6;
    --ink: #111111;
    --link: #0000ee;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--paper);
}

body {
    margin: 24px;
    color: var(--ink);
    background: var(--paper);
    font-family: "Times New Roman", Times, serif;
    font-size: 18px;
    line-height: 1.35;
}

::selection {
    color: var(--paper);
    background: var(--ink);
}

.site-card {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    min-height: calc(100svh - 48px);
    padding: 22px;
    border: 3px solid var(--ink);
}

.site-header h1 {
    margin: 0;
    font-size: clamp(3.5rem, 9vw, 5.5rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.065em;
}

.site-header p {
    margin: 18px 0 0;
    font-style: italic;
}

section {
    max-width: 650px;
    margin-top: 48px;
}

.section-label {
    margin: 0 0 10px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.statement p {
    margin: 0;
    font-size: clamp(1.35rem, 3.2vw, 1.8rem);
    line-height: 1.14;
}

.services ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.services li {
    border: 1px solid var(--ink);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.78rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.services button {
    position: relative;
    isolation: isolate;
    display: block;
    overflow: hidden;
    appearance: none;
    border: 0;
    border-radius: 0;
    padding: 5px 7px;
    color: inherit;
    background: transparent;
    font: inherit;
    text-transform: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.services button:hover,
.services button:focus-visible {
    color: var(--paper);
    background: var(--ink);
}

.services button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

.services button span {
    position: relative;
    z-index: 1;
}

.services button::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.services button[data-active] {
    color: var(--ink);
    background: var(--paper);
}

[data-effect="wave"] { --wash: #a7d5ff; }
[data-effect="circuit"] { --wash: #abefc9; }
[data-effect="orbit"] { --wash: #ffb9aa; }
[data-effect="ink"] { --wash: #d3baff; }
[data-effect="prism"] { --wash: #f5bfde; }
[data-effect="spark"] { --wash: #ffdc88; }

.services [data-active]::before {
    background: var(--wash);
    animation: color-settle 1500ms ease-out both;
}

.services [data-effect="wave"][data-active]::before {
    inset: -120% -15%;
    border-radius: 43%;
    animation: tidal-wash 1500ms ease-in-out both;
}

.services [data-effect="circuit"][data-active]::before {
    background: repeating-linear-gradient(90deg, transparent 0 7px, #31996a33 7px 8px), var(--wash);
    animation: scan-wash 1500ms ease-out both;
}

.services [data-effect="orbit"][data-active]::before {
    background: repeating-radial-gradient(circle at 50% 50%, var(--wash) 0 8px, #e56e5e66 9px 10px, var(--wash) 11px 18px);
    animation: orbit-wash 1500ms ease-out both;
}

.services [data-effect="ink"][data-active]::before {
    transform-origin: left center;
    background: repeating-linear-gradient(0deg, var(--wash) 0 5px, #7951bb44 5px 6px);
    animation: ink-wash 1500ms ease-out both;
}

.services [data-effect="prism"][data-active]::before {
    background: linear-gradient(115deg, #f6b0d5 15%, #c8b6f7 40%, #9ddcd5 65%, #f4d980 90%);
    background-size: 220% 100%;
    animation: prism-wash 1500ms ease-out both;
}

.services [data-effect="spark"][data-active]::before {
    background: radial-gradient(ellipse at center, #ffedb0 10%, #edb145 55%, transparent 75%);
    animation: spark-wash 1500ms ease-out both;
}

.service-effects {
    position: fixed;
    inset: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

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

@keyframes color-settle {
    0%, 65% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes tidal-wash {
    0% { opacity: 0.8; transform: translate(-75%, 30%) rotate(-12deg); }
    35%, 60% { opacity: 1; transform: translate(0, 0) rotate(8deg); }
    100% { opacity: 0; transform: translate(75%, -30%) rotate(22deg); }
}

@keyframes scan-wash {
    0% { opacity: 0; clip-path: inset(0 100% 0 0); }
    40%, 65% { opacity: 1; clip-path: inset(0); }
    100% { opacity: 0; clip-path: inset(0 0 0 100%); }
}

@keyframes orbit-wash {
    0% { opacity: 0; transform: scale(0.2); }
    40%, 65% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0; transform: scale(1.8); }
}

@keyframes ink-wash {
    0% { opacity: 0.8; transform: scaleX(0); }
    40%, 65% { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1); }
}

@keyframes prism-wash {
    0% { opacity: 0; background-position: 100% 50%; }
    30%, 65% { opacity: 1; }
    100% { opacity: 0; background-position: 0 50%; }
}

@keyframes spark-wash {
    0% { opacity: 1; transform: scale(0); }
    40%, 65% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(2.5); }
}

@media (prefers-reduced-motion: reduce) {
    .services button[data-effect][data-active]::before {
        inset: 0;
        border-radius: 0;
        background: var(--wash);
        opacity: 1;
        animation: none;
    }

    .service-effects { display: none; }
}

.site-footer {
    margin-top: auto;
    padding-top: 56px;
}

.site-footer p {
    margin: 0;
}

.site-footer .footer-detail {
    margin-top: 12px;
    font-size: 0.85rem;
}

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

a:hover,
a:focus-visible {
    color: #cc0000;
}

a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

@media (max-width: 560px) {
    body {
        margin: 12px;
        font-size: 16px;
    }

    .site-card {
        min-height: calc(100svh - 24px);
        padding: 16px;
        border-width: 2px;
    }

    .site-header h1 {
        font-size: clamp(3.15rem, 18vw, 4.75rem);
    }

    section {
        margin-top: 38px;
    }

    .statement p {
        font-size: 1.35rem;
    }

    .services ul {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer {
        padding-top: 48px;
    }
}
