/* =========================================================
   茂元設計有限公司 — 名片風格一頁式網站
   米白水彩紙底 × 燙金字
   ========================================================= */

:root {
  --paper: #f3ede2;
  --paper-light: #f8f4ec;
  --paper-deep: #e9e0cf;

  /* 鍍金色階：文字皆以金銅色調配，深色用於內文以維持可讀性 */
  --ink: #6b5126;        /* 內文（深金銅） */
  --ink-soft: #7d663c;   /* 次要文字 */
  --gold-900: #5e4415;
  --gold-700: #8a6526;
  --gold-500: #a8823c;
  --gold-300: #d2b87f;
  --gold-100: #efe2bc;
  --hair: rgba(138, 101, 38, 0.26);

  --foil: linear-gradient(100deg,
      #7a5719 0%, #a57d33 14%, #d4b672 27%, #f1e0aa 35%, #c49b4f 46%,
      #8b6526 60%, #b18a43 74%, #e3ca8e 84%, #9a7330 100%);
  --foil-btn: linear-gradient(100deg,
      #6c4e18 0%, #876225 30%, #9c7532 50%, #876225 70%, #6c4e18 100%);

  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --latin: "Cormorant Garamond", "Noto Serif TC", serif;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 76px;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--paper) url("../img/paper.webp") repeat;
  background-size: 1000px 1000px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { overflow-wrap: break-word; }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 18px;
  background: var(--paper-light);
  border: 1px solid var(--gold-500);
  color: var(--gold-700);
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- 燙金字 ---------- */
.foil {
  width: fit-content;
  background-image: var(--foil);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.is-in .foil,
.foil.is-in,
.hero .foil {
  animation: foil-sheen 2.6s var(--ease) both;
}
@keyframes foil-sheen {
  from { background-position: 100% 50%; }
  to   { background-position: 0% 50%; }
}

/* 直排文字（名片上的直式排版） */
.v-latin { font-family: var(--sans); letter-spacing: 0.06em; }
.v-cjk { letter-spacing: 0.32em; }

/* 乾筆刷金線 */
.brush { display: block; overflow: visible; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 50px;
  padding: 0 2em;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-decoration: none;
  border: 1px solid var(--gold-500);
  transition: background-position 0.8s var(--ease), background-color 0.4s, color 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.btn--solid {
  color: #fffaf0;
  border-color: transparent;
  background-image: var(--foil-btn);
  background-size: 220% 100%;
  background-position: 100% 50%;
  box-shadow: 0 10px 24px -14px rgba(94, 68, 21, 0.7);
}
.btn--solid:hover { background-position: 0% 50%; box-shadow: 0 14px 28px -14px rgba(94, 68, 21, 0.8); }
.btn--ghost {
  color: var(--gold-700);
  background-color: rgba(255, 252, 245, 0.35);
}
.btn--ghost:hover { background-color: rgba(210, 184, 127, 0.18); border-color: var(--gold-700); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.4s, box-shadow 0.4s;
}
.site-header.is-scrolled {
  background: var(--paper) url("../img/paper.webp");
  background-size: 1000px 1000px;
  box-shadow: 0 1px 0 var(--hair), 0 10px 30px -24px rgba(94, 68, 21, 0.5);
}
.site-header__inner {
  max-width: 1440px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  position: relative;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand__mark { width: 34px; height: 36px; flex: none; }
.brand__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.34em;
  color: var(--gold-700);
}

.site-nav ul {
  display: flex;
  gap: clamp(22px, 3.2vw, 48px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  font-size: 14.5px;
  line-height: 1.35;
  letter-spacing: 0.22em;
  text-decoration: none;
  color: var(--ink);
}
.site-nav__en {
  font-family: var(--latin);
  font-style: italic;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: var(--gold-500);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: -2px;
  height: 1px;
  background: var(--gold-500);
  transition: left 0.35s var(--ease), right 0.35s var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after { left: 0; right: 0.22em; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: 1440px;
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(28px, 6vh, 72px)) var(--gutter) clamp(72px, 10vh, 110px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}

/* 名片構圖：logo 在上，金線向下延伸，直排文字在線左側，公司資訊在線右下 */
.hero__card {
  display: grid;
  grid-template-columns: auto clamp(18px, 1.7vw, 26px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(10px, 1.1vw, 16px);
  min-height: min(72svh, 740px);
}
.hero__logo {
  grid-column: 1 / 4;
  grid-row: 1;
  width: clamp(112px, 11vw, 168px);
  height: auto;
  margin: 0 0 clamp(8px, 1.6vh, 18px) -6px;
  animation: rise 1.4s var(--ease) both;
}
.hero__vertical {
  grid-column: 1;
  grid-row: 2;
  margin: 6px 0 0;
  writing-mode: vertical-rl;
  display: flex;
  gap: 1.5em;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  animation: fade 1.4s 0.9s var(--ease) both;
}
.hero__rule {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 240px;
  transform-origin: top center;
  animation: draw 1.8s 0.35s cubic-bezier(0.6, 0.05, 0.2, 1) both;
}
.hero__copy {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  padding-left: clamp(6px, 1vw, 14px);
}
.hero__copy > * { animation: rise 1.3s var(--ease) both; }
.hero__copy > :nth-child(1) { animation-delay: 0.7s; }
.hero__copy > :nth-child(2) { animation-delay: 0.8s; }
.hero__copy > :nth-child(3) { animation-delay: 0.95s; }
.hero__copy > :nth-child(4) { animation-delay: 1.05s; }
.hero__copy > :nth-child(5) { animation-delay: 1.15s; }

.eyebrow {
  margin: 0 0 0.5em;
  font-family: var(--latin);
  font-style: italic;
  font-size: clamp(16px, 1.35vw, 19px);
  letter-spacing: 0.14em;
  color: var(--gold-500);
}
.hero__title {
  margin: 0 0 0.32em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(50px, 7vw, 108px);
  line-height: 1.12;
  letter-spacing: 0.14em;
}
.hero__lead {
  margin: 0 0 1em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 1.9vw, 27px);
  line-height: 1.75;
  letter-spacing: 0.16em;
  color: var(--gold-700);
}
.hero__sub {
  margin: 0 0 2.2em;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.hero__sub span { display: inline-block; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__visual {
  justify-self: end;
  width: 100%;
  max-width: 620px;
  margin: 0;
  animation: fade 1.6s 0.4s var(--ease) both;
}
.hero__visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 76svh;
  object-fit: cover;
}
.hero__visual figcaption {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-top: 26px;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}
.hero__visual figcaption span {
  font-family: var(--latin);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--gold-500);
}

/* 金色細框，錯位於照片後方 */
.frame { position: relative; isolation: isolate; }
.frame::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--gold-300);
  z-index: -1;
  pointer-events: none;
}
.hero__visual.frame::before { bottom: 30px; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--latin);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold-500);
  text-decoration: none;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--gold-500), transparent);
  animation: cue 2.4s var(--ease) infinite;
  transform-origin: top;
}

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(96px, 12vw, 168px) 0; }
.section--tint { background: linear-gradient(rgba(214, 192, 148, 0.14), rgba(214, 192, 148, 0.14)); }
.section--tint::before,
.section--tint::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-300) 20%, var(--gold-300) 80%, transparent);
  opacity: 0.6;
}
.section--tint::before { top: 0; }
.section--tint::after { bottom: 0; }

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 18px;
  margin-bottom: clamp(48px, 6.5vw, 92px);
}
.sec-head__num,
.sec-head__en {
  font-family: var(--latin);
  font-style: italic;
  font-size: 20px;
  color: var(--gold-500);
}
.sec-head__en {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  letter-spacing: 0.1em;
}
.sec-head__en::before {
  content: "";
  width: 56px;
  height: 1px;
  background: var(--gold-300);
}
.sec-head__title {
  flex-basis: 100%;
  margin: 0.2em 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 1.35;
  letter-spacing: 0.24em;
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: center;
}
.about__lead {
  margin: 0 0 1.2em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(25px, 2.6vw, 36px);
  line-height: 1.75;
  letter-spacing: 0.14em;
}
.about__text p:not(.about__lead) {
  max-width: 33em;
  margin: 0 0 1.3em;
  font-size: 16.5px;
  line-height: 2.1;
}

