/**
 * renderedconsulting.com/tmsm: "A first read for Chamber members" (views/first-read*.ejs).
 * Loaded on that page only. It sits in the Consulting site's own room: the plaster
 * wall, the serif headline, the gold. One column, left aligned, held to a reading
 * width inside the site's content column. The one loud thing on any of these
 * screens is the address shown back after sending.
 * Inputs are never under 16px (iOS zooms a smaller one).
 */

/* A reading column, centered: narrower than the site's 880px content column, which would run
   these lines past a hundred characters. */
.first-read .container-content { position: relative; max-width: calc(42rem + 2 * var(--space-lg)); }

.first-read a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.first-read a:hover { text-decoration-thickness: 2px; }
.first-read a:focus-visible,
.first-read button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }

/* ── The top ─────────────────────────────────────────────────────────────── */

/* Who the page is for. The chamber's name is the thing a member looks for first, so it is set
   large enough to read at a glance and marked with the site's gold, and still well under the
   headline. */
.fr-for { margin: 0 0 0.5rem; line-height: 1.3; }
/* Whose offer it is, in the same small gold as "For members of the", so the two lines bracket the
   chamber's name: for its members, from Rendered. */
.fr-from { margin: 0 0 var(--space-lg); color: var(--color-accent); font-size: 1rem; font-weight: 600; line-height: 1.3; text-wrap: balance; }   /* on a narrow phone, never one word alone */
.fr-for-lead { display: block; margin-bottom: 0.3rem; color: var(--color-accent); font-size: 1rem; font-weight: 600; }
.fr-for-name {
  display: block;
  padding-left: 0.8rem;
  border-left: 3px solid var(--r-gold);
  font-size: clamp(1.3rem, 4.8vw, 1.5rem);   /* 1.5rem keeps it on one line in the full column */
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-wrap: balance;
}

.first-read h1 {
  margin: 0 0 var(--space-lg);
  font-size: clamp(2.25rem, 7vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.fr-lead {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.15rem, 3.4vw, 1.3rem);
  line-height: 1.5;
  color: var(--color-text);
}

/* What Rendered does, in one sentence, in the steps' own size. Under the headline it sits a little
   closer than the steps do, so it reads as the headline's second line. */
.fr-what { margin: 0 0 var(--space-lg); max-width: 38rem; font-size: 1.0625rem; line-height: 1.5; color: var(--color-text); text-wrap: pretty; }
.fr-what strong { font-weight: 700; }
.fr-top h1 + .fr-what { margin-top: calc(var(--space-md) - var(--space-lg)); }

.fr-after { color: var(--color-text-muted); margin: var(--space-lg) 0 0; }

/* How it works, in the order it happens: three short lines to take in at a glance. The numbers are
   the list's own markers (read out once, by every screen reader), set in the headline's serif and
   the site's gold. */
.fr-steps {
  margin: 0;
  padding: 0 0 0 1.45rem;   /* the numbers start at the column's left edge, under the headline */
  max-width: 38rem;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--color-text);
}
.fr-steps li { margin: 0; padding-left: 0.4rem; text-wrap: pretty; }   /* no one-word last line */
.fr-steps li + li { margin-top: 0.9rem; }
.fr-steps li::marker { font-family: var(--font-heading); font-size: 1.2em; font-weight: 700; color: var(--color-accent); }
.fr-steps strong { font-weight: 700; }

/* For a member who is ready: straight to the form. */
.fr-jump { margin: var(--space-lg) 0 0; font-size: 1.0625rem; color: var(--color-text-muted); }
.fr-jump a { font-weight: 600; }

/* ── The film, and who reads it ──────────────────────────────────────────── */

.fr-meet {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
}
@media (min-width: 640px) { .fr-meet { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; } }

/* On a phone the film fills the column (one screen tall at most); on wider single-column screens it
   stops at 24rem and sits centered; beside the About block it takes its own column. */
