﻿/* Feature underpages — extends homepage tokens; scoped, no bare element overrides */

.under-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin: 0 auto 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  max-width: 1100px;
}

/* Align hero copy/media with centered demo video (960px) */
.under-hero--sign-output {
  max-width: 960px;
  gap: 40px;
}

.under-hero__copy .under-head__title-row {
  margin-top: 0;
}

.under-hero__copy h1 {
  margin: 0 0 14px;
  font-size: 36px;
  line-height: 1.35;
}

.under-hero__media {
  min-width: 0;
}

.phone-stack {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  min-height: 280px;
}

.phone-frame {
  width: min(168px, 28vw);
  border-radius: 22px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.phone-frame--back {
  opacity: 0.88;
  transform: translateY(18px) scale(0.92);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #eef2f5;
}

.media-caption {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.avatar-stage {
  border-radius: 20px;
  overflow: hidden;
  background: #e8eef3;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.avatar-stage video,
.avatar-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: #e8eef3;
}

.avatar-stage--facility {
  aspect-ratio: auto;
}

.avatar-stage--facility img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

/* Demo video width matches HOW IT WORKS flow cards (.flow-list) */
.sample-stage {
  border-radius: 20px;
  overflow: hidden;
  background: #e8eef3;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.sample-stage__video {
  display: block;
  width: 100%;
  height: auto;
  background: #111;
}

.sample-stage__video::cue {
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 1rem;
  line-height: 1.45;
}

.under-block {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.under-block:last-of-type {
  border-bottom: 0;
}

.under-block .section-head {
  margin-bottom: 28px;
  text-align: center;
}

.under-block .section-head p {
  margin: 8px auto 0;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 36em;
  word-break: keep-all;
}

.under-block .section-head p .text-keep {
  white-space: nowrap;
}

.flow-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 800px;
}

.flow-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(50, 50, 50, 0.06);
}

.flow-item__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-family: var(--font-en);
}

.flow-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.flow-item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 16px;
}

.step-grid {
  display: grid;
  gap: 20px;
}

.step-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(140px, 0.55fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(50, 50, 50, 0.06);
}

.step-row--flip {
  grid-template-columns: minmax(140px, 0.55fr) minmax(0, 1.15fr);
}

.step-row--flip .step-row__body {
  order: 2;
}

.step-row--flip .step-row__media {
  order: 1;
}

.step-row__label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--green-mist);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.step-row h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.step-row p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.step-row__media {
  display: grid;
  place-items: center;
}

.step-row__media .phone-frame {
  width: min(132px, 34vw);
}

.cycle-panel {
  padding: 28px 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--green-mist), #fff 70%);
  border: 1px solid var(--line);
}

.cycle-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.cycle-panel__sub {
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--green-dark);
  font-size: 1.05rem;
}

.cycle-panel__note {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.7;
}

.cycle-trail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cycle-trail__item {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--green);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 0.88rem;
}

.cycle-trail__sep {
  color: var(--green-dark);
  font-weight: 800;
}

.tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(50, 50, 50, 0.05);
  font-weight: 700;
  font-size: 0.9rem;
}

.tech-chip--accent {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.tech-sep {
  color: var(--text-muted);
  font-weight: 800;
}

.vision-panel {
  margin-top: 8px;
  padding: 36px 24px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

.vision-panel h2 {
  margin: 0 0 8px;
}

.vision-panel__lead {
  margin: 0 0 24px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green-dark);
}

.vision-panel__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vision-panel__item {
  padding: 18px 14px;
  border-radius: 14px;
  background: var(--green-mist);
}

.vision-panel__item strong {
  display: block;
  margin-bottom: 4px;
}

.vision-panel__item span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.vision-panel__note {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about-suretalk-section {
  border-bottom: 0;
  padding: 64px 0 80px;
}

.underpage .try-section {
  margin-top: 140px;
}

.about-suretalk-section > .container {
  max-width: 800px;
  padding: 48px;
  border-radius: 16px;
  background: #fff;
}

.about-suretalk {
  padding: 46px 50px 48px;
  border-radius: 12px;
  background: #f3f3f3;
}

.about-suretalk h2 {
  position: relative;
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 2px solid #d8d8d8;
  font-size: 20px;
  line-height: 1.4;
}

.about-suretalk h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 56px;
  height: 2px;
  background: var(--green);
}

.about-suretalk p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.9;
}

.about-suretalk .btn {
  display: flex;
  width: 250px;
  max-width: 100%;
  margin: 34px auto 0;
}

@media (max-width: 768px) {
  .under-hero__copy h1 {
    font-size: 26px;
  }

  .flow-item h3,
  .flow-item p {
    font-size: 14px;
  }

  .about-suretalk h2 {
    font-size: 17px;
  }
}

@media (max-width: 960px) {
  .under-hero,
  .step-row,
  .step-row--flip {
    grid-template-columns: 1fr;
  }

  .step-row--flip .step-row__body,
  .step-row--flip .step-row__media {
    order: initial;
  }

  .phone-stack {
    min-height: 0;
  }

  .phone-frame--back {
    display: none;
  }

  .phone-frame {
    width: min(200px, 56vw);
  }

  .vision-panel__grid {
    grid-template-columns: 1fr;
  }

  .avatar-stage video,
  .avatar-stage img {
    max-height: 260px;
  }

  .avatar-stage--facility img {
    max-height: none;
  }

  .sample-stage {
    max-width: none;
  }

  .about-suretalk {
    padding: 28px 22px 32px;
  }

  .about-suretalk-section > .container {
    padding: 16px;
  }

  .about-suretalk .btn {
    width: 250px;
  }
}
