/* ============================================================
   d-obana.com 完全再現 — style.css  v5
   修正: 上部余白 / ロゴカード大きく / ヘッダー右側4行
   ============================================================ */

:root {
  --sidebar-l-w:  320px;
  --sidebar-r-w:  220px;
  --bg:           #EDEEF2;
  --sidebar-bg:   #F7F7F9;
  --text:         #1A1A1A;
  --gray:         #9A9A9A;
  --border:       #DDDDE0;
  --serif:        'Cormorant Garamond', Georgia, serif;
  --sans:         'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --content-px:   44px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  display: flex;
  height: 100vh;
  overflow: hidden;
  cursor: none;   /* カスタムカーソル使用 */
}

a      { color: inherit; text-decoration: none; }
img    { display: block; width: 100%; height: 100%; object-fit: cover; }
video  { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font-family: var(--sans); cursor: none; border: none; background: none; }

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  background: #141414;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: clip-path 1s cubic-bezier(0.76, 0, 0.24, 1);
  clip-path: inset(0 0 0 0);
}

.loader.hide {
  clip-path: inset(0 0 100% 0);
}

/* ローダーフラッシュ防止：2回目以降はローダーを即非表示 */
html.no-loader .loader                { display: none !important; }
html.no-loader .sidebar-l,
html.no-loader .content,
html.no-loader .sidebar-r            { opacity: 1; transition: none; }

.loader__num {
  font-family: var(--serif);
  font-size: clamp(64px, 14vw, 160px);
  font-weight: 300;
  color: #FAFAF8;
  letter-spacing: -0.03em;
  min-width: 3ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor {
  width: 7px;
  height: 7px;
  background: var(--text);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease),
              height .25s var(--ease),
              background .25s ease;
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(26,26,26,.4);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width .4s var(--ease),
              height .4s var(--ease),
              border-color .3s ease;
}

body.cursor-hover .cursor      { width: 14px; height: 14px; }
body.cursor-hover .cursor-ring { width: 54px; height: 54px; border-color: rgba(26,26,26,.2); }

/* ============================================================
   レイアウト初期アニメーション（ローダー後にフェードイン）
   ============================================================ */
.sidebar-l,
.content,
.sidebar-r {
  opacity: 0;
  transition: opacity .9s ease .1s;
}

body.loaded .sidebar-l,
body.loaded .content,
body.loaded .sidebar-r {
  opacity: 1;
}

/* ============================================================
   LEFT SIDEBAR
   ============================================================ */
.sidebar-l {
  width: var(--sidebar-l-w);
  min-width: var(--sidebar-l-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: .5px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  flex-shrink: 0;
  z-index: 100;
  overflow: hidden;
}

/* ── ロゴカード ── */
.logo-card {
  flex-shrink: 0;
  border: .5px solid #CCCCC8;
  padding: 22px 20px 20px;
  background: var(--sidebar-bg);
}

.logo-card__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  object-fit: contain;
  display: block;
}

.logo-card__name {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1.25;
}

.logo-card__sub {
  display: block;
  font-size: 8px;
  letter-spacing: .06em;
  color: var(--gray);
  margin-top: 14px;
  line-height: 2.1;
  text-transform: uppercase;
}

.logo-card__url {
  display: block;
  font-size: 8px;
  letter-spacing: .04em;
  color: var(--gray);
  margin-top: 10px;
  line-height: 1.9;
  text-transform: lowercase;
}

/* ── ナビ（下部固定） ── */
.sidebar-nav {
  margin-top: auto;
  flex-shrink: 0;
  border-top: .5px solid var(--border);
  padding-top: 16px;
}

.sidebar-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-nav__link {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 7px 0;
  position: relative;
  transition: color .2s ease;
}

.sidebar-nav__link:hover,
.sidebar-nav__link.active {
  color: var(--text);
}

.sidebar-nav__link.active::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: .5px;
  background: var(--text);
}

/* ============================================================
   CENTER CONTENT
   ============================================================ */
.content {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow-y: scroll;
  background: var(--bg);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.content::-webkit-scrollbar       { width: 4px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: var(--border); }

/* ============================================================
   WORK ENTRY
   ============================================================ */
.work-entry {
  padding: 28px var(--content-px) 56px;
  border-bottom: .5px solid var(--border);
}

/* ヘッダー：右側4行のみ */
.work-entry__header {
  display: flex;
  justify-content: flex-end;   /* 右寄せ */
  align-items: flex-start;
  margin-bottom: 18px;
}

.work-entry__meta {
  text-align: right;
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--gray);
  line-height: 1.9;
  flex-shrink: 0;
}

.work-entry__meta span { display: block; }

.work-entry__frame {
  position: relative;
  width: 100%;
  background: #D4D5DA;
  overflow: hidden;
}

