/*
 * AliciaLabs. Bold condensed capitals on a light page: dark ink, short purple dashes around the headings, dots
 * between words, the logo large on a soft glow, and a ribbon for the form's button. Nothing on the page points
 * at the form or asks for a message: it is simply there, further down (her call). Fonts are served from this
 * site (see /fonts and its licence).
 */

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
  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: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: block;
  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;
}
/* Names with letters such as ė, š and ł: fetched only when one is on the page. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-700-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  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: "Barlow";
  src: url("/fonts/barlow-400-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --paper: #fbfafd;
  /* The wordmark's own indigo, so the lettering and the logo read as one family. */
  --ink: #140074;
  --text: #4a4568;
  --dim: #6d6889;
  --accent: #a400ff;
  /* The logo's violet to magenta, a shade deeper so white lettering on it stays easy to read. */
  --g1: #6a0df0;
  --g2: #a400f5;
  --g3: #c400e6;
  --danger: #b3264f;
  --select: rgba(164, 0, 255, 0.18);

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: Barlow, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: 22px;
}
@media (min-width: 600px) {
  :root { --gutter: 36px; }
}
@media (min-width: 900px) {
  :root { --gutter: 48px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* A stripe of the logo's colours along the very top. */
body::before {
  content: "";
  flex: none;
  height: 6px;
  background: linear-gradient(90deg, var(--g1), var(--g2) 55%, var(--g3));
}
/* The logo's glow reaches past the page's edge on a phone; it is clipped here so the page never scrolls sideways. */
main { flex: 1; overflow-x: hidden; overflow-x: clip; }
img, svg { display: block; }
p { margin: 0; }
::selection { background: var(--select); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
a, button, label { -webkit-tap-highlight-color: transparent; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Everything set in the condensed capitals. */
h1, h2, h3, .areas, .field label, .topics legend, .chip span, .ribbon, .link, .foot {
  font-family: var(--display);
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; font-weight: 700; color: var(--ink); }

/* Header: the logo and nothing else. */
.top { display: flex; align-items: center; justify-content: center; height: 72px; }
.logo { display: block; }
.logo img { height: 28px; width: auto; }
@media (min-width: 900px) {
  .top { height: 96px; }
  .logo img { height: 34px; }
}

/* A heading framed by two short dashes. */
.title { display: grid; justify-items: center; gap: clamp(16px, 2.2vw, 26px); }
.title::before, .title::after { content: ""; width: 40px; height: 6px; background: var(--accent); }

/*
 * Hero. Its rows keep the same even spacing on every screen. It is never stretched to fill a tall one: that
 * left wide empty bands above the statement and under the logo (her call).
 */
.hero { position: relative; z-index: 0; container-type: inline-size; text-align: center; padding-block: clamp(26px, 6vh, 60px) clamp(56px, 9vh, 96px); }
h1 {
  /* Three lines on a phone, two on a tablet, one on a desktop, each sized to its width. */
  font-size: min(calc((100vw - 2 * var(--gutter)) / 5.9), 5rem);
  font-size: min(17cqi, 5rem, max(22svh, 2.75rem));
  line-height: 0.92;
  letter-spacing: 0.005em;
}
h1 span { display: block; }
@media (min-width: 560px) {
  h1 { font-size: min(12cqi, 6.75rem, max(22svh, 2.75rem)); }
  h1 span + span { display: inline; }
}
@media (min-width: 1024px) {
  h1 { font-size: min(9.2cqi, 6.25rem, max(22svh, 2.75rem)); }
  h1 span { display: inline; }
}

.areas {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  margin: clamp(22px, 3vw, 34px) 0 0; padding: 0; list-style: none;
  color: var(--ink); font-weight: 600; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem); line-height: 1.3; letter-spacing: 0.05em;
}
.areas li { display: flex; align-items: center; white-space: nowrap; }
.areas li + li::before {
  content: ""; flex: none;
  width: 0.26em; height: 0.26em; margin: 0 0.6em;
  border-radius: 50%; background: var(--accent);
}
/* On a phone: three on the first line, two on the second, and no dot starting a line. */
.areas::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
.areas li:nth-child(n + 4) { order: 2; }
.areas li:nth-child(4)::before { display: none; }
@media (min-width: 560px) {
  .areas::after { display: none; }
  .areas li:nth-child(4)::before { display: block; }
}

.lede { margin: 14px auto 0; max-width: 54ch; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); text-wrap: balance; }
/* Once a message has gone, the line above the form steps aside for the reply. */
.contact.is-sent > .lede { display: none; }

/*
 * The logo, large, on a soft glow with a faint grid of dots (her favourite from the first version). It sits
 * behind the hero's words and the form's heading, so its glow can spread without covering anything.
 */
.art {
  position: relative; z-index: -1;
  width: clamp(236px, 33vw, 420px);
  margin: clamp(44px, 6vw, 68px) auto 0;
}
.art::before {
  content: "";
  position: absolute; inset: -40% -48%; pointer-events: none;
  background:
    radial-gradient(42% 46% at 44% 58%, rgba(164, 0, 255, 0.27), transparent 72%),
    radial-gradient(34% 40% at 70% 38%, rgba(214, 0, 248, 0.16), transparent 70%),
    radial-gradient(30% 36% at 24% 72%, rgba(98, 2, 245, 0.17), transparent 70%);
  /* Drifts a little the other way when the logo leans toward the pointer. */
  translate: calc(var(--tx, 0) * -16px) calc(var(--ty, 0) * -12px);
  transition: translate 0.9s var(--ease);
}
.art::after {
  content: "";
  position: absolute; inset: -46% -58%; pointer-events: none;
  background: radial-gradient(rgba(20, 0, 116, 0.17) 1px, transparent 1.3px) center / 22px 22px;
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 8%, transparent 76%);
  mask-image: radial-gradient(50% 50% at 50% 50%, #000 8%, transparent 76%);
}
/* On a computer the logo leans a few degrees toward the pointer (app.js sets --tx and --ty). */
.art-tilt {
  position: relative; z-index: 1;
  transform: perspective(900px) rotateX(calc(var(--ty, 0) * -6deg)) rotateY(calc(var(--tx, 0) * 8deg));
  transition: transform 0.7s var(--ease);
}
.art-mark { display: block; width: 100%; height: auto; overflow: visible; }

/* Contact */
.contact { position: relative; z-index: 1; text-align: center; padding-block: clamp(20px, 4vw, 44px) clamp(72px, 10vw, 128px); scroll-margin-top: 10px; }
/* The form's heading is a plain label, a good deal smaller than the statement at the top. */
h2 { font-size: clamp(2.25rem, 1.9rem + 1.6vw, 3rem); line-height: 0.95; letter-spacing: 0.02em; }
.contact .title { gap: clamp(14px, 1.8vw, 20px); }
.contact .title::before, .contact .title::after { width: 28px; height: 4px; }
.panel { max-width: 640px; margin: clamp(36px, 5vw, 56px) auto 0; }

form { display: grid; gap: 36px; }
.pair { display: grid; gap: 36px; }
@media (min-width: 600px) {
  .pair { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}

.field label, .topics legend {
  display: block; width: 100%; padding: 0;
  color: var(--ink); font-weight: 600; font-size: 1.25rem; line-height: 1; letter-spacing: 0.08em;
}
.control { position: relative; }
.control input, .control textarea {
  display: block; width: 100%; margin: 0;
  border-radius: 0; background: transparent;
  color: var(--ink); caret-color: var(--accent);
  appearance: none; -webkit-appearance: none; outline: none;
}
.control input {
  padding: 14px 6px 12px;
  border: 0; border-bottom: 2px solid var(--ink);
  font: 400 1.1875rem/1.4 var(--body); text-align: center;
}
.control textarea {
  min-height: 176px; margin-top: 14px; padding: 16px 18px;
  border: 2px solid var(--ink);
  font: 400 1.125rem/1.5 var(--body); text-align: left;
  resize: none; overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
/* Focus: the logo's colours open out from the middle of the line, or frame the message box. */
.control-line::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--g1), var(--g2) 55%, var(--g3));
  transform: scaleX(0);
  transition: transform 0.45s var(--ease);
}
.control-line:focus-within::after { transform: scaleX(1); }
.control textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.field.invalid .control-line::after { background: var(--danger); transform: scaleX(1); }
.field.invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
input:-webkit-autofill, textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--accent);
  box-shadow: 0 0 0 100px var(--paper) inset;
}

