/* ============================================
   AYURA WEB DESIGN - Stylesheet
   ============================================

   TABLE OF CONTENTS
   01. Variables & Reset
   02. Lenis (smooth scroll)
   03. Base
   04. Left Rail
   05. Layout & Section Inner
   06. Reveal Animation
   07. Parallax
   08. Section Heading
   09. Header
   10. Hamburger Button
   11. Fullscreen Menu
   12. Hero
   13. Service
   14. Strengths
   15. Works
   16. Flow
   17. CTA
   18. FAQ
   19. Footer
   20. Responsive (mobile)
   ============================================ */


/* ============================================
   01. VARIABLES & RESET
   ============================================ */
:root {
  /* Colors */
  --color-bg: #F5F2ED;
  --color-bg-alt: #EFECE6;
  --color-text: #2C2825;
  --color-text-light: #6B6560;
  --color-text-muted: #9B9590;
  --color-accent: #8B7355;
  --color-accent-light: #A89070;
  --color-border: #C4BBB0;
  --color-border-light: #D9D3CB;
  --color-white: #FDFCFA;
  --color-dark: #1A1816;

  /* Fonts */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Spacing (Fibonacci-based for golden ratio feel) */
  --space-xs: 8px;
  --space-sm: 13px;
  --space-md: 21px;
  --space-lg: 34px;
  --space-xl: 55px;
  --space-2xl: 89px;
  --space-3xl: 144px;

  /* Layout */
  --rail-width: 56px;
}

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


/* ============================================
   02. LENIS (smooth scroll)
   ============================================ */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }


/* ============================================
   03. BASE
   ============================================ */
html { font-size: 16px; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.04em;
  overflow-x: hidden;
}


/* ============================================
   04. LEFT RAIL
   ============================================ */
.rail {
  position: fixed;
  left: 0; top: 0;
  width: var(--rail-width);
  height: 100vh;
  z-index: 100;
  pointer-events: none;
  border-right: 1px solid var(--color-border-light);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rail-label {
  writing-mode: vertical-rl;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--color-accent);
  transition: opacity 0.5s ease, transform 0.5s ease;
  position: absolute;
}

.rail-label.is-leaving { opacity: 0; transform: translateY(-10px); }
.rail-label.is-entering { opacity: 0; transform: translateY(10px); }

.rail-tick {
  position: absolute;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  writing-mode: vertical-rl;
}

.rail-bottom {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rail-bottom::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  display: inline-block;
  margin-bottom: 2px;
}


/* ============================================
   05. LAYOUT & SECTION INNER
   ============================================ */
.site-wrapper { margin-left: var(--rail-width); }

section {
  padding: var(--space-3xl) var(--space-xl);
  position: relative;
  overflow: hidden;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}


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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* ============================================
   07. PARALLAX
   ============================================ */
[data-parallax] {
  will-change: transform;
  /* transition は削除 — scroll毎に直接スナップさせる */
}

@media (max-width: 768px) {
  [data-parallax] {
    transform: none !important;
    will-change: auto;
  }
}

.parallax-bg-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
}

/* ============================================
   08. SECTION HEADING
   ============================================ */
.section-heading {
  margin-bottom: var(--space-2xl);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 0 var(--space-lg);
}

.section-heading-en {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--color-accent);
  grid-row: 1 / 3;
}

.section-heading-line {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  align-self: center;
}

.section-heading-ja {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  padding-bottom: 2px;
}


/* ============================================
   09. HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: var(--rail-width);
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: rgba(245, 242, 237, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
}

.logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--color-text);
  text-decoration: none;
}

.logo span {
  font-family: var(--font-mono);
  font-weight: 300;
  color: var(--color-text-muted);
  font-size: 0.6rem;
  display: block;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

body.menu-open .header {
  z-index: 250;             /* menu-overlay(150) より上 */
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

body.menu-open .logo,
body.menu-open .logo span {
  color: var(--color-white);
}

/* メニュー展開時はヘッダーをオーバーレイの上に出して × を見せる */
body.menu-open .header {
  z-index: 250;
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

body.menu-open .logo,
body.menu-open .logo span {
  color: var(--color-white);
}

/* ============================================
   10. HAMBURGER BUTTON
   ============================================ */
.hamburger {
  width: 56px;
  height: 56px;
  background: none;
  border: 1px solid var(--color-border);
  cursor: pointer;
  position: relative;
  z-index: 200;
  transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger:hover { border-color: var(--color-accent); }

.hamburger-lines {
  width: 22px;
  height: 14px;
  position: relative;
}

.hamburger-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  transition: all 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.hamburger-lines span:nth-child(1) { top: 0; }
.hamburger-lines span:nth-child(2) { top: 50%; width: 70%; transform: translateY(-50%); }
.hamburger-lines span:nth-child(3) { bottom: 0; }

body.menu-open .hamburger { border-color: var(--color-white); background: transparent; }
body.menu-open .hamburger-lines span { background: var(--color-white); }
body.menu-open .hamburger-lines span:nth-child(1) {
  top: 50%; transform: translateY(-50%) rotate(45deg);
}
body.menu-open .hamburger-lines span:nth-child(2) {
  opacity: 0;
  transform: translateY(-50%) translateX(-20px);
}
body.menu-open .hamburger-lines span:nth-child(3) {
  bottom: 50%; transform: translateY(50%) rotate(-45deg);
}


/* ============================================
   11. FULLSCREEN MENU
   ============================================ */
.menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: var(--color-dark);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.65, 0, 0.35, 1),
              visibility 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.menu-open .menu-overlay { opacity: 1; visibility: visible; }

.menu-bg-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(253,252,250,0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(253,252,250,0.04) 1px, transparent 1px);
  background-size: 55px 55px;
}

