/* The holding page, shown at theweebook.com until The Wee Book opens. It stands on its own: the fonts
   and Hedgerow colours of styles.css, without the rest of the site. Night (moss) carries Francie's
   kitchen; words are oat on moss, the button gorse with ink words. */

@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage-grotesque.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-roman.woff2') format('woff2'); font-weight: 300 400; font-display: swap; }

:root {
  --night: #22301f;
  --oat: #f4efe3;
  --stone: #dcd3be;
  --gorse: #e2b33c;
  --gorse-light: #f0d283;
  --ink: #1e231b;
  --muted: color-mix(in srgb, var(--oat) 80%, var(--night));
  --gutter: clamp(16px, 4vw, 64px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--oat);
  font: 1.0625rem/1.55 'Bricolage Grotesque', system-ui, sans-serif;
}
a { color: var(--gorse-light); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--gorse); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top { padding: 20px var(--gutter) 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--oat); text-decoration: none; font: 400 1.35rem 'Fraunces', Georgia, serif; }
.brand img { width: 30px; height: auto; }
.brand em { color: var(--gorse-light); }

.hold {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-content: start;
  padding: 20px var(--gutter) 48px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Francie: the last frame as a picture, and the frames of the rise and wave over it as one sheet,
   8 to a row; script steps --col and --row. */
.francie { position: relative; margin: 0; width: 100%; max-width: 560px; justify-self: center; }
.francie img, .wave { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 24px; }
.wave {
  position: absolute;
  inset: 0 0 auto;
  background: url('img/francie-wave.avif') 0 0 / 800% 500% no-repeat;
  background-position: calc(var(--col, 0) * 100% / 7) calc(var(--row, 0) * 100% / 4);
}
.bubble {
  position: relative;
  margin: 18px 0 0;
  padding: 16px 20px;
  min-height: 5.6em;
  border-radius: 20px;
  background: var(--oat);
  color: var(--ink);
  font: 400 1.2rem/1.4 'Fraunces', Georgia, serif;
}
.bubble::before {      /* the tail, up to Francie */
  content: '';
  position: absolute;
  top: -12px;
  left: 30%;
  border: 12px solid transparent;
  border-top: 0;
  border-bottom-color: var(--oat);
}

.words { max-width: 34rem; }
h1 { margin: 0 0 12px; font: 400 clamp(2rem, 8vw, 3.4rem)/1.08 'Fraunces', Georgia, serif; letter-spacing: -0.01em; }
.sub { margin: 0 0 32px; color: var(--muted); }
h2 { margin: 0 0 10px; font: 400 1.4rem/1.25 'Fraunces', Georgia, serif; }
form { display: flex; flex-wrap: wrap; gap: 10px; }
form[hidden] { display: none; }
label { flex-basis: 100%; font-weight: 600; }
input[type='email'] {
  flex: 1 1 14rem;
  min-height: 48px;
  padding: 10px 16px;
  border: 2px solid var(--stone);
  border-radius: 999px;
  background: var(--oat);
  color: var(--ink);
  font: inherit;
}
button {
  min-height: 48px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--gorse);
  color: var(--ink);
  font: 700 1rem 'Bricolage Grotesque', system-ui, sans-serif;
  cursor: pointer;
}
button:hover { background: var(--gorse-light); }
button[disabled] { opacity: 0.7; cursor: progress; }
.trap { position: absolute; left: -9999px; }
.reply { min-height: 1.55em; margin: 12px 0 0; font-weight: 600; color: var(--gorse-light); }
.note { margin: 8px 0 0; font-size: 0.95rem; color: var(--muted); }

footer { padding: 20px var(--gutter) 28px; border-top: 1px solid rgb(255 255 255 / 0.14); color: var(--muted); font-size: 0.9rem; }

@media (min-width: 900px) {
  .hold { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 40px; }
  .francie { justify-self: end; width: min(100%, calc(100vh - 300px)); min-width: 360px; }   /* bubble above the fold */
}

/* Asked for less motion: no rise and wave, only the last frame. */
@media (prefers-reduced-motion: reduce) {
  .wave { display: none; }
}
