/* ==========================================================================
   TASUKU V2 — Original Photo Showcase, Interactive Before/After Slider
   & Intentional Blank Architectural Placeholders
   ========================================================================== */

:root {
  --ba-brass: #b69a63;
  --ba-brass-rgb: 182, 154, 99;
  --ba-sumi: #171a1c;
  --ba-washi: #f6f3ec;
  --ba-line: rgba(23, 26, 28, 0.14);
}

/* --------------------------------------------------------------------------
   1. Works Section Layout Restructuring (Before/After Showcase + Archive Grid)
   -------------------------------------------------------------------------- */
.front-works__ba-showcase {
  margin-top: clamp(2.25rem, 4.5vw, 3.75rem);
  margin-bottom: clamp(3.5rem, 6.5vw, 5.5rem);
}

.front-works__subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: clamp(1.5rem, 2.8vw, 2.4rem);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(23, 26, 28, 0.12);
}

.front-works__subhead-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 600;
  color: var(--ba-sumi);
  letter-spacing: 0.04em;
}

.front-works__subhead-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-en, "Inter", sans-serif);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ba-brass);
  background: rgba(var(--ba-brass-rgb), 0.1);
  border: 1px solid rgba(var(--ba-brass-rgb), 0.35);
}

.front-works__subhead-note {
  margin: 0;
  font-size: 0.8125rem;
  color: #5a6065;
  letter-spacing: 0.04em;
}

.ba-showcase-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.5rem, 2.8vw, 2.5rem);
}

.ba-card {
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(23, 26, 28, 0.11);
  box-shadow: 0 18px 42px rgba(23, 26, 28, 0.055);
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.ba-card:hover {
  border-color: rgba(var(--ba-brass-rgb), 0.55);
  box-shadow: 0 22px 48px rgba(23, 26, 28, 0.085);
}

.ba-card--featured {
  grid-column: span 12;
}

@media (min-width: 900px) {
  .ba-card--featured {
    grid-column: span 12;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    align-items: stretch;
  }

  .ba-card--half {
    grid-column: span 6;
  }
}

/* --------------------------------------------------------------------------
   2. Interactive Before / After Slider Core
   -------------------------------------------------------------------------- */
.ba-slider {
  --ba-pos: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: #1c2023;
  cursor: ew-resize;
  touch-action: pan-y;
}

@media (min-width: 900px) {
  .ba-card--featured .ba-slider {
    aspect-ratio: 4 / 3;
    min-height: 100%;
  }
}

.ba-slider__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  pointer-events: none;
}

.ba-slider__layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.ba-slider__layer--before {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
  will-change: clip-path;
}

.ba-slider__layer--after {
  z-index: 1;
}

/* Subtle vignette on edges for badge legibility */
.ba-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(16, 19, 22, 0.34) 0%, transparent 24%, transparent 78%, rgba(16, 19, 22, 0.38) 100%);
}

/* BEFORE / AFTER Corner Pills (Clickable to jump to 88% or 12%) */
.ba-slider__badge {
  position: absolute;
  top: 0.9rem;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(20, 23, 26, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #f7f4ed;
  font-family: var(--font-en, "Inter", sans-serif);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.ba-slider__badge:hover {
  background: rgba(20, 23, 26, 0.92);
  border-color: var(--ba-brass);
  transform: translateY(-1px);
}

.ba-slider__badge span {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.ba-slider__badge--before {
  left: 0.9rem;
}

.ba-slider__badge--after {
  right: 0.9rem;
  border-color: rgba(var(--ba-brass-rgb), 0.65);
  background: rgba(28, 24, 18, 0.82);
}

.ba-slider__badge--after::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ba-brass);
}

/* Divider Line & Handle */
.ba-slider__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-pos, 50%);
  z-index: 5;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    var(--ba-brass) 22%,
    #fff6e3 50%,
    var(--ba-brass) 78%,
    rgba(255, 255, 255, 0.9) 100%
  );
  box-shadow: 0 0 14px rgba(16, 19, 22, 0.55);
  pointer-events: none;
  will-change: left;
}

.ba-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  background: rgba(23, 26, 28, 0.88);
  border: 1.5px solid var(--ba-brass);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.42),
    0 0 0 4px rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7f4ed;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.22s ease, box-shadow 0.22s ease;
}

.ba-slider:hover .ba-slider__handle,
.ba-slider.is-dragging .ba-slider__handle {
  transform: translate(-50%, -50%) scale(1.09);
  background: var(--ba-sumi);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.52),
    0 0 0 6px rgba(var(--ba-brass-rgb), 0.28);
}

.ba-slider__handle svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Bottom hint bar inside slider */
.ba-slider__hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 0.26rem 0.75rem;
  border-radius: 999px;
  background: rgba(20, 23, 26, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(247, 244, 237, 0.92);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.ba-slider.is-interacted .ba-slider__hint {
  opacity: 0.32;
}

/* Accessible invisible range input covering the slider */
.ba-slider__range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

/* Card Text Body */
.ba-card__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.25rem, 2.4vw, 2rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 243, 236, 0.92));
}

.ba-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  padding: 0;
  margin: 0 0 0.75rem;
  list-style: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ba-brass);
}

.ba-card__meta li + li::before {
  content: "/";
  margin-right: 0.9rem;
  color: rgba(23, 26, 28, 0.24);
}

.ba-card__title {
  margin: 0 0 0.75rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(1.15rem, 1.65vw, 1.45rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ba-sumi);
}

.ba-card__desc {
  margin: 0 0 1.15rem;
  font-size: 0.84rem;
  line-height: 1.85;
  color: #464d52;
}

.ba-card__points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(23, 26, 28, 0.1);
}

.ba-card__point {
  font-size: 0.74rem;
  line-height: 1.5;
  color: #3a4045;
}

.ba-card__point strong {
  display: block;
  font-family: var(--font-en, "Inter", sans-serif);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #7c8286;
  margin-bottom: 0.15rem;
}

/* --------------------------------------------------------------------------
   3. Intentional Blank Architectural Placeholder (.photo-placeholder-blank)
   -------------------------------------------------------------------------- */
.photo-placeholder-blank {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background-color: #f4f0e6;
  background-image:
    linear-gradient(rgba(23, 26, 28, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 26, 28, 0.055) 1px, transparent 1px),
    linear-gradient(36deg, transparent 49.4%, rgba(182, 154, 99, 0.16) 49.8%, rgba(182, 154, 99, 0.16) 50.2%, transparent 50.6%),
    linear-gradient(144deg, transparent 49.4%, rgba(182, 154, 99, 0.16) 49.8%, rgba(182, 154, 99, 0.16) 50.2%, transparent 50.6%);
  background-size: 36px 36px, 36px 36px, 100% 100%, 100% 100%;
  border: 1px solid rgba(23, 26, 28, 0.14);
  overflow: hidden;
}

.photo-placeholder-blank::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(182, 154, 99, 0.48);
  pointer-events: none;
}

.photo-placeholder-blank__kanji {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  color: rgba(182, 154, 99, 0.28);
  margin-bottom: 0.55rem;
  user-select: none;
}

.photo-placeholder-blank__eyebrow {
  font-family: var(--font-en, "Inter", sans-serif);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #8b764d;
  margin: 0 0 0.35rem;
}

.photo-placeholder-blank__label {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #3f464a;
  margin: 0;
}

.photo-placeholder-blank__sub {
  font-size: 0.72rem;
  color: #72787d;
  margin: 0.35rem 0 0;
}

/* Fix aspect-ratio consistency in front-works__list cards */
.front-works__list .work-card__media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
