/* RED Rent Company. Direction A, The Stamp. Every value comes from tokens.css; the rules are in system/system.md. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; /* clears the sticky header */ }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: var(--step-0); font-weight: var(--weight-body); font-stretch: var(--wdth-body); line-height: var(--leading-body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.band :focus-visible, .foot :focus-visible { outline-color: var(--on-band); }
.ink { filter: url(#ink); }
.filters { position: absolute; width: 0; height: 0; }
.skip { position: absolute; left: var(--space-s); top: -100px; z-index: 20; padding: var(--space-xs) var(--space-s); background: var(--ink); color: var(--ground); }
.skip:focus { top: var(--space-s); }

/* Header: sticky, the tenants' link and the renters' button on every screen */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--space-2xs); padding: var(--space-2xs) var(--gutter); background: var(--ground); border-bottom: var(--border-hair) solid var(--line); }
.top .home { margin-right: auto; display: flex; align-items: center; min-height: var(--tap); }
.top .home img { width: 96px; /* logo at header size; 122px from 900px */ }
.ctl { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--space-xs); border: var(--border-hair) solid var(--line); font-size: var(--step--1); font-weight: var(--weight-stamp); font-stretch: var(--wdth-label); line-height: 1; text-decoration: none; white-space: nowrap; }
.ctl.is-red { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ctl.is-red:hover { background: var(--accent-press); border-color: var(--accent-press); }

/* Type */
h1, h2 { margin: 0; font-weight: var(--weight-display); font-stretch: var(--wdth-display); letter-spacing: var(--track-display); text-wrap: balance; }
h1 { font-size: var(--step-5); line-height: var(--leading-display); }
h1 span { color: var(--accent-text); }
h2 { font-size: var(--step-4); line-height: 1; }
.eyebrow { margin: 0; font-size: var(--step--1); font-weight: var(--weight-strong); font-stretch: var(--wdth-label); letter-spacing: var(--track-label); line-height: var(--leading-tight); text-transform: uppercase; color: var(--muted); }
.lede { margin: var(--space-2xs) 0 0; max-width: var(--measure); color: var(--muted); }
p { margin: 0; }
.nobreak { white-space: nowrap; }
.link { font-weight: var(--weight-strong); text-decoration-thickness: var(--border-hair); text-underline-offset: 3px; display: inline-block; padding: var(--space-2xs) 0; margin: calc(var(--space-2xs) * -1) 0; /* 44px to tap, no shift in the line */ line-height: 1.75; }

/* Stamps */
.stamp { display: inline-block; padding: .45em .65em .4em; border: var(--border-stamp) solid currentColor; color: var(--accent-text); font-size: var(--step--1); font-weight: var(--weight-stamp); font-stretch: var(--wdth-display); line-height: 1; letter-spacing: var(--track-stamp); text-transform: uppercase; transform: rotate(-2deg); }
.stamp.is-small { font-size: var(--step--1); transform: rotate(-1.5deg); }
.stamp.is-ink { color: var(--ink); }

/* The primary action: the logo's box with a solid stamp inside */
.press { display: block; width: 100%; padding: var(--space-2xs); border: var(--border-hair) solid var(--line); background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.press .face { display: grid; gap: var(--space-3xs); padding: var(--space-s) var(--space-s) var(--space-xs); background: var(--accent); color: var(--on-accent); }
.press .verb { font-size: var(--step-3); font-weight: var(--weight-display); font-stretch: var(--wdth-display); line-height: 1; letter-spacing: var(--track-button); text-transform: uppercase; text-wrap: balance; }
.press .what { font-size: var(--step--1); font-weight: var(--weight-strong); line-height: var(--leading-tight); }
.press:hover .face, .press:active .face { background: var(--accent-press); }
.press.on-band { border-color: var(--on-band); }
.press.on-band .face { background: var(--surface); color: var(--ink); }
.press.on-band:hover .face { background: var(--surface); text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .hero .press .face { animation: thud .14s ease-out .35s both; }
  @keyframes thud { from { transform: scale(1.06); opacity: .2; } to { transform: scale(1); opacity: 1; } }
}

/* Section shapes: hero, ruled, slip, band, label list */
.hero { display: grid; gap: var(--space-s); padding: var(--space-l) var(--gutter) var(--space-xl); }
.ruled { padding: var(--space-xl) var(--gutter); border-top: var(--border-hair) solid var(--line); }
.ruled .intro, .ruled > h2 { margin-bottom: var(--space-m); }
.band { background: var(--band); color: var(--on-band); border-top: 0; }
.band .lede { color: var(--on-band-muted); }
.slip { background: var(--surface); color: var(--ink); border: var(--border-hair) solid var(--line); padding: var(--space-m); }

/* Signature: three stamps on a slip */
.stamps { list-style: none; margin: 0; padding-bottom: var(--space-2xs); display: grid; }
.stamps li { display: grid; gap: var(--space-xs); padding: var(--space-m) 0; border-top: 1px dashed var(--line-soft); }
.stamps li:first-child { border-top: 0; padding-top: 0; }
.stamps .stamp { justify-self: start; font-size: var(--step-2); border-width: var(--border-stamp-big); color: var(--ink); }
.stamps li:nth-child(1) .stamp { transform: rotate(var(--stamp-tilt-1)); }
.stamps li:nth-child(2) .stamp { transform: rotate(var(--stamp-tilt-2)); margin-left: var(--space-m); }
.stamps li:nth-child(3) .stamp { transform: rotate(var(--stamp-tilt-3)); margin-left: var(--space-2xs); }
.stamps .stamp.is-red { color: var(--accent); }
.stamps p { max-width: 34ch; text-wrap: pretty; }

/* The interest form, on a slip */
.form { display: grid; gap: var(--space-s); }
.field { display: grid; gap: var(--space-2xs); align-content: start; }
.field label { font-size: var(--step--1); font-weight: var(--weight-stamp); font-stretch: var(--wdth-display); letter-spacing: var(--track-stamp); line-height: 1; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 12px; /* 48px fields, from system.md */ border: var(--border-hair) solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--step-0); line-height: var(--leading-tight); }
.field textarea { min-height: 96px; resize: vertical; }
.trap { display: none; /* spam trap; bots fill it, people never see it */ }

/* Already renting (on the band) */
.tenants .body { display: grid; gap: var(--space-s); }
.wait { display: grid; gap: var(--space-xs); }
.wait > .stamp { justify-self: start; }
.wait .call { justify-self: start; display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--step-2); font-weight: var(--weight-display); font-stretch: var(--wdth-display); line-height: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.wait p, .wait ul { max-width: 60ch; }
.wait ul { margin: 0; padding-left: 1.1em; }
.wait .danger { font-weight: var(--weight-stamp); color: var(--accent-text); }

/* Label list */
.labels { margin: 0; display: grid; }
.labels > div { display: grid; gap: var(--space-3xs); align-content: start; padding: var(--space-xs) 0; border-top: 1px dashed var(--line-soft); }
.labels > div:first-child { border-top: 0; padding-top: 0; }
.labels dd { margin: 0; display: grid; justify-items: start; font-weight: var(--weight-strong); }
.labels dd a { display: inline-flex; align-items: center; min-height: var(--tap); text-underline-offset: 3px; }

/* Footer (on the band) */
.foot { display: grid; gap: var(--space-3xs); padding: var(--space-xl) var(--gutter); background: var(--band); color: var(--on-band-muted); font-size: var(--step--1); }
.foot .mark { width: 96px; margin-bottom: var(--space-xs); /* white knockout of the logo, 122px from 900px */ }
.foot .name { color: var(--on-band); font-weight: var(--weight-stamp); }
.foot a { color: var(--on-band); display: inline-block; padding: var(--space-2xs) 0; margin: calc(var(--space-2xs) * -1) 0; line-height: 1.75; }
.foot .eho { margin-top: var(--space-xs); color: var(--on-band); font-weight: var(--weight-strong); }

/* Sent page */
.sent { min-height: 60vh; }

@media (min-width: 900px) {
  .top .home img, .foot .mark { width: 122px; }
  .hero { grid-template-columns: repeat(12, 1fr); column-gap: var(--space-m); padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
  .hero > * { grid-column: 1 / span 8; }
  .hero h1 span { display: block; /* RED Rent's answer on one red line */ }
  .hero .press { grid-column: 9 / span 4; grid-row: 2 / span 2; align-self: end; transform: rotate(-1.5deg); }
  .ruled { display: grid; grid-template-columns: 4fr 8fr; column-gap: var(--space-xl); }
  .ruled .intro, .ruled > h2 { margin-bottom: 0; }
  .stamps { grid-template-columns: 1fr 1.2fr 1fr; column-gap: var(--space-s); padding: var(--space-l) var(--space-m); }
  .stamps li, .stamps li:first-child { border-top: 0; padding: 0; align-content: start; }
  .stamps li:nth-child(2) { margin-top: var(--space-l); }
  .stamps li:nth-child(3) { margin-top: var(--space-2xs); }
  .form { grid-template-columns: 1fr 1fr; }
  .form .wide { grid-column: 1 / -1; }
  .labels { grid-template-columns: 1fr 1fr; column-gap: var(--space-l); }
  .labels > div:nth-child(2) { border-top: 0; padding-top: 0; }
  .foot { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: var(--space-xl); }
}

/* The header's red button stays out of the way while the hero's stamp button is on screen, then fades in
   as the stamp slides under the header (scroll-linked, no JS). Browsers without scroll-driven animations
   just show it all the time. 62px is the sticky header's height. */
@supports (animation-timeline: view()) {
  body { timeline-scope: --hero-press; }
  .hero .press { view-timeline: --hero-press block; view-timeline-inset: 62px 0; }
  .top .ctl.is-red { animation: header-cta linear both; animation-timeline: --hero-press; animation-range: exit 0% exit 100%; }
  @keyframes header-cta { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }
}
