:root {
  --navy: #141A2E;
  --navy-deep: #FFFFFF;
  --navy-mid: #F1F3FB;
  --magenta: #9A308D;
  --magenta-bright: #C2299E;
  --cyan: #00838F;
  --ink: #1A1F36;
  --ink-soft: #5B6178;
  --max-width: 1080px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--navy-deep);
  background-image:
    linear-gradient(rgba(154,48,141,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,131,143,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  line-height: 1.75;
}

a { color: var(--cyan); }
a:hover { color: var(--magenta-bright); }
img { max-width: 100%; display: block; }

#bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.site-header, .hero, section, footer { position: relative; z-index: 1; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(154, 48, 141, 0.18);
}

.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-header .logo img { height: 26px; }

.site-nav { display: flex; gap: 30px; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}
.site-nav a:hover { color: var(--cyan); }

.nav-cta {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  color: #fff !important;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(154, 48, 141, 0.25);
}
.nav-cta:hover { filter: brightness(1.08); }

/* Hero */
.hero {
  position: relative;
  padding: 110px 0 120px;
  overflow: hidden;
  background: linear-gradient(160deg, #0B0F1E 0%, #123246 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 0;
  background:
    radial-gradient(600px 340px at 20% 0%, rgba(194,41,158,0.16), transparent 60%),
    radial-gradient(600px 340px at 80% 100%, rgba(0,131,143,0.14), transparent 60%);
  animation: heroGlowPulse 7s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(255,255,255,0.07) 50%, transparent 60%);
  background-size: 220% 220%;
  animation: heroScan 8s linear infinite;
}

@keyframes heroGlowPulse {
  0%, 100% { opacity: 0.75; transform: scale(1) translateY(0); }
  50% { opacity: 1; transform: scale(1.08) translateY(-1.5%); }
}

@keyframes heroScan {
  0% { background-position: 120% 0%; }
  100% { background-position: -20% 0%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  margin-bottom: 22px;
}
.hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #8FDEE6;
  box-shadow: 0 0 8px 2px rgba(143,222,230,0.7);
  animation: badgePulse 1.8s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.ai-glow {
  position: relative;
  background: linear-gradient(90deg, #8FDEE6, #E9A8DA, #8FDEE6);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: aiGlowShift 3.5s ease-in-out infinite;
  text-shadow: 0 0 24px rgba(143,222,230,0.35);
}
@keyframes aiGlowShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge-dot, .ai-glow { animation: none; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
}

#hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero-illustration {
  position: absolute;
  top: 48%; left: 50%;
  width: 640px;
  max-width: 92vw;
  transform: translate(-50%, -52%);
  z-index: 0;
  opacity: 0.6;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero .wrap { text-align: center; position: relative; z-index: 1; }

.hero-chat {
  max-width: 300px;
  margin: 44px auto 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 16px;
  padding: 16px 18px 18px;
  text-align: left;
  box-shadow: 0 20px 50px rgba(10,14,50,0.3);
}
.hero-chat-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.85);
  margin: 0 0 14px; letter-spacing: 0.02em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.hero-chat-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3DDC84; box-shadow: 0 0 6px #3DDC84;
  display: inline-block; flex-shrink: 0;
}
.hero-chat-bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 10px;
  opacity: 0;
  transform: translateY(6px);
  animation: chatIn 0.4s ease forwards;
}
.hero-chat-bubble:last-child { margin-bottom: 0; }
.hero-chat .bubble-user {
  background: rgba(255,255,255,0.16);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
  animation-delay: 0.2s;
}
.hero-chat .bubble-ai {
  background: linear-gradient(90deg, var(--magenta-bright), var(--cyan));
  color: #fff;
  border-bottom-left-radius: 4px;
  min-height: 18px;
  display: flex; align-items: center;
  animation-delay: 0.5s;
}
@keyframes chatIn { to { opacity: 1; transform: none; } }

.hero-chat .typing { display: inline-flex; gap: 4px; }
.hero-chat .typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  animation: typingBounce 1.1s infinite ease-in-out;
}
.hero-chat .typing span:nth-child(2) { animation-delay: 0.15s; }
.hero-chat .typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.hero-chat .bubble-ai .answer { display: none; }
.hero-chat .bubble-ai.is-answered .typing { display: none; }
.hero-chat .bubble-ai.is-answered .answer { display: inline; }

