/* ===================================
   wireframe.css — レイアウト・コンポーネント定義
=================================== */

/* ========= Demo Reel エリア ========= */
.reel {
  position: relative;
  width: 100%;
  min-height: 90vh;
  background: var(--wf-placeholder);
  overflow: hidden;
}

/* グリッド線オーバーレイ */
.reel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(40, 40, 66, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(40, 40, 66, 0.05) 1px, transparent 1px);
  background-size: 67px 67px;
}

/* Vimeo iframe：フルスクリーンカバー（アスペクト比維持・トリミング） */
.reel__iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, calc(100vh * 16 / 9));
  height: max(56.25vw, 100vh);
  border: none;
  z-index: 0;
}

/* 下部グラデーション：テキスト可読性確保 */
.reel__gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background: linear-gradient(
    to top,
    rgba(252, 252, 252, 1)   0%,
    rgba(252, 252, 252, 0.7) 40%,
    rgba(252, 252, 252, 0)   100%
  );
  z-index: 1;
  pointer-events: none;
}

/* 左寄り中央テキストブロック */
.reel__text {
  position: absolute;
  bottom: 150px;
  left: 10%;
  z-index: 2;
  text-align: left;
}

.reel__heading {
  font-family: "elza", sans-serif;
  font-size: clamp(6rem, 13.2vw, 10.8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.reel__heading .word--gold { color: var(--color-gold); }
.reel__heading .word--dark { color: var(--color-text); }

/* 説明文：見出しの直下 */
.reel__sub {
  margin-top: 24px;
  font-size: var(--type-xs);
  color: var(--color-sub);
  line-height: 1.7;
  max-width: 520px;
}

/* 右下キャプション */
.reel__caption {
  position: absolute;
  right: 40px;
  bottom: 40px;
  z-index: 2;
  font-size: 13px;
  color: var(--color-sub);
  opacity: 0.65;
  letter-spacing: 0.08em;
  pointer-events: none;
}

/* ========= Selected Projects ========= */
.projects {
  padding-top: var(--space-section);
}

.projects__header {
  padding-inline: clamp(24px, 5vw, 80px);
  margin-bottom: 8px;
}

.projects__label {
  font-size: 1.0rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--color-sub);
  text-transform: uppercase;
  margin: 0;
}

/* サムネイル共通 */
.project-thumb {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--wf-placeholder);
  cursor: pointer;
}

/* 大：超横長 21/9 */
.project-item--large .project-thumb {
  aspect-ratio: 21 / 9;
}

/* 小：横長 16/10 */
.project-item--small .project-thumb {
  aspect-ratio: 16 / 10;
}

/* img：絶対配置・object-fit: cover */
.project-thumb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: opacity 0.4s ease;
}

/* src未設定時は非表示（プレースホルダー灰色を見せる） */
.project-thumb__img[src=""] { opacity: 0; }

/* JS が付与するクラス：img を隠す */
.project-thumb__img.is-hidden { opacity: 0; }

/* hover時に JS が生成する Vimeo iframe */
.project-thumb__iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 115%;
  min-height: 135%;
  border: none;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-thumb__iframe.is-loaded { opacity: 1; }

/* 白グラデーションオーバーレイ：テキスト背面をしっかり覆う */
.project-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(252, 252, 252, 1)   0%,
    rgba(252, 252, 252, 1)  10%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(252, 252, 252, 0)  100%
  );
  z-index: 2;
  pointer-events: none;
}

/* large / small でグラデーション高さを分ける */
.project-item--large .project-overlay { height: 30%; }
.project-item--small .project-overlay { height: 40%; }

/* テキスト：常時表示・左下固定 */
.project-info {
  position: absolute;
  bottom: clamp(20px, 2.5vw, 32px);
  left:   clamp(20px, 2.5vw, 32px);
  z-index: 3;
}

.project-info__title {
  font-size: clamp(1.02rem, 1.44vw, 1.2rem);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin: 0;
}

/* Accent：指定文字列をゴールドで強調 */
.project-info__title .accent {
  color: var(--color-gold);
}

/* メタタグ */
.meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 1px;
}

.meta-tag {
  border: 1px solid #3c3c52;
  color: #3c3c52;
  padding: 3px 7px;
  font-size: 11px;
  background: transparent;
  opacity: 0.8;
  transition: opacity 0.2s;
  line-height: 1.4;
}

.meta-tag:hover {
  opacity: 1;
}

/* ========= 自動ナンバリング（No. 001 形式） ========= */

/* 3桁ゼロ埋めカウンタースタイル */
@counter-style padded3 {
  system: extends decimal;
  pad: 3 "0";
}

/* カウンター初期化 */
.projects {
  counter-reset: works-counter;
}

/* カウンター加算 + 相対配置（::before の起点） */
.project-item {
  position: relative;
  counter-increment: works-counter;
  border: 1px solid rgba(62, 62, 133, 0.1);
  margin: -0.5px;
}

/* 番号表示：動画枠内・左下（タイトルの上）*/
.project-item::before {
  content: "No. " counter(works-counter, padded3);
  position: absolute;
  /* project-info（title + meta ≈ 36px）の上に 12px 余白をとった位置 */
  bottom: calc(clamp(20px, 2.5vw, 32px) + 48px);
  left: clamp(20px, 2.5vw, 32px);
  font-size: clamp(10px, 0.75vw, 12px);
  line-height: 1;
  color: #4d4d54;
  opacity: 0.55;
  letter-spacing: 0.08em;
  z-index: 4;
  pointer-events: none;
}

