/* ========================================================================
   NaviA – Section-specific styles
   ======================================================================== */

/* ===== HERO (light bg matching flyer screenshot) ===== */
.hero {
  position: relative;
  padding: 70px 0 50px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 60%, rgba(255,255,255,.4) 100%),
    url('assets/hero-bg.jpg') center / cover no-repeat,
    #d8edf5;
  color: var(--ink);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 50%, var(--orange) 100%);
  z-index: 2;
}
.hero .gifu-logo {
  position: absolute;
  top: 24px;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
  pointer-events: none;
}
.hero .gifu-logo .tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy-600);
  background: rgba(255, 255, 255, .85);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.hero .gifu-logo .name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .9);
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(0, 47, 123, .08);
  font-weight: 800;
  color: var(--ink);
  font-size: 18px;
}
.hero .gifu-logo .name .b {
  width: 26px; height: 26px;
  border-radius: 5px;
  background: var(--navy-600);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 800;
  position: relative;
}
.hero .gifu-logo .name .b::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px solid #44c87a;
  border-radius: 3px;
}

.hero .inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  z-index: 2;
}
.hero .left { min-width: 0; }
.hero .right { position: relative; min-width: 0; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(0, 47, 123, .12);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--orange);
  box-shadow: 0 2px 8px rgba(0, 47, 123, .08);
}
.hero-tag .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(237, 108, 0, .25);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(237, 108, 0, .25); }
  50% { box-shadow: 0 0 0 8px rgba(237, 108, 0, .05); }
}

.hero h1 {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .01em;
  margin: 22px 0 24px;
  color: var(--navy-600);
  text-wrap: pretty;
}
.hero h1 .accent {
  color: var(--navy-600);
}
.hero .lead {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--ink);
  margin-bottom: 38px;
  max-width: 540px;
  line-height: 1.95;
  font-weight: 500;
}
.hero .hero-logo {
  width: 100%;
  max-width: 450px;
  margin: 24px 0 4px;
  line-height: 0;
}
.hero .hero-logo img {
  width: 100%;
  height: auto;
  display: block;
}
.hero .brand-row {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.hero .brand-row .logo.xl .word { font-size: clamp(42px, 5vw, 64px); }
.hero .brand-row > .by {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  letter-spacing: .04em;
  padding-bottom: 8px;
}
.hero .desc {
  font-size: 13.5px;
  color: var(--gray-700);
  line-height: 1.95;
  margin: 0 0 38px;
  max-width: 450px;
}
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .ctas .note {
  width: 100%;
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* KPI bar */
.kpi-bar {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 22px 12px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(0, 47, 123, .08);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 47, 123, .08);
}
.kpi-bar .item {
  text-align: center;
  padding: 0 12px;
  border-right: 1px solid rgba(0, 47, 123, .1);
}
.kpi-bar .item:last-child { border-right: none; }
.kpi-bar .num {
  font-family: var(--font-num);
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--orange);
  line-height: 1.1;
  letter-spacing: -.01em;
}
.kpi-bar .num small { font-size: 60%; color: var(--orange); font-weight: 700; margin-left: 2px; }
.kpi-bar .lbl { font-size: 11px; color: var(--gray-700); margin-top: 6px; letter-spacing: .04em; font-weight: 600; }