.about__visual { position: relative; padding: 0 0 14% 0; }
.about__img { margin: 0; }
.about__img--main { width: 76%; margin-left: auto; }
.about__img--main img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__img--sub {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46%;
  padding: 10px;
  background: var(--paper-light) url("../img/paper.webp");
  background-size: 700px;
  box-shadow: 0 24px 44px -24px rgba(94, 68, 21, 0.45);
}
.about__img--sub img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about__vertical {
  position: absolute;
  top: 0;
  left: 4%;
  margin: 0;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 1.4em;
  font-size: 13.5px;
  line-height: 1;
  color: var(--ink-soft);
}
.about__vertical::after {
  content: "";
  width: 1px;
  height: 90px;
  background: linear-gradient(var(--gold-500), transparent);
}

.pillars {
  list-style: none;
  margin: clamp(80px, 10vw, 140px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
}
.pillar { padding: 40px clamp(20px, 3vw, 44px) 8px; }
.pillar + .pillar { border-left: 1px solid var(--hair); }
.pillar:first-child { padding-left: 0; }
.pillar__num {
  font-family: var(--latin);
  font-style: italic;
  font-size: 18px;
  color: var(--gold-500);
}
.pillar__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.3em;
  color: var(--gold-700);
}
.pillar__title span {
  font-family: var(--latin);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--gold-500);
}
.pillar p { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* ---------- Services ---------- */
.scope {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.scope__item {
  position: relative;
  padding: clamp(36px, 3.6vw, 56px) clamp(24px, 2.6vw, 40px) clamp(36px, 3.4vw, 52px);
  background: rgba(255, 252, 244, 0.5);
  border: 1px solid var(--hair);
  transition: border-color 0.5s, transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.scope__item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(24px, 2.6vw, 40px);
  width: 44px;
  height: 2px;
  background: var(--foil);
}
.scope__item:hover {
  border-color: var(--gold-300);
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -30px rgba(94, 68, 21, 0.5);
}
.scope__en {
  font-family: var(--latin);
  font-style: italic;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--gold-500);
}
.scope__title {
  margin: 4px 0 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(23px, 2vw, 28px);
  letter-spacing: 0.3em;
  color: var(--gold-700);
}
.scope__item p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.process {
  margin-top: clamp(80px, 9vw, 128px);
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 2.25fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.process__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(25px, 2.4vw, 34px);
  letter-spacing: 0.2em;
  line-height: 1.5;
}
.process__title small {
  display: block;
  margin-top: 6px;
  font-family: var(--latin);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--gold-500);
}
.process__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.process__steps li {
  position: relative;
  padding: 30px 20px 0 0;
  border-top: 1px solid var(--gold-300);
}
.process__steps li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 5px var(--paper);
}
.process__num {
  display: block;
  font-family: var(--latin);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  color: var(--gold-300);
}
.process__steps strong {
  display: block;
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.22em;
  color: var(--gold-700);
}
.process__steps p { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--ink-soft); }