/* ========= コンタクト導線（Top下部） ========= */
.cta-contact {
  text-align: center;
  padding-top: clamp(25px, 2.5vw, 35px) !important;
  padding-bottom: clamp(25px, 2.5vw, 35px) !important;
}

.cta-contact__lead {
  font-size: var(--type-xs);
  color: var(--color-sub);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.cta-contact__btn {
  display: inline-block;
  font-size: var(--type-xs);
  letter-spacing: 0.1em;
  color: var(--color-text);
  border: 1px solid var(--color-text);
  padding: 12px 36px;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 28px;
}

.cta-contact__btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.cta-contact__email {
  font-size: var(--type-xs);
  color: var(--color-sub);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.cta-contact__email a {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}

.cta-contact__email a:hover {
  border-color: var(--color-text);
}

.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* ========= レスポンシブ ========= */
@media (max-width: 768px) {
  .reel__heading {
    font-size: clamp(3rem, 15vw, 5rem);
    line-height: 1.05;
  }
}

/* ========= Demo Reel グリッドホバーエフェクト ========= */
.reel {
  cursor: crosshair;
}

.reel-grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: grid;
  grid-auto-rows: 200px;
  overflow: hidden;
}

.reel-grid__cell {
  width: 200px;
  height: 200px;
  position: relative;
  opacity: 0;
  transition: opacity 1s ease;
}

.reel-grid__cell.is-active {
  opacity: 1;
  transition: opacity 0.8s ease;
}

/* 白いボックス（不透明度10%） */
.reel-grid__cell::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: rgba(106, 106, 115, 0.1);
  border: 1px solid rgba(106, 106, 115, 0.3);
}

/* 四隅のL字ブラケット */
.reel-grid__cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  #282842 0 12px, transparent 12px) top    left  / 12px 1px no-repeat,
    linear-gradient(to bottom, #282842 0 12px, transparent 12px) top    left  / 1px 12px no-repeat,
    linear-gradient(to left,   #282842 0 12px, transparent 12px) top    right / 12px 1px no-repeat,
    linear-gradient(to bottom, #282842 0 12px, transparent 12px) top    right / 1px 12px no-repeat,
    linear-gradient(to right,  #282842 0 12px, transparent 12px) bottom left  / 12px 1px no-repeat,
    linear-gradient(to top,    #282842 0 12px, transparent 12px) bottom left  / 1px 12px no-repeat,
    linear-gradient(to left,   #282842 0 12px, transparent 12px) bottom right / 12px 1px no-repeat,
    linear-gradient(to top,    #282842 0 12px, transparent 12px) bottom right / 1px 12px no-repeat;
  opacity: 0.5;
}

@media (max-width: 767px) {
  .reel { cursor: auto; }
  .reel-grid { display: none; }
}

.social-links__item {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-sub);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.social-links__item img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.social-links__item:hover {
  opacity: 1;
}

/* ========= ライトボックス ========= */
.lb {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lb.is-open {
  opacity: 1;
  pointer-events: all;
}

.lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 16, 0.92);
  cursor: pointer;
}

.lb__inner {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
}

.lb__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
}

.lb__title {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--color-sub);
}

.lb__close {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--color-sub);
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  transition: color 0.2s, border-color 0.2s;
}

.lb__close:hover {
  color: var(--color-bg);
  border-color: var(--color-bg);
}

.lb__player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.lb__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.lb__hint {
  margin-top: 10px;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--color-sub);
  opacity: 0.45;
  text-align: center;
}

/* ========= Work Detail ========= */
.work-visual {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--wf-placeholder);
  position: relative;
}

.work-title {
  font-size: var(--type-l);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-el);
}

.work-description {
  font-size: var(--type-xs);
  color: var(--color-sub);
  line-height: 1.9;
  margin-bottom: var(--space-el);
}

.work-scope__label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--color-sub);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.work-scope__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-scope__item {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border: 1px solid var(--color-border);
  color: var(--color-sub);
}

.work-scope__item--active {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* 前後ナビ */
.work-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 60px;
  border-top: 1px solid var(--color-border);
}

.work-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--color-sub);
  transition: color 0.2s;
}

.work-nav a:hover {
  color: var(--color-text);
}

/* ========= About ========= */
.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.about-name {
  font-size: var(--type-m);
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

.about-profile p {
  font-size: var(--type-xs);
  color: var(--color-sub);
  line-height: 1.9;
  margin-bottom: 20px;
}

.about-profile p:last-child {
  margin-bottom: 0;
}

.about-skills {
  margin-top: var(--space-el);
}

.about-skills__label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--color-sub);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.about-skills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-skills__item {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border: 1px solid var(--color-border);
  color: var(--color-sub);
}

/* ========= Contact ========= */
.contact-title {
  font-size: var(--type-l);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-el);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: var(--space-el);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--color-sub);
  text-transform: uppercase;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  font: inherit;
  font-size: var(--type-xs);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-input:focus,
.form-textarea:focus {
  border-bottom-color: var(--color-text);
}

.form-submit {
  align-self: flex-start;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--color-bg);
  background: var(--color-text);
  padding: 12px 40px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.form-submit:hover {
  opacity: 0.75;
}

.contact-email {
  font-size: var(--type-xs);
  color: var(--color-sub);
  margin-bottom: 20px;
}

.contact-email a {
  border-bottom: 1px solid var(--color-border);
  transition: border-color 0.2s;
}

.contact-email a:hover {
  border-color: var(--color-text);
}
