/* ============================================================
   Japan Separator Block Library
   Design tokens + standard block types
   ============================================================ */

/* ------------------------------------------------------------
   1. Design Tokens
   ------------------------------------------------------------ */
:root {
  --js-dark:    #083344;
  --js-navy:    #0D4F66;
  --js-accent:  #0EA5E9;
  --js-light:   #F0F9FF;
  --js-text:    #111827;
  --js-muted:   #6B7280;
  --js-border:  #E5E7EB;
  --js-max-w:   1280px;
  --js-py:      5rem;
  --js-px:      1.25rem;
  --js-radius:  1rem;
}
@media (min-width: 1024px) {
  :root { --js-px: 2.5rem; }
}

/* ------------------------------------------------------------
   2. Layout Wrapper
   ------------------------------------------------------------ */
.ks-section {
  padding: var(--js-py) var(--js-px);
}
.ks-section--white { background: #fff; }
.ks-section--light { background: var(--js-light); }
.ks-section--dark  { background: var(--js-dark); }
.ks-section--navy  {
  background: linear-gradient(135deg, var(--js-dark) 0%, var(--js-navy) 60%, #155e75 100%);
}

.ks-inner {
  max-width: var(--js-max-w);
  margin: 0 auto;
}

/* ------------------------------------------------------------
   3. Section Header
   ------------------------------------------------------------ */
.ks-section-header { margin-bottom: 3rem; }

.ks-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--js-accent);
  margin-bottom: 1rem;
}
.ks-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
  flex-shrink: 0;
}
.ks-eyebrow--light { color: #7DD3FC; }

.ks-section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--js-text);
  margin-bottom: 0.75rem;
}
.ks-section-title--light { color: #fff; }

.ks-section-sub {
  font-size: 1rem;
  color: var(--js-muted);
  line-height: 1.7;
}
.ks-section-sub--light { color: #7DD3FC; }

/* ------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------ */
.ks-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
}
.ks-btn--primary  { background: var(--js-accent); color: #fff; }
.ks-btn--primary:hover { background: #0284c7; }

.ks-btn--ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.ks-btn--ghost:hover { background: rgba(255,255,255,0.15); }

.ks-btn--outline {
  background: transparent;
  color: var(--js-accent);
  border: 1.5px solid var(--js-accent);
}
.ks-btn--outline:hover { background: #F0F9FF; }

.ks-btn--sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.ks-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ------------------------------------------------------------
   BLOCK 1: HERO
   ------------------------------------------------------------ */
.ks-hero {
  padding: 8rem var(--js-px) 5rem;
  background: linear-gradient(135deg, var(--js-dark) 0%, var(--js-navy) 60%, #155e75 100%);
}
.ks-hero--page { padding: 8rem var(--js-px) 4rem; }

.ks-hero__inner { max-width: var(--js-max-w); margin: 0 auto; }

.ks-hero__bc {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #9CA3AF;
  margin-bottom: 1.5rem;
}
.ks-hero__bc a { color: inherit; text-decoration: none; }
.ks-hero__bc a:hover { color: #fff; }
.ks-hero__bc-sep { color: #4B5563; }

.ks-hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.ks-hero__sub {
  font-size: 1.125rem;
  color: #7DD3FC;
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
}
.ks-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ------------------------------------------------------------
   BLOCK 2: FEATURES
   ------------------------------------------------------------ */
.ks-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.ks-feature-card {
  background: var(--js-light);
  border: 1px solid var(--js-border);
  border-radius: var(--js-radius);
  padding: 2rem;
}
.ks-feature-card--dark {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.ks-feature-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--js-accent);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.ks-feature-card__icon svg { width: 1.25rem; height: 1.25rem; stroke: #fff; fill: none; }

.ks-feature-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--js-text);
  margin-bottom: 0.5rem;
}
.ks-feature-card--dark .ks-feature-card__title { color: #fff; }

.ks-feature-card__body {
  font-size: 0.875rem;
  color: var(--js-muted);
  line-height: 1.7;
}
.ks-feature-card--dark .ks-feature-card__body { color: #9CA3AF; }

/* ------------------------------------------------------------
   BLOCK 3: PRODUCT CARDS
   ------------------------------------------------------------ */
.ks-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.ks-product-card {
  display: block;
  background: #fff;
  border: 1px solid var(--js-border);
  border-radius: var(--js-radius);
  padding: 2rem;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ks-product-card:hover {
  box-shadow: 0 8px 24px rgba(8,51,68,0.1);
  transform: translateY(-3px);
}
.ks-product-card--dark {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.ks-product-card__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--js-accent);
  margin-bottom: 0.75rem;
}
.ks-product-card--dark .ks-product-card__label { color: #7DD3FC; }

.ks-product-card__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--js-text);
  line-height: 1.4;
  margin-bottom: 0.625rem;
}
.ks-product-card--dark .ks-product-card__title { color: #fff; }

.ks-product-card__body {
  font-size: 0.875rem;
  color: var(--js-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.ks-product-card--dark .ks-product-card__body { color: #9CA3AF; }

.ks-product-card__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--js-accent);
}
.ks-product-card--dark .ks-product-card__link { color: #7DD3FC; }
.ks-product-card__link svg { width: 0.875rem; height: 0.875rem; }

/* ------------------------------------------------------------
   BLOCK 4: PRODUCT DETAIL
   ------------------------------------------------------------ */
.ks-product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .ks-product-detail { grid-template-columns: 1fr 1fr; }
  .ks-product-detail--reverse .ks-product-detail__text { order: 2; }
  .ks-product-detail--reverse .ks-product-detail__visual { order: 1; }
}

.ks-product-detail__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--js-text);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}
.ks-product-detail__body {
  font-size: 1rem;
  color: #4B5563;
  line-height: 1.85;
  margin-bottom: 1rem;
}

.ks-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.ks-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.65;
}
.ks-list li::before {
  content: '〇';
  color: var(--js-accent);
  font-weight: 700;
  flex-shrink: 0;
}
.ks-list--check li::before { content: '✓'; color: #16A34A; }
.ks-list--num li::before { content: attr(data-n); }

.ks-product-detail__visual {
  background: var(--js-light);
  border: 2px dashed var(--js-border);
  border-radius: var(--js-radius);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  font-size: 0.875rem;
}

/* ------------------------------------------------------------
   BLOCK 5: SPEC TABLE
   ------------------------------------------------------------ */
.ks-spec-wrap {
  overflow-x: auto;
  border-radius: var(--js-radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.ks-spec-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}
.ks-spec-table thead tr { background: var(--js-dark); }
.ks-spec-table thead th {
  text-align: left;
  padding: 1rem 1.25rem;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}
.ks-spec-table thead th:first-child { border-radius: 1rem 0 0 0; }
.ks-spec-table thead th:last-child  { border-radius: 0 1rem 0 0; }

.ks-spec-table tbody tr {
  background: #fff;
  border-bottom: 1px solid var(--js-border);
  transition: background 0.15s;
}
.ks-spec-table tbody tr:hover { background: #F0F9FF; }
.ks-spec-table tbody td {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  color: #374151;
}
.ks-spec-table td:first-child { font-weight: 700; color: var(--js-text); }

@media (max-width: 640px) {
  .ks-spec-wrap { overflow-x: visible; }
  .ks-spec-table { min-width: 0; }
  .ks-spec-table thead { display: none; }
  .ks-spec-table,
  .ks-spec-table tbody,
  .ks-spec-table tr,
  .ks-spec-table td { display: block; width: 100%; }
  .ks-spec-table tbody tr {
    border: 1px solid var(--js-border);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
  }
  .ks-spec-table tbody tr:hover { transform: none; background: #fff; }
  .ks-spec-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #374151;
  }
  .ks-spec-table tbody td:last-child { border-bottom: none; }
  .ks-spec-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-right: 0.75rem;
  }
  .ks-spec-table td:first-child { font-weight: 700; color: var(--js-text); }
}

.ks-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
}
.ks-tag--green  { background: #DCFCE7; color: #166534; }
.ks-tag--blue   { background: #E0F2FE; color: #075985; }
.ks-tag--amber  { background: #FEF3C7; color: #92400e; }
.ks-tag--purple { background: #F3E8FF; color: #6B21A8; }
.ks-tag--dark   { background: var(--js-dark); color: #fff; }

/* ------------------------------------------------------------
   BLOCK 6: CASES
   ------------------------------------------------------------ */
.ks-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.ks-case-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--js-radius);
  padding: 2rem;
}
.ks-case-card__no {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #38BDF8;
  margin-bottom: 0.75rem;
}
.ks-case-card__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 0.875rem;
}
.ks-case-card__body {
  font-size: 0.875rem;
  color: #9CA3AF;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.ks-case-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ks-case-card__chip {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(14,165,233,0.25);
  color: #7DD3FC;
}

/* ------------------------------------------------------------
   BLOCK 7: FAQ
   ------------------------------------------------------------ */
.ks-faq {
  max-width: 48rem;
  margin: 3rem auto 0;
}
.ks-faq-item {
  border-bottom: 1px solid var(--js-border);
}
.ks-faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  gap: 1rem;
}
.ks-faq-item summary::-webkit-details-marker { display: none; }

.ks-faq__q {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--js-text);
  line-height: 1.55;
  display: flex;
  gap: 0.75rem;
}
.ks-faq__q::before {
  content: 'Q';
  color: var(--js-accent);
  font-weight: 900;
  flex-shrink: 0;
}
.ks-faq__chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  stroke: #9CA3AF;
  fill: none;
  transition: transform 0.2s;
}
details[open] .ks-faq__chevron { transform: rotate(180deg); }

.ks-faq__a {
  padding: 0 0 1.25rem 1.75rem;
  font-size: 0.9375rem;
  color: #4B5563;
  line-height: 1.8;
  display: flex;
  gap: 0.75rem;
}
.ks-faq__a::before {
  content: 'A';
  color: #16A34A;
  font-weight: 900;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   BLOCK 8: COMPANY TABLE
   ------------------------------------------------------------ */
.ks-company-table {
  width: 100%;
  border-collapse: collapse;
}
.ks-company-table tr { border-bottom: 1px solid var(--js-border); }
.ks-company-table th {
  text-align: left;
  width: 9rem;
  padding: 1rem 1.5rem 1rem 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--js-text);
  vertical-align: top;
  white-space: nowrap;
}
.ks-company-table td {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: #4B5563;
  line-height: 1.75;
}
@media (max-width: 640px) {
  .ks-company-table,
  .ks-company-table tbody,
  .ks-company-table tr,
  .ks-company-table th,
  .ks-company-table td { display: block; }
  .ks-company-table th { padding-bottom: 0.25rem; border-bottom: none; width: 100%; }
  .ks-company-table td { padding-top: 0; }
}

/* ------------------------------------------------------------
   BLOCK 9: CTA
   ------------------------------------------------------------ */
.ks-cta {
  padding: var(--js-py) var(--js-px);
  background: var(--js-dark);
  text-align: center;
}
.ks-cta__inner {
  max-width: 40rem;
  margin: 0 auto;
}
.ks-cta__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 1rem;
}
.ks-cta__sub {
  font-size: 0.9375rem;
  color: #7DD3FC;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.ks-cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ------------------------------------------------------------
   Utility
   ------------------------------------------------------------ */
.ks-acl {
  width: 48px;
  height: 3px;
  background: var(--js-accent);
  border-radius: 2px;
}

.ks-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ks-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(8,51,68,0.13);
}

.ks-note {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.75;
}
.ks-note--blue   { background: #E0F2FE; border: 1px solid #BAE6FD; color: #075985; }
.ks-note--amber  { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400e; }
.ks-note--green  { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }

.ks-row { border-bottom: 1px solid var(--js-border); }
.ks-row:hover { background: #F0F9FF; }
