/* 媧石皇家 Divine Royal Stones — demo 2 shared foundation.
   Direction: serene, editorial, image-led (Auravell lineage) with a warm natural palette
   and deep royal burgundy as the single accent. Traditional Chinese first. */

:root {
  /* Colour */
  --paper: #F7F2EA;       /* page */
  --sand: #EEE6D9;        /* soft bands */
  --stone: #E2D8C8;       /* cards, image wells */
  --line: #D9CEBE;        /* hairlines */
  --ink: #26201C;         /* text */
  --muted: #6A6058;       /* secondary text */
  --burgundy: #6B1D2C;    /* the accent */
  --burgundy-deep: #4B1320;
  --burgundy-tint: #F2E6E3;
  --brass: #A88A5C;       /* tiny details only */
  --dark: #1D1816;        /* dark bands, footer */
  --on-dark: #F4EDE3;
  --on-dark-muted: #B9AEA2;

  /* Type */
  --f-serif: "Playfair Display", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --f-zh-serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --f-sans: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-num: "Playfair Display", Georgia, serif;

  --fs-display: clamp(2.6rem, 6.2vw, 6.25rem);  /* 100px at 1600 */
  --fs-h1: clamp(2.25rem, 4.6vw, 4.5rem);
  --fs-h2: clamp(1.9rem, 3.4vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 1.6vw, 1.5rem);
  --fs-lead: clamp(1.05rem, 1.25vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-label: .8125rem;

  /* Space + shape */
  --gutter: clamp(20px, 4vw, 48px);
  --sec: clamp(88px, 11vw, 168px);
  --r: 6px;
  --r-lg: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --hd-h: 84px;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hd-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-body)/1.85 var(--f-sans); letter-spacing: .02em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 400; line-height: 1.32; letter-spacing: .02em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--burgundy); color: #fff; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--r); }
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: var(--sec); }
.sec--tight { padding-block: calc(var(--sec) * .6); }
.band-sand { background: var(--sand); }
.band-dark { background: var(--dark); color: var(--on-dark); }
.band-burgundy { background: var(--burgundy-deep); color: var(--on-dark); }

/* ---------- Type helpers ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 500 var(--fs-label)/1.4 var(--f-sans); letter-spacing: .32em; color: var(--burgundy); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.band-dark .eyebrow, .band-burgundy .eyebrow, .on-photo .eyebrow { color: var(--on-dark); }
.display { font-size: var(--fs-display); line-height: 1.16; letter-spacing: .04em; }
.h1 { font-size: var(--fs-h1); line-height: 1.22; letter-spacing: .04em; }
.h2 { font-size: var(--fs-h2); line-height: 1.3; letter-spacing: .03em; }
.h3 { font-size: var(--fs-h3); line-height: 1.5; }
.lead { font-size: var(--fs-lead); line-height: 1.95; color: var(--muted); max-width: 34em; }
.band-dark .lead, .band-burgundy .lead { color: var(--on-dark-muted); }
.muted { color: var(--muted); }
.accent { color: var(--burgundy); }
.band-dark .accent, .band-burgundy .accent, .on-photo .accent { color: #E9C9C3; }
.num { font-family: var(--f-num); font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0; }
.prose { max-width: 38em; }
.prose > * + * { margin-top: 1.2em; }
.sec-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 5vw, 72px); }
.sec-head--split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: 24px 64px; }
.sec-head--center { justify-items: center; text-align: center; }
.sample { display: inline-block; padding: 2px 10px; border: 1px dashed var(--brass); border-radius: 99px; font-size: .75rem; letter-spacing: .1em; color: var(--brass); vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px; border-radius: 99px; overflow: hidden; isolation: isolate;
  font: 500 var(--fs-small)/1 var(--f-sans); letter-spacing: .12em; white-space: nowrap;
  border: 1px solid currentColor; transition: color .45s var(--ease), border-color .45s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fill, var(--ink)); transform: translateY(101%); border-radius: inherit; transition: transform .55s var(--ease); }
.btn::after { content: ""; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); transition: transform .45s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover::after { transform: translateX(4px) rotate(45deg); }
.btn--burgundy { background: var(--burgundy); border-color: var(--burgundy); color: #fff; --fill: var(--burgundy-deep); }
.btn--ghost { color: var(--ink); --fill: var(--ink); }
.btn--ghost:hover { color: var(--paper); }
.btn--light { color: var(--on-dark); --fill: var(--on-dark); }
.btn--light:hover { color: var(--ink); }
.btn--line { background: #06C755; border-color: #06C755; color: #fff; --fill: #05a648; }
.link { display: inline-flex; align-items: center; gap: 10px; padding-bottom: 4px; border-bottom: 1px solid currentColor; font-size: var(--fs-small); letter-spacing: .12em; transition: color .3s, gap .3s var(--ease); }
.link:hover { color: var(--burgundy); gap: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid var(--line); border-radius: 99px; background: transparent; font-size: var(--fs-small); letter-spacing: .06em; transition: background .3s, color .3s, border-color .3s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

/* ---------- Media ---------- */
.media { position: relative; overflow: hidden; background: var(--stone); border-radius: var(--r); }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; }
.ratio-45 { aspect-ratio: 4 / 5; } .ratio-34 { aspect-ratio: 3 / 4; } .ratio-32 { aspect-ratio: 3 / 2; } .ratio-169 { aspect-ratio: 16 / 9; } .ratio-11 { aspect-ratio: 1; }
.media.ratio-45, .media.ratio-34, .media.ratio-32, .media.ratio-169, .media.ratio-11 { max-width: 100%; min-height: 0; }
.caption { margin-top: 12px; font-size: var(--fs-label); letter-spacing: .1em; color: var(--muted); }

