* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0a1020;
  --bg-soft: #111a31;
  --panel: rgba(15, 23, 42, 0.8);
  --panel-border: rgba(148, 163, 184, 0.18);
  --text: #e5eefc;
  --muted: #95a3bf;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --success: #16a34a;
  --danger: #ef4444;
  --shadow: 0 30px 80px rgba(2, 8, 23, 0.45);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 32%),
    radial-gradient(circle at right center, rgba(59, 130, 246, 0.14), transparent 24%),
    linear-gradient(145deg, #08101f 0%, #0b1223 45%, #101a33 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

.page-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: white;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.35);
}

.brand-kicker,
.viewer-label,
.eyebrow,
.overlay-kicker,
.modal-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7fb4ff;
}

.brand h1,
.viewer-header h3,
.hero-copy h2,
.access-overlay h3,
.modal-card h3 {
  margin: 0;
}

.ghost-button,
.primary-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(700px, 1.3fr);
  gap: 28px;
  align-items: start;
}

.hero-copy,
.viewer-panel {
  position: relative;
}

.hero-copy {
  padding: 24px 4px 24px 0;
  max-width: 560px;
}

.hero-copy h2 {
  max-width: 640px;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 620px;
  margin: 18px 0 32px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.feature-list {
  display: grid;
  gap: 16px;
}

.feature-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(14px);
}

.feature-item h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: #9bc3ff;
  font-size: 14px;
  font-weight: 700;
}

.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

.helper-text,
.app-option-title,
.overlay-text,
.modal-text,
.modal-hint {
  color: var(--muted);
}

.helper-text {
  margin: 14px 0 0;
  line-height: 1.6;
}

.app-download-note {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: #bfdbfe;
  line-height: 1.55;
}

.hidden {
  display: none;
}

.viewer-panel {
  padding: 24px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.62));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.viewer-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.badge-dark {
  color: #e6f0ff;
  background: rgba(59, 130, 246, 0.18);
}

.document-stage {
  position: relative;
  overflow: hidden;
  min-height: 980px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(226, 232, 240, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.document-preview {
  display: grid;
  gap: 0;
  padding: 0;
  height: 100%;
  transition: filter 0.35s ease, transform 0.35s ease;
}

.document-preview.blur-locked {
  filter: blur(6px) saturate(0.94);
  transform: scale(1.008);
}

.pdf-pages {
  position: relative;
  overflow: hidden;
  min-height: 980px;
  height: 100%;
  border-radius: 26px;
  background: transparent;
}

.pdf-document-shell {
  position: relative;
  overflow: hidden;
  min-height: 980px;
  height: 100%;
  border-radius: 26px;
  background: #f8fafc;
  border: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 30px rgba(15, 23, 42, 0.08);
}

.pdf-document-shell::before,
.pdf-document-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pdf-document-shell::before {
  inset: 0;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 16%);
}

.pdf-document-shell::after {
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 22%);
}

.pdf-native-frame {
  width: 100%;
  height: 1030px;
  display: block;
  border: 0;
  background: white;
  transform: scale(1.005);
  transform-origin: top center;
}

.pdf-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 18%, transparent 32%),
    linear-gradient(180deg, transparent 0%, transparent 72%, rgba(15, 23, 42, 0.04) 100%);
  mix-blend-mode: screen;
}

.pdf-placeholder {
  display: grid;
  place-items: center;
  min-height: 720px;
  padding: 32px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  color: #475569;
  text-align: center;
  line-height: 1.6;
}

.pdf-placeholder-content {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 420px;
}