.error { margin-top: 10px; font-size: 0.9375rem; line-height: 1.4; color: var(--danger); }
.error:empty { display: none; }
.under { display: flex; justify-content: center; gap: 16px; }
.count { margin-top: 10px; font-size: 0.875rem; line-height: 1.4; color: var(--dim); font-variant-numeric: tabular-nums; }
.count.is-near { color: var(--danger); }

.topics { margin: 0; padding: 0; border: 0; min-width: 0; }
.topics legend { margin-bottom: 16px; }
.topics legend span { margin-left: 8px; color: var(--dim); font: 400 0.9375rem/1 var(--body); letter-spacing: 0; text-transform: none; }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.chip { position: relative; display: block; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: grid; place-items: center;
  height: 48px; padding: 0 10px;
  border: 2px solid var(--ink);
  color: var(--ink); font-weight: 600; font-size: 1.1875rem; line-height: 1; letter-spacing: 0.06em; white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.chip input:checked + span {
  border-color: transparent; color: #fff;
  background: linear-gradient(90deg, var(--g1), var(--g2) 55%, var(--g3)) border-box;
}
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) {
  .chip input:not(:checked):hover + span { border-color: var(--accent); color: var(--accent); }
}
@media (min-width: 600px) {
  .chips { display: flex; flex-wrap: wrap; justify-content: center; }
  .chip span { height: 46px; padding: 0 20px; }
}

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

