:root {
  /* Color Palette: Soft Kinetic */
  --c-bg: #fafaf8; /* Snow White */
  --c-bg-sub: #f2f0eb; /* Pale Beige */
  --c-main: #e6007e; /* IdeaClip Pink (Logo) */
  --c-text: #333333; /* Charcoal */
  --c-text-light: #666666;
  --c-accent-blue: #5d5d80; /* Lavender Gray */

  /* Fonts */
  --font-jp: "Zen Maru Gothic", sans-serif;
  --font-en: "Quicksand", sans-serif;

  /* Shapes */
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
}
/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 74px;
}

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-jp);
  margin: 0;
  line-height: 1.8;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-jp);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.en {
  font-family: var(--font-en);
}

/* Focus Styles - Accessibility */
*:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

*:focus-visible {
  outline: 2px solid var(--c-main);
  outline-offset: 2px;
  border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--c-main);
  outline-offset: 4px;
}

/* Skip to main content link */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--c-main);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-to-main:focus {
  top: 0;
}

/* Chatbot Widget Styles */
.chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 8px;
}

.chatbot-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 8px 20px rgba(230, 0, 126, 0.2);
  cursor: pointer;
  font-size: 28px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: grid;
  place-items: center;
}

.chatbot-button:hover {
  transform: scale(1.1) rotate(-5deg);
}

.chatbot-bubble {
  background: var(--c-text);
  color: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  animation: popIn 0.5s ease forwards 2s;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Header Styles --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 18px 5% 20px;
  transition: all 0.3s ease;
  background: transparent;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 5% 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 102;
}
.logo-text {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--c-text);
  letter-spacing: 0.05em;
}

.header-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  transform: translateY(5px);
}

.header-nav a {
  text-decoration: none;
  color: var(--c-text);
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
  position: relative;
}

.header-nav a:hover {
  color: var(--c-main);
}

.nav-contact {
  background: var(--c-text);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem !important;
}
.nav-contact:hover {
  background: var(--c-main);
  transform: translateY(-2px);
}

/* Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 102;
}
.menu-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-text);
  position: absolute;
  left: 0;
  transition: all 0.3s;
}
.menu-toggle .bar:nth-child(1) {
  top: 0;
}
.menu-toggle .bar:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.menu-toggle .bar:nth-child(3) {
  bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .header-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .header-nav.is-active {
    display: flex;
    opacity: 1;
  }

  .header-nav a {
    font-size: 1.2rem;
    padding: 15px 0;
    width: 100%;
    text-align: center;
   }

  .nav-contact {
    margin-top: 20px;
  }

  /* Hamburger Animation */
  .menu-toggle.is-active .bar:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
  }
  .menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.is-active .bar:nth-child(3) {
    bottom: 11px;
    transform: rotate(-45deg);
  }
  .menu-toggle .bar {
    transform-origin: center;
  }
}

/* Chatbot Attention Animation */
@keyframes shake-vertical {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-10px) scale(1.1);
  }
  50% {
    transform: translateY(0) scale(1.1);
  }
  75% {
    transform: translateY(-5px) scale(1.1);
  }
}

.chatbot-button.is-attention {
  animation: shake-vertical 0.6s ease-in-out;
  background-color: var(--c-main); /* 注目時はピンクに反転させても可愛い */
}
.chatbot-button.is-attention .icon {
  color: white;
}

/* Focus Overlay: 画面全体を覆う白い霧 */
.focus-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 248, 0.85); /* ベースカラーの白を半透明に */
  backdrop-filter: blur(8px); /* すりガラス効果 */
  z-index: 999; /* ヘッダー(100)より上、チャット(1000)より下 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  cursor: pointer; /* クリックで閉じれることを示唆 */
}

.focus-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* チャットウィジェットを最前面へ持ち上げる調整 */
.chatbot-widget {
  /* 既存のz-index: 1000 が効くのでそのままでOKですが、
     明示的にオーバーレイより上であることを意識します */
  z-index: 1000;
}
.scroll-guide {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
  color: var(--c-main);
  opacity: 0.8;
}

.scroll-guide .text {
  font-family: var(--font-en);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.scroll-guide .line {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, var(--c-main), transparent);
  border-radius: 2px;
  animation: scrollLine 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
  transform-origin: top;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  50.1% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* --- Service Section Styles --- */
.service {
  padding: 100px 5%;
  background-color: var(--c-bg-sub);
  position: relative;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.en-label {
  font-family: var(--font-en);
  color: var(--c-main);
  font-weight: bold;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.4;
}

.service-block {
  margin-bottom: 80px;
}
.block-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.block-title .sub {
  font-size: 0.9rem;
  color: var(--c-text-light);
  font-weight: normal;
}
.block-desc {
  margin-bottom: 32px;
  color: var(--c-text-light);
}

/* Glass Card */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(230, 0, 126, 0.1);
  border-color: rgba(230, 0, 126, 0.3);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.glass-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--c-accent-blue);
}
.glass-card p {
  font-size: 0.95rem;
  color: var(--c-text-light);
  line-height: 1.6;
}

