/* The two free trial pages on Polar Night (18 Nov 2026). /contact-us is on
   Polar Day in contact.css.
   Follows the /demo pattern (PR #739): a dark page, the form card inset on the
   moving aurora stage (/agents/glass/gradient.js, started by forms.js), violet
   accents. Scoped under #page; tokens from polar-tokens@1.11.0.

   The trial forms are product-owned (they post through functions/api/trial.ts),
   so this file restyles their Webflow markup and changes nothing in it: every
   id, class, name and data attribute the step, validation and submit scripts
   read stays as it was. */
#page {
  color-scheme: dark;
  background: var(--pn-surface-page);
  color: var(--pn-text-body);
  font-family: var(--pn-type-body-family);
  font-size: var(--pn-type-body-size);
  line-height: var(--pn-type-body-line);
  -webkit-font-smoothing: antialiased;
}
#page *,
#page :before,
#page :after {
  box-sizing: border-box;
}
#page :is(h1, h2, h3, p, ul, ol, figure, blockquote) {
  margin: 0;
  padding: 0;
}
#page :is(ul, ol) {
  list-style: none;
}
#page :is(h1, h2, h3, .fp-h) {
  color: var(--pn-text-head);
  font-family: var(--pn-type-heading-family, var(--pn-font-family-sans));
  font-weight: var(--pn-font-weight-medium);
  text-wrap: balance;
}
#page :is(p, li, a, span, label, input, select, button) {
  font-family: inherit;
  letter-spacing: inherit;
}
#page a {
  color: var(--pn-text-link);
  text-underline-offset: var(--pn-space-1);
}
#page :focus-visible {
  outline: var(--pn-focus-width) solid var(--pn-focus);
  outline-offset: var(--pn-focus-offset);
}
#page img {
  max-width: 100%;
}
#page .wrap {
  max-width: calc(var(--pn-layout-container) + 2 * var(--pn-layout-gutter));
  padding-inline: var(--pn-layout-gutter);
  margin-inline: auto;
}
#page .label {
  font: var(--pn-type-label-weight) var(--pn-type-label-size) /
    var(--pn-type-label-line) var(--pn-type-label-family);
  letter-spacing: var(--pn-type-label-tracking);
  text-transform: uppercase;
  color: var(--pn-color-violet-300);
}

/* Header: the /demo focus header (demo.css), logo and a way back. The
   hero's sky runs up under it, so there is no band and no seam. */
#page .fp-head {
  position: relative;
  z-index: 2;
}
#page .fp-head .wrap {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pn-space-4);
}
#page .fp-brand img {
  display: block;
  width: 140px;
  height: auto;
}
#page .fp-back {
  display: inline-flex;
  align-items: center;
  gap: var(--pn-space-2);
  min-height: 44px;
  color: var(--pn-text-head);
  text-decoration: none;
  font: var(--pn-type-ui-weight) var(--pn-type-ui-size) / 1
    var(--pn-type-ui-family);
}
#page .fp-back:hover {
  text-decoration: underline;
}

/* Hero: Polar sky behind the copy and the form stage. */
#page .fp-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: -72px;
  padding: calc(72px + var(--pn-space-12)) 0 var(--pn-space-20);
  background: linear-gradient(
    180deg,
    var(--pn-color-sky-top) 0%,
    var(--pn-color-sky-mid) 38%,
    var(--pn-color-ink-950) 100%
  );
}
#page .fp-grid {
  display: grid;
  gap: var(--pn-space-10);
  align-items: start;
}
@media (width>=1024px) {
  #page .fp-hero {
    padding-top: calc(72px + var(--pn-space-16));
  }
  #page .fp-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
    gap: var(--pn-space-16);
  }
}
#page .fp-copy {
  display: grid;
  gap: var(--pn-space-6);
  align-content: start;
}
@media (width>=1024px) {
  /* The form runs taller than the copy: the copy stays in view beside it
     instead of leaving an empty column. */
  #page .fp-copy {
    padding-top: var(--pn-space-8);
    position: sticky;
    top: var(--pn-space-8);
  }
}
#page .fp-copy h1 {
  font-size: var(--pn-type-title-size);
  line-height: var(--pn-type-title-line);
  letter-spacing: var(--pn-type-title-tracking);
  max-width: 14em;
}
#page .lede {
  font-size: var(--pn-type-lede-size);
  line-height: var(--pn-type-lede-line);
  max-width: var(--pn-type-lede-measure);
}
#page .lede strong {
  color: var(--pn-text-head);
  font-weight: var(--pn-font-weight-medium);
}

/* The aurora stage and the opaque card inset in it, as /demo and the product
   pages' card stages. No text sits on the colour. */
