/* ======================
   aimark.jp Hero v3
   ------------------------
   Network-hub style FV + features strip + metrics strip.
   Only overrides hero-v3 scope. Other sections untouched.
   ====================== */

:root {
  --v3-cream: #f8f7f2;
  --v3-mint: #ecf5f0;
  --v3-card-bg: rgba(255, 255, 255, 0.82);
  --v3-card-border: rgba(56, 178, 164, 0.16);
  --v3-hub-border: rgba(56, 178, 164, 0.32);
  --v3-hub-bg: #ffffff;
  --v3-status-success: #3aa687;
  --v3-status-fail: #e86a5e;
  --v3-status-mid: #d4a574;
  --v3-status-partial: #7ba3c4;
  --v3-status-alt: #9b8abf;
  --v3-tag-bg: rgba(56, 178, 164, 0.10);
  --v3-tag-fg: #1f6b61;
}

/* ============ Header v3 ============ */
.header-v3 .header-inner {
  gap: var(--space-6);
}

.logo-v3 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.logo-v3 .logo-icon {
  height: 48px;
  width: auto;
}

.logo-tagline {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary-dark);
  letter-spacing: 0.04em;
}

.header-v3 .nav {
  margin-left: auto;
  gap: var(--space-7, 1.75rem);
}

.header-cta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-left: var(--space-4);
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  transition: background var(--transition-base), transform var(--transition-base);
}

.header-cta-btn:hover {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.header-micro-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--primary-dark);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

/* ============ Hero v3 base ============ */
.hero-v3 {
  display: block;
  background:
    radial-gradient(ellipse 70% 50% at 70% 30%, rgba(93, 211, 196, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(232, 240, 232, 0.5) 0%, transparent 60%),
    linear-gradient(180deg, var(--v3-cream) 0%, var(--v3-mint) 100%);
  min-height: auto;
  padding-top: calc(var(--header-height) + var(--space-6));
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
}

.hero-v3::before,
.hero-v3::after { display: none; }

.hero-v3-content {
  display: grid;
  grid-template-columns: minmax(400px, 0.78fr) minmax(0, 1.22fr);
  gap: var(--space-7);
  align-items: center;
  min-height: 560px;
  position: relative;
}

/* ============ Hero left (copy + CTA) ============ */
.hero-v3-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.closed-badge {
  display: inline-block;
  width: fit-content;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid rgba(45, 62, 80, 0.12);
  border-radius: var(--radius-full);
  box-shadow: 0 1px 0 rgba(15, 34, 53, 0.04);
  letter-spacing: 0.02em;
}


.hero-v3-title {
  font-size: clamp(1.8rem, 2.9vw, 2.55rem);
  line-height: 1.35;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.01em;
}

.hero-v3-title .highlight {
  color: var(--primary);
  position: relative;
}

.type-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.08s ease, transform 0.2s ease;
}

.type-char.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.type-cursor {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: var(--primary);
  animation: typeCursorBlink 0.85s steps(2, start) infinite;
}

.type-cursor.is-done {
  opacity: 0;
  animation: none;
  transition: opacity 0.4s ease 0.2s;
}

@keyframes typeCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-v3-desc,
.hero-v3-cta {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-v3-desc.is-typed,
.hero-v3-cta.is-typed {
  opacity: 1;
  transform: translateY(0);
}

.hero-v3-desc {
  font-size: 15px;
  line-height: 1.9;
  color: var(--navy-light);
  margin: 0;
}

.hero-v3-cta {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.hero-v3-cta .btn {
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-v3-cta .btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.hero-v3-cta .btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.hero-v3-cta .btn-outline {
  background: #fff;
  color: var(--navy);
  border: 1px solid rgba(45, 62, 80, 0.18);
}

.hero-v3-cta .btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-arrow { font-size: 16px; line-height: 1; }

/* ============ Photo stage ============ */
.hero-v3-stage {
  position: relative;
  aspect-ratio: 1.57 / 1;
  min-height: 520px;
}

.stage-photo {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, #d5e8e2 0%, #eef5f1 100%);
  box-shadow:
    0 28px 60px -24px rgba(15, 34, 53, 0.28),
    0 2px 6px -2px rgba(15, 34, 53, 0.08);
}

.stage-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ============ Chat cards ============ */
.chat-card {
  position: absolute;
  width: 214px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--v3-card-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 10px 28px -10px rgba(15, 118, 110, 0.22),
    0 2px 6px -2px rgba(15, 118, 110, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3;
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow var(--transition-base);
}

.chat-card.is-entered {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: cardBob 8s ease-in-out 0.8s infinite;
}

.chat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 16px 36px -10px rgba(15, 118, 110, 0.28),
    0 4px 10px -2px rgba(15, 118, 110, 0.12);
  z-index: 10;
  animation-play-state: paused;
}

@keyframes cardBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1); }
}