@media (prefers-reduced-motion: reduce) {
  .hero-chat-bubble { opacity: 1; transform: none; animation: none; }
  .hero-chat .typing span { animation: none; }
}

.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.5;
  margin: 0 0 22px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff 10%, #8FDEE6 55%, #E9A8DA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 620px;
  margin: 0 auto 40px;
  color: rgba(255,255,255,0.72);
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.7);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.3s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(0,194,209,0.28);
  color: #fff !important;
}

.btn-primary {
  color: #fff;
}

.btn-outline {
  color: #fff !important;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* Sections */
section { padding: 88px 0; }
.section-alt { background: rgba(20,26,46,0.05); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--cyan);
  font-weight: 700;
  margin: 0 0 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.section-head h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0 0 14px; color: var(--navy); }
.section-head p { color: var(--ink-soft); margin: 0; }

/* Pillars / cards */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 780px) {
  .pillars { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(154, 48, 141, 0.16);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 26px rgba(20,26,46,0.10);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--cyan); transform: translateY(-4px); box-shadow: 0 14px 36px rgba(20,26,46,0.16); }

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  padding: 1px;
  background: conic-gradient(from 0deg, var(--cyan), var(--magenta-bright), var(--cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  animation: cardBorderSpin 3s linear infinite;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
@keyframes cardBorderSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .card::before { animation: none; }
}

.card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(0,131,143,0.10);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; font-size: 1.3rem;
  border: 1px solid rgba(0,131,143,0.3);
  color: var(--cyan);
}
.card .icon svg { width: 22px; height: 22px; }

.card h3 { margin: 0 0 10px; font-size: 1.1rem; color: var(--navy); }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.card .card-link { display: inline-block; margin-top: 16px; font-size: 0.88rem; font-weight: 700; text-decoration: none; color: var(--cyan); }

/* Demo section */
.demo-box {
  display: flex; gap: 40px; align-items: center;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 131, 143, 0.22);
  border-radius: 20px; padding: 40px;
  box-shadow: 0 4px 30px rgba(154,48,141,0.08);
}
.demo-box img.qr { width: 160px; height: 160px; border-radius: 12px; border: 1px solid rgba(0,131,143,0.3); background: #fff; padding: 8px; }
.demo-box .line-id {
  display: inline-block; margin-top: 10px; font-weight: 700;
  color: #fff; background: var(--cyan);
  padding: 4px 12px; border-radius: 999px; font-size: 0.9rem;
}
@media (max-width: 640px) { .demo-box { flex-direction: column; text-align: center; } }

.contact-line-qr { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.contact-line-qr img.qr { width: 84px; height: 84px; border-radius: 8px; border: 1px solid rgba(0,131,143,0.3); background: #fff; padding: 5px; flex-shrink: 0; }
.contact-line-qr .line-id {
  display: inline-block; font-weight: 700;
  color: #fff; background: var(--cyan);
  padding: 4px 12px; border-radius: 999px; font-size: 0.85rem;
}
.contact-line-qr .card-link { display: block; margin-top: 8px; }

/* Other business — banner style */
.other-biz { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .other-biz { grid-template-columns: 1fr; } }

.biz-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(120deg, rgba(20,26,46,0.05), rgba(241,243,251,0.85));
  border: 1px solid rgba(0,131,143,0.22);
  border-radius: 14px;
  padding: 26px 26px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  overflow: hidden;
}
.biz-banner:hover {
  border-color: rgba(0,194,209,0.6);
  transform: translateY(-2px);
  background: linear-gradient(120deg, rgba(20,26,46,0.07), rgba(194,41,158,0.10));
}
.biz-banner::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  padding: 1px;
  background: conic-gradient(from 0deg, var(--navy), var(--cyan), var(--magenta-bright), var(--navy));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  animation: cardBorderSpin 3.5s linear infinite;
  pointer-events: none;
}
.biz-banner:hover::before { opacity: 1; }
.biz-banner::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(180,235,240,0.55), transparent);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}
.biz-banner:hover::after {
  opacity: 1;
  animation: bizBannerSheen 1s ease;
}
@keyframes bizBannerSheen {
  0% { left: -60%; }
  100% { left: 130%; }
}
.biz-banner-icon {
  flex: 0 0 auto;
  width: 50px; height: 50px;
  border-radius: 10px;
  background: rgba(0,131,143,0.08);
  border: 1px solid rgba(0,131,143,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--cyan);
  transition: box-shadow 0.3s, transform 0.3s;
}
.biz-banner-icon svg { width: 26px; height: 26px; }

