@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;700;900&family=Noto+Serif+JP:wght@600;900&display=swap');

:root {
  /* Colors (Light & Premium Concept) */
  --bg-dark: hsl(30, 20%, 97%); /* Cream/Ivory Base */
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(0, 0, 0, 0.06);
  --card-border-hover: rgba(0, 0, 0, 0.15);
  
  --accent-gradient: linear-gradient(135deg, hsl(228, 60%, 25%) 0%, hsl(35, 75%, 45%) 50%, hsl(15, 70%, 48%) 100%);
  --accent-indigo: hsl(228, 55%, 32%);
  --accent-gold: hsl(35, 75%, 45%);
  --accent-coral: hsl(15, 70%, 48%);

  --text-primary: hsl(220, 25%, 15%);
  --text-secondary: hsl(220, 10%, 42%);
  
  --font-sans: 'Noto Sans JP', 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Noto Serif JP', serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  
  --ambient-shadow: 0 10px 40px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --ambient-shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.08);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body {
  background: radial-gradient(circle at 10% 20%, rgba(228, 233, 245, 0.5) 0%, rgba(255, 255, 255, 0) 50%),
              radial-gradient(circle at 90% 80%, rgba(245, 235, 220, 0.4) 0%, rgba(255, 255, 255, 0) 50%);
  min-height: 100vh;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  letter-spacing: -0.04em;
}

.logo-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-indigo);
  border-radius: 50%;
  display: inline-block;
}

/* Typography Utilities */
.font-serif {
  font-family: var(--font-serif);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-indigo);
  color: #fff;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(26, 42, 76, 0.15);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(180, 130, 20, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent-indigo);
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(26, 42, 76, 0.15);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: #fff;
  border-color: var(--accent-indigo);
}

/* Float Print Button Container */
.print-trigger-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.print-btn {
  box-shadow: 0 10px 30px rgba(26, 42, 76, 0.3);
}

/* Guide Paper Flow */
.guide-paper-flow {
  padding-top: 120px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* Guide Slide/Page (A4 representation in web view) */
.guide-page {
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  width: 900px;
  min-height: 550px;
  padding: 56px;
  box-shadow: var(--ambient-shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-container {
  width: 100%;
}

.page-title {
  font-size: clamp(24px, 3vw, 32px);
  color: var(--accent-indigo);
  margin-bottom: 32px;
  position: relative;
  padding-bottom: 12px;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.section-lead-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Cover Page Specific */
.page-cover {
  background: white;
  min-height: 600px;
}

.cover-accent {
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background: var(--accent-gradient);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: 0.85;
}

.cover-meta {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.cover-title {
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.cover-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.8;
}

.cover-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 20px;
  display: flex;
  gap: 40px;
  font-size: 13px;
  font-weight: 600;
}

.footer-team {
  color: var(--accent-indigo);
}

.footer-date {
  color: var(--text-secondary);
}

/* Page 2: Value Grid */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  background: white;
  padding: 32px 24px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

.value-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 16px;
  line-height: 1;
}

.value-card h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--accent-indigo);
}

.value-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Page 3: Problem Items */
.problem-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.problem-item {
  display: flex;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.problem-tag {
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.tag-cost { background: var(--accent-coral); }
.tag-mobile { background: var(--accent-indigo); }
.tag-manage { background: var(--accent-gold); }

.problem-content {
  padding: 24px;
}

.problem-content h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.problem-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Page 4: Flow Layout */
.flow-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  max-width: 600px;
  margin: 0 auto 24px auto;
}

.flow-step {
  width: 100%;
  background: white;
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.step-header {
  font-weight: 700;
  color: var(--accent-indigo);
  margin-bottom: 6px;
  font-size: 14px;
}

.flow-step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.flow-arrow-v {
  font-size: 20px;
  color: var(--accent-gold);
  line-height: 1;
}

.flow-note {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(228, 160, 45, 0.05);
  border: 1px solid rgba(228, 160, 45, 0.1);
  padding: 12px 18px;
  border-radius: 8px;
  line-height: 1.6;
}

/* Page 5 & 6: Portfolio Mockup Split */
.portfolio-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.portfolio-card-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portfolio-meta .portfolio-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(228, 160, 45, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.portfolio-meta h3 {
  font-size: 15px;
  color: var(--text-primary);
}

.browser-mock {
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  background: #f0f0f0;
}

.mock-browser-header {
  height: 28px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
  border-bottom: 1px solid #ddd;
}

.mock-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: #ccc;
}
.mock-dots span:nth-child(1) { background: #ff5f56; }
.mock-dots span:nth-child(2) { background: #ffbd2e; }
.mock-dots span:nth-child(3) { background: #27c93f; }

.mock-url-bar {
  flex-grow: 1;
  background: white;
  border-radius: 4px;
  height: 18px;
  font-size: 9px;
  color: #999;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-family: monospace;
}

.mock-preview-content {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

/* Background image presets using gradients for fallback & clean aesthetics */
.preview-matsuya {
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(26,42,76,0.7) 100%), url('matsuya_after.png');
}

.preview-kenetsu {
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(26,42,76,0.8) 100%), url('demo_architecture.png');
}

.preview-salon {
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(35,70,50,0.75) 100%), url('demo_salon.png');
}

.preview-legal {
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(20,20,30,0.85) 100%), url('demo_corporate.png');
}

.preview-hero-content {
  color: white;
  width: 100%;
}

.preview-hero-content .preview-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.preview-hero-content h4 {
  font-size: 12px;
  margin-bottom: 4px;
  font-family: var(--font-serif);
}

.preview-hero-content p {
  font-size: 9px;
  opacity: 0.8;
  line-height: 1.4;
}

/* Page 7: Pricing Grid V */
.guide-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.pricing-card-v {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.01);
  display: flex;
  flex-direction: column;
}

.price-header-v {
  background: #fdfbf8;
  padding: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  border-top: 4px solid var(--accent-gold);
}

.price-tag-v {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-gold);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

.price-header-v h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.price-header-v p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.price-body-v {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.price-huge {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.price-small {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.price-details {
  list-style: none;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.price-details li {
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.price-details li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-weight: bold;
}

/* Page 8: Functions Grid */
.functions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.function-item {
  background: white;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
}

.func-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.func-icon-svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--accent-indigo);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 16px;
  display: block;
}

.function-item h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--accent-indigo);
}

.function-item p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Page 9: Timeline */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 5px;
  width: 2px;
  background: var(--accent-indigo);
  opacity: 0.15;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.tl-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-indigo);
  color: white;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
}