.menu-deco {
  position: absolute;
  width: 600px;
  height: 600px;
  right: -150px;
  bottom: -200px;
  border: 1px solid rgba(253,252,250,0.06);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 1.2s ease 0.3s, transform 1.2s ease 0.3s;
  transform: scale(0.8);
}

.menu-deco::before {
  content: '';
  position: absolute;
  inset: 80px;
  border: 1px solid rgba(253,252,250,0.06);
  border-radius: 50%;
}

body.menu-open .menu-deco { opacity: 1; transform: scale(1); }

.menu-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  max-width: 1200px;
  width: 100%;
  padding: 0 var(--space-2xl);
  position: relative;
  z-index: 2;
}

.menu-nav-list { list-style: none; }

.menu-nav-item {
  overflow: hidden;
  padding: var(--space-sm) 0;
}

.menu-nav-link {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 300;
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 0.04em;
  line-height: 1.15;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1), color 0.3s;
  position: relative;
}

.menu-nav-link em {
  font-style: italic;
  color: var(--color-accent-light);
  transition: color 0.3s;
}

.menu-nav-link::before {
  content: attr(data-num);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(253,252,250,0.3);
  letter-spacing: 0.2em;
  position: absolute;
  top: 12px;
  left: -50px;
  font-style: normal;
}

.menu-nav-link:hover { color: var(--color-accent-light); }
.menu-nav-link:hover em { color: var(--color-white); }

body.menu-open .menu-nav-link { transform: translateY(0); }
body.menu-open .menu-nav-item:nth-child(1) .menu-nav-link { transition-delay: 0.3s; }
body.menu-open .menu-nav-item:nth-child(2) .menu-nav-link { transition-delay: 0.38s; }
body.menu-open .menu-nav-item:nth-child(3) .menu-nav-link { transition-delay: 0.46s; }
body.menu-open .menu-nav-item:nth-child(4) .menu-nav-link { transition-delay: 0.54s; }
body.menu-open .menu-nav-item:nth-child(5) .menu-nav-link { transition-delay: 0.62s; }
body.menu-open .menu-nav-item:nth-child(6) .menu-nav-link { transition-delay: 0.7s; }

.menu-aside {
  padding-left: var(--space-xl);
  border-left: 1px solid rgba(253,252,250,0.1);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.8s ease 0.7s, transform 0.8s ease 0.7s;
}

body.menu-open .menu-aside { opacity: 1; transform: translateX(0); }

.menu-aside-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-accent-light);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.menu-aside-text {
  font-size: 0.85rem;
  line-height: 2.2;
  color: rgba(253,252,250,0.65);
  margin-bottom: var(--space-lg);
}

.menu-aside-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(253,252,250,0.3);
  letter-spacing: 0.15em;
  line-height: 2.4;
}

.menu-aside-meta a {
  color: rgba(253,252,250,0.5);
  text-decoration: none;
  transition: color 0.3s;
}

.menu-aside-meta a:hover { color: rgba(253,252,250,0.85); }


/* ============================================
   12. HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 38.2% 61.8%;
  align-items: center;
  padding: 0 var(--space-xl) 0 0;
  position: relative;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--color-border-light) 1px, transparent 1px),
    linear-gradient(0deg, var(--color-border-light) 1px, transparent 1px);
  background-size: 55px 55px;
  opacity: 0.25;
}

/* --- LEFT: COPY --- */
.hero-copy {
  position: relative;
  z-index: 4;
  padding-left: var(--space-2xl);
}

.hero-en {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.06;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.hero-en em { font-style: italic; color: var(--color-accent); }

.hero-ja {
  font-size: 0.92rem;
  font-weight: 200;
  letter-spacing: 0.25em;
  color: var(--color-text-light);
  position: relative;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.hero-ja::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--space-lg);
  height: 1px;
  background: var(--color-accent);
}

.hero-meta {
  list-style: none;
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  padding: 0;
}

