/*
  UX enhancements for hc-lp.html
  - Mobile bottom navigation + sticky CTA
  - Smaller mobile section spacing
  - FAQ accordion (mobile)
  - Header background on scroll
  - Decorative icons (inline SVG injected by JS)
  - Hub & spoke diagram for "長谷工を窓口に..."
*/

html {
  scroll-behavior: smooth;
  /* keep anchors from hiding behind the fixed header */
  scroll-padding-top: 110px;
}

/* Header readability while scrolling */
.ux-header-scrolled {
  background: rgba(250, 248, 243, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 169, 98, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

/* Slightly tighter header once scrolled (keeps premium feel, improves above-the-fold) */
.ux-header-scrolled.ux-header-tight {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

/* Hero subtle pattern overlay */
.ux-hero {
  position: relative;
  isolation: isolate;
  background-color: #faf8f3;
}
.ux-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(233, 227, 212, 0.75) 0%, rgba(233, 227, 212, 0.4) 70%);
  pointer-events: none;
  z-index: 0;
}
.ux-hero .animate-fade-in-up {
  position: relative;
  z-index: 2;
}
.ux-hero-image {
  position: absolute;
  inset: 0;
  background-image: url('../img/top_img.png');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  opacity: 0.85;
  filter: contrast(1.05) saturate(1.02);
  pointer-events: none;
  z-index: 0;
}
.hero-scroll-indicator {
  z-index: 5;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: none;
  color: #4a5d52;
  text-shadow: 0 2px 10px rgba(250, 248, 243, 0.95);
}
.hero-scroll-line {
  position: relative;
  height: 46px;
  margin-top: 4px;
  border-radius: 999px;
}
.hero-scroll-dot {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #c9a962;
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: 0 4px 10px rgba(201, 169, 98, 0.35);
}
@media (max-width: 768px) {
  .hero-scroll-indicator {
    bottom: 22px !important;
    font-size: 0.6rem;
    letter-spacing: 0.28em;
  }
  .hero-scroll-line {
    height: 34px;
  }
}
/* Problem card icons (injected) */
#problems .section-animate {
  position: relative;
  padding: 26px 28px 26px 108px;
  background: #f9f6ee;
  border-radius: 22px;
  border: 1px solid rgba(201, 169, 98, 0.22);
  box-shadow: 0 14px 30px rgba(26, 31, 28, 0.1);
  overflow: hidden;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
#problems .section-animate::before {
  content: '';
  display: none;
}
#problems .section-animate:hover {
  transform: translateY(0);
  background: #f9f6ee;
  border-color: rgba(201, 169, 98, 0.22);
  box-shadow: 0 14px 30px rgba(26, 31, 28, 0.1);
}
#problems .section-animate p {
  line-height: 1.7;
  letter-spacing: 0.02em;
}
.ux-card-icon {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 84px;
  opacity: 1;
  pointer-events: none;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(180deg, rgba(201, 169, 98, 0.2), rgba(201, 169, 98, 0.12));
  border-right: 1px solid rgba(201, 169, 98, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ux-card-icon::before {
  content: '';
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid rgba(201, 169, 98, 0.5);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 20px rgba(201, 169, 98, 0.18);
}
.ux-card-icon svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}
/* Risk card icons intentionally omitted to keep cards text-only. */

/* Hub & spoke diagram */
.ux-partnership {
  position: relative;
}
.ux-partnership::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/syn_img.png') center/cover no-repeat;
  opacity: 0.14;
  pointer-events: none;
}
.ux-partnership .container {
  position: relative;
  z-index: 1;
}
.ux-hub-diagram {
  position: relative;
  margin: 0 auto 26px;
  max-width: 860px;
  height: 420px;
}
.ux-hub-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(201, 169, 98, 0.35);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ux-hub-center img {
  width: 70px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.ux-hub-badge {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(201, 169, 98, 0.95);
}

.ux-hub-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 360px;
  border-radius: 9999px;
  border: 1px dashed rgba(201, 169, 98, 0.28);
  opacity: 0.85;
}

.ux-hub-description {
  margin: 0 auto 32px;
  max-width: 640px;
  font-size: 0.95rem;
  line-height: 1.9;
  color: rgba(250, 248, 243, 0.88);
}

