/* Monument Marketing Co. One stone, told in scroll. Tokens from the granite and the evening light. */
@font-face { font-family: "Neco"; src: url("/assets/fonts/neco-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neco"; src: url("/assets/fonts/neco-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plein"; src: url("/assets/fonts/plein-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plein"; src: url("/assets/fonts/plein-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ground: #121211;      /* the unlit shop */
  --stone-1: #d9d6cf;     /* split granite */
  --stone-2: #b4b1aa;
  --stone-3: #8c8a84;     /* sawn granite */
  --stone-4: #5e5c58;
  --line: #2a2a28;
  --field: #1c1c1a;
  --light: #f0c3ac;       /* last light, sampled from the low sun in the evening sky */
  --light-hi: #f6d6c5;
  --err: #f2a49a;
  --gut: clamp(16px, 4vw, 56px);
  --col: min(33rem, 38vw);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --display: "Neco", Georgia, serif;
  --text: "Plein", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; scrollbar-color: var(--stone-4) var(--ground); scrollbar-width: thin; }
body { margin: 0; background: var(--ground); color: var(--stone-1); font: 400 1.1875rem/1.55 var(--text); letter-spacing: 0.002em; -webkit-font-smoothing: antialiased; }
::selection { background: var(--light); color: var(--ground); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--stone-4); border: 3px solid var(--ground); border-radius: 6px; }
:focus-visible { outline: 2px solid var(--light); outline-offset: 3px; border-radius: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; color: var(--stone-1); }
p { margin: 0; text-wrap: pretty; }
img { display: block; }

.skip { position: absolute; left: var(--gut); top: -80px; z-index: 30; background: var(--light); color: var(--ground); padding: 10px 14px; border-radius: 2px; }
.skip:focus { top: 12px; }

/* the scene sits behind everything, full bleed, and fades up when the stone is ready */
#scene { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; opacity: 0; transition: opacity 1.1s var(--ease); }
#scene.ready { opacity: 1; }
.poster { display: none; position: fixed; inset: 0; width: 100%; height: 100vh; object-fit: cover; object-position: 66% 50%; z-index: 0; }
html:not(.js) .poster, .no-webgl .poster { display: block; }
.poster-mode .top, .poster-mode main, .poster-mode .scrim { display: none; }

.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(env(safe-area-inset-top), clamp(12px, 2vw, 26px)) var(--gut) 12px; pointer-events: none; }
.top a { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand img { width: auto; height: 24px; }
.brand span { font: 400 1.1875rem/1 var(--display); color: var(--stone-1); }
.ask { display: inline-flex; align-items: center; min-height: 44px; font: 500 1.0625rem/1 var(--text); color: var(--light); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--light) 45%, transparent); text-underline-offset: 0.35em; transition: text-underline-offset 160ms var(--ease), text-decoration-color 160ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .ask:hover, a.out:hover { text-underline-offset: 0.5em; text-decoration-color: currentColor; } }

main { position: relative; z-index: 2; }
/* evening: the sky comes up behind the copy, so the copy column gets a scrim (functional, not decoration) */
.scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(to right, rgb(18 18 17 / 0.8) 0, rgb(18 18 17 / 0.6) calc(var(--gut) + var(--col)), rgb(18 18 17 / 0.3) 72%, rgb(18 18 17 / 0.12) 100%),
              linear-gradient(to bottom, rgb(18 18 17 / 0.55) 0, rgb(18 18 17 / 0) 120px); }

/* chapters: copy in a column on the left, the stone works to the right */
.ch { position: relative; padding: 0 var(--gut); }
#block { height: 235vh; height: 235svh; }
/* the opening line holds through the whole first chapter, saw included */
.lead { position: sticky; top: 27vh; }
h1 { font-size: clamp(2.9rem, 6.1vw, 6rem); line-height: 0.98; letter-spacing: -0.012em; width: var(--col); max-width: 11ch; }

.beat { width: var(--col); margin: 0 0 62vh; }
#cut { padding-top: 40vh; }
#cut .beat:first-child { margin-bottom: 52vh; }
#letter { padding-top: 34vh; }
#set { padding-top: 0; }
/* the heading holds still while the die is lifted and set on its base */
.hold { height: 150vh; margin-bottom: 30vh; }
.hold .beat { position: sticky; top: 34vh; margin: 0; }
h2 { font-size: clamp(2.05rem, 3.4vw, 3.35rem); line-height: 1.04; letter-spacing: -0.006em; }
h3 { font-size: clamp(1.7rem, 2.5vw, 2.4rem); line-height: 1.08; margin-bottom: 0.5em; }
.beat p { max-width: 34ch; color: var(--stone-1); }
.beat p + p { margin-top: 0.9em; }
.beat h2 + p { margin-top: 1.1em; }
.state { font-size: 1.0625rem; line-height: 1.5; color: var(--stone-3) !important; max-width: 36ch; }
a.out { color: var(--stone-1); text-decoration-color: color-mix(in srgb, var(--stone-1) 40%, transparent); transition: text-underline-offset 160ms var(--ease), text-decoration-color 160ms var(--ease); display: inline-block; padding: 10px 0; }

