/* ==========================================================================
   Appli-Po（アプリポ）ランディングページ カスタムスタイル
   ========================================================================== */

:root {
  --color-primary: #2563eb;      /* ブルー（信頼・社内システム） */
  --color-primary-dark: #1e40af;
  --color-secondary: #0ea5e9;    /* スカイブルー */
  --color-accent: #06b6d4;       /* シアン（アクセント） */
  --color-ink: #0f172a;
  --color-ink-soft: #475569;
  --color-bg: #f8fafc;
  --gradient-brand: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #0ea5e9 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(37,99,235,0.08) 0%, rgba(14,165,233,0.08) 55%, rgba(6,182,212,0.08) 100%);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', sans-serif;
  color: var(--color-ink);
  background-color: var(--color-bg);
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

.font-display {
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
}

/* ---------- Gradient text / backgrounds ---------- */
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-gradient-brand { background: var(--gradient-brand); }
.bg-gradient-brand-soft { background: var(--gradient-brand-soft); }

/* ---------- Hero background ---------- */
.hero-bg {
  position: relative;
  background: radial-gradient(circle at 12% 18%, rgba(37,99,235,0.16), transparent 45%),
              radial-gradient(circle at 88% 8%, rgba(14,165,233,0.18), transparent 50%),
              radial-gradient(circle at 70% 85%, rgba(6,182,212,0.14), transparent 50%),
              #f8fafc;
  overflow: hidden;
}

.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* floating blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: floatBlob 12s ease-in-out infinite;
  pointer-events: none;
}
.blob-1 { width: 420px; height: 420px; background: radial-gradient(circle, #60a5fa, transparent 70%); top: -120px; left: -120px; animation-delay: 0s; }
.blob-2 { width: 360px; height: 360px; background: radial-gradient(circle, #7dd3fc, transparent 70%); top: 10%; right: -140px; animation-delay: -4s; }
.blob-3 { width: 300px; height: 300px; background: radial-gradient(circle, #67e8f9, transparent 70%); bottom: -100px; left: 20%; animation-delay: -8s; }

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.08); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ---------- Grid pattern ---------- */
.grid-pattern {
  background-image: linear-gradient(rgba(37,99,235,0.06) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(37,99,235,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 40%, transparent 90%);
}

/* ---------- Phone mockup frame around generated hero image ---------- */
.hero-visual-wrap {
  position: relative;
  animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}

.hero-glow {
  position: absolute;
  inset: -40px;
  background: var(--gradient-brand);
  filter: blur(80px);
  opacity: 0.25;
  border-radius: 50%;
  z-index: 0;
}

.floating-card {
  position: absolute;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 16px;
  box-shadow: 0 20px 45px -15px rgba(15,42,90,0.25);
  animation: cardFloat 5s ease-in-out infinite;
  z-index: 20;
  white-space: nowrap;
  max-width: calc(100% - 1rem);
}
.floating-card.card-a { top: 4%; left: -6%; animation-delay: -1s; }
.floating-card.card-b { bottom: 8%; right: -6%; animation-delay: -2.5s; }
@media (max-width: 640px) {
  .floating-card.card-a { left: -2%; }
  .floating-card.card-b { right: -2%; }
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Buttons ---------- */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: 0 10px 30px -8px rgba(37,99,235,0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -10px rgba(37,99,235,0.65); }
.btn-primary:hover::before { transform: translateX(120%); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-primary);
  border: 1.5px solid rgba(37,99,235,0.35);
  background: rgba(255,255,255,0.6);
  transition: all 0.25s ease;
}
.btn-outline:hover {
  border-color: var(--color-primary);
  background: rgba(37,99,235,0.06);
  transform: translateY(-2px);
}

/* ---------- Section utilities ---------- */
.section-pad { padding-top: 6rem; padding-bottom: 6rem; }
@media (max-width: 768px) {
  .section-pad { padding-top: 4rem; padding-bottom: 4rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.18);
  padding: 0.35rem 1rem;
  border-radius: 999px;
}

/* ---------- Feature cards ---------- */
.feature-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 2.2rem 2rem;
  border: 1px solid #eef2ff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -20px rgba(37,99,235,0.25);
  border-color: rgba(37,99,235,0.25);
}
.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: 0 10px 24px -6px rgba(37,99,235,0.5);
  margin-bottom: 1.4rem;
}
.feature-number {
  position: absolute;
  top: 1.6rem;
  right: 1.8rem;
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(37,99,235,0.08);
  line-height: 1;
}

/* ---------- Pricing card ---------- */
.pricing-card {
  position: relative;
  border-radius: 32px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 30px 80px -30px rgba(15,42,90,0.25);
  overflow: hidden;
}
.pricing-header {
  background: var(--gradient-brand);
  color: #fff;
  padding: 2.6rem 2.2rem;
  position: relative;
}
.pricing-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 90% 10%, rgba(255,255,255,0.25), transparent 40%);
}
.price-tag {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.55rem 0;
}
.check-list li i { color: #22c55e; margin-top: 0.2rem; }
.cross-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.55rem 0;
  color: var(--color-ink-soft);
}
.cross-list li i { color: #cbd5e1; margin-top: 0.2rem; }

/* ---------- Process steps ---------- */
.process-line {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(37,99,235,0.15), rgba(14,165,233,0.4), rgba(37,99,235,0.15));
}
.step-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  box-shadow: 0 12px 28px -8px rgba(37,99,235,0.55);
  border: 5px solid #f8fafc;
  position: relative;
  z-index: 1;
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq-item[open], .faq-item.is-open {
  border-color: rgba(37,99,235,0.35);
  box-shadow: 0 20px 40px -20px rgba(37,99,235,0.25);
}
.faq-question {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.6rem;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(37,99,235,0.08);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); background: var(--color-primary); color: #fff; }
.faq-answer {
  padding: 0 1.6rem 1.5rem;
  color: var(--color-ink-soft);
  line-height: 1.8;
}

/* ---------- Contact form ---------- */
.form-card {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 80px -30px rgba(15,42,90,0.25);
  border: 1px solid #eef2ff;
}
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-ink);
  margin-bottom: 0.5rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ---------- Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.scrolled {
  background: rgba(248,250,252,0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -8px rgba(15,23,42,0.08);
}
.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-ink-soft);
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--color-primary); }

/* ---------- Mobile menu ---------- */
#mobile-menu {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  z-index: 50;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
#mobile-menu-overlay {
  top: 80px;
}
.mobile-nav-link {
  display: block;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.mobile-nav-link:last-of-type { border-bottom: none; }
body.mobile-menu-locked {
  overflow: hidden;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* JavaScript無効時のフォールバック：一定時間後に必ず表示 */
.no-js .reveal { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
}

/* ---------- Footer ---------- */
.footer-link { color: #cbd5e1; transition: color 0.2s ease; }
.footer-link:hover { color: #fff; }

/* Marquee-ish trust badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(37,99,235,0.15);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  box-shadow: 0 6px 16px -8px rgba(15,23,42,0.1);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #60a5fa, #38bdf8); border-radius: 8px; }

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#toast.show { transform: translateY(0); }