.fr-film { margin: 0 auto; width: 100%; max-width: 24rem; }
@media (min-width: 640px) { .fr-film { margin: 0; max-width: none; } }
.fr-film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  background: var(--r-black);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}
/* The film's own stop button, shown by the script while it plays the film without the browser's
   controls. Small, in a corner clear of the titles and the mark; white on a dark disc so it reads
   on any frame. */
.fr-film-frame { position: relative; }
.fr-film video:not([controls]) { cursor: pointer; }   /* a tap brings the controls back */
.fr-film-pause {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 10, 11, 0.55);
  color: #fff;
  cursor: pointer;
}
.fr-film-pause[hidden] { display: none; }
.fr-film-pause:hover { background: rgba(10, 10, 11, 0.78); }
.first-read .fr-film-pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 50%; }
.fr-film-pause svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }

.fr-film figcaption { margin: var(--space-sm) 0 0; font-size: 0.9375rem; line-height: 1.4; color: var(--color-text-muted); }
.fr-film-words { margin-top: var(--space-xs); font-size: 0.9375rem; line-height: 1.55; color: var(--color-text-muted); }
.fr-film-words summary { cursor: pointer; color: var(--color-accent); font-weight: 600; padding: 0.35rem 0; }
.fr-film-words summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }
.fr-film-words p { margin: var(--space-xs) 0 0; }

.fr-who-head { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); }
.fr-who-photo { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; flex: none; box-shadow: var(--shadow-sm); }
.first-read .fr-who-head h2 { margin: 0; }
.fr-who p { margin: 0 0 var(--space-md); font-size: 1.0625rem; line-height: 1.6; color: var(--color-text-muted); }
.fr-who p:last-child { margin-bottom: 0; }

/* The sample read: small enough to be a picture of a page, with the page itself one tap away. */
.fr-sample { margin: var(--space-lg) 0 0; max-width: 11rem; }
.fr-sample a { display: block; border-radius: 4px; }
.fr-sample img { display: block; width: 100%; height: auto; border: 1px solid var(--color-border); border-radius: 4px; box-shadow: var(--shadow-md); background: #fff; }
.fr-sample figcaption { margin: var(--space-sm) 0 0; font-size: 0.875rem; line-height: 1.4; color: var(--color-text-muted); }

/* ── What comes back: the sample read ────────────────────────────────────── */

/* On a phone the words sit over the picture. From 640px the words take the film's column on the
   left and the picture starts where the About block's words do, so the page keeps its two edges. */
.fr-back {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
}
.fr-back .fr-sample { margin-top: 0; }

/* Small labels, not headlines: the body face, so the page has one serif line (the h1). */
.first-read h2 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--color-text);
}

.fr-back p,
.fr-about p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.fr-about { margin-top: var(--space-xl); }

@media (min-width: 640px) {
  .fr-back { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
  .fr-about { max-width: 34rem; }
}

/* ── The form ────────────────────────────────────────────────────────────── */

.fr-form {
  margin-top: var(--space-2xl);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-bg);
  box-shadow: var(--shadow-md);
}
.first-read--status .fr-form { margin-top: var(--space-xl); }
@media (min-width: 640px) { .fr-form { padding: var(--space-2xl) var(--space-2xl) var(--space-xl); } }

.fr-field { margin: 0 0 var(--space-lg); padding: 0; border: 0; min-width: 0; }

.fr-field > label,
.fr-kinds > legend {
  display: block;
  margin: 0 0 var(--space-sm);
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
}

.first-read .form-input,
.first-read .form-textarea {
  font-size: 1.0625rem;
  line-height: 1.4;
  padding: 0.8rem 0.9rem;
  border-color: var(--color-text-muted);
  border-radius: 6px;
  font-family: inherit;
}
.first-read .form-input:focus,
.first-read .form-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--r-gold) 30%, transparent);
}
.first-read [aria-invalid="true"] { border-color: var(--color-error); box-shadow: 0 0 0 1px var(--color-error); }
.first-read .fr-goal { min-height: 5.5rem; }

