/*
Theme Name: AIスクール・バイブ（Vibe Coding）
Theme URI: https://example.com/ai_school_vibe
Author: あなたの会社名
Author URI: https://example.com
Description: IT初心者でも、WordPressの標準機能（投稿・固定ページ・ウィジェット・カスタムメニュー・カスタムヘッダー）だけで簡単に更新できる、生成AIスクール向けのシンプルで親しみやすいLPテーマ。
Version: 1.0.0
Text Domain: ai_school_vibe
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ========== デザインの基本設定（Vibe） ========== */
:root {
  /* メインカラー（紫→ネイビーのグラデーション） */
  --color-primary-start: #4A148C;
  --color-primary-end: #1A237E;
  /* アクセント（ビビッドな黄色） */
  --color-accent: #FFC107;
  --color-bg: #0f1226; /* 濃い背景で先進感 */
  --color-surface: #161a33; /* カードなどの面 */
  --color-text: #E8EAF6; /* 文字（高コントラスト） */
  --color-muted: #B0BEC5;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.15);
  --shadow-md: 0 8px 24px rgba(0,0,0,.25);

  --container-max: 1120px;
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

/* フォントは癖のないゴシック体（システムフォント優先） */
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.8;
  font-size: 16px; /* モバイルファースト */
}

img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

a { color: var(--color-accent); text-decoration: none; }
a:hover { opacity: .9; }

.container {
  width: 100%;
  max-width: var(--container-max);
  padding: 0 var(--space-4);
  margin: 0 auto;
}

/* ========== ヘッダー ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 99;
  background: linear-gradient(90deg, var(--color-primary-start), var(--color-primary-end));
  box-shadow: var(--shadow-sm);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 18px;
}

.site-description { display:none; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-list {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
  gap: var(--space-3);
}

.nav-list a {
  color: #fff;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.header-cta {
  margin-left: var(--space-3);
}

/* CTAボタンのベース */
.btn, .header-cta a, .hero .cta a {
  display: inline-block;
  background: var(--color-accent);
  color: #1a1a1a;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.btn:hover { transform: translateY(-1px); }

/* ========== ヒーローセクション ========== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.hero::before {
  /* グラデーションの半透明オーバーレイ */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74,20,140,.8), rgba(26,35,126,.8));
}

.hero .inner {
  position: relative;
  padding: var(--space-6) 0 var(--space-6);
  text-align: left;
}

.hero h1 {
  margin: 0 0 var(--space-3);
  font-size: 28px;
  line-height: 1.3;
  font-weight: 900; /* 太字で力強く */
}

