/* ───────────────────────────────────────────────────────────
   夏沐荏苒 Summer Reverie Café — 首頁 styles
   ───────────────────────────────────────────────────────── */

:root {
  /* warm cream + deep coffee, neutral cool sage accent */
  --bg:        #f6efe4;
  --bg-soft:   #ede4d3;
  --paper:     #faf6ed;
  --ink:       #2e2117;
  --ink-soft:  #574438;
  --ink-mute:  #8a7461;
  --line:      rgba(46, 33, 23, 0.18);

  --sage:      oklch(58% 0.045 145);     /* forest green */
  --sage-soft: oklch(78% 0.035 130);
  --moss:      oklch(40% 0.055 135);

  --serif-zh:  "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans-zh:   "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --serif-en:  "Cormorant Garamond", "Times New Roman", serif;

  --nav-h: 76px;

  --max:    1320px;
  --gutter: clamp(20px, 4vw, 56px);

  /* ── 標題尺寸系統 ── */
  --fs-hero:    clamp(52px, 5.6vw, 88px);   /* 各頁英雄大標題 */
  --fs-section: clamp(36px, 3.4vw, 56px);   /* 區塊副標題 */
  --fs-card:    clamp(18px, 1.6vw, 24px);   /* 卡片標題 */
  --fs-eyebrow: 13px;                        /* 眉標（英文小字） */
  --fs-lead:    clamp(15px, 1.2vw, 19px);   /* 導言文字 */
  --fs-body:    clamp(14px, 1vw, 16px);     /* 內文 */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans-zh);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── NAV ──────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 var(--gutter);
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand-mark {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}
.brand-zh {
  font-family: var(--serif-zh);
  font-weight: 600;
  font-size: 27px;
  letter-spacing: 0.08em;
}
.brand-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.nav-links {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 28px);
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.18em;
}
.nav-links a {
  position: relative;
  padding: 10px 4px;
  color: var(--ink-soft);
  transition: color .25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 1px;
  background: var(--moss);
  transform: translateX(-50%);
  transition: width .35s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 70%; }
.nav-links a.active {
  color: var(--ink);
}
.nav-links a.active::after { width: 70%; }

/* ── HAMBURGER ───────────────────────────────────── */
.nav-links { white-space: nowrap; }

/* 整個 nav 在 JS 量測完前隱藏，避免任何閃爍 */
.nav { opacity: 0; }
.nav-js-ready { opacity: 1; transition: opacity 0.12s ease; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  justify-self: end;
  z-index: 60;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
  transform-origin: center;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(46, 33, 23, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Compact mode — triggered by JS when nav overflows */
.nav-compact .nav-toggle { display: flex; }
.nav-compact .nav-overlay { display: block; }

.nav-compact .nav-links {
  position: fixed;
  top: var(--nav-h);
  right: var(--gutter);
  left: auto;
  z-index: 55;
  width: min(220px, 80vw);
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 8px 0 12px;
  background: color-mix(in oklab, var(--paper) 97%, transparent);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px -8px rgba(46, 33, 23, 0.22);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), opacity .3s ease;
  white-space: normal;
}
.nav-compact .nav-links.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nav-compact .nav-links a {
  padding: 13px 20px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.nav-compact .nav-links a:last-child { border-bottom: none; }
.nav-compact .nav-links a::after { display: none; }

/* ── HERO ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: var(--nav-h);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  filter: saturate(1.06) brightness(1.04);
}

/* ── HERO CAROUSEL ───────────────────────────────── */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background: var(--img) center/cover no-repeat;
  opacity: 0;
  filter: saturate(1.04);
  transition: opacity 1.2s ease-in-out, transform 9s ease-out;
  transform: scale(1.04);
  will-change: opacity, transform;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);          /* slow Ken-Burns ease */
}

