/* Music API early access (site/api-early-access.mjs): the landing pages' type and surfaces (as ACE-Step's, public/ace-step.css,
   and Home's .hf-* ) — Display hero, Heading 1 sections, Body Large copy, the Home button, dialog-style fields */
.api-access * { box-sizing: border-box; }
.api-access p { margin: 0; }
.api-wrap { max-width: 1300px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

/* the hero: Home's glow (site.css .hero-glow — the same place in the frame, rising from the bottom, dimmed as Home's) and its
   fade into the page's black at the bottom, so it ends with no edge */
.api-hero { position: relative; overflow: hidden; isolation: isolate; min-height: min(800px, calc(100vh - 82px)); padding: 100px 0; display: flex; align-items: center; }
.api-hero::before { content: ''; position: absolute; z-index: -1; left: -22.69%; top: -10.5%; width: 145.37%; height: 143.1%; pointer-events: none;
  background: url('/public/assets/hero-glow.webp') center / 100% 100% no-repeat; filter: brightness(.75); }
.api-hero::after { content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: min(45%, 420px); pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.05) 15%, rgba(0,0,0,.16) 30%, rgba(0,0,0,.33) 45%, rgba(0,0,0,.53) 60%, rgba(0,0,0,.73) 75%, rgba(0,0,0,.9) 88%, #000 100%); }
.api-hero .api-wrap { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.api-kicker { font-size: 14px; line-height: 17px; opacity: .6; }
.api-access h1 { margin: 0; max-width: 800px; font-size: 60px; line-height: 74px; font-weight: 300; }
.api-access h2 { margin: 0; font-size: 48px; line-height: 60px; font-weight: 400; }
.api-intro, .api-application > div > p, .api-faq details p { font-size: 14px; line-height: 28px; color: rgb(255 255 255 / .8); }
.api-intro { max-width: 520px; }

/* the Home button (.hf-btn): white, 50 tall */
.api-access .api-button { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 20px; border: 0; border-radius: 20px;
  background: #fff; color: #000; font: 300 14px/17px var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .18s ease; }
@media (hover: hover) { .api-access .api-button:hover:not(:disabled) { background: var(--hover-light); } }
.api-access .api-button:focus-visible, .api-access summary:focus-visible { outline: 2px solid var(--main-light); outline-offset: 3px; }
.api-access .api-button:disabled { opacity: .4; cursor: wait; }

/* the application: what to tell us on the left, the form on the right */
.api-application { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding-top: 100px; padding-bottom: 100px; border-top: 1px solid var(--bg-bright); scroll-margin-top: 82px; }
.api-application > div { display: flex; flex-direction: column; gap: 20px; }
.api-application > div > p { max-width: 520px; }
.api-form { display: flex; flex-direction: column; gap: 20px; }
.api-form label, .api-form fieldset { display: flex; flex-direction: column; gap: 10px; font-size: 12px; line-height: 15px; }
.api-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.api-form legend { padding: 0; margin-bottom: 10px; font-size: 12px; line-height: 15px; }
.api-field-help { font-size: 12px; line-height: 20px; color: rgb(255 255 255 / .6); }
.api-volume { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* the fields: as the sign-in dialogs' (58 tall, r16, a 1px BG Bright edge, 14 Light) */
.api-form input, .api-form textarea, .api-form select { width: 100%; height: 58px; padding: 0 19px; border: 1px solid var(--bg-bright); border-radius: 16px;
  background: var(--bg-dark); color: #fff; font: 300 14px/17px var(--font); outline: none; transition: border-color .18s ease; }
.api-form textarea { height: auto; min-height: 100px; padding: 19px; resize: vertical; }
.api-form select { appearance: none; -webkit-appearance: none; padding-right: 47px; cursor: pointer;
  background: var(--bg-dark) url('/public/assets/chevron-down.svg') right 19px center / 14px 14px no-repeat; }
.api-form select:invalid { color: rgb(255 255 255 / .5); }
.api-form option { color: #fff; background: var(--bg-dark); }
.api-form ::placeholder { color: rgb(255 255 255 / .5); }
@media (hover: hover) { .api-form :is(input, textarea, select):hover { border-color: var(--hover-dark); } }
.api-form :is(input, textarea, select):focus { border-color: rgb(255 255 255 / .35); }
/* a field left wrong (public/api-early-access.js): a red edge, its reason under it in Err, 11 (as the sign-in dialogs') */
.api-form :is(input, textarea, select)[aria-invalid=true], .api-form :is(input, textarea, select)[aria-invalid=true]:is(:hover, :focus) { border-color: var(--err); }
.api-field-error { font-size: 11px; line-height: 15px; color: var(--err); }
.api-form .api-button { align-self: flex-start; }
.api-note { font-size: 12px; line-height: 15px; color: var(--err); }
.api-form .api-note { margin-top: -10px; } /* (10 under its button) */

/* Application received: the Create modal's frame */
.api-confirmation { width: min(437px, calc(100vw - 32px)); padding: 30px; border: 1px solid var(--bg-bright); border-radius: 30px; color: #fff; background: var(--bg-dark);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.api-confirmation[open] { display: flex; flex-direction: column; gap: 20px; }
.api-confirmation::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.api-access .api-confirmation h2 { font-size: 20px; line-height: 25px; font-weight: 300; }
.api-confirmation p { font-size: 14px; line-height: 28px; color: rgb(255 255 255 / .8); }
.api-confirmation form { margin: 0; }
.api-confirmation .api-button { width: 100%; }

/* the questions: as the other pages' FAQ (Pricing, the landing pages: public/landing-figma.css .lp-faq) — the title over
   them in the middle, an 800 column of 80-tall rows, no fill under the pointer, the answer at .5 */
.api-application.api-faq { display: flex; flex-direction: column; align-items: center; gap: 60px; }
.api-faq h2 { text-align: center; }
.api-faq > div { width: min(800px, 100%); display: flex; flex-direction: column; gap: 20px; }
.api-faq details { border-bottom: 1px solid var(--bg-bright); }
.api-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 60px; min-height: 80px; list-style: none;
  font-size: 14px; line-height: 17px; cursor: pointer; }
.api-faq summary::-webkit-details-marker { display: none; }
.api-faq summary::after { content: ''; flex: none; width: 14px; height: 14px; background: url('/public/assets/chevron-down.svg') center / contain no-repeat; transition: transform .2s ease; }
.api-faq details[open] summary::after { transform: rotate(180deg); }
.api-faq details p { margin: 0 0 24px; color: #fff; opacity: .5; }

@media (prefers-reduced-motion: reduce) { .api-access .api-button, .api-form :is(input, textarea, select), .api-faq summary::after { transition: none; } }

@media (max-width: 900px) {
  .api-hero { min-height: 0; padding: 60px 0; }
  .api-access h1 { font-size: 40px; line-height: 50px; }
  .api-access h2 { font-size: 36px; line-height: 46px; }
  .api-application { grid-template-columns: 1fr; gap: 40px; padding-top: 60px; padding-bottom: 60px; }
  .api-application h2 br { display: none; }
}
@media (max-width: 520px) {
  .api-wrap { padding-left: 20px; padding-right: 20px; }
  .api-access h1 { font-size: 32px; line-height: 40px; }
  .api-access h2 { font-size: 30px; line-height: 38px; }
  .api-volume { grid-template-columns: 1fr; }
  .api-access .api-button, .api-form .api-button { align-self: stretch; width: 100%; }
}

/* the application's moving background (public/api-tide.js): a tide of liquid metal in the Heat colours, drawn as a fine
   dot mesh; dimmed, and faded out at its top and bottom so it meets the black of its neighbours.
   It stays still in the window, seen through the section as the page scrolls past it: its dots are a pixel apart, and
   moved with the page they fell between the screen's pixels each frame (a display scaled 125 % or 150 %, a scroll part
   way), the mesh flickering. Fixed, it never moves on the screen: the section clips it, top and bottom (its border line
   left showing), the window's width across; the fades are a black veil over it, the section's own */
.api-tide-host { position: relative; isolation: isolate; clip-path: inset(1px -100vw 0); }
.api-tide { position: fixed; z-index: -1; top: 0; left: 0; width: 100%; height: 100%; display: block; pointer-events: none; opacity: .5;
  image-rendering: pixelated; }
.api-tide-host::after { content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(to bottom, #000, rgb(0 0 0 / 0) 22%, rgb(0 0 0 / 0) 78%, #000); }
