:root {
  --primary: #e5322d;
  --secondary: #1f2937;
  --background: #f9fafb;
  --card: #ffffff;
  --accent: #2563eb;
  --success: #16a34a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 20px 50px rgba(31, 41, 55, 0.08);
  --shadow-soft: 0 10px 24px rgba(31, 41, 55, 0.07);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(229, 50, 45, 0.09), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, var(--background) 24%, #f4f7fb 100%);
  color: var(--secondary);
}

img,
canvas {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.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;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(249, 250, 251, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #ff6b57);
  color: white;
  box-shadow: 0 14px 30px rgba(229, 50, 45, 0.26);
}

.brand-text {
  font-size: 1.05rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-menu a {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  color: var(--secondary);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}

.hero-section,
.page-hero,
.workspace-header {
  padding: 4.5rem 0 2.5rem;
}

.hero-layout,
.page-hero-layout,
.workspace-header-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 2rem;
  align-items: center;
}

.hero-copy h1,
.page-hero h1,
.workspace-header h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.97;
  letter-spacing: -0.05em;
}

.hero-subheadline,
.muted-copy {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
  max-width: 62ch;
}

.eyebrow,
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.35rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #ff6654);
  color: white;
  box-shadow: 0 18px 34px rgba(229, 50, 45, 0.24);
}

.btn-secondary {
  background: white;
  color: var(--secondary);
  border-color: var(--border);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #34d399);
  color: white;
  box-shadow: 0 18px 34px rgba(22, 163, 74, 0.2);
}

.btn-ghost {
  background: #f3f4f6;
  color: var(--secondary);
}

.btn-block {
  width: 100%;
}

.hero-trustbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-weight: 600;
}

.glass-panel,
.panel,
.feature-card,
.tool-card,
.step-card,
.recent-files-card,
.why-panel,
.action-panel,
.status-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.hero-panel {
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), transparent 70%);
}

.hero-panel-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin: 1.4rem 0;
}

.hero-stats article,
.workflow-card {
  background: #f8fafc;
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid #edf2f7;
}

.hero-stats strong {
  display: block;
  font-size: 1.55rem;
  margin-bottom: 0.25rem;
}

.mini-workflow {
  display: grid;
  gap: 0.85rem;
}

.workflow-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.workflow-card i {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--primary);
}

.workflow-card.active {
  border-color: rgba(229, 50, 45, 0.18);
}

.section {
  padding: 2rem 0 4rem;
}

.section-tight {
  padding-top: 1rem;
}

.section-tinted {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(229, 231, 235, 0.35));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading.centered {
  justify-content: center;
  text-align: center;
}