/* The ribbon: notched on the left, pointed on the right. It is as wide as its word needs, not the screen. */
.send { display: grid; justify-items: center; gap: 18px; margin-top: 6px; }
.ribbon {
  display: block; max-width: 100%; padding: 0;
  border: 0; background: none; color: #fff; cursor: pointer; text-decoration: none;
  transition: transform 0.2s var(--ease);
}
.ribbon-shape {
  position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: center;
  height: 62px; min-width: 200px; padding: 0 30px;
  background: linear-gradient(90deg, var(--g1), var(--g2) 55%, var(--g3));
  clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%, 17px 50%);
  /* One line on any phone: the lettering scales down with the screen. */
  font-weight: 700; font-size: clamp(1.0625rem, 5.6vw, 1.625rem); line-height: 1; letter-spacing: 0.06em; white-space: nowrap;
}
.ribbon-shape::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--ink); opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.ribbon:active { transform: scale(0.985); }
.ribbon:focus-visible .ribbon-shape::before { opacity: 1; }
@media (hover: hover) {
  .ribbon:hover .ribbon-shape::before { opacity: 1; }
}
@media (min-width: 600px) {
  .ribbon-shape { min-width: 220px; padding: 0 48px; }
}
.is-sending .ribbon { pointer-events: none; opacity: 0.7; }
.note { font-size: 0.9375rem; line-height: 1.4; color: var(--dim); }
.form-status { font-size: 1rem; line-height: 1.5; text-wrap: balance; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }

/* After sending */
.sent { display: grid; justify-items: center; outline: none; }
.tick { width: 58px; height: 58px; overflow: visible; }
.tick path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sent h3 { margin-top: 24px; font-size: clamp(2.5rem, 2rem + 2.4vw, 3.5rem); line-height: 0.95; overflow-wrap: anywhere; }
.sent p { margin-top: 14px; max-width: 30ch; text-wrap: balance; }
.link {
  margin-top: 26px; padding: 8px 0;
  border: 0; background: none; cursor: pointer;
  color: var(--ink); font-weight: 600; font-size: 1.25rem; line-height: 1.2; letter-spacing: 0.08em;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 8px;
  transition: color 0.2s var(--ease);
}
@media (hover: hover) {
  .link:hover { color: var(--accent); }
}

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  padding-block: 12px calc(40px + env(safe-area-inset-bottom));
  color: var(--dim); font-weight: 600; font-size: 0.9375rem; line-height: 1; letter-spacing: 0.14em;
}
.foot a {
  display: inline-flex; align-items: center;
  margin-block: -14px; padding: 14px 0;
  color: inherit; text-decoration: none;
  transition: color 0.2s var(--ease);
}
.foot a::before { content: ""; width: 5px; height: 5px; margin: 0 14px; border-radius: 50%; background: var(--accent); }
@media (hover: hover) {
  .foot a:hover { color: var(--ink); }
}

