/* SlideSplit — soft gray canvas, charcoal accents, lime + coral highlights */

:root {
  color-scheme: light;
  --page: #d8d8d8;
  --canvas: #ebebeb;
  --card: #e1e1e1;
  --card-2: #d4d4d4;
  --raised: #f2f2f2;
  --text: #2a2a2a;
  --text-2: #5c5c5c;
  --muted: #8b8b8b;
  --line: #cfcfcf;
  --ink: #343434;
  --ink-2: #414141;
  --ink-3: #4e4e4e;
  --on-ink: #f3f3f3;
  --on-ink-muted: #a7a7a7;
  --lime: #e4dc58;
  --coral: #d77b5e;
  --coral-strong: #c4664a;
  --danger: #c4453a;

  --toggle-off-bg: #d6d6d6;
  --toggle-off-text: #8d8d8d;
  --toggle-on-bg: #343434;
  --toggle-on-text: #ffffff;
  --download-bg: #e4dc58;
  --download-text: #1c1c1c;
  --download-glow: rgb(200 190 40 / 40%);

  --feature-bg: #343434;
  --feature-text: #f3f3f3;
  --feature-muted: #a7a7a7;
  --feature-pill: #444444;
  --feature-line: rgb(255 255 255 / 20%);
  --feature-accent: #e4dc58;
  --feature-raised: #fafafa;
  --feature-raised-text: #2a2a2a;
  --feature-alert-bg: rgb(215 123 94 / 22%);
  --feature-alert-text: #ffb8a1;

  --r-xl: 34px;
  --r-lg: 24px;
  --r-md: 18px;
  --font: "Apple SD Gothic Neo", Pretendard, "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  --font-display: "Avenir Next", Avenir, "Apple SD Gothic Neo", Pretendard, "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, D2Coding, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0b0b0b;
    --canvas: #151515;
    --card: #1f1f1f;
    --card-2: #2b2b2b;
    --raised: #2a2a2a;
    --text: #ececec;
    --text-2: #bcbcbc;
    --muted: #8a8a8a;
    --line: #3a3a3a;
    --ink: #262626;
    --ink-2: #323232;
    --ink-3: #3d3d3d;
    --danger: #ff7c6f;

    --toggle-off-bg: #2c2c2c;
    --toggle-off-text: #7f7f7f;
    --toggle-on-bg: #ececec;
    --toggle-on-text: #1c1c1c;
    --download-bg: #d77b5e;
    --download-text: #ffffff;
    --download-glow: rgb(215 123 94 / 35%);

    --feature-bg: #e4dc58;
    --feature-text: #1c1c1c;
    --feature-muted: #5e5920;
    --feature-pill: rgb(0 0 0 / 9%);
    --feature-line: rgb(0 0 0 / 28%);
    --feature-accent: #1c1c1c;
    --feature-raised: #1c1c1c;
    --feature-raised-text: #f3f3f3;
    --feature-alert-bg: rgb(0 0 0 / 12%);
    --feature-alert-text: #7a1f14;
  }
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 16px;
  background: var(--page);
  color: var(--text);
  font: 15px/1.6 var(--font);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: absolute;
  left: 24px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--lime);
  color: #1c1c1c;
}

.skip-link:focus {
  top: 24px;
}

/* ---------- top bar ---------- */

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  max-width: 1320px;
  margin: 0 auto 12px;
}

.logo {
  display: grid;
  place-items: center;
  width: 84px;
  height: 76px;
  border-radius: 26px;
  background: var(--ink);
}

.logo svg {
  width: 46px;
  height: 46px;
}

.mark-a {
  fill: var(--lime);
}

.mark-b {
  fill: var(--coral);
}

.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 10px 12px 10px 28px;
  border-radius: 26px;
  background: var(--ink);
  color: var(--on-ink);
}

.brand {
  font: 600 30px/1 var(--font-display);
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand b {
  font-weight: 600;
  color: var(--lime);
}

.bar-chip {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink-2);
  color: var(--on-ink-muted);
  font-size: 13px;
  white-space: nowrap;
}

.bar-round {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--on-ink);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.bar-round:hover {
  background: var(--lime);
  color: #1c1c1c;
}

/* ---------- canvas & hero ---------- */

.canvas {
  display: grid;
  gap: 20px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 44px 40px 52px;
  border-radius: 40px;
  background: var(--canvas);
}

.hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 0 6px 14px;
  text-align: center;
}

.hero h1 {
  font: 700 clamp(21px, 2.8vw, 30px)/1.35 var(--font);
  letter-spacing: -0.02em;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

/* Same outline pill as a selected "문서 형식" toggle, but static (not a control). */
.features li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 15px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.features b {
  font-weight: 800;
}

/* ---------- cards & steps ---------- */

.card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 26px 28px;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--card);
}