.hero-meta li {
 font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--color-text-light);
  position: relative;
  padding-left: var(--space-md);
}
.hero-meta li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--color-accent);
}


/* --- RIGHT: STAGE --- */
.hero-stage {
  position: relative;
  z-index: 2;
  padding-left: var(--space-md);
}

.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 70vh;
  margin-left: auto;
}

.hero-slides {
  position: absolute;
  inset: 0;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hero-slide.is-active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
    image-rendering: -webkit-optimize-contrast; /* 追加。Chromeでのスケール時の劣化軽減 */

}

/* Slide indicators (dashes) */
.hero-slide-nav {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  gap: var(--space-xs);
  z-index: 5;
}

.hero-slide-nav button {
  width: 28px;
  height: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.hero-slide-nav button::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--color-border);
  transition: background-color 0.4s;
}

.hero-slide-nav button.is-active::before { background: var(--color-accent); }

/* Caption */
.hero-caption {
  position: absolute;
  right: calc(-1 * var(--space-md));
  bottom: calc(-1 * var(--space-lg));
  background: var(--color-bg);
  padding: var(--space-md) var(--space-lg);
  border-left: 1px solid var(--color-border);
  min-width: 220px;
  text-align: right;
  z-index: 6;
}

.hero-caption-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--color-text);
}

.hero-caption-genre {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-top: 4px;
}

.hero-caption-date {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
  margin-top: var(--space-sm);
}

.hero-caption-url {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Decorative SVGs */
.hero-deco-circle {
  position: absolute;
  top: calc(-1 * var(--space-xl));
  left: calc(-1 * var(--space-xl));
  width: 180px;
  height: 180px;
  color: var(--color-accent);
  opacity: 0.55;
  z-index: 4;
  pointer-events: none;
}

.hero-deco-circle svg { width: 100%; height: 100%; }

.hero-deco-figure {
  position: absolute;
  bottom: calc(-1 * var(--space-lg));
  left: calc(-1 * var(--space-2xl));
  width: 200px;
  z-index: 7;
  pointer-events: none;
}

.hero-deco-figure img { width: 100%; display: block; }

.hero-shape-1 {
  width: 200px; height: 200px;
  border: 1px solid var(--color-border-light);
  border-radius: 50%;
  top: 15%; right: 10%;
}

.hero-shape-2 {
  width: 80px; height: 80px;
  border: 1px solid var(--color-accent-light);
  bottom: 25%; right: 35%;
  opacity: 0.3;
  transform: rotate(45deg);
}


/* ============================================
   13. SERVICE
   ============================================ */
.service {
  background: var(--color-white);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.service-content {
  display: grid;
  grid-template-columns: 61.8% 38.2%;
  gap: var(--space-xl);
  align-items: start;
}

.service-body p {
  margin-bottom: 1.8em;
  font-size: 0.92rem;
  line-height: 2.3;
  color: var(--color-text);
  font-weight: 300;
}

.service-body p:last-child { margin-bottom: 0; }

.service-aside {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.service-decoration {
  width: 180px; height: 180px; position: relative;
}

.service-decoration::before {
  content: '';
  position: absolute; inset: 0;
  border: 1px solid var(--color-border-light);
  border-radius: 50%;
}

.service-decoration::after {
  content: '';
  position: absolute; inset: var(--space-md);
  border: 1px solid var(--color-border-light);
  border-radius: 50%;
}

.service-decoration-inner {
  position: absolute; inset: var(--space-lg);
  border: 1px solid var(--color-border-light);
  border-radius: 50%;
}

.service-decoration-dot {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-accent-light);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.service-shape-1 {
  width: 300px; height: 300px;
  border: 1px solid var(--color-border-light);
  top: -100px; left: -100px;
  opacity: 0.4;
}


.service-aside-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-aside-inner img {
  max-width: 280px;
  width: 100%;
  height: auto;
  opacity: 0.9;
}

/* ============================================
   14. STRENGTHS
   ============================================ */
.strengths { background: var(--color-bg); }

.strengths-intro {
  max-width: 560px;
  margin-bottom: var(--space-2xl);
  font-size: 0.92rem;
  line-height: 2.3;
  color: var(--color-text);
}

.strengths-list {
  display: grid;
  gap: var(--space-xl);
}

.strength-item {
  display: grid;
  grid-template-columns: auto 38.2% 1fr;
  gap: var(--space-lg);
  align-items: start;
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border-light);
}

.strength-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.strength-number {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  padding-top: 4px;
  min-width: 48px;
}

.strength-title-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.strength-title-en {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-accent);
  letter-spacing: 0.08em;
}

.strength-title {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: var(--color-text);
}

.strength-desc {
  font-size: 0.88rem;
  line-height: 2.2;
  color: var(--color-text-light);
  padding-top: 6px;
}

.strengths-shape-1 {
  width: 400px; height: 400px;
  border: 1px solid var(--color-border-light);
  border-radius: 50%;
  bottom: -180px; right: -150px;
  opacity: 0.5;
}


/* ============================================
   15. WORKS
   ============================================ */
.works { background: var(--color-bg-alt); }

.works-grid {
  display: grid;
  grid-template-columns: 61.8% calc(38.2% - var(--space-md));
  grid-template-rows: auto auto;
  gap: var(--space-md);
}

.work-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  background: var(--color-bg);
  cursor: pointer;
  display: block;             /* ← 追加 */
  text-decoration: none;       /* ← 追加 */
  color: inherit;              /* ← 追加 */
}