/* ── HERO WATERCOLOR (real PNG with turbulence bleed) ── */
.hero-watercolor {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  transform: translateZ(0);
  isolation: isolate;
}
.wash {
  position: absolute;
  object-fit: cover;
  filter: url(#water-bleed);
  animation: wash-bloom 2.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes wash-bloom {
  0%   { opacity: 0;   transform: rotate(var(--wash-rotate, 0deg)) scale(0.7);  }
  40%  { opacity: 0.7;                                                            }
  100% { opacity: var(--wash-final-opacity, 1); transform: rotate(var(--wash-rotate, 0deg)) scale(1); }
}
/* Main wash — enlarged so the left edge bleeds OFF-screen, the way a
   real watercolor splash would extend past the page. */
.wash-a {
  --wash-final-opacity: 0.95;
  --wash-rotate: 3deg;
  left: -28%;
  top: -15%;
  width: 88%;
  height: 130%;
}
/* Secondary wash — slightly smaller, offset; adds depth. */
.wash-b {
  --wash-final-opacity: 0.5;
  --wash-rotate: -5deg;
  left: -18%;
  top: 0%;
  width: 68%;
  height: 100%;
  animation-delay: 0.3s;
}
/* Third wash — hidden on desktop, fills middle gap on tablet/mobile */
.wash-c {
  display: none;
  --wash-final-opacity: 0.55;
  animation-delay: 0.15s;
}

/* light-only wash — no dark gradient end. Keeps the image bright. */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 20% 60%, rgba(250, 246, 237, 0.25), transparent 70%),
    linear-gradient(180deg, rgba(250, 246, 237, 0.18) 0%, rgba(246, 239, 228, 0) 30%, rgba(246, 239, 228, 0) 88%, rgba(246, 239, 228, 0.75) 96%, rgba(246, 239, 228, 1) 100%);
}

.hero-inner {
  position: relative;
  height: calc(100vh - var(--nav-h));
  max-width: var(--max);
  margin: 0 auto 0 max(0px, calc((100vw - 1320px) / 2 - var(--fs-hero)));
  padding: 0 var(--gutter) calc(2 * var(--fs-hero));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}
.hero-inner[hidden] { display: none; }

.hero-stamp {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--moss);
  text-transform: uppercase;
}
.stamp-dot { opacity: .5; }

.hero-title {
  margin: 0;
  font-family: var(--serif-zh);
  font-weight: 500;
  line-height: 0.95;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-zh {
  font-size: var(--fs-hero);
  letter-spacing: 0.14em;
  /* subtle paper-like wash behind so it stays legible over photo */
  text-shadow: 0 1px 0 rgba(250, 246, 237, 0.6);
}
.hero-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 30px);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-left: 6px;
}

.hero-tagline {
  margin: 0;
  font-family: var(--serif-zh);
  font-size: clamp(16px, 1.4vw, 19px);
  letter-spacing: 0.5em;
  color: var(--ink-soft);
  text-indent: 0.5em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 14px 24px;
  margin-top: 12px;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .25s ease, transform .25s ease;
}
.hero-cta:hover { background: var(--moss); border-color: var(--moss); transform: translateY(-1px); }
.hero-cta svg { width: 16px; height: 16px; }

.scroll-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 56px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--serif-en);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4em;
  color: var(--paper);
  text-transform: uppercase;
  text-shadow:
    0 0 8px  rgba(255, 220, 140, 0.95),
    0 0 20px rgba(255, 190, 80, 0.7),
    0 0 40px rgba(255, 160, 40, 0.4);
  animation: scrollGlow 2.6s ease-in-out infinite;
}
.scroll-line {
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, rgba(255, 220, 140, 0.9), transparent);
  box-shadow:
    0 0 6px  rgba(255, 220, 140, 0.8),
    0 0 14px rgba(255, 180, 60, 0.5);
  animation: scrollPulse 2.6s ease-in-out infinite;
}
.scroll-arrow {
  width: 42px;
  height: 22px;
  color: rgba(255, 220, 140, 0.95);
  filter:
    drop-shadow(0 0 4px rgba(255, 220, 140, 0.9))
    drop-shadow(0 0 10px rgba(255, 170, 50, 0.6));
  animation: scrollBounce 2.6s ease-in-out infinite;
}
@keyframes scrollGlow {
  0%, 100% { opacity: 0.7; text-shadow: 0 0 8px rgba(255,220,140,0.8), 0 0 20px rgba(255,190,80,0.5), 0 0 40px rgba(255,160,40,0.25); }
  50%      { opacity: 1;   text-shadow: 0 0 8px rgba(255,220,140,1),   0 0 24px rgba(255,190,80,0.85), 0 0 50px rgba(255,160,40,0.55); }
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: .5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(-3px); opacity: .6; }
  50%      { transform: translateY(2px);  opacity: 1; }
}

