/* ============================================================
   FOUNDATION
   ============================================================ */
:root {
  --ink:        #0A0A0A;
  --paper:      #F2F2EF;
  --paper-alt:  #E6E6E2;
  --rule:       #0A0A0A;
  --mute:       #666666;
  --whisper:    #999999;
  --ember:      #C4451B;

  --font-mono:  "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter:     clamp(24px, 5vw, 96px);
  --bar-pad-y:  16px;

  --radius:     0;          /* industrial: no rounded corners */
  --transition: 120ms ease-out;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition);
}
a:hover, a:focus-visible { color: var(--ember); }

/* Focus ring: visible, brand-on-brand */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 1000;
}
.skip:focus { left: 8px; top: 8px; }

/* ============================================================
   HEADER / FOOTER BAR
   ============================================================ */
.site-header,
.site-footer { background: var(--paper); }

.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: var(--bar-pad-y) var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.site-header .bar {
  justify-content: space-between;
}
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .bar {
  border: 0;
  font-size: 12px;
  color: var(--mute);
  flex-wrap: wrap;
}

.wordmark {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.dot { color: var(--ember); }

.corner {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.spacer { color: var(--whisper); }

/* ============================================================
   SECTION CHROME
   ============================================================ */
.section {
  padding: clamp(40px, 6vw, 80px) var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.section:last-of-type { border-bottom: 0; }

.rule {
  height: 1px;
  background: var(--rule);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.idx { color: var(--mute); }
.section-title { font-size: 14px; font-weight: 400; margin: 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: clamp(40px, 8vw, 120px);
  padding-bottom: clamp(40px, 8vw, 120px);
}
.wordmark-huge {
  margin: 0 0 24px 0;
  font-weight: 700;
  font-size: clamp(48px, 11vw, 120px);
  letter-spacing: 0.02em;
  line-height: 1;
}
.wordmark-huge .num {
  font-style: italic;
  font-size: 0.86em;
  color: var(--ember);
  letter-spacing: 0;
}
.wordmark .num {
  font-style: italic;
  font-size: 0.92em;
  color: var(--ember);
  letter-spacing: 0;
}
.hero-meta {
  margin: 0 0 32px 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero-sub {
  margin: 0 0 32px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  white-space: pre-wrap;
}
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.dot-ember {
  width: 8px;
  height: 8px;
  background: var(--ember);
  display: inline-block;
}

/* ============================================================
   APPS
   ============================================================ */
.app-card {
  border: 1px solid var(--rule);
  padding: 24px;
  margin: 0 0 16px 0;
  background: var(--paper);
}
.app-card--empty {
  background: transparent;
  border-style: dashed;
  color: var(--whisper);
}
.app-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}
.app-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.app-link {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
}
.app-tag {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: var(--mute);
}
.app-blurb {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  max-width: 56ch;
}

/* ============================================================
   PROSE
   ============================================================ */
.prose {
  max-width: 64ch;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px 0;
}
.prose strong { font-weight: 700; }
.mail {
  /* Reset button defaults so it visually inherits from the surrounding prose.
     Looks like the original <a> link, behaves like a button. */
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 120ms ease-out;
}
.mail:hover,
.mail:focus-visible { color: var(--ember); }

/* ============================================================
   TOAST (clipboard feedback)
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  max-width: calc(100vw - 48px);
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 767px) {
  .toast { bottom: 16px; padding: 10px 14px; font-size: 11px; }
}


.socials {
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.socials a { text-decoration: none; }
.socials a:hover { text-decoration: underline; }

/* ============================================================
   LEGAL
   ============================================================ */
.legal-list {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 32px;
  row-gap: 8px;
  font-size: 13px;
  max-width: 64ch;
}
.legal-list dt {
  color: var(--mute);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  align-self: baseline;
}
.legal-list dd { margin: 0; }

/* ============================================================
   THE BET (stack footnote + colophon)
   ============================================================ */
.prose-stack {
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.1em;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.bar-meta {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.1em;
  border-bottom: 0;
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 1023px)
   ============================================================ */
@media (max-width: 1023px) {
  :root { --gutter: 32px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 767px)
   ============================================================ */
@media (max-width: 767px) {
  :root { --gutter: 24px; }

  .nav { font-size: 11px; gap: 10px; }
  .corner { display: none; }
  .hero-sub { font-size: 13px; }
  .section-title { font-size: 13px; }
  .legal-list { grid-template-columns: 1fr; row-gap: 4px; }
}
