/* ===================================
   AI EDUCATION PAGE STYLES
   =================================== */

:root {
  --c-navy-dark: #0a0a2e;
  --c-navy: #0f1147;
  --c-blue-deep: #1a1a6e;
  --c-blue: #2020aa;
  --c-blue-bright: #3a3aff;
  --c-blue-light: #6060ff;
  --c-accent: #4fc3f7;
  --c-white: #ffffff;
  --c-white-80: rgba(255,255,255,0.8);
  --c-white-60: rgba(255,255,255,0.6);
  --c-white-40: rgba(255,255,255,0.4);
  --c-white-20: rgba(255,255,255,0.2);
  --c-white-10: rgba(255,255,255,0.1);
  --c-white-05: rgba(255,255,255,0.05);
  --c-bg-light: #f5f6fa;
  --c-text-dark: #0a0a2e;
  --c-text-body: #3a3a5a;
  --ff-display: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --ff-en: "Syne", sans-serif;
  --ff-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --max-width: 1400px;
  --content-width: 1200px;
  --side-pad: clamp(2rem, 5vw, 5rem);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* Reset */
.p-aiedu *, .p-aiedu *::before, .p-aiedu *::after,
.c-header *, .c-footer * { box-sizing: border-box; }

.p-aiedu {
  overflow: clip;
  font-family: var(--ff-body);
  font-weight: 400;
  line-height: 1.8;
  color: var(--c-text-dark);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.custom-aiedu-page #content,
body.custom-aiedu-page #body_wrap { padding: 0 !important; margin: 0 !important; }
body.custom-aiedu-page .l-header,
body.custom-aiedu-page .l-footer,
body.custom-aiedu-page #fix_bottom_menu { display: none !important; }

/* Fade-up */
.p-aiedu .fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.33,0,0.2,1), transform 0.9s cubic-bezier(0.33,0,0.2,1);
}
.p-aiedu .fade-up.is-visible { opacity: 1; transform: translateY(0); }

@keyframes spotlightDrift {
  0%   { background-position: 20% 40%; }
  12%  { background-position: 55% 25%; }
  25%  { background-position: 80% 55%; }
  37%  { background-position: 65% 75%; }
  50%  { background-position: 30% 65%; }
  62%  { background-position: 10% 45%; }
  75%  { background-position: 50% 20%; }
  87%  { background-position: 75% 50%; }
  100% { background-position: 20% 40%; }
}
@keyframes fvCharReveal {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(0); }
}

/* ==========================================
   HEADER
   ========================================== */
.c-header {
  position: fixed !important; top: 0 !important; left: 0; right: 0; z-index: 1000;
  padding: 0 var(--side-pad) !important; background: var(--c-white) !important;
  height: 120px !important; display: flex !important; align-items: center !important;
  transition: box-shadow var(--transition);
}
.c-header.is-scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.c-header__inner { max-width: var(--max-width); margin: 0 auto; width: 100%; display: flex !important; align-items: center !important; justify-content: space-between; }
.c-header__logo { text-decoration: none; display: flex !important; align-items: center !important; }
.c-header__logo-img { height: 36px; width: auto; display: block; }
.c-header__logo-text { font-family: var(--ff-en); font-size: 1.25rem; font-weight: 600; color: var(--c-navy-dark); line-height: 1; }
.c-header__nav { display: flex !important; align-items: center !important; }
.c-header__nav-list { display: flex !important; align-items: center !important; list-style: none; margin: 0 !important; padding: 0 !important; }
.c-header__nav-list li a { display: flex; align-items: center; padding: 0.5rem 1.5rem; color: var(--c-text-dark); text-decoration: none; font-size: 0.9375rem; font-weight: 500; font-family: var(--ff-en); letter-spacing: 0.02em; line-height: 1; transition: opacity var(--transition); }
.c-header__nav-list li a:hover { opacity: 0.5; }
.c-header__cta { display: inline-flex !important; align-items: center !important; gap: 0.5rem; margin-left: 1.5rem; padding: 0.5rem 1.5rem; border-radius: 100px; background: var(--c-blue-bright); color: var(--c-white); text-decoration: none; font-size: 0.9375rem; font-weight: 600; font-family: var(--ff-en); transition: var(--transition); }
.c-header__cta:hover { background: var(--c-blue-light); transform: translateY(-1px); }
.c-header__hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; z-index: 1001; }
.c-header__hamburger span { display: block; width: 22px; height: 1.5px; background: var(--c-navy-dark); transition: var(--transition); }
.c-header__hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.c-header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.c-header__hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ==========================================
   FOOTER
   ========================================== */