/* ── INTRO ────────────────────────────────────────── */
.intro {
  background: var(--bg);
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.intro-grid {
  position: relative;
  z-index: 2;
}
/* Decorative watercolor accents on the section's edges, extending off-screen */
.intro-wash, .explore-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.wash-intro-r {
  --wash-final-opacity: 0.4;
  position: absolute;
  right: -22%;
  top: 18%;
  width: 60%;
  height: 75%;
  object-fit: cover;
  animation-delay: 0.15s;
}
.wash-intro-l {
  --wash-final-opacity: 0.28;
  position: absolute;
  left: -20%;
  top: -8%;
  width: 38%;
  height: 50%;
  object-fit: cover;
  animation-delay: 0.4s;
}
/* (continuous wash-edge-* keyframes removed — bloom-and-freeze now) */

.intro-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.intro-photo {
  position: relative;
  margin: 0;
  transform: rotate(-1.5deg);
  transition: transform .5s ease;
}
.intro-photo:hover { transform: rotate(0deg); }
.intro-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 30px 60px -20px rgba(46, 33, 23, 0.35),
    0 12px 24px -10px rgba(46, 33, 23, 0.25);
}
.intro-photo::before {
  /* paper mat behind */
  content: "";
  position: absolute;
  inset: -14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  z-index: -1;
  transform: rotate(2.5deg);
  box-shadow: 0 20px 40px -16px rgba(46, 33, 23, 0.18);
}
.intro-photo figcaption {
  margin-top: 18px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-align: right;
}

.intro-copy { position: relative; padding: 48px 0; }

.intro-eyebrow,
.explore-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--moss);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.eyebrow-rule {
  width: 48px;
  height: 1px;
  background: var(--moss);
  opacity: 0.6;
}
.eyebrow-text { white-space: nowrap; }

.intro-lead {
  margin: 0 0 20px;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-wrap: balance;
}

