/* Dear Visionary, the landing site (docs/site-brief.md). One page; the hero is the night sky before the light.
   The site has its own UI rules, not the app's ui-rules.md: references are tolans.com (a giant wordmark, a short
   line) and o-p-e-n.com (a full-bleed living visual behind a large centred name); the action is a plain lined
   rectangle in the spirit of Co-Star. Colours: the sky's gradient, the night ink, a light, radiant lemon for the name. */
:root{
  --ground:#EEECE7;
  --ink:#29251F;
  --night:#080B1C;
  --night-2:#0E1230;
  --night-ink:#EEEAF3;
  --night-soft:#ABA3BC;
  --night-line:rgba(238,234,243,.5);
  --sun:#F1F894;
  --sans:"DM Sans",-apple-system,"Helvetica Neue",Arial,sans-serif;
  /* The wordmark's face. Swap this one value to try a dedicated wordmark typeface. */
  --wordmark-font:var(--sans);
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:var(--night);color:var(--night-ink);font-family:var(--sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;overflow-x:hidden}

.sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- Hero ---------- */
.hero{
  position:relative;height:100vh;height:100svh;min-height:340px;overflow:hidden;
  /* The sky's own gradient, shown until the first frame is drawn and if WebGL is unavailable. */
  background:linear-gradient(to bottom,#080B1C 0%,#0E1230 45%,#1C1D45 78%,#3A3260 100%);
}
.sky{position:absolute;inset:0;width:100%;height:100%;display:block}

.hero-words{
  /* The name is the hero: as wide as the screen allows, and never taller than the sky can hold. */
  --wm:clamp(38px,min(8.2vw,10.5svh),104px);
  position:absolute;left:0;right:0;
  /* The name sits a little above centre (about 42% of the height), the line directly beneath. */
  top:calc(42% - .5 * var(--wm));
  padding:0 max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));
  display:flex;flex-direction:column;align-items:center;text-align:center;
}

.wordmark{
  margin:0;font-family:var(--wordmark-font);font-size:var(--wm);line-height:1;
  font-weight:400;font-variation-settings:"opsz" 14;letter-spacing:-.005em;white-space:nowrap;color:var(--sun);
}

.line{
  margin:clamp(14px,2.4svh,24px) 0 0;font-size:clamp(17px,min(2vw,3.4svh),24px);line-height:1.35;
  font-weight:400;letter-spacing:-.01em;color:var(--night-ink);max-width:30ch;text-wrap:balance;
}

/* One action: a plain lined rectangle holding the field and its button. Square corners, no fill. */
.cta{
  position:relative;margin:28px 0 0;width:min(420px,100%);
  display:flex;align-items:stretch;border:1px solid var(--night-line);border-radius:0;
  background:rgba(8,11,28,.25);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  transition:border-color .3s ease,opacity 1.2s ease;
}
.cta:focus-within{border-color:var(--night-ink)}
.cta input{
  appearance:none;-webkit-appearance:none;border:0;outline:none;border-radius:0;background:none;
  flex:1;min-width:0;height:50px;padding:0 16px;
  font:inherit;font-size:16px;font-weight:400;letter-spacing:-.005em;text-align:left;
  color:var(--night-ink);caret-color:var(--night-ink);
  transition:opacity .9s ease,transform .9s ease,filter .9s ease;
}
.cta input::placeholder{color:var(--night-soft);opacity:1}
.cta input:-webkit-autofill{-webkit-text-fill-color:var(--night-ink);transition:background-color 9999s ease 0s}

.cta button{
  appearance:none;-webkit-appearance:none;border:0;border-left:1px solid var(--night-line);border-radius:0;
  cursor:pointer;flex:none;padding:0 20px;background:none;color:var(--night-ink);
  font:inherit;font-size:16px;font-weight:400;letter-spacing:-.005em;white-space:nowrap;
  transition:background-color .25s ease,color .25s ease,opacity .6s ease;
}
.cta button:hover,.cta button:focus-visible{background:var(--night-ink);color:var(--night-2)}
.cta button:focus{outline:none}
.cta:focus-within button{border-left-color:var(--night-ink)}

.cta-error{
  position:absolute;left:0;right:0;top:100%;margin:12px 0 0;text-align:center;
  font-size:15px;line-height:1.4;color:var(--night-soft);
}

/* Sent: the typed address drifts up and dissolves into the sky; then the capsule goes. */
.cta.sending input{opacity:0;transform:translateY(-24px);filter:blur(3px)}
.cta.sending button{opacity:0}

/* Arrival: the sky is already there; the name fades in, then the line, then the action. */
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes leave{from{opacity:1}to{opacity:0;visibility:hidden}}
.wordmark{animation:rise 1.4s ease .3s both}
.line{animation:rise 1.2s ease .9s both}
.cta{animation:rise 1.2s ease 1.3s both}
.cta.sent{animation:leave 1.2s ease both;pointer-events:none}

@media (prefers-reduced-motion: reduce){
  .wordmark,.line,.cta{animation:none}
  .cta.sent{animation:leave .6s ease both}
  .cta,.cta input,.cta button{transition:opacity .6s ease,background-color .25s ease,color .25s ease,border-color .3s ease}
  .cta.sending input{transform:none;filter:none}
}