.work-item:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
  aspect-ratio: 4 / 3;
}

.work-item:nth-child(2), .work-item:nth-child(3) {
  aspect-ratio: 16 / 10;
}

.work-item-image {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0, 0.25, 1);
}

.work-item:hover .work-item-image { transform: scale(1.03); }

.work-item-overlay {
  position: absolute; inset: 0;
  background: rgba(44, 40, 37, 0.78);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  opacity: 0;
  transition: opacity 0.4s;
}

.work-item:hover .work-item-overlay { opacity: 1; }

.work-item-name {
  font-size: 0.9rem; font-weight: 400;
  color: var(--color-white);
  letter-spacing: 0.06em;
}

.work-item-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(253, 252, 250, 0.5);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.work-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-border);
  position: absolute; inset: 0;
}

.works-more { margin-top: var(--space-xl); text-align: right; }

.link-arrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--color-text-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: color 0.3s;
}

.link-arrow::after {
  content: '';
  display: block;
  width: var(--space-lg); height: 1px;
  background: var(--color-accent);
  transition: width 0.3s;
}

.link-arrow:hover { color: var(--color-text); }
.link-arrow:hover::after { width: var(--space-xl); }


/* ============================================
   16. FLOW
   ============================================ */
.flow {
  background: var(--color-white);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.flow-steps {
  position: relative;
  padding-left: var(--space-2xl);
}

.flow-steps::before {
  content: '';
  position: absolute;
  left: var(--space-md);
  top: 0; bottom: 0;
  width: 1px;
  background: var(--color-border-light);
}

.flow-step {
  position: relative;
  padding-bottom: var(--space-xl);
  display: grid;
  grid-template-columns: 61.8% 38.2%;
  gap: var(--space-md);
  align-items: start;
}

.flow-step:last-child { padding-bottom: 0; }

.flow-step::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-2xl) + var(--space-md) - 4px);
  top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  background: var(--color-white);
  z-index: 1;
}

.flow-step-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.flow-step-number {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

.flow-step-title {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.flow-step-desc {
  font-size: 0.82rem;
  color: var(--color-text-light);
  line-height: 2;
}


/* ============================================
   17. CTA
   ============================================ */
.cta {
  background: var(--color-dark);
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  overflow: hidden;
}

.cta-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 500px; height: 500px;
  border: 1px solid rgba(253,252,250,0.04);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cta-text {
  font-size: 0.95rem;
  font-weight: 200;
  letter-spacing: 0.2em;
  color: rgba(253, 252, 250, 0.6);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 2;
}

.cta-button {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--color-white);
  text-decoration: none;
  padding: var(--space-sm) var(--space-xl);
  border: 1px solid rgba(253, 252, 250, 0.2);
  transition: all 0.4s;
  position: relative;
  z-index: 2;
}

.cta-button:hover {
  background: var(--color-white);
  color: var(--color-dark);
}


/* ============================================
   18. FAQ
   ============================================ */
.faq { background: var(--color-bg); }

.faq-list { max-width: calc(1080px * 0.618); }

.faq-item { border-bottom: 1px solid var(--color-border-light); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  text-align: left;
  line-height: 1.7;
  transition: color 0.3s;
}

.faq-question:hover { color: var(--color-accent); }

.faq-q-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-accent);
  flex-shrink: 0;
  width: var(--space-lg);
}

.faq-q-text { flex: 1; }

.faq-toggle {
  flex-shrink: 0;
  width: var(--space-lg);
  height: var(--space-lg);
  position: relative;
  transition: transform 0.3s;
}

.faq-toggle::before, .faq-toggle::after {
  content: '';
  position: absolute;
  background: var(--color-border);
  transition: all 0.3s;
}

.faq-toggle::before {
  top: 50%; left: 25%; right: 25%;
  height: 1px;
  transform: translateY(-50%);
}

.faq-toggle::after {
  left: 50%; top: 25%; bottom: 25%;
  width: 1px;
  transform: translateX(-50%);
}

.faq-item.is-open .faq-toggle::after {
  transform: translateX(-50%) scaleY(0);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 0 0 calc(var(--space-lg) + var(--space-md));
}

.faq-item.is-open .faq-answer {
  max-height: 300px;
  padding-bottom: var(--space-lg);
}

