@import url("./scaffold-layout.css");

:root {
  --ink: #101822;
  --indigo: #1a2744;
  --paper: #e8e0d4;
  --persimmon: #d9671c;
  --wood: #3a200c;
  --muted: #cdb69f;
  color-scheme: dark;
  font-family: "Reddit Sans Condensed", "Segoe UI", system-ui, sans-serif;
  color: var(--paper);
  background:
    radial-gradient(ellipse 70% 40% at 20% 0%, rgba(47, 93, 140, 0.22), transparent),
    var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

::selection {
  background: color-mix(in srgb, var(--persimmon) 55%, #000);
  color: var(--paper);
}

a:focus-visible {
  outline: 2px solid var(--persimmon);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1280 / 720;
  overflow: hidden;
  background: #101822;
}

.hero-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  animation: hero-settle 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-settle {
  from {
    opacity: 0.72;
    transform: scale(1.02);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art {
    animation: none;
  }
}

/* Invisible hit targets over painted chrome — no second drawn buttons. */
.hotspot {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  overflow: hidden;
}

.hotspot:hover {
  box-shadow: none;
  background: transparent;
}

.hotspot:focus {
  outline: none;
}

.hotspot:focus-visible {
  outline: 2px solid var(--persimmon);
  outline-offset: 2px;
}

.hotspot-nav {
  position: absolute;
  left: var(--r-nav-links-x);
  top: var(--r-nav-links-y);
  width: var(--r-nav-links-w);
  height: var(--r-nav-links-h);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 0.25rem;
  margin: 0;
  padding: 0 0.5%;
}

.hotspot.nav {
  position: relative;
  left: auto;
  top: auto;
  flex: 1 1 0;
  height: 70%;
  max-width: 28%;
}

.hotspot.brand {
  left: var(--r-brand-mark-x);
  top: calc(var(--r-brand-mark-y) + 1%);
  width: var(--r-brand-mark-w);
  height: calc(var(--r-brand-mark-h) - 1%);
}

/* Tighten to painted pill, not the full measured cell. */
.hotspot.download {
  left: calc(var(--r-download-x) + 1.5%);
  top: calc(var(--r-download-y) + 1.8%);
  width: calc(var(--r-download-w) - 4%);
  height: calc(var(--r-download-h) - 3.5%);
  border-radius: 999px;
}

.hotspot.github {
  left: calc(var(--r-github-btn-x) + 0.4%);
  top: calc(var(--r-github-btn-y) + 2.2%);
  width: calc(var(--r-github-btn-w) - 0.8%);
  height: calc(var(--r-github-btn-h) - 4%);
  border-radius: 0.45rem;
}

.below {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
}

.fold {
  margin: 0 0 2.75rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid color-mix(in srgb, var(--paper) 14%, transparent);
  border-radius: 0.75rem;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--indigo) 35%, transparent),
      color-mix(in srgb, var(--ink) 88%, #1a2744)
    );
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.fold h2 {
  margin: 0 0 0.65rem;
  font-family: Fresca, "Protest Revolution", sans-serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.fold p,
.fold li {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.fold ol {
  margin: 0;
  padding-left: 1.2rem;
}

.fold li + li {
  margin-top: 0.45rem;
}

.fold code {
  font-size: 0.9em;
  color: var(--paper);
}

.closing {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 2.5rem;
}

.download-inline,
.ghost-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.download-inline {
  background: var(--persimmon);
  color: #1a120c;
}

.ghost-inline {
  border: 1px solid color-mix(in srgb, var(--paper) 22%, transparent);
  color: var(--paper);
}

.download-inline:hover {
  filter: brightness(1.06);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--paper) 14%, transparent);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--persimmon);
}

.mobile-lockup {
  display: none;
}

@media (max-width: 820px) {
  .hero {
    aspect-ratio: auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(ellipse 80% 60% at 20% 0%, rgba(47, 93, 140, 0.35), transparent),
      #0d172a;
    padding-top: 1.25rem;
  }

  .hero-art {
    display: none;
  }

  .hotspot-nav,
  .hotspot.github,
  .hotspot.brand {
    display: none;
  }

  .mobile-lockup {
    display: block;
    padding: 1.25rem 1.25rem 0.5rem;
    background: linear-gradient(180deg, #0d172a, #101822);
  }

  .mobile-title {
    margin: 0;
    font-family: Fresca, "Protest Revolution", sans-serif;
    font-size: clamp(2.4rem, 11vw, 3.25rem);
    line-height: 0.95;
    color: var(--paper);
  }

  .mobile-sub {
    margin: 0.75rem 0 0;
    font-family: "Kosugi", "Reddit Sans Condensed", sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--paper) 88%, #fff);
    overflow-wrap: anywhere;
  }

  .hotspot.download {
    position: relative;
    left: auto;
    top: auto;
    width: calc(100% - 2rem);
    height: 3rem;
    margin: 1rem 1rem 1.5rem;
    background: var(--persimmon);
    color: #1a120c;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    border-radius: 999px;
    overflow: visible;
  }
}

/* —— Interior SEO rooms (no noren raster) —— */

.page-interior {
  min-height: 100vh;
}

.site-chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.75rem 1.25rem;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--indigo) 55%, #0d172a),
      color-mix(in srgb, var(--ink) 92%, #1a2744)
    );
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 12%, transparent);
}

