/* ========================================
   SERVICE PAGE 2025 - Balanced Editorial Design

   Design Philosophy:
   - Centered, balanced layouts
   - Bold Japanese + English typography
   - High contrast flat colors (NO gradients)
   - Clean grid-based structure
   - Generous but balanced whitespace
   ======================================== */
@layer base, layout, components, utilities, pages;

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&display=swap');

@layer pages {

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
  /* Typography */
  --sv-font-display: "Outfit", "Helvetica Neue", sans-serif;
  --sv-font-ja: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;

  /* Colors - Industrial Palette */
  --sv-black: #0a0a0a;
  --sv-charcoal: #1a1a1a;
  --sv-slate: #2d2d2d;
  --sv-steel: #4a4a4a;
  --sv-concrete: #8a8a8a;
  --sv-cloud: #e8e8e8;
  --sv-white: #fafafa;
  --sv-pure-white: #ffffff;

  /* Accent - Signature Orange */
  --sv-accent: #F58220;
  --sv-accent-deep: #d96f10;
  --sv-accent-bright: #ff9a40;

  /* Layout */
  --sv-section-py: clamp(80px, 10vw, 120px);
  --sv-content-width: min(1000px, 100%);
}

/* ========================================
   HERO - カテゴリ色のみ上書き
   ======================================== */
.page-template-page-service .page-hero__category {
  background: var(--sv-accent);
}

/* ========================================
   TABLE OF CONTENTS - 目次（左寄せ）
   ======================================== */
.service-toc {
  background: var(--sv-white);
  border-bottom: 1px solid var(--sv-cloud);
  padding: clamp(32px, 5vw, 48px) 0;
}

.service-toc__container {
  max-width: var(--content-max, 1600px);
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
}

.service-toc__label {
  display: inline-block;
  margin: 0 0 clamp(16px, 2.5vw, 24px);
  font-family: var(--sv-font-display);
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sv-accent);
  position: relative;
  padding-left: 36px;
}

.service-toc__label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 2px;
  background: var(--sv-accent);
  transform: translateY(-50%);
}

.service-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(6px, 1vw, 10px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.service-toc__list::-webkit-scrollbar {
  display: none;
}

.service-toc__item {
  flex: 0 0 auto;
}

.service-toc__link {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 0.8vw, 10px);
  padding: clamp(10px, 1.2vw, 12px) clamp(14px, 1.8vw, 20px);
  background: var(--sv-pure-white);
  border: 1px solid var(--sv-cloud);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.service-toc__link:hover {
  background: var(--sv-charcoal);
  border-color: var(--sv-charcoal);
}

.service-toc__num {
  font-family: var(--sv-font-display);
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--sv-accent);
  transition: color 0.3s ease;
}

.service-toc__link:hover .service-toc__num {
  color: var(--sv-accent-bright);
}

.service-toc__text {
  font-family: var(--sv-font-ja);
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  color: var(--sv-slate);
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.service-toc__link:hover .service-toc__text {
  color: var(--sv-pure-white);
}

@media (max-width: 768px) {
  .service-toc__list {
    gap: 8px;
    padding-bottom: 8px;
  }

  .service-toc__link {
    padding: 10px 16px;
  }
}

/* ========================================
   SERVICE SECTION - 共通スタイル
   ======================================== */
.service-section {
  position: relative;
  padding: var(--sv-section-py) 0;
  overflow: hidden;
}

.service-section__container {
  max-width: var(--content-max, 1600px);
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
}

/* Section Header - 中央配置 */
.service-section__head {
  text-align: center;
  margin-bottom: clamp(48px, 6vw, 64px);
  max-width: var(--sv-content-width);
  margin-left: auto;
  margin-right: auto;
}

.service-section__sub-en {
  display: block;
  font-family: var(--sv-font-display);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--sv-accent);
  margin-bottom: clamp(12px, 2vw, 16px);
}

.service-section__title {
  margin: 0;
  font-family: var(--sv-font-ja);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--sv-charcoal);
}

.service-section__lead {
  margin: clamp(20px, 3vw, 32px) auto clamp(32px, 5vw, 48px);
  font-family: var(--sv-font-ja);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 2;
  color: var(--sv-steel);
  max-width: 800px;
  text-align: center;
}

.service-section__note {
  margin-top: clamp(24px, 4vw, 32px);
  font-family: var(--sv-font-ja);
  font-size: clamp(13px, 1.3vw, 14px);
  line-height: 1.8;
  color: var(--sv-concrete);
  text-align: center;
}

/* ========================================
   INTRO SECTION
   ======================================== */
