/**
 * Page - Flow (V0 Integration)
 *
 * Features:
 * - Modern minimal design
 * - Intersection Observer scroll animations
 * - WCAG 2.2 AA Compliant
 *
 * @since 2.6.0 (V0 integration)
 */

/* ========================================
 * Flow Container
 * ======================================== */

.flow-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding-top: calc(var(--header-height-desktop) + var(--spacing-4xl));
  padding-left: var(--spacing-lg);
  padding-right: var(--spacing-lg);
  padding-bottom: var(--spacing-4xl);
}

/* Tablet (768px-959px) */
@media (min-width: 768px) and (max-width: 959px) {
  .flow-container {
    padding-top: calc(var(--header-height-tablet) + var(--spacing-4xl));
  }
}

/* Mobile (767px以下) */
@media (max-width: 767px) {
  .flow-container {
    padding-top: calc(var(--header-height-mobile) + var(--spacing-2xl));
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
    padding-bottom: var(--spacing-2xl);
  }
}

/* ========================================
 * Flow Sections
 * ======================================== */

.flow-sections {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3xl);
}

.flow-section {
  /* Scroll animation initial state */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;

  padding-bottom: var(--spacing-2xl);
  border-bottom: 1px solid var(--kkaa-border);
}

.flow-section:last-child {
  border-bottom: none;
}

.flow-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .flow-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========================================
 * Section Title
 * ======================================== */

.flow-section__title {
  font-size: var(--font-size-h6); /* 15px */
  font-weight: 400;
  letter-spacing: var(--letter-spacing-base);
  color: var(--kkaa-text-light);
  margin-bottom: var(--spacing-lg);
}

/* ========================================
 * Section Content
 * ======================================== */

.flow-section__content {
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--kkaa-text);
}

.flow-section__content p {
  margin-bottom: var(--spacing-md);
}

.flow-section__content p:last-child {
  margin-bottom: 0;
}

/* ========================================
 * Definition List (for parts_03)
 * ======================================== */

.flow-section__dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  margin-top: var(--spacing-md);
}

.flow-section__dl dt {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--kkaa-text-light);
  white-space: nowrap;
  min-width: 100px;
}

.flow-section__dl dd {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--kkaa-text);
  margin: 0;
}

/* Mobile: Stack dt/dd */
@media (max-width: 640px) {
  .flow-section__dl {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .flow-section__dl dt {
    font-size: 0.8125rem;
    margin-top: 0.75rem;
  }

  .flow-section__dl dt:first-child {
    margin-top: 0;
  }
}

/* ========================================
 * Links & Focus States
 * ======================================== */

.flow-section__content a,
.flow-section__dl a {
  color: var(--kkaa-text);
  text-decoration: underline;
  text-decoration-color: var(--kkaa-text-light);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}

.flow-section__content a:hover,
.flow-section__dl a:hover {
  text-decoration-color: var(--kkaa-text);
}

.flow-section__content a:focus-visible,
.flow-section__dl a:focus-visible {
  outline: 2px solid var(--kkaa-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ========================================
 * Legacy Support (Custom Field Suite output)
 * ======================================== */

#parts_01,
#parts_02,
#parts_03 {
  /* Reset any legacy float-based styles */
  float: none;
  clear: none;
}

/* ========================================
 * Accessibility Enhancements
 * ======================================== */

/* Touch Target Size (WCAG 2.5.8) */
.flow-section__content a,
.flow-section__dl a {
  min-height: 44px;
  display: inline-block;
  padding-block: var(--spacing-xs);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .flow-section__title {
    font-weight: 600;
  }

  .flow-section {
    border-bottom-width: 2px;
  }
}
