/* Afflato's coming-soon page. The plugin's world (DESIGN.md) opened up for a window:
   warm charcoal under a creamy light, the wordmark in clear water, fine instrument
   linework, and one rich colour, ultramarine, only where breath and action live.
   Activate is the wordmark only; every other word is in the plugin's mono. */

@font-face {
  font-family: "Activate";
  src: url("fonts/Activate-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Afflato UI";
  src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Afflato UI";
  src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --ground: #161210;
  --ground-deep: #0f0c0a;
  --line: #2f2822;
  --line-strong: #4a4037;
  --well: #0d0a08;
  --pad-top: #332b25;
  --pad-edge: #231e1a;
  --face-1: #2e2722;
  --face-2: #27211c;
  --face-3: #221d19;
  --face-4: #2b241f;

  --text: #efe6da;            /* cream */
  --muted: #9d917f;
  --cream-light: 244, 228, 204;

  /* Ultramarine, first ground from lapis: the one rich colour. */
  --lapis: #2c33c4;           /* pigment ultramarine, a little violet: fills (cream text on it, 8:1) */
  --lapis-deep: #232a9f;
  --lapis-light: #848bf4;     /* lines and marks on the ground */
  --clip: #f06a5a;
  --focus: rgba(239, 230, 218, 0.7);

  --font-logo: "Activate", sans-serif;
  --font: "Afflato UI", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  background: var(--ground-deep);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }

/* In-page links glide rather than jump; never for people who've asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

::selection { background: color-mix(in srgb, var(--lapis) 60%, transparent); color: var(--text); }

button { font: inherit; color: inherit; }

a { color: inherit; text-decoration: underline 1px var(--line-strong); text-underline-offset: 4px; transition: text-decoration-color 200ms var(--ease); }
a:hover { text-decoration-color: var(--lapis-light); }

:focus-visible { outline: 1px dashed var(--focus); outline-offset: 3px; border-radius: 6px; }

/* The creamy warmth over everything: a soft cream light from above, a little warmth
   pooled low, and fine grain. Plain alpha and a grain picture: a fixed layer with a
   blend mode or an SVG noise filter blanks the clipped details in Chrome. */
.warmth {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    radial-gradient(110% 70% at 50% -12%, rgba(var(--cream-light), 0.075) 0%, rgba(var(--cream-light), 0) 62%),
    radial-gradient(90% 50% at 50% 115%, rgba(214, 168, 116, 0.04) 0%, rgba(214, 168, 116, 0) 70%);
}

.warmth::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: url("images/grain.png");
  background-size: 180px 180px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, var(--ground) 0%, var(--ground) 55%, var(--ground-deep) 100%);
}

main > section,
main > figure,
main > footer { position: relative; }

/* The stage: one window of water, with the wordmark in it and the plugin floating below. */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 24px;
}

.water {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 100svh;
  pointer-events: none;
}

.stage > :not(.water, .marks) { position: relative; }

.edge a { text-decoration: none; color: inherit; transition: color 200ms var(--ease); }
.edge a:hover { color: var(--text); }

/* Registration marks at the corners of the first window, like an instrument's face. */
.marks {
  position: absolute;
  inset: 20px 20px auto;
  height: calc(100svh - 40px);
  pointer-events: none;
}

.marks i {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid var(--line-strong);
}

.marks i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.marks i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.marks i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.marks i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.edge {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1320px;
  padding: 30px 26px 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The title, as in the plugin: the wordmark between two hairlines, here tick-ended. */
.title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  width: 100%;
  max-width: 1320px;
  margin-top: clamp(44px, 9svh, 104px);
}

.rule {
  position: relative;
  height: 1px;
  background: var(--line);
}

.rule::before {
  content: "";
  position: absolute;
  top: -4px;
  width: 1px;
  height: 9px;
  background: var(--line-strong);
}

.title .rule:first-child::before,
.meaning .rule:first-child::before { left: 0; }
.title .rule:last-child::before,
.meaning .rule:last-child::before { right: 0; }