.card-feature {
  background: var(--feature-bg);
  color: var(--feature-text);
}

.steps-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.step-stack {
  display: grid;
  gap: 20px;
  margin: 0;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.step-head h2 {
  font: 700 20px/1.25 var(--font-display);
  letter-spacing: -0.01em;
}

.step-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.card-feature .step-head p {
  color: var(--feature-muted);
}

.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--raised);
  font: 700 15px/1 var(--font-display);
}

.card-feature .step-num {
  background: var(--feature-raised);
  color: var(--feature-raised-text);
}

/* upload */

.step-upload {
  display: flex;
  flex-direction: column;
}

.drop-zone {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  padding: 22px 16px;
  border: 1.5px dashed var(--feature-line);
  border-radius: var(--r-lg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--feature-accent);
}

.drop-zone.is-dragging {
  background: var(--feature-pill);
}

.drop-zone.has-files {
  justify-content: flex-start;
}

.upload-btn {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  background: var(--feature-pill);
  color: inherit;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.upload-btn .icon {
  width: 30px;
  height: 30px;
}

.drop-zone:hover .upload-btn {
  background: var(--feature-accent);
  color: var(--feature-bg);
  transform: translateY(-2px);
}

.drop-zone.has-files .upload-btn {
  width: 54px;
  height: 54px;
}

.drop-zone.has-files .upload-btn .icon {
  width: 24px;
  height: 24px;
}

.drop-title {
  color: var(--feature-muted);
  font-size: 14px;
}

.file-list {
  display: grid;
  gap: 8px;
  width: 100%;
  max-height: 240px;
  margin: 4px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  text-align: left;
  cursor: default;
}

.file-list:empty {
  display: none;
}

.file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px;
  border-radius: 20px;
  background: var(--feature-pill);
}

.file-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--coral);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.file-body {
  display: grid;
  min-width: 0;
}

.file-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  color: var(--feature-muted);
  font-size: 12px;
}

.file-remove {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}

.file-remove:hover:not(:disabled) {
  background: var(--feature-line);
}

.alert {
  margin: 14px 0 0;
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: rgb(196 69 58 / 12%);
  color: var(--danger);
  font-size: 14px;
  white-space: pre-line;
}

.card-feature .alert {
  background: var(--feature-alert-bg);
  color: var(--feature-alert-text);
}

.alert-list {
  display: grid;
  gap: 4px;
  margin: 0;
  list-style: none;
}

/* toggles: gray = off; media = filled when on, format = outlined when on */

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toggle {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--toggle-off-bg);
  color: var(--toggle-off-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.toggle span .icon {
  width: 17px;
  height: 17px;
  stroke-width: 1.6;
}

.toggle:hover input:not(:checked) + span {
  color: var(--text-2);
}

.toggle-media input:checked + span {
  border-color: var(--toggle-on-bg);
  background: var(--toggle-on-bg);
  color: var(--toggle-on-text);
  font-weight: 600;
}

.toggle-text input:checked + span {
  border-color: var(--text);
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

.toggle input:focus-visible + span {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

/* ---------- action & result ---------- */

.action {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 76px;
  padding: 12px 24px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  font: 600 clamp(22px, 2.6vw, 30px)/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.action-btn small {
  font: 500 15px var(--font);
  opacity: 0.7;
}

.action-split {
  background: var(--feature-bg);
  color: var(--feature-text);
  box-shadow: 0 10px 28px rgb(0 0 0 / 18%);
}

.action-split:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgb(0 0 0 / 24%);
}

.action-split.is-idle {
  opacity: 0.85;
  box-shadow: none;
  transform: none;
}

/* Shown after a split: shifts from the Split color, then one shine sweeps across.
   CSS animations restart whenever the element goes from hidden to shown. */
.action-download {
  background: var(--download-bg);
  color: var(--download-text);
  box-shadow: 0 12px 32px var(--download-glow);
  animation: download-in 0.5s ease-out;
}

.action-download::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 70%), transparent);
  pointer-events: none;
  transform: translateX(-160%) skewX(-18deg);
  animation: shine 1s 0.4s ease-in-out forwards;
}

.action-download:hover {
  transform: translateY(-2px);
}

@keyframes download-in {
  from {
    background-color: var(--feature-bg);
    color: var(--feature-text);
    transform: scale(0.98);
  }
}

@keyframes shine {
  to {
    transform: translateX(420%) skewX(-18deg);
  }
}

.result {
  display: grid;
  gap: 14px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stats li {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-2);
  font-size: 14.5px;
}