/*
 * Motion. The words arrive once. The logo writes itself in one stroke, its glow opens, and after that it only
 * floats a little, its glow breathes, and a band of light glides along the ribbon every few seconds (that part
 * is in the page itself, as SVG animation).
 */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes dash { from { transform: scaleX(0); } }
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 0; } 2% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes bloom { from { opacity: 0; } }
/* The glow opens to the strength its breathing starts from, so one hands over to the other unseen. */
@keyframes glow { from { opacity: 0; } to { opacity: 0.78; } }
@keyframes breathe { 0%, 100% { opacity: 0.78; scale: 1; } 50% { opacity: 1; scale: 1.06; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.art-ribbon path { stroke-dasharray: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero .title::before, .hero .title::after { animation: dash 0.7s var(--ease) 0.1s both; }
  .hero h1 span, .hero .areas, .hero .lede { animation: rise 0.9s var(--ease) both; }
  .hero h1 span:nth-child(2) { animation-delay: 0.07s; }
  .hero h1 span:nth-child(3) { animation-delay: 0.14s; }
  .hero .areas { animation-delay: 0.26s; }
  .hero .lede { animation-delay: 0.34s; }

  /* One stroke: up and over the A, then round the loop and back, with the speed carried across the join. */
  .art-ribbon path:first-child { animation: draw 0.75s cubic-bezier(0.5, 0, 0.8, 0.6) var(--art-wait, 0.55s) both; }
  .art-ribbon path:last-child { animation: draw 1.3s cubic-bezier(0.2, 0.4, 0.4, 1) calc(var(--art-wait, 0.55s) + 0.81s) both; }
  .art::before { animation: glow 1.8s ease-out calc(var(--art-wait, 0.55s) + 0.3s) both, breathe 9s ease-in-out calc(var(--art-wait, 0.55s) + 2.1s) infinite; }
  .art::after { animation: bloom 1.6s ease-out calc(var(--art-wait, 0.55s) + 0.5s) both; }
  .art-mark { animation: float 8s ease-in-out 3s infinite; }
  /* Further down the page than the first screen (set by app.js): wait, and play on arrival. */
  .art.is-waiting .art-ribbon path { animation: none; stroke-dashoffset: 1; opacity: 0; }
  .art.is-waiting::before, .art.is-waiting::after { animation: none; opacity: 0; }
  .art.is-waiting .art-light { visibility: hidden; }
  .art.has-arrived { --art-wait: 0.1s; }
  /* Well out of sight (set by app.js), the logo rests. */
  .art.is-away::before, .art.is-away .art-mark { animation-play-state: paused; }

  .will-rise { opacity: 0; transform: translateY(16px); }
  .will-rise.has-risen { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

  .sent:not([hidden]) .tick path { stroke-dasharray: 1; animation: draw 0.8s cubic-bezier(0.65, 0, 0.35, 1) 0.1s both; }
  .sent:not([hidden]) .tick path + path { animation-duration: 0.5s; animation-delay: 0.7s; }
  .sent:not([hidden]) h3, .sent:not([hidden]) p, .sent:not([hidden]) .link { animation: rise 0.8s var(--ease) 0.25s both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art-light { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Page not found */
.lost { min-height: calc(100vh - 6px); min-height: calc(100svh - 6px); display: grid; align-content: center; justify-items: center; gap: clamp(26px, 4vw, 40px); padding-block: 48px; text-align: center; }
.lost .logo img { height: 32px; }
.lost h1 { font-size: clamp(2.75rem, 1.6rem + 6vw, 5.5rem); max-width: 12em; }
.lost .ribbon { width: auto; }
.lost .ribbon-shape { min-width: 0; }
