/*
Theme Name: Momoperi
Theme URI: https://momoperi.com
Author: 香嵐渓堂合同会社
Author URI: https://momoperi.com
Description: 動画編集・AI活用文章作成のシックでモダンなテーマ
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: momoperi
*/

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #181818;
  --accent: #c8a96e;
  --accent2: #e8c98e;
  --text: #f0ede8;
  --muted: #888880;
  --border: rgba(200,169,110,0.2);
  --ff-serif: 'Shippori Mincho', 'Noto Serif JP', serif;
  --ff-mono: 'Space Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-serif);
  line-height: 1.8;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===========================
   NAV
=========================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
}

.site-logo {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  transition: all 0.3s;
}

/* ===========================
   HERO
=========================== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 5rem 3rem 5rem;
  position: relative;
  z-index: 2;
}

.hero-tag {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-tag::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(3rem, 5vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.hero-title span {
  color: var(--accent);
  display: block;
}

.hero-desc {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 2;
   width:100%;
  margin-bottom: 3rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.3s;
  width: fit-content;
}

.hero-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero-cta::after {
  content: '→';
  transition: transform 0.3s;
}

.hero-cta:hover::after { transform: translateX(4px); }

.hero-right {
  position: relative;
  overflow: hidden;
}

.film-strip {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 2px;
  padding: 80px 0 0;
}

.film-frame {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
}

.film-frame::before {
  content: attr(data-label);
  position: absolute;
  top: 12px; left: 16px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
  z-index: 3;
  text-transform: uppercase;
}

.film-frame-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-video {
  background: linear-gradient(135deg, #1a1408 0%, #0a0a0a 100%);
}

.timecode {
  position: absolute;
  bottom: 12px; right: 16px;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: rgba(200,169,110,0.5);
  letter-spacing: 0.1em;
}

.play-icon {
  width: 48px;
  height: 48px;
  border: 1.5px solid rgba(200,169,110,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-icon::after {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 0 8px 16px;
  border-color: transparent transparent transparent rgba(200,169,110,0.6);
  margin-left: 3px;
}

/* ===========================
   SECTION BASE
=========================== */
.section-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}

/* ===========================
   SERVICES
=========================== */
#services {
  background: var(--bg2);
  padding: 3rem 3rem;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--bg2);
  padding: 3rem 2.5rem;
  transition: background 0.3s;
}

.service-card:hover { background: var(--bg3); }

.service-number {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 2rem;
}

.service-icon-wrap {
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.service-desc {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 2;
}

.service-list {
  margin-top: 1.5rem;
}

.service-list li {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-list li::before {
  content: '—';
  color: var(--accent);
}

/* ===========================
   PORTFOLIO
=========================== */
#portfolio {
  background: var(--bg);
  padding: 2rem 3rem;
}

.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}

.portfolio-title {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portfolio-note {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--border);
}

.pf-item {
  background: var(--bg3);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.3s;
}

.pf-item:hover { background: #1e1e1e; }

.pf-item:nth-child(1) { grid-column: span 7; }
.pf-item:nth-child(2) { grid-column: span 5; }
.pf-item:nth-child(3) { grid-column: span 4; }
.pf-item:nth-child(4) { grid-column: span 4; }
.pf-item:nth-child(5) { grid-column: span 4; }

/* 2枠レイアウト */
.pf-grid-2 .pf-item:nth-child(n) { grid-column: span 6; }

/* 動画埋め込み */
.pf-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.pf-video-wrap video,
.pf-video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.pf-ext-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  color: var(--accent);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  background: var(--bg3);
  transition: background 0.3s;
}

