
/* ========== Base Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'EB Garamond', serif;
  background: #f9f9f9;
  color: #222831;
  overflow-x: hidden;
  position: relative;
  height: 100vh;
}

/* ========== Variables ========== */
:root{
  /* CONTACT circle */
  --contact-size: 180px;          /* 丸の直径 */
  --contact-overlap: 60px;        /* フッターに重ねる量（＋で深く被る） */
  --contact-bg: #ffffff;          /* 丸の背景 */
  --contact-text: #4a4a4a;        /* 円周文字の色 */
}

/* ========== Preloader ========== */
#preloader {
  position: fixed;
  inset: 0;
  background: #1E1E1E;
  color: #fff;
  display: flex;
  flex-direction: column;
  place-content: center;
  place-items: center;
  z-index: 9999;
  font-size: 1.5rem;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1.2s ease;
}
#preloader.loaded { transform: translateY(-100%); opacity: 0; }
#loading-text { margin-top: 20px; font-size: 1.2rem; animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ========== Hero ========== */
@keyframes marquee { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

.hero {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  height: 100vh;
  padding: 40px 5%;
  position: relative;
  border-left: 1px solid #222831;
  border-right: 1px solid #222831;
  background: #f9f9f9;
}
.hero-left, .hero-right {
  width: 100%;
  max-width: 50%;
  position: relative;
}
.marquee-wrapper, .description-wrapper {
  width: 100%; overflow: hidden; position: relative; white-space: nowrap;
}
.marquee-text, .description-text {
  display: inline-block; padding-right: 50px; animation: marquee 20s linear infinite;
}
.marquee-text { font-size: 6vw; font-weight: 700; }
.description-text { margin-top: 20px; font-size: 1rem; font-weight: 400; }

.hero-left h1 {
  font-size: 10vw; font-weight: 700; letter-spacing: .02em; white-space: nowrap; transform: translateX(-10%);
}
.hero-left .greeting { font-size: 1.2rem; margin-bottom: 20px; color: #555; }
.hero-left .description {
  font-size: .8rem; position: absolute; bottom: 60px; left: 20px; right: 20px; text-align: center;
}
.hero-right { text-align: right; font-size: 8vw; color: rgba(0,0,0,.07); font-weight: 400; }
.hero-right .reflect {
  font-size: .8rem; color: #777; position: absolute; bottom: 60px; right: 20px;
}
.vertical-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #999; }

/* ========== Global FX ========== */
.fade-in { opacity: 0; transform: translateY(40px) scale(.95); transition: opacity .8s ease-out, transform .8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0) scale(1); }

/* ========== Nav / Buttons ========== */
nav { position: absolute; top: 40px; right: 40px; text-align: right; }
nav a {
  display: block; text-decoration: none; color: #222831; font-size: .9rem; margin-bottom: 8px; transition: color .3s;
}
nav a:hover { color: #4C9F70; }

.button-container {
  position: absolute; bottom: 40px; width: 100%; display: flex; justify-content: space-around;
}
.oval-button {
  border: 1px solid #222831; border-radius: 50px; padding: 12px 28px; background: none;
  font-size: .9rem; cursor: pointer; transition: all .3s;
}
.oval-button:hover { background: #4C9F70; color: #fff; border-color: #4C9F70; }

/* ========== Floating menu trigger ========== */
.circle-scroll {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 60px; background: #4C9F70; border-radius: 50%;
  display: flex; justify-content: center; align-items: center; cursor: pointer;
  z-index: 999; transition: background .3s; animation: float 3s ease-in-out infinite;
}
.circle-scroll:hover { background: #777; }
@keyframes float { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-10px)} }

.floating-menu {
  position: fixed; bottom: 140px; left: 50%; transform: translateX(-50%);
  display: none; gap: 20px; z-index: 9998; flex-direction: row;
}
.floating-menu a {
  text-decoration: none; color: #222831; background: #f9f9f9; padding: 15px 20px; border-radius: 50%;
  font-weight: 700; font-size: 1rem; box-shadow: 0 5px 15px rgba(0,0,0,.1); transition: all .3s ease;
}
.floating-menu a:hover { background: #4C9F70; color: #fff; }

/* ========== WORKS ========== */
.works-section {
  position: relative; background: #1E1E1E; color: #f9f9f9; padding: 100px 40px; overflow: hidden;
}
.works-background-text {
  position: absolute; top: 50%; right: 20px; transform: translateY(-50%) rotate(90deg); transform-origin: right center;
  font-size: 20vw; color: rgba(255,255,255,.02); pointer-events: none; user-select: none; font-weight: 700; white-space: nowrap;
}
.works-title { font-size: 2rem; margin-bottom: 40px; position: relative; z-index: 2; }
.works-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; position: relative; z-index: 2;
}
.work-card { overflow: hidden; position: relative; }
.work-card img { width: 100%; border-radius: 10px; margin-bottom: 10px; transition: transform .5s ease; }
.work-card:hover img { transform: scale(1.05); }
.work-card h3 { font-size: 1.5rem; margin-bottom: 5px; }
.work-card p { font-size: .9rem; color: #999; }

.works-refined-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 60px; position: relative; z-index: 2;
}
.work-refined-item { display: flex; flex-direction: column; gap: 20px; }
.work-text-block { text-align: left; }
.work-title { font-size: 1.5rem; font-weight: 700; }
.work-date { font-size: .9rem; color: #999; }
.work-image-block img { width: 100%; border-radius: 10px; cursor: pointer; transition: transform .4s ease; }
.work-image-block img:hover { transform: scale(1.03); }

/* Modal for images */
.modal {
  display: none; position: fixed; z-index: 9999; inset: 0;
  background: rgba(0,0,0,.8); justify-content: center; align-items: center;
}
.modal img { max-width: 90%; max-height: 90%; }

/* ========== ABOUT ========== */
.about-upper::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background-color: rgba(0,0,0,.05); transform: translateX(-50%); z-index: 1;
}
.about-section {
  background: #f9f9f9; color: #222831; padding: 120px 60px; position: relative; overflow: visible; z-index: 1;
}
.about-upper { position: relative; background: #f9f9f9; z-index: 1; padding-bottom: 60px; overflow: hidden; }
.about-bg-text {
  position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%);
  font-size: 20vw; line-height: 1.1; color: rgba(0,0,0,.04); font-weight: 700; font-family: 'EB Garamond', serif;
  white-space: nowrap; pointer-events: none; user-select: none; z-index: 0;
}
.about-container {
  display: flex; justify-content: flex-start; align-items: flex-start; position: relative; padding: 80px 10%;
  gap: 40px; z-index: 2;
}
.about-icon { flex-shrink: 0; margin-right: 40px; text-align: left; }
.about-circle { width: 20px; height: 20px; background-color: #4C9F70; border-radius: 50%; margin-bottom: 8px; }
.about-label { font-size: .7rem; letter-spacing: 1px; }
.about-main { max-width: 700px; width: 100%; position: relative; z-index: 2; margin: 0 auto; text-align: center; transform: translateX(-5rem); }
.about-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; text-align: center; }
.about-divider { width: 40px; height: 1px; background-color: #222831; border: none; margin: 0 auto 40px; }
.about-text { font-size: 1.2rem; line-height: 2; color: #444; text-align: left; word-break: break-word; overflow-wrap: break-word; }

/* Bio block */
.bio-section {
  background-color: #1E1E1E; color: #999; padding: 100px 60px; display: flex; justify-content: center; gap: 80px; flex-wrap: wrap;
}
.bio-left { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 300px; text-align: center; }
.bio-image img {
  width: 160px; height: 160px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.bio-name { font-size: 1.8rem; font-weight: 700; color: #fff; }
.bio-name-sub { font-size: .9rem; color: #999; }
.bio-text-block { max-width: 600px; display: flex; flex-direction: column; gap: 30px; }
.bio-subtitle { font-size: 1.2rem; font-weight: 700; color: #fff; }
.bio-text, .bio-awards { font-size: 1rem; line-height: 2; color: #999; }

/* ========== CONTACT (circle that overlaps footer) ========== */
.contact-banner {
  position: relative;               /* スタッキングベース */
  background: url('your-background.jpg') center/cover no-repeat;
  min-height: 30vh;
  display: flex; align-items: flex-end; justify-content: flex-start;
  z-index: 2;                        /* フッターより前面 */
}
.contact-bg-text {
  position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%);
  font-size: 20vw; line-height: 1.1; color: rgba(0,0,0,.04); font-weight: 700; font-family: 'EB Garamond', serif;
  white-space: nowrap; pointer-events: none; user-select: none; z-index: 0;
}
/* 左下の円ボタン（フッターに被せる） */
.scroll-contact-circle {
  position: absolute;
  left: 60px;
  bottom: calc(-1 * var(--contact-overlap));   /* ここで重なり量を制御 */
  width: var(--contact-size);
  height: var(--contact-size);
  border-radius: 50%;
  background: var(--contact-bg);
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  z-index: 9999;                                 /* 最前面に */
}

/* 円周テキスト（SVG） */
.circle-text-svg { position: absolute; inset: 0; pointer-events: none; animation: spin 14s linear infinite; }
.circle-text {
  font-family: "EB Garamond", serif; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; fill: var(--contact-text);
}
@keyframes spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }

/* 中央のリンク */
.circle-inner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: calc(var(--contact-size) - 44px); height: calc(var(--contact-size) - 44px);
  border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: inherit; font-weight: 700; z-index: 15;
}
.circle-inner::before { content:""; position:absolute; inset:0; border-radius:50%; border:1px solid rgba(0,0,0,.06); }
.contact-icon { font-size: 22px; margin-bottom: 4px; }
.contact-label { font-size: 12px; }

/* ========== FOOTER ========== */
.custom-footer {
  position: relative;                /* z-index を有効化 */
  z-index: 1;                        /* contact-banner より背面 */
  background: #1E1E1E; color: #f9f9f9;
  padding: 60px 5% 60px;             /* 初期値 */
  padding-top: calc(120px + var(--contact-overlap));  /* 円が被る分だけ上に余白を増やす */
  font-family: 'EB Garamond', serif;
}
.custom-footer-grid {
  display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; align-items: center; gap: 20px;
  text-align: center; max-width: 1200px; margin: 0 auto;
}
.footer-line { background-color: #888; width: 1px; height: 100%; opacity: .3; }
.custom-footer-left { text-align: left; padding-right: 20px; bottom: 10px;}
.footer-name { font-size: 1.8rem; font-weight: 700; }
.footer-role { font-size: .9rem; margin-top: 6px; opacity: .8; }
.custom-footer-center a, .custom-footer-right a {
  display: block; margin: 4px 0; color: #f9f9f9; font-size: .9rem; text-decoration: none; transition: color .3s ease;
}
.custom-footer-center a:hover, .custom-footer-right a:hover { color: #4C9F70; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  /* Contact circle を少し小さく＆重なり控えめに */
  :root{
    --contact-size: 150px;
    --contact-overlap: 48px;
  }
  .scroll-contact-circle { left: 24px; }

  .custom-footer-grid { grid-template-columns: 1fr; }
  .footer-line { display: none; }
  .custom-footer-left { text-align: center; padding: 0; }

  .hero { flex-direction: column; height: auto; padding: 40px; }
  .hero-left, .hero-right { max-width: 100%; text-align: center; }
  nav { position: static; margin-top: 20px; }
  .button-container { flex-direction: column; gap: 20px; position: static; margin-top: 40px; }
  .works-grid { grid-template-columns: 1fr; }
}