.stats b {
  margin: 0 3px 0 5px;
  color: var(--text);
  font: 600 17px var(--font-display);
}

.result-notes {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
  text-align: center;
}

.preview-card {
  padding: 20px 22px 22px;
}

.preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.preview-head h2 {
  font: 600 18px/1.3 var(--font-display);
}

.preview-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 12.5px;
}

.file-select {
  max-width: 240px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}

.chip-light {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.chip-light:hover {
  background: var(--raised);
}

.code {
  height: 150px;
  margin: 0;
  padding: 14px 18px;
  overflow: auto;
  border-radius: var(--r-md);
  background: var(--raised);
  color: var(--text);
  font: 13px/1.6 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- faq & footer ---------- */

.faq {
  display: grid;
  gap: 14px;
  margin-top: 64px;
}

.section-title {
  padding: 0 6px;
  font: 500 clamp(26px, 3vw, 36px)/1.1 var(--font-display);
  letter-spacing: -0.02em;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq details {
  padding: 0 8px 0 22px;
  border-radius: 24px;
  background: var(--card);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--raised);
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 50px 16px 0;
  color: var(--text-2);
  font-size: 14px;
}

.footer {
  display: grid;
  gap: 2px;
  max-width: 1320px;
  margin: 20px auto 8px;
  padding: 0 12px;
  color: var(--text-2);
  font-size: 12px;
  text-align: center;
}

.footer p:first-child {
  white-space: nowrap;
}

.footer strong {
  color: var(--text);
  font-weight: 700;
}

.footer span {
  margin: 0 7px;
  color: var(--muted);
}

/* ---------- modals ---------- */

.modal {
  width: min(92vw, 560px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 32px;
  background: var(--canvas);
  color: var(--text);
  box-shadow: 0 30px 80px rgb(0 0 0 / 35%);
}

.modal::backdrop {
  background: rgb(20 20 20 / 55%);
  backdrop-filter: blur(4px);
}

.modal-body {
  padding: 28px 30px 30px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-head h2 {
  font: 600 26px/1.2 var(--font-display);
  letter-spacing: -0.01em;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--card-2);
}

.usecases-modal {
  width: min(94vw, 780px);
}

.usecase-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: usecase;
}

.usecase-list li {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--card);
  counter-increment: usecase;
}

.usecase-list b {
  font-size: 15.5px;
}

.usecase-list b::before {
  content: counter(usecase) ". ";
  color: var(--coral);
}

.usecase-list span {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.progress-modal {
  width: min(88vw, 400px);
  text-align: center;
}

.progress-modal .modal-body {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 36px 30px 32px;
}

.progress-logo {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin-bottom: 8px;
  border-radius: 32px;
  background: var(--ink);
}

.progress-logo svg {
  width: 62px;
  height: 62px;
  overflow: visible;
}

.split-a {
  animation: split-a 1.1s ease-in-out infinite;
}

.split-b {
  animation: split-b 1.1s ease-in-out infinite;
}

@keyframes split-a {
  50% {
    transform: translate(-3px, -2px);
  }
}

@keyframes split-b {
  50% {
    transform: translate(3px, 3px);
  }
}

.progress-modal h2 {
  font: 600 24px/1.2 var(--font-display);
}

.progress-text {
  color: var(--muted);
  font-size: 14px;
}

.progress-track {
  width: 100%;
  height: 10px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--card-2);
}

.progress-fill {
  display: block;
  width: var(--p, 0%);
  min-width: 10px;
  height: 100%;
  border-radius: 999px;
  background: var(--coral);
  transition: width 0.25s;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    padding: 8px;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 8px;
  }

  .logo {
    width: 62px;
    height: 62px;
    border-radius: 22px;
  }

  .logo svg {
    width: 38px;
    height: 38px;
  }

  .bar {
    gap: 8px;
    padding: 8px 8px 8px 20px;
    border-radius: 22px;
  }

  .brand {
    font-size: 24px;
  }

  .bar-chip {
    display: none;
  }

  .bar-round {
    width: 46px;
    height: 46px;
  }

  .canvas {
    padding: 30px 14px 36px;
    border-radius: 28px;
  }

  .card {
    padding: 22px 18px;
    border-radius: 28px;
  }

  .toggle span {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13.5px;
  }

  .action-btn {
    min-height: 66px;
  }

  .faq {
    margin-top: 48px;
  }

  .faq details p {
    padding-right: 10px;
  }

  .footer {
    padding: 0 4px;
    font-size: 10.5px;
  }

  .footer span {
    margin: 0 4px;
  }

  .modal-body {
    padding: 22px 18px 20px;
  }

  .usecase-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .usecase-list li {
    padding: 11px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
