/* ========================================
   AnkenPost LP — Presentation Mode
   Shared by all pages
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #5c7cfa;
  --primary-dark: #4263eb;
  --primary-light: #748ffc;
  --accent: #845ef7;
  --bg: #ffffff;
  --bg-section: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}
body.is-presentation {
  height: 1200vh;
}
a { text-decoration: none; color: inherit; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-center { text-align: center; }

/* Utilities */
.show-mobile { display: none; }

/* Container */
.container { max-width: 1500px; margin: 0 auto; padding: 0 50px; }

/* Scroll Progress */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 0%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1001;
}

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; color: var(--primary); transition: color 0.4s ease; }
.logo-icon { width: 34px; height: 34px; border-radius: 8px; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--text-secondary); transition: color 0.4s ease; }
.nav-links a:hover { color: var(--text-primary) !important; }
.nav-cta {
  padding: 10px 24px !important; background: var(--primary) !important; color: white !important;
  border-radius: var(--radius-xl); font-weight: 600 !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(92, 124, 250, 0.3); }

/* Hamburger */
.hamburger, .mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span, .mobile-menu-btn span {
  width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.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 */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 998;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 24px; text-align: center; }
.mobile-menu a { font-size: 1.3rem; font-weight: 600; color: var(--text-primary); }
.nav-cta-mobile {
  display: inline-block; padding: 14px 36px; background: var(--primary); color: #fff !important;
  border-radius: var(--radius-xl); margin-top: 8px; font-size: 1.1rem;
}

/* Common Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; padding: 16px 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white !important; font-weight: 700; font-size: 1.05rem; border-radius: var(--radius-xl); border: none;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(92, 124, 250, 0.35); }
.btn-lg { padding: 18px 44px; font-size: 1.1rem; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 16px 36px;
  color: inherit; font-weight: 600; font-size: 1.05rem; border-radius: var(--radius-xl);
  border: 1px solid currentColor; cursor: pointer; transition: background 0.2s, opacity 0.2s;
  opacity: 0.8;
}
.btn-ghost:hover { background: rgba(0,0,0,0.05); opacity: 1; }
.theme-dark .btn-ghost { border: 1px solid rgba(255,255,255,0.4); }
.theme-dark .btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ==========================================================
   PERSISTENT FOOTER (Fixed Bottom, Desktop)
   ========================================================== */
.persistent-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 990;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0,0,0,0.04);
  transition: background 0.4s ease, border-color 0.4s;
}
.theme-dark-active .persistent-footer {
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.persistent-nav {
  display: flex; gap: 20px;
}
.persistent-nav a {
  font-size: 0.78rem; font-weight: 600;
  color: rgba(0,0,0,0.45);
  transition: color 0.2s;
  pointer-events: auto;
}
.persistent-nav a:hover { color: var(--primary); }
.theme-dark-active .persistent-nav a { color: rgba(255,255,255,0.45); }
.theme-dark-active .persistent-nav a:hover { color: var(--primary-light); }
.persistent-disclaimer-text {
  font-size: 0.68rem;
  color: rgba(0,0,0,0.35);
  pointer-events: none;
}
.theme-dark-active .persistent-disclaimer-text { color: rgba(255,255,255,0.3); }

/* ==========================================================
   PRESENTATION LAYER (Index only)
   ========================================================== */
.presentation-fixed {
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg);
}
.p-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  will-change: opacity;
}
#bg-hero { background: linear-gradient(170deg, #eef2ff 0%, #ffffff 60%, #f5f3ff 100%); }
#bg-features { background: var(--primary); }
#bg-flow { background: #f8fafc; }
#bg-functions { background: #0f172a; }
#bg-privacy { background: linear-gradient(160deg, #7048e8 0%, #845ef7 100%); }
#bg-cta { background: #ffffff; }

/* Transition Wipe Overlay */
.transition-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  will-change: clip-path, opacity;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
/* Transition Flash */
.transition-flash {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
  background: white;
  mix-blend-mode: overlay;
}

.p-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform, filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.p-slide.interactive { pointer-events: auto; }