.fr-hint { margin: var(--space-sm) 0 0; font-size: 0.9375rem; line-height: 1.4; color: var(--color-text-muted); }
.fr-mean { margin: var(--space-sm) 0 0; font-size: 1rem; line-height: 1.4; color: var(--color-text); }

/* What should Rendered read? Six choices, all in view; the picked one is filled with the
   site's bright gold under black, the same pair as its primary button (about 8:1). */
.fr-kind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
@media (min-width: 560px) { .fr-kind-grid { grid-template-columns: 1fr 1fr 1fr; } }

.fr-kind { position: relative; display: block; margin: 0; cursor: pointer; }
.fr-kind input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fr-kind span {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--color-text-muted);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text);
  background: var(--color-bg);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.fr-kind input:hover + span { border-color: var(--r-gold-dark); }
.fr-kind input:checked + span { background: var(--r-gold); border-color: var(--r-gold-dark); color: var(--r-black); font-weight: 600; }
.fr-kind input:focus-visible + span { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* The file picker: the browser's own control, given room to be tapped. */
.fr-file {
  display: block;
  width: 100%;
  padding: 0.7rem;
  border: 1px dashed var(--color-text-muted);
  border-radius: 6px;
  font: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
}
.fr-file::file-selector-button {
  margin-right: 0.9rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--color-text);
  border-radius: 5px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.fr-file:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.fr-agree { margin: var(--space-lg) 0 var(--space-md); font-size: 0.9375rem; line-height: 1.45; color: var(--color-text-muted); }

.first-read .fr-send {
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.9rem 2.25rem;
  font-size: 1.0625rem;
  border: 1px solid var(--r-gold-dark);
  border-radius: 6px;
}
.first-read .fr-send:disabled { opacity: 0.55; cursor: progress; }
@media (max-width: 559px) { .first-read .fr-send { width: 100%; } }

.fr-status { min-height: 1.5rem; margin: var(--space-md) 0 0; font-size: 1rem; color: var(--color-text-muted); }
.fr-status:empty { min-height: 0; margin: 0; }
.fr-call { margin: var(--space-md) 0 0; font-size: 1rem; line-height: 1.45; color: var(--color-text-muted); }
.fr-call a { font-weight: 600; white-space: nowrap; }

.fr-problem {
  margin: 0 0 var(--space-lg);
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--color-error);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--color-error) 9%, transparent);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--color-text);
}
.fr-problem:focus { outline: none; }
.fr-problem[hidden] { display: none; }

/* Off screen, not display:none (some scripts skip a hidden field); out of the tab order in the markup. */
.fr-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* A button that reads as part of a sentence. */
.fr-linkish {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.fr-linkish:hover { text-decoration-thickness: 2px; }

/* ── Recent work nearby ──────────────────────────────────────────────────── */

.fr-work { margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-border)); }
.first-read .fr-work h2 { margin-bottom: var(--space-md); }
.fr-work-row { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg) var(--space-md); margin: 0; padding: 0; }
@media (min-width: 700px) { .fr-work-row { grid-template-columns: repeat(4, 1fr); } }
.first-read .fr-work-row li { margin: 0; padding: 0; min-width: 0; }
.fr-work-row img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-bg-alt); }
.fr-work-name { display: block; margin-top: var(--space-sm); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--color-text); }
.fr-work-place { display: block; margin-top: 2px; font-size: 0.875rem; line-height: 1.35; color: var(--color-text-muted); }

.fr-quote { margin: var(--space-xl) 0 0; padding-left: var(--space-md); border-left: 3px solid var(--r-gold); }
.fr-quote blockquote { margin: 0; }
.fr-quote blockquote p { margin: 0; font-family: var(--font-heading); font-size: 1.125rem; line-height: 1.5; color: var(--color-text); }
.fr-quote figcaption { margin-top: var(--space-sm); font-size: 0.9375rem; line-height: 1.45; color: var(--color-text-muted); }
.fr-quote cite { font-style: normal; font-weight: 600; color: var(--color-text); }
.fr-work-more { margin: var(--space-lg) 0 0; font-size: 1rem; }
.fr-work-more a { font-weight: 600; }