.work-entry__frame--portrait   { aspect-ratio: 3 / 4; }
.work-entry__frame--landscape  { aspect-ratio: 4 / 3; }
.work-entry__frame--square     { aspect-ratio: 1 / 1; }
.work-entry__frame--hero-video { aspect-ratio: 16 / 9; }
.work-entry__frame--optimal    { aspect-ratio: 4 / 5; }   /* 推奨：汎用・縦横OK */
.work-entry__frame--tall       { aspect-ratio: 2 / 3; }   /* A4より少し縦長の作品向け */
.work-entry__frame--xtall      { aspect-ratio: 9 / 16; }  /* かなり縦長の作品向け */
.work-entry__frame--wide       { aspect-ratio: 16 / 9; }  /* 横長バナー・Web画像向け */
.work-entry__frame--banner     { aspect-ratio: 3 / 2; }   /* 3:2カメラ比率バナー向け */
.work-entry__frame--a4         { aspect-ratio: 1 / 1.414; } /* A4縦（1:√2）エディトリアル向け */
.work-entry__frame--ultrawide  { aspect-ratio: 2 / 1; }   /* 2:1超横長画像向け */
.work-entry__frame--superwide  { aspect-ratio: 3 / 1; }   /* 3:1サイトスクリーンショット向け */



/* ── YouTube サムネイルカード（埋め込み代替） ── */
.yt-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  text-decoration: none;
  background: #000;
  overflow: hidden;
  z-index: 1;
}
.yt-thumb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
  transition: opacity .3s;
}
.yt-thumb:hover .yt-thumb__img { opacity: .6; }
.yt-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, background .2s;
  z-index: 2;
}
.yt-thumb:hover .yt-thumb__play {
  transform: translate(-50%, -50%) scale(1.1);
  background: #fff;
}
.yt-thumb__play svg {
  width: 26px;
  height: 26px;
  margin-left: 3px; /* 視覚的中央補正 */
  fill: #222;
}
.yt-thumb__label {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  z-index: 2;
}

/* ── 作品フレームのクリッカブルオーバーレイ ── */
.work-entry__frame .work-entry__link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
}

/* contain モード：ロゴ・名刺など全体を見せたい場合 */
.work-entry__frame--contain .work-entry__img {
  object-fit: contain;
  background: var(--bg);
  padding: 12%;
} /* 横型動画用 */


/* ── YouTube iframe をフレーム内に全画面表示 ── */
.work-entry__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
}

/* ── 動画レスポンシブ切り替え ── */
.video-mobile { display: none; }

@media (max-width: 900px) {
  .work-entry__frame--hero-video { aspect-ratio: 9 / 16; } /* 縦型に切り替え */
  .video-desktop { display: none; }
  .video-mobile  { display: block; }
}

.work-entry__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
  z-index: 1;
}

.work-entry:hover .work-entry__img { transform: scale(1.02); }

.work-entry__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.work-entry__placeholder svg { opacity: .18; }

.work-entry__placeholder-label {
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gray);
  opacity: .65;
}

.work-entry__caption {
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--gray);
  line-height: 1.8;
}

/* ============================================================
   SECTION HEADER  ── 上部余白を大きく
   ============================================================ */
.section-head {
  padding: 64px var(--content-px) 20px;   /* top: 64px → 余白を大きく */
  border-bottom: .5px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 14px;
}

/* Works セクションだけ先頭なのでさらに余白を追加 */
#works .section-head {
  padding-top: 72px;
}

.section-head__num   { font-size: 9px; letter-spacing: .16em; color: var(--gray); }
.section-head__title { font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: -.01em; }

/* ============================================================
   SERVICE
   ============================================================ */
.service-list { border-top: .5px solid var(--border); }

.service-item {
  display: grid;
  grid-template-columns: 44px 1fr 1fr;
  gap: 0 24px;
  align-items: start;
  padding: 24px var(--content-px);
  border-bottom: .5px solid var(--border);
  transition: background .2s;
}

.service-item:hover { background: rgba(255,255,255,.45); }

.service-item__num  { font-size: 9px; letter-spacing: .13em; color: var(--gray); padding-top: 4px; }
.service-item__name { font-family: var(--serif); font-size: 18px; font-weight: 400; letter-spacing: -.01em; line-height: 1.2; }
.service-item__desc { font-size: 10px; letter-spacing: .03em; color: var(--gray); line-height: 2; padding-top: 3px; }

/* ============================================================
   NEWS
   ============================================================ */
.news-list { border-top: .5px solid var(--border); }

.news-item {
  display: grid;
  grid-template-columns: 104px 60px 1fr 20px;
  gap: 0 14px;
  align-items: center;
  padding: 17px var(--content-px);
  border-bottom: .5px solid var(--border);
  color: var(--text);
  transition: background .2s;
}