.faq-answer-inner {
  font-size: 0.82rem;
  color: var(--color-text-light);
  line-height: 2.2;
}


/* ============================================
   19. FOOTER
   ============================================ */
.footer {
  background: var(--color-dark);
  color: rgba(253, 252, 250, 0.5);
  padding: var(--space-xl);
  display: grid;
  grid-template-columns: 61.8% 38.2%;
  gap: var(--space-lg);
  align-items: end;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(253, 252, 250, 0.65);
}

.footer-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 200;
  margin-top: 4px;
  letter-spacing: 0.08em;
  color: rgba(253, 252, 250, 0.3);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(253, 252, 250, 0.2);
  margin-top: var(--space-md);
}

.footer-right { text-align: right; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  justify-content: flex-end;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(253, 252, 250, 0.35);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.3s;
}

.footer-links a:hover { color: rgba(253, 252, 250, 0.75); }


/* ============================================
   20. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root { --rail-width: 40px; }

  section { padding: var(--space-2xl) var(--space-lg); }
  .header { padding: var(--space-sm) var(--space-md); }
  .hamburger { width: 44px; height: 44px; }

.hero {
  grid-template-columns: 1fr;
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
  gap: var(--space-xl);
  min-height: auto;
}
.hero-copy { padding-left: 0; }
.hero-en { font-size: 2.6rem; }
.hero-ja { margin-bottom: var(--space-lg); }
.hero-meta { gap: var(--space-md); }
.hero-stage { padding-left: 0; }
.hero-slider { max-height: 50vh; }
.hero-caption {
  position: static;
  border-left: none;
  border-top: 1px solid var(--color-border);
  text-align: left;
  padding: var(--space-md) 0 0;
  min-width: 0;
  margin-top: var(--space-md);
  background: transparent;
}
.hero-deco-circle { width: 100px; height: 100px; top: -20px; left: -20px; }
.hero-deco-figure { width: 120px; left: -30px; bottom: -20px; }

  .section-heading-en { font-size: 2.2rem; }

  .service-content { grid-template-columns: 1fr; }
  .service-aside { display: none; }

  .strength-item { grid-template-columns: auto 1fr; gap: var(--space-md); }
  .strength-desc { grid-column: 1 / 3; padding-top: var(--space-sm); }

  .works-grid { grid-template-columns: 1fr; }
  .work-item:nth-child(1) { grid-row: auto; aspect-ratio: 16 / 10; }

  .flow-step { grid-template-columns: 1fr; }

  .faq-list { max-width: 100%; }

  .footer { grid-template-columns: 1fr; gap: var(--space-lg); }
  .footer-right { text-align: left; }
  .footer-links { justify-content: flex-start; }

  .rail-label { font-size: 0.65rem; letter-spacing: 0.3em; }

  

  /* === MENU OVERLAY === */
  .menu-overlay {
    overflow-y: auto;
    align-items: flex-start;
    padding: 80px var(--space-lg) var(--space-xl);
    -webkit-overflow-scrolling: touch;
  }

  .menu-deco {
    width: 360px;
    height: 360px;
    right: -120px;
    bottom: -120px;
  }
  .menu-deco::before { inset: 50px; }

  .menu-bg-grid { background-size: 36px 36px; }

  .menu-inner {
    grid-template-columns: 1fr;
    padding: 0;
    gap: var(--space-xl);
    width: 100%;
  }

  .menu-nav-list { padding: 0; margin: 0; }

  .menu-nav-item { padding: var(--space-xs) 0; }

  .menu-nav-link {
    font-size: 2rem;
    line-height: 1.2;
    padding-left: 36px;
    position: relative;
  }

  .menu-nav-link::before {
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 0.6rem;
    margin: 0;
    display: block;
  }

  .menu-aside {
    padding-left: 0;
    padding-top: var(--space-lg);
    border-left: none;
    border-top: 1px solid rgba(253,252,250,0.1);
  }

  .menu-aside-text { font-size: 0.8rem; line-height: 2; }
  .menu-aside-meta { font-size: 0.6rem; }

  
  
  /* === HERO META (3点情報が窮屈なら) === */
  .hero-meta {
    gap: var(--space-sm) var(--space-md);
    flex-direction: column;
  }

  /* === HERO CAPTION 位置調整 === */
  .hero-caption {
    position: static;
    border-left: none;
    border-top: 1px solid var(--color-border);
    text-align: left;
    padding: var(--space-md) 0 0;
    min-width: 0;
    margin-top: var(--space-md);
    background: transparent;
  }

  /* === HERO 装飾SVG 小さく === */
  .hero-deco-circle { width: 90px; height: 90px; top: -16px; left: -16px; }
  .hero-deco-figure { width: 100px; left: -20px; bottom: -16px; }
  .hero-slide-nav { top: var(--space-sm); right: var(--space-sm); }
  .hero-slide-nav button { width: 20px; }

  /* === SECTION HEADING === */
  .section-heading { gap: 0 var(--space-md); }
  .section-heading-en { font-size: 2rem; }
  .section-heading-ja { font-size: 0.7rem; letter-spacing: 0.15em; }

  /* === WORK DETAIL === */
  .work-meta-row {
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    font-size: 0.65rem;
  }
  .work-hero { padding: var(--space-2xl) var(--space-lg) var(--space-lg); }
  .work-body { padding: var(--space-lg) var(--space-lg) var(--space-2xl); }
  .work-visit-btn {
    width: 100%;
    justify-content: center;
    padding: var(--space-md);
  }
  .work-pager { padding: var(--space-lg); }

  /* === WORKS ARCHIVE === */
  .works-archive-head { padding: var(--space-2xl) var(--space-lg) var(--space-lg); }
  .works-archive-list { padding: var(--space-lg) var(--space-lg) var(--space-2xl); }
  .works-filter { gap: var(--space-sm) var(--space-md); }
  .works-filter-link { font-size: 0.65rem; }

  /* === CONTACT === */
  .contact-hero { padding: var(--space-2xl) var(--space-lg) var(--space-lg); }
  .contact-form-section { padding: var(--space-lg) var(--space-lg) var(--space-2xl); }
  .contact-form-wrap .wpcf7-submit {
    width: 100%;
    padding: var(--space-md);
    font-size: 0.9rem;
  }
  .contact-form-wrap .cf-submit { text-align: center; }

  /* === DEFAULT PAGE === */
  .page-head { padding: var(--space-2xl) var(--space-lg) var(--space-lg); }
  .page-body { padding: var(--space-lg) var(--space-lg) var(--space-2xl); }

  /* === 404 === */
  .error-code { font-size: 5rem; }
  .error-page { padding: var(--space-2xl) var(--space-lg); }

  /* === HEADER === */
  .header { left: var(--rail-width); padding: var(--space-xs) var(--space-md); }
  .logo { font-size: 0.85rem; letter-spacing: 0.18em; }
  .logo span { font-size: 0.55rem; }

  /* === FOOTER === */
  .footer { padding: var(--space-xl) var(--space-lg); }
  .footer-links { gap: var(--space-xs) var(--space-md); }

  /* === FAQ === */
  .faq-question { padding: var(--space-md) 0; font-size: 0.85rem; }
  .faq-q-label { font-size: 1rem; }

  /* === CTA === */
  .cta { padding: var(--space-2xl) var(--space-lg); }
  .cta-ring { width: 300px; height: 300px; }
  .cta-text { font-size: 0.85rem; letter-spacing: 0.15em; }
  .cta-button { font-size: 0.85rem; padding: var(--space-sm) var(--space-lg); }
  
  
}