/* Phone mockup with embedded chat image */
.phone {
  position: relative;
  width: min(340px, 100%);
  margin: 0 auto;
  aspect-ratio: 9/19;
  background: linear-gradient(170deg, #1a2a3f 0%, #0e1a2c 100%);
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(10, 30, 56, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.phone .notch {
  position: absolute;
  top: 22px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 26px;
  background: #000;
  border-radius: 14px;
  z-index: 3;
}
.phone .screen {
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
  width: 100%; height: 100%;
  position: relative;
}
.phone .screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero .badge-247 {
  position: absolute;
  top: calc(36% - 120px);
  left: -36px;
  width: 240px;
  height: 110px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  z-index: 4;
  transform: none;
  filter: drop-shadow(0 14px 28px rgba(0, 47, 123, .35));
}
.hero .badge-247::before,
.hero .badge-247::after { content: none; display: none; }
.hero .badge-247 .bubble-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* mobile tail variant: rotate SVG so tail points down */
  transition: transform .2s;
}
.hero .badge-247 .content {
  position: relative;
  z-index: 1;
  /* sit text inside the rectangle area (top portion of svg viewBox 240×85) */
  width: 222px;
  height: 82px;
  padding: 12px 22px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* push down a little to clear the white SVG stroke */
  margin-top: 2px;
}
.hero .badge-247 .big {
  font-family: var(--font-num);
  font-weight: 800;
  font-size: 26px;
  color: var(--orange-light);
  line-height: 1.05;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.hero .badge-247 .big span {
  color: #fff;
  font-size: 60%;
  font-weight: 700;
  font-family: var(--font-jp);
}
.hero .badge-247 .sm {
  font-size: 12px;
  color: #fff;
  margin-top: 4px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}
/* Hero variant: centered */
.hero[data-layout="centered"] .inner {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}
.hero[data-layout="centered"] .lead,
.hero[data-layout="centered"] .desc { margin-left: auto; margin-right: auto; }
.hero[data-layout="centered"] .ctas,
.hero[data-layout="centered"] .brand-row { justify-content: center; }
.hero[data-layout="centered"] .right { display: none; }
.hero[data-layout="centered"] .kpi-bar { max-width: 800px; margin-inline: auto; margin-top: 56px; }

/* Hero variant: stacked phone-below */
.hero[data-layout="stacked"] .inner {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}
.hero[data-layout="stacked"] .lead,
.hero[data-layout="stacked"] .desc { margin-left: auto; margin-right: auto; }
.hero[data-layout="stacked"] .ctas,
.hero[data-layout="stacked"] .brand-row { justify-content: center; }
.hero[data-layout="stacked"] .right { margin-top: 48px; }
.hero[data-layout="stacked"] .badge-247 { left: auto; right: -10px; top: 24%; }

/* ===== Try AI Chatbot CTA (between hero and problems) ===== */
.try-bot {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 60%),
    url('assets/hero-bg.jpg') center bottom / cover no-repeat,
    #e7f1f7;
  padding: 50px 0 88px;
  overflow: hidden;
}
.try-bot .inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px;
  align-items: center;
}
.try-bot h3 {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 900;
  margin: 0 0 12px;
  color: var(--navy-600);
  line-height: 1.45;
  letter-spacing: .01em;
}
.try-bot h3 em {
  color: var(--orange);
  font-style: normal;
  font-size: 1.15em;
}
.try-bot .arrow-line {
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 100%);
  max-width: 360px;
  margin: 4px 0 14px;
  border-radius: 999px;
  position: relative;
}
.try-bot .arrow-line::after {
  content: "";
  position: absolute;
  right: -1px; top: 50%;
  width: 0; height: 0;
  border-left: 14px solid var(--orange-light);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  transform: translateY(-50%);
}
.try-bot p {
  font-size: 13.5px;
  color: var(--gray-700);
  margin: 0;
  line-height: 1.8;
}
.try-bot .mascot {
  width: 170px;
  flex-shrink: 0;
  text-align: center;
}
.try-bot .mascot img {
  width: 100%;
  height: auto;
  display: block;
}
.try-bot .qr {
  width: 170px;
  text-align: center;
  flex-shrink: 0;
}
.try-bot .qr .qr-link {
  display: block;
  width: 170px; height: 170px;
  background: #fff;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 47, 123, .12);
  margin: 0 auto 12px;
  transition: transform .2s, box-shadow .2s;
}
.try-bot .qr .qr-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 47, 123, .2);
}
.try-bot .qr .qr-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.try-bot .qr small {
  font-size: 11px;
  color: var(--gray-500);
  display: block;
  line-height: 1.5;
}

/* wave transition into navy section */
.wave-divider {
  position: relative;
  height: 0;
  margin-top: -1px;
  overflow: visible;
}
.wave-divider img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: bottom;
  display: block;
}
.wave-bottom-navy {
  position: relative;
  width: 100%;
  height: 80px;
  background: var(--navy-700);
  margin-top: -2px;
}