.c-footer { padding: 0; background: transparent; color: var(--c-white); }
.c-footer__card { border-radius: 24px 24px 0 0; background: linear-gradient(160deg, #050520 0%, #0a0a3a 35%, #101060 65%, #1a1a90 100%); overflow: hidden; position: relative; }
.c-footer__card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 20%, rgba(80,120,255,0.15) 0%, transparent 55%), radial-gradient(ellipse at 20% 80%, rgba(100,60,255,0.1) 0%, transparent 55%); pointer-events: none; }
.c-footer__inner { position: relative; max-width: var(--content-width); margin: 0 auto; padding: clamp(3.5rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 5rem); }
.c-footer__top { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.8fr); gap: clamp(3rem, 6vw, 6rem); padding-bottom: clamp(3rem, 5vw, 4rem); }
.c-footer__company { display: flex; flex-direction: column; }
.c-footer__logo { text-decoration: none; display: inline-flex; align-items: center; }
.c-footer__logo-img { height: 40px; width: auto; filter: brightness(0) invert(1); }
.c-footer__logo-text { font-family: var(--ff-en); font-size: 1.5rem; font-weight: 700; color: var(--c-white); letter-spacing: 0.04em; }
.c-footer__details { margin-top: 1.5rem; }
.c-footer__company-name { font-size: 0.8125rem; font-weight: 600; color: var(--c-white); margin: 0; }
.c-footer__address { font-size: 0.75rem; line-height: 1.9; color: var(--c-white-60); margin: 0.5rem 0 0; }
.c-footer__nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.75rem, 3vw, 2.5rem) clamp(2rem, 4vw, 4rem); }
.c-footer__nav a { display: block; text-decoration: none; color: var(--c-white); transition: opacity var(--transition); }
.c-footer__nav a:hover { opacity: 0.6; }
.c-footer__nav-en { display: block; font-family: var(--ff-en); font-size: clamp(1.5rem, 2.5vw, 2.25rem); font-weight: 600; line-height: 1.2; letter-spacing: 0.01em; }
.c-footer__nav-ja { display: block; font-size: 0.75rem; color: var(--c-white-60); margin-top: 0.35rem; letter-spacing: 0.05em; }
.c-footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: clamp(1.5rem, 3vw, 2rem); border-top: 1px solid var(--c-white-10); }
.c-footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.c-footer__links a { font-size: 0.75rem; color: var(--c-white-60); text-decoration: none; transition: color var(--transition); }
.c-footer__links a:hover { color: var(--c-white); }
.c-footer__copy { font-size: 0.7rem; color: var(--c-white-40); font-family: var(--ff-en); margin: 0; }

/* ==========================================
   HERO
   ========================================== */
.p-aiedu-hero {
  position: relative;
  padding-top: clamp(160px, 22vh, 240px);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: var(--c-white);
}
.p-aiedu-hero__inner {
  max-width: var(--content-width); margin: 0 auto; padding: 0 var(--side-pad);
  display: flex; justify-content: space-between; align-items: flex-start; gap: clamp(2rem, 4vw, 4rem);
}
.p-aiedu-hero__left { flex: 1; }
.p-aiedu-hero__category {
  display: inline-block; font-family: var(--ff-en); font-size: 0.8125rem; font-weight: 600;
  color: var(--c-accent); letter-spacing: 0.05em; margin-bottom: 0.75rem;
}
.p-aiedu-hero__en {
  display: block; font-family: var(--ff-en); font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0;
}
.p-aiedu-hero__ja {
  display: block; font-size: 1rem; font-weight: 700; color: var(--c-text-dark);
  margin-top: 0.75rem; letter-spacing: 0.08em;
}