#page .fp-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: calc(var(--pn-radius-2xl) + 8px);
  padding: clamp(var(--pn-space-4), 4.5vw, var(--pn-space-16));
  background: var(--pn-surface-panel);
  box-shadow:
    inset 0 0 0 1px var(--pn-color-alpha-white-10),
    0 40px 90px -40px var(--pn-color-alpha-shade-92);
}
#page .fp-stage-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}
#page .fp-card {
  position: relative;
  z-index: 1;
  border-radius: var(--pn-panel-radius);
  padding: var(--pn-space-8);
  background: var(--pn-surface-panel);
  box-shadow:
    inset 0 0 0 1px var(--pn-color-alpha-white-12),
    0 24px 50px -20px var(--pn-color-alpha-shade-78);
}
@media (width<640px) {
  #page .fp-card {
    padding: var(--pn-space-5);
  }
}
#page .fp-card-head {
  display: grid;
  gap: var(--pn-space-2);
  margin-bottom: var(--pn-space-6);
}
#page .fp-card-head .fp-h {
  font-size: var(--pn-type-h4-size);
  line-height: var(--pn-type-h4-line);
}
#page .fp-card-head p {
  color: var(--pn-text-body);
}
/* Phones and tablets: the form straight after the lede, the rest after it. */
@media (width<1024px) {
  #page .fp-copy {
    display: contents;
  }
  #page .fp-grid {
    gap: var(--pn-space-6);
  }
  #page .fp-side {
    order: 1;
    margin-top: var(--pn-space-2);
  }
  #page .fp-after {
    order: 2;
    margin-top: var(--pn-space-6);
  }
}

/* Section headings on the free trial page. */
#page .fp-section h2 {
  font-size: var(--pn-type-heading-size);
  line-height: var(--pn-type-heading-line);
  letter-spacing: var(--pn-type-heading-tracking);
  max-width: 20em;
}

/* Free trial: works with, the quote, the logo strip, video and features. */
#page .fp-works {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pn-space-3) var(--pn-space-4);
  color: var(--pn-text-subtle);
  font-size: var(--pn-type-small-size);
}
#page .fp-works ul {
  display: flex;
  gap: var(--pn-space-2);
}
#page .fp-works li {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--pn-radius-md);
  background: var(--pn-color-alpha-white-08);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-10);
}
#page .fp-works img {
  width: 22px;
  height: 22px;
}
#page .fp-quote {
  padding-top: var(--pn-space-8);
  border-top: 1px solid var(--pn-border-hairline);
  max-width: 36rem;
  display: grid;
  gap: var(--pn-space-5);
}
#page .fp-quote blockquote p {
  color: var(--pn-text-head);
  font-size: var(--pn-type-lede-size);
  line-height: 1.5;
}
#page .fp-quote figcaption {
  display: flex;
  align-items: center;
  gap: var(--pn-space-3);
}
#page .fp-quote figcaption img {
  width: 44px;
  height: 44px;
  border-radius: var(--pn-radius-round);
  object-fit: cover;
}
#page .fp-quote .who {
  display: block;
  color: var(--pn-text-head);
  font-weight: var(--pn-font-weight-medium);
}
#page .fp-quote .role {
  display: block;
  font-size: var(--pn-type-small-size);
}
#page .fp-logos {
  padding: var(--pn-space-12) 0;
  text-align: center;
}
#page .fp-logos .wrap {
  border-top: 1px solid var(--pn-border-hairline);
  padding-top: var(--pn-space-10);
}
#page .fp-logos ul {
  margin-top: var(--pn-space-8);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pn-space-8) var(--pn-space-6);
  align-items: center;
  justify-items: center;
  color: var(--pn-text-body);
}
@media (width>=640px) {
  #page .fp-logos ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (width>=1200px) {
  #page .fp-logos ul {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
#page .fp-logos svg {
  display: block;
  max-width: 100%;
}
#page .fp-logos svg [fill='white'] {
  fill: currentColor;
}
#page .fp-section {
  padding: var(--pn-space-8) 0 var(--pn-section-pad-default);
}
#page .fp-split {
  margin-top: var(--pn-space-10);
  display: grid;
  gap: var(--pn-space-12);
  align-items: start;
}
@media (width>=1024px) {
  #page .fp-split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--pn-space-16);
  }
}
#page .fp-video {
  display: grid;
  gap: var(--pn-space-4);
}
#page .fp-video lite-youtube {
  display: block;
  position: relative;
  max-width: none;
  border-radius: var(--pn-panel-radius);
  overflow: hidden;
  background-color: var(--pn-color-ink-900);
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-12);
}
#page .fp-video .lty-playbtn {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--pn-text-head);
  cursor: pointer;
}
#page .fp-video .video_play-btn {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: var(--pn-radius-round);
  background: var(--pn-action-bg);
  box-shadow: 0 12px 30px -10px var(--pn-color-alpha-shade-78);
}
#page .fp-video .video_play-btn svg {
  width: 26px;
  height: 26px;
}
#page .fp-video figcaption {
  color: var(--pn-text-body);
}
#page .fp-feats {
  display: grid;
  gap: var(--pn-space-8);
}
#page .fp-feats li {
  display: flex;
  gap: var(--pn-space-5);
  align-items: flex-start;
}
#page .fp-feats img {
  flex: none;
  width: var(--pn-space-12);
  height: var(--pn-space-12);
}
#page .fp-feats h3 {
  font-size: var(--pn-type-h4-size);
  line-height: var(--pn-type-h4-line);
  margin-bottom: var(--pn-space-1);
}

