/* Limewash's landing page (record 0045), and nothing else: the Studio and the door keep studio.css.
   The idea is ma, the interval: one thing at a time, with the space around it doing the work.
   One limewashed wall behind everything, ink for every word, and one touch of colour: the teal disc.
   Light only, and every colour set here, so a browser in dark mode changes nothing.

   The typeface is Literata 3.103 (SIL Open Font License 1.1, fonts/literata-OFL.txt), Latin only,
   one weight (400) with its optical sizes kept, so the headline is set from the display cut and the
   text from the text cut of the same face. Served from this site; nothing is asked of another host.

   The wall is one tone, the Limewash paper, washed unevenly by hand: very large, soft shifts of light
   (gradients in tones within about 3% of the paper), and over them the wash itself (limewash.webp):
   a darker cloudy pass, a chalkier pass, and the faintest runs where rain has been. The texture is
   baked small (400 x 600) and shown four times larger, so it costs one 27 KB image and paints like
   any picture; if it does not load, the gradients alone are the wall. tests/site.test.ts reads the
   colours below and checks every pair against the darkest tone the wall reaches, so keep them as
   plain hex values. */

:root {
  /* The wall: one tone and its shifts. */
  --paper: #e9ebe4;        /* the wall's own tone, and all of it where nothing else shows */
  --paper-lit: #f1f3ed;    /* where light falls on it */
  --paper-shaded: #e3e6dd; /* where it turns from the light */
  --paper-darkest: #d6dacf;/* a shade below the darkest the wall reaches at 0.6 (#d8dcd1, measured), for the contrast checks */
  --weathering: 0.35;      /* how strongly the wash shows across the wall: soft */
  --worn: 0.8;             /* how much more it shows in the few worn places (added on top, then faded out) */

  /* Ink and the one mark. */
  --ink: #1e2b32;          /* every word, and the Sign in border */
  --hover: #dfe1da;        /* Sign in under the pointer */

  /* Sign up. Slate by default; the teal is .signup-teal below (SIGN_UP in src/studio/page.ts). */
  --signup: #354458;         /* slate: paper on it 8.2:1, its edge on the darkest wall 7.0:1 */
  --signup-pressed: #2a3647; /* under the pointer: paper on it 10.2:1 */
  --signup-text: #e9ebe4;
  --signup-edge: #354458;
  --signup-size: 1em;        /* the text size, as Sign in */
  --teal: #5e9492;         /* the one mark, never text */
  --teal-deep: #3b5e5c;    /* the focus ring */

  /* Type: one face, one weight, three sizes. The page's text size (18px on a phone, 20px wide) is the root
     size, so 1rem below is that size and every size and space is in proportion to it. As set, at 390 and
     1440 wide: the headline 43 and 78px, a heading 27 and 36px, the text and the notes 18 and 20px. */
  --face: "Literata", "Literata on Georgia", "Literata on Times", Georgia, serif;
  --size-display: clamp(2.375rem, 1.6rem + 3.2vw, 4.5rem);
  --size-heading: clamp(1.5rem, 1.35rem + 0.6vw, 1.875rem);
  --size-text: clamp(1.125rem, 1.05rem + 0.25vw, 1.25rem);
  --size-note: 1rem;
  --measure: 30em;         /* about 65 characters of the text size */

  /* Space: the margin, the interval between things, and the step each idea takes along the wall. */
  --edge: clamp(1.25rem, 6vw, 6rem);
  --ma: clamp(5rem, 15vh, 10rem);
  --step: clamp(0.75rem, 18vw - 3rem, 16rem);
}

@font-face {
  font-family: "Literata";
  src: url("/_/fonts/literata-3.103-latin-400-opsz.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* The device's serif, sized to Literata's width and line so the change of face does not move the page. */
@font-face {
  font-family: "Literata on Georgia";
  src: local("Georgia");
  size-adjust: 105.4%; ascent-override: 111.7%; descent-override: 29.2%; line-gap-override: 0%;
}
@font-face {
  font-family: "Literata on Times";
  src: local("Times New Roman"), local("Liberation Serif");
  size-adjust: 117.6%; ascent-override: 100.1%; descent-override: 26.2%; line-gap-override: 0%;
}

* { box-sizing: border-box; }
html {
  color-scheme: only light;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--size-text)/1.55 var(--face);
  font-kerning: normal;
  font-optical-sizing: auto;
  font-synthesis: none;
  hanging-punctuation: first last;
  -webkit-text-size-adjust: 100%;
}
body { margin: 0; background: var(--paper); color: var(--ink); position: relative; isolation: isolate; }

/* The wall. Light across it: very large, soft and uneven, and no edge anywhere. */
body::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 16% at 8% 4%, var(--paper-lit) 0, transparent 75%),
    radial-gradient(130% 18% at 100% 24%, var(--paper-shaded) 0, transparent 72%),
    radial-gradient(110% 14% at 0% 46%, var(--paper-lit) 0, transparent 72%),
    radial-gradient(130% 20% at 92% 66%, var(--paper-shaded) 0, transparent 74%),
    radial-gradient(110% 14% at 14% 88%, var(--paper-lit) 0, transparent 72%),
    linear-gradient(174deg, #ebede6 0, #e7e9e1 36%, #eaece5 63%, #e5e8df 100%);
}
/* The wash: cloudy coats and the faintest runs, as one picture, tiled without a seam. */
body::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("/_/limewash.webp") 0 0 / 1600px 2400px repeat;
  opacity: var(--weathering);
}
/* Asked for more contrast, or the system's own colours: the plain ground, nothing on it. */
/* The few worn places, where weather has reached the wall more: the same wash again, stronger, faded out on
   every side. Each sits in an interval or a margin, never behind words, and is found rather than noticed:
   low on the first screen away from the headline, in the wide interval before "One piece at a time", and
   near the foot, past the notes. */
