/* ==========================================================================
   corral.css — the /corral/ project page only.

   Loaded ON TOP of site.css and uses its tokens (--bg-card, --accent-copper,
   --font-mono, …) rather than restating any colour. Kept out of site.css on
   purpose: site.css is shared with the hand-authored home page and every
   generated note, and its ?v= cache-buster is referenced from two files, so a
   page-local concern gets a page-local file.
   ========================================================================== */

/* --- Hero ---------------------------------------------------------------- */

.corral-hero {
  padding: 7rem 0 3rem;
  text-align: center;
}

.corral-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.25rem;
}

.corral-standfirst {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 42ch;
  margin: 0 auto 2rem;
  line-height: 1.55;
}

/* The hero screenshot, tilted very slightly so it reads as an object rather
   than a slab. Straightens on hover and for reduced-motion users. */
.corral-shot-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem;
  border-radius: 14px;
  overflow: hidden;
}

.corral-shot-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* --- Prose blocks -------------------------------------------------------- */

.corral-prose {
  max-width: 62ch;
  margin: 0 auto;
}

.corral-prose p {
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  font-size: 1.05rem;
}

.corral-prose p.lead {
  font-size: 1.2rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.corral-prose strong { color: var(--text-primary); font-weight: 600; }

.corral-prose code,
.corral-figure code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

/* --- Feature grid -------------------------------------------------------- */

.corral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.corral-feature {
  padding: 1.75rem;
}

.corral-feature h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.corral-feature p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.6;
}

.corral-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-copper);
  display: block;
  margin-bottom: 0.75rem;
}

/* --- The stack diagram --------------------------------------------------- */

.corral-stack {
  max-width: 720px;
  margin: 2.5rem auto 0;
  padding: 1.75rem;
}

.corral-layer {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.95rem 1.2rem;
  background: var(--bg-alt);
}

.corral-layer + .corral-arrow { margin: 0.55rem 0; }

.corral-layer-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.corral-layer-note {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.corral-layer.is-corral {
  border-color: var(--border-highlight);
  box-shadow: 0 0 0 1px var(--accent-copper-glow);
}

.corral-layer.is-corral .corral-layer-name { color: var(--accent-copper); }

.corral-arrow {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.corral-lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.corral-lane {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-main);
  white-space: nowrap;
}

.corral-lane.is-off {
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.7;
}

/* --- Gallery ------------------------------------------------------------- */

.corral-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.corral-figure {
  margin: 0;
  padding: 0.6rem;
  border-radius: 12px;
}

.corral-figure button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 8px;
}

.corral-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: border-color 0.25s ease;
}

.corral-figure button:hover img,
.corral-figure button:focus-visible img {
  border-color: var(--border-highlight);
}

.corral-figure figcaption {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 0.85rem 0.4rem 0.3rem;
}

.corral-figure figcaption b {
  color: var(--text-secondary);
  font-weight: 600;
}

/* --- Lightbox ------------------------------------------------------------ */

.corral-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: rgba(8, 6, 5, 0.92);
  backdrop-filter: blur(6px);
}

.corral-lightbox[open],
.corral-lightbox.is-open { display: flex; }

.corral-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  object-fit: contain;
}

.corral-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2rem;
  line-height: 1;
  color: #f5eedc;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.corral-lightbox-close:hover { background: rgba(255, 255, 255, 0.1); }

/* --- Honest-limits list -------------------------------------------------- */

.corral-limits {
  list-style: none;
  max-width: 62ch;
  margin: 1.5rem auto 0;
}

.corral-limits li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.corral-limits li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-copper);
  font-family: var(--font-mono);
}

/* --- Facts strip --------------------------------------------------------- */

.corral-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 2.5rem auto 0;
}

.corral-fact {
  padding: 1.1rem 1.25rem;
  text-align: center;
}

.corral-fact .n {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--accent-copper);
  line-height: 1.1;
}

.corral-fact .l {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .corral-hero { padding: 5rem 0 2rem; }
  .corral-feature { padding: 1.35rem; }
  .corral-stack { padding: 1.2rem; }
}