.intro-body {
  margin: 0 0 36px;
  max-width: 36em;
  font-family: var(--sans-zh);
  font-weight: 400;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 2.05;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.intro-sign {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.sign-rule {
  width: 56px;
  height: 1px;
  background: var(--ink-mute);
}
.sign-text { display: flex; flex-direction: column; gap: 4px; }
.sign-zh {
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.sign-sub {
  font-family: var(--sans-zh);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.sign-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 195%;
  height: 195%;
  object-fit: contain;
  object-position: center;
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.intro-sign,
.intro-eyebrow,
.intro-lead,
.intro-body {
  position: relative;
  z-index: 1;
}

/* ── EXPLORE ─────────────────────────────────────── */
.explore {
  background: var(--bg-soft);
  padding: clamp(80px, 14vh, 160px) var(--gutter) clamp(100px, 16vh, 180px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.explore-head, .explore-grid { position: relative; z-index: 2; }
.wash-explore {
  --wash-final-opacity: 0.32;
  position: absolute;
  left: -18%;
  bottom: -15%;
  width: 55%;
  height: 70%;
  object-fit: cover;
  animation-delay: 0.2s;
}

.explore-head {
  max-width: var(--max);
  margin: 0 auto clamp(48px, 7vh, 80px);
}
.explore-title {
  margin: 0;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}

/* asymmetric 12-col grid:
   row 1: info (5) · rules (3) · staff (4)
   row 2: menu (4) feature · services (4) · journal (4)
   on tighter widths it collapses.                              */
.explore-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 0 24px;
  isolation: isolate;
  transition: transform .35s ease;
}
.card:hover { transform: translateY(-4px); }
.card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  filter: saturate(1.02);
  box-shadow:
    0 20px 40px -22px rgba(46, 33, 23, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.4) inset;
  margin-bottom: 18px;
  transition: filter .35s ease, transform .35s ease;
}
.card:hover .card-img { filter: saturate(1.1) brightness(1.03); }

.card-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font-family: var(--serif-en);
  color: var(--ink-mute);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.card-num {
  font-style: italic;
  font-size: 13px;
  color: var(--moss);
}
.card-tag {
  font-size: 11px;
}

.card-title {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 6px;
  padding: 4px 14px 4px 6px;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: clamp(22px, 2.1vw, 28px);
  letter-spacing: 0.22em;
  color: var(--ink);
  line-height: 1.2;
}
.card-title-text {
  position: relative;
  z-index: 2;
}
/* Hover brush — same PNG asset as page titles, animated in on card hover */
.card-title-brush {
  position: absolute;
  z-index: 1;
  left: -12px;
  right: -24px;
  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;
}
.card:hover .card-title-brush,
.card:focus-visible .card-title-brush {
  opacity: 1;
  transform: scale(1);
}
.card-sub {
  margin: 0;
  font-family: var(--sans-zh);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}

.card-feature {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  font-family: var(--serif-zh);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--paper);
  background: var(--moss);
  border-radius: 2px;
}

/* asymmetric placement */
.card-info,
.card-rules,
.card-staff,
.card-menu,
.card-services,
.card-journal  { grid-column: span 4; margin-top: 0; }

/* ── FOOTER ──────────────────────────────────────── */
.foot {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(56px, 9vh, 96px) var(--gutter);
  text-align: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.foot::before {
  /* one final, restrained watercolor mark */
  content: "";
  position: absolute;
  inset: -10% -20% auto auto;
  width: 60%;
  height: 200%;
  background: radial-gradient(closest-side, rgba(250, 246, 237, 0.05), transparent 70%);
  z-index: -1;
  filter: blur(2px);
}
.foot-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
}
.foot-zh {
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.24em;
}
.foot-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: rgba(250, 246, 237, 0.55);
}
.foot-tagline {
  margin: 0 0 28px;
  font-family: var(--serif-zh);
  font-size: 14px;
  letter-spacing: 0.5em;
  color: rgba(250, 246, 237, 0.7);
  text-indent: 0.5em;
}
.foot-meta {
  margin: 0;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: rgba(250, 246, 237, 0.45);
}

/* ── TWEAK VARIANTS ──────────────────────────────── */

/* INTRO MOOD — different background warmth around the photo+text band */
.intro[data-mood="soft"] {
  background: linear-gradient(180deg, var(--bg) 0%, var(--paper) 100%);
}
.intro[data-mood="deep"] {
  background: var(--ink);
  color: var(--paper);
}
.intro[data-mood="deep"] .intro-lead,
.intro[data-mood="deep"] .sign-zh { color: var(--paper); }
.intro[data-mood="deep"] .intro-body { color: rgba(250, 246, 237, 0.78); }
.intro[data-mood="deep"] .sign-sub,
.intro[data-mood="deep"] .intro-photo figcaption { color: rgba(250, 246, 237, 0.55); }
.intro[data-mood="deep"] .intro-photo::before { background: rgba(250, 246, 237, 0.08); border-color: rgba(250, 246, 237, 0.18); }
.intro[data-mood="deep"] .intro-sign { border-top-color: rgba(250, 246, 237, 0.2); }
.intro[data-mood="deep"] .sign-rule { background: rgba(250, 246, 237, 0.5); }
.intro[data-mood="deep"] .intro-eyebrow { color: var(--sage); }
.intro[data-mood="deep"] .eyebrow-rule { background: var(--sage); }

/* EXPLORE GRID LAYOUTS */
.explore-grid[data-layout="uniform"] .card { margin-top: 0 !important; }
.explore-grid[data-layout="uniform"] .card-info,
.explore-grid[data-layout="uniform"] .card-rules,
.explore-grid[data-layout="uniform"] .card-staff,
.explore-grid[data-layout="uniform"] .card-menu,
.explore-grid[data-layout="uniform"] .card-services,
.explore-grid[data-layout="uniform"] .card-journal {
  grid-column: span 4;
}

.explore-grid[data-layout="masonry"] .card { margin-top: 0; }
.explore-grid[data-layout="masonry"] .card-info     { grid-column: span 4; margin-top: 0;   }
.explore-grid[data-layout="masonry"] .card-rules    { grid-column: span 4; margin-top: 56px;}
.explore-grid[data-layout="masonry"] .card-staff    { grid-column: span 4; margin-top: 28px;}
.explore-grid[data-layout="masonry"] .card-menu     { grid-column: span 4; margin-top: 60px;}
.explore-grid[data-layout="masonry"] .card-services { grid-column: span 4; margin-top: 16px;}
.explore-grid[data-layout="masonry"] .card-journal  { grid-column: span 4; margin-top: 80px;}
.explore-grid[data-layout="masonry"] .card-info     .card-img { aspect-ratio: 4 / 5; }
.explore-grid[data-layout="masonry"] .card-rules    .card-img { aspect-ratio: 1 / 1; }
.explore-grid[data-layout="masonry"] .card-staff    .card-img { aspect-ratio: 4 / 3; }
.explore-grid[data-layout="masonry"] .card-menu     .card-img { aspect-ratio: 4 / 3; }
.explore-grid[data-layout="masonry"] .card-services .card-img { aspect-ratio: 4 / 5; }
.explore-grid[data-layout="masonry"] .card-journal  .card-img { aspect-ratio: 1 / 1; }

/* WATERCOLOR — opt-in decorative splash on hero + intro */
body[data-watercolor="on"] .hero::before,
body[data-watercolor="on"] .intro::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 50%,
              color-mix(in oklab, var(--paper) 90%, transparent),
              transparent 70%);
  filter: blur(1px);
  opacity: 0.9;
}
body[data-watercolor="on"] .hero::before {
  inset: 18% auto auto -8%;
  width: 55%;
  height: 60%;
  transform: rotate(-6deg);
}
body[data-watercolor="on"] .intro::after {
  inset: auto -10% -20% auto;
  width: 38%;
  height: 60%;
  transform: rotate(8deg);
  background: radial-gradient(ellipse 50% 60% at 50% 50%,
              color-mix(in oklab, var(--sage-soft, var(--sage)) 30%, transparent),
              transparent 70%);
  opacity: 0.45;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1100px) {
  .nav-links { font-size: 13px; gap: 14px; letter-spacing: 0.12em; }
  .brand-zh { font-size: 17px; }
  .brand-en { font-size: 10px; }
}

