/* ============================================================
   YFT Online — style.css
   ============================================================ */

/* ---------- カラートークン ---------- */
:root {
  --c-brand: #29abe2;
  --c-brand-dark: #1a8fc2;
  --c-brand-light: #e0f5fd;
  --c-accent: #c8960a;
  --c-accent-light: #e8b422;
  --c-accent-bg: #fdf6e3;
  --c-bg: #f8fbfd;
  --c-bg-surface: #ffffff;
  --c-bg-surface2: #eef7fc;
  --c-text: #1a2030;
  --c-text-muted: #5a6a7a;
  --c-border: #c8e6f4;
  --c-danger: #d9443f;
  --c-white: #ffffff;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-card: 0 2px 12px rgba(41, 171, 226, .10);
  --shadow-card-hover: 0 8px 32px rgba(41, 171, 226, .22);

  --transition-fast: 120ms ease-out;
  --transition-mid: 240ms ease-out;
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: 'Hiragino Kana Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* ---------- コンテナ ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- セクション ---------- */
.section { padding-block: 64px; }
.section-alt { background: linear-gradient(135deg, #eef7fc 0%, #fefaf0 100%); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 44px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; }
.btn-primary {
  background: var(--c-brand);
  color: #0d1117;
  border-color: var(--c-brand);
}
.btn-primary:hover { background: var(--c-brand-dark); border-color: var(--c-brand-dark); }
.btn-primary:active { transform: scale(.97); }
.btn-outline {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-outline:hover { border-color: var(--c-brand); color: var(--c-brand); }
.btn-lg { height: 52px; padding-inline: 32px; font-size: 1.0625rem; }
.btn-full { width: 100%; }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 2px 12px rgba(41, 171, 226, .08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.5rem; }
.logo-img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.15));
}
.header-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.nav-link {
  font-size: .9375rem;
  color: var(--c-text-muted);
  transition: color var(--transition-fast);
}
.nav-link:hover { color: var(--c-text); }
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--c-brand-light);
  border: 1px solid var(--c-border);
  font-size: 1.25rem;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}
.cart-btn:hover { border-color: var(--c-brand); background: var(--c-brand); }
.cart-btn:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--c-brand);
  color: #000;
  font-size: .6875rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 4px;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding-block: 120px 100px;
  overflow: hidden;
  text-align: center;
  min-height: 80vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, #e0f5fd 0%, #fdf6e3 50%, #e8f7fb 100%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(41,171,226,.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(200,150,10,.12) 0%, transparent 60%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='90' fill='none' stroke='%2329abe2' stroke-width='1.5' stroke-dasharray='8 8' opacity='.18'/%3E%3Ccircle cx='100' cy='100' r='60' fill='none' stroke='%23c8960a' stroke-width='1.5' stroke-dasharray='6 6' opacity='.14'/%3E%3C/svg%3E") center/700px 700px no-repeat;
}
.hero-inner {
  position: relative;
  max-width: 800px;
  width: 100%;
}
.hero-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--c-accent);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 40px;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-brand) 60%, #1a6fa8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-cta {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #0d1117;
  font-weight: 700;
}
.hero-cta:hover {
  background: var(--c-accent-light);
  border-color: var(--c-accent-light);
  color: #0d1117;
}
.hero-desc {
  font-size: 1.0625rem;
  color: var(--c-text-muted);
  margin-bottom: 40px;
  line-height: 1.8;
}

/* ========== PHILOSOPHY ========== */
.philosophy-section {
  background: linear-gradient(180deg, #e8f6fb 0%, #fdf8ec 100%);
  border-top: 2px solid var(--c-border);
  border-bottom: 2px solid var(--c-border);
}
.philosophy-inner {
  max-width: 960px;
  margin-inline: auto;
}
.philosophy-header {
  text-align: center;
  margin-bottom: 48px;
}
.philosophy-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.philosophy-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0;
}
.philosophy-text {
  font-size: 1.0625rem;
  line-height: 2;
  color: var(--c-text);
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 56px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-md);
  padding: 32px 40px;
  box-shadow: 0 2px 16px rgba(41, 171, 226, .08);
}
.philosophy-text strong {
  color: var(--c-accent);
  font-weight: 700;
}
.philosophy-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar {
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(41, 171, 226, .07);
  transition: transform var(--transition-mid), box-shadow var(--transition-mid), border-color var(--transition-mid);
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(41, 171, 226, .18);
  border-color: var(--c-brand);
}
.pillar-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 16px;
}
.pillar-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 12px;
}
.pillar-desc {
  font-size: .9375rem;
  color: var(--c-text-muted);
  line-height: 1.7;
}


/* ========== CATEGORIES ========== */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.cat-chip {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-muted);
  font-size: .9375rem;
  transition: all var(--transition-fast);
}
.cat-chip:hover,
.cat-chip.active {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #000;
  font-weight: 600;
}
.cat-chip:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; }


