/* jokamachi.systems — site-specific overrides on top of hugo-theme-booklet.
   Loaded after the theme's stylesheets via layouts/partials/head.html. */

/* ── Equal-width hero stat columns ──
   Theme defaults to flex with content-sized children; we want a 3-column
   grid so each metric occupies the same horizontal slot regardless of
   label length. */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* ── Standalone-page list rendering ──
   The theme styles .chapter p / strong / em as serif but does not style
   list items. Lists therefore inherit the body's monospace, which reads
   wrong on prose pages like /about/, /philosophy/, /pricing/. Restore
   serif for list copy inside chapter-body. */
.chapter-body ul,
.chapter-body ol {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--iron-300);
  max-width: 64ch;
  padding-left: 24px;
  margin: 0 0 16px;
}
.chapter-body li {
  margin-bottom: 8px;
}
.chapter-body li > p {
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 8px;
}

/* ── Blockquote styling ──
   The theme defines no blockquote rules, so they fall through to the
   browser default `margin: 1em 40px`, which makes them stick out
   relative to surrounding paragraphs. Replace with a left-border
   accent and serif body matching the rest of the prose. */
.chapter-body blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--ember);
}
.chapter-body blockquote p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--iron-300);
  font-style: italic;
  margin: 0 0 8px;
  max-width: 64ch;
}
.chapter-body blockquote p:last-child {
  margin-bottom: 0;
}

/* ── Standalone-page image breakout ──
   Standalone pages render inside .page-layout (760px max). Inline images
   on these pages break out of that constraint to span the viewport,
   using margin-inline negative-pull instead of 100vw to avoid the
   scrollbar-width issue on Windows browsers. Chapter pages keep natural
   image sizing so diagrams and screenshots aren't blown up.

   Applied via the body's .hb-page--standalone class set in baseof.html. */
.hb-page--standalone .chapter-body img {
  display: block;
  width: 100vw;
  max-width: none;
  height: auto;
  margin-inline: calc(50% - 50vw);
  margin-block: 40px;
}

/* ── Sign-up form ──
   Static stub form on /signup/. No JS yet — pre-selection by query
   string and conditional fieldsets are wired structurally
   (data-default-plan, data-relevant-when) so a future reactive layer
   can drive them without touching markup. */
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 32px 0 16px;
}
.signup-fieldset {
  border: 1px solid var(--iron-700);
  border-radius: 6px;
  padding: 18px 20px 14px;
  margin: 0;
  background: linear-gradient(180deg, var(--iron-800), var(--iron-900));
}
.signup-fieldset > legend {
  font-family: var(--mono);
  font-size: 12.6px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  padding: 0 8px;
}
.signup-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 12px;
  align-items: start;
  padding: 12px 0;
  cursor: pointer;
  border-bottom: 1px dashed var(--iron-700);
}
.signup-option:last-child {
  border-bottom: 0;
}
.signup-option > input {
  margin-top: 6px;
  accent-color: var(--furnace);
}
.signup-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.signup-option.is-disabled > input {
  cursor: not-allowed;
}
.signup-option-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* Specificity bumped to .signup-fieldset .signup-option-points so these
   rules outrank .chapter-body ul (added earlier for prose lists). */
.signup-fieldset .signup-option-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--serif);
  font-size: 14.4px;
  color: var(--iron-300);
  font-style: normal;
  max-width: none;
}
.signup-fieldset .signup-option-points li {
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
  margin: 0;
}
.signup-fieldset .signup-option-points li::before {
  content: "❯";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--furnace);
  text-shadow: var(--accent-glow);
  font-size: 0.85em;
}

/* Alpine x-cloak — hide elements until Alpine initialises. Prevents a
   flash of all conditional fieldsets being visible during page load. */
[x-cloak] {
  display: none !important;
}

/* ── Topbar nav: glowing menu entry ──
   Menu entries with `params.glow = true` (currently: Sign up) get the
   accent-hue colour and the same OKLCH text-shadow used on the hero
   stat values. Differentiates the priority destination without making
   it a CTA button. */
.topbar-nav a.is-glow {
  color: var(--furnace);
  text-shadow: var(--accent-glow);
}
.topbar-nav a.is-glow:hover {
  color: var(--iron-100);
}
.signup-option-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--iron-100);
}
.signup-option-blurb {
  font-family: var(--serif);
  font-size: 14.4px;
  color: var(--iron-400);
  font-style: italic;
}
.signup-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.signup-field > span {
  font-family: var(--mono);
  font-size: 12.6px;
  letter-spacing: 0.05em;
  color: var(--iron-300);
}
.signup-field > input,
.signup-field > textarea {
  font-family: var(--mono);
  font-size: 14.4px;
  color: var(--iron-100);
  background: var(--iron-900);
  border: 1px solid var(--iron-650);
  border-radius: 4px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.signup-field > input:focus,
.signup-field > textarea:focus {
  border-color: oklch(var(--forge-lch) / 0.55);
}
.signup-note {
  font-family: var(--serif);
  font-size: 14.4px;
  color: var(--iron-500);
  font-style: italic;
  margin: 6px 0 0;
}
.signup-submit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.signup-submit > button {
  font-family: var(--mono);
  font-size: 14.4px;
  letter-spacing: 0.04em;
  padding: 12px 22px;
  border-radius: 5px;
  border: 1px solid oklch(var(--forge-lch) / 0.18);
  background: transparent;
  color: var(--iron-300);
  cursor: not-allowed;
  opacity: 0.65;
}

/* ── Bottom-of-page CTA strip ──
   Rendered by the `bottom-cta` shortcode. Sits below the page's last
   prose with a hairline separator so it reads as a deliberate footer
   for the page rather than another paragraph. */
.bottom-cta {
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--iron-700);
}
.bottom-cta .hero-actions {
  margin-bottom: 0;
  flex-wrap: wrap;
}