@media (max-width: 1024px) {
  /* iPad 橫向：水墨改成上下排列，中間補第三層 */
  .wash-a {
    width: 140% !important;
    height: 60% !important;
    left: -20% !important;
    top: -5% !important;
    -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  }
  .wash-b {
    width: 130% !important;
    height: 60% !important;
    left: -15% !important;
    top: 42% !important;
    -webkit-mask-image: linear-gradient(to top, black 55%, transparent 100%);
    mask-image: linear-gradient(to top, black 55%, transparent 100%);
  }
  .wash-c {
    display: block;
    position: absolute;
    object-fit: cover;
    filter: url(#water-bleed);
    animation: wash-bloom 2.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.15s;
    --wash-final-opacity: 0.7;
    width: 130% !important;
    height: 55% !important;
    left: -18% !important;
    top: 24% !important;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  }
}

@media (max-width: 900px) {
  .hero-inner { padding-top: 40px; gap: 22px; }
  .intro-grid { grid-template-columns: 1fr; gap: 60px; }
  .intro-photo { max-width: 480px; margin: 0 auto; }
  .explore-grid { grid-template-columns: repeat(6, 1fr); }
  .card-info, .card-rules, .card-staff,
  .card-menu, .card-services, .card-journal { grid-column: span 3; margin-top: 0; }
}

@media (max-width: 768px) {
  /* 手機版水墨改成上下排列，透明度差距縮小 */
  .wash-a {
    --wash-final-opacity: 0.9;
    width: 140% !important;
    height: 55% !important;
    left: -20% !important;
    top: -5% !important;
  }
  .wash-b {
    --wash-final-opacity: 0.85;
    width: 130% !important;
    height: 55% !important;
    left: -15% !important;
    top: 48% !important;
  }

  /* nav: hide text links, show hamburger or wrap tightly */
  .nav-links { gap: 4px 12px; font-size: 11.5px; }
  /* hero */
  .hero-zh { font-size: clamp(28px, 16vw, 72px); letter-spacing: 0.1em; }
  .hero-en { font-size: clamp(13px, 2.5vw, 18px); }
  /* explore grid: 2 equal columns */
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .card-info, .card-rules, .card-staff,
  .card-menu, .card-services, .card-journal { grid-column: span 1; margin-top: 0; }
}

@media (max-width: 560px) {
  .explore-grid { grid-template-columns: 1fr; }
  .hero-zh { letter-spacing: 0.08em; }
  .foot-row { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .brand-mark { width: 40px; height: 40px; }
  .brand-zh   { font-size: 17px; }
  .brand-en   { display: none; }
  .hero-zh { font-size: clamp(28px, 16vw, 52px); }
  .nav-links { font-size: 11px; gap: 4px 10px; }
}
