/*
Theme Name: RaY Blocksy Child
Theme URI: https://ray-inc.jp/
Description: 株式会社RaY コーポレートサイト用の Blocksy 子テーマ。ヘッダー・フッターは全ページ共通、TOPページは front-page.php で完全カスタム実装。
Author: RaY
Version: 1.1.0
Template: blocksy
Text Domain: ray-blocksy-child
*/

/* =====================================================
   Design tokens
   ===================================================== */
:root {
  --white: #FFFFFF;
  --paper: #F5F5F2;
  --paper-deep: #EDEAE2;
  --ink: #0A0A0A;
  --ink-soft: #1A1A1A;
  --sub: #3A3A3A;
  --rule: #9A9A9A;
  --rule2: #D8D5CC;
  --sand: #B8A084;
  --sand-deep: #8C7457;

  --serif: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --serif-jp: 'Noto Serif JP', serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;

  --max-w: 1200px;
  --section-y: 140px;
  --ray-header-h: 80px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
}
body a { color: inherit; }

/* TOP以外のページは固定ヘッダー分の余白を確保 */
body:not(.ray-top) {
  padding-top: var(--ray-header-h);
}
body.ray-top { padding-top: 0; }
@media (max-width: 768px) {
  :root { --ray-header-h: 64px; }
}

/* =====================================================
   Blocksy標準コンテナの打ち消し（TOP / Works 共通）
   ray-fullbleed クラスが付いたページは Blocksy の幅制限やパディングを無効化。
   ※ <main class="works-page"> など自前テンプレートの要素は除外する（:not(.works-page)）。
   ===================================================== */
body.ray-fullbleed #main,
body.ray-fullbleed #main-container,
body.ray-fullbleed .ct-container,
body.ray-fullbleed .ct-container-narrow,
body.ray-fullbleed .entry-content,
body.ray-fullbleed .entry-wrapper,
body.ray-fullbleed article,
body.ray-fullbleed .ct-post,
body.ray-fullbleed .ct-main-styles,
body.ray-fullbleed main:not(.works-page):not(.ray-top-content) {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Blocksy が出すページタイトル・メタ・コメント欄等を非表示 */
body.ray-fullbleed .entry-header,
body.ray-fullbleed .ct-post-title,
body.ray-fullbleed .post-thumbnail,
body.ray-fullbleed .entry-footer,
body.ray-fullbleed .entry-meta,
body.ray-fullbleed .ct-share-box,
body.ray-fullbleed .ct-comments,
body.ray-fullbleed .ct-breadcrumbs,
body.ray-fullbleed .ct-author-box {
  display: none !important;
}

/* =====================================================
   全ページ共通：ヘッダー
   ===================================================== */
.ray-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--ray-header-h); z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px;
  background: transparent;
  border-bottom: 0;
  color: #fff;
  transition: background 280ms ease, color 280ms ease, backdrop-filter 280ms ease;
  box-sizing: border-box;
}
/* スクロール後（TOPページ）、または非TOPページのデフォルト：白背景・黒文字 */
.ray-header.is-scrolled,
.ray-header.is-solid-default {
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ray-header .ray-nav { display: flex; gap: 40px; }
.ray-header .ray-nav a {
  font: 400 11px var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}
.ray-header .ray-nav a:hover { opacity: 0.7; }
.ray-header .ray-nav a[aria-current="page"] { color: var(--sand); }
.ray-header.is-solid-default .ray-nav a[aria-current="page"] { color: var(--sand-deep); }

/* 右側グループ：ナビ + Contact ボタン + ハンバーガー */
.ray-header-end {
  display: flex; align-items: center; gap: 32px;
}

/* Contact CTA — 丸ボタン */
.ray-header .ray-cta-btn {
  display: inline-flex; align-items: center;
  padding: 10px 24px;
  border-radius: 999px;
  font: 500 11px var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  transition: background 280ms ease, color 280ms ease, opacity 200ms ease;
}
/* 透過ヘッダー（ヒーロー上、TOPページ初期状態）では白ボタン + 黒文字 */
.ray-header:not(.is-scrolled):not(.is-solid-default) .ray-cta-btn {
  background: #fff;
  color: var(--ink);
}
.ray-header .ray-cta-btn:hover { opacity: 0.85; }

.ray-logo {
  display: inline-block; position: relative;
  font: 500 28px var(--serif);
  letter-spacing: 0.04em;
  line-height: 1;
  color: inherit;
  text-decoration: none;
}
.ray-logo::after {
  content: '';
  position: absolute;
  left: 38%; bottom: -2px;
  width: 4px; height: 8px;
  background: currentColor;
  border-bottom-left-radius: 50%;
  border-bottom-right-radius: 50%;
  opacity: 0.8;
}

.ray-hamburger {
  display: none;
  width: 28px; height: 18px; position: relative; cursor: pointer;
  background: transparent; border: 0; padding: 0;
}
.ray-hamburger span {
  position: absolute; left: 0; width: 100%; height: 1px; background: currentColor;
}
.ray-hamburger span:nth-child(1) { top: 0; }
.ray-hamburger span:nth-child(2) { top: 50%; }
.ray-hamburger span:nth-child(3) { bottom: 0; }

.ray-mobile-nav {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 32px;
}
.ray-mobile-nav.is-open { display: flex; }
.ray-mobile-nav a {
  font: 500 28px var(--serif);
  letter-spacing: 0.12em;
  color: #fff;
  text-decoration: none;
}
.ray-mobile-nav-close {
  position: absolute; top: 24px; right: 24px;
  width: 32px; height: 32px; background: transparent; border: 0; cursor: pointer;
  color: #fff; font: 400 18px var(--mono);
}

/* WP管理バー対応 */
body.admin-bar .ray-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .ray-header { top: 46px; }
}