.news-item:hover { background: rgba(255,255,255,.45); }

.news-item__date  { font-size: 9px; letter-spacing: .1em; color: var(--gray); }
.news-item__tag   { font-size: 8px; letter-spacing: .09em; text-transform: uppercase; border: .5px solid var(--border); padding: 2px 7px; color: var(--gray); white-space: nowrap; text-align: center; }
.news-item__title { font-size: 12px; letter-spacing: .02em; font-weight: 400; }
.news-item__arrow { font-size: 12px; color: var(--gray); text-align: right; transition: transform .25s; }
.news-item:hover .news-item__arrow { transform: translateX(3px); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-body { padding: 44px var(--content-px) 72px; }

.contact-label { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--gray); margin-bottom: 20px; }

.contact-title {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 300;
  letter-spacing: -.03em;
  line-height: .95;
  margin-bottom: 36px;
}

.contact-title em { font-style: italic; }

.contact-dl { display: flex; flex-wrap: wrap; gap: 28px; }
.contact-dl dt { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--gray); margin-bottom: 4px; }
.contact-dl dd { font-size: 12px; letter-spacing: .03em; }
.contact-dl a  { border-bottom: .5px solid var(--border); padding-bottom: 2px; transition: border-color .2s; }
.contact-dl a:hover { border-color: var(--text); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 18px var(--content-px);
  border-top: .5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer__copy  { font-size: 8px; letter-spacing: .08em; color: var(--gray); }
.footer__links { display: flex; gap: 16px; }
.footer__links a { font-size: 8px; letter-spacing: .08em; color: var(--gray); transition: color .2s; }
.footer__links a:hover { color: var(--text); }

/* ============================================================
   RIGHT SIDEBAR（ボタンは右下角）
   ============================================================ */
.sidebar-r {
  width: var(--sidebar-r-w);
  min-width: var(--sidebar-r-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-left: .5px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 20px 28px 0;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-r__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sidebar-r__btn {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--gray);
  padding: 8px 0;
  transition: color .2s;
}

.sidebar-r__btn:hover { color: var(--text); }

.sidebar-r__btn--top  { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.sidebar-r__btn--prev,
.sidebar-r__btn--next { font-size: 16px; }


/* ============================================================
   WORKS サブナビ（Worksの直下にインデント表示）
   ============================================================ */
.sidebar-nav__sub {
  list-style: none;
  padding-left: 16px;
  margin: 2px 0 4px;
  border-left: .5px solid var(--border);
}

.sidebar-nav__sub-link {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 4px 0 4px 8px;
  position: relative;
  transition: color .2s ease;
}

.sidebar-nav__sub-link:hover,
.sidebar-nav__sub-link.active {
  color: var(--text);
}

.sidebar-nav__sub-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: .5px;
  background: var(--text);
}
/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  /* ── サイドバーを左固定のまま維持 ── */
  body { flex-direction: row; height: 100vh; overflow: hidden; }

  .sidebar-l {
    width: 72px;
    min-width: 72px;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    padding: 18px 0 20px;
    border-right: .5px solid var(--border);
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* ロゴはアイコンのみ、テキスト非表示 */
  .logo-card {
    border: none; padding: 0;
    display: flex; flex-direction: column; align-items: center;
    flex-shrink: 0;
  }
  .logo-card__icon { width: 40px; height: 40px; margin-bottom: 0; }
  .logo-card__name { display: none; }
  .logo-card__sub  { display: none; }
  .logo-card__url  { display: none; }

  /* ナビ：縦並び・小さめテキスト */
  .sidebar-nav { margin-top: 16px; border-top: .5px solid var(--border); padding-top: 10px; width: 100%; }
  .sidebar-nav__list { flex-direction: column; gap: 0; align-items: center; }
  .sidebar-nav__link {
    font-size: 7px; padding: 5px 2px;
    text-align: center; letter-spacing: .06em;
    writing-mode: horizontal-tb;
  }
  .sidebar-nav__link.active::before { display: none; }
  .sidebar-nav__sub { display: none; } /* サブナビはモバイルでは非表示 */

  /* コンテンツはスクロール可能に */
  .content { height: 100vh; overflow-y: auto; scrollbar-gutter: auto; flex: 1; min-width: 0; }
  .sidebar-r { display: none; }

  :root { --content-px: 14px; }

  #works .section-head { padding-top: 36px; }
  .section-head { padding-top: 36px; }
  .work-entry { padding-bottom: 40px; }
  .service-item { grid-template-columns: 30px 1fr; }
  .service-item__desc { grid-column: 2; margin-top: 6px; }
  .news-item { grid-template-columns: 80px 1fr 18px; }
  .news-item__tag { display: none; }
}
