/* Mockups · product visual replicas
 * 5 components — Mingo (translation), iRevue (moderation), Newming (phone),
 * Crossword (grid), AIChat (chat). Each is a static UI mock for marketing.
 *
 * Classes are designed for future interactivity hooks (`:hover`,
 * `@keyframes`, `.is-visible` reveal toggles, IntersectionObserver triggers).
 */

/* ── Shared shell (used by Mingo / iRevue / Crossword / AIChat) ──── */
.gl-mockup {
  background: var(--gray-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06),
              0 4px 8px  rgba(15, 23, 42, 0.04);
}
/* Iframe variant — used by AIChatMockup to embed a live preview.
 * Stacks chrome bar on top + iframe below; the iframe absorbs remaining
 * height via flex, so the overall card keeps the 9:16 aspect ratio. */
.gl-mockup--iframe {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 720px;
  display: flex;
  flex-direction: column;
}
.gl-mockup__iframe {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
  border: 0;
  background: var(--gray-0);
}

/* ─────────────────────────────────────────────────────────────────── */
/* Newming Weekly · RSS-fed newsletter card                            */
/* ─────────────────────────────────────────────────────────────────── */
.gl-weekly__body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gl-weekly__brand {
  display: flex;
  justify-content: center;
  padding: 4px 0 12px;
}
.gl-weekly__logo {
  height: 96px;
  width: auto;
  display: block;
}
.gl-weekly__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gl-weekly__item {
  position: relative;
  border-top: 1px solid var(--gray-200);
}
.gl-weekly__item:last-child { border-bottom: 1px solid var(--gray-200); }
/* Floating "최신 뉴스레터" tooltip · sits in the right empty area of the
 * first item with a gentle vertical float animation. */
.gl-weekly__tooltip {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: var(--gray-900);
  color: var(--gray-0);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
  pointer-events: none;
  z-index: 1;
  animation: gl-weekly-float 2.6s ease-in-out infinite;
}
@keyframes gl-weekly-float {
  0%, 100% { transform: translateY(-50%); }
  50%      { transform: translateY(calc(-50% - 4px)); }
}
@media (prefers-reduced-motion: reduce) {
  .gl-weekly__tooltip { animation: none; }
}
.gl-weekly__item-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 4px;
  text-decoration: none;
  color: inherit;
  transition: background var(--duration-fast) var(--ease-out);
}
.gl-weekly__item-link:hover { background: var(--gray-50); opacity: 1; }
.gl-weekly__date {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gray-500);
  text-transform: uppercase;
}
.gl-weekly__item-title {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -0.01em;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gl-weekly__more {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  padding: 8px 0;
}
.gl-weekly__more:hover { color: var(--gray-900); opacity: 1; }
/* Skeleton placeholders while RSS loads */
.gl-weekly__skeletons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gl-weekly__skel {
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--gray-100), var(--gray-200), var(--gray-100));
  background-size: 200% 100%;
  animation: gl-weekly-shimmer 1.6s linear infinite;
}
@keyframes gl-weekly-shimmer {
  to { background-position: -200% 0; }
}
/* Fallback (RSS error) */
.gl-weekly__fallback { display: flex; flex-direction: column; gap: 8px; }
.gl-weekly__title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.gl-weekly__sub { font-size: 13px; color: var(--gray-600); margin: 0; }
.gl-weekly__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 18px;
  background: var(--gray-900);
  color: var(--gray-0);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}

/* ─────────────────────────────────────────────────────────────────── */
/* Mingo · translation engine                                          */
/* ─────────────────────────────────────────────────────────────────── */

.gl-mingo__chrome {
  height: 40px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
}
.gl-mingo__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}
.gl-mingo__dot--red    { background: #FF5F57; }
.gl-mingo__dot--yellow { background: #FEBC2E; }
.gl-mingo__dot--green  { background: #28C840; }
.gl-mingo__chrome-title {
  margin-left: 16px;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

.gl-mingo__panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 320px;
}
.gl-mingo__source {
  padding: 24px;
  border-right: 1px solid var(--gray-200);
}
.gl-mingo__target {
  padding: 24px;
  background: #FAFBFC;
}
.gl-mingo__label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  justify-content: space-between;
}
.gl-mingo__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}
.gl-mingo__label--target { color: var(--blue-500); }
.gl-mingo__lock {
  font-size: 11px;
  font-weight: 600;
  color: var(--green-600);
  display: flex;
  align-items: center;
  gap: 4px;
}
.gl-mingo__lock-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--green-500);
}
.gl-mingo__text {
  font-size: 14px;
  line-height: 24px;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.gl-mingo__hl {
  background: var(--blue-50);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--blue-700);
  font-weight: 600;
}
.gl-mingo__footer {
  padding: 14px 24px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-600);
}
.gl-mingo__metrics {
  display: flex;
  gap: 16px;
}