/* =====================================================
   全ページ共通：フッター
   ===================================================== */
.ray-footer {
  background: var(--ink); color: #fff;
  padding: 88px 56px 32px;
}
.ray-footer * { box-sizing: border-box; }
.ray-footer a { color: inherit; text-decoration: none; }
.ray-footer .top {
  display: grid;
  grid-template-columns: 1.3fr 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.ray-footer .brand .caption {
  margin-top: 28px;
  font: 400 12px var(--serif-jp);
  color: rgba(255,255,255,0.7);
  line-height: 2;
  letter-spacing: 0.08em;
  max-width: 260px;
}
.ray-footer .group { display: flex; gap: 48px; }
.ray-footer .col-label {
  font: 500 10px var(--mono);
  letter-spacing: 0.22em;
  color: var(--sand);
  margin-bottom: 18px;
}
.ray-footer .links { display: flex; flex-direction: column; gap: 12px; }
.ray-footer .links a {
  font: 400 13px var(--serif);
  color: #fff;
  letter-spacing: 0.06em;
}
.ray-footer .links a:hover { color: var(--sand); }
.ray-footer .contact-col {
  display: flex; flex-direction: column; gap: 8px;
  font: 400 12px var(--serif);
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
}
.ray-footer .follow { text-align: right; }
.ray-footer .follow a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font: 400 11px var(--mono);
}
.ray-footer .follow a:hover { border-color: var(--sand); color: var(--sand); }
.ray-footer .bottom {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; align-items: center;
  font: 400 10px var(--mono);
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.5);
}
.ray-footer .bottom .legal { display: flex; gap: 24px; }

/* =====================================================
   共通：Reveal アニメーション（全ページで使える）
   ===================================================== */
.ray-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms ease, transform 800ms ease;
}
.ray-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =====================================================
   TOPページ専用：セクション
   ===================================================== */
body.ray-top {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
}
body.ray-top *,
body.ray-top *::before,
body.ray-top *::after { box-sizing: border-box; }
body.ray-top a { color: inherit; text-decoration: none; }
body.ray-top img,
body.ray-top svg { display: block; max-width: 100%; }

