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

:root {
  --black:   #0a0a0a;
  --white:   #f5f5f0;
  --gray:    #888880;
  --light:   #d8d8d0;
  --accent:  rgba(255,255,255,0.08);
  --font-sans:  'Montserrat', sans-serif;
  --font-serif: 'Cormorant Garamond', serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none; /* カスタムカーソル */
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ==============================
   CUSTOM CURSOR（デスクトップのみ）
============================== */
.cursor-glow {
  pointer-events: none;
  position: fixed;
  top: 0; left: 0;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease;
  z-index: 9999;
  mix-blend-mode: screen;
}

@media (max-width: 900px) {
  body { cursor: auto; }
  .cursor-glow { display: none; }
}

/* ==============================
   HEADER / NAV
============================== */
#header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

#header.scrolled {
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-text {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

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

.nav-links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--light);
  transition: color 0.2s;
}

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
}

.mobile-menu.open {
  max-height: 300px;
}

.mobile-link {
  padding: 1.2rem 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--light);
  transition: color 0.2s;
}

.mobile-link:hover { color: var(--white); }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
  .nav-inner { padding: 1.2rem 1.5rem; }
}

/* ==============================
   HERO
============================== */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 60%, #1a1a1a 0%, var(--black) 70%);
  z-index: 0;
}

/* 鹿の画像ラップ */
.hero-deer-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-deer-img {
  width: clamp(320px, 60vw, 700px);
  height: auto;
  object-fit: contain;
  /* 墨絵を黒背景に馴染ませる */
  filter: grayscale(1) contrast(1.1) brightness(0.75);
  mix-blend-mode: luminosity;
  /* フローティングなし。首振りは JS で canvas overlay にて処理 */
  transform-origin: center 30%; /* 胴体を支点に頭だけ動かすため上寄り */
  position: relative;
  z-index: 1;
  /* ページ読み込み後に首振りクラスを付与 */
}

/* 四方向フェードオーバーレイ（合成感を消す） */
.hero-deer-fade {
  position: absolute;
  inset: 0;
  background:
    /* 上 */
    linear-gradient(to bottom, var(--black) 0%, transparent 18%),
    /* 下 */
    linear-gradient(to top, var(--black) 0%, transparent 22%),
    /* 左 */
    linear-gradient(to right, var(--black) 0%, transparent 20%),
    /* 右 */
    linear-gradient(to left, var(--black) 0%, transparent 20%);
  z-index: 2;
  pointer-events: none;
}

/* 鹿は静止 */
.deer-anim {
  animation: none;
}

/* ヒーローのコンテンツ（テキスト・ボタン） */
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  /* 鹿の上に重なる — 少し下にずらして鹿の顔を主役に */
  margin-top: 30vh;
}

.hero-sub {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--gray);
  font-weight: 400;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
}

.hero-title span:first-child {
  color: var(--white);
}
.hero-title span:last-child {
  color: var(--light);
  opacity: 0.85;
}

.hero-copy {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gray);
  font-weight: 300;
  margin-top: 0.4rem;
}

.hero-btn {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.85rem 2.6rem;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  font-weight: 500;
  color: var(--white);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.hero-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s;
}

.hero-btn:hover {
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 0 28px rgba(255,255,255,0.1);
}

.hero-btn:hover::before {
  background: rgba(255,255,255,0.05);
}

/* スクロールヒント */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 3;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--gray));
  animation: scrollLineAnim 2s ease-in-out infinite;
}

@keyframes scrollLineAnim {
  0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50%  { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}

.scroll-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--gray);
}

/* ==============================
   SECTIONS — SHARED
============================== */
.section {
  padding: 7rem 0;
}

.section-dark {
  background: #0e0e0e;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--gray);
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

/* ==============================
   REVEAL アニメーション
============================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================
   ABOUT
============================== */
#about {
  position: relative;
  overflow: hidden;
}

.about-text {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--light);
  max-width: 600px;
  font-weight: 300;
}

.about-rings {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.07);
  transform: translate(-50%, -50%);
}

.ring-1 { width: 220px; height: 220px; top: 0; left: 0; }
.ring-2 { width: 360px; height: 360px; top: 0; left: 0; opacity: 0.6; }
.ring-3 { width: 500px; height: 500px; top: 0; left: 0; opacity: 0.3; }

/* ==============================
   WORKS / CARDS
============================== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  margin-top: 3rem;
}

.card {
  padding: 2.8rem 2rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  position: relative;
  overflow: hidden;
  transition: background 0.3s, border-color 0.3s;
}

.card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.18);
}

.card-num {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--gray);
  margin-bottom: 1.2rem;
}

.card-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--white);
}

.card-desc {
  font-size: 0.82rem;
  color: var(--light);
  line-height: 1.8;
  font-weight: 300;
}

.card-line {
  position: absolute;
  bottom: 0; left: 0;
  width: 0%;
  height: 1px;
  background: rgba(255,255,255,0.4);
  transition: width 0.5s ease;
}

.card:hover .card-line { width: 100%; }

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==============================
   CONTACT
============================== */
.contact-wrap {
  text-align: center;
}

.contact-sub {
  font-size: 0.82rem;
  color: var(--gray);
  letter-spacing: 0.1em;
  margin-bottom: 2.5rem;
}

.contact-btn {
  display: inline-block;
  padding: 1rem 3.5rem;
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--white);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, letter-spacing 0.3s;
}

.contact-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 0 40px rgba(255,255,255,0.06);
  letter-spacing: 0.22em;
}

/* ==============================
   FOOTER
============================== */
#footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--gray);
  text-align: center;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 640px) {
  .section { padding: 5rem 0; }
  .container { padding: 0 1.5rem; }
  .hero-content { margin-top: 22vh; }
  .hero-deer-img { width: clamp(260px, 90vw, 400px); }
  .about-rings { display: none; }
}