/* ---------- Works ---------- */
.works__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--hair);
}
.works__tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px clamp(14px, 2vw, 30px) 18px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: clamp(16px, 1.45vw, 19px);
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.works__tab small {
  font-family: var(--latin);
  font-style: italic;
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold-500);
}
.works__tab::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: -1px;
  height: 2px;
  background: var(--foil);
  transition: left 0.45s var(--ease), right 0.45s var(--ease);
}
.works__tab:hover { color: var(--gold-700); }
.works__tab[aria-selected="true"] { color: var(--gold-700); font-weight: 600; }
.works__tab[aria-selected="true"]::after { left: 12px; right: 12px; }

.works__panel[hidden] { display: none; }
.works__panel.is-entering { animation: rise 0.9s var(--ease) both; }

.works__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(20px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 52px);
}
.works__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.3;
  letter-spacing: 0.2em;
}
.works__en {
  display: block;
  margin-top: 4px;
  font-family: var(--latin);
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--gold-500);
}
.works__desc { max-width: 36em; margin: 0 0 14px; }
.works__rooms {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.works__rooms li { display: inline-flex; align-items: center; gap: 10px; }
.works__rooms li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--gold-500);
  transform: rotate(45deg);
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(140px, 17vw, 236px);
  gap: clamp(10px, 1.3vw, 18px);
}
.tile { grid-column: span 4; min-width: 0; }
.tile:first-child { grid-column: span 8; grid-row: span 2; }
.gallery--7 .tile:nth-child(6) { grid-row: span 2; }
.gallery--7 .tile:nth-child(7) { grid-column: span 8; }