/* HERO */
body.ray-top .hero {
  position: relative; height: 900px; overflow: hidden;
  color: #fff;
  /* 動画の到着前でも自然に見えるよう、暖色のダークグラデーションを下敷きに */
  background:
    radial-gradient(ellipse 55% 55% at 72% 38%, rgba(184,160,132,0.22) 0%, rgba(0,0,0,0) 70%),
    linear-gradient(180deg, #0a0a0a 0%, #1a1814 40%, #2b2520 70%, #0a0a0a 100%);
}
body.ray-top .hero .img,
body.ray-top .hero .img > svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
body.ray-top .hero .hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
body.ray-top .hero .overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.32); }
body.ray-top .hero .vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 600px 400px at 50% 50%, rgba(0,0,0,0.35), transparent 70%);
}
body.ray-top .hero .stack {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0 48px;
  text-align: center;
}
body.ray-top .hero-mark {
  font: 500 92px var(--serif);
  letter-spacing: 0.10em;
  line-height: 1;
}
body.ray-top .hero-tagline {
  font: italic 400 22px var(--serif);
  letter-spacing: 0.12em;
  line-height: 1.7;
  color: rgba(255,255,255,0.94);
  max-width: 720px;
}
body.ray-top .hero-rule { width: 24px; height: 1px; background: rgba(255,255,255,0.5); }
body.ray-top .hero-caption {
  font: 400 12px var(--serif-jp);
  letter-spacing: 0.16em;
  line-height: 1.9;
  color: rgba(255,255,255,0.85);
}
body.ray-top .scroll-indicator {
  position: absolute; right: 48px; bottom: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 200ms ease;
}
body.ray-top .scroll-indicator:hover { opacity: 0.7; }
body.ray-top .scroll-indicator .label { font: 400 10px var(--mono); letter-spacing: 0.3em; }
body.ray-top .scroll-indicator .line {
  position: relative;
  width: 1px; height: 64px;
  background: rgba(255,255,255,0.25);
  overflow: hidden;
}
body.ray-top .scroll-indicator .line::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 24px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.9));
  animation: ray-scroll-dot 1.8s ease-in-out infinite;
}
@keyframes ray-scroll-dot {
  0%   { transform: translateY(-24px); opacity: 0; }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translateY(64px); opacity: 0; }
}