.h1-icon {
  display: inline-flex;
  vertical-align: -0.15em;
  margin-right: 0.35em;
  color: var(--navy);
}
.h1-icon svg { width: 0.85em; height: 0.85em; }
.biz-banner:hover .biz-banner-icon {
  box-shadow: 0 0 0 5px rgba(0,194,209,0.22);
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .biz-banner::before { animation: none; }
  .biz-banner::after { animation: none; }
}
.biz-banner-body { flex: 1 1 auto; min-width: 0; }
.biz-banner-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 6px;
}
.biz-banner-body h3 { margin: 0 0 6px; font-size: 1.02rem; color: var(--navy); }
.biz-banner-body p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }
.biz-banner-arrow {
  flex: 0 0 auto;
  font-size: 1.3rem;
  color: var(--cyan);
  transition: transform 0.2s, color 0.2s;
}
.biz-banner:hover .biz-banner-arrow { transform: translateX(4px); color: var(--magenta-bright); }
@media (max-width: 480px) { .biz-banner { flex-wrap: wrap; } }

/* Company info table */
.info-table {
  width: 100%; border-collapse: collapse;
  background: #fff;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(154, 48, 141, 0.18);
  box-shadow: 0 2px 20px rgba(20,26,46,0.06);
}
.info-table th, .info-table td { text-align: left; padding: 16px 20px; border-bottom: 1px solid rgba(154,48,141,0.12); font-size: 0.95rem; }
.info-table th { width: 160px; color: var(--ink-soft); font-weight: 600; background: rgba(0,131,143,0.05); }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
.info-table td a { color: var(--cyan); }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, #0B0F1E, #123246);
  color: #fff; text-align: center; padding: 72px 0;
}
.cta-band h2 { margin: 0 0 14px; font-size: 1.6rem; color: #fff; }
.cta-band p { margin: 0 0 28px; color: rgba(255,255,255,0.72); }

/* Footer */
.site-footer { background: var(--navy-mid); color: var(--ink-soft); padding: 48px 0 28px; font-size: 0.88rem; border-top: 2px solid var(--cyan); }
.site-footer .foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; margin-bottom: 28px; }
.site-footer h4 { color: var(--cyan); font-size: 0.85rem; margin: 0 0 12px; letter-spacing: 0.06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.site-footer .other-biz-note { border-top: 1px solid rgba(154,48,141,0.15); padding-top: 20px; font-size: 0.82rem; color: var(--ink-soft); opacity: 0.8; }
.site-footer .copyright { margin-top: 20px; font-size: 0.78rem; color: var(--ink-soft); opacity: 0.7; }
.site-footer .tel-muted { opacity: 0.6; font-size: 0.92em; }

/* Page hero (non-top pages) */
.page-hero {
  background:
    radial-gradient(600px 300px at 30% 0%, rgba(154,48,141,0.12), transparent 60%),
    radial-gradient(600px 300px at 70% 100%, rgba(0,131,143,0.10), transparent 60%);
  color: var(--navy); padding: 68px 0 76px; text-align: center;
  border-bottom: 1px solid rgba(154,48,141,0.15);
}
.page-hero h1 { margin: 0 0 12px; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--navy); }
.page-hero p { margin: 0; color: var(--ink-soft); }

.service-detail { display: grid; gap: 28px; margin-bottom: 28px; }
.service-detail .card { display: grid; grid-template-columns: 44px 1fr; gap: 20px; align-items: start; }
.service-detail .card .icon { margin-bottom: 0; }

/* Contact form */
.contact-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 780px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .contact-form .form-row { grid-template-columns: 1fr; } }

