/**
 * iCraft Front Page — ダーク×マテリアル トップページ専用スタイル
 * is_front_page() 時のみ読み込み。icraft-lp.css はフロントでは読み込まれない。
 */

/* ==========================================================================
   共通: セクション基礎
   ========================================================================== */

.icraft-page--front {
  padding-bottom: 0;
}

/* ページロード時のインクワイプ（JS有効時のみ・1回きり） */
.ic-motion-ready .icraft-page--front::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--ink-950);
  pointer-events: none;
  animation: ic-intro 0.9s var(--ease-out-expo) 0.12s both;
}

@keyframes ic-intro {
  to {
    transform: translateY(-100%);
    visibility: hidden;
  }
}

.icraft-page--front .ic-section {
  position: relative;
  padding: var(--section-py) 0;
}

.icraft-page--front .ic-section--tight {
  padding: calc(var(--section-py) * 0.6) 0;
}

.icraft-page--front .ic-section--alt {
  background: var(--ink-850);
}

/* ==========================================================================
   S1. ヒーロー
   ========================================================================== */

.ic-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink-900);
}

.ic-hero__bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 56%;
  z-index: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
}

.ic-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: grayscale(1) contrast(1.08) brightness(0.7);
}

.ic-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 19, 21, 0.2), rgba(18, 19, 21, 0.6));
}

.ic-hero__ghost {
  position: absolute;
  left: -0.04em;
  bottom: -0.14em;
  z-index: 1;
  opacity: 0.6;
}

.ic-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + var(--space-8));
  padding-bottom: var(--space-24);
  will-change: transform, opacity;
}

.ic-hero__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(1.5rem, 1rem + 2vw, 2.5rem);
  color: var(--accent);
  font-family: var(--font-en);
  font-size: var(--fs-kicker);
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
}

.ic-hero__kicker::before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.ic-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-feature-settings: "palt" 1;
  font-size: var(--fs-hero);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.22;
  color: var(--paper-100);
}

.ic-hero__lead {
  max-width: 34em;
  margin: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0 0;
  color: var(--paper-300);
  font-size: var(--fs-lead);
  line-height: 2;
  letter-spacing: 0.03em;
}

.ic-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
}

.ic-hero__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
}

.ic-hero__foot-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: var(--space-8);
}

.ic-hero__meta {
  color: var(--paper-500);
  font-family: var(--font-en);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ==========================================================================
   S2. 材料マーキー
   ========================================================================== */

.ic-marquee-band {
  padding: clamp(1.75rem, 1.25rem + 2vw, 3rem) 0;
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
  background: var(--ink-900);
}

.ic-marquee-band .ic-marquee__track {
  gap: 0;
}

.ic-marquee-band .ic-marquee__item {
  display: inline-block;
  padding: 0 clamp(1.5rem, 1rem + 2vw, 3rem);
  font-family: var(--font-en);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--paper-100);
  white-space: nowrap;
}

.ic-marquee-band .ic-marquee__item--stroke {
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
}

.ic-marquee-band .ic-marquee__item--ja {
  font-family: var(--font-display);
  font-feature-settings: "palt" 1;
  font-weight: 700;
}

/* ==========================================================================
   S3. Stats
   ========================================================================== */

.ic-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.ic-stats__grid .ic-stat {
  padding: 8px clamp(1rem, 0.5rem + 2vw, 2.5rem);
  border-left: 1px solid var(--line-1);
}

.ic-stats__grid .ic-stat:first-child {
  border-left: 0;
  padding-left: 0;
}

@media (max-width: 1023px) {
  .ic-stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10) 0;
  }

  .ic-stats__grid .ic-stat:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
}

/* ==========================================================================
   S4. Lead（WHY iCRAFT）
   ========================================================================== */

.ic-lead__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 2rem + 4vw, 6rem);
  align-items: start;
}

.ic-lead__sticky {
  position: sticky;
  top: calc(var(--header-h) + 40px);
}

.ic-lead__statement {
  margin: 0;
  font-size: var(--fs-h2);
  font-weight: 700;
}

.ic-lead__body p {
  margin: 0 0 1.5em;
  color: var(--paper-300);
  line-height: 2.1;
}

.ic-lead__body p:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 1023px) {
  .ic-lead__grid {
    grid-template-columns: 1fr;
  }

  .ic-lead__sticky {
    position: static;
  }
}

/* ==========================================================================
   S9. Works（scroll-snap 横スクロール）
   ========================================================================== */

.ic-works__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-8);
}

.ic-works-track-wrap {
  margin-top: var(--space-4);
}

.ic-works-track {
  display: flex;
  gap: clamp(1rem, 0.75rem + 1vw, 1.5rem);
  padding: 4px calc((100vw - min(var(--container-max), 100vw - var(--container-px) * 2)) / 2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-deep) var(--ink-850);
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.ic-works-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.ic-works-track::-webkit-scrollbar {
  height: 4px;
}

.ic-works-track::-webkit-scrollbar-track {
  background: var(--ink-850);
}

.ic-works-track::-webkit-scrollbar-thumb {
  background: var(--accent-deep);
}

.ic-works-track > * {
  flex: 0 0 clamp(280px, 30vw, 380px);
  scroll-snap-align: start;
}

/* ==========================================================================
   S11. Recruit / Partner
   ========================================================================== */

.ic-recruit {
  border-top: 1px solid var(--line-1);
}

.ic-recruit__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 2rem + 4vw, 6rem);
  align-items: center;
}

.ic-recruit__visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xs);
}

.ic-recruit__text {
  margin: 0 0 1.5em;
  color: var(--paper-500);
  line-height: 2;
}

.ic-recruit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: var(--space-8);
}

@media (max-width: 1023px) {
  .ic-recruit__grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   reduced-motion（front.cssが後読みのため、自ファイル内で上書きする）
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .ic-motion-ready .icraft-page--front::after {
    animation: none;
    content: none;
  }

  .ic-marquee-band .ic-marquee__item.is-clone {
    display: none;
  }

  .ic-marquee-band .ic-marquee__track {
    flex-wrap: wrap;
    white-space: normal;
  }
}