.access-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 38px;
  text-align: center;
  background: linear-gradient(180deg, rgba(8, 15, 32, 0.42), rgba(8, 15, 32, 0.7));
  backdrop-filter: blur(3px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.access-overlay.is-processing {
  background: linear-gradient(180deg, rgba(8, 15, 32, 0.54), rgba(8, 15, 32, 0.78));
}

.access-overlay.requires-app {
  background: linear-gradient(180deg, rgba(11, 22, 44, 0.58), rgba(8, 15, 32, 0.82));
}

.access-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.overlay-ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.overlay-actions button:disabled {
  cursor: default;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}

.attempt-panel {
  width: min(100%, 560px);
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
  text-align: left;
}

.attempt-panel-header,
.attempt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.attempt-panel-header {
  margin-bottom: 14px;
}

.attempt-chip,
.attempt-token,
.attempt-label,
.attempt-value {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.attempt-chip {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
  font-weight: 700;
  text-transform: uppercase;
}

.attempt-token {
  color: #cbd5e1;
  font-weight: 600;
}

.attempt-row {
  margin-bottom: 12px;
}

.attempt-label {
  color: #93a4c3;
  text-transform: uppercase;
  font-weight: 700;
}

.attempt-value {
  color: #f8fafc;
  font-weight: 600;
}

.attempt-steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.attempt-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.step-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.14);
}

.attempt-step strong {
  display: block;
  margin-bottom: 4px;
  color: #f8fafc;
  font-size: 14px;
}

.attempt-step p {
  margin: 0;
  color: #a8b4ca;
  font-size: 14px;
  line-height: 1.5;
}

.attempt-step.is-active {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(59, 130, 246, 0.12);
}

.attempt-step.is-active .step-dot {
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

.attempt-step.is-done .step-dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.attempt-step.is-error {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.2);
}

.attempt-step.is-error .step-dot {
  background: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18);
}

.access-overlay h3 {
  max-width: 520px;
  font-size: 38px;
  line-height: 1.15;
  margin-bottom: 14px;
}

.overlay-text {
  max-width: 520px;
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
}

.lock-icon {
  position: relative;
  width: 78px;
  height: 72px;
  margin-bottom: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -24px;
  width: 42px;
  height: 36px;
  border: 6px solid rgba(255, 255, 255, 0.7);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  transform: translateX(-50%);
}

.lock-icon span {
  position: absolute;
  left: 50%;
  top: 28px;
  width: 10px;
  height: 18px;
  border-radius: 999px;
  background: white;
  transform: translateX(-50%);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  position: relative;
  width: min(100%, 460px);
  padding: 34px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  font-size: 26px;
}

.modal-text {
  margin: 14px 0 20px;
  line-height: 1.65;
}

.password-form {
  display: grid;
  gap: 10px;
}

.input-label {
  font-size: 14px;
  color: #cbd5e1;
}

.password-form input {
  min-height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  outline: none;
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.password-form input:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.error-text {
  min-height: 20px;
  margin: 0;
  color: #fca5a5;
  font-size: 14px;
}

.full-width {
  width: 100%;
  margin-top: 6px;
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 18px;
  color: #7c8aa5;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
}

.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
}

.app-option {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.app-option-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}

.app-option .modal-hint {
  margin: 0 0 12px;
  line-height: 1.6;
}

.modal-hint {
  margin: 16px 0 0;
  font-size: 14px;
}

.document-stage.unlocked {
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.18);
}

.document-stage.unlocked::after {
  content: "Access granted";
  position: absolute;
  right: 24px;
  bottom: 24px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-right: 0;
    max-width: none;
  }

  .hero-copy h2 {
    max-width: 760px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 28px, 100%);
    padding-top: 18px;
  }

  .topbar,
  .viewer-header,
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .viewer-badges {
    justify-content: flex-start;
  }

  .hero-copy h2 {
    font-size: 38px;
  }

  .document-stage {
    min-height: 760px;
  }

  .pdf-placeholder {
    min-height: 320px;
  }

  .pdf-document-shell {
    min-height: 760px;
  }

  .pdf-native-frame {
    height: 820px;
  }

  .access-overlay h3 {
    font-size: 26px;
  }

  .modal-card {
    padding: 28px 22px;
  }
}
