/* =========================================================
   REKTIOM — content sections
   ========================================================= */

/* ---------- ABOUT ---------- */
.section--about { background: radial-gradient(60% 50% at 85% 50%, rgba(139,53,255,.08), transparent 70%); }
.about { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.about__text { margin-top: 36px; display: grid; gap: 22px; max-width: 620px; font-size: clamp(16px, 1.3vw, 19px); color: var(--text-2); }
.about__lead { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.2; color: var(--text); letter-spacing: -0.015em; }
.about__neg { display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid var(--purple); color: var(--text); font-weight: 600; }
.about__welcome { font-size: 15px; color: var(--text); }

.dossier { border: 1px solid var(--line-2); background: var(--panel); position: relative; }
.dossier__head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 10.5px; letter-spacing: .12em; border-bottom: 1px solid var(--line-2); }
.stamp { color: var(--red); border: 1.5px solid var(--red); padding: 2px 8px; transform: rotate(-4deg); font-weight: 700; letter-spacing: .16em; }
.dossier__img { aspect-ratio: 344 / 282; image-rendering: pixelated; }
.dossier__scan { position: absolute; left: 0; right: 0; height: 2px; background: var(--green); box-shadow: 0 0 18px 2px var(--green); opacity: .6; animation: scanY 3.6s var(--ease) infinite; z-index: 2; }
@keyframes scanY { 0% { top: 0; } 50% { top: calc(100% - 2px); } 100% { top: 0; } }
.dossier__data div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 11.5px; }
.dossier__data dt { color: var(--muted); letter-spacing: .1em; }

