/* The pill at the top of every page but the home page, and the two windows it opens (the
   newsletter and get in touch). nav.js writes the markup, so the bar is the same everywhere:
   logo, Work, Writing, Newsletter, Get in touch.

   The home page (./) keeps its own copy of these rules, because its bar is brought in by
   the opening and its logo rides up into place. The sizes here are that bar's sizes; if the home
   page's bar changes, change this file to match. */

/* a fade under the bar, so words scrolling up go quiet behind it */
.navfade { position: fixed; left: 0; right: 0; top: 0; height: 92px; z-index: 4; pointer-events: none;
  background: linear-gradient(var(--bg) 22%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent); }

.nav {
  position: fixed; left: 50%; top: 12px; translate: -50% 0; z-index: 6; width: min(100% - 24px, 900px); display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--bg) 62%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 8px 30px color-mix(in srgb, #000 45%, transparent);
}
/* placed by eye, as on the home page: closer to the round end than a square corner would want,
   and a touch high, because the mark is heaviest at its foot */
.nav .nav-logo { flex: none; width: 54px; height: 26px; margin: 0 18px 0 9px; padding: 0; border-radius: 0; translate: 0 -1.5px; color: var(--ink); }
.nav .nav-logo::before { content: none; }
.nav-logo svg { display: block; width: 100%; height: 100%; fill: currentColor; overflow: visible;
  filter: drop-shadow(0 0 2px color-mix(in srgb, var(--ink) 75%, transparent)) drop-shadow(0 0 10px color-mix(in srgb, var(--ink) 50%, transparent)); }
.nav-side { display: flex; align-items: center; gap: 6px; }
/* each link is a small square lamp and a word. The lamp is lit for the part of the site you are in */
.nav-side a {
  display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-radius: 999px;
  font: 560 11px/1 "Roboto Flex Full", "Roboto Flex", sans-serif; font-stretch: 130%; letter-spacing: .16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 62%, transparent); text-decoration: none; outline: none; transition: color .2s ease, text-shadow .2s ease;
}
.nav-side a::before { content: ""; width: 7px; height: 7px; flex: none; background: color-mix(in srgb, var(--ink) 20%, transparent); transition: background-color .15s ease, box-shadow .3s ease; }
.nav-side a.here { color: var(--ink); }
.nav-side a.here::before { background: var(--ink); box-shadow: 0 0 4px color-mix(in srgb, var(--ink) 80%, transparent), 0 0 12px color-mix(in srgb, var(--ink) 55%, transparent); }
.nav-side a:hover, .nav-side a:focus-visible { color: var(--accent); text-shadow: 0 0 0.9em color-mix(in srgb, var(--accent) 55%, transparent); }
.nav-side a:hover::before, .nav-side a:focus-visible::before { background: var(--accent); box-shadow: 0 0 4px color-mix(in srgb, var(--accent) 80%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent); }
/* the way to get in touch is the one solid thing in the pill, at its right end */
.nav-side a.cta { margin-left: 2px; color: var(--bg); background: var(--ink); transition: background-color .2s ease, box-shadow .3s ease; }
.nav-side a.cta::before { content: none; }
.nav-side a.cta:hover, .nav-side a.cta:focus-visible { color: var(--bg); text-shadow: none; background: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent); }

/* ---------- the newsletter and get in touch, opened over the page ---------- */
.modal {
  width: min(100% - 32px, 560px); padding: 0; border-radius: 18px; color: var(--ink); overflow: visible;
  font-family: "Geist", sans-serif; font-weight: 450; font-size: 18px; line-height: 1.25; letter-spacing: -0.01em;
  background: color-mix(in srgb, var(--bg) 78%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 30px 90px color-mix(in srgb, #000 60%, transparent);
}
.modal[open] { display: grid; gap: 18px; padding: 34px 30px 30px; animation: modal-in .35s cubic-bezier(.2, .8, .2, 1); }
.modal::backdrop { background: color-mix(in srgb, var(--bg) 62%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: modal-dim .3s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes modal-dim { from { opacity: 0; } }
.modal p { margin: 0; color: color-mix(in srgb, var(--ink) 64%, transparent); }
.modal-title {
  margin: 0; padding-right: 60px; font-family: "Roboto Flex Full", "Roboto Flex", sans-serif; text-transform: uppercase; font-weight: 900; font-stretch: 62%;
  font-size: clamp(40px, 12vw, 64px); line-height: 0.9; letter-spacing: 0.005em; text-wrap: balance;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; cursor: pointer; padding: 8px 10px; background: none; border: 0; border-radius: 999px; outline: none;
  font: 560 11px/1 "Roboto Flex Full", "Roboto Flex", sans-serif; font-stretch: 130%; letter-spacing: .16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 62%, transparent); transition: color .2s ease, text-shadow .2s ease;
}
.modal-close:hover, .modal-close:focus-visible { color: var(--accent); text-shadow: 0 0 0.9em color-mix(in srgb, var(--accent) 55%, transparent); }
.modal-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 6px; }
.modal-form input, .modal-form button, .modal-form .address { font: inherit; letter-spacing: inherit; border-radius: 10px; padding: 13px 16px; min-height: 48px; }
.modal-form input, .modal-form .address {
  min-width: 0; color: var(--ink); background: none; border: 1px solid color-mix(in srgb, var(--ink) 34%, transparent); outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.modal-form input::placeholder { color: color-mix(in srgb, var(--ink) 40%, transparent); }
.modal-form input:focus, .modal-form .address:hover, .modal-form .address:focus-visible { border-color: var(--accent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 40%, transparent); }
/* the address can be selected and copied by hand as well as clicked */
.modal-form .address { display: block; text-decoration: none; user-select: all; -webkit-user-select: all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-form .address:hover { color: var(--accent); }
.modal-form button { cursor: pointer; min-width: 5.5em; color: var(--bg); background: var(--ink); border: 1px solid var(--ink); outline: none; transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.modal-form button:hover, .modal-form button:focus-visible { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 50%, transparent); }
.modal .said:empty { display: none; }
html:has(dialog[open]) { overflow: hidden; }
@media (width < 480px) { .modal-form { grid-template-columns: minmax(0, 1fr); } .modal[open] { padding: 30px 20px 22px; } }
@media (prefers-reduced-motion: reduce) { .modal[open], .modal::backdrop { animation: none; } }

/* tighter on a phone, without the lamps or the newsletter link, so it all fits */
@media (width < 700px) {
  .nav { padding: 8px; top: 10px; }
  .nav .nav-logo { width: 46px; height: 22px; margin: 0 12px 0 8px; translate: 0 -1px; }
  .nav-side { gap: 0; }
  .nav-side a { padding: 12px 7px; font-size: 10px; letter-spacing: .08em; font-stretch: 105%; }
  .nav-side a.cta { padding: 12px 15px; margin-left: 6px; }
    @media (width < 350px) { .nav-side a.cta { padding: 12px 11px; margin-left: 2px; } }
  .nav-side a::before { content: none; }
  .nav-side a[data-modal=signup] { display: none; }
}
