/* =====================================================
 * STICKY CTA — Fixed "Free DXO Text" button
 * -----------------------------------------------------
 *  - Desktop (>= 769px): vertical tab pinned to right edge,
 *    text vertical + arrow BELOW
 *  - Mobile  (<= 768px): full-width bar pinned to bottom
 *
 * Color: deep Jyoro teal (#1F807B) — based on DXO 4-core
 *   "Jyoro" color (#2EA9A2) but darkened for WCAG AA contrast
 *   with white text. Balances the red CTAs site-wide so the
 *   sticky CTA doesn't compound the "red-heavy" impression.
 *
 * To DISABLE: remove the 2 references from each HTML file:
 *   <link rel="stylesheet" href="assets/css/sticky-cta.css">
 *   <aside class="sticky-cta">...</aside>
 * ===================================================== */

.sticky-cta {
  position: fixed;
  z-index: 9000;
  font-family: 'Noto Sans JP', sans-serif;
}

.sticky-cta__link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1F807B;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.sticky-cta__link:hover {
  background: #155A56;
  color: #ffffff;
}

.sticky-cta__icon {
  font-family: 'Work Sans', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================
 * Desktop: vertical tab on right edge
 *  - Arrow placed BELOW the text via flex-direction: row
 *    (in vertical-rl context, "row" = inline-axis = top→bottom)
 *  - Slim horizontal padding for narrower button width
 * ============================================ */
@media (min-width: 769px) {
  .sticky-cta {
    right: 0;
    top: 50%;
    bottom: auto;
    left: auto;
    transform: translateY(-50%);
  }
  .sticky-cta__link {
    flex-direction: row;        /* arrow appears BELOW text in vertical-rl */
    gap: 14px;
    padding: 32px 10px;         /* 10px horizontal → slimmer button */
    font-size: 13px;
    letter-spacing: 0.08em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
  }
  .sticky-cta__link:hover {
    padding-right: 14px;        /* slight slide-out on hover */
  }
  .sticky-cta__icon {
    /* keep icon character horizontal even inside a vertical-rl flex item */
    writing-mode: horizontal-tb;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sticky-cta__link:hover .sticky-cta__icon {
    transform: translateY(3px);
  }
}

/* ============================================
 * Mobile: full-width bar pinned to bottom
 *  - Explicit position resets to guard against any
 *    desktop rule leakage / specificity issues
 * ============================================ */
@media (max-width: 768px) {
  .sticky-cta {
    position: fixed;            /* explicit */
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;                  /* clear desktop top: 50% */
    transform: none;            /* clear desktop translateY */
  }
  .sticky-cta__link {
    flex-direction: row;        /* explicit */
    padding: 16px 20px;
    font-size: 14px;
    gap: 12px;
    width: 100%;
    writing-mode: horizontal-tb;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  }
  /* Reserve space at body bottom so content doesn't hide behind the bar */
  body { padding-bottom: 60px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .sticky-cta__link,
  .sticky-cta__icon {
    transition: none;
  }
}
