/* Listing Staging - public marketing site.
 *
 * Deliberately not the app's stylesheet: this page is a normal browser document,
 * signed out, indexable, and served straight off nginx. No safe-area insets, no
 * standalone-mode compensation, no imported font - the app under web/src/ owns
 * all of that, and importing any of it here is how the two surfaces converge.
 *
 * The type stack is system serif + system sans on purpose. A marketing page that
 * blocks its own largest paint on a third-party font request is slower than one
 * that does not, and Palatino/Iowan ships on the machines listing agents use.
 */

:root {
  --preservation: #0b5948;
  --deep-room: #19362e;
  --archival: #f7f8f4;
  --paper: #ffffff;
  --graphite: #17211d;
  --muted: #56635d;
  --rule: #cbd4cf;
  --focus: #2f8b73;

  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --utility: ui-monospace, "SFMono-Regular", Consolas, monospace;

  --measure: 64ch;
  --page: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--archival);
  color: var(--graphite);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--preservation); }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  padding: 0.75rem 1rem;
  z-index: 20;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* --- shared type ------------------------------------------------------- */

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--utility);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--preservation);
}

h1, h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--graphite);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 4.2vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.75rem); }

.lede, .section-lede {
  max-width: var(--measure);
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
}

/* --- header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem var(--gutter);
  background: var(--archival);
  border-bottom: 1px solid var(--rule);
}

.site-wordmark {
  font-family: var(--display);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--graphite);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.desktop-link {
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
}
.desktop-link:hover { color: var(--graphite); }

/* --- CTA --------------------------------------------------------------- */

.cta {
  /* inline-flex with a 44px floor so every CTA clears the minimum touch target
   * at every width, rather than only where the font size happens to push it there */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--preservation);
  color: var(--paper);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.875rem 1.5rem;
  border-radius: 3px;
  transition: background 140ms ease;
}
.cta:hover { background: var(--deep-room); }

.cta-small { padding: 0.625rem 1.05rem; font-size: 0.9375rem; }

.cta-invert { background: var(--archival); color: var(--deep-room); }
.cta-invert:hover { background: var(--paper); }

/* --- layout blocks ----------------------------------------------------- */

.hero,
.comparison,
.proof-strip,
.content-section,
.footer-inner {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.hero h1 { max-width: 18ch; }
.hero .lede { margin: 1.25rem 0 0; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.hero-meta {
  font-family: var(--utility);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* --- the comparator: the page's one flourish --------------------------- */

.plate {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.5rem;
}

.comparison-frame {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  line-height: 0;
  touch-action: pan-y;
}

.comparison-frame > img { width: 100%; }

.comparison-before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pos);
  overflow: hidden;
}

/* height:100% + width:auto reproduces the base image's rendered size exactly,
 * so the clipped layer reveals the original rather than squashing it as the
 * layer narrows. max-width:none defeats the img reset above. */
.comparison-before img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
}

.comparison-label {
  position: absolute;
  bottom: 0.75rem;
  font-family: var(--utility);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  border-radius: 2px;
  background: rgb(23 33 29 / 0.72);
  color: #fff;
  pointer-events: none;
}
.comparison-label-before { left: 0.75rem; }
.comparison-label-after { right: 0.75rem; }

/* The seam and its grip are drawn here and positioned from the same --pos the
 * clip uses, so they can never disagree with the edge they are marking. The
 * range input above stays the real control, which is what keeps arrow keys,
 * Home/End and assistive technology working for free. */
.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgb(23 33 29 / 0.25);
  pointer-events: none;
}
.comparison-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.25rem;
  height: 2.25rem;
  transform: translate(-50%, -50%);
  border-radius: 3px;
  border: 1px solid var(--preservation);
  box-shadow: 0 2px 10px rgb(23 33 29 / 0.28);
  /* two hairline bars, so the grip reads as something to take hold of */
  background:
    linear-gradient(var(--preservation), var(--preservation)) 38% 50% / 1px 0.8rem no-repeat,
    linear-gradient(var(--preservation), var(--preservation)) 62% 50% / 1px 0.8rem no-repeat,
    var(--paper);
}

.comparison-frame input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: ew-resize;
}
.comparison-frame input[type="range"]::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}
.comparison-frame input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: 0;
  cursor: ew-resize;
}
.comparison-frame input[type="range"]::-moz-range-track {
  height: 100%;
  background: transparent;
}
.comparison-frame input[type="range"]::-moz-range-thumb {
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: 0;
  cursor: ew-resize;
}

.plate-caption {
  margin: 0.875rem 0.25rem 0.5rem;
  max-width: var(--measure);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

/* --- three facts ------------------------------------------------------- */

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* the section below supplies the space under it */
  margin-block: clamp(2.5rem, 6vw, 4rem) 0;
}

