/* wall.foundation — Web3 / TON hub
 * Slightly more "official" tone than wall.app — uses same tokens but with
 * tighter typography and no gradient title.
 */

:root {
  --bg: #0A0A0F;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-dim: rgba(255, 255, 255, 0.40);
  --accent: #4FC3F7;
  --accent-2: #00BCD4;
  --accent-grad: linear-gradient(135deg, #4FC3F7 0%, #00BCD4 100%);
  --ton-blue: #0098EA;
  --max-w: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background:
    radial-gradient(800px 400px at 90% -100px, rgba(0, 152, 234, 0.12), transparent 60%),
    radial-gradient(600px 300px at 10% 200px, rgba(79, 195, 247, 0.06), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
/* Brand mark — real Wall 7-brick logo, not the placeholder "W" text.
   Coordinates match LOGO_BRICKS in sites/_tools/generate-og-images.py
   (programmatic recreation of wall_logo_light.svg) so the HTML brand
   mark and OG share-preview brand mark are pixel-identical at proportion.
   Color: var(--accent) cyan #4FC3F7 — wall-foundation per-host accent. */
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  position: relative;
  font-size: 0; /* hide the "W" placeholder text */
  display: inline-block;
}
.brand-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 135'><g fill='%234FC3F7'><rect x='0' y='0' width='60' height='35' rx='6'/><rect x='75' y='0' width='75' height='35' rx='6'/><rect x='0' y='50' width='30' height='35' rx='6'/><rect x='45' y='50' width='60' height='35' rx='6'/><rect x='120' y='50' width='30' height='35' rx='6'/><rect x='0' y='100' width='75' height='35' rx='6'/><rect x='90' y='100' width='60' height='35' rx='6'/></g></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.brand-tag {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  margin-left: 6px;
}
.header-nav { display: flex; gap: 22px; font-size: 14px; align-items: center; }
.header-nav a { color: var(--text-muted); }
.header-nav a:hover { color: var(--text); text-decoration: none; }
.header-nav .nav-cta {
  background: var(--accent-grad);
  color: var(--bg) !important;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
}

/* OG-card editorial decorations — left accent stripe + bleeding right brick.
   Two delivery vehicles:

   1. .hero        — used on index/chain-posts/ton-tips. Hero handles its
                     own padding (64px 0 36px) so we set decorations + layout
                     in one rule.

   2. .page-hero   — additive class for inline-styled hero blocks on 7 other
                     foundation pages (founder, team, transparency, stats,
                     economics, roadmap, tonconnect). Those pages already have
                     their own padding via .section parent — this class adds
                     ONLY the decorative layer without touching layout.

   Both .hero::before/::after and .page-hero::before/::after share the
   same coordinates because they describe the same visual identity. */
.page-hero {
  position: relative;
  isolation: isolate;
  padding-left: clamp(20px, 5vw, 56px);
}
.page-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: clamp(20px, 4vw, 40px);
  bottom: clamp(20px, 4vw, 40px);
  width: 6px;
  background: var(--accent-grad);
  border-radius: 3px;
  z-index: -1;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 342px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 135'><g fill='%23ffffff' opacity='0.08'><rect x='0' y='0' width='60' height='35' rx='6'/><rect x='75' y='0' width='75' height='35' rx='6'/><rect x='0' y='50' width='30' height='35' rx='6'/><rect x='45' y='50' width='60' height='35' rx='6'/><rect x='120' y='50' width='30' height='35' rx='6'/><rect x='0' y='100' width='75' height='35' rx='6'/><rect x='90' y='100' width='60' height='35' rx='6'/></g></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: -1;
}
@media (max-width: 720px) {
  .page-hero { padding-left: 16px; }
  .page-hero::after { display: none; }
}

/* Hero — OG-card editorial design language ported to HTML
   - 6px left accent stripe (matches OG card's signature edge)
   - 380px brick mark bleeding off the right at 8% alpha (OG card decoration)
   - Hidden on ≤720px viewports so narrow widths stay readable */
.hero {
  padding: 64px 0 36px;
  position: relative;
  isolation: isolate;
  padding-left: clamp(20px, 5vw, 56px);
}
.hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: clamp(20px, 4vw, 40px);
  bottom: clamp(20px, 4vw, 40px);
  width: 6px;
  background: var(--accent-grad);
  border-radius: 3px;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 342px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 135'><g fill='%23ffffff' opacity='0.08'><rect x='0' y='0' width='60' height='35' rx='6'/><rect x='75' y='0' width='75' height='35' rx='6'/><rect x='0' y='50' width='30' height='35' rx='6'/><rect x='45' y='50' width='60' height='35' rx='6'/><rect x='120' y='50' width='30' height='35' rx='6'/><rect x='0' y='100' width='75' height='35' rx='6'/><rect x='90' y='100' width='60' height='35' rx='6'/></g></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: -1;
}
@media (max-width: 720px) {
  .hero { padding-left: 16px; }
  .hero::after { display: none; }
}
.hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ton-blue);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 760px;
}
.hero p {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0;
}

/* Sections */
.section {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}
.section h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.section .lede {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 0 22px;
  max-width: 700px;
}
.section p { margin: 0 0 14px; }
.section ul { padding-left: 20px; color: rgba(255, 255, 255, 0.85); }
.section ul li { margin-bottom: 8px; }

/* Stat row */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 20px 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.stat-num {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--accent);
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding: 12px 0;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
}

/* Inline link list */
.linklist { list-style: none; padding: 0; margin: 0; }
.linklist li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.linklist li:last-child { border-bottom: none; }
.linklist a { display: block; }
.linklist .name { font-weight: 600; }
.linklist .desc { color: var(--text-muted); font-size: 14px; margin-top: 2px; }

/* CTA */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0 0;
}
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent-grad);
  color: var(--bg);
  border-color: transparent;
}
.btn-primary:hover { opacity: 0.92; }
.btn-secondary {
  color: var(--text);
  background: var(--surface);
}
.btn-secondary:hover { background: var(--surface-hover); }

/* Breadcrumbs */
.breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 28px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }

/* Article page */
.article-hero { padding: 48px 0 8px; }
.article-hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; line-height: 1.1; }
.article-hero .lede { font-size: 18px; color: var(--text-muted); margin: 0; max-width: 680px; }

/* FAQ accordion */
.faq { margin: 16px 0; }
.faq details {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding-top: 10px; color: var(--text-muted); font-size: 14.5px; }
.faq .answer p { margin: 0 0 8px; }
.faq .answer p:last-child { margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 60px;
  font-size: 14px;
  color: var(--text-muted);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: center;
}
.footer-links a { color: var(--text-muted); margin-right: 18px; }
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* Mobile */
@media (max-width: 640px) {
  .hero { padding: 44px 0 28px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 17px; }
  .section h2 { font-size: 24px; }
  .container { padding: 0 18px; }
  .header-nav { gap: 14px; }
}