.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--ink-soft); }
.contact-form .req { color: var(--magenta-bright); font-size: 0.72rem; font-weight: 700; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(154,48,141,0.25);
  background: #fff;
  color: var(--ink);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(91,97,120,0.45); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,131,143,0.15);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form button { align-self: flex-start; border: none; cursor: pointer; }
.contact-form button:disabled { opacity: 0.6; cursor: default; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.4em; font-size: 0.9rem; }
.form-status.is-ok { color: var(--cyan); }
.form-status.is-error { color: var(--magenta-bright); }

.contact-side .card { margin-bottom: 20px; }

/* AI chat widget */
.ai-chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--magenta-bright), var(--cyan));
  box-shadow: 0 8px 26px rgba(154, 48, 141, 0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.ai-chat-fab::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(194, 41, 158, 0.4);
  animation: fabPulse 2.2s ease-out infinite;
}
@keyframes fabPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}
.ai-chat-fab svg { width: 26px; height: 26px; fill: #fff; }
.ai-chat-fab .ai-chat-fab-close { display: none; color: #fff; font-size: 1.4rem; line-height: 1; }
.ai-chat-fab.is-open .ai-chat-fab-icon { display: none; }
.ai-chat-fab.is-open .ai-chat-fab-close { display: block; }
.ai-chat-fab.is-open::before { display: none; }

.ai-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 92px;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(10, 14, 50, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 199;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ai-chat-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.ai-chat-panel-head {
  background: linear-gradient(120deg, var(--navy), #3B4AB0);
  color: #fff;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; font-weight: 700;
  flex-shrink: 0;
}
.ai-chat-panel-head .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3DDC84; box-shadow: 0 0 6px #3DDC84;
  flex-shrink: 0;
}
.ai-chat-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--navy-mid);
}
.ai-chat-msg {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.ai-chat-msg.from-user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-chat-msg.from-ai {
  align-self: flex-start;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(154,48,141,0.14);
  border-bottom-left-radius: 4px;
}
.ai-chat-msg.is-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.ai-chat-msg.is-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-soft);
  animation: aiTypingBounce 1.1s infinite ease-in-out;
}
.ai-chat-msg.is-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-chat-msg.is-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.ai-chat-panel-foot {
  flex-shrink: 0;
  display: flex; gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--navy-mid);
  background: #fff;
}
.ai-chat-panel-foot input {
  flex: 1 1 auto;
  font: inherit;
  font-size: 0.86rem;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(154,48,141,0.25);
  color: var(--ink);
}
.ai-chat-panel-foot input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,131,143,0.15);
}
.ai-chat-panel-foot button {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--magenta-bright), var(--cyan));
  color: #fff;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.ai-chat-panel-foot button:disabled { opacity: 0.5; cursor: default; }
.ai-chat-panel-note {
  font-size: 0.68rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 12px 10px;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .ai-chat-fab::before { animation: none; }
  .ai-chat-msg.is-typing span { animation: none; }
}

@media (max-width: 480px) {
  .ai-chat-panel { right: 16px; left: 16px; width: auto; bottom: 84px; }
  .ai-chat-fab { right: 16px; bottom: 16px; }
}

/* Service detail page illustration */
.service-illustration {
  display: block;
  width: 320px;
  max-width: 70%;
  margin: 0 auto 28px;
}

/* Cases grid */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 780px) { .cases-grid { grid-template-columns: 1fr; } }

.case-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,131,143,0.16);
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 4px 26px rgba(20,26,46,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(20,26,46,0.14); z-index: 20; }
.case-card img {
  width: 100%; aspect-ratio: 1024 / 740; object-fit: cover; display: block;
  border-radius: 16px 16px 0 0;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-radius 0.35s ease;
}
.case-card:hover img {
  transform: scale(1.8);
  box-shadow: 0 25px 60px rgba(20,26,46,0.4);
  border-radius: 12px;
  position: relative;
}
.case-card-body { padding: 20px 24px 24px; border-radius: 0 0 16px 16px; background: #fff; position: relative; }
.case-card-body h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--navy); }
.case-card-body p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) {
  .case-card img { transition: none; }
}