/* Sign-up: one centred card on the stage. */
#page .fp-solo {
  min-height: 100vh;
  display: grid;
  align-items: start;
}
#page .fp-solo .fp-stage {
  max-width: 34rem;
  margin-inline: auto;
  width: 100%;
}
#page .fp-solo .fp-card-head {
  text-align: center;
  justify-items: center;
}
#page .fp-solo .fp-card-head h1 {
  font-size: var(--pn-type-heading-size);
  line-height: var(--pn-type-heading-line);
  letter-spacing: var(--pn-type-heading-tracking);
}
#page .fp-mark {
  display: flex;
  justify-content: center;
  margin-top: var(--pn-space-6);
  color: var(--pn-text-subtle);
}

/* ---- The trial form, restyled in place --------------------------------- */
#page .w-form {
  margin: 0;
}
#page .hidden {
  display: none !important;
}
#page :is(#wf-form-Snowplow-Free-Trial, #step1, #step2) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pn-form-field-gap) var(--pn-space-4);
}
#page :is(#wf-form-Snowplow-Free-Trial, #step1, #step2) > * {
  grid-column: 1 / -1;
  grid-area: auto / 1 / auto / -1;
  min-width: 0;
}
/* First and last name share a row. */
#page :is(#wf-form-Snowplow-Free-Trial, #step2) > :has(> #First-Name),
#page :is(#wf-form-Snowplow-Free-Trial, #step2) > :has(> #Last-Name) {
  grid-column: auto;
  grid-area: auto;
}
#page #wf-form-Sign-up-for-Free {
  display: block;
}
#page .form_2-field-grid {
  display: grid;
  gap: var(--pn-form-field-gap);
}
#page .form_label {
  display: block;
  margin: 0 0 var(--pn-field-label-gap);
  color: var(--pn-text-head);
  font-size: var(--pn-field-label-size);
  font-weight: var(--pn-font-weight-medium);
  line-height: 1.3;
}
#page .form_label:has(+ [required])::after {
  content: ' *';
  color: var(--pn-color-violet-300);
}
#page .form_field {
  display: block;
  width: 100%;
  height: var(--pn-field-height);
  margin: 0;
  padding: 0 var(--pn-field-padding-x);
  border: 0;
  border-radius: var(--pn-field-radius);
  background: var(--pn-surface-control);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-16);
  color: var(--pn-text-head);
  font-size: var(--pn-field-font-size);
  line-height: 1.2;
  transition: box-shadow 0.15s ease;
}
#page .form_field::placeholder {
  color: var(--pn-text-subtle);
  opacity: 1;
}
#page .form_field:hover {
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-30);
}
#page .form_field:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1px var(--pn-color-violet-300),
    0 0 0 3px var(--pn-color-alpha-violet-24);
}
#page select.form_field {
  appearance: none;
  padding-right: var(--pn-space-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C9C3DB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
#page select.form_field option {
  background: var(--pn-color-ink-900);
  color: var(--pn-text-head);
}
#page .form_field + .text-size-small,
#page #Email-note {
  margin-top: var(--pn-field-help-gap);
  color: var(--pn-text-subtle);
  font-size: var(--pn-field-help-size);
  line-height: 1.4;
}
/* The validation scripts write their errors with inline red; on night it
   needs the light failed tone to stay readable. */
#page .sp-field-error {
  color: var(--pn-field-error-color) !important;
  font-size: var(--pn-field-help-size) !important;
}
#page .form_field[aria-invalid='true'] {
  box-shadow: inset 0 0 0 var(--pn-field-error-width)
    var(--pn-field-error-color) !important;
  border: 0 !important;
}