/* INTRODUCTION */
body.ray-top .intro { background: #fff; padding: 110px 48px; text-align: center; }
body.ray-top .intro .inner { max-width: 720px; margin: 0 auto; }
body.ray-top .intro .lead {
  font: 400 21px var(--serif-jp);
  letter-spacing: 0.08em;
  line-height: 2.1;
  color: var(--ink);
  margin: 0;
}
body.ray-top .intro .sub {
  margin: 28px 0 0;
  font: 400 17px var(--serif-jp);
  letter-spacing: 0.08em;
  line-height: 2.1;
  color: var(--sub);
}
body.ray-top .intro .rule {
  width: 24px; height: 1px;
  background: var(--rule);
  margin: 48px auto 0;
}

/* ABOUT US */
body.ray-top .about {
  background: #fff;
  padding: 40px 48px 220px;
  position: relative;
  overflow: hidden;
}
body.ray-top .about .inner { position: relative; max-width: var(--max-w); margin: 0 auto; }
body.ray-top .about h2 {
  font: 800 96px var(--sans);
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 0.95;
  margin: 0;
}
body.ray-top .about .heading-tag {
  display: flex; align-items: center; gap: 16px;
  margin-top: 20px; margin-bottom: 96px;
}
body.ray-top .about .heading-tag .bar { width: 24px; height: 1px; background: var(--ink); }
body.ray-top .about .heading-tag .jp {
  font: 400 13px var(--serif-jp);
  color: var(--sub);
  letter-spacing: 0.1em;
}
body.ray-top .about .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
body.ray-top .about .card { position: relative; display: block; }
body.ray-top .about .card.offset { margin-top: 80px; }
body.ray-top .about .card-tag {
  position: absolute; left: 8px; top: -28px;
  font: 400 10px var(--mono);
  color: var(--sand);
  letter-spacing: 0.3em;
}
body.ray-top .about .card-img {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  transition: opacity 200ms ease;
}
body.ray-top .about .card-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
body.ray-top .about .card:hover .card-img { opacity: 0.85; }
body.ray-top .about .card-panel {
  position: absolute;
  left: -32px; bottom: -36px;
  background: var(--ink); color: #fff;
  padding: 28px 36px;
  min-width: 320px;
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
}
body.ray-top .about .card-panel .en {
  font: 500 34px var(--serif);
  letter-spacing: 0.08em;
  line-height: 1;
}
body.ray-top .about .card-panel .jp {
  font: 400 11px var(--serif-jp);
  opacity: 0.65;
  margin-top: 8px;
  letter-spacing: 0.18em;
}
body.ray-top .about .card-panel .arrow {
  font: 300 26px var(--serif);
  opacity: 0.85;
  transition: transform 200ms ease;
}
body.ray-top .about .card:hover .card-panel .arrow { transform: translateX(4px); }

/* WORKS */
body.ray-top .works { background: #fff; padding: 120px 48px; }
body.ray-top .works .inner { max-width: 1280px; margin: 0 auto; }
body.ray-top .works h2 {
  font: 800 56px var(--sans);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0 0 48px;
}
body.ray-top .works .rows { display: flex; flex-direction: column; gap: 12px; }
body.ray-top .works .row { display: grid; gap: 12px; }
body.ray-top .works .row-3 { grid-template-columns: repeat(3, 1fr); }
body.ray-top .works .row-2 { grid-template-columns: repeat(2, 1fr); }

body.ray-top .works .card {
  position: relative; display: block;
  overflow: hidden;
  transition: opacity 200ms ease;
}
body.ray-top .works .card:hover { opacity: 0.92; }
body.ray-top .works .card.ratio-4-5 { aspect-ratio: 4 / 5; }
body.ray-top .works .card.ratio-16-9 { aspect-ratio: 16 / 9; }
body.ray-top .works .card-img { position: absolute; inset: 0; }
body.ray-top .works .card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
body.ray-top .works .card-shade { position: absolute; inset: 0; background: rgba(0,0,0,0.22); }
body.ray-top .works .card-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  color: #fff; text-align: center; padding: 0 24px;
}
body.ray-top .works .card-en {
  font: 700 24px var(--sans);
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-shadow: 0 1px 12px rgba(0,0,0,0.45);
}
body.ray-top .works .card.ratio-16-9 .card-en { font-size: 32px; }
body.ray-top .works .card-rule { width: 20px; height: 1px; background: rgba(255,255,255,0.6); }
body.ray-top .works .card-jp {
  font: 400 11px var(--serif-jp);
  letter-spacing: 0.14em;
  line-height: 1.9;
  opacity: 0.92;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
body.ray-top .works .card.ratio-16-9 .card-jp { font-size: 13px; }
body.ray-top .works .cta-row { margin-top: 56px; display: flex; justify-content: flex-end; }

body.ray-top .text-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 11px var(--mono);
  color: var(--ink);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--sand);
}
body.ray-top .text-cta .arrow { font-size: 14px; transition: transform 200ms ease; }
body.ray-top .text-cta:hover .arrow { transform: translateX(4px); }

/* GALLERY */
body.ray-top .gallery { background: var(--paper); padding: 120px 48px; }
body.ray-top .gallery .inner { max-width: 1280px; margin: 0 auto; }
body.ray-top .gallery .head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 48px;
}
body.ray-top .gallery h2 {
  font: 800 56px var(--sans);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
}
body.ray-top .gallery .head-sub {
  font: 400 11px var(--mono);
  color: var(--sub);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
body.ray-top .gallery .rows { display: flex; flex-direction: column; gap: 16px; }
body.ray-top .gallery .row { display: flex; gap: 16px; }
body.ray-top .gallery .row.r1 { height: 320px; }
body.ray-top .gallery .row.r2 { height: 240px; }
body.ray-top .gallery .row.r3 { height: 280px; }
body.ray-top .gallery .cell {
  position: relative; height: 100%;
  overflow: hidden; display: block;
  transition: opacity 200ms ease;
}
body.ray-top .gallery .cell:hover { opacity: 0.92; }
body.ray-top .gallery .cta-row { margin-top: 48px; display: flex; justify-content: flex-end; }

/* CONTACT */
body.ray-top .contact {
  background: var(--ink); color: #fff;
  padding: 160px 48px;
  text-align: center;
  position: relative;
}
body.ray-top .contact .label {
  font: 500 11px var(--mono);
  letter-spacing: 0.32em;
  color: var(--sand);
  margin-bottom: 28px;
}
body.ray-top .contact .label-jp {
  font: 400 14px var(--serif-jp);
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.12em;
  margin-bottom: 64px;
}
body.ray-top .contact .body {
  font: 400 14px var(--serif-jp);
  color: rgba(255,255,255,0.78);
  line-height: 2.1;
  letter-spacing: 0.08em;
  max-width: 560px;
  margin: 0 auto 56px;
}
body.ray-top .contact .btn {
  display: inline-flex; align-items: center; gap: 24px;
  padding: 28px 80px;
  border: 1px solid rgba(255,255,255,0.6);
  color: #fff;
  font: 400 14px var(--serif);
  letter-spacing: 0.22em;
  transition: background 200ms ease, border-color 200ms ease;
}
body.ray-top .contact .btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.85); }
body.ray-top .contact .btn .arrow { font-size: 18px; }

