/*
Theme Name: Talqava
Theme URI: https://talqava.com
Author: Talqava
Description: The Talqava website: an open source project site with a blog, a sponsor page with levels and a logo wall, and a contributor wall filled in from GitHub. Black with a neon accent, matching the Talqava app.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: talqava
*/

:root {
  --accent: #00d26a;
  --bg: #0a0a0a;
  --bg2: #0f0f0f;
  --panel: #141414;
  --line: #262626;
  --line2: #3a3a3a;
  --text: #f2f2f2;
  --soft: #b8b8b8;
  --muted: #8c8c8c;
  --sans: "Space Grotesk", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: none; transition: color .2s, border-color .2s, transform .15s, box-shadow .2s; }
a:hover { color: var(--accent); }
a:active { transform: translateY(2px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--accent); color: var(--bg); z-index: 100; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-narrow { max-width: 800px; }
.band { border-top: 1px solid var(--line); }
.band-alt { background: var(--bg2); }
.pad { padding-top: 88px; padding-bottom: 88px; }
.stack { display: flex; flex-direction: column; gap: 40px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.label { font-family: var(--mono); font-size: 13px; color: var(--muted); text-transform: uppercase; }
.h2 { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -.01em; }
.lead { font-size: 18px; color: var(--soft); }
.soft { color: var(--soft); }
.head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border: 1px solid var(--line2); border-radius: 4px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: inherit; background: none; color: var(--text); }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-primary:hover { color: var(--bg); filter: brightness(1.12); }
.btn-outline { border-color: var(--accent); color: var(--accent); }
.btn-small { min-height: 44px; padding: 0 18px; }
.more { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 700; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 20px; min-height: 44px; }
.brand:hover { color: var(--text); }
.brand-key { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1.5px solid var(--accent); border-radius: 7px; box-shadow: 0 4px 0 -1px var(--bg), 0 4px 0 0 var(--accent); font-family: var(--mono); font-size: 15px; color: var(--accent); transition: transform .15s, box-shadow .15s; }
.brand:hover .brand-key { transform: translateY(3px); box-shadow: 0 1px 0 -1px var(--bg), 0 1px 0 0 var(--accent); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15px; }
.nav ul { display: contents; list-style: none; margin: 0; padding: 0; }
.nav li { display: contents; }
.nav a { min-height: 44px; display: inline-flex; align-items: center; }
.nav .current-menu-item > a, .nav a[aria-current="page"] { color: var(--accent); }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 88px; display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1, .page-hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -.02em; }
.hero .lead { font-size: 19px; max-width: 540px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.install { max-width: 560px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); padding: 14px 16px; overflow-x: auto; }
.install p { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.install code { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
.hero-art { flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; }
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; padding: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.keybot { display: flex; flex-direction: column; align-items: center; gap: 16px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.key { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border: 1.5px solid currentColor; border-radius: 14px; box-shadow: 0 8px 0 -1.5px var(--bg2), 0 8px 0 0 currentColor; font-size: 24px; font-weight: 700; color: var(--text); animation: press 5.4s ease-in-out infinite; }
.key-accent { color: var(--accent); }
.keybot:nth-child(2) .key { animation-delay: .9s; }
.keybot:nth-child(3) .key { animation-delay: 1.8s; }
.keybot:nth-child(4) .key { animation-delay: 2.7s; }
.keybot:nth-child(5) .key { animation-delay: 3.6s; }
.keybot:nth-child(6) .key { animation-delay: 4.5s; }
@media (max-width: 480px) { .keys { gap: 18px; padding: 24px; } .key { width: 64px; height: 64px; font-size: 19px; } }

.page-hero { padding-top: 88px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 22px; }
.page-hero h1 { max-width: 900px; font-size: clamp(40px, 6vw, 62px); }
.page-hero .lead { max-width: 640px; font-size: 19px; }

/* Cards */
.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.card { flex: 1 1 320px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 28px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); }
.card h3, .card .card-title { font-size: 21px; font-weight: 700; line-height: 1.25; }
.card .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cat { font-family: var(--mono); font-size: 13px; color: var(--accent); text-transform: uppercase; }

/* Sponsor walls */
.wall { display: flex; flex-direction: column; gap: 16px; }
.logos { display: flex; flex-wrap: wrap; gap: 20px; }
.logo { flex: 1 1 300px; min-width: 0; height: 140px; display: flex; align-items: center; justify-content: center; padding: 20px; border: 1px solid var(--line2); border-radius: 6px; background: var(--panel); font-weight: 700; font-size: 20px; text-align: center; }
.logo img { max-height: 100%; width: auto; object-fit: contain; }
.logo:hover { border-color: var(--accent); }
.logos-small { gap: 16px; }
.logos-small .logo { flex-basis: 180px; height: 84px; padding: 14px; font-size: 15px; background: none; border-color: var(--line); }
.logo-open { border: 1px dashed var(--accent); background: none; color: var(--accent); animation: dash 2.4s ease-in-out infinite; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--soft); }

/* Contributors */
.split { display: flex; flex-wrap: wrap; gap: 64px; }
.split > * { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.steps { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps .n { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--line2); border-radius: 6px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.faces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.face { display: block; aspect-ratio: 1; border: 1px solid var(--line2); border-radius: 50%; background: var(--panel); overflow: hidden; transition: transform .2s, border-color .2s; }
.face img { display: block; width: 100%; height: 100%; object-fit: cover; }
a.face:hover { transform: scale(1.08); border-color: var(--accent); }

/* Sponsor page */
.reasons { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.reason { flex: 1 1 300px; min-width: 0; border-top: 2px solid var(--accent); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.reason h2 { font-size: 20px; }
.toggle { display: flex; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; }
.toggle button { min-height: 44px; padding: 0 20px; border: 0; cursor: pointer; font: inherit; font-weight: 700; background: transparent; color: var(--text); }
.toggle button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.tiers { display: flex; flex-wrap: wrap; align-items: stretch; gap: 20px; }
.tier { flex: 1 1 250px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 28px; display: flex; flex-direction: column; gap: 16px; transition: transform .25s ease, border-color .25s ease; }
.tier:hover { transform: translateY(-4px); border-color: var(--accent); }
.tier h3 { font-family: var(--mono); font-size: 14px; letter-spacing: .08em; color: var(--soft); text-transform: uppercase; }
.tier .price { font-size: 34px; font-weight: 700; line-height: 1.1; }
.tier .price small { font-size: 15px; font-weight: 400; color: var(--muted); }
.tier ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.tier li { display: flex; gap: 10px; }
.tier li::before { content: "✓"; color: var(--accent); font-family: var(--mono); }
.tier .btn { min-height: 48px; }
.tier-gold { border-color: var(--accent); animation: glow 3s ease-in-out infinite; }
.tier-gold h3 { color: var(--accent); }
.tier-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { font-family: var(--mono); font-size: 13px; padding: 2px 8px; border-radius: 4px; background: var(--accent); color: var(--bg); font-weight: 700; }
.tier-open { border-style: dashed; border-color: var(--line2); background: none; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 6px 24px; }
.faq summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-size: 18px; font-weight: 700; }
.faq details p { margin-bottom: 18px; color: var(--soft); }

/* Blog */
.topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.topic { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line2); border-radius: 999px; font-size: 15px; }
.topic.is-current { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
.blog { padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 48px; }
.posts { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sidebar { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.featured { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); display: flex; flex-direction: column; overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
.featured:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); }
.featured img { display: block; width: 100%; height: 280px; object-fit: cover; border-bottom: 1px solid var(--line); }
.featured-body { padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.featured-title { font-size: clamp(26px, 3.5vw, 32px); font-weight: 700; line-height: 1.15; }
.row { border-bottom: 1px solid var(--line); padding: 24px 0; display: flex; flex-direction: column; gap: 8px; transition: transform .25s ease, color .2s; }
.row:hover { transform: translateX(8px); color: var(--text); }
.row:hover .row-title { color: var(--accent); }
.row-title { font-size: 24px; font-weight: 700; line-height: 1.2; transition: color .2s; }
.box { border: 1px solid var(--line); border-radius: 6px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.box h2 { font-size: 20px; }
.box p { color: var(--soft); font-size: 15px; }
.box-accent { border-color: var(--accent); }
.box .logo { flex: none; height: 72px; font-size: 15px; padding: 12px; border-color: var(--line); }
.pagination { margin-top: 12px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 4px; font-weight: 700; }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* Single post and pages */
.article { padding-top: 72px; padding-bottom: 88px; }
.article-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.article-head h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.02em; }
.article-image { margin: 0 0 40px; }
.article-image img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.entry-content { font-size: 18px; line-height: 1.7; color: #dcdcdc; }
.entry-content > * { margin: 0 0 1.3em; }
.entry-content h2 { font-size: 30px; line-height: 1.2; margin-top: 1.8em; color: var(--text); }
.entry-content h3 { font-size: 23px; line-height: 1.25; margin-top: 1.6em; color: var(--text); }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content code { font-family: var(--mono); font-size: .88em; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.entry-content pre { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px; overflow-x: auto; font-family: var(--mono); font-size: 14px; line-height: 1.6; }
.entry-content pre code { background: none; border: 0; padding: 0; }
.entry-content blockquote { margin-left: 0; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--soft); }
.entry-content img, .entry-content figure { max-width: 100%; border-radius: 6px; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .wp-caption-text { font-size: 14px; color: var(--muted); margin-top: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.after-post { margin-top: 56px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.site-footer .about { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer .about strong { font-size: 20px; }
.site-footer .about span { color: var(--muted); font-size: 15px; }

/* Motion */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes press { 0%, 14%, 100% { transform: translateY(0); } 4%, 9% { transform: translateY(6px); box-shadow: 0 2px 0 -1.5px var(--bg2), 0 2px 0 0 currentColor; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 15%, transparent); } 50% { box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 45%, transparent); } }
@keyframes dash { 50% { border-color: var(--line2); color: var(--text); } }
.btn-glow { animation: glow 3s ease-in-out infinite; }
.rise > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.rise > :nth-child(2) { animation-delay: .08s; }
.rise > :nth-child(3) { animation-delay: .16s; }
.rise > :nth-child(4) { animation-delay: .24s; }
.rise > :nth-child(5) { animation-delay: .32s; }
.hero-art { animation: rise .9s .3s cubic-bezier(.2, .7, .2, 1) both; }
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Comments */
#comments, #respond h3 { font-size: 22px; margin: 56px 0 20px; }
.commentlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.commentlist li { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 20px; color: var(--soft); }
.commentlist .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.commentlist cite { font-style: normal; font-weight: 700; color: var(--text); }
.commentlist a, #respond a { color: var(--accent); }
.comment-meta, .commentmetadata { font-family: var(--mono); font-size: 13px; margin: 6px 0 10px; }
#respond { margin-top: 8px; color: var(--soft); }
#commentform { display: flex; flex-direction: column; gap: 12px; }
#commentform p { margin: 0; }
#commentform input[type="text"], #commentform input[type="email"], #commentform input[type="url"], #commentform textarea { width: 100%; min-height: 46px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line2); border-radius: 4px; color: var(--text); font: inherit; }
#commentform input[type="submit"] { min-height: 46px; padding: 0 22px; border: 0; border-radius: 4px; background: var(--accent); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