/* ─────────────────────────────────────────────────────────────────── */
/* iRevue · comment moderation                                         */
/* ─────────────────────────────────────────────────────────────────── */

.gl-irevue__head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gl-irevue__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.gl-irevue__sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.gl-irevue__legend {
  display: flex;
  gap: 6px;
}
.gl-irevue__legend-item {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--gray-50);
  border-radius: var(--radius-full);
}
.gl-irevue__legend-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--c, var(--gray-400));
}

.gl-irevue__item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.gl-irevue__item:last-child { border-bottom: 0; }

.gl-irevue__badge {
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.gl-irevue__badge--allowed { background: var(--green-50);  color: var(--green-600); }
.gl-irevue__badge--flagged { background: var(--red-50);    color: var(--red-600); }
.gl-irevue__badge--review  { background: var(--yellow-50); color: var(--yellow-600); }

.gl-irevue__body { flex: 1; }
.gl-irevue__text {
  font-size: 14px;
  color: var(--gray-900);
  line-height: 22px;
}
.gl-irevue__meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────────────── */
/* Newming · phone-frame news app                                      */
/* ─────────────────────────────────────────────────────────────────── */

/* Newming · iPhone bezel + animated user-flow carousel
 *
 * Layered structure (back-to-front):
 *   1) .gl-newming__screen   · holds 6 absolute-positioned slide images.
 *      Only the active slide has opacity 1; others fade out — pure crossfade.
 *   2) .gl-newming__bezel    · iPhone-frame PNG with transparent screen
 *      cutout, sits ON TOP. The cutout reveals the active slide beneath.
 *
 * Why <img> for the bezel (not background-image)?
 *   · We need filter: drop-shadow to follow the actual phone outline (the
 *     transparent corners + side-buttons). drop-shadow on the wrapper would
 *     do this from the bezel's alpha, but we want the shadow ABOVE the
 *     screen content, not the slides. Treating the bezel as a real <img>
 *     keeps it semantic + lets us isolate the shadow on the wrapper.
 *
 * Screen inset (top 6% / sides 5% / bottom 3%) is calibrated to match the
 * visible cutout in iphone-frame.png (490×1000). If a new bezel image is
 * swapped in with different proportions, retune these four values.
 */
.gl-newming {
  position: relative;
  width: 300px;
  aspect-ratio: 49 / 100;
  filter: drop-shadow(0 24px 40px rgba(15, 23, 42, 0.22));
}
@media (max-width: 694px) {
  /* Mobile · let the iPhone mockup scale to half the column width so the
   * surrounding text/feature list has room without the bezel dominating.
   * `!important` overrides higher-specificity wrappers (e.g. business
   * product visual rules) that constrain width on mobile. */
  .gl-newming { width: 50% !important; }
}
.gl-newming__screen {
  /* Insets pixel-measured from iphone-frame.png · 490×1000 (alpha binary):
   *   top    25px / 1000 = 2.50%
   *   bottom 25px / 1000 = 2.50%
   *   left   26px / 490  = 5.31%
   *   right  26px / 490  = 5.31%
   * Inset is to the bezel's inner FRAME edge, not below the dynamic island —
   * the island is part of the bezel overlay and sits ON TOP of the slide.
   * Off-by-1% creates a visible seam between bezel and slide; keep in sync
   * with the bezel image if swapped. */
  position: absolute;
  top: 2.5%;
  bottom: 2.5%;
  left: 5.31%;
  right: 5.31%;
  background: var(--gray-0);
  border-radius: 26px;
  overflow: hidden;
  z-index: 1;
}
.gl-newming__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 500ms var(--ease-in-out);
  user-select: none;
  -webkit-user-drag: none;
}
.gl-newming__slide.is-active {
  opacity: 1;
}
.gl-newming__bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* Unified status bar overlay · sits inside .gl-newming__screen on top of the
 * active slide image. The bezel PNG (z-index 2) covers the center with the
 * Dynamic Island; this overlay handles only the time (left) + icons (right). */