.tl-content h3 {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tl-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Page 10: Back Cover & Contact */
.page-back-cover {
  text-align: center;
}

.contact-card-v {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.01);
  text-align: left;
}

.contact-details-v h3 {
  font-size: 18px;
  color: var(--accent-indigo);
  margin-bottom: 16px;
  border-bottom: 2px solid rgba(0,0,0,0.03);
  padding-bottom: 8px;
}

.contact-details-v p {
  font-size: 13px;
  margin-bottom: 6px;
}

.contact-cta {
  margin-top: 24px;
  text-align: center;
}

.contact-cta .btn-primary {
  width: 100%;
  justify-content: center;
}

/* Responsive Web Layout */
@media (max-width: 960px) {
  .guide-page {
    width: 95%;
    padding: 32px 24px;
    min-height: auto;
  }
  
  .value-grid, .portfolio-split, .guide-pricing-grid, .functions-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .cover-accent {
    display: none;
  }
  
  .print-trigger-container {
    bottom: 20px;
    right: 20px;
  }
}

/* ==========================================
   PRINT / PDF STYLE OPTIMIZATION
   ========================================== */
@media print {
  /* Hide all Web-only UI elements */
  .no-print, header, .print-trigger-container {
    display: none !important;
  }
  
  /* Reset page flow spacing for print layout */
  body, html {
    background: white !important;
    color: #1a2332 !important;
    font-size: 12pt !important;
  }
  
  .guide-paper-flow {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    gap: 0 !important;
  }
  
  /* Format each section to print as exactly one page */
  .guide-page {
    width: 100% !important;
    max-width: 100% !important;
    height: 297mm !important; /* A4 height */
    min-height: 297mm !important;
    padding: 20mm !important; /* standard print margin */
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: white !important;
    page-break-after: always !important; /* Force page break */
    page-break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  
  /* Force text colors to be sharp for print ink */
  .gradient-text {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: hsl(228, 55%, 32%) !important;
  }
  
  .page-title {
    color: hsl(228, 55%, 32%) !important;
    border-bottom: 2px solid hsl(35, 75%, 45%) !important;
  }
  
  .page-title::after {
    display: none !important;
  }

  /* Reset layout configurations to print cleanly */
  .value-grid, .portfolio-split, .guide-pricing-grid, .functions-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }
  
  .value-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .functions-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .cover-accent {
    display: block !important;
  }
  
  /* Prevent list breakups on page edge */
  .value-card, .problem-item, .portfolio-card-item, .pricing-card-v, .function-item, .timeline-item {
    page-break-inside: avoid !important;
  }
}