/* ── Fine print ──────────────────────────────────────────────────────────── */

.fr-fine {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  scroll-margin-top: var(--space-xl);
}
.fr-fine p { margin: 0 0 var(--space-md); font-size: 0.9375rem; line-height: 1.6; color: var(--color-text-muted); }

/* ── After sending ───────────────────────────────────────────────────────── */

.first-read--status .fr-lead { margin-bottom: var(--space-sm); }

.fr-address {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.fr-note { margin: var(--space-lg) 0 0; padding: 0.75rem 1rem; border-left: 3px solid var(--r-gold); background: var(--color-bg-alt); font-size: 1rem; line-height: 1.45; }
.fr-note--problem { border-left-color: var(--color-error); }

.fr-next { margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-border)); }
.fr-next p { margin: 0 0 var(--space-md); font-size: 1.0625rem; line-height: 1.5; color: var(--color-text-muted); }
.fr-next a, .fr-next .fr-linkish { font-weight: 600; }
.fr-inline { margin: 0; }

.fr-quiet { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-xl); margin: var(--space-xl) 0 0; font-size: 1rem; }

/* ── A closer look ───────────────────────────────────────────────────────── */

.fr-zoom { display: block; cursor: zoom-in; border-radius: 6px; }
.first-read a.fr-zoom:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* The page behind stays put while the lightbox is open. */
html:has(.fr-lightbox[open]) { overflow: hidden; }

.fr-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(10, 10, 11, 0.94);
  color: #fafafa;
}
.fr-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.fr-lightbox::backdrop { background: rgba(10, 10, 11, 0.6); }

.fr-lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); }
.fr-lightbox-bar form { margin: 0; }
.fr-lightbox-step, .fr-lightbox-tools { display: flex; align-items: center; gap: var(--space-sm); }
.fr-lightbox-step[hidden] { display: none; }
.fr-lightbox-tools { margin-left: auto; }
.first-read .fr-lightbox-step button { min-width: 2.75rem; padding: 0.25rem 0.5rem; font-size: 1.6rem; line-height: 1; }
.fr-lightbox-count { min-width: 2.75rem; text-align: center; font-size: 0.9375rem; font-variant-numeric: tabular-nums; color: rgba(250, 250, 250, 0.85); }
.first-read .fr-lightbox-bar button {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(250, 250, 250, 0.55);
  border-radius: 6px;
  background: transparent;
  color: #fafafa;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.first-read .fr-lightbox-bar .fr-lightbox-close { background: var(--r-gold); border-color: var(--r-gold); color: var(--r-black); }
.first-read .fr-lightbox-bar button:focus-visible { outline: 2px solid #fafafa; outline-offset: 2px; }

.fr-lightbox-stage { overflow: auto; overscroll-behavior: contain; display: grid; place-items: center; padding: 0 var(--space-md); cursor: zoom-out; }
.fr-lightbox-stage:focus-visible { outline: 2px solid #fafafa; outline-offset: -4px; }
.fr-lightbox-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; border-radius: 4px; cursor: zoom-in; }
/* A page is read top to bottom: it fits the width and scrolls, never shrunk to fit the height. */
.fr-lightbox[data-kind="page"] .fr-lightbox-stage { place-items: start center; }
.fr-lightbox[data-kind="page"] .fr-lightbox-stage img { max-height: none; width: min(100%, 51rem); }
/* Full size: the page at the size it was made (51rem), a picture at up to 64rem; pan to read. */
.fr-lightbox-stage.is-full { place-items: start; }
.fr-lightbox-stage.is-full img { max-width: none; max-height: none; width: 64rem; cursor: zoom-out; }
.fr-lightbox[data-kind="page"] .fr-lightbox-stage.is-full img { width: 51rem; }

.fr-lightbox-caption { margin: 0; padding: var(--space-sm) var(--space-md) var(--space-md); font-size: 0.9375rem; line-height: 1.4; text-align: center; color: rgba(250, 250, 250, 0.85); }