.ux-hub-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  min-width: 132px;
  max-width: 160px;
  padding: 12px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(250, 248, 243, 0.95);
  font-size: 14px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.20);
}
.ux-hub-node::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(201, 169, 98, 0.95);
  margin-right: 10px;
  vertical-align: middle;
  opacity: 0.9;
}

/* Partnership chips hidden once the diagram is injected */
.ux-partnership .ux-partner-chips {
  display: none;
}

/* Solution section divider + step reveal */
.ux-solution-divider {
  position: relative;
  width: 160px;
  height: 1px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, rgba(201, 169, 98, 0), rgba(201, 169, 98, 0.7), rgba(201, 169, 98, 0));
}
.ux-solution-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #c9a962;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 16px rgba(201, 169, 98, 0.35);
}

#solution .ux-solution-step.section-animate {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
#solution .ux-solution-step.section-animate.visible {
  opacity: 1;
  transform: translateX(0);
}

#problems {
  position: relative;
  overflow: hidden;
}
#problems::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(201, 169, 98, 0.08), transparent 55%),
    radial-gradient(circle at 90% 0%, rgba(74, 93, 82, 0.06), transparent 50%);
  pointer-events: none;
}
#problems::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(255, 254, 251, 0) 0%, #fffefb 75%);
  pointer-events: none;
}
#problems + div {
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.8) 0%, #fffefb 45%, #fffefb 100%);
}

/* Risk tiles styling */
#risk .ux-risk-grid {
  gap: 0 !important;
  background: transparent !important;
  border: 1px solid rgba(201, 169, 98, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
#risk .ux-risk-card {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 31, 28, 0.96) 0%, rgba(22, 26, 24, 0.98) 100%);
  border-left: 1px solid rgba(201, 169, 98, 0.22);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
#risk .ux-risk-card:first-child {
  border-left: none;
}
#risk .ux-risk-card::after {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(201, 169, 98, 0.08);
  pointer-events: none;
}
#risk .ux-risk-card h3 {
  letter-spacing: 0.02em;
}
#risk .ux-risk-card ul li {
  color: rgba(250, 248, 243, 0.78);
}
#risk .ux-risk-card ul li::before {
  color: rgba(201, 169, 98, 0.8);
}

/* Feature tiles styling */
#features .ux-feature-grid {
  gap: 28px;
}
#features .ux-feature-card {
  position: relative;
  background: #fffefb;
  border: 1px solid rgba(201, 169, 98, 0.18);
  border-left-color: rgba(201, 169, 98, 0.75);
  box-shadow: 0 22px 48px rgba(26, 31, 28, 0.08);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
#features .ux-feature-card::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(201, 169, 98, 0.08);
  pointer-events: none;
}
#features .ux-feature-number {
  letter-spacing: 0.08em;
}
#features .ux-feature-body {
  position: relative;
  z-index: 1;
}

#cases .ux-case-grid {
  gap: 32px;
}

#cases .ux-case-card.section-animate {
  position: relative;
  padding: 40px 42px 44px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(55, 68, 61, 0.96) 0%, rgba(40, 52, 46, 0.96) 100%);
  border: 1px solid rgba(201, 169, 98, 0.22);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#cases .ux-case-card.section-animate::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

#cases .ux-case-card.section-animate > * {
  position: relative;
  z-index: 1;
}

#cases .ux-case-card.section-animate .font-display {
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

#cases .ux-case-card.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

#cases .ux-case-card.section-animate:hover {
  transform: translateY(0);
}

#faq .ux-faq-list {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

#faq .section-animate {
  border-top: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 28px 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

#faq .section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

#faq .section-animate > .text-base {
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

#faq .section-animate > p {
  margin-top: 0;
}

#trust .ux-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 72px;
  background: transparent;
}

#trust .ux-trust-card {
  position: relative;
  padding: 56px 24px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#trust .ux-trust-card::after {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  right: 0;
  width: 1px;
  background: rgba(201, 169, 98, 0.2);
}

#trust .ux-trust-card:last-child::after {
  content: none;
}

#trust .ux-trust-value {
  font-size: 2.5rem;
  font-weight: 400;
  color: #c9a962;
  line-height: 1;
  letter-spacing: 0.08em;
}

#trust .ux-trust-unit {
  font-size: 0.875rem;
  color: #4a5d52;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