/* ---------- Header ---------- */
.hd { position: fixed; inset: 0 0 auto; z-index: 100; color: var(--ink); transition: background-color .5s var(--ease), color .5s var(--ease), transform .6s var(--ease), box-shadow .5s; }
.hd__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--hd-h); gap: 24px; }
.hd--over { color: #fff; }
.hd.is-solid { background: rgba(247, 242, 234, .92); color: var(--ink); backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px); box-shadow: 0 1px 0 var(--line); }
.hd.is-hidden { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; gap: 12px; justify-self: start; }
.logo__seal { width: 36px; height: 36px; color: currentColor; }
.hd.is-solid .logo__seal, .hd:not(.hd--over) .logo__seal { color: var(--burgundy); }
.logo__txt { font: 500 1.3rem/1 var(--f-zh-serif); letter-spacing: .32em; }
.nav { display: flex; gap: clamp(20px, 2.6vw, 40px); }
.nav a { position: relative; padding: 8px 0; font-size: var(--fs-small); letter-spacing: .16em; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.hd__end { justify-self: end; display: flex; align-items: center; gap: 16px; }
.hd__cta { min-height: 44px; padding: 0 20px; font-size: .875rem; }
.hd__cta::after { display: none; }
.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .45s var(--ease), top .45s var(--ease); }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 26px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* Mobile menu */
.menu { position: fixed; inset: 0; z-index: 90; background: var(--paper); padding-top: var(--hd-h); overflow-y: auto; }
.menu[hidden] { display: none; }
.menu__in { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: calc(100% - 24px); padding-block: 24px 40px; }
.menu__nav { display: grid; }
.menu__nav a { display: flex; align-items: baseline; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); font: 400 clamp(1.75rem, 7vw, 2.5rem)/1.3 var(--f-zh-serif); letter-spacing: .12em; }
.menu__nav small { font: 400 .8125rem/1 var(--f-num); color: var(--burgundy); letter-spacing: .1em; }
.menu__foot { display: grid; gap: 20px; color: var(--muted); font-size: var(--fs-small); }
html.menu-open { overflow: hidden; }
html.menu-open .hd { background: var(--paper); color: var(--ink); }

/* Floating LINE + proposal badge */
.line-fab { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #06C755; color: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.18); transition: transform .4s var(--ease); }
.line-fab svg { width: 28px; height: 28px; }
.line-fab:hover { transform: translateY(-3px) scale(1.04); }
.concept { position: fixed; left: 16px; bottom: 16px; z-index: 80; padding: 6px 12px; border-radius: 99px; background: rgba(29,24,22,.82); color: #F4EDE3; font-size: .75rem; letter-spacing: .1em; pointer-events: none; }
html.is-scrolled .concept { opacity: 0; transform: translateY(8px); }
.concept { transition: opacity .5s var(--ease), transform .5s var(--ease); }

/* ---------- Footer ---------- */
.ft { background: var(--dark); color: var(--on-dark); padding-top: clamp(80px, 9vw, 140px); overflow: hidden; }
.ft__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 56px 80px; }
.ft__brand { display: grid; gap: 32px; align-content: start; justify-items: start; }
.ft__lede { font: 400 clamp(1.6rem, 2.6vw, 2.4rem)/1.5 var(--f-zh-serif); letter-spacing: .06em; }
.ft__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; font-size: var(--fs-small); color: var(--on-dark-muted); }
.ft__cols a:hover { color: #fff; }
.ft__cols li + li { margin-top: 10px; }
.ft__h { margin-bottom: 16px; font: 500 var(--fs-label)/1.4 var(--f-sans); letter-spacing: .24em; color: var(--on-dark); }
.ft__h--gap { margin-top: 28px; }
.ft__word { margin-top: clamp(56px, 7vw, 100px); font: 400 clamp(4.5rem, 17vw, 16rem)/1 var(--f-zh-serif); letter-spacing: .14em; color: rgba(244, 237, 227, .1); white-space: nowrap; text-align: center; }
.ft__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 28px; border-top: 1px solid rgba(244, 237, 227, .14); font-size: var(--fs-label); letter-spacing: .1em; color: var(--on-dark-muted); }

/* ---------- Effects (initial states are set by JS only, so content is visible if JS fails) ---------- */
.ch { display: inline-block; will-change: transform, opacity; }
.split-line { display: block; }
[data-img] { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav, .hd__cta { display: none; }
  .burger { display: block; }
  .hd__in { grid-template-columns: 1fr auto; }
}
@media (max-width: 991px) {
  .sec-head--split { grid-template-columns: minmax(0, 1fr); }
  .ft__top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --hd-h: 68px; --fs-body: 1rem; }
  .ft__cols { grid-template-columns: minmax(0, 1fr); }
  .logo__txt { font-size: 1.15rem; }
  .btn { min-height: 48px; padding: 0 22px; }
  .line-fab { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .concept { left: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