.pf-ext-link:hover { background: #1e1e1e; }

.pf-thumbnail {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.pf-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.pf-item:hover .pf-thumbnail img { transform: scale(1.05); }

.pf-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.pf-item:hover .pf-overlay { opacity: 1; }

.pf-play {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-play::after {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 9px 0 9px 18px;
  border-color: transparent transparent transparent var(--accent);
  margin-left: 4px;
}

.pf-info {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}

.pf-cat {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.pf-name {
  font-size: 1rem;
  font-weight: 600;
}

/* ===========================
   ABOUT
=========================== */
#about {
  background: var(--bg2);
  padding: 7rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-visual {
  position: relative;
  height: 480px;
}

.about-frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  overflow: visible;
}

.about-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.about-badge {
  position: absolute;
  bottom: 2rem;
  right: -1.5rem;
  background: var(--accent);
  color: var(--bg);
  padding: 1rem 1.5rem;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}

.about-heading {
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.about-text {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 2.2;
  margin-bottom: 1.5rem;
}

.about-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 2.5rem;
  border: 1px solid var(--border);
}

.spec-item {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.spec-item:nth-child(2n) { border-right: none; }
.spec-item:nth-last-child(-n+2) { border-bottom: none; }

.spec-key {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.spec-val {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ===========================
   CONTACT
=========================== */
#contact {
  background: var(--bg);
  text-align: center;
  padding: 7rem 3rem;
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(200,169,110,0.06);
  pointer-events: none;
}

#contact::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  border-radius: 50%;
  border: 1px solid rgba(200,169,110,0.03);
  pointer-events: none;
}

.contact-inner { position: relative; z-index: 2; }

.contact-inner .section-label { justify-content: center; }

.contact-title {
  font-size: clamp(2.5rem, 4vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.contact-title span { color: var(--accent); }

.contact-sub {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 3rem;
}

.contact-email {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.25rem;
  transition: opacity 0.3s;
}

.contact-email:hover { opacity: 0.7; }

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
}

.footer-copy {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-left > * {
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

.hero-tag   { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.4s; }
.hero-desc  { animation-delay: 0.6s; }
.hero-cta   { animation-delay: 0.8s; }

@keyframes filmLoad {
  from { opacity: 0; transform: scaleY(0.9); }
  to   { opacity: 1; transform: scaleY(1); }
}

.film-frame { animation: filmLoad 0.6s ease forwards; opacity: 0; }
.film-frame:nth-child(1) { animation-delay: 0.5s; }
.film-frame:nth-child(2) { animation-delay: 0.7s; }
.film-frame:nth-child(3) { animation-delay: 0.9s; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-right { display: none; }
 .hero-left { padding: 5rem 1.5rem 2rem; justify-content: flex-start; } 

  #services, #portfolio, #about, #contact { padding: 4rem 1.5rem; }

  .services-grid { grid-template-columns: 1fr; }
  .pf-item:nth-child(n) { grid-column: span 12; }
  .portfolio-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  #about { grid-template-columns: 1fr; gap: 2rem; }
  .about-visual { height: 280px; }
  .about-badge { right: 0; }

  .site-header { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    top: 60px;
    background: rgba(10,10,10,0.97);
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 99;
  }
  .nav-links.open a { font-size: 14px; }
  .nav-toggle { display: flex; }

  .site-footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
/* 動画サイズ制限 */
.pf-video-wrap {
  max-height: 320px;
}
.pf-video-wrap video,
.pf-video-wrap iframe {
  max-height: 320px;
  object-fit: contain;
}

/* 縦長動画（9:16）用 */
.pf-item.is-vertical .pf-video-wrap {
  aspect-ratio: 9 / 16;
  max-height: 480px;
  max-width: 270px;
  margin: 0 auto;
}
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.6rem;
  }
　/* 動画の高さを揃える（PC） */
.pf-video-wrap {
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 360px;
}

.pf-video-wrap video,
.pf-video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  object-fit: contain;
}

/* 縦動画は縦のアスペクト比で表示 */
.pf-item.is-vertical .pf-video-wrap {
  aspect-ratio: 9 / 16;
  max-height: 480px;
  max-width: 270px;
  margin: 0 auto;
}

/* スマホ */
@media (max-width: 900px) {
  .pf-video-wrap {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: none !important;
  }
  .pf-item.is-vertical .pf-video-wrap {
    aspect-ratio: 9 / 16 !important;
    max-width: 180px !important;
	max-height: 220px !important;
  }
 .pf-item.is-vertical.pf-video-wrap video
	object-fit: cover !important;
	}	
  #portfolio {
    padding-top: 1rem !important;
  }
}
/* スマホ：動画高さ調整 */
@media (max-width: 900px) {
  .pf-video-wrap {
    height: 220px !important;
    max-height: 220px !important;
    aspect-ratio: unset !important;
  }
  .pf-video-wrap video,
  .pf-video-wrap iframe {
    width: 100% !important;
    height: 100% !important;
    max-height: 220px !important;
    object-fit: cover !important;
  }
  /* 横動画だけcontainに戻す */
  .pf-item:not(.is-vertical) .pf-video-wrap video,
  .pf-item:not(.is-vertical) .pf-video-wrap iframe {
    object-fit: contain !important;
  }
  #portfolio {
    padding-top: 1rem !important;
  }
}