/*
Theme Name: Ollie Child
https://works.sekacari-ai.com/
Description: Ollie用のBlue Marineカスタム子テーマ（by タヌ）
Author: TN
Author URI: https://works.sekacari-ai.com/
Template: ollie
Version: 1.0
*/

/* 全ページの背景色 */
body {
  background-color: #FAF3EC;
}
/* タグの背景色 */
.is-style-term-button a {
    background-color: #fef5ee;
}

/* =========================
   本文：Interでスマートに、Safariも軽やか
========================= */
body {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Safari向けアンチエイリアス調整 */
@supports (-webkit-font-smoothing: antialiased) {
  body {
    -webkit-font-smoothing: antialiased; /* 文字を軽やかに見せる */
    -moz-osx-font-smoothing: grayscale; /* 念のためMac Firefox */
  }
}

/* header menu*/
header.wp-block-template-part {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;

}

/* =========================
   AI Key Visual
========================= */

.ai-kv {
  position: relative;
  width: 100vw;
  min-height: 100svh;
  overflow: hidden;

  /* 背景グラデーション */
  background: linear-gradient(
    to bottom,
    #FFF8F2 0%,
    #FEF5EE 45%,
    #FAF3EC 100%
  );
}
/* =========================
   AI-KV だけ手書きフォント適用
========================= */
.ai-kv,
.ai-kv * {
  font-family:
    "Edu VIC WA NT Beginner",
    "Comic Sans MS",
    "Bradley Hand",
    "Segoe Print",
    "Hiragino Maru Gothic ProN",
    "Hiragino Sans",
    "Noto Sans JP",
    sans-serif !important;
}

/* -------------------------
   タイプライター文字（中央ドーン）
------------------------- */
#message, .kv-message {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  z-index: 20; 
  text-align: center;
  color: #024452;
  font-size: clamp(32px, 8vw, 86px); 
  white-space: nowrap;
  pointer-events: none; 
  width: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.accent-color {
  color: #47E6BF; /* 差し色： */
  padding-left: 20px;
}
/* -------------------------
   SP対応
------------------------- */
@media (max-width: 768px) {
  #message, .kv-message {
    /* スマホで1行に収めたい場合、ここのclampの最小値を小さく調整 */
    font-size: clamp(28px, 8vw, 42px);
    
    /* もし2行になってもいいなら nowrap を解除 */
    white-space: normal; 
    line-height: 1.2;
    
    /* 地球の中心に合わせる */
    top: 46%; 
    width: 100%;
    padding: 0 10px;
  }

}

/* -------------------------
   ビジュアル（小ブロック画像）
------------------------- */
.kv-block {
  position: absolute;
  width: 350px;         /* ブロックサイズ */
  height: 350px;
  pointer-events: none;
  display: block;
}

/* -------------------------
   地球
------------------------- */
#earth {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 400px;        /* サイズ調整 */
  transform: translate(-50%, -50%);
  opacity: 0;          /* フェードイン用 */
  pointer-events: none;
  z-index: 5;          /* 文字より下 */
}

/* -------------------------
   背景 Canvas
------------------------- */
#blockCanvas, #kvCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* -------------------------
   SP対応
------------------------- */
@media (max-width: 768px) {
  #message, .kv-message {
    white-space: normal;
    padding: 0 24px;
  }

  #earth {
    width: 45vw;
  }

  .kv-block {
    width: 250px;
    height: 250px;
  }
}

/* -------------------------
    軌道・天体リンク
------------------------- */
#orbit-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 1s ease; /* フワッと出す用 */
}

.orbit-line {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border: 1px dashed #BBB9B9;
  border-radius: 50%;
}