.tile__btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--paper-deep);
  cursor: zoom-in;
}
.tile__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.tile__btn::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 244, 214, 0.75);
  opacity: 0;
  transition: opacity 0.6s var(--ease), inset 0.6s var(--ease);
}
.tile__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 48px 22px 18px;
  background: linear-gradient(transparent, rgba(38, 27, 10, 0.6));
  color: #fff8ea;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.tile__cap em {
  font-family: var(--latin);
  font-size: 15px;
  letter-spacing: 0.06em;
}
.tile__btn:hover img,
.tile__btn:focus-visible img { transform: scale(1.045); }
.tile__btn:hover::after,
.tile__btn:focus-visible::after { opacity: 1; inset: 16px; }
.tile__btn:hover .tile__cap,
.tile__btn:focus-visible .tile__cap { opacity: 1; transform: none; }
.tile__btn:focus-visible { outline-offset: 4px; }

@media (hover: none) {
  .tile__cap { opacity: 1; transform: none; padding: 36px 14px 10px; font-size: 13px; }
}

.works__noscript { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}
.contact__lead {
  margin: 0 0 32px;
  font-family: var(--serif);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--gold-700);
}
.info-list { margin: 0 0 36px; border-top: 1px solid var(--hair); }
.info-list > div {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--hair);
}
.info-list dt {
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--gold-500);
  padding-top: 2px;
}
.info-list dd { margin: 0; letter-spacing: 0.08em; }
.info-list a,
.site-footer a {
  text-decoration: none;
  background-image: linear-gradient(var(--gold-300), var(--gold-300));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.4s var(--ease), color 0.3s;
}
.info-list a:hover,
.site-footer a:hover { color: var(--gold-900); background-size: 0% 1px; }

.contact__cards-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.3em;
  color: var(--gold-700);
}
.contact__cards-title .v-latin {
  font-family: var(--latin);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  color: var(--gold-500);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

/* ---------- 名片（50 × 90 mm 直式） ---------- */
.bcard {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 50 / 90;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-light) url("../img/paper.webp");
  background-size: 640px;
  box-shadow:
    0 1px 1px rgba(94, 68, 21, 0.08),
    0 16px 30px -14px rgba(94, 68, 21, 0.3),
    0 36px 60px -36px rgba(94, 68, 21, 0.3);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}