/* =====================================================
   Worksページ
   ===================================================== */
body.ray-works .works-page {
  padding: 96px 96px 200px;
  max-width: 1400px;
  margin: 0 auto;
}
body.ray-works .works-page > h1 {
  font: 800 120px var(--sans);
  letter-spacing: -0.045em;
  line-height: 0.9;
  margin: 0 0 120px;
  color: var(--ink);
}

body.ray-works .works-tabs {
  display: flex;
  gap: 40px;
  align-items: flex-end;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
body.ray-works .works-tabs a {
  position: relative;
  padding: 8px 0;
  font: 400 13px var(--sans);
  letter-spacing: 0.04em;
  color: var(--rule);
  text-decoration: none;
  transition: color 200ms ease;
}
body.ray-works .works-tabs a:hover { color: var(--sub); }
body.ray-works .works-tabs a.active { color: var(--ink); }
body.ray-works .works-tabs a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: transparent;
  transition: background 200ms ease;
}
body.ray-works .works-tabs a.active::after { background: var(--ink); }

body.ray-works .works-rule {
  height: 1px;
  background: var(--rule2);
  margin-bottom: 48px;
}

body.ray-works .works-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

body.ray-works .work-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--ink);
  transition: opacity 200ms ease;
  text-decoration: none;
}
body.ray-works .work-card:hover { opacity: 0.92; }
body.ray-works .work-card-img { position: absolute; inset: 0; }
body.ray-works .work-card-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
body.ray-works .work-card-shade {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.28);
}
body.ray-works .work-card-title {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font: 700 22px var(--sans);
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
  padding: 0 16px;
}

body.ray-works .works-empty {
  grid-column: 1 / -1;
  padding: 80px 0;
  text-align: center;
  font: 400 14px var(--serif-jp);
  color: var(--sub);
  letter-spacing: 0.08em;
  line-height: 2;
}

/* ページネーション */
body.ray-works .works-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 80px;
  flex-wrap: wrap;
}
body.ray-works .works-pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font: 400 12px var(--mono);
  letter-spacing: 0.1em;
  color: var(--sub);
  border: 1px solid var(--rule2);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}
