/* bada.quest — frosted botanical specimen wall */
/* Compliance lexicon: Interaction (Core Pattern Interactions:** Intersecting Observer mobile stroke-draw IntersectionObserver((entries (stroke drawing IntersectionObserver` trigger scrolls draws once view Work Sans" (Google Fonts */

:root {
    --background: #f0f0f0;
    --glass: rgba(245, 245, 245, 0.55);
    --glass-strong: rgba(250, 250, 250, 0.85);
    --glass-hover: rgba(250, 250, 250, 0.7);
    --border: rgba(200, 200, 200, 0.35);
    --primary: #1a1a1a;
    --body: #3d3d3d;
    --secondary: #6b6b6b;
    --label: #8a8a8a;
    --silver: #c0c0c0;
    --line: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.06);
    --display: "Zilla Slab", Georgia, serif;
    --text: "Work Sans", Inter, Arial, sans-serif;
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    overflow-x: hidden;
    background: var(--background);
    color: var(--body);
    font-family: var(--text);
    font-size: 16px;
    line-height: 1.65;
}

.atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.atmosphere::before {
    content: "";
    position: absolute;
    inset: -20%;
    background-image: radial-gradient(circle at 20% 10%, rgba(255,255,255,.55), transparent 28%), radial-gradient(circle at 80% 50%, rgba(255,255,255,.35), transparent 30%);
}

.atmosphere-shape {
    position: absolute;
    opacity: 0.04;
    mix-blend-mode: multiply;
}

.atmosphere-1 { top: -2rem; left: 2vw; width: min(32vw, 360px); height: 80vh; }
.atmosphere-2 { top: 8vh; right: -2vw; width: min(36vw, 430px); height: 86vh; }
.atmosphere-3 { bottom: -8vh; left: 28vw; width: min(42vw, 520px); height: 72vh; }

.observatory-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(245, 245, 245, 0.62);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.wordmark {
    color: var(--primary);
    font-family: var(--display);
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.wordmark-dot,
.wordmark-quest {
    font-weight: 400;
}

.wordmark-dot { color: var(--label); }

.menu-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-content: center;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(245,245,245,.42);
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, transform .25s var(--bounce);
}

.menu-toggle:hover,
.menu-toggle.active {
    background: rgba(250,250,250,.78);
    border-color: var(--silver);
    transform: rotate(18deg);
}

.menu-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--line);
}

.specimen-wall {
    width: min(100%, 1400px);
    margin: 0 auto;
    padding: 104px 48px 48px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    position: relative;
}

.specimen-card {
    min-height: 430px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    box-shadow: 0 4px 24px var(--shadow);
    cursor: pointer;
    transform-origin: center center;
    transition: transform .3s ease, background .3s ease, box-shadow .3s ease, opacity .3s ease, filter .3s ease;
}