.section-heading h2,
.faq-layout h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.section-kicker {
  margin: 0;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.text-link,
.text-button {
  color: var(--accent);
  font-weight: 800;
}

.text-button {
  border: 0;
  background: transparent;
  padding: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.tool-card {
  padding: 1.25rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.tool-card:hover,
.tool-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px rgba(31, 41, 55, 0.11);
  border-color: rgba(37, 99, 235, 0.16);
}

.tool-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: white;
  background: linear-gradient(135deg, var(--primary), #ff7e6d);
  margin-bottom: 1rem;
}

.tool-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.tool-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.feature-grid,
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.feature-card,
.step-card {
  padding: 1.5rem;
}

.feature-card i {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature-card h3,
.step-card h3 {
  margin: 0 0 0.6rem;
}

.feature-card p,
.step-card p,
.why-panel p,
.site-footer p,
.faq-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1.4rem;
}

.check-list {
  margin-top: 1.3rem;
  display: grid;
  gap: 1rem;
  font-weight: 700;
}

.check-list i {
  color: var(--success);
  margin-right: 0.55rem;
}

.why-panel {
  padding: 1.5rem;
  display: grid;
  gap: 1.1rem;
}

.steps-grid {
  counter-reset: step;
}

.step-card span {
  display: inline-block;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 1rem;
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  padding: 1.15rem 1.2rem;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 800;
  color: var(--secondary);
}

.faq-content {
  padding: 0 1.2rem 1.2rem;
  display: none;
}

.faq-item.is-open .faq-content {
  display: block;
}

.site-footer {
  background: #101828;
  color: rgba(255, 255, 255, 0.82);
  padding: 2rem 0;
}

.footer-layout {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-weight: 700;
}

.footer-brand {
  color: white;
  margin-bottom: 0.8rem;
}

.page-shell {
  min-height: calc(100vh - 156px);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.85fr);
  gap: 1.3rem;
  align-items: start;
}

.workspace-main,
.workspace-sidebar {
  display: grid;
  gap: 1.2rem;
}

.panel {
  padding: 1.35rem;
  box-shadow: var(--shadow-soft);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.panel-note {
  color: var(--muted);
  font-weight: 700;
}

.dropzone {
  min-height: 240px;
  border: 2px dashed rgba(229, 50, 45, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(229, 50, 45, 0.04), rgba(37, 99, 235, 0.04)),
    white;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  transform: scale(1.01);
}

.dropzone-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 1rem;
  border-radius: 24px;
  background: white;
  color: var(--primary);
  font-size: 1.4rem;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 35px rgba(229, 50, 45, 0.12);
}

.dropzone h3 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.dropzone p {
  margin: 0;
  color: var(--muted);
}

.progress-shell {
  margin-top: 1rem;
}

.progress-bar {
  height: 12px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  transition: width 0.24s ease;
}

.progress-shell span {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.tool-options {
  display: grid;
  gap: 1rem;
}

.field-grid,
.field-inline {
  display: grid;
  gap: 1rem;
}

.field-inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field label,
.selection-toolbar label {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fcfcfd;
}

.helper-text {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.file-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.meta-card {
  padding: 1rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.meta-card span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.meta-card strong {
  font-size: 1rem;
}

.preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pill {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--secondary);
  font-weight: 700;
}

.page-controls {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.selection-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.small-button,
.icon-button {
  border: 1px solid var(--border);
  background: white;
  color: var(--secondary);
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  font-weight: 700;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.thumbnail-card {
  position: relative;
  border-radius: 20px;
  padding: 0.85rem;
  background: #fcfcfd;
  border: 1px solid #edf2f7;
}

.thumbnail-card.is-selected {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.12);
}

.thumb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.thumb-label {
  font-weight: 800;
}

.thumb-canvas {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
}

.thumb-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.action-stack {
  display: grid;
  gap: 0.85rem;
}

.status-card {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 18px;
  border: 1px solid #edf2f7;
  margin-top: 1rem;
}

.status-card strong {
  display: block;
  margin-bottom: 0.4rem;
}

.status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.result-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.result-item,
.recent-item,
.mini-tool-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.mini-tool-list {
  display: grid;
  gap: 0.7rem;
}

.mini-tool-link {
  color: var(--secondary);
  font-weight: 700;
}

.mini-tool-link i:first-child {
  color: var(--primary);
}

.recent-files-list {
  display: grid;
  gap: 0.85rem;
}

.recent-item small,
.result-item small {
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.empty-state i {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 60;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.modal-dialog {
  position: relative;
  width: min(calc(100% - 2rem), 1080px);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  background: white;
  border-radius: 28px;
  padding: 1.2rem;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
}

.modal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.modal-page {
  border-radius: 20px;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.modal-page h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: grid;
  gap: 0.75rem;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  color: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  animation: slide-up 0.26s ease;
}

.toast.success {
  background: linear-gradient(135deg, var(--success), #34d399);
}

.toast.error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.toast.info {
  background: linear-gradient(135deg, var(--secondary), #334155);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-grid,
  .hero-layout,
  .page-hero-layout,
  .workspace-header-layout,
  .faq-layout,
  .split-section {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    order: -1;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-menu {
    position: absolute;
    top: 78px;
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .hero-actions,
  .selection-toolbar,
  .selection-actions,
  .footer-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-grid,
  .feature-grid,
  .steps-grid,
  .thumbnail-grid,
  .modal-body,
  .file-meta-grid,
  .field-inline {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .dropzone {
    min-height: 200px;
  }
}
