/* ───────────────────────────────────────────────────────────
   其他服務 — hero + 6-card grid with hover brush highlight
   ───────────────────────────────────────────────────────── */

.page-services {
  background: var(--bg);
  min-height: 100vh;
}

/* ── HERO ────────────────────────────────────────── */
.svc-hero {
  position: relative;
  min-height: 100vh;
  padding-top: var(--nav-h);
  overflow: hidden;
  isolation: isolate;
}
.svc-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.04);
}
.svc-watercolor {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  transform: translateZ(0);
  isolation: isolate;
}
.svc-watercolor .wash-a {
  --wash-rotate: -3deg;
  top: -15%;
  height: 140%;
}
.svc-watercolor .wash-b {
  --wash-rotate: 5deg;
  left: -2%;
  top: 0%;
  height: 110%;
}

.svc-veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70% 60% at 20% 50%, rgba(250, 246, 237, 0.25), transparent 70%),
    linear-gradient(180deg, rgba(250, 246, 237, 0.15) 0%, transparent 30%, transparent 88%, rgba(246, 239, 228, 0.75) 96%, rgba(246, 239, 228, 1) 100%);
}

.svc-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto 0 max(0px, calc((100vw - 1320px) / 2 - var(--fs-hero)));
  padding: 0 var(--gutter) calc(2 * var(--fs-hero));
  height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 26px;
}

.svc-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--moss);
  text-transform: uppercase;
}
.svc-eyebrow .eyebrow-rule {
  width: 48px;
  height: 1px;
  background: var(--moss);
  opacity: 0.6;
}

.svc-title {
  position: relative;
  margin: 0;
  line-height: 0.95;
  display: inline-block;
}
.svc-title-text {
  position: relative;
  z-index: 2;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: var(--fs-hero);
  letter-spacing: 0.22em;
  color: var(--ink);
}
.svc-title-brush {
  position: absolute;
  z-index: 1;
  left: -24px;
  right: -48px;
  top: 6%;
  height: 96%;
  background: url('images/title-brush.webp') center/100% 100% no-repeat;
  pointer-events: none;
}

.svc-lead {
  margin: 0;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 2.05;
  letter-spacing: 0.1em;
  color: var(--ink);
  max-width: 30em;
}
.svc-lead em {
  font-style: normal;
  color: var(--moss);
  font-weight: 600;
  border-bottom: 1px dotted color-mix(in oklab, var(--moss) 50%, transparent);
  padding-bottom: 1px;
}

/* ── 6-CARD GRID SECTION ─────────────────────────── */
.svc-grid-section {
  background: var(--bg-soft);
  padding: clamp(80px, 12vh, 140px) var(--gutter) clamp(100px, 14vh, 160px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.svc-grid {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 2.6vw, 44px) clamp(24px, 2.2vw, 40px);
}

/* ── CARD ────────────────────────────────────────── */
.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
  text-decoration: none;
  color: inherit;
  transition: transform .35s ease;
}
.svc-card:hover { transform: translateY(-4px); }

.svc-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 22px 36px -20px rgba(46, 33, 23, 0.4),
    0 8px 16px -8px rgba(46, 33, 23, 0.18);
  transition: filter .35s ease, transform .35s ease;
}
.svc-card:hover .svc-card-img {
  filter: saturate(1.08) brightness(1.03);
}

