/* The pages beyond the landing page: beta and privacy. Loaded after home.css, whose tokens, navigation,
   lights, buttons and footer they share; this holds only what is theirs. */

/* MARK: - Page header */

/* A shorter version of the landing page's hero: the same lit room behind, without the phone. */
.hero-page {
  min-height: auto;
  padding-top: 168px;
  padding-bottom: 112px;
}

.hero-page .hero-title {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
}

.hero-policy .hero-inner {
  grid-template-columns: minmax(0, 1fr);
}

.hero-policy .hero-lede {
  max-width: 52ch;
}

.hero-beta {
  min-height: 92vh;
  min-height: 92dvh;
}

/* MARK: - Buttons */

/* home.css styles its buttons as links; as form buttons they also need the browser's own look taken off. */
button.button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

/* MARK: - Signup card */

/* The beta form, on glass with a lit rim, rising in beside the headline. */
.signup-card {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 28px;
  background: rgba(12, 16, 32, 0.72);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: stageIn 1.6s var(--ease-out) 0.2s both;
}

.signup-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(var(--cyan-rgb), 0.6), rgba(255, 255, 255, 0.08) 35%, rgba(var(--violet-rgb), 0.25) 70%, rgba(var(--amber-rgb), 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.signup-card [hidden] {
  display: none;
}

.signup-card-title {
  font-size: clamp(1.5rem, 2.2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.signup-card-lede {
  margin-top: 8px;
  color: var(--ink-soft);
}

.signup-label {
  display: block;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

.signup-field {
  position: relative;
  margin-top: 10px;
}

.signup-field-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--ink-quiet);
  transition: color 0.25s ease;
  pointer-events: none;
}

.signup-field:focus-within .signup-field-icon {
  color: var(--accent);
}

.signup-field input {
  width: 100%;
  height: 58px;
  padding: 0 18px 0 48px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.signup-field input::placeholder {
  color: var(--ink-faint);
}

.signup-field input:focus {
  outline: none;
  border-color: rgba(var(--cyan-rgb), 0.7);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(var(--cyan-rgb), 0.15);
}

.signup-field input[aria-invalid="true"] {
  border-color: rgba(255, 128, 128, 0.85);
  box-shadow: 0 0 0 4px rgba(255, 128, 128, 0.12);
}

/* Kept off screen for people, and left for bots to fill in. */
.signup-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Holds its line even when empty, so the button does not jump when a complaint appears. */
.signup-error {
  min-height: 1.5em;
  margin-top: 10px;
  font-size: 14px;
  color: #FF9B9B;
}

.signup-button {
  width: 100%;
  margin-top: 6px;
}

.signup-button:disabled {
  opacity: 0.75;
  cursor: progress;
  transform: none;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(5, 7, 15, 0.25);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.signup-button[aria-busy="true"] .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.signup-note {
  margin-top: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-quiet);
}

/* What replaces the form once the address is in. */
.signup-done {
  padding: 12px 4px 4px;
  text-align: center;
}

.signup-done:focus {
  outline: none;
}

.signup-done-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(var(--cyan-rgb), 0.12);
  box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb), 0.45), 0 0 40px -6px rgba(var(--cyan-rgb), 0.6);
  color: var(--accent);
}

.signup-done-icon svg {
  width: 28px;
  height: 28px;
}

.signup-done-title {
  margin-top: 22px;
  font-size: clamp(1.5rem, 2.2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.signup-done p:last-child {
  margin-top: 10px;
  color: var(--ink-soft);
}

.signup-address {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* MARK: - Policy */

/* The policy's text beside a list of its sections that stays in view and marks the one being read. */
.policy-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  justify-content: center;
  gap: clamp(40px, 6vw, 96px);
  padding-top: clamp(56px, 8vw, 96px);
}

.policy-contents {
  position: sticky;
  top: 108px;
  align-self: start;
}

.policy-contents-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

.policy-contents ol {
  margin-top: 16px;
  border-left: 1px solid var(--line-strong);
}

.policy-contents a {
  display: block;
  margin-left: -1px;
  padding: 7px 14px;
  border-left: 1px solid transparent;
  font-size: 14.5px;
  color: var(--ink-quiet);
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.policy-contents a:hover {
  color: var(--ink);
}

.policy-contents a[aria-current="true"] {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(var(--cyan-rgb), 0.1), transparent);
  color: var(--ink);
}

.policy-section {
  padding: 44px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.policy-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.policy h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.policy h3 {
  margin-top: 28px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.policy p,
.policy ul {
  max-width: 66ch;
  margin-top: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.policy strong {
  font-weight: 600;
  color: var(--ink);
}

.policy a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(var(--cyan-rgb), 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.policy a:hover {
  text-decoration-color: var(--accent);
}

.policy li {
  position: relative;
  margin-top: 10px;
  padding-left: 22px;
}

.policy li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.7);
}

/* MARK: - Narrower screens */

@media (max-width: 900px) {
  .hero-page {
    padding-top: 128px;
    padding-bottom: 44px;
  }

  .hero-beta {
    min-height: auto;
  }

  /* After the words, as the phone is on the landing page, and set left to right like any form. */
  .signup-card {
    order: 4;
    width: 100%;
    max-width: 480px;
    margin-top: 48px;
    text-align: left;
  }

  .policy-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  /* No room beside the text, so the sections are listed above it as a row of links. */
  .policy-contents {
    position: static;
  }

  .policy-contents ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-left: 0;
  }

  .policy-contents a {
    margin-left: 0;
    padding: 7px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 14px;
  }

  .policy-contents a[aria-current="true"] {
    border-color: rgba(var(--cyan-rgb), 0.6);
    background: rgba(var(--cyan-rgb), 0.1);
  }
}

@media (max-width: 560px) {
  .hero-page {
    padding-bottom: 32px;
  }

  .signup-card {
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 1.6s !important;
    animation-iteration-count: infinite !important;
  }
}
