:root {
  --paper: #faf9f6;
  --ink: #1c1b18;
  --ink-soft: #5d5a52;
  --rule: #d9d5cc;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --w: 400;   /* one weight everywhere: reads the same as the wordmark */
}

@font-face {
  font-family: 'Newsreader';
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  src: url('fonts/Newsreader-var.woff2') format('woff2-variations'), url('fonts/Newsreader-var.woff2') format('woff2');
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: var(--w);
  font-optical-sizing: auto;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

main {
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-4vh);
}

.logo {
  display: block;
  width: clamp(190px, 46vw, 250px);
  height: auto;
  color: var(--ink);
}

/* ---- email ---- */

form { width: 100%; margin-top: clamp(2.75rem, 7vh, 4rem); }

.row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: .55rem;
  transition: border-color .15s;
}
.row:focus-within { border-color: var(--ink); }

input[type="email"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: .35rem 0;
  font: inherit;
  font-size: 1.15rem;
  color: var(--ink);
  border-radius: 0;
}
input[type="email"]::placeholder { color: var(--ink-soft); opacity: 1; }
input[type="email"]:focus { outline: none; }

button.send {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 .1rem .1rem;
  cursor: pointer;
  transition: transform .15s, color .15s;
}
button.send:hover, button.send:focus-visible { transform: translateX(3px); }
button.send:hover, button.send:focus-visible { color: var(--ink-soft); outline: none; }
button.send[disabled] { opacity: .4; cursor: default; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg {
  margin-top: .9rem;
  min-height: 1.5rem;
  font-size: 1rem;
  color: var(--ink-soft);
  text-align: center;
}
.form-msg.ok { color: var(--ink); }
.form-msg.err { color: #8a3b2f; }

/* ---- bio link ---- */

.bio-link {
  margin-top: clamp(2.5rem, 7vh, 4rem);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  padding: .25rem .1rem;
  border-bottom: 1px solid transparent;
}
.bio-link:hover, .bio-link:focus-visible { color: var(--ink); border-bottom-color: var(--ink); outline: none; }

/* ---- modal ---- */

dialog {
  margin: auto;            /* the global reset removes the UA auto margin that centers a modal */
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 2.5rem 2.25rem 2.25rem;
  width: min(92vw, 30rem);
  box-shadow: 0 1px 0 var(--rule), 0 24px 60px rgba(28, 27, 24, .18);
}
dialog::backdrop { background: rgba(28, 27, 24, .45); }
dialog p { font-size: 1.15rem; line-height: 1.5; }
dialog .bio-lead { font-size: 1.5rem; line-height: 1.3; margin-bottom: 1.25rem; }
dialog p + p { margin-top: 1rem; }
dialog .fine { margin-top: 1.5rem; font-size: 1rem; color: var(--ink-soft); }
dialog a { color: inherit; }
.close {
  position: absolute;
  top: .6rem;
  right: .75rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: .25rem .5rem;
}
.close:hover, .close:focus-visible { color: var(--ink); outline: none; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  input[type="email"] { font-size: 1.05rem; }
  dialog { padding: 2.25rem 1.5rem 1.75rem; }
}