/* ---------- FEATURES ---------- */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-2); }
.feature {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px 22px 22px; min-height: 380px;
  border-right: 1px solid var(--line-2); background: var(--bg); overflow: hidden; transition: background .3s var(--ease);
}
.feature:last-child { border-right: 0; }
.feature::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.feature:hover { background: var(--panel); }
.feature:hover::after { transform: scaleX(1); }
.feature__num { font-size: 11px; color: var(--green); letter-spacing: .14em; }
.feature h3 { margin-top: auto; font-family: var(--f-display); font-stretch: 125%; font-weight: 900; font-size: clamp(22px, 1.9vw, 30px); letter-spacing: -0.03em; line-height: 1; }
.feature p { color: var(--muted); font-size: 14px; }
.feature__go { font-size: 11px; letter-spacing: .14em; color: var(--text-2); transition: color .2s, transform .3s var(--ease); }
.feature:hover .feature__go { color: var(--green); transform: translateX(4px); }
.feature__viz { height: 110px; border: 1px solid var(--line); background: #070708; position: relative; overflow: hidden; }
.feature__viz--terminal { display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 4px 12px; padding: 0 16px; font-family: var(--f-mono); font-size: 12px; color: var(--text-2); }
.feature__viz--bars { display: flex; align-items: flex-end; gap: 5px; padding: 14px 14px 10px; }
.feature__viz--bars i { flex: 1; background: var(--green); opacity: .8; animation: bar 2.4s var(--ease) infinite alternate; }
.feature__viz--bars i:nth-child(3n) { background: var(--red); }
.feature__viz--bars i:nth-child(1) { height: 30%; animation-delay: -.2s; } .feature__viz--bars i:nth-child(2) { height: 52%; animation-delay: -.9s; }
.feature__viz--bars i:nth-child(3) { height: 40%; animation-delay: -1.4s; } .feature__viz--bars i:nth-child(4) { height: 66%; animation-delay: -.5s; }
.feature__viz--bars i:nth-child(5) { height: 58%; animation-delay: -2s; } .feature__viz--bars i:nth-child(6) { height: 34%; animation-delay: -1.1s; }
.feature__viz--bars i:nth-child(7) { height: 74%; animation-delay: -.3s; } .feature__viz--bars i:nth-child(8) { height: 88%; animation-delay: -1.7s; }
.feature__viz--bars i:nth-child(9) { height: 20%; animation-delay: -.8s; } .feature__viz--bars i:nth-child(10) { height: 61%; animation-delay: -2.2s; }
.feature__viz--bars i:nth-child(11) { height: 79%; animation-delay: -1.3s; } .feature__viz--bars i:nth-child(12) { height: 12%; animation-delay: -.6s; }
@keyframes bar { to { transform: scaleY(.45); transform-origin: bottom; } }
.feature__viz--nodes i { position: absolute; width: 8px; height: 8px; background: var(--purple); box-shadow: 0 0 12px var(--purple); animation: node 4s ease-in-out infinite; }
.feature__viz--nodes i:nth-child(1) { left: 12%; top: 30%; } .feature__viz--nodes i:nth-child(2) { left: 30%; top: 64%; animation-delay: -1s; }
.feature__viz--nodes i:nth-child(3) { left: 48%; top: 22%; animation-delay: -2s; background: var(--green); box-shadow: 0 0 12px var(--green); }
.feature__viz--nodes i:nth-child(4) { left: 62%; top: 70%; animation-delay: -.5s; } .feature__viz--nodes i:nth-child(5) { left: 80%; top: 36%; animation-delay: -1.6s; }
.feature__viz--nodes i:nth-child(6) { left: 90%; top: 78%; animation-delay: -2.6s; } .feature__viz--nodes i:nth-child(7) { left: 22%; top: 84%; animation-delay: -3.1s; }
.feature__viz--nodes::before { content: ""; position: absolute; inset: 0; background: linear-gradient(20deg, transparent 48%, rgba(139,53,255,.35) 49%, transparent 51%), linear-gradient(-14deg, transparent 48%, rgba(57,255,101,.25) 49%, transparent 51%), linear-gradient(60deg, transparent 48%, rgba(255,255,255,.12) 49%, transparent 51%); }
@keyframes node { 50% { transform: translate(6px, -6px); opacity: .5; } }
.feature__viz--files { display: grid; align-content: center; gap: 6px; padding: 0 16px; font-family: var(--f-mono); font-size: 11.5px; color: var(--text-2); }
.feature__viz--files i { font-style: normal; padding: 3px 8px; border: 1px solid var(--line-2); width: max-content; transition: transform .35s var(--ease); }
.feature:hover .feature__viz--files i:nth-child(2) { transform: translateX(10px); }
.feature:hover .feature__viz--files i:nth-child(3) { transform: translateX(20px); }
.feature:hover .feature__viz--files i:nth-child(4) { transform: translateX(30px); }

/* ---------- ARCHIVE ---------- */
.section--archive { background: linear-gradient(180deg, var(--bg), #070509 50%, var(--bg)); }
.archive { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border: 1px solid var(--line-2); background: var(--panel); min-height: 520px; }
.archive__index { border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-width: 0; }
.archive__tools { padding: 14px; display: grid; gap: 12px; border-bottom: 1px solid var(--line-2); }
.field--search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); padding: 0 12px; }
.field--search input { border: 0; padding: 11px 0; background: transparent; box-shadow: none !important; }
.field--search:focus-within { border-color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; padding: 6px 10px; border: 1px solid var(--line-2); color: var(--muted); }
.chips button:hover { color: var(--text); border-color: var(--line-3); }
.chips button.is-active { color: #000; background: var(--purple); border-color: var(--purple); }
.archive__list { flex: 1; overflow-y: auto; max-height: 470px; }
.archive__list li { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-family: var(--f-mono); font-size: 12px; transition: background .15s, padding .25s var(--ease); }
.archive__list li:hover { background: rgba(255,255,255,.025); }
.archive__list li[aria-selected="true"] { background: var(--purple-a); padding-left: 20px; box-shadow: inset 2px 0 0 var(--purple); }
.archive__id { color: var(--dim); }
.archive__title { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.sev { font-size: 9.5px; letter-spacing: .12em; padding: 2px 6px; border: 1px solid currentColor; }
.sev--CRITICAL { color: #ffb020; } .sev--SEVERE { color: var(--red); } .sev--TERMINAL { color: var(--purple); }
.archive__list .is-local .archive__id { color: var(--green); }
.archive__count { padding: 10px 14px; font-size: 10px; letter-spacing: .12em; color: var(--dim); border-top: 1px solid var(--line); }
.archive__empty { padding: 24px 14px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }

.case { position: relative; padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 22px; overflow: hidden; min-width: 0; }
.case::before { content: "FICTIONAL"; position: absolute; right: -40px; top: 34px; transform: rotate(18deg); font-family: var(--f-mono); font-weight: 700; font-size: 12px; letter-spacing: .3em; color: var(--red); border: 2px solid var(--red); padding: 4px 48px; opacity: .65; }
.case__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted); }
.case__meta b { color: var(--text-2); font-weight: 500; }
.case__title { overflow-wrap: anywhere; font-family: var(--f-display); font-stretch: 125%; font-weight: 900; font-size: clamp(28px, 3.6vw, 54px); line-height: .95; letter-spacing: -0.04em; max-width: 90%; }
.case__body { color: var(--text-2); font-size: 15.5px; max-width: 560px; }
.case__redact { display: grid; gap: 6px; }
.case__redact span { height: 11px; background: #1a1a1e; }
.case__redact span:nth-child(1) { width: 92%; } .case__redact span:nth-child(2) { width: 74%; } .case__redact span:nth-child(3) { width: 58%; }
.case__grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-2); }
.case__grid div { padding: 12px 14px; border-right: 1px solid var(--line-2); }
.case__grid div:last-child { border-right: 0; }
.case__grid dt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .14em; color: var(--dim); }
.case__grid dd { font-family: var(--f-mono); font-size: 13px; margin-top: 4px; }
.case__verdict { font-family: var(--f-mono); font-size: 13px; padding: 12px 14px; border-left: 2px solid var(--green); background: var(--green-a); }
.case__nav { display: flex; gap: 8px; margin-top: auto; align-items: center; }
.case__nav span { font-family: var(--f-mono); font-size: 10.5px; color: var(--dim); margin-left: auto; letter-spacing: .1em; }
.case.is-swapping > * { animation: caseIn .4s var(--ease) both; }
.case.is-swapping > *:nth-child(2) { animation-delay: .04s; } .case.is-swapping > *:nth-child(3) { animation-delay: .08s; } .case.is-swapping > *:nth-child(4) { animation-delay: .12s; }
@keyframes caseIn { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } }

