@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #ecece8;
  --surface-strong: rgba(255, 255, 255, 0.9);
  --text: #0f0f10;
  --muted: rgba(15, 15, 16, 0.62);
  --border: rgba(15, 15, 16, 0.14);
  --shadow: 0 28px 80px rgba(15, 15, 16, 0.08);
  --radius-xl: 28px;
  --sans: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--text);
  font-family: var(--sans);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    radial-gradient(circle at top, rgba(15, 15, 16, 0.1), transparent 36%),
    linear-gradient(135deg, #f8f8f5, var(--bg));
}

.page {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  padding:
    max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

.panel {
  width: min(720px, 100%);
  max-width: 100%;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, var(--surface-strong), rgba(255, 255, 255, 0.58)),
    linear-gradient(120deg, rgba(15, 15, 16, 0.05), transparent 55%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow,
.limits span,
.trial-timer {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.lead {
  max-width: 600px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.limits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.limits span {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 15, 16, 0.04);
}

.state-block {
  margin-top: 28px;
}

.trial-shell {
  --trial-button-width: 276px;
  --trial-shell-width: var(--trial-button-width);
  --trial-copy-width: 164px;
  position: relative;
  width: var(--trial-shell-width);
  max-width: 100%;
  min-height: 74px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(10, 10, 10, 1));
  box-shadow: 0 22px 40px rgba(15, 15, 16, 0.14);
  overflow: hidden;
  transform-origin: left center;
  transition:
    width 240ms ease,
    box-shadow 220ms ease,
    transform 160ms ease;
  will-change: width;
}

.trial-shell.is-active {
  box-shadow: 0 26px 52px rgba(15, 15, 16, 0.18);
}

.trial-shell.is-loading {
  transform: scale(0.99);
}

.trial-shell__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 74px;
  padding: 18px 28px;
  border: 0;
  background: transparent;
  color: #f4f4ef;
  cursor: pointer;
  font: 700 1rem/1.2 var(--sans);
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.trial-shell__button:hover {
  transform: translateY(-1px);
}

.trial-shell__button:disabled {
  cursor: default;
  opacity: 0.82;
  transform: none;
}

.trial-shell.is-active .trial-shell__button {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.985);
}

.trial-shell__active {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  min-height: 74px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translateX(10px);
  transition:
    opacity 180ms ease,
    transform 240ms ease;
}

.trial-shell.is-active .trial-shell__active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.trial-shell__link {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - var(--trial-copy-width));
  min-height: 74px;
  padding: 0 22px 0 28px;
  color: #f4f4ef;
  text-decoration: none;
  font: 500 0.94rem/1.5 var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trial-shell__link:hover {
  text-decoration: underline;
}

.trial-shell__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--trial-copy-width);
  position: relative;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  width: var(--trial-copy-width);
  min-height: 74px;
  border: 0;
  border-left: 1px solid rgba(244, 244, 239, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.22);
  color: #f4f4ef;
  cursor: pointer;
  font: 600 0.76rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.trial-shell__copy::before,
.trial-shell__copy::after {
  position: absolute;
  content: '';
  display: block;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
}

.trial-shell__copy::before {
  background:
    linear-gradient(
      115deg,
      transparent 18%,
      rgba(255, 255, 255, 0.18) 44%,
      rgba(255, 255, 255, 0.08) 57%,
      transparent 74%
    );
  transform: translateX(135%) skewX(-18deg);
}

.trial-shell__copy::after {
  inset: auto;
  top: 50%;
  right: 18px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(0.5px);
  transform: translateY(-50%) scale(0.2);
}

.trial-shell__copy:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.trial-shell__copy:active {
  transform: scale(0.985);
}

.trial-shell__copy.is-pulsing::before {
  opacity: 1;
  animation: copy-sheen 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.trial-shell__copy.is-pulsing::after {
  opacity: 1;
  animation: copy-echo 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.trial-shell__copy.is-copied {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.22);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (hover: none) {
  .trial-shell__button:hover {
    transform: none;
  }

  .trial-shell__copy:hover {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
      rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  }
}

.trial-timer {
  margin: 12px 0 0 10px;
  color: var(--muted);
}

.trial-timer span {
  margin-left: 10px;
  color: var(--text);
  letter-spacing: 0.08em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes copy-sheen {
  0% {
    opacity: 0;
    transform: translateX(135%) skewX(-18deg);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(-125%) skewX(-18deg);
  }
}

@keyframes copy-echo {
  0% {
    opacity: 0.22;
    transform: translateY(-50%) scale(0.2);
  }

  35% {
    opacity: 0.14;
  }

  100% {
    opacity: 0;
    transform: translateY(-50%) scale(8.4);
  }
}

@media (max-width: 640px) {
  .page {
    padding:
      max(16px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }

  .panel {
    width: 100%;
    padding: 20px;
    border-radius: 24px;
    backdrop-filter: blur(14px);
  }

  h1 {
    font-size: clamp(2.1rem, 13vw, 3.35rem);
    line-height: 0.97;
  }

  .lead {
    margin-top: 14px;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .limits {
    gap: 8px;
    margin-top: 20px;
  }

  .limits span {
    padding: 9px 11px;
  }

  .state-block {
    margin-top: 22px;
  }

  .trial-shell {
    --trial-copy-width: 120px;
    min-height: 68px;
    border-radius: 24px;
  }

  .trial-shell__button {
    min-height: 68px;
    padding-inline: 20px;
    font-size: 0.96rem;
  }

  .trial-shell__active,
  .trial-shell__link {
    min-height: 68px;
  }

  .trial-shell__link {
    max-width: calc(100% - var(--trial-copy-width));
    padding: 0 16px 0 18px;
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .trial-shell__copy {
    min-height: 68px;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .trial-shell__copy::after {
    right: 14px;
    width: 14px;
    height: 14px;
  }

  .trial-timer {
    margin-top: 10px;
    margin-left: 0;
  }

  .trial-timer span {
    display: inline-block;
    margin-left: 8px;
  }
}

@media (max-width: 420px) {
  .page {
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .panel {
    padding: 16px;
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(1.92rem, 12.6vw, 2.8rem);
  }

  .lead {
    font-size: 0.92rem;
  }

  .eyebrow,
  .limits span,
  .trial-timer {
    letter-spacing: 0.14em;
  }

  .trial-shell {
    --trial-copy-width: 104px;
    min-height: 64px;
  }

  .trial-shell__button,
  .trial-shell__active,
  .trial-shell__link,
  .trial-shell__copy {
    min-height: 64px;
  }

  .trial-shell__button {
    padding-inline: 16px;
    font-size: 0.92rem;
  }

  .trial-shell__link {
    padding: 0 12px 0 14px;
    font-size: 0.72rem;
  }

  .trial-shell__copy {
    font-size: 0.61rem;
    letter-spacing: 0.06em;
  }

  .trial-shell__copy::after {
    right: 12px;
    width: 12px;
    height: 12px;
  }

  .trial-timer span {
    display: block;
    margin-top: 4px;
    margin-left: 0;
  }
}