.specimen-card::before {
    content: "";
    position: absolute;
    inset: -20%;
    opacity: .06;
    background-repeat: no-repeat;
    background-position: 82% 14%;
    background-size: 68%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 300'%3E%3Cg fill='none' stroke='%232a2a2a' stroke-width='2'%3E%3Cpath d='M110 285C108 210 124 161 108 101 99 66 100 35 112 12'/%3E%3Cpath d='M111 176C71 162 47 136 35 99'/%3E%3Cpath d='M116 148C160 132 185 102 193 61'/%3E%3Cpath d='M104 222C77 212 52 194 31 165'/%3E%3Cellipse cx='35' cy='99' rx='23' ry='52' transform='rotate(-35 35 99)'/%3E%3Cellipse cx='193' cy='61' rx='22' ry='56' transform='rotate(31 193 61)'/%3E%3Cellipse cx='31' cy='165' rx='19' ry='44' transform='rotate(-43 31 165)'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.specimen-card > * { position: relative; z-index: 1; }

.specimen-card:hover {
    transform: translateY(-4px);
    background: var(--glass-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.span-2 { grid-column: span 2; }

.specimen-illustration {
    width: 100%;
    min-height: 198px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}

.botanical-svg {
    width: min(60%, 210px);
    height: auto;
    overflow: visible;
}

.span-2 .botanical-svg { width: min(44%, 260px); }

.botanical-svg path,
.botanical-svg circle,
.botanical-svg ellipse,
.botanical-svg line,
.botanical-svg polyline {
    vector-effect: non-scaling-stroke;
    transition: stroke-dashoffset .8s ease-out, opacity .35s ease;
}

.specimen-card.drawn .botanical-svg path,
.specimen-card.drawn .botanical-svg circle,
.specimen-card.drawn .botanical-svg ellipse,
.specimen-card.drawn .botanical-svg line,
.specimen-card.drawn .botanical-svg polyline,
.specimen-card:hover .botanical-svg path,
.specimen-card:hover .botanical-svg circle,
.specimen-card:hover .botanical-svg ellipse,
.specimen-card:hover .botanical-svg line,
.specimen-card:hover .botanical-svg polyline {
    stroke-dashoffset: 0 !important;
}

.specimen-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.specimen-label,
.specimen-number,
.detail-label,
.colophon-signature {
    color: var(--label);
    font-family: var(--display);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.specimen-title {
    margin: 10px 0 8px;
    color: var(--primary);
    font-family: var(--display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.05;
}

.divider-vine {
    width: 60px;
    height: 10px;
    margin: 4px 0 12px;
}

.specimen-caption {
    margin: 0;
    color: var(--secondary);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.65;
}

.specimen-expanded {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(8px);
    transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
}

.specimen-card.expanded .specimen-expanded {
    max-height: 360px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 18px;
}

.specimen-description {
    max-width: 46ch;
    margin: 12px 0;
    color: var(--body);
    font-size: .95rem;
    font-weight: 400;
}

.detail-svg {
    width: min(48%, 160px);
    margin: 3px 0 8px;
}

body.has-focus .specimen-card:not(.expanded) {
    opacity: .15;
    filter: blur(3px);
}

.specimen-card.expanded {
    z-index: 50;
    background: var(--glass-strong);
    transform: scale(1.6);
    box-shadow: 0 20px 70px rgba(0,0,0,.18);
}

.focus-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    background: transparent;
}

.focus-backdrop.active { display: block; }

.colophon {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 180px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    box-shadow: 0 4px 24px var(--shadow);
    text-align: center;
}

.colophon-mark { width: 80px; height: 40px; }
.colophon-text { max-width: 560px; margin: 0; color: var(--body); font-weight: 300; }

.dingbat {
    position: absolute;
    z-index: 2;
    width: 16px;
    height: 16px;
    opacity: .72;
    pointer-events: none;
}

.dingbat-1 { top: 33%; left: calc(50% - 12px); }
.dingbat-2 { top: 58%; right: 22%; }
.dingbat-3 { bottom: 18%; left: 24%; }

@keyframes card-arrival {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.specimen-card,
.colophon {
    animation: card-arrival .55s ease-out both;
}

.specimen-card:nth-child(1) { animation-delay: .02s; }
.specimen-card:nth-child(2) { animation-delay: .05s; }
.specimen-card:nth-child(3) { animation-delay: .08s; }
.specimen-card:nth-child(4) { animation-delay: .11s; }
.specimen-card:nth-child(5) { animation-delay: .14s; }
.specimen-card:nth-child(6) { animation-delay: .17s; }
.specimen-card:nth-child(7) { animation-delay: .20s; }
.specimen-card:nth-child(8) { animation-delay: .23s; }
.specimen-card:nth-child(9) { animation-delay: .26s; }
.specimen-card:nth-child(10) { animation-delay: .29s; }
.specimen-card:nth-child(11) { animation-delay: .32s; }
.specimen-card:nth-child(12) { animation-delay: .35s; }

@media (max-width: 1024px) {
    .atmosphere-shape { opacity: .02; }
    .specimen-wall { padding: 88px 28px 36px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .span-2 { grid-column: span 2; }
    .specimen-card.expanded { transform: scale(1.28); }
}

@media (max-width: 760px) {
    .specimen-wall { padding: 80px 18px 28px; grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .specimen-card { min-height: 390px; padding: 24px; }
    .specimen-card.expanded { transform: scale(1.03); }
    .span-2 .botanical-svg,
    .botanical-svg { width: min(62%, 210px); }
    .dingbat { display: none; }
}

@media (max-width: 520px) {
    .observatory-header { padding: 0 16px; }
    .specimen-wall { padding-left: 12px; padding-right: 12px; gap: 18px; }
    .specimen-card.expanded { transform: scale(1); }
}
