:root {
    color-scheme: dark;
    --bg: #031012;
    --bg-deep: #020606;
    --surface: rgba(7, 28, 30, 0.78);
    --surface-strong: rgba(6, 22, 25, 0.94);
    --line: rgba(153, 240, 222, 0.18);
    --line-strong: rgba(153, 240, 222, 0.36);
    --text: #f3fbf4;
    --muted: #9fbab2;
    --soft: #d0f2dd;
    --aqua: #61f2d5;
    --coral: #ff7f66;
    --gold: #ecc970;
    --violet: #b8a0ff;
    --shadow: 0 26px 90px rgba(0, 0, 0, 0.56);
    --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, monospace;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg-deep);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 12% 4%, rgba(97, 242, 213, 0.14), transparent 27rem),
        radial-gradient(circle at 80% 8%, rgba(255, 127, 102, 0.14), transparent 24rem),
        radial-gradient(circle at 50% 42%, rgba(184, 160, 255, 0.08), transparent 40rem),
        linear-gradient(180deg, #020606 0%, #061314 48%, #020607 100%);
    color: var(--text);
    font-family: var(--sans);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.abstraquarium-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.52fr);
    align-items: stretch;
    border-bottom: 1px solid var(--line);
}

.hero__wash {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.72;
}

.hero__wash::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 6, 0.08) 0%, rgba(2, 6, 6, 0.24) 45%, rgba(2, 6, 6, 0.84) 75%, #020606 100%),
        linear-gradient(180deg, rgba(2, 6, 6, 0.05) 0%, rgba(2, 6, 6, 0.2) 60%, #020606 100%);
}

.hero__wash img {
    width: min(76vw, 1120px);
    height: 100%;
    object-fit:contain;
    filter: saturate(1.04) contrast(1.08) brightness(0.82);
}

.hero__content,
.hero__viewer {
    position: relative;
    z-index: 2;
}

.hero__content {
    align-self: center;
    padding: clamp(28px, 5vw, 82px);
    max-width: 790px;
}

.brand-link {
    display: inline-flex;
    margin-bottom: clamp(38px, 9vh, 104px);
    color: var(--text);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 0.86rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.meta-line {
    margin: 0 0 14px;
    color: var(--aqua);
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
p {
    text-wrap: pretty;
}

h1 {
    margin: 0;
    max-width: 10ch;
    font-size: clamp(4.4rem, 10vw, 10.4rem);
    line-height: 0.86;
    font-weight: 300;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1;
    font-weight: 360;
    letter-spacing: 0;
}

.lede {
    max-width: 640px;
    margin: 30px 0 0;
    color: #d8eee5;
    font-size: clamp(1.06rem, 1.58vw, 1.4rem);
    line-height: 1.55;
}

.hero__actions,
.viewer-links,
.page-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero__actions {
    margin-top: 34px;
}

.hero__actions a,
.viewer-links a,
.archive-links a,
.page-footer a,
.token-select-row button,
.token-stepper button {
    border: 1px solid var(--line-strong);
    background: rgba(5, 22, 23, 0.66);
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.hero__actions a,
.page-footer a {
    padding: 11px 15px;
    font-size: 0.9rem;
}

.hero__actions a:first-child {
    background: color-mix(in srgb, var(--aqua), #061314 78%);
    border-color: rgba(97, 242, 213, 0.62);
}

.hero__actions a:hover,
.viewer-links a:hover,
.archive-links a:hover,
.page-footer a:hover,
.token-select-row button:hover,
.token-stepper button:hover {
    border-color: rgba(255, 127, 102, 0.7);
    background: rgba(35, 36, 32, 0.72);
    transform: translateY(-1px);
}

.hero__viewer {
    align-self: center;
    margin-right: clamp(18px, 4vw, 58px);
    padding: 16px;
    border-left: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(7, 28, 30, 0.82), rgba(7, 18, 21, 0.72));
    box-shadow: var(--shadow);
}

.viewer-frame {
    position: relative;
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #031012;
    isolation: isolate;
}

.viewer-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit:contain;
}

.living-currents img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit:contain;
}

.viewer-frame--live img {
    position: absolute;
    inset: 0;
    z-index: 1;
    filter: saturate(1.08) brightness(0.84);
}

.viewer-frame::after,
.living-currents article::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    box-shadow:
        inset 0 0 0 1px rgba(153, 240, 222, 0.08),
        inset 0 0 86px rgba(0, 0, 0, 0.3);
}

