/* 石大 石材美容 — Shared Styles */
:root {
  /* Legacy token names stay available to the inner pages during their refresh. */
  --gold: #D1BCB0;
  --gold-light: #E1CFC2;
  --gold-dim: rgba(209,188,176,0.12);
  --dark: #3B3A36;
  --dark-2: #42413C;
  --dark-3: #4A4943;
  --dark-4: #53524B;
  --text: #F3F1EC;
  --text-muted: #CBC7BF;
  --border: rgba(209,188,176,0.22);
  --sans: 'Noto Sans TC', 'Microsoft JhengHei', Arial, sans-serif;
  --serif: var(--sans);
  --latin-serif: var(--sans);
  --paper: #F3F1EC;
  --paper-alt: #E7E3DB;
  --paper-muted: #62655D;
  --paper-rule: #CDC8BF;
  --ink: #333731;
  --accent: #825341;
  --accent-hover: #6C4334;
  /* Marks point at a place in a photo. Paper and accent already say which photo it is (before / after), so marks get their own colour. */
  --mark: #26302A;
  --page-gutter: clamp(24px, 5vw, 88px);
  /* Stone surfaces: a texture under a veil of the existing flat colour. Raise the veil alpha to quieten the stone. */
  /* The dark stone is a Taiwan-serpentine-like green; the base colour shows while the texture loads. */
  --stone-dark-image: url('/images/surface/stone-serpentine-1600.webp');
  --stone-light-image: url('/images/surface/stone-light-1600.webp');
  --stone-dark-base: #26302A;
  --stone-dark-veil: rgba(30,40,34,.55);
  --stone-light-veil: rgba(243,241,236,.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  background: var(--dark);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: clip;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 20px 60px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(12,12,10,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-logo { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: 6px; color: var(--gold); text-decoration: none; }
.nav-logo span { font-size: 10px; font-family: var(--sans); font-weight: 400; letter-spacing: 4px; color: var(--text-muted); display: block; margin-top: -4px; text-align: center; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 12px; letter-spacing: 2px; font-weight: 400; transition: color 0.2s; text-transform: uppercase; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-cta { background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 10px 24px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; font-family: var(--sans); text-decoration: none; transition: all 0.25s; }
.nav-cta:hover { background: var(--gold); color: var(--dark); }

/* ── FOOTER ── */
footer { background: var(--dark); border-top: 1px solid var(--border); padding: 40px 60px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 6px; color: var(--gold); text-decoration: none; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; letter-spacing: 1px; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 12px; color: rgba(154,149,144,0.4); }

/* ── BUTTONS ── */
.btn-primary { background: var(--gold); color: var(--dark); padding: 14px 36px; font-family: var(--sans); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; text-decoration: none; transition: all 0.25s; display: inline-block; }
.btn-primary:hover { background: var(--gold-light); }
.btn-ghost { color: var(--text-muted); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: color 0.2s; }
.btn-ghost span { transition: transform 0.2s; }
.btn-ghost:hover { color: var(--text); }
.btn-ghost:hover span { transform: translateX(4px); }

/* ── SECTION ── */
.section-eyebrow { font-size: 11px; letter-spacing: 5px; color: var(--gold); text-transform: uppercase; margin-bottom: 14px; }
.section-divider { width: 48px; height: 1px; background: var(--gold); opacity: 0.6; margin-bottom: 28px; }

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.reveal-pending { opacity: 0; transform: translateY(20px); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  z-index: 1001;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--gold);
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(12,12,10,0.98);
  z-index: 800;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 80px 40px 40px;
}
.nav-drawer.open { display: flex; }
.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}
.nav-drawer ul li {
  width: 100%;
  border-bottom: 1px solid var(--border);
}
.nav-drawer ul li:first-child { border-top: 1px solid var(--border); }
.nav-drawer ul a {
  display: block;
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-drawer ul a:hover, .nav-drawer ul a.active { color: var(--gold); }
.nav-drawer .drawer-cta {
  margin-top: 32px;
  background: var(--gold);
  color: var(--dark);
  padding: 16px 48px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-drawer .drawer-cta:hover { background: var(--gold-light); }

/* ── MOBILE ── */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  footer { flex-direction: column; align-items: flex-start; padding: 32px 20px; }
}

/* Shared shell: kept separate from page-specific layouts. */
[hidden] { display: none !important; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--gold); color: var(--dark); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 6px; }
main:focus { outline: none; }
main, section[id] { scroll-margin-top: 108px; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 11000; padding: 12px 20px; background: var(--gold-light); color: var(--dark); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.site-nav { position: sticky; top: 0; min-height: 88px; padding: 16px var(--page-gutter); gap: 28px; z-index: 1000; background: var(--paper); border-color: var(--paper-rule); backdrop-filter: none; -webkit-backdrop-filter: none; }
/* Logo files come from tools/build_brand_logo.py; set only the height so the SVG keeps its proportions.
   Heights keep the English caps near 5-6px or more; do not shrink the lockups that carry them. */
.site-nav .nav-logo { display: block; flex-shrink: 0; line-height: 0; }
.site-nav .nav-logo img { display: block; width: auto; height: 50px; }
.site-nav .nav-logo .logo-narrow { display: none; }
.site-nav .nav-links { display: flex; gap: clamp(20px, 2.4vw, 40px); }
.site-nav .nav-links a { display: block; padding: 10px 0; color: var(--paper-muted); font-size: 14px; letter-spacing: .02em; position: relative; }
.site-nav .nav-links a::after { content: ''; position: absolute; bottom: 3px; left: 0; right: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.site-nav .nav-links a:hover, .site-nav .nav-links a[aria-current="page"] { color: var(--ink); }
.site-nav .nav-links a:hover::after, .site-nav .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav .nav-cta { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 44px; padding: 10px 18px; font-size: 13px; letter-spacing: .02em; background: var(--accent); color: var(--paper); border-color: var(--accent); border-radius: 3px; }
.site-nav .nav-cta:hover { background: var(--accent-hover); color: var(--paper); }
.site-nav :focus-visible, .nav-drawer :focus-visible { outline-color: var(--accent); }
.site-nav .nav-hamburger span { background: var(--ink); }
.site-nav .nav-hamburger { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 12px; flex-shrink: 0; }
.nav-drawer { z-index: 1100; background: var(--paper); color: var(--ink); overflow-y: auto; padding: 110px var(--page-gutter) 40px; justify-content: flex-start; align-items: stretch; }
.drawer-close { position: absolute; top: 16px; right: var(--page-gutter); display: grid; place-items: center; width: 48px; height: 48px; background: none; border: 1px solid var(--paper-rule); color: var(--ink); cursor: pointer; }
.nav-drawer ul { align-items: stretch; max-width: 540px; margin: 0 auto; }
.nav-drawer ul li, .nav-drawer ul li:first-child { border-color: var(--paper-rule); }
.nav-drawer ul a { display: flex; justify-content: space-between; text-align: left; align-items: center; font-family: var(--sans); font-size: clamp(23px, 4vw, 34px); font-weight: 500; padding: 18px 0; letter-spacing: .02em; color: var(--ink); }
.nav-drawer ul a span { font-family: var(--sans); color: var(--accent); font-size: 22px; }
.nav-drawer ul a:hover, .nav-drawer ul a[aria-current="page"] { color: var(--accent); }
.drawer-eyebrow { font-size: 13px; letter-spacing: .02em; color: var(--paper-muted); width: 100%; max-width: 540px; margin: auto auto 24px; }
.nav-drawer .drawer-cta { display: flex; justify-content: space-between; gap: 20px; align-items: center; width: 100%; max-width: 540px; margin: 28px auto 0; padding: 16px 24px; background: var(--accent); color: var(--paper); border-radius: 3px; }
.nav-drawer .drawer-cta:hover { background: var(--accent-hover); }
.drawer-note { font-size: 13px; color: var(--paper-muted); text-align: center; margin: 24px 0 auto; }

.btn-primary { display: inline-flex; gap: 28px; align-items: center; justify-content: center; min-height: 52px; padding: 16px 26px; font-size: 13px; letter-spacing: .06em; }
.btn-ghost { min-height: 44px; font-size: 13px; letter-spacing: .06em; }
.btn-primary .button-arrow { font-size: 20px; line-height: 1; transition: transform .25s; }
.btn-primary:hover .button-arrow { transform: translate(2px,-2px); }
.section-eyebrow { letter-spacing: .2em; }

.site-footer { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 56px 40px; padding: 72px var(--page-gutter) 24px; align-items: start; }
.footer-logo { display: inline-block; line-height: 0; }
.footer-logo img { display: block; width: auto; height: 136px; }
.footer-brand > p { font-size: 13px; color: var(--text-muted); margin-top: 24px; line-height: 1.9; }
.footer-label { font-size: 13px; letter-spacing: .02em; color: var(--text-muted); margin-bottom: 24px; }
.site-footer .footer-links { flex-direction: column; gap: 6px; }
.footer-links a { display: inline-block; padding: 6px 0; min-height: 36px; font-size: 13px; letter-spacing: .05em; }
.footer-inquiry { display: inline-flex; gap: 32px; align-items: center; color: var(--text); text-decoration: none; font-family: var(--sans); font-size: 22px; font-weight: 500; min-height: 44px; }
.footer-inquiry span { color: var(--gold); font-family: var(--sans); }
.footer-faq { display: block; width: fit-content; padding: 10px 0; margin-top: 12px; font-size: 13px; color: var(--text-muted); text-underline-offset: 5px; }
.footer-bottom { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 11px; color: var(--text-muted); }
.footer-bottom .footer-copy { color: var(--text-muted); font-size: 11px; }
.footer-bottom > a { color: var(--text-muted); text-decoration: none; padding: 8px 0; }

/* Stone surfaces: the footer and navigation read as honed slabs; the flat colour stays as the fallback. */
.stone-dark, .site-footer { background: linear-gradient(var(--stone-dark-veil), var(--stone-dark-veil)), var(--stone-dark-base) var(--stone-dark-image) center / cover no-repeat; }
.site-nav { background: linear-gradient(var(--stone-light-veil), var(--stone-light-veil)), var(--paper) var(--stone-light-image) center / cover no-repeat; }

@media (max-width: 700px) {
  :root { --stone-dark-image: url('/images/surface/stone-serpentine-960.webp'); --stone-light-image: url('/images/surface/stone-light-960.webp'); }
}
@media (max-width: 900px) {
  .site-nav { min-height: 76px; gap: 20px; flex-wrap: wrap; }
  .site-nav .nav-links { width: 100%; justify-content: space-between; gap: 10px; }
  .site-nav .nav-cta { display: none; }
  .js .site-nav { flex-wrap: nowrap; }
  .js .site-nav .nav-links { display: none; }
  .js .site-nav .nav-hamburger { display: flex; }
  .site-nav .nav-logo img { height: 46px; }
  .footer-logo img { height: 120px; }
  .site-footer { grid-template-columns: 1.3fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .site-nav .nav-logo .logo-wide { display: none; }
  .site-nav .nav-logo .logo-narrow { display: block; height: 40px; }
  .site-footer { gap: 36px 24px; padding-top: 48px; }
  .footer-inquiry { font-size: 20px; gap: 12px; }
  .footer-bottom > p[lang] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal.reveal-pending { opacity: 1 !important; transform: none !important; }
}

/* One persistent mobile action; the form itself keeps the whole screen for input. */
.mobile-inquiry { display: none; }
.footer-inquiry { white-space: nowrap; }
@media (max-width: 900px) {
  body:has(.mobile-inquiry) { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .mobile-inquiry { display: block; position: fixed; inset: auto 0 0; z-index: 950; padding: 10px var(--page-gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--paper-rule); }
  .mobile-inquiry .btn-primary { display: flex; width: 100%; justify-content: space-between; gap: 20px; min-height: 50px; padding: 12px 22px; border-radius: 3px; background: var(--accent); color: var(--paper); font-size: 15px; letter-spacing: .02em; }
  .mobile-inquiry .btn-primary:hover { background: var(--accent-hover); }
  .mobile-inquiry .btn-primary > span { font-size: 20px; }
  .mobile-inquiry :focus-visible { outline-color: var(--accent); }
  .nav-is-open .mobile-inquiry { visibility: hidden; }
  .site-footer { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
  .footer-label { margin-bottom: 12px; }
}