@media (max-width: 380px) {
  .menu-nav-link { font-size: 1.7rem; padding-left: 28px; }
  .hero-en { font-size: 2.2rem; }
  .section-heading-en { font-size: 1.7rem; }
  .error-code { font-size: 4rem; }
}

/* ============================================
   21. WORK DETAIL (single-work.php)
   ============================================ */
.work-detail { padding-top: var(--space-2xl); }

.work-hero { padding: var(--space-3xl) var(--space-xl) var(--space-xl); }

.work-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--color-text-light);
}

.work-back {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.3s;
}
.work-back:hover { color: var(--color-accent); }

.work-cat, .work-date { color: var(--color-text-muted); }

.work-title {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.4;
  margin-bottom: var(--space-2xl);
  color: var(--color-text);
}

.work-hero-image {
  width: 100%;
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-alt);
}
.work-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.work-body { padding: var(--space-2xl) var(--space-xl) var(--space-3xl); }

.work-body-grid {
  display: grid;
  grid-template-columns: 61.8% 38.2%;
  gap: var(--space-2xl);
  align-items: start;
}

.work-body-text {
  font-size: 0.92rem;
  line-height: 2.2;
  color: var(--color-text);
}
.work-body-text p { margin-bottom: 1.8em; }
.work-body-text h2,
.work-body-text h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  color: var(--color-accent);
  margin: var(--space-xl) 0 var(--space-md);
  letter-spacing: 0.02em;
}
.work-body-text h2 { font-size: 1.6rem; }
.work-body-text h3 { font-size: 1.2rem; }

.work-info {
  border-top: 1px solid var(--color-border-light);
  padding-top: var(--space-md);
  margin-bottom: var(--space-lg);
}
.work-info dt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-top: var(--space-md);
}
.work-info dt:first-child { margin-top: 0; }
.work-info dd {
  font-size: 0.88rem;
  color: var(--color-text);
  margin-top: 4px;
  margin-left: 0;
}

