/* sticky-cta.css — 追尾CTAバー フルリデザイン
   コンセプト: フローティング・ピル型。画面下に張り付く帯ではなく、
   余白を持たせて浮かせたカプセル状のバーにし、軽やかさと高級感を両立する。 */

.sticky-cta {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0 clamp(0.75rem, 2vw, 1.5rem) clamp(0.75rem, 2vw, 1.25rem);
  background: transparent;
  color: var(--color-on-primary);
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
  transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .35s ease;
}
.sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
}

.sticky-cta-inner {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 10px;
  border-radius: 999px;
  padding: 7px;
  background: color-mix(in srgb, var(--color-bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
  box-shadow:
    0 20px 48px -12px color-mix(in srgb, var(--color-primary) 38%, transparent),
    0 4px 16px rgba(0,0,0,0.12);
}

.sticky-cta-lead {
  display: none;
}

.sticky-cta-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
  flex: 1;
  overflow: hidden;
  isolation: isolate;
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
}
.sticky-cta-btn:hover { transform: translateY(-2px) scale(1.015); }
.sticky-cta-btn:active { transform: translateY(0) scale(.99); }
.sticky-cta-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.sticky-cta-btn svg {
  width: 1.3rem;
  height: 1.3rem;
  flex: none;
  position: relative;
  z-index: 1;
}

.sticky-cta-label { display: flex; flex-direction: column; position: relative; z-index: 1; }
.sticky-cta-label b {
  font-size: 1rem;
  letter-spacing: .01em;
  font-family: var(--font-heading);
}
.sticky-cta-label span {
  display: block;
  font-size: .74rem;
  opacity: .82;
  margin-top: 1px;
  font-weight: 500;
}

/* 電話ボタン: プライマリ。塗りつぶし＋脈動リングで視線を集める主役 */
.sticky-cta-tel {
  background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 72%, #000 10%));
  color: var(--color-on-primary);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 8px 20px -6px color-mix(in srgb, var(--color-primary) 60%, transparent);
}
.sticky-cta-tel:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 12px 26px -6px color-mix(in srgb, var(--color-primary) 70%, transparent);
}
.sticky-cta-tel .sticky-cta-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
}
.sticky-cta-tel .sticky-cta-icon-wrap::before,
.sticky-cta-tel .sticky-cta-icon-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-on-primary) 35%, transparent);
  animation: sticky-cta-ring 2.4s ease-out infinite;
  z-index: 0;
}
.sticky-cta-tel .sticky-cta-icon-wrap::after { animation-delay: 1.2s; }
.sticky-cta-tel .sticky-cta-icon-wrap svg { position: relative; z-index: 1; }
@keyframes sticky-cta-ring {
  0%   { transform: scale(0.55); opacity: .95; }
  75%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta-tel .sticky-cta-icon-wrap::before,
  .sticky-cta-tel .sticky-cta-icon-wrap::after { animation: none; display: none; }
}

/* お問い合わせボタン: アウトライン/ゴースト調でプライマリと明確に区別 */
.sticky-cta-mail {
  background: color-mix(in srgb, var(--color-text) 5%, transparent);
  color: var(--color-heading-ink);
  border: 1.5px solid color-mix(in srgb, var(--color-text) 16%, transparent);
}
.sticky-cta-mail svg { color: var(--color-accent); }
.sticky-cta-mail:hover {
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}

@media (max-width: 640px) {
  .sticky-cta { padding: 0 .6rem .65rem; }
  .sticky-cta-inner { gap: 6px; padding: 6px; border-radius: 22px; }
  .sticky-cta-btn {
    flex-direction: column;
    gap: .3rem;
    padding: .65rem .4rem;
    border-radius: 16px;
    min-height: 3.75rem;
  }
  .sticky-cta-label b { font-size: .86rem; }
  .sticky-cta-label span { font-size: .66rem; }
  .sticky-cta-tel .sticky-cta-icon-wrap { width: 1.9rem; height: 1.9rem; }
  .sticky-cta-btn svg { width: 1.15rem; height: 1.15rem; }
}