.hero p.lead { color: #EEF1FF; font-size: 16px; margin-bottom: var(--space-4); }

.hero .cta { margin-top: var(--space-3); }

/* ========== セクション（特徴・声・流れ・料金） ========== */
.section { padding: var(--space-6) 0; }
.section h2 { font-size: 22px; margin: 0 0 var(--space-4); font-weight: 800; }
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

.grid {
  display: grid;
  gap: var(--space-4);
}

/* ========== フッター ========== */
.site-footer {
  margin-top: var(--space-6);
  padding: var(--space-5) 0;
  color: var(--color-muted);
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ========== レスポンシブ ========== */
@media (min-width: 768px) {
  .site-title { font-size: 20px; }
  .hero .inner { padding: var(--space-7) 0 var(--space-7); }
  .hero h1 { font-size: 40px; }
  .hero p.lead { font-size: 18px; }

  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ========== 追加：白背景セクション（サービス詳細） ========== */
.section-white {
  background: #ffffff;
  color: #222;
}
.card-light {
  background: #ffffff;
  color: #222;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}
.card-light h3 { margin-top: 0; }

/* メトリクス（特徴/実績サマリー）の見た目を少し太めに */
.metrics {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
}
.metric {
  text-align: center;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.metric strong { font-size: 28px; display:block; }

/* ========== CTA Heartbeat Animation (Header & Hero only) ========== */
@keyframes heartbeat {
  0% { transform: scale(1); }
  10% { transform: scale(1.06); }
  20% { transform: scale(0.98); }
  30% { transform: scale(1.07); }
  40% { transform: scale(1); }
  100% { transform: scale(1); }
}

/* Apply heartbeat to header and hero CTAs */
.site-header .nav .btn,
.hero .cta .btn {
  animation: heartbeat 1.6s ease-in-out infinite;
  transform-origin: center;
  will-change: transform;
}

/* Improve hover: pause animation and give slight lift + scale */
.site-header .nav .btn:hover,
.hero .cta .btn:hover {
  animation-play-state: paused;
  transform: translateY(-1px) scale(1.02);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .site-header .nav .btn,
  .hero .cta .btn {
    animation: none !important;
  }
}

/* ========== クーポンセクション ========== */
.section-coupon {
  /* 要望: 外側は白、クーポン枠のみ紫 */
  background: #ffffff;
  padding: var(--space-6) 0;
  /* クーポン縮尺・寸法（約35%相当の小型版） */
  --coupon-left-width: 5rem;        /* 旧: 12rem */
  --coupon-notch: var(--coupon-left-width);
  --coupon-notch-r: .45rem;         /* 旧: 1rem */
  --coupon-tail-w: 24px;            /* 旧: 64px */
  --coupon-fold: 6px;               /* 旧: 12px */
  --coupon-ribbon-pad-y: 6px;       /* 旧: 12px */
  --coupon-ribbon-pad-x: 24px;      /* 旧: 64px */
}

.coupon-container {
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

.coupon-shape {
  background: #ffffff;
  color: #1a202c;
  border-radius: 16px;
  border: 6px solid #6B46C1; /* 紫の枠線のみ */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  /* デスクトップ: 上下の丸抜き */
  -webkit-mask-image:
    radial-gradient(circle at var(--coupon-notch) 0, transparent var(--coupon-notch-r), black calc(var(--coupon-notch-r) + .1rem)),
    radial-gradient(circle at var(--coupon-notch) 100%, transparent var(--coupon-notch-r), black calc(var(--coupon-notch-r) + .1rem));
  mask-image:
    radial-gradient(circle at var(--coupon-notch) 0, transparent var(--coupon-notch-r), black calc(var(--coupon-notch-r) + .1rem)),
    radial-gradient(circle at var(--coupon-notch) 100%, transparent var(--coupon-notch-r), black calc(var(--coupon-notch-r) + .1rem));
  -webkit-mask-size: 100% 51%;
  mask-size: 100% 51%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: top, bottom;
  mask-position: top, bottom;
}

@media (min-width: 768px) {
  .coupon-shape { flex-direction: row; }
}

/* 左パネル */
.coupon-left {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

@media (min-width: 768px) {
  .coupon-left { width: var(--coupon-left-width); min-height: auto; }
}

.coupon-stamp {
  width: 48px; height: 48px;
  border: 2px solid #CBD5E0; /* gray-300 */
  color: #A0AEC0; /* gray-400 */
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px; line-height: 1.2;
  user-select: none;
}

.coupon-genre {
  position: absolute;
  right: 12px; bottom: 40px;
  font-size: 9px; letter-spacing: .2em; color: #A0AEC0;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .coupon-genre { position: static; margin-top: 8px; }
}

.coupon-sep-vertical {
  display: none;
}
@media (min-width: 768px) {
  .coupon-sep-vertical {
    display: block; position: absolute; right: 0; top: 16px; bottom: 16px; width: 2px;
    background-image: linear-gradient(to bottom, #CBD5E0 50%, rgba(0,0,0,0) 50%);
    background-size: 2px 20px; background-repeat: repeat-y;
  }
}

.coupon-sep-horizontal {
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px;
  background-image: linear-gradient(to right, #CBD5E0 50%, rgba(0,0,0,0) 50%);
  background-size: 20px 2px; background-repeat: repeat-x;
}
@media (min-width: 768px) {
  .coupon-sep-horizontal { display: none; }
}

/* 右パネル */
.coupon-right {
  flex: 1 1 auto;
  padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
  text-align: center;
}

.coupon-ribbon-wrap { position: relative; margin: 10px auto 18px; }

.coupon-ribbon-tail { position: absolute; top: 0; height: calc(100% - 8px); width: var(--coupon-tail-w); background: #A78BFA; z-index: 0; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.coupon-ribbon-tail-left { left: calc(-1 * var(--coupon-tail-w) + 8px); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 20% 50%); }
.coupon-ribbon-tail-right { right: calc(-1 * var(--coupon-tail-w) + 8px); clip-path: polygon(0 0, 100% 0, 80% 50%, 100% 100%, 0 100%); }

.coupon-ribbon-fold { position: absolute; bottom: 0; width: var(--coupon-fold); height: var(--coupon-fold); background: #805AD5; z-index: 10; }
.coupon-ribbon-fold-left { left: calc(-1 * var(--coupon-fold)); clip-path: polygon(100% 0, 0 0, 100% 100%); }
.coupon-ribbon-fold-right { right: calc(-1 * var(--coupon-fold)); clip-path: polygon(0 0, 100% 0, 0 100%); }

.coupon-ribbon {
  position: relative; z-index: 20;
  background: #C4B5FD; color: #1a202c; border: 4px solid #fff;
  font-weight: 800; letter-spacing: .06em; font-size: 16px;
  padding: var(--coupon-ribbon-pad-y) var(--coupon-ribbon-pad-x); border-radius: 4px; box-shadow: var(--shadow-sm);
}

.coupon-title { font-size: 16px; margin: 0 0 6px; color: #2D3748; font-weight: 800; letter-spacing: .08em; }
@media (min-width: 768px) { .coupon-title { font-size: 18px; } }

.coupon-price { color: #5B21B6; font-weight: 900; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 6px; }
.coupon-price .currency { font-size: 16px; }
.coupon-price .amount { font-size: 32px; }
.coupon-price .suffix { font-size: 16px; font-weight: 800; color: #4C1D95; }
@media (min-width: 768px) {
  .coupon-price .currency { font-size: 20px; }
  .coupon-price .amount { font-size: 36px; }
  .coupon-price .suffix { font-size: 18px; }
}

.coupon-deco { width: 100%; max-width: 180px; height: 6px; background: #E9D8FD; border-radius: 999px; margin-top: 6px; }

/* モバイル: 左右の丸抜きに変更 */
@media (max-width: 767.98px) {
  .coupon-shape {
    -webkit-mask-image:
      radial-gradient(circle at 0 var(--coupon-notch), transparent var(--coupon-notch-r), black calc(var(--coupon-notch-r) + .1rem)),
      radial-gradient(circle at 100% var(--coupon-notch), transparent var(--coupon-notch-r), black calc(var(--coupon-notch-r) + .1rem));
    mask-image:
      radial-gradient(circle at 0 var(--coupon-notch), transparent var(--coupon-notch-r), black calc(var(--coupon-notch-r) + .1rem)),
      radial-gradient(circle at 100% var(--coupon-notch), transparent var(--coupon-notch-r), black calc(var(--coupon-notch-r) + .1rem));
    -webkit-mask-size: 51% 100%;
    mask-size: 51% 100%;
    -webkit-mask-position: left, right;
    mask-position: left, right;
  }
}