.work-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  transition: all 0.4s;
}
.work-visit-btn:hover {
  background: var(--color-dark);
  color: var(--color-white);
  border-color: var(--color-dark);
}
.work-visit-btn-arrow {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.work-visit-btn:hover .work-visit-btn-arrow {
  transform: translate(2px, -2px);
}

.work-pager {
  padding: var(--space-xl) var(--space-xl);
  border-top: 1px solid var(--color-border-light);
}
.work-pager-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.work-pager-link {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
}
.work-pager-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
}
.work-pager-title {
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color 0.3s;
}
.work-pager-link:hover .work-pager-title { color: var(--color-accent); }


/* ============================================
   22. WORKS ARCHIVE (archive-work.php)
   ============================================ */
.works-archive { padding-top: var(--space-3xl); }
.works-archive-head { padding: var(--space-3xl) var(--space-xl) var(--space-xl); }

.works-filter {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: 0;
}
.works-filter-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--color-text-light);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.works-filter-link:hover,
.works-filter-link.is-active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.works-archive-list { padding: var(--space-xl) var(--space-xl) var(--space-3xl); }

.works-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.works-archive-grid .work-item {
  aspect-ratio: 4 / 3;
  display: block;
  text-decoration: none;
  color: inherit;
}

.works-pagination {
  margin-top: var(--space-2xl);
  display: flex;
  justify-content: center;
}
.works-pagination .page-numbers {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  padding: 8px 12px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.3s;
}
.works-pagination .page-numbers.current,
.works-pagination .page-numbers:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}


/* ============================================
   23. CONTACT (page-contact.php + CF7)
   ============================================ */
.contact-page { padding-top: var(--space-3xl); }
.contact-hero { padding: var(--space-3xl) var(--space-xl) var(--space-xl); }
.contact-lead {
  font-size: 0.92rem;
  line-height: 2.3;
  color: var(--color-text);
  max-width: 560px;
}

.contact-form-section { padding: var(--space-xl) var(--space-xl) var(--space-3xl); }

.contact-grid {
  display: grid;
  grid-template-columns: 38.2% 61.8%;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-info {
  border-top: 1px solid var(--color-border-light);
  padding-top: var(--space-md);
}
.contact-info dt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-top: var(--space-md);
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd {
  font-size: 0.88rem;
  color: var(--color-text);
  margin: 4px 0 0;
  line-height: 1.9;
}
.contact-info dd a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.3s, border-color 0.3s;
}
.contact-info dd a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* CF7 整形 */
.contact-form-wrap .cf-row { margin-bottom: var(--space-lg); }
.contact-form-wrap .cf-row label {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}
.contact-form-wrap .cf-req {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-accent);
  margin-left: var(--space-xs);
  letter-spacing: 0.1em;
}
.contact-form-wrap .cf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.contact-form-wrap input[type="text"],
.contact-form-wrap input[type="email"],
.contact-form-wrap input[type="tel"],
.contact-form-wrap select,
.contact-form-wrap textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 0;
  transition: border-color 0.3s;
  font-weight: 300;
  letter-spacing: 0.04em;
    box-sizing: border-box;
}
.contact-form-wrap input:focus,
.contact-form-wrap select:focus,
.contact-form-wrap textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.contact-form-wrap textarea { resize: vertical; min-height: 160px; line-height: 1.9; }

.contact-form-wrap .cf-privacy {
  font-size: 0.82rem;
  color: var(--color-text-light);
  padding: var(--space-md) 0;
}
.contact-form-wrap .cf-privacy .wpcf7-list-item { margin: 0; }

.contact-form-wrap .cf-submit { text-align: right; margin-top: var(--space-lg); }
.contact-form-wrap .wpcf7-submit {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--color-white);
  background: var(--color-dark);
  border: 1px solid var(--color-dark);
  padding: var(--space-sm) var(--space-2xl);
  cursor: pointer;
  transition: all 0.4s;
}
.contact-form-wrap .wpcf7-submit:hover {
  background: var(--color-white);
  color: var(--color-dark);
}



@media (min-width: 769px) {
  .contact-form-wrap input[type="text"],
  .contact-form-wrap input[type="email"],
  .contact-form-wrap input[type="tel"],
  .contact-form-wrap select,
  .contact-form-wrap textarea {
    font-size: 0.9rem;
  }
}


/* === CF7 messages === */
.wpcf7 form .wpcf7-response-output {
  border: none;
  border-left: 2px solid var(--color-border);
  border-radius: 0;
  margin: var(--space-lg) 0 0;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  line-height: 1.9;
  color: var(--color-text);
  background: var(--color-bg-alt);
}

/* 送信成功 */
.wpcf7 form.sent .wpcf7-response-output {
  border-left-color: var(--color-accent);
  background: var(--color-bg-alt);
  color: var(--color-text);
}

/* 入力エラー(バリデーション) */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  border-left-color: var(--color-text-light);
  background: var(--color-bg-alt);
  color: var(--color-text);
}