/* Placeholder card — sage block instead of photo */
.svc-card-img-empty {
  background:
    linear-gradient(160deg,
      color-mix(in oklab, var(--sage) 75%, transparent) 0%,
      color-mix(in oklab, var(--moss) 80%, transparent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(250, 246, 237, 0.55);
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 26px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
.placeholder-mark {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(250, 246, 237, 0.4);
  border-radius: 999px;
}

/* ── Meta tag ────────────────────────────────────── */
.svc-card-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 6px 4px 0;
  font-family: var(--serif-en);
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.26em;
}
.svc-num {
  font-style: italic;
  font-size: 14px;
  color: var(--moss);
}
.svc-en {
  font-size: 11px;
}

/* ── Card Title with hover brush ─────────────────── */
.svc-card-title {
  position: relative;
  margin: 0;
  padding: 6px 14px 6px 4px;
  display: inline-block;
  align-self: flex-start;
  line-height: 1.1;
}
.svc-card-text {
  position: relative;
  z-index: 2;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: clamp(22px, 1.9vw, 28px);
  letter-spacing: 0.22em;
  color: var(--ink);
  transition: color .25s ease;
}
/* Brush appears on card hover — same PNG asset as page titles */
.svc-card-brush {
  position: absolute;
  z-index: 1;
  left: -16px;
  right: -28px;
  top: 4%;
  height: 96%;
  background: url('images/title-brush.webp') center/100% 100% no-repeat;
  opacity: 0;
  transform: scale(0.85);
  transform-origin: left center;
  transition: opacity .35s ease, transform .45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.svc-card:hover .svc-card-brush,
.svc-card:focus-visible .svc-card-brush {
  opacity: 1;
  transform: scale(1);
}

/* ── MODALS ──────────────────────────────────────── */
.svc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter);
  background: rgba(46, 33, 23, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.svc-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.svc-modal {
  position: relative;
  width: min(840px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper, #faf6ed);
  border-radius: 18px;
  padding: clamp(48px, 7.5vw, 78px) clamp(42px, 6vw, 72px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 40px 80px -24px rgba(46, 33, 23, 0.45),
    0 12px 28px -10px rgba(46, 33, 23, 0.22);
  transform: translateY(18px) scale(0.97);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
}
.svc-modal-overlay.is-open .svc-modal {
  transform: translateY(0) scale(1);
}

.svc-modal-close {
  position: absolute;
  top: 27px;
  right: 30px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--ink-mute);
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.svc-modal-close:hover {
  background: color-mix(in oklab, var(--moss) 12%, transparent);
  color: var(--ink);
}

.svc-modal-eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 27px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.36em;
  color: var(--moss);
  text-transform: uppercase;
}
.svc-modal-eyebrow .eyebrow-rule {
  width: 54px;
  height: 1px;
  background: var(--moss);
  opacity: 0.6;
}

.svc-modal-title {
  margin: 0 0 15px;
  font-family: var(--serif-zh);
  font-weight: 600;
  font-size: clamp(31px, 3.6vw, 41px);
  letter-spacing: 0.18em;
  color: var(--ink);
  line-height: 1.1;
}

.svc-modal-price {
  margin: 0 0 33px;
  font-family: var(--serif-en);
  font-size: 17px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  padding-bottom: 27px;
  border-bottom: 1px dashed var(--line, rgba(46, 33, 23, 0.15));
}
.svc-modal-price em {
  font-style: normal;
  color: var(--moss);
  font-weight: 600;
}

.svc-modal-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.svc-modal-body p {
  margin: 0;
  font-family: var(--sans-zh);
  font-size: clamp(17px, 1.2vw, 18.5px);
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.svc-modal-note {
  font-size: 16px !important;
  color: var(--ink-mute) !important;
  opacity: 0.75;
  margin-top: 6px !important;
}

/* ── Gallery modal (左輪播 + 右內容) ─────────────── */
.svc-modal--gallery {
  width: min(1280px, 95vw);
  min-height: min(600px, 82vh);
  max-height: 90vh;
  padding: 0;
  display: grid;
  grid-template-columns: 3fr 2fr;
  overflow: hidden;
}

.svc-modal--gallery .svc-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.svc-modal-left {
  position: relative;
  overflow: hidden;
  border-radius: 18px 0 0 18px;
  background: color-mix(in oklab, var(--sage) 20%, var(--bg-soft));
}

.svc-modal-right {
  padding: clamp(48px, 6vw, 72px) clamp(36px, 5vw, 64px) clamp(48px, 6vw, 72px) clamp(32px, 4vw, 52px);
  overflow-y: auto;
  max-height: 90vh;
}

/* ── Carousel ─────────────────────────────────────── */
.svc-carousel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.svc-carousel-track {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.svc-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  background: color-mix(in oklab, var(--sage) 20%, var(--bg-soft));
}
.svc-carousel-slide.is-active { opacity: 1; }

.svc-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

/* soon placeholder */
.svc-slide-soon {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(250, 246, 237, 0.5);
  padding: 8px 18px;
  border: 1px solid rgba(250, 246, 237, 0.3);
  border-radius: 999px;
}

/* dot nav */
.svc-carousel-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.svc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .25s ease, transform .25s ease, border-color .25s ease;
}
.svc-dot.is-active {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.92);
  transform: scale(1.35);
}
.svc-dot:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.4);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 720px) {
  .svc-modal--gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 260px 1fr;
  }
  .svc-modal-left {
    border-radius: 18px 18px 0 0;
  }
  .svc-modal-right {
    max-height: none;
    padding: 32px 28px 40px;
  }
}

@media (max-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  /* 手機：水墨換成半透明遮罩，內容置中 */
  .svc-watercolor .wash { display: none; }
  .svc-watercolor { background: linear-gradient(to bottom, transparent 70%, rgba(246, 239, 228, 1) 100%), url('images/mobile-wash-overlay.webp') center/cover no-repeat; }
  .svc-hero-content {
    margin: 0;
    align-items: flex-start;
    justify-content: center;
    padding: 0 var(--gutter) calc(2 * var(--fs-hero));
    gap: 20px;
    height: calc(100vh - var(--nav-h));
    color: #111;
  }
  .svc-lead { padding-left: 5vw; }
  /* 眉標 */
  .svc-eyebrow { color: #111; }
  .svc-eyebrow .eyebrow-rule { background: #111; }
  /* 大標題置中 */
  .svc-title { align-self: center; text-align: center; }
  .svc-title-text { font-size: clamp(28px, 16vw, 72px); }
  /* 其他文字 */
  .svc-lead { color: #111; font-size: clamp(14px, 3.5vw, 17px); }
}
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc-hero-content { padding-top: 0; }
}
@media (max-width: 480px) {
  .svc-title-text { font-size: clamp(28px, 16vw, 52px); }
  .svc-card-title { font-size: 20px; }
}