/* ========== VIDEO GRID ========== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

/* ===== VIDEO CARD ===== */
.video-card {
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-mid), box-shadow var(--transition-mid), border-color var(--transition-mid);
}
.video-card:hover { border-color: var(--c-brand); }
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--c-bg-surface2);
  overflow: hidden;
}
.video-thumb iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.video-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #d0edf8 0%, #fef4cc 100%);
}
.video-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(4px);
  color: var(--c-text);
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
}
.video-badge.badge-new {
  background: var(--c-brand);
  color: #000;
  border-color: var(--c-brand);
}
.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.video-card:hover .video-play-btn { opacity: 1; }
.play-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.video-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.video-cat {
  font-size: .75rem;
  font-weight: 600;
  color: var(--c-brand);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.video-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-desc {
  font-size: .875rem;
  color: var(--c-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .8125rem;
  color: var(--c-text-muted);
  margin-top: auto;
}
.video-duration::before { content: "⏱ "; }
.video-level { padding: 2px 8px; border-radius: 4px; background: var(--c-brand-light); color: var(--c-brand-dark); }
.video-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.video-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-accent);
}
.video-price-sub {
  font-size: .75rem;
  color: var(--c-text-muted);
  font-weight: 400;
  margin-left: 2px;
}
.add-cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--c-brand);
  background: transparent;
  color: var(--c-brand);
  font-size: .9375rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.add-cart-btn:hover { background: var(--c-brand); color: #000; }
.add-cart-btn:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; }
.add-cart-btn.added { background: var(--c-brand); color: #000; }

.load-more-wrap { text-align: center; }

/* ========== HOW IT WORKS ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin-inline: auto;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.step-num {
  font-size: 3rem;
  font-weight: 700;
  color: var(--c-brand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.step-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-desc {
  font-size: .9375rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ========== FAQ ========== */
.faq-wrap { max-width: 720px; }
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--c-border);
}
.faq-item:first-child { border-top: 1px solid var(--c-border); }
.faq-q { display: block; }
.faq-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  background: transparent;
  border: none;
  color: var(--c-text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  gap: 16px;
}
.faq-btn:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; }
.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--c-text-muted);
  border-bottom: 2px solid var(--c-text-muted);
  transform: rotate(45deg);
  transition: transform var(--transition-fast);
  margin-top: -4px;
}
.faq-btn[aria-expanded="true"] .faq-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.faq-a {
  padding-bottom: 20px;
  color: var(--c-text-muted);
  font-size: .9375rem;
  line-height: 1.7;
}

/* ========== FOOTER ========== */
.site-footer {
  background: linear-gradient(135deg, #e0f5fd 0%, #fdf8ec 100%);
  border-top: 2px solid var(--c-border);
  padding-block: 40px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 700;
}
.footer-logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.15));
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-size: .875rem;
  color: var(--c-text-muted);
  transition: color var(--transition-fast);
}
.footer-nav a:hover { color: var(--c-text); }
.footer-copy {
  font-size: .8125rem;
  color: var(--c-text-muted);
}

/* ========== CART DRAWER ========== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-mid);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  background: var(--c-white);
  border-left: 1px solid var(--c-border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-mid);
  box-shadow: -4px 0 24px rgba(41, 171, 226, .10);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.cart-title { font-size: 1.25rem; font-weight: 700; }
.cart-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 1rem;
  transition: all var(--transition-fast);
}
.cart-close:hover { background: var(--c-brand-light); color: var(--c-brand-dark); }
.cart-close:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; }
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-empty {
  color: var(--c-text-muted);
  text-align: center;
  margin-top: 48px;
}
.cart-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: var(--c-bg-surface2);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  box-shadow: 0 1px 4px rgba(41, 171, 226, .06);
}
.cart-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--c-brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title {
  font-size: .9375rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price { font-size: .875rem; color: var(--c-accent); margin-top: 4px; }
.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--c-text-muted);
  font-size: 1.125rem;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}
.cart-item-remove:hover { color: var(--c-danger); }
.cart-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 16px;
}
#cartTotal { color: var(--c-accent); }
.cart-secure {
  text-align: center;
  font-size: .8125rem;
  color: var(--c-text-muted);
  margin-top: 12px;
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--c-white);
  border: 1.5px solid var(--c-brand);
  color: var(--c-text);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: .9375rem;
  font-weight: 600;
  z-index: 300;
  white-space: nowrap;
  transition: transform 240ms ease-out;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(41, 171, 226, .18);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; max-width: 480px; }
  .step { flex-direction: row; text-align: left; }
  .step-num { font-size: 2rem; flex-shrink: 0; }
  .header-nav { display: none; }
  .hero { padding-block: 80px 64px; min-height: 70vh; }
  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .philosophy-pillars { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .philosophy-text { padding: 24px; }
}

@media (max-width: 480px) {
  .container { padding-inline: 16px; }
  .video-grid { grid-template-columns: 1fr; }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
