/* ============================================================
   COMPONENTS — atomic & reusable
   ・命名: c-{component}__{element}--{modifier}
   ・全て auto layout (flex / grid + gap) を前提
   ============================================================ */

/* ─── Container ────────────────────────────────────── */
.c-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-x);
}

/* ─── Section frame ─ Auto layout vertical ──────────── */
.c-section {
  padding: var(--space-10) var(--container-pad-x) var(--section-pad-y);
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}
.c-section--no-pad-x { padding-left: 0; padding-right: 0; }

@media (max-width: 768px) {
  .c-section { padding-top: var(--space-8); }
}
.c-section--surface-2 { background: var(--color-surface-secondary); }
.c-section--surface-3 { background: var(--color-surface-tertiary); }
.c-section--inverse   { background: var(--color-surface-inverse); color: var(--color-text-on-inverse); }

/* ─── Section header ─ Auto layout vertical ─────────── */
.c-section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}
.c-section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-7xl);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-snug);
  letter-spacing: 0.14em;
  color: var(--color-text-primary);
  word-break: keep-all;
  font-feature-settings: "palt" 1;
}
.c-section-header__sub {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}
.c-section--inverse .c-section-header__title { color: var(--color-text-on-inverse); }
.c-section--inverse .c-section-header__sub   { color: rgba(255,255,255,0.45); }

/* ─── Tag (small pill label) ────────────────────────── */
.c-tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-divider);
  background: var(--color-surface-secondary);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
}

/* ─── Button ────────────────────────────────────────── */
.c-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  text-decoration: none;
  transition:
    background var(--duration-base) var(--ease-out),
    color      var(--duration-base) var(--ease-out),
    border     var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    transform  var(--duration-fast) var(--ease-out);
}

/* Variants */
.c-button--primary {
  background: var(--color-brand-primary);
  color: var(--color-text-on-inverse);
}
.c-button--primary:hover {
  box-shadow: var(--shadow-lg);
  transform: none;
}

.c-button--light {
  background: var(--color-surface-primary);
  color: var(--color-text-primary);
}
.c-button--light:hover {
  background: var(--color-brand-primary);
  color: var(--color-text-on-inverse);
  box-shadow: var(--shadow-lg);
  transform: none;
}

.c-button--outline {
  background: #ffffff;
  border-color: var(--color-border-input);
  color: var(--color-text-primary);
  font-weight: var(--weight-regular);
}
.c-button--outline:hover {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: var(--color-text-on-inverse);
  transform: none;
}

/* Sizes */
.c-button--lg { padding: var(--space-2) calc(var(--space-5) + var(--space-1)); font-size: var(--text-xl); }
.c-button--sm { padding: 11px var(--space-3); font-size: var(--text-base); font-weight: var(--weight-semibold); white-space: nowrap; }

/* ─── Card (generic) ────────────────────────────────── */
.c-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-tertiary);
  border: 1px solid var(--color-border-card);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-base) var(--ease-out);
}
.c-card:hover { box-shadow: var(--shadow-md); }

/* ─── Avatar ────────────────────────────────────────── */
.c-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex-shrink: 0;
  border: none;
}
.c-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Badge (verified-style, with check-circle) ─────── */
.c-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.c-badge::before {
  content: '';
  display: inline-block;
  width: var(--space-2);
  height: var(--space-2);
  background-color: var(--color-success);
  border-radius: var(--radius-pill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline points='2,6 5,9 10,3' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* ─── Fade-up animation utility ─────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── YouTube Modal ─────────────────────────────────── */
.c-yt-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.c-yt-modal.is-open { display: flex; }
.c-yt-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}
.c-yt-modal__container {
  position: relative;
  width: min(92vw, 900px);
  z-index: 1;
}
.c-yt-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}
.c-yt-modal__close:hover { opacity: 1; }
.c-yt-modal__close svg { width: 24px; height: 24px; }
.c-yt-modal__frame {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.c-yt-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