.celestial-link {
  position: absolute;
  pointer-events: auto;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ★画像だけを大きくする */
.celestial-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.celestial-link:hover img {
  transform: scale(1.15);
}

/* 配置（PC） */
#link-moon { top: 20%; left: 20%; width: 120px; }
#link-satellite { bottom: 10%; right: 20%; width: 300px; }
#link-rocket {
  top: 15%; 
  right: 36%; 
  width: 100px;
}
.celestial-link .label {
  color: #024452;
  font-size: clamp(16px, 2vw, 24px);
  pointer-events: none;
  margin: 0;
}

/* スマホ調整 */
@media (max-width: 768px) {
  .orbit-line { width: 110vw; height: 110vw; }
  #link-moon { width: 80px; top: 18%; left: 5%; }
  #link-satellite { width: 180px; bottom: 10%; right: 5%; }
#link-rocket { width: 70px; top: 20%; right: 5%; }
.celestial-link {
  gap: 16px;
}
}

/* -------------------------
   Philosophy
------------------------- */
/* セクション全体を全画面化 */
.philosophy-full-area {
    position: relative;
    width: 100vw !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    min-height: 600px;
    height: 80vh; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* キャンバスを背面に全画面固定 */
#dnaCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
}

/* 文字の入る枠を1260pxにする */
.philosophy-inner {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1260px !important;
    margin: 0 auto;
    padding: 0 40px;
    pointer-events: none; /* 下のCanvasやリンクを邪魔しない */
    text-align: center;
}

/* 中の文字はクリックできるようにする */
.philosophy-inner > * {
    pointer-events: auto;
}

/* --- ふわっと出しアニメーションの共通設定 --- */
.philosophy-title, 
.philosophy-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 表示状態（JSでクラスが付与された時） */
.philosophy-title.is-visible,
.philosophy-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ★連鎖のポイント：メッセージを少し遅らせる */
.philosophy-text.is-visible {
    transition-delay: 0.4s; 
}

/* メッセージ（pタグなど）のスタイル */
.philosophy-text {
    color: #024452;
    line-height: 1.8;
    max-width: 900px; /* 中央寄せで見やすくするために幅を少し絞る */
    margin: 0 auto;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .philosophy-full-area {
        height: auto;
        padding: 100px 0; /* スマホはスクロール量に合わせて高さを確保 */
    }

    .philosophy-text p {
        background: #FAF3EC; 
        backdrop-filter: blur(8px); /* 背後のDNAをボカして文字を浮かせる */
        border-radius: 12px;
        display: inline-block;
        text-align: left; /* スマホの長文は左寄せの方が読みやすい場合がある */
    }
}

/* =========================
   Aboutエリア
========================= */
/* Aboutタイトル */
.about-title {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.22,1,0.36,1),
                transform 1.2s cubic-bezier(0.22,1,0.36,1);
}

.about-title.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s; /* タイトル先行 */
}

/* About本文 */
.about-body {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.22,1,0.36,1),
                transform 1.2s cubic-bezier(0.22,1,0.36,1);
}

