/* Fostier Index — obsidian and jade. */

:root {
  --obsidian: #030A08;
  --deep: #0D3A2C;
  --jade: #2FB487;
  --jade-hi: #6FE0B6;
  --pale: #A9E8CF;
  --mist: #E6EFEA;
  --muted: #8FA59B;
  --line: rgba(169, 232, 207, .16);

  --sans: "Host Grotesk", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--mist);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--jade-hi); outline-offset: 4px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--jade); color: var(--obsidian); font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- 3D stage ---------- */

.stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.no-webgl .stage { background: radial-gradient(60% 50% at 62% 42%, rgba(47, 180, 135, .28), transparent 70%), var(--obsidian); }

.veil { position: fixed; inset: 0; z-index: 1; background: var(--obsidian); opacity: 0; pointer-events: none; }

/* ---------- Header ---------- */

.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 24px;
  padding: 24px var(--gutter);
}
.word { margin-right: auto; text-decoration: none; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.02em; }
.langs { display: flex; gap: 4px; }
.langs a { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: 999px; text-decoration: none; font-size: .9375rem; font-weight: 500; color: var(--muted); }
.langs a:hover { color: var(--mist); }
.langs a[aria-current="page"] { color: var(--mist); box-shadow: inset 0 0 0 1px var(--line); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 26px; border-radius: 999px;
  background: var(--jade); color: var(--obsidian);
  font: 600 1rem/1.15 var(--sans); text-decoration: none; text-align: center;
  box-shadow: 0 0 0 0 rgba(47, 180, 135, 0);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { background: var(--jade-hi); box-shadow: 0 0 40px rgba(47, 180, 135, .45); }
.btn-quiet { min-height: 42px; padding: 0 18px; background: transparent; color: var(--mist); box-shadow: inset 0 0 0 1px var(--line); font-size: .9375rem; }
.btn-quiet:hover { background: rgba(169, 232, 207, .08); box-shadow: inset 0 0 0 1px rgba(169, 232, 207, .4); }

/* ---------- Hero ---------- */

main { position: relative; z-index: 2; }

.hero {
  min-height: calc(100svh - 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  align-items: end;
  gap: 32px 56px;
  padding: 0 var(--gutter) clamp(32px, 6vh, 64px);
  pointer-events: none;
}
.hero a { pointer-events: auto; }

.hero h1 {
  font-size: clamp(4.25rem, 12.5vw, 13rem);
  font-weight: 600;
  line-height: .86;
  letter-spacing: -0.055em;
  margin-left: -0.05em;
  color: var(--mist);
}
:lang(zh-Hant-HK) .hero h1 { font-family: "Noto Sans TC", var(--sans); font-weight: 700; letter-spacing: 0; line-height: 1; font-size: clamp(3.5rem, 10vw, 10rem); }

.hero-side { display: grid; gap: 24px; padding-bottom: .6rem; }
.lede { font-size: 1.125rem; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
:lang(zh-Hant-HK) .lede { line-height: 1.8; }

/* ---------- Scenes after the hero ---------- */

.scene {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(96px, 14vh, 160px) var(--gutter);
}

h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5.6vw, 5.5rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
:lang(zh-Hant-HK) h2 { font-family: "Noto Sans TC", var(--sans); font-weight: 700; letter-spacing: 0; line-height: 1.15; }
.sub { margin-top: 20px; max-width: 46ch; font-size: 1.125rem; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
:lang(zh-Hant-HK) .sub { line-height: 1.8; }

/* Services: a price list on the right, the prism on the left */
.services { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.services-body { grid-column: 2; }
.menu { list-style: none; margin: clamp(40px, 6vh, 64px) 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.menu li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 40px; align-items: baseline;
  padding: 30px 0; border-top: 1px solid var(--line);
}
.menu h3 { margin: 0; font-size: clamp(1.75rem, 2.8vw, 2.5rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.menu-what p { margin-top: 10px; max-width: 44ch; color: var(--muted); text-wrap: pretty; }
.price { display: flex; align-items: baseline; gap: .4em; white-space: nowrap; color: var(--muted); font-size: .9375rem; }
.price b { font-size: clamp(1.375rem, 2vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; color: var(--pale); font-variant-numeric: tabular-nums; }
.price span:empty { display: none; }

/* Consultation: a glass panel on the left, the prism on the right */
.consult { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); padding-block: clamp(64px, 9vh, 120px); }
.panel {
  display: grid; gap: 16px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  background: rgba(5, 18, 14, .66);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 120px -40px rgba(0, 0, 0, .8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.panel h2 { font-size: clamp(2.125rem, 3.6vw, 3.25rem); }
.panel .sub { margin: 0 0 8px; }
.field { display: grid; gap: 8px; }
.field label { font-size: .9375rem; font-weight: 500; color: var(--mist); }
.field input, .field select {
  width: 100%; min-height: 54px; padding: 0 18px;
  border: 1px solid rgba(169, 232, 207, .22); border-radius: 14px;
  background: rgba(3, 10, 8, .7); color: var(--mist);
  font: 400 1rem/1.2 var(--sans);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder { color: rgba(143, 165, 155, .7); }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%236FE0B6' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
.field select:invalid { color: rgba(143, 165, 155, .9); }
.field option { background: #07150f; color: var(--mist); }
.field input:hover, .field select:hover { border-color: rgba(169, 232, 207, .4); }
.field input:focus, .field select:focus { outline: none; border-color: var(--jade-hi); box-shadow: 0 0 0 3px rgba(47, 180, 135, .25); }
.panel .btn { margin-top: 8px; width: 100%; border: 0; cursor: pointer; }
.note { font-size: .875rem; line-height: 1.5; color: var(--muted); }
.note.done { color: var(--pale); }
.fallback { display: grid; gap: 10px; font-size: .875rem; color: var(--muted); }
.fallback[hidden] { display: none; }
.fallback-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel .fallback .btn { width: auto; margin-top: 0; min-height: 40px; padding: 0 16px; font-size: .875rem; cursor: pointer; border: 0; }

/* Footer */
.foot {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 16px 40px;
  padding: 32px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  background: rgba(3, 10, 8, .85);
  font-size: .875rem; color: var(--muted);
}
.foot .word { margin: 0; color: var(--mist); }
.foot-promise { max-width: 60ch; text-wrap: pretty; }
.foot-meta a { color: var(--mist); text-underline-offset: 3px; }

/* 404 */
.lost-page { background: radial-gradient(60% 50% at 70% 40%, rgba(47, 180, 135, .22), transparent 70%), var(--obsidian); min-height: 100vh; }
.lost { display: grid; gap: 24px; justify-items: start; padding: 12vh var(--gutter); }
.lost h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 600; letter-spacing: -0.05em; line-height: .95; }

@media (max-width: 959px) {
  .services, .consult { grid-template-columns: 1fr; }
  .services-body { grid-column: 1; }
  .foot { grid-template-columns: 1fr; }
}

@media (max-width: 959px) {
  .services { align-items: start; padding-top: 38svh; }
  .consult { align-items: start; padding-top: 30svh; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-content: end; gap: 20px; }
  .hero-side { padding-bottom: 0; }
}

@media (max-width: 560px) {
  .top { gap: 8px; padding-block: 16px; }
  .hero .btn { width: 100%; }
  .hero h1 { font-size: clamp(4.25rem, 19vw, 5.25rem); }
  .menu li { grid-template-columns: 1fr; padding: 24px 0; }
  .price { margin-top: 6px; }
  .panel { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

:lang(zh-Hant-HK) .menu-what p, :lang(zh-Hant-HK) .note { line-height: 1.8; }
