/* ===========================================================================
   QUIET INSTRUMENT — signature layer
   The structural motifs and motion that separate this from a themed template.
   =========================================================================== */

/* --- Motion primitives ---------------------------------------------------
   The reveal is defined here rather than in JS so the final state is the CSS
   default: if scripts never run, or motion is reduced, content is simply
   present. Nothing here is load-bearing. */
.will-reveal {
  opacity: 1;
  transform: translate3d(0, 14px, 0);
  transition: transform var(--dur-entrance) var(--ease-out);
  will-change: transform;
}

.is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .will-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- The measure rail ----------------------------------------------------
   The recurring structural device: a graduated scale down the left edge of a
   section, carrying its real index in the sequence. It encodes the reader's
   position, so it is only used where the content genuinely is a numbered
   series — never as decoration. Below 1100px there is no margin to hold it,
   so it withdraws entirely rather than crowding the text. */
.rail-section {
  position: relative;
}

.rail-mark {
  position: absolute;
  top: 4px;
  left: -68px;
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  transition: color var(--dur-base) var(--ease-standard);
}

.rail-mark::after {
  width: 26px;
  height: 1px;
  background: currentColor;
  content: '';
  opacity: 0.4;
  transition: width var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-standard);
}

.rail-mark.is-current {
  color: var(--brand);
}

.rail-mark.is-current::after {
  width: 40px;
  opacity: 1;
}

@media (min-width: 1400px) {
  .rail-mark {
    display: flex;
  }
}

/* --- The plate -----------------------------------------------------------
   The instrument body: a petrol slab used for full-bleed bands. It is the
   counterweight to all the porcelain, and the only place the layout goes
   dark in light mode. */
.plate {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 130% at 88% -10%, color-mix(in oklab, var(--accent) 26%, transparent), transparent 68%),
    var(--depth);
  color: var(--on-dark-soft);
}

.plate h2,
.plate h3,
.plate strong {
  color: var(--on-dark);
}

/* A faint engraved graticule, drawn in CSS rather than shipped as an image.
   Two hairline gradients, so it costs nothing and follows the theme. */
.plate::before {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--on-dark) 6%, transparent) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, color-mix(in oklab, var(--on-dark) 5%, transparent) 0 1px, transparent 1px 68px);
  content: '';
  opacity: 0.5;
  pointer-events: none;
}

.plate > * {
  position: relative;
}

/* --- Readouts ------------------------------------------------------------
   Any figure a reader might compare, in the mono voice with tabular figures
   so columns line up and a rolling number never shifts its neighbours. */
.readout {
  display: block;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1;
}

.readout-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plate .readout-label {
  color: var(--on-dark-soft);
  opacity: 0.75;
}

/* --- Link motion ---------------------------------------------------------
   The arrow leads; the text stays put. A 3px move is enough to register as
   response without becoming a bounce. */
.text-link span[aria-hidden],
.job-card > span:last-child {
  transition: transform var(--dur-base) var(--ease-out);
}

.text-link:hover span[aria-hidden],
.job-card:hover > span:last-child {
  transform: translateX(3px);
}

/* Money in Reach public-experience refinements, August 2026 */

.icon-svg {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  background: var(--surface-accent);
  color: var(--link);
}

.icon-svg svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The hero sets in three lines, not four, so the primary action clears the
   fold on a laptop. The measure rule runs the full height of the copy. */
.home-hero {
  position: relative;
  align-items: center;
  min-height: min(84vh, 720px);
  padding-block: clamp(48px, 7vw, 92px);
}

.home-hero-copy {
  position: relative;
  padding-left: clamp(18px, 2.4vw, 34px);
}

.home-hero-copy::before {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand) 0%, color-mix(in oklab, var(--brand) 20%, transparent) 62%, transparent 100%);
  content: '';
}

.home-hero-copy h1 {
  max-width: 13ch;
}

.home-hero-copy .hero-lede {
  max-width: 46ch;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

/* Proof points read as a spec strip — mono, ruled, evenly divided — rather
   than three bulleted claims wrapping unevenly. */
/* A spec strip. Inline flow with hairline separators drawn between items
   rather than on them, so a wrapped line never leaves a rule hanging. */
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 32px 0 0;
  padding: 15px 0 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.02em;
  line-height: 1.4;
  list-style: none;
}

.hero-proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.hero-proof li + li::before {
  width: 1px;
  height: 11px;
  margin-inline: 14px;
  background: var(--border-strong);
  content: "";
}

@media (max-width: 640px) {
  .hero-proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }

  .hero-proof li + li::before {
    display: none;
  }
}

