@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #141a45;
  --dusk: #2b3485;
  --violet: #6a5cb0;
  --rose: #d47c9c;
  --peach: #f9ad8a;
  --ground: #1a1f4d;
  --paper: #fff5e8;
  --side: #e2603b;
  --side-deep: #a83b2a;
  --sun: #ffd23f;
  --muted: #bcc1ec;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--ground);
  color: var(--paper);
  font-family: "Bricolage", system-ui, sans-serif;
  font-optical-sizing: auto;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: clip;
}
p, h1, ul { margin: 0; }
a { color: inherit; }
::selection { background: var(--sun); color: var(--night); }
:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
  border-radius: 6px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Top bar, floating over the sky */
.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem var(--gutter);
}
.mark {
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 85%;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.mark:hover { color: var(--sun); }

.lang {
  display: none;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgb(255 245 232 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 245 232 / 0.18);
}
.js .lang { display: flex; }
.lang button {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: none;
  color: var(--paper);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.lang button:hover { background: rgb(255 245 232 / 0.12); }
.lang button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--night);
}
.lang button:focus-visible { outline-offset: 2px; }

/* Hero: a dawn sky with the headline standing on the horizon */
.hero {
  position: relative;
  min-height: max(32rem, 74svh);
  display: grid;
  align-content: end;
  justify-items: center;
  padding: 7rem var(--gutter) 0;
  text-align: center;
}
.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff8 99%, #0000),
    radial-gradient(1px 1px at 22% 34%, #fff6 99%, #0000),
    radial-gradient(2px 2px at 31% 12%, #fff9 99%, #0000),
    radial-gradient(1px 1px at 44% 26%, #fff5 99%, #0000),
    radial-gradient(1.5px 1.5px at 58% 9%, #fff8 99%, #0000),
    radial-gradient(1px 1px at 66% 30%, #fff5 99%, #0000),
    radial-gradient(2px 2px at 77% 17%, #fff9 99%, #0000),
    radial-gradient(1px 1px at 86% 36%, #fff5 99%, #0000),
    radial-gradient(1.5px 1.5px at 93% 11%, #fff7 99%, #0000),
    radial-gradient(1px 1px at 5% 40%, #fff4 99%, #0000),
    radial-gradient(120% 70% at 50% 100%, rgb(249 173 138 / 0.55), #0000 60%),
    linear-gradient(var(--night) 0%, var(--dusk) 38%, var(--violet) 66%, var(--rose) 86%, var(--peach) 100%);
}

.hello {
  font-size: clamp(1.125rem, 2.2vw, 1.625rem);
  font-weight: 500;
  font-stretch: 90%;
  margin-bottom: clamp(0.5rem, 2vh, 1.5rem);
  animation: fade-up 0.9s var(--ease) 0.2s both;
}

.headline {
  position: relative;
  z-index: 2;
  /* The baseline sits on the horizon; descenders dip into the ground. */
  margin-bottom: -0.2em;
  font-size: clamp(3.5rem, 18vw, 19rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  letter-spacing: 0.005em;
}
.letters {
  display: block;
  color: var(--paper);
  text-shadow:
    0.008em 0.008em 0 var(--side),
    0.016em 0.016em 0 var(--side),
    0.024em 0.024em 0 var(--side),
    0.032em 0.032em 0 var(--side),
    0.04em 0.04em 0 var(--side-deep),
    0.048em 0.048em 0 var(--side-deep);
}
.word {
  display: inline-block;
  white-space: nowrap;
}
.ch {
  position: relative;
  display: inline-block;
}
.ch.flying { z-index: 5; }
.glyph {
  display: inline-block;
  transform-origin: 50% 80%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.glyph:active { cursor: grabbing; }
/* Contact shadow on the ground; script.js shrinks it as the letter lifts off. */
.shade {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0.17em;
  height: 0.07em;
  border-radius: 50%;
  background: rgb(20 14 50 / 0.45);
  filter: blur(0.02em);
  pointer-events: none;
  z-index: -1;
}

/* The site's replies once someone has thrown enough letters */
.sign {
  position: absolute;
  z-index: 4;
  top: clamp(6rem, 18vh, 10rem);
  left: 50%;
  max-width: min(22rem, 80vw);
  padding: 0.7rem 1.1rem 0.75rem;
  border-radius: 0.6rem;
  background: var(--sun);
  color: var(--night);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0.25rem 0.3rem 0 var(--night);
  transform: translateX(-50%) rotate(-3deg) scale(0);
  transition: transform 0.5s var(--spring);
  pointer-events: none;
}
.sign:empty { visibility: hidden; }
.sign.show { transform: translateX(-50%) rotate(-3deg) scale(1); }

/* Ground: everything below the horizon */
.ground {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
  background:
    linear-gradient(rgb(249 173 138 / 0.65), rgb(249 173 138 / 0) 2px),
    linear-gradient(#232864, var(--ground) 14rem);
}

.hint {
  display: none;
  max-width: 24rem;
  margin: 0 auto clamp(3rem, 7vw, 5.5rem);
  color: var(--sun);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
  rotate: -1.5deg;
}
.js .hint { display: block; animation: fade-up 0.8s var(--ease) 2s both; }
.hint-arrow {
  display: block;
  width: 1.75rem;
  margin: 0 auto 0.5rem;
}
.hint-touch { display: none; }
@media (pointer: coarse) {
  .hint-fine { display: none; }
  .hint-touch { display: inline; }
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.intro {
  max-width: 30em;
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  font-weight: 450;
  font-stretch: 92%;
  line-height: 1.4;
  text-wrap: pretty;
}

.contact {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 30rem;
  justify-self: end;
}
.contact a {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.25rem 1.1rem;
  border-radius: 1rem;
  background: var(--paper);
  color: var(--night);
  text-decoration: none;
  box-shadow: 0.3rem 0.35rem 0 var(--side);
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--spring), background-color 0.25s;
}
.contact a:hover {
  transform: translate(-0.15rem, -0.2rem) rotate(-0.6deg);
  box-shadow: 0.45rem 0.55rem 0 var(--side);
  background: #fffaf2;
}
.contact a:active {
  transform: translate(0.3rem, 0.35rem);
  box-shadow: 0 0 0 var(--side);
  transition-duration: 0.08s;
}
.contact .k {
  color: #5a5f8f;
  font-size: 0.875rem;
  font-weight: 600;
}
.contact .v {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-weight: 750;
  font-stretch: 88%;
  overflow-wrap: anywhere;
}
.contact li:nth-child(2) a { box-shadow: 0.3rem 0.35rem 0 var(--violet); }
.contact li:nth-child(2) a:hover { box-shadow: 0.45rem 0.55rem 0 var(--violet); }
.contact li:nth-child(2) a:active { box-shadow: 0 0 0 var(--violet); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.5rem var(--gutter) 2rem;
  background: var(--ground);
  border-top: 1px solid rgb(188 193 236 / 0.14);
  color: var(--muted);
  font-size: 0.875rem;
}

/* Non-English visitors: hold the first paint until script.js has swapped the text in.
   The delayed reveal is a fallback in case the script never runs. */
.i18n-pending body {
  visibility: hidden;
  animation: reveal 0s 1.5s forwards !important;
}
@keyframes reveal { to { visibility: visible; } }
@keyframes fade-up {
  from { opacity: 0; translate: 0 0.6rem; }
}

@media (max-width: 52rem) {
  .about { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .contact { max-width: 26rem; justify-self: start; }
}
@media (max-width: 40rem) {
  .hero { min-height: max(26rem, 64svh); padding-top: 5.5rem; }
  .headline { font-size: 23vw; line-height: 0.95; }
  .ground { padding-top: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .hint { display: none !important; }
}
