/* ================================================
   TERAKAWA Photo Office — Common Stylesheet
   全ページ共通のデザインシステム
   ================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #141414;
  --ink-2: #3a3a3a;
  --ink-soft: #6b6b6b;
  --ink-mute: #9e9e9e;
  --line: #e4e2dc;
  --line-soft: #efede7;
  --paper: #fbfaf7;
  --paper-warm: #f5f2ea;
  --accent: #8a7244;
  --accent-dark: #6d5a33;
  --accent-soft: #c4b18a;

  --serif-jp: 'Noto Serif JP', serif;
  --serif-en: 'EB Garamond', serif;
  --sans: 'Inter', 'Noto Serif JP', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ===== TOPBAR ===== */
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 10px 40px;
  font-size: 11px;
  letter-spacing: 0.15em;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;
}
.topbar-left {
  font-family: var(--serif-jp);
  font-weight: 300;
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  letter-spacing: 0.18em;
  justify-self: start;
}
.topbar-center {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-center::before,
.topbar-center::after {
  content: '';
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,0.2);
}
.topbar-center-label {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  white-space: nowrap;
}
.topbar-right {
  justify-self: end;
}
.topbar a {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: 0.1em;
  display: inline-flex;
  gap: 14px;
  align-items: center;
}
.topbar a + a { padding-left: 14px; border-left: 1px solid rgba(255,255,255,0.2); }

/* Portfolio PDF DL Button */
.portfolio-dl {
  display: inline-flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 6px 16px !important;
  border: 1px solid var(--accent-soft) !important;
  color: var(--accent-soft) !important;
  transition: all 0.4s !important;
  font-family: var(--serif-en) !important;
  font-style: italic;
  letter-spacing: 0.2em !important;
  font-size: 11px !important;
  text-transform: uppercase;
  position: relative;
}
.portfolio-dl:hover {
  background: var(--accent-soft) !important;
  color: var(--ink) !important;
}
.portfolio-dl .dl-icon {
  display: inline-block;
  font-weight: 500;
  font-style: normal;
  transition: transform 0.4s;
}
.portfolio-dl:hover .dl-icon {
  transform: translateY(2px);
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 38px;
  left: 0; right: 0;
  z-index: 100;
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s;
  min-height: 78px;
  box-sizing: border-box;
}
header.scrolled { padding: 16px 40px; min-height: 64px; }
.logo-wrap { display: flex; align-items: center; gap: 18px; }
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.logo img {
  height: 30px;
  width: auto;
  display: block;
  vertical-align: middle;
  transition: height 0.4s;
}
header.scrolled .logo img { height: 24px; }
.logo-tag {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.2em;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  line-height: 1;
  display: flex;
  align-items: center;
}
nav ul { list-style: none; display: flex; gap: 36px; align-items: center; line-height: 1; }
nav a { font-family: var(--serif-en); font-style: italic; font-size: 14px; letter-spacing: 0.2em; color: var(--ink-2); text-decoration: none; position: relative; padding: 4px 0; line-height: 1; }
nav a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width 0.4s cubic-bezier(0.7, 0, 0.3, 1); }
nav a:hover::after { width: 100%; }
nav a.active::after { width: 100%; }
.cta-btn {
  background: var(--ink) !important;
  color: #fff !important;
  padding: 12px 26px;
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-size: 11px !important;
  letter-spacing: 0.25em !important;
  text-transform: uppercase;
  transition: background 0.3s !important;
}
.cta-btn:hover { background: var(--accent-dark) !important; }
.cta-btn::after { display: none !important; }

/* ===== SECTION BASE ===== */
.sec-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.sec-label {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.sec-label::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--accent);
  transition: width 1.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s;
  transform-origin: left;
}
.reveal:not(.visible) .sec-label::before,
.reveal-left:not(.visible) .sec-label::before,
.reveal-right:not(.visible) .sec-label::before {
  width: 0;
}
.sec-title {
  font-family: var(--serif-jp);
  font-weight: 300;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: 0.06em;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}
.sec-title em {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--accent-dark);
  font-weight: 400;
  white-space: nowrap;
}
.sec-sub {
  font-family: var(--serif-jp);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 2.2;
  letter-spacing: 0.05em;
  max-width: 660px;
  margin-top: 24px;
}

/* ===== PAGE HERO（下層共通） ===== */
.page-hero {
  padding: 180px 40px 100px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.page-hero-num {
  position: absolute;
  top: 80px;
  right: 40px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: clamp(80px, 12vw, 160px);
  font-weight: 300;
  color: var(--line);
  line-height: 1;
  letter-spacing: -0.02em;
  z-index: 0;
  user-select: none;
}
.page-hero-eyebrow {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.page-hero-eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--accent);
}
.page-hero-title {
  font-family: var(--serif-jp);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.35;
  letter-spacing: 0.06em;
  margin-bottom: 32px;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}
.page-hero-title em {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--accent-dark);
  font-weight: 400;
}
.page-hero-lead {
  font-family: var(--serif-jp);
  font-size: 16px;
  line-height: 2.1;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  max-width: 720px;
}
.breadcrumb {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.2em;
  margin-bottom: 32px;
}
.breadcrumb a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.3s;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 10px; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 22px 44px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  transition: background 0.4s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  padding: 22px 44px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-align: center;
  border: 1px solid var(--ink);
  text-transform: uppercase;
  transition: all 0.4s;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--ink); color: #fff; }

