/* ===========================================================================
   ServicesAiAgent — Sections & Content Blocks
   1. Hero grid & text elements
   2. Flow links & overall structure
   3. Step rows & deliverable preview cards (T1-T5)
   4. Feature cards grid
   5. Authority and diagram wrappers
   =========================================================================== */

/* --- 1. HERO SECTION --- */
.aa-hero {
  color: var(--white);
  background-color: var(--navy-deep);
  background-image:
    linear-gradient(rgba(143, 201, 245, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 201, 245, .06) 1px, transparent 1px);
  background-size: 28px 28px;
  overflow: hidden;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(48px, 7vw, 72px);
}

.aa-hero__grid {
  display: grid;
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
}

@media (min-width: 1181px) {
  .aa-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(540px, 600px);
  }
}

@media (max-width: 1180px) {
  .aa-hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.aa-hero__txt {
  flex: 1;
  min-width: 0;
}

.aa-hero__eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-pale);
}

.aa-hero__h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--white);
}

.aa-hero__pos {
  margin: 0 0 16px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.5;
  color: var(--blue-pale);
}

.aa-hero__lead {
  position: relative;
  z-index: 2;
  margin: 0 0 24px;
  max-width: 36em;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.95;
  color: var(--on-dark-muted);
}

.aa-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.aa-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(27, 111, 179, .3);
  transition: background-color .2s, transform .2s, box-shadow .2s;
  box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
  .aa-hero__cta:hover {
    background: #15588f;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(27, 111, 179, .4);
  }
}

.aa-hero__jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  color: var(--white);
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  transition: border-color .2s;
  box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
  .aa-hero__jump:hover {
    border-color: var(--white);
  }
}

.aa-hero__fig {
  width: 100%;
  min-width: 0;
  max-width: 600px;
  margin-inline: auto;
  box-sizing: border-box;
}

@media (min-width: 1181px) {
  .aa-hero__fig {
    min-width: 540px;
  }
}

/* --- 2. STORY SECTION STAGE --- */
.aa-story-wrapper {
  margin-top: 24px;
}

.aa-story__stage {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #0B2036;
  box-shadow: 0 4px 20px rgba(16, 42, 67, .12);
  margin-inline: auto;
  box-sizing: border-box;
}

/* --- 3. FLOW SECTION & LINKS --- */
.aa-flow__fig {
  max-width: 640px;
  margin: 32px auto 40px;
  box-sizing: border-box;
}

.aa-flow__links {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

@media (min-width: 1181px) {
  .aa-flow__links {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 641px) and (max-width: 1180px) {
  .aa-flow__links {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .aa-flow__links {
    grid-template-columns: 1fr;
  }
}

.aa-flow__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(16, 42, 67, .04);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
  .aa-flow__link:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(27, 111, 179, .12);
    transform: translateY(-1px);
  }
}

.aa-flow__link-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  flex: none;
}

/* --- 4. AUTHORITY SECTION --- */
.aa-auth__fig {
  max-width: 640px;
  margin: 32px auto 0;
  box-sizing: border-box;
}

/* --- 5. CASES / STEPS LIST (S1-S5) & PREVIEW CARDS (T1-T5) --- */
.aa-steps-list {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 5vw, 64px);
  margin-top: 40px;
}

.aa-step-row {
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.aa-step-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

@media (min-width: 901px) {
  .aa-step-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 3.5vw, 48px);
    align-items: start;
  }
}

@media (max-width: 900px) {
  .aa-step-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.aa-step-row__txt {
  min-width: 0;
}

.aa-step-row__num {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 6px;
}

.aa-step-row__title {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
}

.aa-step-row__desc {
  margin: 0 0 14px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
}

.aa-step-row__bullets {
  margin: 0 0 16px;
  padding-left: 20px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.aa-step-row__bullets li {
  margin-bottom: 4px;
}

.aa-step-row__decision {
  margin: 0;
  padding: 10px 14px;
  background: #F8FBFE;
  border-left: 3px solid var(--blue);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  border-radius: 0 6px 6px 0;
}

/* Deliverable preview card (.aa-preview-card: T1-T5) */
.aa-preview-card {
  background: #F4F7FA;
  border: 1px solid #DCE4EC;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 4px 12px rgba(16, 42, 67, 0.04);
  min-width: 0;
  box-sizing: border-box;
}

.aa-preview-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #DCE4EC;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.aa-preview-card__badge {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #102A43;
  background: #E2ECF5;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1.4;
}

.aa-preview-card__docname {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}

.aa-preview-card__mock {
  background: var(--white);
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 10px;
  font-family: 'Noto Sans JP', sans-serif;
}

.aa-preview-card__note {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.4;
}

/* --- 6. FEATURES GRID --- */
.aa-feat-grid {
  display: grid;
  gap: 24px;
  align-items: stretch;
  margin-top: 40px;
}

@media (min-width: 901px) {
  .aa-feat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .aa-feat-grid {
    grid-template-columns: 1fr;
  }
}

.aa-feat-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 4px 16px rgba(16, 42, 67, .06);
  box-sizing: border-box;
}

.aa-feat-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
}

.aa-feat-card p {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}