.live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 6px 8px;
    border: 1px solid rgba(97, 242, 213, 0.42);
    border-radius: 8px;
    background: rgba(2, 6, 6, 0.72);
    color: var(--aqua);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.viewer-frame figcaption {
    position: absolute;
    z-index: 4;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(2, 6, 6, 0.74);
    color: var(--soft);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.viewer-controls {
    padding: 18px 2px 0;
}

.viewer-controls label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.token-select-row {
    display: grid;
    grid-template-columns: minmax(124px, 0.8fr) minmax(116px, 1fr) auto;
    gap: 8px;
}

.token-select-row select,
.token-select-row input {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    outline: none;
    background: rgba(2, 6, 6, 0.72);
    color: var(--text);
}

.token-select-row select {
    appearance: none;
    background:
        linear-gradient(45deg, transparent 50%, var(--aqua) 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
        linear-gradient(135deg, var(--aqua) 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
        rgba(2, 6, 6, 0.72);
    color: var(--soft);
}

.token-select-row input:focus,
.token-select-row select:focus {
    border-color: var(--aqua);
}

.token-select-row button,
.token-stepper button {
    padding: 11px 13px;
}

.viewer-controls p,
.section-heading p,
.page-footer,
.archive-links small,
.facts dt {
    color: var(--muted);
}

.viewer-controls p {
    margin: 12px 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
}

.holder-card {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(97, 242, 213, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(97, 242, 213, 0.1), transparent 56%),
        rgba(2, 6, 6, 0.46);
}

.holder-card > span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.holder-card a {
    display: grid;
    gap: 3px;
    color: var(--text);
    text-decoration: none;
}

.holder-card strong {
    font-size: 0.95rem;
    font-weight: 520;
}

.holder-card small,
.renderer-status {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.renderer-status {
    min-height: 2.1em;
}

.token-stepper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.token-stepper output {
    min-width: 78px;
    text-align: center;
    color: var(--gold);
    font-family: var(--mono);
}

.viewer-links {
    margin-top: 12px;
}

.viewer-links a {
    flex: 1 1 116px;
    padding: 9px 10px;
    text-align: center;
    font-size: 0.78rem;
}

.gallery-band,
.token-browser,
.statement-grid,
.links-band,
.page-footer {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.gallery-band,
.token-browser,
.links-band {
    padding: clamp(58px, 8vw, 96px) 0 0;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.46fr) minmax(280px, 0.54fr);
    gap: clamp(22px, 5vw, 78px);
    align-items: end;
    margin-bottom: 24px;
}

.section-heading p {
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

.preview-strip {
    display: grid;
    grid-template-columns: repeat(8, minmax(96px, 1fr));
    gap: 10px;
}

.preview-tile {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.preview-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit:contain;
    transition: transform 200ms ease, filter 200ms ease;
}

.preview-tile span {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(2, 6, 6, 0.72);
    color: var(--soft);
    font-family: var(--mono);
    font-size: 0.7rem;
}

.preview-tile:hover img {
    transform: scale(1.04);
    filter: saturate(1.12);
}

.living-currents {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 1.05fr;
    gap: 12px;
    align-items: stretch;
}

.living-currents article {
    position: relative;
    min-height: clamp(280px, 34vw, 520px);
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #031012;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

.living-currents--slider article {
    transition: border-color 200ms ease, transform 260ms ease, filter 260ms ease;
}

.living-currents--slider img {
    transition: opacity 260ms ease, transform 1200ms ease;
}

.living-currents--slider article:hover {
    border-color: rgba(236, 201, 112, 0.54);
    filter: saturate(1.06);
}

.living-currents--slider article:hover img {
    transform: scale(1.025);
}

.living-currents article:nth-child(2) {
    transform: translateY(34px);
}

.living-currents article:nth-child(3) {
    transform: translateY(-18px);
}

.living-currents span {
    position: absolute;
    z-index: 3;
    left: 12px;
    bottom: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(2, 6, 6, 0.72);
    color: var(--soft);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.mint-panel {
    display: grid;
    grid-template-columns: minmax(160px, 0.28fr) minmax(280px, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
    padding: clamp(16px, 2.4vw, 28px);
    border: 1px solid rgba(236, 201, 112, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(236, 201, 112, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(7, 28, 30, 0.76), rgba(3, 13, 15, 0.58));
}

.mint-orbit {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    min-width: 148px;
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(97, 242, 213, 0.2) 0 38%, transparent 39%),
        conic-gradient(var(--coral) 0deg 6.32deg, rgba(255, 255, 255, 0.08) 6.32deg 360deg);
}

.mint-orbit::before {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: inherit;
    background: rgba(2, 6, 6, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mint-orbit span,
.mint-orbit small,
.mint-orbit em {
    position: relative;
    z-index: 1;
    font-family: var(--mono);
    text-align: center;
}

.mint-orbit span {
    color: var(--text);
    font-size: clamp(2.4rem, 4.2vw, 4.8rem);
    line-height: 0.9;
}

.mint-orbit small {
    color: var(--aqua);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.mint-orbit em {
    color: var(--muted);
    font-size: 0.78rem;
    font-style: normal;
}

.mint-copy h3 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.9rem);
    font-weight: 380;
}

.mint-copy p {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.mint-panel > a {
    justify-self: end;
    padding: 12px 14px;
    border: 1px solid rgba(236, 201, 112, 0.44);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    background: rgba(236, 201, 112, 0.12);
    white-space: nowrap;
}

.mint-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mint-samples a {
    padding: 9px 11px;
    border: 1px solid rgba(153, 240, 222, 0.22);
    border-radius: 8px;
    background: rgba(4, 18, 20, 0.72);
    color: var(--soft);
    font-family: var(--mono);
    font-size: 0.76rem;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.mint-samples a:hover {
    border-color: var(--gold);
    background: rgba(236, 201, 112, 0.13);
    transform: translateY(-1px);
}

.statement-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
    gap: 1px;
    padding-top: clamp(66px, 9vw, 112px);
}

.statement-grid article {
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--line);
    background: rgba(3, 13, 15, 0.56);
}

.statement-grid article:nth-child(2) {
    background:
        linear-gradient(135deg, rgba(97, 242, 213, 0.12), transparent 48%),
        rgba(3, 13, 15, 0.56);
}

.statement-art {
    grid-row: span 2;
    min-height: 560px;
    padding: 0 !important;
    overflow: hidden;
}

.statement-art img,
.image-river img,
.archive-links img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit:contain;
}

.technical-art {
    background:
        linear-gradient(180deg, rgba(184, 160, 255, 0.1), transparent 56%),
        rgba(3, 13, 15, 0.56) !important;
}

.statement-grid p {
    margin: 18px 0 0;
    color: #d3e8df;
    line-height: 1.66;
}

.facts {
    display: grid;
    gap: 14px;
    margin: 20px 0 0;
}

.facts div {
    display: grid;
    gap: 4px;
}

.facts dt {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.facts a {
    color: var(--soft);
}

.archive-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.archive-links a {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    min-height: 220px;
    padding: 18px;
    align-content: end;
}

.archive-links a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 6, 0.24) 34%, rgba(2, 6, 6, 0.92) 100%);
}

.archive-links img {
    position: absolute;
    inset: 0;
    z-index: 0;
    filter: saturate(1.05) brightness(0.74);
    transition: transform 220ms ease, filter 220ms ease;
}

.archive-links span {
    position: relative;
    z-index: 1;
    color: var(--text);
    font-size: 1rem;
}

.archive-links small {
    position: relative;
    z-index: 1;
    font-size: 0.82rem;
    line-height: 1.4;
}

.archive-links a:hover img {
    transform: scale(1.04);
    filter: saturate(1.12) brightness(0.86);
}

.image-river {
    width: min(1280px, calc(100% - 24px));
    margin: clamp(36px, 6vw, 78px) auto 0;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr 0.9fr;
    gap: 8px;
}

.image-river img {
    min-height: clamp(210px, 24vw, 360px);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.page-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 52px 0;
    border-top: 1px solid var(--line);
    margin-top: clamp(58px, 8vw, 94px);
}

.page-footer p {
    margin: 0;
    max-width: 560px;
    line-height: 1.5;
}

@media (max-width: 1060px) {
    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-bottom: 36px;
    }

    .hero__wash img {
        width: 100%;
    }

    .hero__wash::after {
        background:
            linear-gradient(180deg, rgba(2, 6, 6, 0.16) 0%, rgba(2, 6, 6, 0.78) 68%, #020606 100%);
    }

    .hero__content {
        padding-top: 38px;
    }

    .hero__viewer {
        width: min(560px, calc(100% - 36px));
        margin: 0 auto;
        border-left: 0;
    }

    .preview-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .living-currents,
    .mint-panel,
    .image-river {
        grid-template-columns: 1fr 1fr;
    }

    .living-currents article,
    .living-currents article:nth-child(2),
    .living-currents article:nth-child(3) {
        transform: none;
    }

    .statement-grid,
    .archive-links {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .hero__content {
        padding: 26px 18px 34px;
    }

    .brand-link {
        margin-bottom: 62px;
    }

    h1 {
        max-width: 100%;
        font-size: clamp(2.32rem, 10.5vw, 2.62rem);
        line-height: 0.98;
        overflow-wrap: normal;
    }

    .hero__actions a {
        min-width: 0;
        flex: 1 1 100%;
        text-align: center;
    }

    .hero__viewer,
    .gallery-band,
    .token-browser,
    .statement-grid,
    .links-band,
    .page-footer {
        width: calc(100% - 28px);
    }

    .section-heading,
    .statement-grid,
    .archive-links {
        grid-template-columns: 1fr;
    }

    .preview-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .living-currents,
    .mint-panel,
    .image-river {
        grid-template-columns: 1fr;
    }

    .living-currents article {
        min-height: 360px;
    }

    .mint-panel > a {
        justify-self: stretch;
        text-align: center;
    }

    .token-select-row {
        grid-template-columns: 1fr;
    }


    .statement-art {
        min-height: 390px;
    }

    .viewer-frame figcaption {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .page-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