.service-section--intro {
  background: var(--sv-white);
  padding-top: clamp(64px, 8vw, 100px);
}

.service-section--intro .service-section__lead {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 2.1;
  color: var(--sv-slate);
}

/* ========================================
   STRENGTHS SECTION - マガジンレイアウト
   ======================================== */
.service-section--strengths {
  background: var(--sv-charcoal);
  color: var(--sv-white);
  padding-left: 0;
  padding-right: 0;
}

.service-section--strengths .service-section__container {
  padding: 0 var(--gutter, 24px);
}

.service-section--strengths .service-section__sub-en {
  color: var(--sv-accent-bright);
}

.service-section--strengths .service-section__title {
  color: var(--sv-pure-white);
}

/* Strengths Grid */
.service-strengths {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--content-max, 1600px);
  margin: 0 auto;
}

/* Individual Strength Card */
.service-strength {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  counter-increment: strength-counter;
}

.service-strength:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-strength__main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: clamp(320px, 40vw, 420px);
}

@media (min-width: 900px) {
  .service-strength__main {
    grid-template-columns: 1fr 1fr;
  }

  .service-strength--reverse .service-strength__main {
    direction: rtl;
  }

  .service-strength--reverse .service-strength__main > * {
    direction: ltr;
  }
}

/* Content Area */
.service-strength__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 56px);
  position: relative;
  z-index: 2;
}