#trust .ux-trust-description {
  font-size: 0.9375rem;
  color: #2a2a2a;
  line-height: 1.6;
  max-width: 220px;
  margin-top: 8px;
}

#trust .ux-trust-highlight {
  display: inline;
  padding: 4px 10px;
  background: rgba(74, 93, 82, 0.15);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Pricing cards */
#pricing .pricing-card.section-animate {
  border-radius: 22px;
  background: #fffefb;
  border: 1px solid rgba(201, 169, 98, 0.2);
  box-shadow: 0 24px 60px rgba(26, 31, 28, 0.08);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.7s ease;
}

#pricing .pricing-card.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

#pricing .pricing-card.section-animate:hover {
  transform: translateY(0);
  box-shadow: 0 24px 60px rgba(26, 31, 28, 0.08);
}

#pricing .pricing-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 4.5rem;
  line-height: 1;
}

#pricing .pricing-amount__label {
  font-family: var(--font-body);
  font-size: 0.3em;
  line-height: 1;
}

#pricing .pricing-card .pricing-case-title span:last-child {
  font-size: 2.75rem;
}

#pricing .pricing-card--recommended {
  border-width: 2px;
  border-color: #c9a962;
  box-shadow: none;
}

#pricing .pricing-card--recommended .absolute {
  left: 50%;
  transform: translateX(-50%);
  top: -14px;
  padding: 4px 20px;
  border-radius: 999px;
  letter-spacing: 0.14em;
  font-weight: 600;
}

@media (max-width: 768px) {
  #pricing .pricing-card.section-animate {
    padding: 32px 24px;
  }
}

/* Refined spacing + typography rhythm */
#problems,
#risk,
#solution,
#features,
#trust,
#pricing,
#cases,
#faq,
#contact {
  padding-top: 128px !important;
  padding-bottom: 128px !important;
}

#problems .section-animate p,
#risk .section-animate p,
#solution .section-animate p,
#features .section-animate p,
#trust .section-animate p,
#pricing .section-animate p,
#cases .section-animate p,
#faq .section-animate p,
#contact p {
  line-height: 1.85;
}

@media (max-width: 768px) {
  #trust .ux-trust-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  #trust .ux-trust-card {
    padding: 36px 20px;
  }

  #trust .ux-trust-card::after {
    top: auto;
    bottom: 0;
    left: 20%;
    right: 20%;
    width: auto;
    height: 1px;
  }

  #trust .ux-trust-card:last-child::after {
    content: none;
  }
}

/* Primary CTA emphasis */
a.inline-flex[href$="/contact"] {
  box-shadow: 0 14px 30px rgba(26, 31, 28, 0.18);
}
a.inline-flex[href$="/contact"]:hover {
  box-shadow: 0 18px 36px rgba(26, 31, 28, 0.22);
}