/* Theming */
.theme-light { color: var(--text-primary); }
.theme-light .section-subtitle { color: var(--text-secondary); }
.theme-dark { color: #ffffff; }
.theme-dark .section-subtitle { color: rgba(255,255,255,0.8); }

/* Common Section Headers */
.section-header { margin-bottom: 50px; }
.section-label {
  display: inline-block; font-size: 0.8rem; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 12px;
}
.theme-dark .section-label { color: rgba(255,255,255,0.6); }
.section-title { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 20px; }
.section-subtitle { font-size: clamp(1rem, 1.2vw, 1.1rem); max-width: 700px; line-height: 1.8; }

/* ==========================================================
   SLIDE 1: HERO
   ========================================================== */
.hero-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: center; height: 100vh; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: rgba(92, 124, 250, 0.08); border: 1px solid rgba(92, 124, 250, 0.15);
  border-radius: var(--radius-xl); font-size: 0.88rem; font-weight: 600; color: var(--primary); margin-bottom: 30px;
}
.hero-badge .dot { width: 8px; height: 8px; background: #34d399; border-radius: 50%; animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); } 50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }
.hero-title { font-size: clamp(2.5rem, 4.5vw, 4rem); font-weight: 900; line-height: 1.2; letter-spacing: -0.03em; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }
.hero-img-wrapper {
  border-radius: 20px; overflow: hidden; box-shadow: 0 40px 100px rgba(92, 124, 250, 0.25);
  border: 1px solid rgba(92, 124, 250, 0.1); width: 120%; transform: perspective(1200px) rotateY(-3deg);
}
.hero-img-wrapper img { display: block; width: 100%; height: auto; }

/* ==========================================================
   SLIDE 2: FEATURES
   ========================================================== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 50px; }
.feature-card {
  padding: 40px 32px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.feature-icon { font-size: 2rem; margin-bottom: 20px; }
.feature-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 12px; }
.feature-card p { font-size: 0.95rem; color: rgba(255,255,255,0.85); line-height: 1.8; }

/* ==========================================================
   SLIDE 3: FLOW
   ========================================================== */
#slide-flow { overflow-y: auto; overflow-x: hidden; }
#slide-flow .container { padding-top: 70px; padding-bottom: 30px; }
#slide-flow .section-header { margin-bottom: 16px; }
#slide-flow .section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
#slide-flow .section-subtitle { font-size: 0.92rem; }
.flow-timeline { position: relative; padding-left: 44px; max-width: 950px; }
.flow-timeline::before {
  content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent), rgba(132, 94, 247, 0.15)); border-radius: 2px;
}
.flow-step { display: flex; align-items: flex-start; gap: 20px; padding: 7px 0; position: relative; }
.flow-step-number {
  position: absolute; left: -44px; width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 800; color: white; z-index: 1;
}
.flow-step-content {
  flex: 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 18px; box-shadow: var(--shadow-sm);
}
.flow-step-content h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 4px; }
.flow-step-content > p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.flow-step-highlight .flow-step-content {
  border-color: rgba(92, 124, 250, 0.2); background: linear-gradient(135deg, #f8fafc, #eff6ff);
}
.flow-platform-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.flow-platform-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 14px; }
.flow-platform-label { display: inline-block; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: var(--radius-xl); margin-bottom: 6px; }
.flow-platform-label.chatwork { background: rgba(230, 55, 56, 0.08); color: #e63738; }
.flow-platform-label.slack { background: rgba(74, 21, 75, 0.08); color: #611f69; }
.flow-platform-method { font-size: 0.88rem; font-weight: 700; }

/* ==========================================================
   SLIDE 4: FUNCTIONS SHOWCASE
   ========================================================== */
.showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; height: 100vh; }
#func-panels-container { position: relative; width: 100%; min-height: 400px; }
.showcase-panel {
  position: absolute; top: 0; left: 0; opacity: 0; transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.showcase-panel.active { position: relative; opacity: 1; transform: translateY(0); }
.function-number-lg {
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 900;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1; margin-bottom: 12px;
}
.showcase-panel h2 { font-size: clamp(1.6rem, 2.5vw, 2rem); font-weight: 800; margin-bottom: 16px; }
.showcase-panel p { font-size: 1rem; color: rgba(255,255,255,0.8); line-height: 1.8; margin-bottom: 24px; }

.showcase-dots { display: flex; gap: 12px; margin-top: 40px; }
.showcase-dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all 0.3s; }
.showcase-dot.active { background: var(--primary-light); transform: scale(1.3); }

.function-bullets { margin-top: 16px; padding-left: 20px; list-style: none; }
.function-bullets li { position: relative; font-size: 0.95rem; color: rgba(255,255,255,0.9); margin-bottom: 8px; line-height: 1.6; }
.function-bullets li::before { content: '•'; color: var(--primary-light); position: absolute; left: -18px; font-weight: bold; }

/* Vertically centered, natural width */
.showcase-visual { position: relative; width: 100%; display: flex; align-items: center; justify-content: flex-start; height: 100%; }
.showcase-img {
  position: absolute; width: 100%;
  opacity: 0; transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(20px);
}
.showcase-img.active { position: relative; transform: translateY(0); opacity: 1; z-index: 2; }
.showcase-img img { 
  display: block; width: 100%; height: auto;
  border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
}

/* ==========================================================
   SLIDE 5: PRIVACY
   ========================================================== */
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 50px; }
.security-card {
  display: flex; gap: 20px; padding: 36px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl); backdrop-filter: blur(12px);
}
.security-icon { font-size: 2rem; flex-shrink: 0; }
.security-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.security-card p { font-size: 0.95rem; color: rgba(255,255,255,0.85); line-height: 1.8; }