body.ray-works .works-pagination .page-link:hover {
  border-color: var(--ink);
  color: var(--ink);
}
body.ray-works .works-pagination .page-link.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1280px) {
  body.ray-works .works-page { padding: 80px 64px 180px; }
  body.ray-works .works-page > h1 { font-size: 100px; margin-bottom: 96px; }
}
@media (max-width: 1024px) {
  .ray-header { padding: 0 40px; }
  .ray-header .ray-nav { gap: 28px; }
  .ray-footer { padding: 72px 40px 28px; }

  body.ray-top .hero { height: 720px; }
  body.ray-top .hero-mark { font-size: 76px; }
  body.ray-top .hero-tagline { font-size: 19px; }
  body.ray-top .about { padding: 40px 40px 180px; }
  body.ray-top .about h2 { font-size: 72px; }
  body.ray-top .works,
  body.ray-top .gallery { padding: 96px 40px; }
  body.ray-top .works h2,
  body.ray-top .gallery h2 { font-size: 44px; }

  body.ray-works .works-page { padding: 64px 48px 160px; }
  body.ray-works .works-page > h1 { font-size: 80px; margin-bottom: 80px; }
  body.ray-works .works-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .ray-header { padding: 0 24px; }
  .ray-header .ray-nav { display: none; }
  .ray-hamburger { display: inline-block; }
  .ray-header-end { gap: 12px; }
  .ray-header .ray-cta-btn { padding: 7px 16px; font-size: 10px; letter-spacing: 0.18em; }
  .ray-footer { padding: 64px 24px 24px; }
  .ray-footer .top { grid-template-columns: 1fr; gap: 40px; }
  .ray-footer .follow { text-align: left; }
  .ray-footer .bottom { flex-direction: column; gap: 16px; align-items: flex-start; }

  body.ray-top .hero { height: 640px; }
  body.ray-top .hero-mark { font-size: 64px; }
  body.ray-top .hero-tagline { font-size: 16px; max-width: none; }
  body.ray-top .hero-caption { font-size: 11px; }
  body.ray-top .scroll-indicator { right: 24px; bottom: 24px; }
  body.ray-top .scroll-indicator .line { height: 40px; }
  body.ray-top .scroll-indicator .line::after { animation-name: ray-scroll-dot-sp; }
  @keyframes ray-scroll-dot-sp {
    0%   { transform: translateY(-24px); opacity: 0; }
    30%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { transform: translateY(40px); opacity: 0; }
  }

  body.ray-top .intro { padding: 80px 24px; }
  body.ray-top .intro .lead { font-size: 17px; line-height: 2; }
  body.ray-top .intro .sub { font-size: 15px; line-height: 2; }

  body.ray-top .about { padding: 24px 24px 140px; }
  body.ray-top .about h2 { font-size: 48px; }
  body.ray-top .about .heading-tag { margin-bottom: 56px; }
  body.ray-top .about .cards { grid-template-columns: 1fr; gap: 80px; }
  body.ray-top .about .card.offset { margin-top: 0; }
  body.ray-top .about .card-panel { left: -16px; bottom: -28px; padding: 20px 24px; min-width: 0; width: calc(100% - 48px); }
  body.ray-top .about .card-panel .en { font-size: 26px; }

  body.ray-top .works,
  body.ray-top .gallery { padding: 80px 24px; }
  body.ray-top .works h2,
  body.ray-top .gallery h2 { font-size: 36px; }
  body.ray-top .works .row-3,
  body.ray-top .works .row-2 { grid-template-columns: 1fr; }
  body.ray-top .works .card.ratio-4-5,
  body.ray-top .works .card.ratio-16-9 { aspect-ratio: 4 / 3; }
  body.ray-top .works .card-en { font-size: 22px; }
  body.ray-top .works .card.ratio-16-9 .card-en { font-size: 26px; }

  body.ray-top .gallery .head { flex-direction: column; align-items: flex-start; gap: 12px; }
  body.ray-top .gallery .row,
  body.ray-top .gallery .row.r1,
  body.ray-top .gallery .row.r2,
  body.ray-top .gallery .row.r3 {
    flex-direction: column; height: auto; gap: 12px;
  }
  body.ray-top .gallery .cell {
    width: 100% !important; height: 220px;
  }

  body.ray-top .contact { padding: 100px 24px; }
  body.ray-top .contact .btn {
    padding: 22px 32px; font-size: 12px; letter-spacing: 0.18em;
    flex-direction: column; gap: 12px;
  }

  body.ray-works .works-page { padding: 48px 24px 120px; }
  body.ray-works .works-page > h1 { font-size: 56px; margin-bottom: 56px; letter-spacing: -0.03em; }
  body.ray-works .works-tabs { gap: 24px; }
  body.ray-works .works-tabs a { font-size: 12px; }
  body.ray-works .works-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  body.ray-works .work-card-title { font-size: 16px; }
  body.ray-works .works-pagination .page-link { min-width: 36px; height: 36px; padding: 0 12px; }
}
@media (max-width: 375px) {
  body.ray-top .hero-tagline { font-size: 14px; }
  body.ray-top .hero-mark { font-size: 56px; }
  body.ray-works .works-page > h1 { font-size: 44px; }
}
