﻿:root {
  --bg: #050712;
  --bg-soft: #0b1020;
  --bg-card: #101628;
  --accent: #7b5cff;
  --accent-soft: #4b9bff;
  --accent-pill: #5a72ff;
  --accent-pill-soft: #64e0ff;
  --text: #f5f5ff;
  --muted: #a0a4c0;
  --danger: #ff6b8b;
  --radius-lg: 999px;
  --radius-md: 0.9rem;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-pill: 0 8px 20px rgba(0, 0, 0, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #182644, var(--bg));
  color: var(--text);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* HEADER */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3vw;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(5, 7, 18, 0.96), rgba(5, 7, 18, 0.8));
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-pill-soft), var(--accent-pill));
  box-shadow: 0 0 12px rgba(123, 92, 255, 0.9);
}

.logo-text {
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.top-nav a {
  color: var(--muted);
}

.top-nav a:hover {
  color: var(--text);
}

/* Access status badge */
.access-badge {
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(22, 27, 50, 0.95);
  color: var(--muted);
  border: 1px solid rgba(169, 177, 214, 0.6);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Variants */
.access-badge.badge-free {
  background: rgba(22, 27, 50, 0.95);
  border-color: rgba(169, 177, 214, 0.7);
  color: var(--muted);
}

.access-badge.badge-day {
  background: radial-gradient(circle at top left, #22522b, #07140b);
  border-color: rgba(76, 202, 120, 0.9);
  color: #c5ffd6;
}

.access-badge.badge-sub {
  background: radial-gradient(circle at top left, #243a80, #070a18);
  border-color: rgba(123, 92, 255, 0.9);
  color: #e5e2ff;
}

/* On small screens, tuck it nicely */
@media (max-width: 700px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .access-badge {
    order: 3;
  }

  .top-nav {
    order: 2;
  }
}

/* LAYOUT */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.2rem 1.6rem 3rem;
}

/* HERO */

.hero h1 {
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  margin: 0 0 0.6rem;
}

.hero-sub {
  color: var(--muted);
  max-width: 480px;
  margin: 0 0 1.8rem;
}

/* TOOLS */

.tools-section {
  margin-top: 1.5rem;
}

/* Tabs */

.tool-tabs {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.25rem;
  border-radius: var(--radius-lg);
  background: rgba(18, 24, 48, 0.9);
  box-shadow: var(--shadow-pill);
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.tool-tab {
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.08s ease;
}

.tool-tab.active {
  background: linear-gradient(90deg, var(--accent-pill), var(--accent-pill-soft));
  color: #050712;
  font-weight: 600;
  transform: translateY(-1px);
}

.tool-tab.disabled {
  opacity: 0.4;
  cursor: default;
}

/* Panels */

.tool-panel {
  display: none;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.2rem;
}

.tool-panel.active {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  width: 100%;
}

/* Card pieces */

.tool-main,
.tool-side {
  background: radial-gradient(circle at top left, #1a2344, #080a16);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(123, 92, 255, 0.22);
  box-shadow: var(--shadow-soft);
}

.tool-main h2 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.tool-sub {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tool-side h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
}

.tool-side h4 {
  margin-bottom: 0.3rem;
}

.tool-side p,
.tool-side ul {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Dropzone */

.dropzone {
  margin-top: 1rem;
  border-radius: 1rem;
  padding: 1.4rem 1.2rem;
  border: 1px dashed rgba(169, 177, 214, 0.7);
  background: rgba(5, 7, 18, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease,
    transform 0.08s ease;
}

.dropzone.dragover {
  border-color: var(--accent-pill-soft);
  background: rgba(16, 22, 60, 0.9);
  box-shadow: 0 0 0 1px rgba(100, 224, 255, 0.6);
  transform: translateY(-1px);
}

/* Lists */

.file-list {
  list-style: none;
  padding-left: 0;
  margin: 0.7rem 0 0.9rem;
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.9rem;
}

.file-item {
  padding: 0.25rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.file-list .empty {
  color: var(--muted);
}

/* Inputs & buttons */

.field-label {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.text-input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(169, 177, 214, 0.6);
  background: rgba(5, 7, 18, 0.9);
  color: var(--text);
  font-size: 0.9rem;
}

.text-input:focus {
  outline: none;
  border-color: var(--accent-pill-soft);
  box-shadow: 0 0 0 1px rgba(100, 224, 255, 0.5);
}

.button-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.primary-btn,
.secondary-btn {
  border-radius: var(--radius-lg);
  padding: 0.6rem 1.6rem;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.08s ease, box-shadow 0.12s ease, opacity 0.12s ease,
    background 0.15s ease;
}

.primary-btn {
  background: linear-gradient(90deg, var(--accent-pill), var(--accent-pill-soft));
  color: #050712;
  box-shadow: 0 12px 30px rgba(28, 72, 255, 0.6);
}

.secondary-btn {
  background: rgba(22, 27, 50, 0.95);
  color: var(--muted);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
}

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* Status text */

.status {
  font-size: 0.85rem;
  margin-top: 0.6rem;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

/* PRICING & PRIVACY */

.pricing-section,
.privacy-section {
  margin-top: 2.2rem;
  padding: 1.6rem 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(8, 10, 22, 0.95);
  border: 1px solid rgba(123, 92, 255, 0.25);
  box-shadow: var(--shadow-soft);
}

.pricing-section h2,
.privacy-section h2 {
  margin-top: 0;
}

.pricing-section ul {
  margin-top: 0.5rem;
  color: var(--muted);
}

.unlock-card {
  margin-top: 1.1rem;
  padding: 1rem 1rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, #1b2150, #050712);
  border: 1px solid rgba(100, 224, 255, 0.3);
}

.pricing-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pricing-btn {
  text-align: center;
  flex: 1 1 auto;
}

.pricing-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* FOOTER */

.site-footer {
  text-align: center;
  padding: 1.2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* EDIT TOOL LAYOUT */

.edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.4rem;
  margin-top: 1.1rem;
}

.edit-preview-column,
.edit-tools-column {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.edit-page-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}

.edit-page-input {
  max-width: 80px;
}

.edit-page-count {
  font-size: 0.8rem;
  color: var(--muted);
}

.small-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

@media (min-width: 900px) {
  .pdf-preview-canvas {
    min-height: 640px;   /* bigger preview on larger screens */
  }
}

/* Edit tool signature canvas */
.signature-canvas {
  width: 100%;
  height: 120px;
  border-radius: 0.7rem;
  background: #ebeef0; /* visual only; JS keeps pixels transparent */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
  touch-action: none;
}

/* Mode chips */

.edit-mode-toggle {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.25rem;
  border-radius: var(--radius-lg);
  background: rgba(18, 24, 48, 0.9);
  margin-bottom: 0.4rem;
}

.chip {
  border: none;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.chip.active {
  background: linear-gradient(90deg, var(--accent-pill), var(--accent-pill-soft));
  color: #050712;
}

/* Options containers */

.edit-options {
  margin-bottom: 0.4rem;
}

.hidden {
  display: none !important;
}

/* Annotations list */

.edit-annotations-list h4 {
  margin: 0.3rem 0;
}

.edit-annotations-list .file-list {
  max-height: 120px;
  font-size: 0.85rem;
}

/* SIGN PAGE PREVIEW & SIGNATURE PAD */

.preview-pad {
  margin-top: 0.6rem;
  padding: 0.7rem;
  border-radius: 0.9rem;
  background: rgba(5, 7, 18, 0.95);
  border: 1px solid rgba(169, 177, 214, 0.6);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.preview-pad {
  max-width: 720px;
  margin: 0.5rem auto 0;
}

.preview-pad canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
  background: #050712;
  border: 1px solid rgba(169, 177, 214, 0.4);
}
.edit-layout {
  display: block;  /* we’re only using it as a wrapper for tools now */
  margin-top: 1.2rem;
}


.signature-pad {
  margin-top: 0.6rem;
  padding: 0.7rem;
  border-radius: 0.9rem;
  background: rgba(5, 7, 18, 0.95);
  border: 1px solid rgba(169, 177, 214, 0.6);
}

.signature-pad canvas {
  width: 100%;
  max-width: 100%;
  display: block;
  border-radius: 0.6rem;
  background: #ebeef0;
  border: 1px dashed rgba(169, 177, 214, 0.7);
  touch-action: none;
}

/* RESPONSIVE */

@media (max-width: 800px) {
  .tool-panel.active {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-main,
  .tool-side {
    padding-inline: 1.1rem;
  }

  .edit-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-header {
    padding-inline: 1.1rem;
  }

  .page {
    padding-inline: 1.1rem;
  }

  .pricing-actions {
    flex-direction: column;
  }

  .pricing-btn {
    width: 100%;
  }
}

/* Make the Edit preview nice and wide on desktop */
@media (min-width: 900px) {
  .edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 1.6rem;
    align-items: flex-start;
  }

  .edit-preview-column,
  .edit-tools-column {
    width: 100%;
  }

  /* Force Edit tool to be single-column so the preview isn't tiny */
#tool-edit .edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
}
#tool-edit .edit-preview-column {
  max-width: 800px;
  margin: 0 auto;
}



 
}