/* Large Number */
.service-strength__content::before {
  content: "0" counter(strength-counter);
  position: absolute;
  top: clamp(24px, 4vw, 40px);
  right: clamp(24px, 4vw, 40px);
  font-family: var(--sv-font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.service-strength__title {
  font-family: var(--sv-font-ja);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--sv-pure-white);
  margin: 0 0 clamp(12px, 2vw, 20px);
}

.service-strength__lead {
  font-family: var(--sv-font-ja);
  font-size: clamp(13px, 1.3vw, 14px);
  font-weight: 500;
  line-height: 1.8;
  color: var(--sv-accent-bright);
  margin: 0 0 clamp(14px, 2vw, 20px);
  padding-left: clamp(12px, 1.5vw, 16px);
  border-left: 3px solid var(--sv-accent);
}

.service-strength__text {
  font-family: var(--sv-font-ja);
  font-size: clamp(12px, 1.2vw, 13px);
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Image Area */
.service-strength__media {
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

.service-strength__media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sv-charcoal);
  opacity: 0.2;
  z-index: 1;
}

.service-strength__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-strength:hover .service-strength__img {
  transform: scale(1.03);
}

/* ========================================
   SUPPORT SECTION - 左寄せリスト
   ======================================== */
.service-section--support {
  background: var(--sv-white);
}

/* Support header - 左寄せに戻す */
.service-section--support .service-section__head {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.service-section--support .service-section__lead {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.service-support {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--sv-content-width);
  counter-reset: support-counter;
}

.service-support__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(24px, 4vw, 36px) 0;
  border-bottom: 1px solid var(--sv-cloud);
  counter-increment: support-counter;
  align-items: start;
}

.service-support__item:first-child {
  border-top: 1px solid var(--sv-cloud);
}

.service-support__item::before {
  content: "0" counter(support-counter);
  font-family: var(--sv-font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  color: var(--sv-accent);
  line-height: 1.6;
}

.service-support__text {
  font-family: var(--sv-font-ja);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.9;
  color: var(--sv-slate);
  margin: 0;
}

/* ========================================
   SCOPE SECTION - 仕様テーブル（中央配置）
   ======================================== */
.service-section--scope {
  background: var(--sv-charcoal);
  color: var(--sv-white);
}

.service-section--scope .service-section__sub-en {
  color: var(--sv-accent-bright);
}

.service-section--scope .service-section__title {
  color: var(--sv-pure-white);
}

.service-section--scope .service-section__note {
  color: rgba(255, 255, 255, 0.5);
}

/* Table Styles */
.service-table {
  max-width: var(--sv-content-width);
  margin: 0 auto;
  overflow-x: auto;
}

.service-table__table {
  width: 100%;
  border-collapse: collapse;
}

.service-table__table th,
.service-table__table td {
  padding: clamp(16px, 2.5vw, 24px) clamp(16px, 2vw, 20px);
  text-align: left;
  font-family: var(--sv-font-ja);
  font-size: clamp(13px, 1.4vw, 15px);
  line-height: 1.7;
  vertical-align: top;
}

.service-table__table tbody th {
  width: clamp(100px, 18vw, 160px);
  background: rgba(255, 255, 255, 0.05);
  color: var(--sv-accent-bright);
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.service-table__table tbody td {
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.service-table__table tbody tr {
  transition: background 0.3s ease;
}

.service-table__table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Pricing Table Header */
.service-table__table thead th {
  background: var(--sv-accent);
  color: var(--sv-pure-white);
  font-weight: 700;
  font-size: clamp(12px, 1.3vw, 14px);
  letter-spacing: 0.06em;
}

/* ========================================
   FLOW SECTION - フローステップ（中央配置）
   ======================================== */
.service-section--flow {
  background: var(--sv-white);
}

.service-steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 3vw, 32px);
  max-width: var(--sv-content-width);
}

@media (max-width: 900px) {
  .service-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .service-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.service-step {
  position: relative;
  text-align: center;
  padding: clamp(24px, 3vw, 36px) clamp(12px, 2vw, 20px);
  background: var(--sv-pure-white);
  border-radius: 8px;
  border: 1px solid var(--sv-cloud);
  transition: all 0.3s ease;
}

.service-step:hover {
  border-color: var(--sv-accent);
  box-shadow: 0 8px 24px rgba(245, 130, 32, 0.1);
}

@media (max-width: 600px) {
  .service-step {
    text-align: left;
    padding: clamp(20px, 3vw, 28px);
    padding-left: clamp(72px, 10vw, 88px);
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }

  .service-step:first-child {
    border-top: 1px solid var(--sv-cloud);
  }
}

/* Step Number */
.service-step__index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 6vw, 56px);
  height: clamp(48px, 6vw, 56px);
  margin: 0 auto clamp(16px, 2.5vw, 24px);
  background: var(--sv-accent);
  color: var(--sv-pure-white);
  font-family: var(--sv-font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 700;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.service-step:hover .service-step__index {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(245, 130, 32, 0.3);
}

@media (max-width: 600px) {
  .service-step__index {
    position: absolute;
    left: clamp(12px, 2vw, 20px);
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    margin: 0;
  }

  .service-step:hover .service-step__index {
    transform: translateY(-50%) scale(1.05);
  }
}

.service-step__body {
  position: relative;
}

.service-step__title {
  font-family: var(--sv-font-ja);
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 700;
  color: var(--sv-charcoal);
  margin: 0 0 clamp(8px, 1.2vw, 12px);
  letter-spacing: 0.02em;
}

.service-step__description {
  font-family: var(--sv-font-ja);
  font-size: clamp(12px, 1.3vw, 14px);
  line-height: 1.7;
  color: var(--sv-steel);
  margin: 0;
}

/* ========================================
   PRICING SECTION
   ======================================== */
.service-section--pricing {
  background: var(--sv-white);
  border-top: 1px solid var(--sv-cloud);
}

/* Pricing Table - Light background version */
.service-section--pricing .service-table__table tbody th {
  background: var(--sv-cloud);
  color: var(--sv-charcoal);
  border-bottom: 1px solid var(--sv-white);
}

.service-section--pricing .service-table__table tbody td {
  color: var(--sv-slate);
  border-bottom: 1px solid var(--sv-cloud);
}

.service-section--pricing .service-table__table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
  .service-section__head,
  .service-section__lead,
  .service-strength,
  .service-support__item,
  .service-table,
  .service-step,
  .service-toc {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 0.7s ease-out forwards;
  }

  .service-toc { animation-delay: 0.05s; }
  .service-section__head { animation-delay: 0.1s; }
  .service-section__lead { animation-delay: 0.15s; }
  .service-strength:nth-child(1) { animation-delay: 0.1s; }
  .service-strength:nth-child(2) { animation-delay: 0.2s; }
  .service-strength:nth-child(3) { animation-delay: 0.3s; }
  .service-support__item:nth-child(1) { animation-delay: 0.1s; }
  .service-support__item:nth-child(2) { animation-delay: 0.15s; }
  .service-support__item:nth-child(3) { animation-delay: 0.2s; }
  .service-step:nth-child(1) { animation-delay: 0.1s; }
  .service-step:nth-child(2) { animation-delay: 0.15s; }
  .service-step:nth-child(3) { animation-delay: 0.2s; }
  .service-step:nth-child(4) { animation-delay: 0.25s; }
  .service-table { animation-delay: 0.15s; }

  @keyframes revealUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ========================================
   BODY OVERRIDES
   ======================================== */
body.page-template-page-service .site-main {
  padding-top: 0;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .page-hero--bankin,
  .page-hero--service {
    min-height: auto;
    background: #fff;
    color: #000;
  }

  .page-hero__media,
  .page-hero__overlay,
  .page-hero__geometric {
    display: none;
  }
}

}