/* ===== Problems (No.2) ===== */
.problems {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-600) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-top: 56px;
}
.problems::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 400px at 80% -20%, rgba(237, 108, 0, .12), transparent 60%);
  pointer-events: none;
}
.problems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.problem-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-left: 4px solid var(--orange);
  border-radius: 16px;
  padding: 28px 26px;
  text-align: center;
  transition: transform .25s, box-shadow .25s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.problem-card:hover {
  transform: translateY(-4px);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .22);
}
.problem-card .cat {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 22px;
}
.problem-card .quote {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.75;
  margin: 0 0 10px;
  text-align: left;
}
.problem-card .quote::before { content: "「"; color: var(--orange); margin-right: -2px; }
.problem-card .quote::after { content: "」"; color: var(--orange); margin-left: -2px; }
.problem-card .person {
  width: 160px; height: 160px;
  background: transparent;
  border: none;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
  box-shadow: none;
  overflow: visible;
}
.problem-card .person img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.problem-card .quote::before,
.problem-card .quote::after { display: none; }

.problems-closer {
  margin-top: 112px;
  text-align: center;
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 600;
  line-height: 1.9;
  color: #fff;
}
@media (min-width: 881px){
  .problems .head .eyebrow { margin-top: 100px; }
}
.problems-closer .arrow-down {
  display: block;
  margin: 64px auto 0;
  width: 32px; height: 32px;
  border-right: 3px solid var(--orange);
  border-bottom: 3px solid var(--orange);
  transform: rotate(45deg);
  animation: bob 2s infinite;
}
@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, 4px); }
}

@media (max-width: 880px) {
  .hero { padding: 50px 0 40px; }
  .hero .inner {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    align-items: stretch !important;
    gap: 28px;
    text-align: center;
  }
  /* Hoist .left's children up so we can reorder them with .right */
  .hero .left { display: contents; }

  /* Mobile order + alignment: h1 → phone → lead → hero-logo → desc → ctas → kpi-bar */
  .hero .left h1,
  .hero h1.reveal,
  .hero h1        { order: 1; text-align: center !important; }
  .hero .right    { order: 2; margin-top: 8px; width: 100%; }
  .hero .left .lead,
  .hero .lead     { order: 3; text-align: center !important; }
  .hero .left .hero-logo,
  .hero .hero-logo { order: 4; margin-left: auto; margin-right: auto; }
  .hero .left .desc,
  .hero .desc     { order: 5; text-align: center !important; }
  .hero .left .ctas,
  .hero .ctas     { order: 6; justify-content: center; }
  .hero .left .kpi-bar,
  .hero .kpi-bar  { order: 7; }

  .hero .ctas { justify-content: center; }
  .hero .lead, .hero .desc { margin-left: auto; margin-right: auto; }
  .hero .brand-row { justify-content: center; }
  .hero .gifu-logo { top: 16px; right: 16px; transform: scale(.8); transform-origin: top right; }
  .kpi-bar { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
  .kpi-bar .item:nth-child(2) { border-right: none; }

  /* Phone + badge on mobile: match PC layout — badge overlaps upper-left of phone */
  .hero .phone { margin: 0 auto; }
  .hero .badge-247 {
    left: max(-20px, calc(50% - 200px));
    right: auto;
    top: calc(36% - 110px);
    transform: scale(.88);
    transform-origin: left top;
  }
  .hero .badge-247 .bubble-bg {
    /* tail already at bottom-right in path; no flip needed on mobile */
    transform: none;
  }
  .hero .badge-247 .big { font-size: 22px; }
  .hero .badge-247 .sm { font-size: 11px; margin-top: 4px; }

  .try-bot { padding: 40px 0 56px; }
  .try-bot .inner { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .try-bot .arrow-line { margin-inline: auto; }
  .try-bot .mascot, .try-bot .qr { margin: 0 auto; }

  .problems-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: clamp(26px, 7vw, 38px); }
}