/* Wide Card */
.wide-card {
  display: flex;
  align-items: center;
  gap: 32px;
}
.wide-content {
  flex: 2;
}
.wide-visual {
  flex: 1;
  height: 150px;
  background: #f0f0f0;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: #aaa;
  font-family: var(--font-en);
  font-weight: bold;
  text-align: center;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}
.feature-list li::before {
  content: "✔";
  color: var(--c-main);
  position: absolute;
  left: 0;
  top: 2px;
}
.note {
  font-size: 0.8rem;
  color: #999;
}

.support-link {
  text-align: center;
  font-size: 0.9rem;
  color: var(--c-text-light);
}
.support-link .tag {
  background: #eee;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 8px;
  vertical-align: middle;
}

/* --- Case Section --- */
.case {
  padding: 100px 5%;
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.case-item {
  display: block;
  text-decoration: none;
  color: var(--c-text);
}
.case-thumb {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  background-color: #f0f0f0;
}
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.5s ease;
}

.case-item:hover .thumb-placeholder {
  transform: scale(1.03);
}
.case-tags {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}
.case-tags .tag {
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--c-main);
  font-weight: bold;
  font-family: var(--font-en);
}
.case-title {
  font-size: 1.1rem;
  margin-bottom: 4px;
  font-weight: bold;
}
.case-cat {
  font-size: 0.85rem;
  color: var(--c-text-light);
  font-family: var(--font-en);
}

/* --- News Section --- */
.news {
  padding: 80px 5%;
  background: #fff;
}
.news-list {
  list-style: none;
  padding: 0;
  max-width: 800px;
  margin: 0 auto 40px;
}
.news-item {
  border-bottom: 1px solid #eee;
}
.news-item a {
  display: flex;
  align-items: center;
  padding: 20px 0;
  text-decoration: none;
  color: var(--c-text);
  transition: color 0.2s;
  gap: 20px;
  flex-wrap: wrap;
}
.news-item a:hover {
  color: var(--c-main);
}
.news-date {
  font-family: var(--font-en);
  color: #999;
  font-size: 0.9rem;
}
.news-cat {
  background: #f0f0f0;
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  min-width: 60px;
  text-align: center;
}
.news-title {
  flex: 1;
  font-weight: 500;
}

/* --- About Section --- */
.about {
  padding: 100px 5%;
  position: relative;
  overflow: hidden;
}
.about-inner {
  display: flex;
  justify-content: center;
  position: relative;
}
.about-content {
  max-width: 600px;
  text-align: center;
  z-index: 2;
}
.about-text {
  text-align: left;
  margin: 32px 0;
  line-height: 2;
}
.about-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: #f4e0e8; /* Pale Pink */
  border-radius: 50%;
  opacity: 0.3;
  z-index: 1;
  filter: blur(40px);
}

/* --- Contact Section --- */
.contact {
  padding: 100px 5% 150px;
  background: var(--c-bg-sub);
}
.contact-box {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  padding: 60px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.contact-title {
  font-size: 2rem;
  margin-bottom: 24px;
}
.contact-desc {
  margin-bottom: 40px;
}
.tool-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.tool {
  font-family: var(--font-en);
  font-weight: bold;
  color: var(--c-accent-blue);
  background: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.action-text {
  font-family: var(--font-en);
  color: var(--c-main);
  font-weight: bold;
  animation: bounceRight 1.5s infinite;
}
@keyframes bounceRight {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

/* Buttons */
.btn-area {
  text-align: center;
  margin-top: 40px;
}
.btn-primary {
  display: inline-block;
  background: var(--c-text);
  color: #fff;
  padding: 14px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
}
.btn-primary:hover {
  background: var(--c-main);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(230, 0, 126, 0.2);
}
.btn-text {
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  font-weight: bold;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .mv {
    display: block;
    height: auto;
    min-height: 100dvh;
    padding-bottom: 50px;
  }
  .mv-container {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 100px;
  }
  .blob-wrapper {
    width: 280px;
    height: 280px;
    margin-bottom: 30px;
    margin-inline: auto;
  }
  .mv-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
  }
  .mv-desc {
    text-align: left;
    width: 90%;
    margin-inline: auto;
    padding: 0 16px;
    padding-bottom: 100px;
    margin: 0 auto;
  }
  .mv-desc br {
    display: none;
  }
  .mv-desc p {
    line-height: 2;
    margin-bottom: 1em;
  }

  .block-title {
    flex-direction: column;
    align-items: flex-start;
  }
  .wide-card {
    flex-direction: column-reverse;
  }
  .wide-visual {
    width: 100%;
    height: 120px;
  }
  .sp-only {
    display: inline;
  }
}
