/* =====================================================================
   SatCode homepage — dark theme, bitcoin-orange accent.
   Static page: no frameworks, no webfonts (system stacks render instantly).
   Layout signature: full-bleed section backgrounds with content constrained
   to a centered ~4:3 column (hero + the two panels) on desktop; the conceit
   is dropped below 768px in favour of plain stacked content.
   ===================================================================== */

:root {
  --bg:        #0a0a0a;
  --surface:   #141414;
  --surface-2: #161616;
  --border:    #262626;
  --text:      #f5f5f3;
  --muted:     #a3a19c;
  --accent:    #f7931a;
  --accent-hover: #ffa53c;
  --tick:      rgba(247, 147, 26, 0.42); /* corner marks on the hero frame */

  --font-sans: "Inter", "Geist", system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono",
               Menlo, Consolas, monospace;

  --col-text: 820px;  /* the constrained content column */
  --col-wide: 1120px;
  --header-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #0a0a0a; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 200;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.header-inner {
  max-width: 1200px;
  margin-inline: auto;
  height: var(--header-h);
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.wordmark span { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav > a:not(.btn) {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav > a:not(.btn):hover { color: var(--text); }

@media (max-width: 759px) {
  .site-nav > a:not(.btn) { display: none; }
}

/* ----------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0a0a0a;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 14px 22px;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn-sm { padding: 9px 15px; font-size: 0.875rem; }

.link-arrow {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.link-arrow:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 32px 24px 40px;
  overflow: hidden;
}

/* one restrained radial glow, centered/upper */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(720px 440px at 50% 8%,
              rgba(247, 147, 26, 0.13), transparent 70%);
  pointer-events: none;
}

/* very faint dot grid, masked toward the center of the frame */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 245, 243, 0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(52% 44% at 50% 34%, #000 0%, transparent 100%);
  mask-image: radial-gradient(52% 44% at 50% 34%, #000 0%, transparent 100%);
  pointer-events: none;
}

.hero-frame {
  position: relative;
  z-index: 1;
  max-width: var(--col-text);
  margin-inline: auto;
  padding: 56px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* desktop: the content column becomes a 4:3 frame with corner marks */
@media (min-width: 768px) {
  .hero-frame {
    aspect-ratio: 4 / 3;
    padding: 64px;
    background-image:
      linear-gradient(var(--tick), var(--tick)),
      linear-gradient(var(--tick), var(--tick)),
      linear-gradient(var(--tick), var(--tick)),
      linear-gradient(var(--tick), var(--tick)),
      linear-gradient(var(--tick), var(--tick)),
      linear-gradient(var(--tick), var(--tick)),
      linear-gradient(var(--tick), var(--tick)),
      linear-gradient(var(--tick), var(--tick));
    background-size: 20px 1px, 1px 20px, 20px 1px, 1px 20px,
                     20px 1px, 1px 20px, 20px 1px, 1px 20px;
    background-position: left top, left top, right top, right top,
                         left bottom, left bottom, right bottom, right bottom;
    background-repeat: no-repeat;
  }
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(2.1rem, 1.05rem + 4.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.028em;
}

.lede {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 58ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}

/* ---------------------------------------------------------- sections */

.section { padding: clamp(72px, 10vw, 120px) 24px; }

.container { max-width: var(--col-text); margin-inline: auto; }
.container-wide { max-width: var(--col-wide); margin-inline: auto; }

h2 {
  font-size: clamp(1.55rem, 1.05rem + 1.9vw, 2.1rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin-bottom: 20px;
}

.prose p {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
  max-width: 66ch;
}
.prose p + p { margin-top: 18px; }
.prose p a { color: var(--accent); text-decoration: none; }
.prose p a:hover { text-decoration: underline; text-underline-offset: 3px; }

.em { color: var(--text); font-weight: 500; }

.section-sub {
  color: var(--muted);
  font-size: 0.97rem;
  margin-top: -6px;
}

/* ------------------------------------------------------- how it works */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px 28px;
  margin-top: 44px;
}
@media (min-width: 620px)  { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.step-top svg { color: var(--muted); }
.step h3 {
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.step p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ------------------------------------------------- framed 4:3 panels */

.panel {
  max-width: var(--col-text);
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(28px, 5.5vw, 64px);
}

/* desktop: the panel itself reads as a ~4:3 plate on the full-bleed bg */
@media (min-width: 900px) {
  .panel {
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.props {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 32px;
  margin-top: 30px;
}
@media (min-width: 560px) { .props { grid-template-columns: 1fr 1fr; } }
.props li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 0.96rem;
}
.props li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--accent);
  margin-top: 0.55em;
}

.panel-note {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 60ch;
}

/* ----------------------------------------------------- bounty examples */

.bounty-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}
@media (min-width: 720px) {
  .bounty-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

.bounty-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}
.bounty-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 30ch;
}
.bounty-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}
.sats {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--accent);
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
}
.bounty-cta { margin-top: 32px; }

/* --------------------------------------------------------- for funders */

.lead-in {
  margin-top: 26px;
  font-size: 0.98rem;
  font-weight: 600;
}
.prose .lead-in { color: var(--text); }

.roadmap {
  list-style: none;
  display: grid;
  gap: 13px;
  margin-top: 16px;
}
.roadmap li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.55;
}
.roadmap li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--accent);
  margin-top: 0.55em;
}

.mailto {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}
.mailto:hover { color: var(--accent); }

/* ---------------------------------------------------------------- faq */

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.faq-list summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  content: "+" / "";
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  flex: none;
  transition: transform 0.18s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-body {
  padding: 2px 22px 22px;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.65;
  max-width: 62ch;
}
.faq-body p + p { margin-top: 12px; }

/* visibly-flagged draft placeholders — remove this styling as items resolve */
.open-item {
  display: block;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.open-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 24px 56px;
}
.footer-inner {
  max-width: var(--col-wide);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 36px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}
.footer-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-nav a:hover { color: var(--text); }
.copyright {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