.proof-strip p {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 1.5rem clamp(1rem, 3vw, 2rem);
  /* the rules live on the CELLS, not the padded container: on the container the
   * border box includes the page gutter, so the strip's top and bottom rules
   * would start a gutter's width left of every other line of text on the page.
   * Collinear cell borders read as one continuous rule. */
  border-block: 1px solid var(--rule);
}

/* The dividers are cell borders rather than a background showing through a
 * 1px grid gap: the container carries the page gutter, so a background would
 * also paint the gutter and hang a grey sliver off each end of the strip. */
.proof-strip p:first-child { padding-left: 0; }
.proof-strip p:last-child { padding-right: 0; }
.proof-strip p + p { border-left: 1px solid var(--rule); }

.proof-strip span {
  font-family: var(--utility);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.proof-strip strong {
  font-family: var(--display);
  font-size: clamp(1.125rem, 0.9rem + 1vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- content sections -------------------------------------------------- */

.content-section { padding-block: var(--section-y); }
.content-section > h2 { max-width: 20ch; }
.content-section > .section-lede { margin: 1.25rem 0 0; }

/* --- how it works ------------------------------------------------------ */

.steps {
  counter-reset: step;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 2.75rem);
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--utility);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--preservation);
}

.steps strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.steps span { color: var(--muted); }

/* --- results ----------------------------------------------------------- */

.results {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.result-pair {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.5rem;
}

.result-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.result-images > div { position: relative; line-height: 0; }
.result-images img { width: 100%; border-radius: 2px; }

.result-images span {
  position: absolute;
  left: 0.625rem;
  bottom: 0.625rem;
  font-family: var(--utility);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  border-radius: 2px;
  background: rgb(23 33 29 / 0.72);
  color: #fff;
}

.result-pair figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.85rem;
  margin: 0.875rem 0.25rem 0.5rem;
  max-width: var(--measure);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

/* The provenance note sits under the section lede, quieter than it but not
   hidden: saying the rooms are demonstrations only counts if it is legible. */
.demo-note {
  font-size: 0.9375rem;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
  margin-top: 1rem;
}

.held-label {
  flex: none;
  font-family: var(--utility);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--preservation);
}

/* --- pricing ----------------------------------------------------------- */

.pricing { border-top: 1px solid var(--rule); }
.pricing .price { font-size: 1.35em; }
.pricing .cta { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

/* --- boundaries: the page closes dark ---------------------------------- */

/* Full-bleed dark band, page-column content. The band needs to reach both edges,
 * so the width limit moves to an inner wrapper rather than onto the children -
 * applied per child, each one centres its own measure and the eyebrow, heading
 * and paragraph all start at different left edges. */
.boundaries {
  max-width: none;
  background: var(--deep-room);
  color: var(--archival);
  padding-inline: 0;
}

.boundaries-inner {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.boundaries .eyebrow { color: #8fc4b2; }

.boundaries h2 {
  color: var(--archival);
  max-width: 20ch;
}

.boundaries p {
  max-width: var(--measure);
  margin: 1.25rem 0 0;
  color: #c3d3cc;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
}

/* --- footer ------------------------------------------------------------ */

footer {
  background: var(--deep-room);
  color: var(--archival);
  border-top: 1px solid rgb(247 248 244 / 0.16);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding-block: clamp(2rem, 4vw, 3rem);
}

.footer-mark {
  font-family: var(--display);
  font-size: 1.1875rem;
  font-weight: 600;
}

.footer-note {
  flex: 1 1 22ch;
  margin: 0;
  max-width: 46ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #a9beb6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a:not(.cta) {
  color: #c3d3cc;
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer-links a:not(.cta):hover { color: var(--archival); }

/* --- legal pages ------------------------------------------------------- */

.legal {
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}

.legal h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.legal h2 { font-size: clamp(1.25rem, 1.1rem + 0.9vw, 1.5rem); margin-top: 2.5rem; }
.legal p, .legal li { max-width: var(--measure); color: var(--muted); }
.legal ul { padding-left: 1.15rem; }
.legal li { margin-bottom: 0.5rem; }
.legal .updated {
  font-family: var(--utility);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--preservation);
}

/* --- narrow screens ---------------------------------------------------- */

@media (max-width: 860px) {
  .result-images { grid-template-columns: 1fr; }
  .proof-strip { grid-template-columns: 1fr; }
  .proof-strip p { padding-inline: 0; }
  .proof-strip p + p { border-left: 0; border-top: 1px solid var(--rule); }
}

@media (max-width: 600px) {
  /* No wordmark and no in-page links: at this width the header is one action.
   * The wordmark is what collides with the status-bar clock on a phone, and a
   * duplicated logo is the least useful thing in a header that has to fit a
   * button. */
  .site-wordmark { display: none; }
  .desktop-link { display: none; }
  .site-header { justify-content: flex-end; }
  .comparison-handle::after { width: 2.75rem; height: 2.75rem; }
  .footer-inner { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
