/* Biome Wall surface: black/red/deep-gold material language, with the shared pixel renderer kept
   byte-identical to HartiiLabs. This file only owns the page composition and ambient layer. */

.biome-wall { background: var(--ink-900); overflow-x: hidden; }
.biome-wall .nav { padding-top: env(safe-area-inset-top, 0px); }
.biome-wall .nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
.wall-hero { position: relative; isolation: isolate; min-height: min(720px, 82dvh); display: grid; align-items: end; overflow: hidden; border-bottom: 1px solid var(--line); }
.wall-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(11,7,8,.16), var(--ink-900) 92%); }
.wall-field { position: absolute; inset: -5%; z-index: -3; width: 110%; height: 110%; object-fit: cover; opacity: .2; filter: saturate(1.2) contrast(1.1); pointer-events: none; }
.wall-hero-inner { position: relative; z-index: 1; padding-block: clamp(64px, 11vw, 136px) clamp(44px, 8vw, 90px); }
.wall-hero h1 { max-width: 9ch; font-size: clamp(3.6rem, 11vw, 8.5rem); line-height: .86; letter-spacing: -.08em; }
.wall-hero .lede { max-width: 53ch; margin-top: 22px; }
.wall-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.wall-hero-actions .btn { min-height: 48px; }
.wall-testing { display: inline-flex; margin-top: 24px; padding: 8px 11px; border: 1px solid color-mix(in srgb, var(--red-hi) 45%, var(--line-2)); border-radius: 7px; color: #ffb9bd; background: rgba(229,36,59,.08); font-size: 12px; }
.wall-particles { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.wall-particles::before, .wall-particles::after { content: ''; position: absolute; width: 2px; height: 2px; left: 16%; top: 32%; background: var(--red-hi); box-shadow: 24vw 12vh 0 #d7a44a, 56vw 8vh 0 var(--red), 72vw 36vh 0 #d7a44a, 84vw 20vh 0 var(--red-hi), 38vw 52vh 0 #d7a44a, 8vw 74vh 0 var(--red-dim), 92vw 64vh 0 #d7a44a; opacity: .7; animation: wall-drift 13s ease-in-out infinite alternate; }
.wall-particles::after { left: 4%; top: 18%; opacity: .34; transform: scale(1.4); animation-duration: 19s; animation-delay: -5s; }
.wall-particles i { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; background: var(--red-hi); box-shadow: 0 0 12px currentColor; opacity: .6; animation: wall-particle var(--h) ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.7s); }
.wall-particles i:nth-child(2n) { background: #d7a44a; }
@keyframes wall-particle { from { transform: translate3d(-6px, 14px, 0) scale(.7); opacity: .18; } to { transform: translate3d(10px, -20px, 0) scale(1.2); opacity: .8; } }
@keyframes wall-drift { from { transform: translate3d(0, 10px, 0); } to { transform: translate3d(10px, -24px, 0); } }

.wall-section { position: relative; }
.wall-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.wall-section-head h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
.wall-muted { color: var(--fg-3); font-size: 13px; }
.wall-status { min-height: 1.5em; color: var(--fg-2); font: 12px/1.5 var(--mono); }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: clamp(10px, 1.4vw, 18px); margin-top: 20px; }
.wall-section .wall-grid { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.wall-section.is-in .wall-grid { opacity: 1; transform: none; }
.wall-tile-link { display: block; min-width: 0; aspect-ratio: 1; border-radius: 7px; text-decoration: none; outline-offset: 4px; }
.wall-tile-host { width: 100%; height: 100%; min-width: 0; perspective: 500px; }
.wall-tile-link:focus-visible { outline: 2px solid var(--red-hi); }
.wall-detail { display: grid; grid-template-columns: minmax(0, .86fr) minmax(280px, 1.14fr); gap: clamp(18px, 5vw, 72px); align-items: center; margin-top: clamp(42px, 8vw, 100px); padding: clamp(18px, 4vw, 44px); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(25,17,19,.64), rgba(11,7,8,.16)); }
.wall-detail-copy { min-width: 0; }
.wall-detail-copy h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.wall-message { margin-top: 18px; max-width: 45ch; color: var(--fg); font-size: clamp(1.05rem, 2.2vw, 1.35rem); line-height: 1.45; overflow-wrap: anywhere; }
.wall-detail-slab { min-width: 0; width: 100%; display: grid; place-items: center; }
.wall-detail-slab .w3d-slab-scene { padding: 12px 0 40px; }
.wall-detail-slab .w3d-slab { width: min(42vw, 420px, 100%); }
.wall-facts { display: grid; gap: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.wall-fact { display: grid; grid-template-columns: minmax(96px, .55fr) minmax(0, 1.45fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.wall-fact dt { color: var(--fg-3); }
.wall-fact dd { min-width: 0; margin: 0; color: var(--fg-2); overflow-wrap: anywhere; }
.wall-fact a, .wall-detail-links a { color: var(--red-hi); text-decoration: none; }
.wall-detail-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 18px; font-size: 12px; }
.wall-detail-links a { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 760px) {
  .wall-section-head { align-items: flex-start; flex-direction: column; }
  .wall-nav { display: flex; width: 100%; gap: 8px; }
  .wall-nav .btn { flex: 1; min-height: 48px; }
  .wall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .wall-detail { grid-template-columns: minmax(0, 1fr); padding-inline: 0; }
  .wall-detail-slab { order: -1; }
  .wall-detail-slab .w3d-slab { width: min(82vw, 360px, 100%); }
}
@media (max-width: 390px) {
  .wall-hero h1 { font-size: clamp(3rem, 15vw, 4rem); }
  .wall-hero-actions .btn { width: 100%; justify-content: center; }
  .wall-fact { grid-template-columns: 1fr; gap: 2px; }
}
@media (pointer: coarse) {
  .wall-particles::before, .wall-particles::after { animation-duration: 24s; opacity: .4; }
}
@media (prefers-reduced-motion: reduce) {
  .wall-field { display: none; }
  .wall-particles::before, .wall-particles::after { animation: none; }
  .wall-particles i { animation: none; }
  .wall-section .wall-grid { opacity: 1; transform: none; }
}

/* Country-flag emoji in engraved messages (Windows ships no flag glyphs) — same self-hosted face as
   explorer.css / legacy.css; unicode-range limits it to flag code points. */
@font-face {
  font-family: 'Twemoji Country Flags';
  src: url('/fonts/TwemojiCountryFlags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}
.wall-message { font-family: 'Twemoji Country Flags', var(--body); }
