/* Shared by every page on voidtuber.app. Colours come from the logo (Branding/lettering.py). */
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-display: swap;
             src: url("fonts/alegreya-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-style: italic; font-display: swap;
             src: url("fonts/alegreya-sans-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 500; font-display: swap;
             src: url("fonts/alegreya-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; font-display: swap;
             src: url("fonts/alegreya-sans-700.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --ink: #0E0B14;
  --paper: #F4F0F7;
  --accent: #D624C4;
  --muted: #A9A3B4;
  --line: #302A39;
  --raised: #1A1622;
  --mono: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", monospace;
  --page: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper);
       font: 400 19px/1.55 "Alegreya Sans", "Segoe UI", "Noto Sans", sans-serif; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; border-radius: 2px; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 14px; }
code { font: 0.8em/1.5 var(--mono); background: var(--raised); padding: 2px 5px; border-radius: 3px;
       overflow-wrap: anywhere; }
h1, h2, h3 { font-weight: 500; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 1; }

.site-head { display: flex; align-items: center; gap: 12px; max-width: var(--page); margin: 0 auto;
             padding: 18px var(--gutter); }
.site-head .home { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 21px; text-decoration: none; }
.site-head .home img { width: 38px; height: 38px; }
.site-head nav { display: flex; gap: clamp(16px, 3vw, 30px); margin-left: auto; min-height: 38px; align-items: center; }
.site-head nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-head nav a:hover { border-bottom-color: var(--line); }
.site-head nav a[aria-current] { border-bottom-color: var(--accent); }

.site-foot { max-width: var(--page); margin: 0 auto; padding: 28px var(--gutter) 44px; color: var(--muted); font-size: 17px;
             display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.site-foot a { color: var(--paper); }

.button { display: inline-block; padding: 11px 20px; border: 1px solid var(--paper); border-radius: 3px; font: inherit;
          font-weight: 500; text-decoration: none; color: var(--paper); background: transparent; cursor: pointer; }
.button:hover { background: var(--paper); color: var(--ink); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 700; }
.button.primary:hover { background: var(--paper); border-color: var(--paper); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.muted { color: var(--muted); }

/* The ensō from the logo, painted once as a single brush stroke. The stroke of .paint is a mask that follows the ring
   clockwise from where the brush lands; with no animation it simply shows the whole ring. */
.ring { display: block; width: 100%; height: auto; overflow: visible; }
.paint { fill: none; stroke: #fff; stroke-width: 270; stroke-dasharray: 1 1; stroke-dashoffset: 0;
         animation: paint 1.3s cubic-bezier(0.62, 0.02, 0.22, 1) both; }
@keyframes paint { from { stroke-dashoffset: 1; } }

/* Download and feedback pages: the heading sits in the hollow of the ring, the content beside it */
.form-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: clamp(24px, 4vw, 64px); align-items: start;
             max-width: var(--page); margin: 0 auto; padding: clamp(12px, 3vw, 36px) var(--gutter) 64px; }
.seal { position: sticky; top: 12px; aspect-ratio: 1; margin: 0 0 0 -8%; container-type: inline-size; }
.seal .ring { position: absolute; inset: 0; }
.seal-text { position: absolute; left: 28%; right: 28%; top: 51.5%; translate: 0 -50%; text-align: center; }
.seal h1 { font-size: 9.4cqw; line-height: 1.02; margin: 0 0 2.4cqw; }
.seal .lede { font-size: 3.9cqw; line-height: 1.25; margin: 0; text-wrap: balance; }
.form-col { padding-top: clamp(0px, 3vw, 40px); }
.sent-line { font-size: clamp(30px, 3.5vw, 40px); line-height: 1.15; margin: 0 0 24px; }
#sent:focus { outline: none; }
form .field { margin: 0 0 24px; padding: 0; border: 0; }
form label, form legend { display: block; font-weight: 500; padding: 0; margin-bottom: 5px; }
form .hint { color: var(--muted); font-size: 17px; margin: 0 0 8px; }
form .choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
form .choices label { display: inline-flex; align-items: center; gap: 9px; font-weight: 400; margin: 0; cursor: pointer;
  padding: 8px 15px 8px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--raised); }
form .choices label:hover { border-color: var(--muted); }
form .choices label:has(:checked) { border-color: var(--accent); }
form input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
form input[type=text], form textarea { width: 100%; padding: 11px 13px; font: inherit; color: var(--paper);
  background: var(--raised); border: 1px solid var(--line); border-radius: 3px; }
form input[type=text]:hover, form textarea:hover { border-color: var(--muted); }
form input[type=text]:focus, form textarea:focus { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: 0; }
form textarea { min-height: 190px; resize: vertical; display: block; }
form input::placeholder { color: #8d8698; }
form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-error { color: var(--paper); border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; margin: 0 0 20px; }
.form-error:empty { display: none; }
.privacy { color: var(--muted); font-size: 17px; margin: 28px 0 0; }

/* Download menu, in the header on every page and as the main button on the landing page */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; rotate: 45deg; }
.menu[open] summary::after { margin-top: 3px; rotate: 225deg; }
.site-head { position: relative; z-index: 5; }
.site-head .menu summary { padding: 4px 0; border-bottom: 2px solid transparent; }
.site-head .menu summary:hover, .site-head .menu[open] summary { border-bottom-color: var(--line); }
.menu-list { position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; width: 270px; padding: 6px; background: var(--raised);
             border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 16px 36px #0E0B14; }
.site-head .menu-list { left: auto; right: 0; }
.menu-list a, .menu-list .soon { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 10px; border-radius: 2px; text-decoration: none; }
.site-head nav .menu-list a { padding: 9px 10px; border: 0; }
.menu-list a:hover, .menu-list a:focus-visible { background: var(--line); }
.menu-list b { font-weight: 500; }
.menu-list span { color: var(--muted); font-size: 17px; white-space: nowrap; }
.menu-list .soon { color: var(--muted); cursor: default; }
.menu-list .soon b { font-weight: 400; }

/* Landing page: the headline over the ensō, with the app in front of the ring's lower edge */
.stage { position: relative; overflow-x: clip; padding-bottom: 8px; }
.hero-band { position: relative; }
.stage .ring { position: absolute; z-index: 0; bottom: -96px; left: calc(50% + 110px); width: clamp(500px, 43vw, 620px); }
.hero { position: relative; z-index: 2; max-width: var(--page); margin: 0 auto;
        padding: clamp(36px, 6vw, 84px) var(--gutter) clamp(44px, 5vw, 64px); }
.hero h1 { font-size: clamp(40px, 5vw, 66px); line-height: 1.05; letter-spacing: -0.012em; margin: 0 0 22px;
           max-width: min(11.5em, 100%); text-wrap: balance; }
.switching { font-size: clamp(20px, 1.8vw, 23px); line-height: 1.38; margin: 0 0 30px; max-width: 26em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero .status { color: var(--muted); font-size: 17px; margin: 0; max-width: 34em; }
.hero .status a { color: var(--paper); }

.shot { position: relative; z-index: 1; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.shot img { width: 100%; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 28px 70px #000; }

.band { max-width: var(--page); margin: 0 auto; padding: clamp(60px, 8vw, 104px) var(--gutter) 0; }
.band h2, .band h3 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.band h2 a { text-decoration: none; }
.band h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.band .section-title { font-size: clamp(32px, 3.4vw, 42px); line-height: 1.1; margin: 0 0 32px; }
.band p { color: var(--muted); }
.band p a { color: var(--paper); }

.basics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(28px, 4vw, 56px); }
.basics p, .panels p { margin: 0; }

.feature { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px clamp(32px, 5vw, 64px); align-items: center; }
.feature h2 { font-size: clamp(32px, 3.4vw, 42px); line-height: 1.1; margin-bottom: 16px; text-wrap: balance; }
.feature figure { margin: 0; }
.feature img, .panels img { border: 1px solid var(--line); border-radius: 8px; }

.panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px clamp(24px, 3vw, 40px); }
/* The windows are different heights: all three are cut to the shortest one, from the top */
.panels img { width: 100%; aspect-ratio: 420 / 460; object-fit: cover; object-position: top; margin-bottom: 20px; }

.install { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 5vw, 64px); margin-bottom: 32px; }
.band ol { margin: 10px 0 14px; padding-left: 24px; }
.band li { margin-bottom: 6px; }
.band li::marker { color: var(--accent); font-weight: 700; }
.band .aside { font-size: 17px; margin: 0; max-width: 72ch; }

.latest { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 8px clamp(32px, 5vw, 64px); }
.latest .section-title { margin: 0; }
.latest .notes { color: var(--paper); max-width: 72ch; margin: 0 0 14px; }

.rule-top { margin-top: clamp(60px, 8vw, 104px); border-top: 1px solid var(--line); }
.hash { font: 13px/1.5 var(--mono); overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .paint { animation: none; }
}
@media (max-width: 960px) {
  .form-page { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  /* The ring steps back to the corner above the headline */
  .stage .ring { top: -28px; bottom: auto; left: auto; right: -56px; width: 300px; }
  .hero { padding-top: 212px; }
  .hero h1 { max-width: 13em; }
  .basics, .feature, .latest { grid-template-columns: minmax(0, 1fr); }
  .install { grid-template-columns: minmax(0, 1fr); }
  .seal { position: relative; top: 0; width: min(100%, 460px); margin: 0; }
  .form-col { width: 100%; max-width: 620px; padding-top: 0; }
}
@media (max-width: 560px) {
  body { font-size: 18px; }
  .site-head .home { font-size: 0; gap: 0; }  /* the mark alone, so the menu fits; screen readers still get the name */
  .site-foot nav { margin-left: 0; }
  .platform .button { flex: 1 1 100%; text-align: center; }
  /* Too small to read inside the ring: the ring moves to the corner and the words sit under it */
  .form-page { justify-items: stretch; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 142px; }
  .stage .ring { top: -22px; right: -34px; width: 190px; }
  .hero .actions > * { flex: 1 1 100%; }
  .hero .menu summary, .hero .actions > .button { display: flex; justify-content: center; }
  .menu-list { width: 100%; min-width: 260px; }
  /* The header menu spans the page here, so it can't open off the edge of the screen */
  .site-head .menu { position: static; }
  .site-head .menu-list { width: auto; min-width: 0; left: var(--gutter); right: var(--gutter); top: 64px; }
  .seal { width: 100%; aspect-ratio: auto; padding-top: 136px; container-type: normal; }
  .seal .ring { inset: -18px -18px auto auto; width: 150px; }
  .seal-text { position: static; translate: none; text-align: left; }
  .seal h1 { font-size: 40px; line-height: 1.1; margin-bottom: 10px; }
  .seal .lede { font-size: 20px; line-height: 1.3; }
}