.chrome-brand {
  font-family: Fresca, "Protest Revolution", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
}

.chrome-brand:hover {
  color: color-mix(in srgb, var(--paper) 88%, #fff);
}

.chrome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.chrome-actions .download-inline,
.chrome-actions .ghost-inline {
  min-height: 2.75rem;
}

.interior-main {
  padding-top: 1.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.breadcrumb a {
  color: color-mix(in srgb, var(--paper) 78%, var(--muted));
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--paper);
  text-decoration: underline;
}

.room-head {
  margin: 0 0 1.5rem;
}

.room-head h1 {
  margin: 0 0 0.75rem;
  font-family: Fresca, "Protest Revolution", sans-serif;
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--paper);
}

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

.prose {
  margin: 0 0 2.75rem;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2rem 0 0.65rem;
  font-family: Fresca, "Protest Revolution", sans-serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-family: Fresca, "Protest Revolution", sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--paper);
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose a {
  color: color-mix(in srgb, var(--paper) 70%, var(--persimmon));
}

.prose a:hover {
  color: var(--paper);
}

.prose code {
  font-size: 0.9em;
  color: var(--paper);
  word-break: break-word;
}

.prose strong {
  color: color-mix(in srgb, var(--paper) 88%, var(--muted));
  font-weight: 600;
}

.prose blockquote {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid color-mix(in srgb, var(--indigo) 70%, var(--paper));
  background: color-mix(in srgb, var(--indigo) 22%, transparent);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--muted);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.prose th,
.prose td {
  padding: 0.55rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--paper) 14%, transparent);
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}

.prose th {
  color: var(--paper);
  background: color-mix(in srgb, var(--indigo) 40%, transparent);
  font-weight: 600;
}

.prose td code {
  font-size: 0.85em;
}

.related-list {
  margin: 0;
  padding-left: 1.2rem;
}

.related-list li + li {
  margin-top: 0.45rem;
}

.related-list a,
.fold a {
  color: color-mix(in srgb, var(--paper) 70%, var(--persimmon));
}

.faq-item {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid color-mix(in srgb, var(--paper) 12%, transparent);
}

.faq-item:first-of-type {
  margin-top: 0.5rem;
}

.faq-item summary {
  cursor: pointer;
  color: var(--paper);
  font-size: 1.05rem;
  line-height: 1.45;
  list-style-position: outside;
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--persimmon);
  outline-offset: 3px;
}

.faq-item p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

@media (max-width: 820px) {
  .site-chrome {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1rem 1.1rem;
  }

  .chrome-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .chrome-actions .download-inline,
  .chrome-actions .ghost-inline {
    width: 100%;
    min-height: 2.75rem;
    justify-content: center;
  }

  .interior-main {
    padding-top: 1.25rem;
  }
}