.wordmark {
  margin: 0;
  font-family: var(--font-logo);
  font-size: clamp(52px, 9vw, 132px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}

/* Drawn into the water instead (water.js); the text stays for layout and screen readers. */
.wordmark.in-water { color: transparent; }

.breathe {
  margin: clamp(16px, 2.6svh, 26px) 0 0;
  font-size: clamp(16px, 1.5vw, 19px);
  letter-spacing: 0.02em;
  color: var(--text);
  opacity: 0.88;
}

.lede {
  max-width: 52ch;
  margin: 12px 0 0;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.65;
  text-align: center;
  color: rgba(239, 230, 218, 0.74);
  text-wrap: balance;
}

/* The plugin itself, floating in the water. */
.window {
  width: min(1040px, 100%);
  margin: clamp(64px, 9svh, 104px) 0 0;
}

.window img,
.moods img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 236, 214, 0.08),
    0 18px 36px -18px rgba(0, 0, 0, 0.6),
    0 50px 100px -40px rgba(0, 0, 0, 0.85);
}

/* Hear it ------------------------------------------------------------------ */

.listen {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 520px);
  margin-top: clamp(28px, 4.5svh, 52px);
}

/* The harmonic series: twelve lines, as tall as each harmonic of the note is loud,
   with the breath between them in ultramarine. Still, it shows the series itself. */
.series {
  width: 100%;
  margin: 0;
}

.series canvas {
  display: block;
  width: 100%;
  height: 56px;
}

.series-scale {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  opacity: 0.8;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 28px;
  width: 100%;
  margin-top: 24px;
}

.heard {
  justify-self: end;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  min-width: 104px;
  min-height: 48px;
}

.heard.idle .heard-note { display: none; }

.heard-note {
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.heard-note sub {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: baseline;
}

.heard-hz { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Drawn accidentals, as on the plugin's screen: the mono has no ♯ or ♭. */
.acc {
  display: inline-block;
  width: 0.34em;
  height: 0.54em;
  margin-left: 0.05em;
  vertical-align: 0.17em;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.acc .beam { stroke-width: 2.6; }

/* The neoprene pad, from the plugin. */
.pad {
  padding: 0;
  border: 0;
  background: none;
  border-radius: 22px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pad-face {
  position: relative;
  display: block;
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background:
    radial-gradient(90% 70% at 30% 15%, rgba(255, 236, 214, 0.035) 0%, rgba(255, 236, 214, 0) 70%),
    linear-gradient(160deg, var(--face-1) 0%, var(--face-2) 60%, var(--face-3) 100%);
  box-shadow:
    -4px -4px 10px rgba(255, 236, 214, 0.035),
    6px 9px 16px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 236, 214, 0.06),
    inset 0 -5px 10px rgba(0, 0, 0, 0.18);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

/* Fine rubber grain. */
.pad-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.45;
  mix-blend-mode: soft-light;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='64' height='64' filter='url(%23n)'/></svg>");
}

.pad:hover .pad-face {
  box-shadow:
    -4px -4px 10px rgba(255, 236, 214, 0.05),
    6px 9px 16px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 236, 214, 0.08),
    inset 0 -5px 10px rgba(0, 0, 0, 0.16);
}

.pad:active .pad-face { transform: scale(0.97); }

/* The play pad is the page's one piece of coloured neoprene: matte pigment ultramarine,
   lit from the upper left like every pad, pressed in while it plays. */
.pad-play .pad-face {
  background:
    radial-gradient(90% 70% at 30% 15%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #353cce 0%, var(--lapis) 55%, var(--lapis-deep) 100%);
  box-shadow:
    -4px -4px 10px rgba(255, 236, 214, 0.035),
    6px 9px 16px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -5px 10px rgba(8, 10, 50, 0.3);
}

.pad-play[aria-pressed="true"] .pad-face {
  transform: translateY(1px);
  background: linear-gradient(160deg, var(--lapis-deep) 0%, #282fb4 60%, var(--lapis) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 4px 5px 10px rgba(6, 8, 40, 0.5),
    inset -3px -3px 8px rgba(255, 255, 255, 0.05),
    0 1px 0 rgba(255, 236, 214, 0.04);
}

.pad:focus-visible { outline-offset: 6px; border-radius: 27px; }

.glyph {
  position: absolute;
  inset: 12px;
  width: 50px;
  height: 50px;
  fill: none;
  stroke: var(--text);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 200ms var(--ease);
}

.glyph .pause,
.pad[aria-pressed="true"] .glyph .play { display: none; }
.pad[aria-pressed="true"] .glyph .pause { display: inline; }

.pad.loading .glyph { opacity: 0.35; }

/* Dry or Afflato: a sunk strip with the chosen one raised. */
.versions {
  justify-self: start;
  display: flex;
  gap: 2px;
  height: 28px;
  padding: 2px;
  border-radius: 8px;
  background: var(--well);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 236, 214, 0.04);
}

.versions button {
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms var(--ease);
}

.versions button:hover { color: var(--text); }

.versions button[aria-checked="true"] {
  color: var(--text);
  background: linear-gradient(180deg, var(--pad-top), var(--pad-edge));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 236, 214, 0.08);
}

.timeline {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 24px;
  font-size: 11px;
  color: var(--muted);
}

.progress {
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--lapis-light);
  transform: scaleX(0);
  transform-origin: left;
}

.caption {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}

/* What it is, what the name means, and the waitlist. ------------------------- */

/* What it does: one panel of the plugin at a time, lifted out onto the ground, with its
   words beside it; rows alternate sides. Each row starts with the instrument's mark:
   a hairline with a tick. */
.features {
  display: flex;
  flex-direction: column;
  gap: clamp(88px, 12svh, 136px);
  width: min(100% - 48px, 1040px);
  margin-top: clamp(136px, 18svh, 200px);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}

.feature.flip .panel { order: 2; }

.feature .panel {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--r) / var(--w) * 100%) / calc(var(--r) / var(--h) * 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 26px 48px -22px rgba(0, 0, 0, 0.8);
}