/* Mobile bottom navigation */
.ux-mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  padding: 6px 10px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
  background: rgba(13, 15, 14, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.ux-mobile-bottom-nav__inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ux-mobile-bottom-nav__row {
  display: grid;
  gap: 6px;
}
.ux-mobile-bottom-nav__row--top {
  grid-template-columns: repeat(3, 1fr);
}
.ux-mobile-bottom-nav__row--cta {
  grid-template-columns: 1fr;
}
.ux-mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  text-decoration: none;
  color: rgba(250, 248, 243, 0.85);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.ux-mobile-bottom-nav a:active {
  transform: translateY(1px);
}
.ux-mobile-bottom-nav a svg {
  width: 16px;
  height: 16px;
}
.ux-mobile-bottom-nav a span {
  font-size: 10px;
  letter-spacing: 0.06em;
}

.ux-mobile-bottom-nav a[data-ux-active="true"] {
  border-color: rgba(201, 169, 98, 0.55);
  background: rgba(201, 169, 98, 0.12);
  color: rgba(250, 248, 243, 0.95);
}

/* Sticky CTA emphasis for the last item */
.ux-mobile-bottom-nav a.ux-primary {
  border-color: rgba(201, 169, 98, 0.75);
  background: rgba(201, 169, 98, 0.16);
}

/* Scroll-to-top button */
.ux-scroll-top {
  position: fixed;
  right: 14px;
  bottom: calc(120px + env(safe-area-inset-bottom));
  z-index: 1999;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(13, 15, 14, 0.70);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(250, 248, 243, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.ux-scroll-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.ux-scroll-top svg {
  width: 18px;
  height: 18px;
}

/* FAQ accordion (mobile) */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 92px;
  }

  .ux-hero .animate-fade-in-up {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-left: max(20px, env(safe-area-inset-left)) !important;
    padding-right: max(20px, env(safe-area-inset-right)) !important;
  }

  body.ux-has-bottom-nav {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  /* Reduce section padding on mobile to avoid scroll fatigue */
  #problems,
  #risk,
  #solution,
  #features,
  #trust,
  #pricing,
  #cases,
  #faq,
  #contact {
    padding-top: 96px !important;
    padding-bottom: 96px !important;
  }

  #problems .section-animate p,
  #risk .section-animate p,
  #solution .section-animate p,
  #features .section-animate p,
  #trust .section-animate p,
  #pricing .section-animate p,
  #cases .section-animate p,
  #faq .section-animate p,
  #contact p {
    line-height: 1.9;
  }

  /* Partnership section (no id) gets tagged by JS with .ux-partnership */
  section.ux-partnership {
    padding-top: 72px !important;
    padding-bottom: 72px !important;
  }

  /* Hub diagram size down */
  .ux-hub-diagram {
    height: 340px;
  }
  .ux-hub-center {
    width: 190px;
    height: 190px;
  }
  .ux-hub-ring {
    width: 300px;
    height: 300px;
  }
  .ux-hub-center img {
    width: 60px;
  }
  .ux-hub-description {
    margin-bottom: 24px;
    font-size: 0.9rem;
  }
  .ux-hub-node {
    min-width: 118px;
    padding: 10px 12px;
    font-size: 12.5px;
  }

  #problems .grid {
    gap: 18px;
  }

  #risk .ux-risk-grid {
    border: none;
    box-shadow: none;
  }

  #features .ux-feature-grid {
    gap: 20px;
  }
  #features .ux-feature-card {
    padding: 28px !important;
  }
  #risk .ux-risk-card {
    border-left: none;
    border-top: 1px solid rgba(201, 169, 98, 0.22);
  }
  #risk .ux-risk-card:first-child {
    border-top: none;
  }
  #risk .ux-risk-card::after {
    inset: 16px;
  }

  #cases .ux-case-grid {
    gap: 20px;
  }

  #cases .ux-case-card.section-animate {
    padding: 28px 24px 32px;
  }

  #cases .ux-case-card.section-animate::after {
    inset: 12px;
  }

  #problems .section-animate {
    padding: 18px 18px 18px 74px;
    border-radius: 18px;
  }

  .ux-card-icon {
    width: 56px;
  }
  .ux-card-icon::before {
    width: 34px;
    height: 34px;
  }
  .ux-card-icon svg {
    width: 16px;
    height: 16px;
  }

  #faq .section-animate {
    padding: 22px 0;
  }

  #faq .section-animate > .text-base {
    font-size: 0.95rem;
  }

  /* FAQ: turn into accordion */
  #faq .ux-faq-item {
    cursor: pointer;
  }
  #faq .ux-faq-question {
    position: relative;
    padding-right: 34px;
  }
  #faq .ux-faq-question::after {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(201, 169, 98, 0.9);
    border-bottom: 2px solid rgba(201, 169, 98, 0.9);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 180ms ease;
    opacity: 0.9;
  }

  #faq .ux-faq-item[aria-expanded="true"] .ux-faq-question::after {
    transform: translateY(-50%) rotate(-135deg);
  }

  #faq .ux-faq-answer {
    display: none;
  }
  #faq .ux-faq-item[aria-expanded="true"] .ux-faq-answer {
    display: block;
  }

  header img {
    transition: height 260ms ease;
  }

  header.ux-header-scrolled,
  header.py-4 {
    padding-top: calc(10px + env(safe-area-inset-top)) !important;
    padding-bottom: 10px !important;
  }

  header.ux-header-scrolled img,
  header.py-4 img {
    height: 24px;
  }
}

/* Hide mobile nav on tablet/desktop */
@media (min-width: 768px) {
  .ux-mobile-bottom-nav {
    display: none;
  }
}