.home-choice-section {
  padding-block: clamp(46px, 5.5vw, 72px);
}

/* Section openings align to the rail rather than centring. Centre-everything
   reads as a template; the left edge is where the measure rule lives, so the
   page has one consistent spine. */
.home-choice-section .section-heading-centered,
.plans-band .section-heading-centered {
  max-width: 46ch;
  margin-inline: 0;
  text-align: left;
}

.home-choice-section .section-heading-centered p,
.plans-band .section-heading-centered p {
  margin-inline: 0;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

.job-grid.job-grid-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.job-card {
  min-height: 116px;
}

.job-card .icon-svg {
  grid-column: 1;
  grid-row: 1;
}

.job-card > div {
  align-self: center;
}

.job-card > span:last-child {
  align-self: center;
}

.resolve-home {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(34px, 6vw, 72px);
  align-items: center;
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 0% 0%, color-mix(in oklab, var(--accent) 13%, transparent), transparent 62%),
    var(--surface);
  box-shadow: var(--shadow-xs);
}

.resolve-home-copy p {
  max-width: 58ch;
}

.resolve-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.resolve-case-card {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.resolve-case-card strong {
  color: var(--heading);
}

.resolve-case-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.market-brief-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
  gap: 24px;
  align-items: start;
}

.market-brief-compact .market-tldr {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  background: var(--surface-accent);
}

.market-brief-compact .market-tldr strong {
  display: block;
  margin-bottom: 7px;
  color: var(--heading);
}

.trust-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.trust-proof-grid a,
.trust-proof-grid div {
  display: block;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.trust-proof-grid a:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-xs);
}

.trust-proof-grid strong,
.trust-proof-grid span {
  display: block;
}

.trust-proof-grid strong {
  color: var(--heading);
}

.trust-proof-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
}

.library-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 18px 0 6px;
}

.library-search input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}

.library-search-status {
  min-height: 1.4em;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.article-standard-note {
  display: flex;
  gap: 7px 14px;
  align-items: center;
  margin: -2px 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  flex-wrap: wrap;
}

.article-standard-note a {
  font-weight: 590;
}

.tool-section {
  margin-top: clamp(30px, 5vw, 52px);
}

.tool-section-head {
  max-width: 720px;
  margin-bottom: 18px;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tool-card-rich {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.tool-card-rich:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-sm);
}

.tool-card-rich h2,
.tool-card-rich h3 {
  margin-bottom: 5px;
  font-size: clamp(1.12rem, 3.6vw, 1.38rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.tool-card-rich p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.tool-card-rich .tool-meta {
  display: block;
  margin-top: 8px;
  color: var(--link);
  font-size: 0.76rem;
  font-weight: 620;
}

.plus-tools-teaser {
  margin-top: 34px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--border-accent);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--navy), var(--navy-soft));
  color: var(--on-dark);
}

.plus-tools-teaser h2,
.plus-tools-teaser h3,
.plus-tools-teaser strong {
  color: var(--on-dark);
}

.plus-tools-teaser p,
.plus-tools-teaser small {
  color: var(--on-dark-soft);
}

.plus-tools-teaser .btn.secondary {
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  color: var(--on-dark);
}

.plan-reassurance {
  display: flex;
  justify-content: center;
  gap: 8px 18px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 580;
  list-style: none;
  flex-wrap: wrap;
}

.plan-reassurance li::before {
  margin-right: 7px;
  color: var(--link);
  content: "✓";
}

.editorial-shell {
  max-width: 900px;
}

.editorial-intro {
  max-width: 720px;
  margin-bottom: 28px;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.editorial-card {
  padding: 22px;
}

.editorial-card h2 {
  font-size: 1.25rem;
}

.editorial-card ul {
  margin-bottom: 0;
}

.resolve-pricing-simple {
  max-width: 620px;
}

@media (max-width: 900px) {
  .job-grid.job-grid-six,
  .trust-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resolve-home,
  .market-brief-compact {
    grid-template-columns: 1fr;
  }

  .resolve-home {
    padding: 26px;
  }
}

@media (max-width: 680px) {
  .home-hero {
    min-height: auto;
  }

  .job-grid.job-grid-six,
  .resolve-case-grid,
  .trust-proof-grid,
  .tool-card-grid,
  .editorial-grid {
    grid-template-columns: 1fr;
  }

  .library-search {
    grid-template-columns: 1fr;
  }

  .resolve-home {
    padding: 22px;
    border-radius: 20px;
  }

  .tool-card-rich {
    gap: 12px;
    padding: 16px;
  }
}