/* 送信失敗(サーバーエラー) */
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  border-left-color: var(--color-dark);
  background: var(--color-bg-alt);
  color: var(--color-text);
}

/* 個別フィールドのエラーチップ */
.wpcf7-not-valid-tip {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  font-weight: 400;
}

/* エラーのある入力欄 */
.contact-form-wrap input.wpcf7-not-valid,
.contact-form-wrap select.wpcf7-not-valid,
.contact-form-wrap textarea.wpcf7-not-valid {
  border-color: var(--color-accent);
  background: var(--color-bg);
}

/* 送信中スピナー */
.wpcf7-spinner {
  background-color: var(--color-accent) !important;
  margin: 0 0 0 var(--space-md);
}

/* acceptance チェックボックスのスタイル整え */
.contact-form-wrap .wpcf7-list-item-label { color: var(--color-text-light); }
.contact-form-wrap .wpcf7-list-item-label a {
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

/* Contact ページ全体のオーバーフロー対策 */
.contact-page,
.contact-form-section,
.contact-form-wrap,
.contact-form-wrap form {
  max-width: 100%;
  overflow-x: hidden;
}

.contact-form-wrap form { box-sizing: border-box; }

/* CF7 出力する全ブロックを画面内に収める */
.contact-form-wrap .wpcf7-form-control-wrap,
.contact-form-wrap .wpcf7-form-control,
.contact-form-wrap p { max-width: 100%; }

/* Cloudflare Turnstile / reCAPTCHA をレスポンシブに */
.contact-form-wrap .cf-turnstile,
.contact-form-wrap [data-sitekey],
.contact-form-wrap iframe {
  max-width: 100% !important;
}

@media (max-width: 420px) {
  /* Turnstile/reCAPTCHA をスケールダウン(極小画面でも収まるように) */
  .contact-form-wrap .cf-turnstile,
  .contact-form-wrap [data-sitekey] {
    transform: scale(0.88);
    transform-origin: left top;
  }
}

/* acceptance ラベルの折り返し */
.contact-form-wrap .wpcf7-acceptance .wpcf7-list-item {
  display: block;
  margin: 0;
}
.contact-form-wrap .wpcf7-list-item-label {
  display: inline;
  word-break: break-word;
}


/* ============================================
   24. RESPONSIVE additions
   ============================================ */
@media (max-width: 768px) {
  .work-body-grid,
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .works-archive-grid { grid-template-columns: 1fr; }
  .contact-form-wrap .cf-grid { grid-template-columns: 1fr; }
  .work-pager-grid { grid-template-columns: 1fr; }
  .work-pager-grid > div:last-child { text-align: left !important; }
  .work-title { font-size: 1.6rem; }
}


/* ============================================
   25. 404 PAGE
   ============================================ */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: var(--space-3xl) var(--space-xl);
}

.error-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 14vw, 10rem);
  font-weight: 300;
  font-style: italic;
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: 0.02em;
}

.error-line {
  width: 60px;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-lg) auto;
}

.error-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.error-ja {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
}

.error-desc {
  font-size: 0.88rem;
  line-height: 2.2;
  color: var(--color-text-light);
  margin-bottom: var(--space-2xl);
}

.error-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--color-white);
  background: var(--color-dark);
  text-decoration: none;
  padding: var(--space-sm) var(--space-2xl);
  border: 1px solid var(--color-dark);
  transition: all 0.4s;
}
.error-btn:hover {
  background: var(--color-white);
  color: var(--color-dark);
}
.error-btn-arrow { transition: transform 0.3s; }
.error-btn:hover .error-btn-arrow { transform: translateX(4px); }

.error-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--color-text-light);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border-light);
  transition: color 0.3s, border-color 0.3s;
}
.error-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}


/* ============================================
   26. DEFAULT PAGE (page.php)
   ============================================ */
.page-default { padding-top: var(--space-3xl); }
.page-head { padding: var(--space-3xl) var(--space-xl) var(--space-xl); }
.page-body { padding: var(--space-xl) var(--space-xl) var(--space-3xl); }

.page-content {
  max-width: 720px;
  font-size: 0.92rem;
  line-height: 2.3;
  color: var(--color-text);
}

.page-content h2 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin: var(--space-2xl) 0 var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border-light);
}
.page-content h2:first-child { margin-top: 0; }

.page-content h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin: var(--space-xl) 0 var(--space-sm);
}

.page-content p { margin-bottom: 1.6em; }

.page-content ul,
.page-content ol {
  margin: 0 0 1.6em var(--space-md);
  padding-left: var(--space-md);
}
.page-content ul li,
.page-content ol li {
  margin-bottom: var(--space-sm);
  line-height: 2;
}

.page-content a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.3s, border-color 0.3s;
}
.page-content a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.page-updated {
  max-width: 720px;
  margin-top: var(--space-2xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  text-align: right;
}