.arrive::after, .met::before, .begin::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  background: url("/_/limewash.webp") 0 0 / 1600px 2400px repeat;
  opacity: var(--worn);
  -webkit-mask-image: radial-gradient(closest-side, #000 15%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 15%, transparent 100%);
}
/* Under the eave: low on the first screen, on the side away from the headline. */
.arrive::after { right: 0; bottom: 0; width: 56%; height: 44%; }
/* Rain at the corner: a tall, narrow wear in the wide interval before the last idea. */
.met { position: relative; }
.met::before { left: 0; top: 0; width: 34%; height: 72%; }
/* Near the foot, past the notes. */
.begin { position: relative; }
.begin::after { right: 0; bottom: 0; width: 50%; height: 60%; }
@media (prefers-contrast: more) { body::before, body::after, .arrive::after, .met::before, .begin::after { display: none; } }
@media (forced-colors: active) { body::before, body::after, .arrive::after, .met::before, .begin::after { display: none; } }

h1, h2, p { margin: 0; font-weight: 400; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; max-width: var(--measure); }
a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; }

/* Who is speaking, and the way back in for someone who already has a site. */
.top {
  position: absolute; z-index: 1; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.5rem var(--edge) 0;
}

/* The first screen: the headline, the mark, and room to arrive. */
.arrive {
  position: relative;
  min-height: 86svh;
  display: flex;
  align-items: flex-end;
  padding: 5rem var(--edge) var(--ma);
}
.arrive h1 {
  position: relative;
  max-width: 11.5em;
  font-size: var(--size-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
/* The mark, drawn large: two posts and one thing between them, given its space. */
.interval {
  position: absolute;
  height: min(46svh, 32rem);
  width: auto;
  aspect-ratio: 1;
}
.interval path { stroke: var(--ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; stroke-linecap: butt; fill: none; }
.interval circle { fill: var(--teal); }

/* The three ideas, each a step further along the wall: yours, shared, met. The intervals alone part them. */
.idea { padding: var(--ma) var(--edge); }
.idea h2, .begin h2 { font-size: var(--size-heading); line-height: 1.2; margin-bottom: 0.75rem; max-width: 18em; }
.shared { padding-left: calc(var(--edge) + var(--step)); }
/* Met with calm: the widest interval on the page, for the one idea that is about staying. */
.met { padding-left: calc(var(--edge) + 2 * var(--step)); padding-block: calc(var(--ma) * 1.9); }

/* Who it is for, and the ways in. */
.begin { padding: var(--ma) var(--edge) calc(var(--ma) * 1.25); }
.way-in { display: grid; gap: 0.75rem; justify-items: start; margin-top: 3rem; }
.way-in + .way-in { margin-top: 2.25rem; }
.note { font-size: var(--size-note); line-height: 1.5; max-width: 34em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.6rem;
  border: 1px solid var(--ink); border-radius: 3px;
  background: transparent; color: var(--ink);
  font: inherit; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--signup); border-color: var(--signup-edge); color: var(--signup-text); font-size: var(--signup-size); }
.btn.primary:hover, .btn.primary:active { background: var(--signup-pressed); }
/* The palette's teal. Paper on it is 2.85:1 and ink 4.23:1, so neither passes at the text size: the words are
   set at 24px, which WCAG counts as large text (3:1) in a regular weight, and an ink edge gives the button its
   boundary, since the teal itself is under 3:1 against the wall. */
.signup-teal {
  --signup: #5e9492;
  --signup-pressed: #6a9f9d; /* a lighter teal under the pointer: ink on it 4.9:1 */
  --signup-text: #1e2b32;
  --signup-edge: #1e2b32;
  --signup-size: 24px;       /* large text in WCAG's terms at a regular weight */
}

@media (min-width: 52rem) {
  /* The mark hangs alone on the right of the first screen. */
  .interval { top: 12svh; left: 82%; translate: -50% 0; }
  .way-in { grid-template-columns: 9rem minmax(0, 34em); align-items: start; column-gap: 1.75rem; justify-items: stretch; }
  .way-in .btn { justify-self: start; }
  .way-in .note { padding-top: 0.6rem; }
}
@media (max-width: 51.99rem) {
  /* On a narrow screen the mark hangs above the headline. */
  .arrive { padding-top: calc(44svh + 2.5rem); }
  /* At this width the last idea starts near the edge: its wear stays in the interval above it, and the foot's below the notes. */
  .met::before { width: 70%; height: 32%; }
  .begin::after { width: 70%; height: 18%; }
  .interval { top: 7svh; right: var(--edge); height: 30svh; }
}
