:root {
  color-scheme: light;
  --bg: #f4f7ff;
  --fg: #10152a;
  --fg-muted: rgba(16, 21, 42, 0.72);
  --accent: #2141b2;
  --accent-strong: #162a7c;
  --accent-soft: #e2e7ff;
  --panel: #ffffff;
  --panel-alt: linear-gradient(140deg, #ffffff, #eef2ff);
  --border: rgba(16, 21, 42, 0.08);
  --shadow: 0 24px 64px rgba(20, 32, 70, 0.12);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(62, 104, 246, 0.18), transparent 52%),
    radial-gradient(circle at 88% 20%, rgba(255, 199, 119, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg), #ffffff 68%);
  color: var(--fg);
  padding: 3.25rem 1.5rem 4rem;
}

body.lightbox-open {
  overflow: hidden;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 3.5rem;
}

.panel {
  position: relative;
  isolation: isolate;
  background: var(--panel);
  padding: clamp(2rem, 2vw + 1.4rem, 2.85rem);
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-highlight {
  box-shadow: 0 0 0 4px rgba(33, 65, 178, 0.2), var(--shadow);
  transition: box-shadow 240ms ease;
}

h1,
h2,
h3 {
  font-family: "Clash Display", "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
}

h1 {
  font-size: clamp(2.35rem, 2.5vw + 1.5rem, 3.4rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.6rem, 1.5vw + 1.1rem, 2.2rem);
  line-height: 1.18;
}

h3 {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem);
  line-height: 1.2;
}

.lede {
  margin: 0;
  color: var(--fg-muted);
  font-size: 1.12rem;
  max-width: 54ch;
}

.upload {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
}

.convert-panel {
  display: grid;
  gap: 1.75rem;
  align-content: start;
}

.convert-panel::before {
  content: "";
  position: absolute;
  top: -45%;
  left: -25%;
  width: 70%;
  height: 130%;
  background: radial-gradient(circle, rgba(33, 65, 178, 0.18), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.supporting {
  margin: 0;
  color: var(--fg-muted);
  font-size: 1rem;
}

.product-spotlight {
  background: var(--panel-alt);
  padding: clamp(2rem, 2vw + 1.25rem, 2.6rem);
  border-radius: 32px;
  border: 1px solid rgba(33, 65, 178, 0.12);
  box-shadow: 0 24px 48px rgba(25, 38, 88, 0.08);
  display: grid;
  gap: 1.75rem;
  align-content: start;
}

.product-frame {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 26px;
  padding: 1.5rem;
  box-shadow: inset 0 0 0 1px rgba(33, 65, 178, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-frame img {
  width: 100%;
  max-width: 360px;
  object-fit: contain;
}

.product-copy {
  display: grid;
  gap: 1rem;
  color: var(--fg-muted);
}

.product-copy h2 {
  color: var(--fg);
}

.product-specs {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  color: var(--fg);
}

.product-specs div {
  display: grid;
  gap: 0.25rem;
}

.product-specs dt {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(33, 65, 178, 0.8);
}

.product-specs dd {
  margin: 0;
  font-size: 1rem;
  color: var(--fg);
}

.hero {
  display: grid;
  gap: 1.75rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.9rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, #2f5bf5 100%);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 18px 36px rgba(33, 65, 178, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
}

.primary-action:visited {
  color: #ffffff;
}

.primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(22, 42, 124, 0.26);
}

.primary-action:focus-visible {
  outline: 3px solid rgba(33, 65, 178, 0.45);
  outline-offset: 4px;
}

.primary-action:hover .cta-icon {
  transform: translateX(4px);
}

.cta-icon {
  transition: transform 160ms ease;
  font-size: 1.2rem;
}

.cta-caption {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  max-width: 32ch;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 16px;
  background: rgba(33, 65, 178, 0.12);
  color: var(--accent-strong);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 1px solid rgba(33, 65, 178, 0.18);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.secondary-action:visited {
  color: var(--accent-strong);
}

.secondary-action:hover {
  background: rgba(33, 65, 178, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(33, 65, 178, 0.12);
}

.secondary-action:focus-visible {
  outline: 3px solid rgba(33, 65, 178, 0.35);
  outline-offset: 4px;
}

.brand-identity {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.brand-mark {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  border: 1px solid rgba(33, 65, 178, 0.18);
  box-shadow: inset 0 0 0 1px rgba(33, 65, 178, 0.08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-overline {
  font-size: 0.95rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(33, 65, 178, 0.75);
  margin: 0 0 0.4rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.benefits li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(33, 65, 178, 0.12);
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 500;
}

.file-input {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 16px;
  background: rgba(33, 65, 178, 0.12);
  color: var(--accent-strong);
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.file-input:hover {
  background: rgba(33, 65, 178, 0.2);
}

.file-input:focus-within {
  box-shadow: 0 0 0 3px rgba(33, 65, 178, 0.25);
}

.file-input input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

button {
  border: none;
  background: var(--accent);
  color: white;
  padding: 0.9rem 1.8rem;
  border-radius: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(33, 65, 178, 0.18);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(22, 42, 124, 0.22);
}

button:focus-visible {
  outline: 3px solid rgba(33, 65, 178, 0.45);
  outline-offset: 3px;
}

.notice {
  margin: 2rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(214, 71, 56, 0.1);
  color: #8d2a1f;
  border: 1px solid rgba(214, 71, 56, 0.18);
  list-style: none;
}

.notice li {
  margin: 0;
}

.preview {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(33, 65, 178, 0.15);
  background: rgba(33, 65, 178, 0.08);
  display: grid;
  gap: 1rem;
}

.preview[hidden] {
  display: none;
}

.preview-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--fg-muted);
  flex-wrap: wrap;
}

.preview img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 16px;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(33, 65, 178, 0.1);
}

.result {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.comparison {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.comparison figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comparison-frame {
  border-radius: 20px;
  padding: 1rem;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(33, 65, 178, 0.08);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison-frame img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
}

.comparison figcaption {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-muted);
}

.comparison-lightbox-trigger {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 16px;
  background: rgba(33, 65, 178, 0.08);
  color: var(--accent-strong);
  border: 1px solid rgba(33, 65, 178, 0.18);
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.comparison-lightbox-trigger:hover {
  background: rgba(33, 65, 178, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(33, 65, 178, 0.12);
}

.comparison-lightbox-trigger:focus-visible {
  outline: 3px solid rgba(33, 65, 178, 0.35);
  outline-offset: 4px;
}

.comparison-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.comparison-lightbox[hidden] {
  display: none;
}

.comparison-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 28, 0.6);
  backdrop-filter: blur(10px);
}

.comparison-lightbox-content {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border-radius: 28px;
  border: 1px solid rgba(33, 65, 178, 0.2);
  box-shadow: 0 36px 90px rgba(12, 20, 48, 0.35);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  max-width: 1100px;
  width: min(96vw, 1100px);
  display: grid;
  gap: 1.5rem;
}

.comparison-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.comparison-lightbox-header h3 {
  font-size: clamp(1.35rem, 1vw + 1rem, 1.8rem);
}

.comparison-lightbox-close {
  border: none;
  background: rgba(33, 65, 178, 0.12);
  color: var(--accent-strong);
  padding: 0.6rem 1.2rem;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.comparison-lightbox-close:hover {
  background: rgba(33, 65, 178, 0.2);
  transform: translateY(-1px);
}

.comparison-lightbox-close:focus-visible {
  outline: 3px solid rgba(33, 65, 178, 0.35);
  outline-offset: 3px;
}

.comparison-lightbox-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  min-height: clamp(320px, 60vh, 580px);
}

.comparison-lightbox-figure {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.comparison-lightbox-frame {
  border-radius: 22px;
  padding: clamp(1rem, 2vw, 1.75rem);
  background: white;
  box-shadow: inset 0 0 0 1px rgba(33, 65, 178, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(240px, 50vh, 520px);
}

.comparison-lightbox-frame img {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.comparison-lightbox-figure figcaption {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-muted);
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  background: rgba(26, 179, 114, 0.16);
  color: #1a9b66;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.download:hover {
  background: rgba(26, 179, 114, 0.28);
  transform: translateY(-1px);
}

@media (max-width: 1024px) {
  .page {
    gap: 3rem;
  }

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

@media (max-width: 768px) {
  body {
    padding: 2.5rem 1.25rem 3rem;
  }

  .brand-identity {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-mark {
    width: 78px;
    height: 78px;
  }

  .benefits {
    gap: 0.6rem;
  }

  .panel {
    padding: clamp(1.8rem, 4vw, 2.3rem);
  }

  .product-spotlight {
    padding: clamp(1.6rem, 4vw, 2.1rem);
  }
}

@media (max-width: 640px) {
  .upload {
    flex-direction: column;
    align-items: stretch;
  }

  button,
  .file-input {
    width: 100%;
    justify-content: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-action {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .secondary-action {
    justify-content: center;
    width: 100%;
  }

  .cta-caption {
    max-width: none;
  }

  .preview {
    margin-top: 1.5rem;
  }

  .comparison-lightbox-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .comparison-lightbox {
    padding: 1.5rem;
  }
}