.submit { margin-top: 16px; border: 1px solid var(--line-2); background: var(--panel); }
.submit summary { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 18px; cursor: pointer; list-style: none; font-size: 12.5px; letter-spacing: .1em; }
.submit summary::-webkit-details-marker { display: none; }
.submit summary:hover { background: rgba(255,255,255,.02); }
.submit[open] summary { border-bottom: 1px solid var(--line-2); }
.submit__form { padding: 18px; display: grid; gap: 14px; }
.submit__note { font-size: 11px; color: #ffb020; }
.submit__row { display: grid; grid-template-columns: 220px auto; gap: 14px; align-items: end; justify-content: start; }
.submit__err { font-size: 11.5px; min-height: 1em; }

/* ---------- MEME GENERATOR ---------- */
.meme { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 0; border: 1px solid var(--line-2); background: var(--panel); }
.meme__controls { padding: 22px; display: grid; gap: 22px; align-content: start; border-right: 1px solid var(--line-2); }
.meme fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; min-width: 0; }
.meme legend { font-size: 10.5px; letter-spacing: .16em; color: var(--green); margin-bottom: 10px; padding: 0; }
.pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pick button { position: relative; aspect-ratio: 1; border: 1px solid var(--line-2); overflow: hidden; background: #000; transition: border-color .2s, transform .2s var(--ease); }
.pick button img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) brightness(.8); transition: filter .2s; }
.pick button:hover img, .pick button[aria-checked="true"] img { filter: none; }
.pick button[aria-checked="true"] { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.pick button[aria-checked="true"]::after { content: "✓"; position: absolute; right: 3px; top: 2px; font-family: var(--f-mono); font-size: 11px; background: var(--green); color: #000; width: 16px; height: 16px; display: grid; place-items: center; }
.pick__upload { display: flex; align-items: center; justify-content: center; height: 36px; border: 1px dashed var(--line-3); font-size: 11px; letter-spacing: .12em; color: var(--muted); cursor: pointer; position: relative; }
.pick__upload:hover, .pick__upload:focus-within { color: var(--green); border-color: var(--green); }
.pick__upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-2); }
.seg button { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; padding: 9px 0; color: var(--muted); border-right: 1px solid var(--line-2); }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--text); color: #000; font-weight: 700; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 11.5px; letter-spacing: .1em; color: var(--text-2); cursor: pointer; }
.toggle input { appearance: none; width: 30px; height: 16px; border: 1px solid var(--line-3); position: relative; cursor: pointer; transition: background .2s, border-color .2s; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.toggle input:checked { border-color: var(--green); background: var(--green-a); }
.toggle input:checked::after { transform: translateX(14px); background: var(--green); }
.meme__preview { padding: clamp(18px, 3vw, 40px); display: grid; place-items: center; gap: 12px; background: repeating-conic-gradient(#0b0b0d 0 25%, #08080a 0 50%) 0 0 / 22px 22px; }
.meme__frame { width: min(100%, 600px); border: 1px solid var(--line-3); box-shadow: 0 30px 90px rgba(0,0,0,.8); }
.meme__frame canvas { width: 100%; height: auto; aspect-ratio: 1; }
.meme__meta { width: min(100%, 600px); display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .12em; }

/* ---------- COMMUNITY ---------- */
.section--community { overflow: hidden; }
.section--community::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 0%, rgba(57,255,101,.07), transparent 70%); pointer-events: none; }
.links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-2); }
.link-tile {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; padding: 24px 22px; min-height: 240px;
  border-right: 1px solid var(--line-2); background: var(--bg); overflow: hidden; isolation: isolate; transition: color .3s var(--ease);
}
.link-tile:last-child { border-right: 0; }
.link-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--green); transform: translateY(101%); transition: transform .45s var(--ease); }
.link-tile:not(.is-pending):hover { color: #000; }
.link-tile:not(.is-pending):hover::before { transform: none; }
.link-tile__name { overflow-wrap: anywhere; align-self: end; font-family: var(--f-display); font-stretch: 125%; font-weight: 900; font-size: clamp(22px, 2.2vw, 34px); letter-spacing: -0.03em; line-height: 1; }
.link-tile__state { font-size: 10.5px; letter-spacing: .14em; color: var(--green); }
.link-tile.is-pending .link-tile__state { color: #ffb020; }
.link-tile:not(.is-pending):hover .link-tile__state { color: #000; }
.link-tile__arrow { position: absolute; top: 18px; right: 20px; font-size: 22px; transition: transform .35s var(--ease); }
.link-tile:not(.is-pending):hover .link-tile__arrow { transform: translate(4px, -4px); }
.link-tile.is-pending { color: var(--muted); }
.link-tile.is-pending .link-tile__arrow { opacity: .3; }
.link-tile--buy:not(.is-pending) { background: var(--purple); color: #fff; }
.links__note { margin-top: 14px; font-size: 11px; letter-spacing: .08em; }

/* ---------- TOKEN ---------- */
.token { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.token__panel { border: 1px solid var(--line-2); background: var(--panel); }
.token__rows div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.token__rows div:last-child { border-bottom: 0; }
.token__rows dt { color: var(--muted); font-size: 10.5px; letter-spacing: .14em; }
.token__rows dd { display: flex; align-items: center; gap: 12px; min-width: 0; }
.token__ca code { font-family: var(--f-mono); color: #ffb020; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.token__ca code.is-set { color: var(--text); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .about, .token { grid-template-columns: 1fr; }
  .dossier { max-width: 520px; }
  .features, .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature:nth-child(2), .link-tile:nth-child(2) { border-right: 0; }
  .feature:nth-child(-n+2), .link-tile:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .meme { grid-template-columns: 1fr; }
  .meme__controls { border-right: 0; border-bottom: 1px solid var(--line-2); order: 2; }
}
@media (max-width: 760px) {
  .archive { grid-template-columns: 1fr; }
  .archive__index { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .archive__list { max-height: 260px; }
  .case__grid { grid-template-columns: 1fr; }
  .case__grid div { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .case__grid div:last-child { border-bottom: 0; }
  .submit__row { grid-template-columns: 1fr; }
  .token__rows div { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .features, .links { grid-template-columns: 1fr; }
  .feature, .link-tile { border-right: 0; border-bottom: 1px solid var(--line-2); min-height: 0; }
  .feature:last-child, .link-tile:last-child { border-bottom: 0; }
  .feature h3 { margin-top: 8px; }
  .link-tile { min-height: 150px; }
}
