/* Email signup card. Self-contained so it works on every page template.
   Deliberately the inverse of the pages: warm paper, deep green ink, the real
   pens, so it reads as a note rather than another section. */
.signup{
  --s-paper:#f4efe6;--s-ink:#10241a;--s-muted:#55665a;--s-green:#1d4a2a;--s-lime:#a3ff12;--s-line:rgba(16,36,26,.14);
  position:fixed;z-index:900;right:24px;bottom:24px;width:min(380px,calc(100vw - 32px));overflow:hidden;border-radius:22px;
  background:var(--s-paper);color:var(--s-ink);
  box-shadow:0 30px 70px -24px rgba(0,0,0,.65),0 0 0 1px rgba(0,0,0,.08);
  font:400 15px/1.55 'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
  opacity:0;transform:translateY(24px);transition:opacity .45s cubic-bezier(.22,1,.36,1),transform .6s cubic-bezier(.22,1,.36,1)
}
.signup.is-open{opacity:1;transform:none}
/* Research page: the hero diagram sits on the right, so the card opens on the left. */
@media (min-width:561px){.page-research .signup{right:auto;left:24px}}
.signup[hidden]{display:none}
.signup *{box-sizing:border-box}
.signup-art{position:relative;height:112px;display:grid;place-items:center;overflow:hidden;transition:height .6s cubic-bezier(.22,1,.36,1),opacity .35s,border-color .35s;
  background:radial-gradient(70% 90% at 50% 100%,#e6dccb,transparent 70%),var(--s-paper);border-bottom:1px solid var(--s-line)}
.signup-art img{width:78%;max-width:290px;height:auto;transform:rotate(-7deg) translateY(4px);filter:drop-shadow(0 14px 14px rgba(16,36,26,.28))}
.signup-body{padding:20px 24px 20px;transition:opacity .3s}
/* After signing up: the pens fade away and the thank-you takes their place. */
.signup.is-done .signup-art{height:0;opacity:0;border-bottom-color:transparent}
.signup.is-done .signup-body{padding-right:52px}
.signup-body.is-swapping{opacity:0}
/* The homepage light switch shares the corner; it steps aside while the card is up. */
body:has(.signup.is-open) .mode-switch{opacity:0;visibility:hidden;pointer-events:none}
.signup-kicker{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--s-green)}
.signup-spark{width:10px;height:10px;flex:none;background:var(--s-green);clip-path:polygon(50% 0,58% 42%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%)}
.signup h2{margin:0;font:500 31px/1.02 'Cormorant Garamond',Georgia,serif;letter-spacing:-.015em;color:var(--s-ink);text-wrap:balance}
.signup h2 em{font-style:italic;color:var(--s-green)}
.signup-lead{margin:8px 0 16px;font-size:14px;color:var(--s-muted);text-wrap:pretty}
.signup-row{display:flex;gap:6px;padding:5px;border-radius:999px;background:#fff;border:1px solid var(--s-line);transition:border-color .25s,box-shadow .25s}
.signup-row:focus-within{border-color:var(--s-green);box-shadow:0 0 0 3px rgba(29,74,42,.12)}
.signup input[type=email]{flex:1;min-width:0;padding:10px 12px;border:0;background:transparent;color:var(--s-ink);font:inherit;font-size:15px;outline:none}
.signup input::placeholder{color:#8a948b}
.signup button[type=submit]{flex:none;padding:10px 18px;border:0;border-radius:999px;background:var(--s-ink);color:var(--s-paper);font:700 14px/1 'DM Sans',system-ui,sans-serif;cursor:pointer;transition:background .2s,transform .2s}
.signup button[type=submit]:hover{background:var(--s-green);transform:translateY(-1px)}
.signup button[type=submit]:disabled{opacity:.6;cursor:default;transform:none}
.signup-fine{margin:10px 0 0 4px;font-size:12px;color:#55665a}
.signup-fine.is-error{color:#a3261d;font-weight:600}
.signup h2:focus{outline:none}
.signup-sr,.signup-hp{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.signup-x{position:absolute;top:10px;right:10px;z-index:2;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;border:0;background:rgba(244,239,230,.8);color:var(--s-muted);cursor:pointer;transition:background .2s,color .2s}
.signup-x:hover{background:#fff;color:var(--s-ink)}
.signup-x svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.signup :focus-visible{outline:2px solid var(--s-green);outline-offset:3px}
.signup input[type=email]:focus-visible{outline:none}

/* Phones: a bottom sheet. */
@media (max-width:560px){
  .signup{left:10px;right:10px;bottom:10px;width:auto;border-radius:20px}
  .signup-art{height:92px}
  .signup-art img{width:64%}
  .signup-body{padding:16px 20px 18px}
  .signup h2{font-size:28px}
}
@media (prefers-reduced-motion:reduce){
  .signup{transition:opacity .2s;transform:none}
}
