/* RKSYO clone — site-specific styles (loader, animations, JS hooks) */

html { scroll-behavior: auto; }
body { background-color: #fff; }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff;
  transition: transform .7s cubic-bezier(.76, 0, .24, 1);
}
#loader.slide-up { transform: translateY(-100%); }
#loader .loader-char {
  display: inline-block; opacity: 0; transform: translateY(12px);
  animation: loaderChar .3s ease-out forwards;
}
@keyframes loaderChar {
  to { opacity: 1; transform: translateY(0); }
}
#loader .loader-logo {
  clip-path: inset(0 100% 0 0);
  animation: loaderLogo .6s cubic-bezier(.76, 0, .24, 1) forwards;
  animation-delay: .72s;
}
@keyframes loaderLogo {
  to { clip-path: inset(0 0% 0 0); }
}

/* ---------- Header ---------- */
#site-header { background-color: #fff; box-shadow: none; }
#site-header.scrolled { box-shadow: 0 1px 12px rgba(0, 0, 0, .06); }
.nav-link { color: rgba(0, 0, 0, .55); }
.nav-link:hover { color: #000; }
.footer-link:hover { color: #000 !important; }

/* hamburger */
#hamburger span {
  display: block; width: 20px; height: 2px; border-radius: 9999px;
  background-color: #000;
  transition: transform .2s ease, opacity .15s ease;
}
#hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobile-menu {
  position: fixed; inset: 0; z-index: 40; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
#mobile-menu.open { opacity: 1; pointer-events: auto; }

/* ---------- Ghost section labels (Pr) ---------- */
.js-ghost {
  opacity: 0; transform: translateX(-40px);
  transition: opacity .7s cubic-bezier(.25, .46, .45, .94), transform .7s cubic-bezier(.25, .46, .45, .94);
}
.js-ghost.shown { opacity: 1; transform: translateX(0); }

/* ---------- Features: phone & steps ---------- */
.js-hero-composite {
  opacity: 0; transform: translateY(30px) scale(.92);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.js-hero-composite.visible { opacity: 1; transform: translateY(0) scale(1); }

.js-phone-wrap {
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.js-phone-wrap.visible { opacity: 1; pointer-events: auto; }

.js-phone-img { opacity: 0; transition: opacity .5s ease-in-out; }
.js-phone-img.hero-cycle { transition: opacity .3s ease-in-out; }
.js-phone-img.active { opacity: 1; }

.js-step-panel {
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .35s ease-out, transform .35s ease-out;
}
.js-step-panel.active { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* mobile hero text collapse when steps start */
#m-hero-text {
  transition: height .35s ease-out, margin-bottom .35s ease-out;
  overflow: hidden;
}
#m-phone-group { transition: margin .35s ease-out; }

/* mobile hero text wipe-in
   黒い目隠しを被せず、文字そのものを左から右へ出現させる */
.wipe-line { position: relative; display: inline-block; }
.wipe-line .wipe-text {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  animation: wipeReveal .5s cubic-bezier(.76, 0, .24, 1) forwards;
  animation-delay: var(--wipe-delay, .3s);
}
@keyframes wipeReveal { to { clip-path: inset(0 -0.12em 0 0); } }
@keyframes wipeText { to { opacity: 1; } }

@keyframes rainbowCycle {
  0%   { color: #E53E3E; }
  14%  { color: #ED8936; }
  28%  { color: #ECC94B; }
  42%  { color: #48BB78; }
  57%  { color: #4299E1; }
  71%  { color: #667EEA; }
  85%  { color: #D53F8C; }
  100% { color: #E53E3E; }
}

/* ---------- CTA cards ---------- */
.js-cta {
  opacity: 0; transform: translateY(28px) scale(.84); filter: blur(6px);
}
.js-cta.pop {
  animation: ctaPop .75s cubic-bezier(.22, 1.2, .36, 1) forwards;
}
@keyframes ctaPop {
  0%   { opacity: 0; transform: translateY(28px) scale(.84); filter: blur(6px); }
  60%  { opacity: 1; transform: translateY(0) scale(1.03); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.shine-sweep {
  pointer-events: none; position: absolute; inset: 0; z-index: 20;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .08) 50%, transparent 60%);
  animation: shineSweep 1.2s ease-out forwards;
}
@keyframes shineSweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- Contact form ---------- */
.form-input {
  width: 100%; border-radius: .5rem; border: 1px solid #d1d5db;
  padding: .75rem 1rem; font-size: .875rem; outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fff; color: #000;
}
.form-input:focus { border-color: #111827; box-shadow: 0 0 0 1px #111827; }
.form-error { color: #E53E3E; font-size: .75rem; margin-top: .25rem; }
#contact-error { font-size: .8rem; margin-top: .75rem; line-height: 1.7; }
#contact-submit[disabled] { pointer-events: none; }
/* ハニーポット: 見た目・スクリーンリーダー双方から隠す */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}

/* ---------- Tailwindバンドルに含まれない補完ユーティリティ ----------
   (ビルド済みCSSは元サイトで使用されたクラスのみ収録のため、新規使用分をここで定義) */
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.px-9 { padding-left: 2.25rem; padding-right: 2.25rem; }
.py-3\.5 { padding-top: .875rem; padding-bottom: .875rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.mt-2\.5 { margin-top: .625rem; }
.text-\[11px\] { font-size: 11px; }
.text-\[10px\] { font-size: 10px; }
.self-start { align-self: flex-start; }
.max-w-\[1100px\] { max-width: 1100px; }
/* セクション間の縦余白(ビルド済みCSSに未収録の任意値) */
.py-\[60px\] { padding-top: 60px; padding-bottom: 60px; }
.py-\[100px\] { padding-top: 100px; padding-bottom: 100px; }
.pt-\[60px\] { padding-top: 60px; }
@media (min-width: 640px) {
  .sm\:py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}
@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:gap-3 { gap: .75rem; }
}
@media (min-width: 1024px) {
  .lg\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .lg\:py-\[80px\] { padding-top: 80px; padding-bottom: 80px; }
  .lg\:py-\[120px\] { padding-top: 120px; padding-bottom: 120px; }
  .lg\:pt-\[80px\] { padding-top: 80px; }
  .lg\:gap-4 { gap: 1rem; }
  .lg\:gap-7 { gap: 1.75rem; }
  .lg\:gap-8 { gap: 2rem; }
  .lg\:block { display: block; }
}

/* ---------- Step UI ---------- */
.step-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .32rem .85rem; border-radius: 9999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: #fff; margin-bottom: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
}
.step-chip-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px; opacity: .85; letter-spacing: .12em;
  border-right: 1px solid rgba(255, 255, 255, .4); padding-right: .5rem;
}
.step-progress { display: flex; gap: 6px; margin: 10px 0 20px; }
.step-progress i {
  height: 4px; width: 40px; border-radius: 9999px;
  background: rgba(0, 0, 0, .08);
  transition: background-color .35s ease, transform .35s ease;
}
.step-progress i.on { background: var(--seg); transform: scaleY(1.4); }
.step-check { margin-top: 3px; }

/* ---------- Products: mobile native swipe carousel ---------- */
@media (max-width: 1023.98px) {
  #products { height: auto !important; padding: 24px 0 72px; }
  #products .sticky {
    position: static; height: auto; overflow: visible;
  }
  #prod-track {
    transform: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 12px;
    padding-right: 24px;
    scroll-padding-left: 24px;
  }
  #prod-track::-webkit-scrollbar { display: none; }
  #prod-track > div { scroll-snap-align: start; }
}

/* ---------- Conversion elements ---------- */
.trust-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .8rem; border-radius: 9999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  color: #0b7a3c; background: rgba(6, 199, 85, .09);
  border: 1px solid rgba(6, 199, 85, .25);
  white-space: nowrap;
}
.trust-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 9999px;
  background: #06C755; flex-shrink: 0;
}
.trust-pill-sm { font-size: .68rem; padding: .28rem .65rem; }

.cta-pulse { position: relative; }
.cta-pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: 9999px;
  box-shadow: 0 0 0 0 rgba(6, 199, 85, .45);
  animation: ctaPulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ctaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(6, 199, 85, .45); }
  55%  { box-shadow: 0 0 0 14px rgba(6, 199, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0); }
}

.fade-in-late {
  opacity: 0;
  animation: wipeText .4s ease-out forwards;
  animation-delay: 1.15s;
}

/* ---------- LINE flow cards ---------- */
.flow-card {
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
  display: flex; flex-direction: column;
}
.flow-visual {
  background: #94a7d6; /* LINEトーク背景色 */
  height: 168px; padding: 16px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.flow-body { padding: 18px 20px 22px; text-align: center; flex: 1; }
.flow-num {
  width: 34px; height: 34px; margin: -35px auto 10px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; background: #06C755; color: #fff;
  font-weight: 700; font-size: .95rem;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(6, 199, 85, .35);
  position: relative; z-index: 2;
}
.flow-arrow {
  display: none; align-items: center; justify-content: center;
  flex-shrink: 0; padding-top: 70px;
}
@media (min-width: 768px) { .flow-arrow { display: flex; } }

/* 友だち追加カード */
.flow-addcard {
  background: #fff; border-radius: 14px; padding: 14px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}
.flow-avatar {
  width: 44px; height: 44px; border-radius: 9999px; object-fit: contain;
  background: #fff; border: 1px solid rgba(0, 0, 0, .08); padding: 6px;
}
.flow-addname { font-size: 13px; font-weight: 700; color: #000; text-align: center; }
.flow-addname span { display: block; font-size: 9px; font-weight: 500; color: rgba(0,0,0,.45); margin-top: 1px; }
.flow-addbtn {
  display: inline-flex; align-items: center; gap: 4px;
  background: #06C755; color: #fff; border-radius: 9999px;
  font-size: 11px; font-weight: 700; padding: 5px 14px; margin-top: 2px;
}

/* トークバブル */
.flow-bubble-right { display: flex; align-items: flex-end; gap: 6px; margin-left: auto; }
.flow-read { font-size: 8px; color: rgba(255, 255, 255, .85); text-align: right; line-height: 1.5; }
.flow-photo {
  width: 96px; height: 118px; object-fit: cover;
  border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.flow-bubble-left { display: flex; align-items: flex-start; gap: 7px; margin-right: auto; }
.flow-avatar-sm {
  width: 26px; height: 26px; border-radius: 9999px; object-fit: contain;
  background: #fff; padding: 3px; flex-shrink: 0;
}
.flow-reply { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.flow-replytext {
  background: #fff; border-radius: 12px; border-top-left-radius: 4px;
  font-size: 10.5px; font-weight: 600; color: #000; padding: 7px 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}
.flow-reply .flow-photo { width: 104px; height: 100px; }

#float-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
  transform: translateY(110%);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
#float-cta.visible { transform: translateY(0); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .js-ghost, .js-cta { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; }
  .fade-in-late { opacity: 1 !important; animation: none !important; }
  .wipe-line .wipe-text { clip-path: none !important; animation: none !important; }
  .cta-pulse::after { animation: none !important; }
  #loader { display: none !important; }
}