.gl-newming__statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4% 8% 0;
  background: var(--gray-0);
  color: var(--gray-900);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  font-feature-settings: 'tnum';
  pointer-events: none;
}
.gl-newming__statusbar-time {
  letter-spacing: -0.01em;
}
.gl-newming__statusbar-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
@media (prefers-reduced-motion: reduce) {
  .gl-newming__slide { transition: none; }
}

/* ─────────────────────────────────────────────────────────────────── */
/* Crossword · 5×5 daily news quiz grid                                */
/* ─────────────────────────────────────────────────────────────────── */

.gl-cross {
  /* Lives inside .gl-mockup which provides bg / border / radius / shadow.
   * Only padding remains here. */
  padding: 24px;
}
.gl-cross__kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-500);
  letter-spacing: 0.06em;
}
.gl-cross__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 4px;
  letter-spacing: -0.015em;
}
.gl-cross__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 16px 0;
}
.gl-cross__cell {
  aspect-ratio: 1;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}
.gl-cross__cell--blank {
  background: var(--gray-900);
  border: 0;
}
.gl-cross__hint {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 20px;
}
.gl-cross__hint-num {
  font-weight: 600;
  color: var(--gray-900);
}

/* ─────────────────────────────────────────────────────────────────── */
/* AIChat · book recommendation chatbot                                */
/* ─────────────────────────────────────────────────────────────────── */

.gl-aichat__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAFBFC;
}
.gl-aichat__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gl-aichat__avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--blue-500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-0);
}
.gl-aichat__avatar-icon { width: 16px; height: 16px; }
.gl-aichat__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.gl-aichat__sub {
  font-size: 11px;
  color: var(--gray-500);
}

.gl-aichat__online {
  font-size: 11px;
  font-weight: 600;
  color: var(--green-600);
  display: flex;
  align-items: center;
  gap: 5px;
}
.gl-aichat__online-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--green-500);
}

.gl-aichat__convo {
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
}

.gl-aichat__msg-user {
  align-self: flex-end;
  max-width: 78%;
}
.gl-aichat__bubble-user {
  background: var(--blue-500);
  color: var(--gray-0);
  padding: 10px 14px;
  border-radius: 14px 14px 2px 14px;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: -0.01em;
}
.gl-aichat__time {
  font-size: 10px;
  color: var(--gray-400);
  text-align: right;
  margin-top: 4px;
}

.gl-aichat__intent {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: -0.005em;
}
.gl-aichat__intent-icon {
  width: 12px;
  height: 12px;
  color: var(--blue-500);
}
.gl-aichat__intent-em { color: var(--gray-900); }

.gl-aichat__msg-bot {
  align-self: flex-start;
  max-width: 88%;
}
.gl-aichat__bubble-bot {
  background: var(--gray-50);
  color: var(--gray-900);
  padding: 12px 14px;
  border-radius: 14px 14px 14px 2px;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: -0.005em;
  border: 1px solid var(--gray-200);
}

.gl-aichat__books {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gl-aichat__book {
  background: var(--gray-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gl-aichat__cover {
  /* book spine color set inline via --c per item */
  width: 30px;
  height: 40px;
  border-radius: 3px;
  background: var(--c, var(--gray-800));
  flex-shrink: 0;
  box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.08);
}
.gl-aichat__book-meta {
  flex: 1;
  min-width: 0;
}
.gl-aichat__book-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.gl-aichat__book-author {
  font-size: 11px;
  color: var(--gray-600);
  margin-top: 2px;
}

.gl-aichat__cite {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--gray-500);
  letter-spacing: -0.005em;
}
.gl-aichat__cite-icon { width: 11px; height: 11px; }

.gl-aichat__input-row {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-0);
  display: flex;
  align-items: center;
  gap: 10px;
}
.gl-aichat__input {
  flex: 1;
  padding: 10px 14px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--gray-500);
  letter-spacing: -0.01em;
}
.gl-aichat__send {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--blue-500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-0);
}
.gl-aichat__send-icon { width: 16px; height: 16px; }