.feature-text h2 {
  position: relative;
  margin: 0 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.9;
}

.feature-text h2::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 1px;
  height: 9px;
  background: var(--line-strong);
}

.feature-text p {
  max-width: 40ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(239, 230, 218, 0.72);
}

/* The cream finish. */
.moods {
  width: min(100% - 48px, 1040px);
  margin: clamp(128px, 17svh, 184px) 0 0;
}

.meaning {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  width: min(100% - 48px, 1040px);
  margin-top: clamp(136px, 18svh, 200px);
  text-align: center;
}

.meaning-word {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.meaning-line {
  margin: 0;
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--text);
  opacity: 0.9;
}

.moods figcaption {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100% - 48px, 560px);
  margin-top: clamp(112px, 15svh, 168px);
  text-align: center;
}

.about p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  text-wrap: pretty;
}

.about .families {
  font-size: 13px;
  color: var(--text);
  opacity: 0.86;
}

.join {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 56px;
}

.join-label {
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The presets bar's sunk well, with a raised ultramarine chip. */
.well {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(100%, 380px);
  height: 38px;
  padding: 0 4px 0 14px;
  border-radius: 10px;
  background: var(--well);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 236, 214, 0.04);
  transition: box-shadow 200ms var(--ease);
}

.well:focus-within { box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line-strong); }

.well input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  caret-color: var(--lapis-light);
}

.well input::placeholder { color: var(--muted); }

/* A field only bots fill in. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.chip {
  flex: none;
  height: 30px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #353cce 0%, var(--lapis) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 8px -4px rgba(0, 0, 0, 0.8);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms var(--ease), filter 160ms var(--ease);
}

.chip:hover { background: linear-gradient(180deg, #3b43d6 0%, #3037cb 100%); }
.chip:active { transform: translateY(1px); }
.chip:disabled { opacity: 0.5; cursor: default; }

.join-status {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Red means clipped, nothing else (DESIGN.md): a problem here is said in words, in cream. */
.join-status.ok,
.join-status.error { color: var(--text); }

.join.done .well { display: none; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1372px;
  margin-top: 0;
  padding: 120px 50px 30px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 600px) {
  .marks { inset: 12px 12px auto; height: calc(100svh - 24px); }
  .edge { padding: 22px 8px 0; letter-spacing: 0.1em; }
  .edge .wide { display: none; }
  .title { gap: 12px; margin-top: clamp(56px, 13svh, 120px); }
  .wordmark { font-size: clamp(44px, 16vw, 92px); }
  .series canvas { height: 52px; }
  .controls { column-gap: 14px; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .panel { order: 0; }
  .meaning { grid-template-columns: 1fr; gap: 20px; }
  .meaning .rule { display: none; }
  .heard { min-width: 76px; }
  .heard-note { font-size: 24px; }
  .versions button { padding: 0 8px; }
  .footer { flex-direction: column; align-items: center; gap: 10px; padding-inline: 24px; }
}