/* Agreement checkboxes: Webflow's custom box, toggled by webflow.js. */
#page .form_checkbox {
  position: relative;
  display: flex;
  gap: var(--pn-space-3);
  align-items: flex-start;
  margin: 0 0 var(--pn-space-3);
  padding: 0;
  color: var(--pn-text-body);
  font-size: var(--pn-type-small-size);
  line-height: 1.5;
  cursor: pointer;
}
#page .form_checkbox:last-child {
  margin-bottom: 0;
}
#page .form_checkbox .w-form-label {
  margin: 0;
  font-weight: var(--pn-font-weight-regular, 400);
}
#page .form_checkbox a {
  color: var(--pn-text-head);
}
#page .form_checkbox-icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 0;
  border-radius: 5px;
  background: var(--pn-surface-control);
  box-shadow: inset 0 0 0 1.5px var(--pn-color-alpha-white-40);
}
#page .form_checkbox-icon.w--redirected-checked {
  background: var(--pn-action-bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
  box-shadow: none;
}
#page .form_checkbox-icon.w--redirected-focus {
  outline: var(--pn-focus-width) solid var(--pn-focus);
  outline-offset: var(--pn-focus-offset);
}

/* Buttons: the Polar main button (violet fill), and the outline variant for
   Edit email. */
#page .btn-hold {
  margin-top: var(--pn-space-2);
}
#page :is(input.button, #continueBtn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--pn-button-height-lg);
  margin: 0;
  padding: 0 var(--pn-button-padding-x-lg);
  border: 0;
  border-radius: var(--pn-button-radius);
  background: var(--pn-action-bg);
  color: var(--pn-text-on-action);
  font-size: var(--pn-button-font-size-lg);
  font-weight: var(--pn-font-weight-medium);
  line-height: 1;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--pn-color-alpha-white-16);
  transition: background-color 0.15s ease;
}
#page :is(input.button, #continueBtn):hover {
  background: var(--pn-action-bg-hover);
}
#page :is(input.button, #continueBtn):active {
  background: var(--pn-action-bg-pressed);
}
#page #continueBtn[data-disabled='true'],
#page #continueBtn[data-disabled='true'] > div {
  background: var(--pn-color-alpha-white-08);
  color: var(--pn-text-head);
  opacity: 1;
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-16);
  cursor: not-allowed;
}
#page input.button:disabled {
  opacity: 0.7;
  cursor: progress;
}
#page .cc-grey-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pn-space-3) var(--pn-space-4);
  border-radius: var(--pn-radius-md);
  background: var(--pn-color-alpha-white-05);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-10);
}
#page .cc-grey-notice > div {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: var(--pn-space-3);
}
#page #displayEmail {
  margin: 0;
  color: var(--pn-text-head);
  overflow-wrap: anywhere;
}
#page #backBtn {
  flex: none;
  height: 36px;
  padding: 0 var(--pn-space-4);
  border: 0;
  border-radius: var(--pn-button-radius);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-30);
  color: var(--pn-text-head);
  font-size: var(--pn-type-small-size);
  cursor: pointer;
}
#page #backBtn:hover {
  background: var(--pn-surface-control-hover);
}
#page :is(.w-form-done, .w-form-fail) {
  margin-top: var(--pn-space-5);
  padding: var(--pn-space-5);
  border-radius: var(--pn-radius-md);
  text-align: left;
}
#page .w-form-done {
  background: var(--pn-color-alpha-white-05);
  color: var(--pn-text-head);
}
#page .w-form-fail {
  background: var(--pn-color-alpha-white-05);
  box-shadow: inset 0 0 0 1px var(--pn-field-error-color);
  color: var(--pn-text-head);
}
/* Turnstile sits in the form; keep it inside the card on phones. */
#page .cf-turnstile,
#page [class*='turnstile'] {
  max-width: 100%;
  overflow: hidden;
}

@media (width>=640px) {
  #page #step1 .form_2-field-grid,
  #page #wf-form-Snowplow-Free-Trial .form_2-field-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--pn-space-4);
  }
}
@media (prefers-reduced-motion: reduce) {
  #page * {
    transition: none !important;
  }
}

/* Webflow styles blockquote and figcaption globally (a violet left bar, centred
   captions); reset them here. */
#page blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
  line-height: inherit;
}
#page figure,
#page figcaption {
  margin: 0;
  text-align: left;
}
#page .fp-video figcaption {
  text-align: left;
}
/* Logos on phones: smaller, and never wider than their cell. */
#page .fp-logos svg {
  max-width: 100%;
}
@media (width<640px) {
  #page .fp-logos ul {
    font-size: 12px;
  }
}
#page .fp-logos svg {
  width: auto;
  max-height: 32px;
}
