/* The root of richardwollyce.com: one column that says what Richard does, then the
   four ways to come closer, each in the same template (Richard, 2026-11-13, after
   studying the section structure of ofício.com).

   Palette: bone, petrol and rust, the colours of the recording set (Richard,
   2026-11-22): the wall behind him is petrol #2B3A42, the other walls are warm
   bone, and rust is petrol's complement, kept for what asks for a click.
   Measured against the bone ground: ink 11.4:1, ink-soft 9.2:1, ink-muted 5.6:1,
   ink-faint 4.5:1; rust 5.1:1 as text and carrying bone on a button.
   One accent: rust marks the primary button and the hand stroke, nothing else.
   Hairlines are petrol at low alpha, so the ornament never competes with it.

   What makes it read clearly, kept on purpose:
   - one column, about 44rem, paragraphs held near 65 characters;
   - every offer uses the same block: label and condition, a promise, one paragraph,
     one button, so the reader compares like with like;
   - hairline rules between blocks, never cards, shadows or pills;
   - no navigation bar: the page is one read, the links live in the footer.

   field.js reads the --shader-* properties once at load. */

:root {
  color-scheme: light;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;

  --ground: #eae3d6;
  --ink: #1f2b31;
  --ink-soft: #2b3a42;
  --ink-muted: #4a5a62;
  --ink-faint: #5a6870;
  --accent: #9c431f;
  --accent-hover: #823616;
  --rule: rgba(43, 58, 66, 0.45);
  --band-rule: rgba(43, 58, 66, 0.22);
  --wash: rgba(43, 58, 66, 0.06);
  --focus-ring: #1f2b31;

  --column: 44rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --measure: 34rem;
  --block-space: 3.25rem;

  --shader-1: #eae3d6;
  --shader-2: #e3dccf;
  --shader-3: #f2ede3;
  --shader-brightness: 1;
  --shader-alpha: 0.85;
  --shader-speed: 0.15;
  /* How far the noise may pull a swirl below the ground. 1 is the original
     depth; lower lifts only the dark swirls, the light ones stay as they were. */
  --shader-shadow: 0.45;
  --field-vignette: rgba(120, 100, 72, 0.12);
}

@media (max-width: 47rem) {
  :root { --block-space: 2.25rem; }
}

* { box-sizing: border-box; }

html { background: var(--ground); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Vignette over the field, as before. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 100% at 50% 40%, transparent 42%, var(--field-vignette) 100%);
}

.field-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

/* The sheet: one column, margin rather than columns on wide screens. */
.sheet {
  max-width: var(--column);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Masthead */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 1.5rem 1rem;
  border-bottom: 1px solid var(--band-rule);
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

/* The circle is the avatar convention, the only round form on the page. The photo keeps
   its own colour (Richard, 13/11/2026). */
.avatar {
  width: 44px;
  height: 44px;
  flex: none;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--band-rule);
}

.rw-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Reserves the width of "RW" so the expanding name never pushes the masthead. */
.rw-logo::before {
  content: "RW";
  visibility: hidden;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.rw-logo-mark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: max-content;
  white-space: nowrap;
  padding-bottom: 0.2em;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.grow {
  display: inline-grid;
  grid-template-columns: 0fr;
  vertical-align: bottom;
  transition: grid-template-columns 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.grow-inner { overflow: hidden; padding-bottom: 0.25em; margin-bottom: -0.25em; }

.lockup:hover .grow,
.lockup:focus-visible .grow { grid-template-columns: 1fr; }

.lockup:hover .grow-b,
.lockup:focus-visible .grow-b { transition-delay: 90ms; }

.social {
  display: inline-flex;
  padding: 0.8125rem;
  margin-right: -0.8125rem;
  color: var(--ink-muted);
  transition: color 0.2s ease-out;
}

.social:hover { color: var(--ink); }

/* Opening */
.opening {
  padding-block: 4.5rem 2.75rem;
}

h1 {
  margin: 0;
  max-width: 38rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.opening p {
  max-width: var(--measure);
  margin: 1.25rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.opening .bridge {
  margin-top: 1rem;
  color: var(--ink-muted);
}

@media (max-width: 47rem) {
  .opening { padding-block: 2.75rem 2rem; }
  .opening p { font-size: 1rem; }
}

/* The offer block: every offer in the same template. */
.offer {
  padding-block: var(--block-space);
  border-top: 1px solid var(--band-rule);
}

.label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.condition {
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

h2 {
  margin: 1.25rem 0 0;
  max-width: 36rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.45rem, 1.1rem + 1.5vw, 1.95rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.offer p {
  max-width: var(--measure);
  margin: 1rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 47rem) {
  .offer p { font-size: 1rem; }
}

/* One button per block. Filled for the paid offers, quiet for the free ones. */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  margin-top: 1.75rem;
  padding: 0.9rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: var(--ground);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s linear, color 0.15s linear;
}

.cta span { transition: transform 0.2s ease-out; }
.cta:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.cta:hover span { transform: translateX(3px); }
.cta:active { transform: translateY(1px); }

.cta-quiet {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.cta-quiet:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }

.cta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

/* The QR only helps where the phone is a different device. */
.qr { display: none; }

@media (min-width: 1024px) and (hover: hover) {
  .qr {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
  }

  .qr img {
    display: block;
    border-radius: 4px;
    background: #fff;
    padding: 5px;
  }

  .qr figcaption {
    max-width: 8rem;
    font-size: 0.6875rem;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }
}

/* The hand mark: one rust stroke under one phrase per heading. Ornament, never text. */
.mark {
  position: relative;
  white-space: nowrap;
}

.mark-ink {
  position: absolute;
  left: -2%;
  /* From the top of the inline box: Playfair's ascent is 1.082em, so 1.11em sits just
     under the baseline. Measured from the bottom it would ride on the next line,
     because the font's content box is taller than a 1.08 line. */
  top: 1.11em;
  width: 104%;
  height: 0.26em;
  overflow: visible;
  pointer-events: none;
}

.mark-ink path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.25;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* Drawn by uncovering it left to right. A dash animation is the usual way, but with a
   non-scaling stroke Chrome measures dashes in screen pixels, so pathLength stops
   meaning the whole path and only a fragment showed on a phone (measured 2026-11-13). */
.marks-pending .mark-ink { clip-path: inset(0 100% 0 0); }
.marks-pending .mark.is-drawn .mark-ink {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.65s cubic-bezier(0.33, 1, 0.68, 1) 0.1s;
}

/* Footer: the only navigation on the page. */
.foot {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--band-rule);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.foot p { margin: 0; }

.foot-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 1rem;
}

.foot-links a {
  display: inline-block;
  padding-block: 0.75rem;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease-out;
}

.foot-links a:hover { text-decoration-color: var(--ink); }

.foot-copy { margin-top: 1rem !important; font-size: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  .grow, .social, .cta, .cta span, .foot-links a { transition: none; }
}