/* Card positions overlaid on people photo (3 cards) */
.chat-card { width: 258px; padding: 12px 14px; }
.chat-card--pos-1 { top: 10%;  right: -4%; }
.chat-card--pos-2 { top: 46%;  left: -6%; }
.chat-card--pos-3 { top: 58%;  right: 2%; }
.chat-card--pos-2.is-entered { animation-delay: 1.6s; }
.chat-card--pos-3.is-entered { animation-delay: 2.4s; }

.cc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.cc-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--sage);
  box-shadow: 0 0 0 1px rgba(56, 178, 164, 0.2);
}

.cc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cc-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
}

.cc-time {
  font-size: 10.5px;
  color: var(--navy-light);
  opacity: 0.7;
}

.cc-badge {
  margin-left: auto;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: #fff;
  letter-spacing: 0.02em;
}

.cc-badge--success { background: var(--v3-status-success); }
.cc-badge--fail { background: var(--v3-status-fail); }
.cc-badge--mid { background: var(--v3-status-mid); }
.cc-badge--partial { background: var(--v3-status-partial); }
.cc-badge--alt { background: var(--v3-status-alt); }

.cc-body {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--navy);
  margin: 0 0 8px;
}

.cc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  background: var(--v3-tag-bg);
  color: var(--v3-tag-fg);
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

/* ============ Metrics strip (numbers + testimonials) ============ */
.metrics-strip {
  position: relative;
  padding: var(--space-10) 0 var(--space-8);
  background: #ffffff;
  border-top: 1px solid rgba(45, 62, 80, 0.08);
  overflow: hidden;
}

.metrics-inner {
  display: block;
  position: relative;
  z-index: 2;
  padding: var(--space-5) var(--space-6);
  background: var(--warm-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 24px -12px rgba(15, 34, 53, 0.1);
}

.metrics-block {
  padding: 0 var(--space-2);
}

.metrics-label {
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.metrics-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-6);
}

.metrics-intro {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--navy-light);
  margin: var(--space-2) 0 0;
}

.metrics-footnote {
  margin: var(--space-5) auto 0;
  max-width: 820px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--navy-light);
  text-align: center;
  opacity: 0.85;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.metrics-row--4col {
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.metrics-row--2col {
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: var(--space-8);
  justify-content: center;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(45, 62, 80, 0.06);
}

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(56, 178, 164, 0.1);
  color: var(--primary);
  margin-bottom: 4px;
}

.metric-icon svg { width: 18px; height: 18px; }

.metric-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.metric-num sup {
  font-size: 0.55em;
  font-weight: 600;
  margin-left: 1px;
  vertical-align: super;
  color: var(--navy-light);
}

.metric-label {
  font-size: 11.5px;
  color: var(--navy-light);
  letter-spacing: 0.02em;
}

.metric-label--top {
  font-size: 12px;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Testimonial cards */
.testimonial-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  padding-left: var(--space-5);
  border-left: 1px solid rgba(45, 62, 80, 0.08);
}

.testimonial {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.testimonial-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sage);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.testimonial-body {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--navy);
  margin: 0 0 4px;
}

.testimonial-body u,
.testimonial-body .emph {
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.testimonial-role {
  font-size: 11px;
  color: var(--navy-light);
  letter-spacing: 0.04em;
  margin: 0;
}

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .hero-v3-content {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    min-height: auto;
  }
  .hero-v3-stage { min-height: 460px; max-width: 720px; margin: 0 auto; width: 100%; }
  .metrics-inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .testimonial-row { border-left: none; padding-left: 0; border-top: 1px solid rgba(45, 62, 80, 0.08); padding-top: var(--space-5); }
}

@media (max-width: 768px) {
  .header-cta-group { display: none; }
  .hero-v3-title { font-size: clamp(1.8rem, 6vw, 2.4rem); }
  .hero-v3-stage { min-height: 420px; aspect-ratio: 1.1 / 1; }
  .chat-card { width: 220px; padding: 10px 12px; }
  .chat-card--pos-1 { right: -2%; }
  .chat-card--pos-2 { left: -2%; }
  .chat-card--pos-3 { right: -2%; }
  .metrics-row { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
  .metrics-row--4col { grid-template-columns: repeat(2, 1fr); }
  .testimonial-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .chat-card { width: 190px; }
  .chat-card--pos-2 { top: 42%; left: 0%; }
  .chat-card--pos-3 { top: 70%; right: 0%; }
  .metrics-row { grid-template-columns: 1fr; gap: var(--space-4); }
  .metrics-row--4col { grid-template-columns: 1fr; }
}
