/* Base reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", Arial, "Apple SD Gothic Neo", sans-serif; color: #0f172a; background: #ffffff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }

:root {
  --brand: #2563eb;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --accent: #ff1996; /* magenta for hero */
}

/* Buttons */
.btn { display: inline-block; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,0.08); transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: #1d4ed8; box-shadow: 0 4px 10px rgba(37,99,235,0.25); }
.btn--accent { background: var(--accent); color: #000; border: 1px solid rgba(255,255,255,0.2); }
.btn--accent:hover { background: #243ed3; color: #ffffff; box-shadow: 0 6px 18px rgba(14, 77, 214, 0.35); }
.btn--lg { padding: clamp(12px, 2.2vw, 18px) clamp(20px, 3.2vw, 32px); font-size: clamp(14px, 1.6vw, 18px); font-weight: 600; border-radius: 999px; }

/* Layout */
#main { padding: 24px; }
/* Make the hero box height responsive so background scales down with page */
.iframe-placeholder { height: clamp(42vh, 56vw, 60vh); border: none; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }

/* Slider (confined to .iframe-placeholder) */
.slider { position: relative; width: 100%; height: 100%; overflow: hidden; display: grid; place-items: center; }
.slide { position: absolute; inset: 0; opacity: 0; transform: translateX(10px); transition: opacity .35s ease, transform .35s ease; display: grid; place-items: center; padding: 16px; }
.slide.is-active { opacity: 1; transform: translateX(0); }
.slide__panel { width: min(1100px, 96%); height: min(420px, calc(100% - 40px)); border-radius: 18px; background: linear-gradient(135deg, #eaf1ff 0%, #e9e7ff 100%); box-shadow: 0 10px 24px rgba(2, 6, 23, 0.08); display: grid; place-items: center; position: relative; }
.slide__panel--cover { background-size: cover; background-position: center; background-repeat: no-repeat; background-image: url(assets/img/editor_main.png); }
/* On smaller screens, show the full image (no crop) */
@media (max-width: 1024px) {
  .slide__panel--cover { background-size: contain; background-position: center; }
}
@media (max-width: 640px) {
  .slide__panel--cover { background-size: contain; background-position: left center; }
}
.slide--cover { padding: 0; }
.slide--cover .slide__panel { width: 100%; height: 100%; border-radius: 18px; background: unset; box-shadow: none; display: grid; align-items: end; justify-items: start; padding: clamp(12px, 4vw, 40px); position: relative; overflow: hidden; }
/* START button above image; responsive offset (scales with viewport) */
.slide--cover .slide__start-btn {
  position: relative;
  z-index: 2;
  margin: 0;
  left: clamp(16px, 17vw, 350px);   /* ← 좌우 위치: 모바일~데스크탑 대응 */
  bottom: clamp(8px, 5vh, 48px);   /* ↑↓ 위치: 모바일~데스크탑 대응 */
}
/* Slide 2 (PDF Tool) can have its own offsets */
.slide--pdf .slide__start-btn {
  left: clamp(16px, 10vw, 220px);
  bottom: clamp(8px, 6vh, 64px);
}
/* Adjust button position here: change the padding to move it from left/bottom edges */
.slide--cover .slide__panel { padding: clamp(12px, 4vw, 40px); /* increase to push button inward, decrease to move toward edges */ }
.slide--cover .slide__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; z-index: 0; }
.slide__overlay { position: absolute; inset: 0; border-radius: 18px; background: radial-gradient(1200px 420px at left center, rgba(255, 25, 150, 0.15), transparent 60%), radial-gradient(1200px 420px at right center, rgba(255,255,255,0.05), transparent 60%); pointer-events: none; }
.slide__inner { width: min(1000px, 92%); display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.slide__inner--left { grid-template-columns: 1fr; justify-items: start; }
.slide__media { margin: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(2,6,23,.08); background: #f8fafc; }
.slide__media img { width: 100%; height: 100%; object-fit: cover; }
.slide__placeholder { width: 100%; aspect-ratio: 16/9; background: repeating-linear-gradient(45deg, #eef1ff 0 12px, #e2e8f0 12px 24px); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--border); }
.slide__text { display: grid; gap: 12px; text-align: left; }
.slide__text--left { justify-self: start; }
.slide__text--hero { color: var(--accent); text-shadow: 0 2px 0 rgba(0,0,0,0.1); }
.slide__title { margin: 0; font-size: 32px; line-height: 1.2; letter-spacing: -0.2px; }
.slide__title--hero { font-size: clamp(40px, 7vw, 72px); font-weight: 800; letter-spacing: 1px; }
.slide__desc { margin: 0; color: var(--muted); }
.slider__dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: inline-flex; gap: 8px; }
.slider__dots .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--border); background: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.slider__dots .dot.is-active { background: var(--brand); border-color: var(--brand); }

/* Enable interactions only on active slide */
.slide { pointer-events: none; }
.slide.is-active { pointer-events: auto; }

/* Slider nav & footer */
.slider__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: var(--ink); background: rgba(255,255,255,0.8); border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(2,6,23,.12); backdrop-filter: blur(4px); }
.slider__nav:hover { background: #fff; }
.slider__nav--prev { left: 24px; }
.slider__nav--next { right: 24px; }
.slider__footer { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; pointer-events: none; }
.slider__footer .slider__pagination { font-size: 12px; color: var(--muted); background: rgba(255,255,255,0.8); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(2,6,23,.08); pointer-events: auto; }
.slider__footer .slider__dots { position: static; transform: none; pointer-events: auto; }

@media (max-width: 880px) {
  .slide__inner { grid-template-columns: 1fr; }
}

/* Header */
.c-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.92); backdrop-filter: saturate(180%) blur(8px); box-shadow: 0 1px 0 rgba(2, 6, 23, 0.04), 0 2px 8px rgba(2, 6, 23, 0.04); }
.c-header__left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.c-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); }
.c-brand__logo { width: 28px; height: 28px; }
.c-brand__name { letter-spacing: 0.2px; font-weight: 500; }
.c-brand__name-ko { font-weight: 400; color: var(--muted); }
.c-brand:hover { color: var(--brand); }
/* Pill tags: neutral by default, blue on hover/active */
.c-tag { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: 0.2px; background: transparent; color: var(--muted); white-space: nowrap; transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease; }
.c-tag:hover { background: #1d4ed8; color: #fff; border-color: transparent; box-shadow: 0 2px 10px rgba(37,99,235,0.25); }
.c-tag.is-active { background: #2563eb; color: #fff; border-color: transparent; box-shadow: 0 0 0 2px rgba(37,99,235,0.15) inset; }
.c-tag:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.c-header__right { display: inline-flex; align-items: center; gap: 10px; }
.c-icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--ink); transition: background .15s ease, color .15s ease; }
.c-icon-btn:hover { background: #f8fafc; color: var(--brand); }

/* Global menu */
.c-global-menu { border-bottom: 1px solid var(--border); background: var(--bg); }
.c-global-menu ul { list-style: none; margin: 0; padding: 8px 20px; display: flex; gap: 18px; }
.c-global-menu a { color: var(--muted); transition: color .15s ease; }
.c-global-menu a:hover { color: var(--brand); }
.c-global-menu a:focus { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* Temporarily hide login button (person icon) */
#btn-login { display: none !important; }

/* Footer */
.c-footer { border-top: 1px solid var(--border); background: #fafafa; color: var(--muted); margin-top: 32px; }
.c-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; }
.c-footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.c-footer__logo { width: 24px; height: 24px; }
.c-footer__text { display: grid; line-height: 1.1; }
.c-footer__text-ko { font-size: 12px; color: var(--muted); }
.c-footer__links { display: inline-flex; gap: 14px; }
.c-footer__links a { color: var(--muted); font-size: 14px; }
.c-footer__links a:hover { color: var(--ink); }
.c-footer__meta { padding: 10px 20px; border-top: 1px solid var(--border); font-size: 12px; text-align: center; color: var(--muted); background: #f6f7f9; }

/* Compact one-line footer variant (used in editor.php) */
.c-footer--mini { position: sticky; bottom: 0; z-index: 40; }
.c-footer--mini .c-footer__meta { padding: 8px 20px; background: #ffffff; border-top: 1px solid var(--border); font-size: 12px; }

/* Responsive */
@media (max-width: 640px) {
  #main { padding: 16px; }
  .c-brand__name-ko { display: none; }
  .c-tag { display: none; }
  .c-footer__inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