/* ===== FOOTER CTA 共通 ===== */
.footer-cta {
  padding: 140px 40px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.footer-cta::before {
  content: 'Contact';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 240px;
  color: rgba(255,255,255,0.03);
  letter-spacing: 0.05em;
  white-space: nowrap;
  font-weight: 400;
  user-select: none;
}
.footer-cta-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.footer-cta-tag {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.5em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.footer-cta-tag::before, .footer-cta-tag::after {
  content: ''; width: 40px; height: 1px; background: currentColor;
}
.footer-cta-title {
  font-family: var(--serif-jp);
  font-weight: 200;
  font-size: clamp(28px, 3.8vw, 52px);
  line-height: 1.5;
  letter-spacing: 0.08em;
  margin-bottom: 36px;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}
.footer-cta-title em {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--accent-soft);
  font-weight: 400;
}
.footer-cta-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}
.btn-cta-main {
  background: var(--accent);
  color: #fff;
  padding: 24px 60px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  transition: background 0.4s;
}
.btn-cta-main:hover { background: var(--accent-dark); }
.btn-cta-sub {
  background: transparent;
  color: #fff;
  padding: 24px 44px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  border: 1px solid rgba(255,255,255,0.35);
  text-transform: uppercase;
  transition: all 0.4s;
}
.btn-cta-sub:hover { background: #fff; color: var(--ink); }

/* ===== FOOTER ===== */
footer.site-footer {
  background: #0a0a0a;
  color: #7a7a7a;
  padding: 70px 40px 36px;
  font-size: 12px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 28px;
}
.footer-logo {
  margin-bottom: 14px;
  line-height: 0;
}
.footer-logo img {
  height: 26px;
  width: auto;
  display: block;
}
.footer-tag {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: #9e9e9e;
  margin-bottom: 20px;
}
.footer-address {
  font-family: var(--serif-jp);
  font-size: 12px;
  line-height: 2;
  opacity: 0.75;
}
.footer-col-title {
  font-family: var(--serif-en);
  font-style: italic;
  letter-spacing: 0.35em;
  color: #fff;
  margin-bottom: 16px;
  font-size: 11px;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  color: #9e9e9e;
  text-decoration: none;
  padding: 5px 0;
  letter-spacing: 0.05em;
  font-family: var(--serif-jp);
  transition: color 0.3s, padding-left 0.3s;
}
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.55;
}

/* ===== FLOATING CTA ===== */
.floating-cta {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99;
  background: var(--ink);
  color: #fff;
  padding: 18px 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s;
  border: 1px solid var(--accent);
}
.floating-cta.show { opacity: 1; transform: translateY(0); }
.floating-cta:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ===== REVEAL ANIMATION - Enhanced ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s cubic-bezier(0.22, 0.61, 0.36, 1), transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* 段階的に出現するフェード系バリエーション */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1.6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 1.6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.8s cubic-bezier(0.22, 0.61, 0.36, 1), transform 1.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* arflex風のマスク解除テキスト（下から上へ現れる） */
.reveal-mask {
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.reveal-mask-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal-mask.visible .reveal-mask-inner {
  transform: translateY(0);
}

/* arflex風の微細な上下浮遊 */
@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.subtle-float {
  animation: subtleFloat 6s ease-in-out infinite;
}

/* 文字の段階表示（ヒーロー等に使用） */
.reveal-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(0.22, 0.61, 0.36, 1), transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal-char.visible { opacity: 1; transform: translateY(0); }

/* 区切り線の左→右アニメ */
.line-reveal {
  position: relative;
  overflow: hidden;
}
.line-reveal::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width 1.6s cubic-bezier(0.7, 0, 0.3, 1);
}
.line-reveal.visible::before {
  width: 100%;
}

/* パララックス用のラッパー */
.parallax-wrap {
  overflow: hidden;
  position: relative;
}
.parallax-img {
  will-change: transform;
}

/* 画像のスクロールズーム（arflex風、より控えめに） */
.scroll-zoom {
  overflow: hidden;
}
.scroll-zoom-inner {
  width: 100%;
  height: 100%;
  transition: transform 2s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: scale(1.04);
  will-change: transform;
}
.scroll-zoom.visible .scroll-zoom-inner {
  transform: scale(1);
}

/* arflex風のリンクホバー（下線が左から右へすっと伸びる） */
.hover-line {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.hover-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hover-line:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

html {
  scroll-behavior: smooth;
}

/* セクション左端のアクセントバー */
.section-accent {
  position: absolute;
  top: 0;
  left: 40px;
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 1.4s, transform 1.4s;
}
.section-accent.visible { opacity: 0.5; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .topbar {
    padding: 6px 12px;
    font-size: 9px;
    grid-template-columns: 1fr auto;
  }
  .topbar-left {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .topbar-center { display: none; }
  .topbar-right { }
  .portfolio-dl {
    padding: 4px 10px !important;
    font-size: 9px !important;
    letter-spacing: 0.15em !important;
  }

  header { padding: 14px 20px; top: 32px; }
  header.scrolled { padding: 10px 20px; }
  .logo img { height: 24px; }
  header.scrolled .logo img { height: 22px; }
  .logo-tag { display: none; }
  nav ul li:not(:last-child) { display: none; }

  .page-hero { padding: 130px 24px 70px; }
  .page-hero-num { top: 40px; right: 20px; font-size: 72px; }

  section, .footer-cta { padding: 80px 24px !important; }

  .footer-cta::before { font-size: 120px; top: 40px; }
  .footer-cta-actions { flex-direction: column; gap: 14px; }
  .btn-cta-main, .btn-cta-sub { padding: 22px 36px; }

  footer.site-footer { padding: 50px 24px 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 12px; }

  .floating-cta { bottom: 16px; right: 16px; padding: 14px 20px; font-size: 11px; letter-spacing: 0.2em; }
}