.steps p { font: 400 clamp(1.45rem, 2vw, 1.85rem)/1.32 var(--display); color: var(--stone-1); max-width: 24ch; }

/* reveal once: 24px, 600 ms, ease-out, 80 ms between siblings */
html.js .rv { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
html.js .rv.in { opacity: 1; transform: none; }
html.js .rv:nth-child(2) { transition-delay: 80ms; }
html.js .rv:nth-child(3) { transition-delay: 160ms; }

/* the form, at dusk */
#quote { position: relative; min-height: 100vh; min-height: 100svh; padding: 18vh var(--gut) 0; display: flex; flex-direction: column; justify-content: space-between; }
.quote-in { width: min(36rem, 44vw); }
#quote h2 { font-size: clamp(2.4rem, 4.4vw, 4.2rem); }
.quote-sub { margin-top: 0.7em; color: var(--stone-1); max-width: 34ch; }
form { margin-top: 2rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; }
.f { display: flex; flex-direction: column; gap: 0.4rem; }
.f span { font-size: 1rem; color: var(--stone-2); }
.f input { font: 400 1.125rem/1.3 var(--text); color: var(--stone-1); background: color-mix(in srgb, var(--field) 88%, transparent); border: 0; border-bottom: 1px solid var(--stone-4);
  border-radius: 2px 2px 0 0; height: 56px; padding: 0 14px; caret-color: var(--light); transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.f input:focus { outline: none; border-bottom-color: var(--light); background: var(--field); }
.f input:focus-visible { outline: 2px solid var(--light); outline-offset: 2px; }
.f input[aria-invalid="true"] { border-bottom-color: var(--err); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.hp input { font-size: 16px; }
.send { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.6rem; }
button[type=submit] { font: 500 1.125rem/1 var(--text); color: var(--ground); background: var(--light); border: 0; border-radius: 2px; height: 56px; padding: 0 30px; cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
@media (hover: hover) and (pointer: fine) { button[type=submit]:hover { background: var(--light-hi); } }
button[type=submit]:active { transform: scale(0.97); }
button[type=submit]:disabled { cursor: progress; opacity: 0.7; }
.form-status { min-height: 1.5em; font-size: 1rem; color: var(--stone-2); max-width: 30ch; }
.form-status[data-kind="error"] { color: var(--err); }
.form-status[data-kind="ok"] { color: var(--light); }
form.sent .fields { opacity: 0.5; }

.foot { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.4rem; padding: 3.2rem 0 max(2rem, env(safe-area-inset-bottom)); margin-top: 16vh; border-top: 1px solid var(--line); color: var(--stone-3); font-size: 0.9375rem; }
.foot img { height: 20px; width: auto; }
.foot p { margin: 0; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 1.1rem; color: var(--stone-2); }

/* phone and narrow screens: the stone takes the upper half, copy reads in the lower half */
@media (max-width: 759px), (max-aspect-ratio: 9/10) {
  :root { --col: 100%; }
  body { font-size: 1.125rem; }
  .brand { gap: 8px; }
  .brand span { font-size: 0.9375rem; white-space: nowrap; }
  .brand img { height: 18px; }
  .ask { font-size: 0.9375rem; white-space: nowrap; }
  .scrim { background: linear-gradient(to bottom, rgb(18 18 17 / 0.6) 0, rgb(18 18 17 / 0) 110px, rgb(18 18 17 / 0) 46%, rgb(18 18 17 / 0.88) 62%); }
  .lead { top: calc(58svh + 6px); }
  h1 { max-width: 12ch; font-size: clamp(2.6rem, 11.5vw, 4.4rem); }
  /* beats close enough that a line is always in the lower half while the stone works above */
  .beat { margin-bottom: 9vh; }
  #cut { padding-top: 6vh; }
  #letter { padding-top: 2vh; }
  .hold { height: 175vh; padding-top: 56svh; margin-bottom: 8vh; }
  .hold .beat { top: calc(58svh + 6px); }
  .beat p { max-width: 38ch; }
  #quote { padding-top: 22vh; background: linear-gradient(to bottom, rgb(18 18 17 / 0) 0, var(--ground) 16vh); }
  .quote-in { width: 100%; }
  .fields { grid-template-columns: 1fr; }
}
@media (max-width: 359px) { .brand span { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html.js .rv { opacity: 1; transform: none; transition: none; }
  #scene { transition: none; }
  * { scroll-behavior: auto !important; }
}

/* short landscape phones: keep the opening line clear of the header */
@media (max-height: 520px) and (min-aspect-ratio: 9/10) { h1 { font-size: clamp(2rem, 8.5vh, 2.6rem); max-width: 13ch; } .lead { top: 30vh; } }