/* ==========================================================
   SLIDE 6: CTA / FOOTER (Inside presentation)
   ========================================================== */
.footer { padding: 48px 0 60px; text-align: center; }
.footer .container { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-links { list-style: none; display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.88rem; color: var(--text-muted); transition: color 0.2s; font-weight: 600; }
.footer-links a:hover { color: var(--text-primary); }

/* Hide Desktop Fallback on Desktop */
.mobile-cta-fallback { display: none; }

/* ==========================================================
   RESPONSIVE PRESENTATION SCALING (Auto-fit short screens)
   ========================================================== */
@media (min-width: 1025px) and (max-height: 900px) {
  #slide-flow .container { transform: scale(0.88); transform-origin: top center; }
  #slide-flow .container { padding-top: 60px; }
}
@media (min-width: 1025px) and (max-height: 780px) {
  #slide-flow .container { transform: scale(0.78); transform-origin: top center; padding-top: 56px; }
  #slide-functions .container { transform: scale(0.88); transform-origin: center; }
  #slide-features .container { transform: scale(0.9); transform-origin: center; }
}
@media (min-width: 1025px) and (max-height: 680px) {
  #slide-flow .container { transform: scale(0.68); transform-origin: top center; padding-top: 50px; }
  #slide-functions .container { transform: scale(0.78); transform-origin: center; }
  #slide-features .container { transform: scale(0.82); transform-origin: center; }
  #slide-hero .container { transform: scale(0.85); transform-origin: center; }
  #slide-privacy .container { transform: scale(0.85); transform-origin: center; }
}

/* ==========================================================
   MOBILE (Disable Presentation, Stack Normally)
   ========================================================== */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: inline !important; }
  .nav-links { display: none; }
  .hamburger, .mobile-menu-btn { display: flex; }
  
  body.is-presentation { height: auto; }
  .presentation-fixed { position: relative !important; height: auto !important; display: flex; flex-direction: column; background: transparent; }
  .p-bg { display: none; }
  
  .p-slide {
    position: relative;
    opacity: 1 !important; transform: none !important;
    pointer-events: auto !important;
    padding: 80px 0;
  }
  
  /* explicit backgrounds on mobile */
  #slide-hero { background: linear-gradient(170deg, #eef2ff 0%, #ffffff 60%, #f5f3ff 100%); padding-top: 120px; }
  #slide-features { background: var(--primary); }
  #slide-flow { background: #f8fafc; }
  #slide-functions { background: #0f172a; }
  #slide-privacy { background: linear-gradient(160deg, #7048e8 0%, #845ef7 100%); }
  #slide-cta { display: none; } /* Hide the sticky CTA on mobile */
  .mobile-cta-fallback { display: block; border-top: 1px solid var(--border); } /* Show normal scrolling CTA on mobile */

  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; height: auto; }
  .hero-visual { margin-right: 0; }
  .hero-img-wrapper { width: 100%; transform: none; }
  .hero-actions { justify-content: center; }

  .features-grid { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr; height: auto; }
  
  /* Fix Functions Height on Mobile */
  #func-panels-container { height: auto !important; min-height: 0; }
  .showcase-panel {
    position: relative !important; opacity: 1 !important; transform: none !important;
    pointer-events: auto !important; margin-bottom: 56px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .showcase-panel:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  .showcase-visual { display: none; } /* hide visual entirely to fix the image on mobile */
  .showcase-dots { display: none; }
  
  .security-grid { grid-template-columns: 1fr; }
  .flow-timeline { padding-left: 36px; max-width: 100%; }
  .flow-timeline::before { left: 15px; }
  .flow-step-number { left: -36px; width: 32px; height: 32px; font-size: 0.9rem; }
  .flow-platform-compare { grid-template-columns: 1fr; }
  
  .persistent-disclaimer { display: none; } /* On mobile, let it just act as a normal footer string */
}
@media (min-width: 769px) and (max-width: 1024px) {
  .container { padding: 0 40px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .hero-img-wrapper { width: 110%; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { grid-template-columns: 1fr 1fr; }
  .showcase-img { width: 110%; }
}