.about-body.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s; /* タイトル後にフェードイン */
}
/* =========================
   Aboutエリア：スマホ時だけ文章を読みやすく
========================= */
@media screen and (max-width: 767px) {
  .about-body p {
    text-align: left !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
/* -------------------------
   Service
------------------------- */
.service-section {
    position: relative;
    padding: 100px 0;
}

/* 見出しとカードの共通設定 */
.service-title,
.service-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-title.is-visible,
.service-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ★3カラムの時間差出し（左から順番に） */
.service-card:nth-child(1).is-visible { transition-delay: 0.2s; }
.service-card:nth-child(2).is-visible { transition-delay: 0.4s; }
.service-card:nth-child(3).is-visible { transition-delay: 0.6s; }

/* スマホではディレイを少し短くするか、同時でもOK */
@media (max-width: 768px) {
    .service-card.is-visible {
        transition-delay: 0.2s !important;
    }
 .service-section p {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* =========================
   service icon Animation
========================= */

.service-icon-wrapper {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-canvas {
  width: 200px;
  height: 200px;
}

/* =========================
   Works - フル版（右下丸Arrow浮かせ版）
========================= */
.works-split {
  display: flex;
  flex-direction: column;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.work-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.work-card {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  opacity: 0;
  transform: translateY(30px) scale(1);
  transition: opacity 0.6s ease, transform 0.5s ease;
  position: relative;
  padding: 20px;
}

.work-card.left { flex-direction: row; }
.work-card.right { flex-direction: row-reverse; }

.work-card img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.work-info {
  display: flex;
  justify-content: space-evenly; /* 左テキスト / 右Arrow */
  align-items: flex-end;           /* 下揃え */
  width: 400px;                     /* 横幅固定 */
  position: relative;
  flex-direction: column;
}

.work-text h3 { font-size: 24px; margin:0 0 4px 0; font-family: var(--wp--preset--font-family--edu-vic-wa-nt-beginner); font-weight: 400;}
.work-text p { font-size:14px; color:#777; margin:0; }

.works-more {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.works-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #39bc9c;
  cursor: pointer;
  transition: all 0.3s ease;
}

.works-more-btn svg {
  display: block;
  width: 24px;
  height: 24px;
  color: #FFFFFF;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* カード全体ホバーでアクション連動 */
.work-card-link:hover .works-more-btn {
  background: rgba(255,255,255,0.35);
  transform: scale(1.1);
  border-style:solid;
  border-color:#FFFFFF;
}

.work-card-link:hover .works-more-icon {
  color: #FFFFFF;
  transform: translateX(4px);
}

.work-card:hover img {
  transform: scale(1.05);
  box-shadow: 0 35px 70px rgba(0,0,0,0.15);
}

/* レスポンシブ */
@media screen and (max-width: 1024px) {
  .work-card { flex-direction: column !important; }
  .work-card img { max-width: 100%; height:auto; }
  .work-info { width: 100%; }
}

/* =========================
   タブレット非表示
========================= */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .tab-none {
    display: none !important;
  }
}

/* =========================
   スマホ非表示
========================= */
@media screen and (max-width: 767px) {
  .sp-none {
    display: none !important;
  }
}

/* =========================
   Works / Page 共通
   自然な塊うねうね背景（Safari安定版）
========================= */
.bg-moya-wrap {
  position: relative;
  overflow: hidden;
  background-color: #FAF3EC;
  z-index: 0;
  min-height: 400px;

  isolation: isolate;       /* ← Safariのレイヤー暴走防止（超重要） */
  transform: translateZ(0); /* ← 念のための安定化おまじない */
}

/* ===== モヤモヤ共通設定 ===== */
.bg-moya-wrap::before,
.bg-moya-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;

  transform: translateZ(0); /* ← filter + animation のSafari対策 */
}

/* ===== 塊1： ===== */
.bg-moya-wrap::before {
  width: 300px;
  height: 300px;
  background: #FFFEDB;
  top: -5%;
  left: -5%;
  animation: moyaMoveQuick1 15s ease-in-out infinite alternate;
}

/* ===== 塊2：クリア + シアン ===== */
.bg-moya-wrap::after {
  width: 550px;
  height: 550px;
  background: #DFFFF1;
  box-shadow: -350px -250px 0 30px #DAD9DF;
  bottom: -5%;
  right: -5%;
  animation: moyaMoveQuick2 20s ease-in-out infinite alternate-reverse;
}

/* ===== アニメーション ===== */

/* ミント */
@keyframes moyaMoveQuick1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(25vw, 20vh) scale(1.2); }
  100% { transform: translate(10vw, -10vh) scale(0.9); }
}

/* オレンジ＆シアン */
@keyframes moyaMoveQuick2 {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1.1); }
  50%  { transform: translate(-30vw, -20vh) rotate(15deg) scale(1); }
  100% { transform: translate(-5vw, 10vh) rotate(-10deg) scale(1.1); }
}

/* ===== コンテンツ保護 ===== */
.bg-moya-wrap > * {
  position: relative;
  z-index: 1;
}