.cards li:nth-child(1) .bcard { transform: rotate(-1.4deg); }
.cards li:nth-child(2) .bcard { transform: rotate(0.6deg) translateY(14px); }
.cards li:nth-child(3) .bcard { transform: rotate(1.6deg); }
.cards li .bcard:hover,
.cards li .bcard:focus-within {
  transform: translateY(-8px);
  box-shadow:
    0 1px 1px rgba(94, 68, 21, 0.08),
    0 26px 40px -18px rgba(94, 68, 21, 0.35),
    0 50px 80px -40px rgba(94, 68, 21, 0.35);
}
.bcard__logo {
  position: absolute;
  left: 9%;
  top: 6.5%;
  width: 33%;
  height: auto;
}
/* 位置比例取自實體名片：直排文字在金線左側，公司資訊在金線右下 */
.bcard__rule {
  position: absolute;
  left: 15.5%;
  top: 24.5%;
  bottom: 3%;
  width: 4.4cqw;
}
.bcard__vertical {
  position: absolute;
  left: 7%;
  top: 27.5%;
  bottom: 3.5%;
  margin: 0;
  writing-mode: vertical-rl;
  display: flex;
  gap: 0.95em;
  font-size: 5cqw;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
}
.bcard__vertical > * { flex: none; }
.bcard__name { font-size: 5.8cqw; letter-spacing: 0.18em; }
.bcard__phone { text-decoration: none; letter-spacing: 0.06em; }
.bcard__phone:hover { color: var(--gold-900); }
.bcard__info {
  position: absolute;
  left: 22%;
  right: 3%;
  bottom: 3.5%;
  display: flex;
  flex-direction: column;
  font-size: 4.5cqw;
  line-height: 1.45;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink-soft);
}
.bcard__info strong {
  margin-bottom: 0.25em;
  font-size: 6.6cqw;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 64px 0 44px;
  text-align: center;
}
.site-footer__inner { display: grid; justify-items: center; gap: 18px; }
.brand--footer .brand__mark { width: 42px; height: 44px; }
.brand--footer .brand__name { font-size: 17px; letter-spacing: 0.28em; }
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 28px;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.site-footer__copy {
  margin: 10px 0 0;
  font-family: var(--latin);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--paper) url("../img/paper.webp");
  background-size: 1000px;
}
.lightbox::backdrop { background: rgba(40, 30, 15, 0.45); }
.lightbox[open] { animation: fade 0.45s var(--ease) both; }
.lightbox__inner {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  padding: 64px 16px 28px;
}
.lightbox__figure {
  height: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100dvh - 190px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 60px -30px rgba(60, 40, 10, 0.5);
}
.lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 22px;
  font-size: 14px;
  letter-spacing: 0.22em;
}
.lightbox__style {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--gold-700);
}
.lightbox__room { color: var(--ink-soft); }
.lightbox__close,
.lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  color: var(--gold-700);
  background: rgba(255, 252, 245, 0.6);
  border: 1px solid var(--hair);
  border-radius: 50%;
  font-family: var(--latin);
  line-height: 1;
  transition: background-color 0.3s, border-color 0.3s;
}
.lightbox__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 48px;
  height: 48px;
  font-size: 30px;
}
.lightbox__nav { width: 56px; height: 56px; font-size: 34px; justify-self: center; }
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(210, 184, 127, 0.25); border-color: var(--gold-500); }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .process { grid-template-columns: minmax(0, 1fr); }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .contact__info { max-width: 640px; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  /* 手機選單 */
  .nav-toggle {
    position: relative;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-right: -10px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav-toggle__bar,
  .nav-toggle__bar::before,
  .nav-toggle__bar::after {
    display: block;
    width: 26px;
    height: 1.5px;
    background: var(--gold-700);
    transition: transform 0.4s var(--ease), background-color 0.3s;
  }
  .nav-toggle__bar { position: relative; }
  .nav-toggle__bar::before,
  .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bar::before { transform: translateY(-8px); }
  .nav-toggle__bar::after { transform: translateY(8px); width: 18px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: rotate(-45deg); width: 26px; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper) url("../img/paper.webp");
    background-size: 1000px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s var(--ease), visibility 0.45s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 30px; text-align: center; }
  .site-nav a { font-family: var(--serif); font-size: 22px; letter-spacing: 0.3em; }
  .site-nav__en { font-size: 16px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-bottom: 72px;
    gap: 56px;
  }
  .hero__card { min-height: min(78svh, 640px); }
  .hero__visual { justify-self: stretch; max-width: none; padding-right: 18px; }
  .hero__visual img { aspect-ratio: 4 / 3.4; max-height: none; }
  .scroll-cue { display: none; }

  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .about__visual { max-width: 560px; }

  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillar { padding: 28px 0 24px; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--hair); }

  .scope { grid-template-columns: minmax(0, 1fr); }
  .process__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }

  .works__intro { grid-template-columns: minmax(0, 1fr); align-items: start; }

  .cards {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 70%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter));
    padding: 18px var(--gutter) 40px;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .cards::-webkit-scrollbar { display: none; }
  .cards li { scroll-snap-align: start; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }

  .hero { padding-top: calc(var(--header-h) + 24px); gap: 48px; }
  .hero__card { min-height: min(74svh, 600px); column-gap: 10px; }
  .hero__logo { width: 96px; }
  .hero__vertical { font-size: 13px; gap: 1.3em; }
  .hero__rule { min-height: 200px; }
  .hero__title { font-size: clamp(44px, 13vw, 56px); letter-spacing: 0.1em; }
  .hero__lead { font-size: 19px; letter-spacing: 0.12em; }
  .hero__sub { font-size: 13px; letter-spacing: 0.12em; }
  .hero__actions .btn { padding: 0 1.4em; letter-spacing: 0.2em; }
  .frame::before { inset: 12px -12px -12px 12px; }
  .hero__visual { padding-right: 12px; }

  .sec-head__title { letter-spacing: 0.18em; }
  .about__img--main { width: 84%; }
  .about__vertical { display: none; }

  .process__steps { grid-template-columns: minmax(0, 1fr); }
  .process__steps li { padding-right: 0; }

  .works__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .works__tabs::-webkit-scrollbar { display: none; }
  .works__tab { flex: none; padding: 12px 14px 16px; }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 34vw;
    gap: 8px;
  }
  .gallery .tile,
  .gallery--7 .tile:nth-child(6),
  .gallery--7 .tile:nth-child(7) { grid-column: span 1; grid-row: span 1; }
  .gallery .tile:first-child,
  .gallery .tile:last-child:nth-child(even) { grid-column: span 2; grid-row: span 2; }

  .info-list > div { grid-template-columns: 5.6em minmax(0, 1fr); gap: 10px; }

  .lightbox__inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 64px 12px 20px;
    row-gap: 16px;
  }
  .lightbox__figure { grid-column: 1 / -1; grid-row: 1; }
  .lightbox__figure img { max-height: calc(100dvh - 230px); }
  .lightbox__nav--prev { grid-column: 1; grid-row: 2; justify-self: end; margin-right: 12px; }
  .lightbox__nav--next { grid-column: 2; grid-row: 2; justify-self: start; margin-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 右下角浮動聯繫 ---------- */
.float-contact {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  animation: rise 0.9s 1.2s var(--ease) both;
}
.float-contact__btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.float-contact__btn--phone {
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: 5px;
  border-radius: 50%;
  color: var(--gold-700);
  background: var(--paper-light) url("../img/paper.webp");
  background-size: 600px;
  border: 1px solid var(--gold-300);
  box-shadow: 0 10px 24px -12px rgba(94, 68, 21, 0.45);
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.float-contact__btn--phone svg { width: 22px; height: 22px; }
.float-contact__btn--phone:hover { transform: translateY(-2px); border-color: var(--gold-500); }

.float-contact__btn--line { gap: 12px; }
.float-contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #06c755;
  box-shadow:
    0 0 0 3px var(--paper-light),
    0 0 0 4px var(--gold-300),
    0 14px 30px -12px rgba(6, 120, 60, 0.55);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.float-contact__icon svg { width: 36px; height: 36px; }
.float-contact__label {
  padding: 9px 16px;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--gold-700);
  background: var(--paper-light) url("../img/paper.webp");
  background-size: 600px;
  border: 1px solid var(--gold-300);
  border-radius: 999px;
  box-shadow: 0 10px 24px -14px rgba(94, 68, 21, 0.45);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.float-contact__btn--line:hover .float-contact__icon { transform: translateY(-2px) scale(1.04); }
.float-contact__btn--line:hover .float-contact__label { transform: translateX(-4px); }

@media (max-width: 640px) {
  .float-contact { right: max(14px, env(safe-area-inset-right)); gap: 10px; }
  .float-contact__label { display: none; }
  .float-contact__icon { width: 54px; height: 54px; }
  .float-contact__btn--phone { width: 44px; height: 44px; }
}

/* ---------- 圖片防拷貝（嚇阻用） ----------
   圖片不接收滑鼠／觸控事件：右鍵、長按點到的是外框而不是圖片，
   因此不會出現「另存圖片」「儲存影像」；點擊照常由外層按鈕處理。 */
.tile img,
.lightbox__figure img,
.hero__visual img,
.about__img img {
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.tile, .lightbox__figure, .hero__visual, .about__img { -webkit-touch-callout: none; }