/* Char reveal */
.p-aiedu .fv-char-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
.p-aiedu .fv-char {
  display: inline-block; transform: translateX(-105%); will-change: transform;
  background: radial-gradient(circle, rgba(240,240,255,0.95) 0%, rgba(160,160,220,0.5) 20%, transparent 45%),
    linear-gradient(135deg, #050520 0%, #0a0a3a 25%, #101060 50%, #1a1a80 75%, #2a2aaa 100%);
  background-size: 2000% 2000%, 2000% 2000%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: spotlightDrift 16s calc(var(--char-phase, 0) * -16s) infinite ease-in-out;
}
.p-aiedu .is-animated .fv-char {
  animation: fvCharReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             spotlightDrift 16s calc(var(--char-phase, 0) * -16s) infinite ease-in-out;
}

/* Hero nav */
.p-aiedu-hero__nav {
  flex-shrink: 0; display: flex; flex-direction: column;
  border-left: 2px solid rgba(0,0,0,0.06); padding: 0.5rem 0 0.5rem 1.5rem; gap: 0.25rem;
}
.p-aiedu-hero__nav-item {
  display: block; padding: 0.625rem 1rem 0.625rem 0;
  font-size: 0.875rem; font-weight: 500; color: var(--c-text-body);
  text-decoration: none; transition: color var(--transition); white-space: nowrap;
}
.p-aiedu-hero__nav-item:hover { color: var(--c-blue-bright); }

/* ==========================================
   OVERVIEW
   ========================================== */
.p-aiedu-overview {
  position: relative; padding: clamp(4rem, 8vw, 7rem) 0; background: var(--c-bg-light);
}
.p-aiedu-overview__inner {
  max-width: var(--content-width); margin: 0 auto; padding: 0 var(--side-pad);
  display: grid; grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(3rem, 6vw, 6rem); align-items: start;
}
.p-aiedu-overview__en {
  display: block; font-family: var(--ff-en); font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500; letter-spacing: 0.01em; line-height: 1.2;
  background: radial-gradient(circle, rgba(240,240,255,0.95) 0%, rgba(160,160,220,0.5) 25%, transparent 55%),
    linear-gradient(135deg, #050520 0%, #0a0a3a 25%, #101060 50%, #1a1a80 75%, #2a2aaa 100%);
  background-size: 300% 300%, 100% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: spotlightDrift 16s ease-in-out infinite;
}
.p-aiedu-overview__ja {
  display: block; font-size: 0.8125rem; font-weight: 400;
  margin-top: 0.5rem; letter-spacing: 0.1em; color: var(--c-text-body);
}
.p-aiedu-overview__text {
  font-family: var(--ff-display); font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 700; line-height: 2; color: var(--c-text-dark); margin: 0;
}

/* ==========================================
   SERVICE CARDS
   ========================================== */
.p-aiedu-list { padding: clamp(2rem, 4vw, 3rem) 0 0; background: var(--c-white); }
.p-aiedu-item { padding: clamp(2rem, 4vw, 3rem) var(--side-pad); }
.p-aiedu-item__card {
  max-width: var(--content-width); margin: 0 auto;
  display: grid; grid-template-columns: 1fr minmax(280px, 420px);
  gap: clamp(2.5rem, 5vw, 5rem); align-items: start;
  background: var(--c-white); border-radius: 24px;
  border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 4px 40px rgba(10,10,46,0.04);
  padding: clamp(2.5rem, 5vw, 4rem); transition: var(--transition);
}
.p-aiedu-item__card:hover { box-shadow: 0 8px 48px rgba(10,10,46,0.08); }

/* Reverse layout */
.p-aiedu-item__card--reverse { grid-template-columns: minmax(280px, 420px) 1fr; }
.p-aiedu-item__card--reverse .p-aiedu-item__visual { order: -1; }

/* Body */
.p-aiedu-item__body { display: flex; flex-direction: column; }
.p-aiedu-item__number {
  font-family: var(--ff-en); font-size: 3.5rem; font-weight: 700; line-height: 1;
  background: radial-gradient(circle, rgba(240,240,255,0.95) 0%, rgba(160,160,220,0.5) 25%, transparent 55%),
    linear-gradient(135deg, #050520 0%, #0a0a3a 25%, #101060 50%, #1a1a80 75%, #2a2aaa 100%);
  background-size: 300% 300%, 100% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: spotlightDrift 16s ease-in-out infinite; margin-bottom: 1rem;
}
.p-aiedu-item__category {
  display: block; font-family: var(--ff-en); font-size: 0.8125rem; font-weight: 600;
  color: var(--c-accent); letter-spacing: 0.05em; margin-bottom: 0.75rem;
}
.p-aiedu-item__name {
  font-family: var(--ff-display); font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700; line-height: 1.3; color: var(--c-text-dark); margin: 0 0 0.375rem;
}
.p-aiedu-item__sub {
  font-size: 0.8125rem; color: var(--c-text-body); margin: 0 0 1.5rem; letter-spacing: 0.03em;
}
.p-aiedu-item__text {
  font-size: 0.9375rem; line-height: 2; color: var(--c-text-body); margin: 0;
}

/* Features */
.p-aiedu-item__features { margin-top: 2rem; }
.p-aiedu-item__features-title {
  font-size: 0.875rem; font-weight: 700; color: var(--c-text-dark);
  margin: 0 0 0.75rem; padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--c-blue-bright); display: inline-block;
}
.p-aiedu-item__features-list {
  margin: 0; padding: 0 0 0 1.25rem; list-style: disc;
}
.p-aiedu-item__features-list li {
  font-size: 0.875rem; line-height: 2; color: var(--c-text-body); padding: 0.125rem 0;
}

/* Link button */
.p-aiedu-item__link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 2rem; padding: 0.75rem 2rem;
  border: 1.5px solid var(--c-navy-dark); border-radius: 100px;
  background: transparent; color: var(--c-navy-dark);
  text-decoration: none; font-size: 0.875rem; font-weight: 600;
  font-family: var(--ff-body); letter-spacing: 0.03em;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.p-aiedu-item__link:hover {
  background: var(--c-blue-bright); border-color: var(--c-blue-bright);
  color: var(--c-white); transform: translateX(4px);
}
.p-aiedu-item__link svg { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.p-aiedu-item__link:hover svg { transform: translateX(4px); }

/* Visual */
.p-aiedu-item__visual { display: flex; align-items: center; justify-content: center; }
.p-aiedu-item__img {
  width: 100%; aspect-ratio: 4 / 3; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.p-aiedu-item__img-label {
  font-family: var(--ff-en); font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700; color: var(--c-white-60); letter-spacing: 0.05em; z-index: 1;
}
.p-aiedu-item__img img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0; z-index: 1;
}
.p-aiedu-item__img--1 { background: linear-gradient(135deg, #0cd5c8 0%, #0aa5d0 50%, #1a1a90 100%); }
.p-aiedu-item__img--2 { background: linear-gradient(135deg, #0aa5d0 0%, #2060d0 50%, #1a1a90 100%); }
.p-aiedu-item__img::before {
  content: ""; position: absolute; inset: 0; opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ==========================================
   CTA
   ========================================== */
.p-aiedu-cta {
  position: relative; padding: clamp(3rem, 6vw, 5rem) var(--side-pad);
  padding-bottom: clamp(4rem, 7vw, 6rem); background: var(--c-bg-light);
}
.p-aiedu-cta__inner { max-width: var(--content-width); margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.p-aiedu-cta__block {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(3rem, 5vw, 4.5rem) 2rem; text-decoration: none; color: var(--c-text-dark);
  background: var(--c-white); border-radius: 16px; border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s cubic-bezier(0.16,1,0.3,1);
}
.p-aiedu-cta__block:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(10,10,46,0.1); }
.p-aiedu-cta__en {
  font-family: var(--ff-en); font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 600;
  background: radial-gradient(circle, rgba(240,240,255,0.95) 0%, rgba(160,160,220,0.5) 25%, transparent 55%),
    linear-gradient(135deg, #050520 0%, #0a0a3a 25%, #101060 50%, #1a1a80 75%, #2a2aaa 100%);
  background-size: 300% 300%, 100% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: spotlightDrift 16s ease-in-out infinite; transition: var(--transition);
}
.p-aiedu-cta__block:hover .p-aiedu-cta__en {
  background: radial-gradient(circle, rgba(224,224,255,0.95) 0%, rgba(140,140,230,0.5) 25%, transparent 55%),
    linear-gradient(135deg, #1a1a60 0%, #2a2a8e 30%, #3a3abb 60%, #4a4add 100%);
  background-size: 300% 300%, 100% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: spotlightDrift 10s ease-in-out infinite;
}
.p-aiedu-cta__ja { font-size: 0.8125rem; color: var(--c-blue); margin-top: 0.5rem; }
.p-aiedu-cta__icon {
  position: absolute; right: clamp(1.5rem, 3vw, 2.5rem); top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-navy-dark); background: transparent; transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.p-aiedu-cta__block:hover .p-aiedu-cta__icon { background: var(--c-blue-bright); color: var(--c-white); border-color: var(--c-blue-bright); transform: translateY(-50%) scale(1.1); }
.p-aiedu-cta__icon svg { transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }
.p-aiedu-cta__block:hover .p-aiedu-cta__icon svg { transform: translateX(3px); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .p-aiedu-hero__inner { flex-direction: column; }
  .p-aiedu-hero__nav {
    border-left: none; border-top: 1px solid rgba(0,0,0,0.06);
    padding: 1.5rem 0 0; flex-direction: row; flex-wrap: wrap; gap: 0.5rem;
  }
  .p-aiedu-hero__nav-item { padding: 0.5rem 1.25rem; font-size: 0.8125rem; background: var(--c-bg-light); border-radius: 100px; }
  .p-aiedu-hero__nav-item:hover { background: var(--c-blue-bright); color: var(--c-white); }
  .p-aiedu-overview__inner { grid-template-columns: 1fr; gap: 2rem; }
  .p-aiedu-item__card,
  .p-aiedu-item__card--reverse { grid-template-columns: 1fr; }
  .p-aiedu-item__card--reverse .p-aiedu-item__visual { order: 0; }
  .p-aiedu-item__img { max-width: 480px; }
  .c-footer__top { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 768px) {
  .c-header__hamburger { display: flex; }
  .c-header__nav {
    position: fixed; top: 0; right: -100%; width: 80%; max-width: 340px;
    height: 100vh; height: 100dvh; background: rgba(10,10,46,0.98); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; align-items: flex-start; padding: 2rem;
    transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
  }
  .c-header__nav.is-open { right: 0; }
  .c-header__nav-list { flex-direction: column; align-items: flex-start; width: 100%; }
  .c-header__nav-list li { width: 100%; }
  .c-header__nav-list li a { padding: 0.875rem 0; font-size: 1rem; color: var(--c-white) !important; border-bottom: 1px solid var(--c-white-10); }
  .c-header__cta { margin-left: 0; margin-top: 1.5rem; width: 100%; justify-content: center; }
  .p-aiedu-hero { padding-top: 130px; }
  .p-aiedu-cta__inner { grid-template-columns: 1fr; }
  .c-footer__card { border-radius: 16px 16px 0 0; }
  .c-footer__bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
