:root {
  --surface: #fcf9f8;
  --surface-dim: #dcd9d9;
  --surface-bright: #fcf9f8;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f6f3f2;
  --surface-container: #f0eded;
  --surface-container-high: #eae7e7;
  --surface-container-highest: #e5e2e1;
  --on-surface: #1c1b1b;
  --on-surface-variant: #444842;
  --outline: #747872;
  --outline-variant: #c4c8c0;
  --primary: #182419;
  --on-primary: #ffffff;
  --primary-container: #2d3a2d;
  --secondary: #715a3e;
  --on-secondary: #ffffff;
  --secondary-container: #fdddb9;
  --background: #fcf9f8;
  --on-background: #1c1b1b;
  --paper: var(--background);
  --ink: var(--primary);
  --body: var(--on-surface-variant);
  --brown: var(--secondary);
  --muted: var(--outline);
  --image-wash: var(--surface-container);
  --white: var(--surface-container-lowest);
  --font-headline: "Noto Serif SC", "Noto Serif", "Songti SC", "SimSun", serif;
  --font-body: "Source Serif 4", "Noto Serif SC", "Songti SC", serif;
  --font-ui: "Hanken Grotesk", "Noto Serif SC", sans-serif;
  --page-width: 100%;
  --margin-desktop: clamp(40px, 5vw, 96px);
  --container-max: 1600px;
  --gutter: 32px;
  --section-gap: 120px;
  --radius: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  width: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: var(--background);
  color: var(--on-background);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--background);
  overflow-x: hidden;
}

.ink {
  pointer-events: none;
  mix-blend-mode: multiply;
  user-select: none;
}

.hero-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-wash .ink-mist {
  position: absolute;
  left: 4%;
  bottom: 6%;
  width: min(48vw, 560px);
  opacity: 0.22;
  animation: mistDrift 32s ease-in-out infinite alternate;
}

.hero-wash .ink-mountains {
  position: absolute;
  right: 5%;
  bottom: 22%;
  width: min(38vw, 460px);
  opacity: 0.18;
}

.philosophy {
  position: relative;
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.4s ease-out, transform 1.4s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Header overlays the full-bleed hero, edges of the window */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 96px;
  padding: 0 var(--margin-desktop);
  background: rgba(252, 249, 248, 0.72);
  border-bottom: 0.5px solid rgba(113, 90, 62, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(24, 36, 25, 0.22);
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--primary);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  cursor: pointer;
}

.lang-toggle:hover {
  background: rgba(24, 36, 25, 0.06);
}

.lang-toggle-compact {
  display: none;
}

html[data-lang="en"] .brand-name {
  font-size: 22px;
  letter-spacing: 0.02em;
  white-space: normal;
  max-width: 11.5em;
  line-height: 1.15;
}

html[data-lang="en"] [data-lang-only="zh"],
html[data-lang="zh"] [data-lang-only="en"] {
  display: none !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 72px;
}

.brand-mark,
.brand img.brand-mark {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-icon {
  width: 19.95px;
  height: 20px;
  overflow: clip;
}

.brand-icon img {
  width: 200%;
  height: 200%;
}

.brand-name {
  color: var(--primary);
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--on-surface-variant);
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  white-space: nowrap;
  position: relative;
  transition: color 0.55s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link.is-active {
  color: var(--primary);
  font-weight: 600;
}

.nav-link:hover {
  color: var(--primary);
}

.btn-reserve {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7.5px 24px 7.89px;
  background: var(--primary);
  border-radius: var(--radius-xl);
  color: var(--on-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.45s ease;
}

.btn-reserve:hover {
  background: var(--primary-container);
}

/* Hero video plays once, then holds its last frame over the still. */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
}

.hero-video.is-on {
  opacity: 1;
}

/* Hero — full viewport, edge to edge like a banner */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  padding-top: 96px;
  overflow: hidden;
  background-color: #e8ebe3;
  background-image: url("assets/ink-landscape-wide.jpg?v=3");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--background);
  animation: paperLift 2.6s ease-out forwards;
  pointer-events: none;
}

.hero-bg {
  display: none;
}

.hero-mist {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 256px;
  background: linear-gradient(to bottom, rgba(252, 249, 248, 0), var(--background));
  pointer-events: none;
}

.hero-logo {
  position: relative;
  z-index: 3;
  width: 320px;
  height: 320px;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeRise 1.9s ease-out 0.85s forwards;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: var(--container-max);
  padding: 20px 28px;
  opacity: 0;
  animation: fadeRise 1.8s ease-out 1.35s forwards;
}

.hero-content::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 120%;
  height: 160%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(24, 36, 25, 0.38) 0%,
    rgba(24, 36, 25, 0.12) 48%,
    transparent 72%
  );
  pointer-events: none;
}

.hero h1 {
  max-width: 672px;
  margin-bottom: 24px;
  color: #ffffff;
  font-family: var(--font-headline);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(24, 36, 25, 0.55),
    0 0 16px rgba(24, 36, 25, 0.4);
}

.hero-lead {
  width: 414px;
  max-width: 576px;
  height: 76.8px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(24, 36, 25, 0.55),
    0 0 14px rgba(24, 36, 25, 0.38);
}

/* English lines are longer than the Chinese, so they wrap and stay centered. */
html[data-lang="en"] .hero h1,
html[data-lang="en"] .hero-lead {
  width: max-content;
  height: auto;
  white-space: normal;
}

html[data-lang="en"] .hero h1 {
  max-width: min(920px, calc(100vw - 48px));
}

html[data-lang="en"] .hero-lead {
  max-width: min(640px, calc(100vw - 48px));
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7.89px;
  opacity: 0;
  animation: fadeRise 1.6s ease-out 2.05s forwards;
}

.hero-scroll span {
  color: var(--secondary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-scroll img {
  width: 16px;
  height: 16px;
}

/* Philosophy — Figma 1:469 */
.philosophy {
  width: 100%;
  padding: var(--section-gap) var(--margin-desktop);
  background: var(--background);
}

.philosophy-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.philosophy-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 640px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  opacity: 0.6;
}

.eyebrow-line {
  width: 32px;
  height: 0.5px;
  background: var(--secondary);
}

.eyebrow-text {
  color: var(--secondary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.philosophy-copy h2 {
  width: 100%;
  margin-top: 24px;
  color: var(--primary);
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
}

.philosophy-body {
  width: 100%;
  margin-top: 23px;
  color: var(--on-surface-variant);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.btn-more {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  padding: 12.5px 33px 12.89px;
  border: 0.5px solid rgba(113, 90, 62, 0.3);
  border-radius: var(--radius-xl);
  color: var(--secondary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.45s ease;
}

.btn-more:hover {
  background: rgba(113, 90, 62, 0.1);
}

.philosophy-visual {
  position: relative;
  width: 100%;
}

.food-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--surface-container);
  border-radius: var(--radius-lg);
}

.food-frame img {
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1024 / 436;
  object-fit: contain;
  object-position: center;
}

.food-seal {
  position: absolute;
  left: -24px;
  bottom: -24px;
  width: 96px;
  height: 96px;
  background: var(--surface-container);
  border: 0.5px solid rgba(113, 90, 62, 0.2);
  border-radius: var(--radius-xl);
}

/* Footer — Figma 1:493 */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 40px 20px 48px;
  background: var(--surface-container-lowest);
  border-top: 0.5px solid rgba(116, 120, 114, 0.1);
}

.footer-brand {
  height: 41.59px;
  color: var(--primary);
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
  opacity: 0.2;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  gap: 24px;
  padding-top: 16px;
}

.footer-links a {
  color: var(--outline);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  padding-top: 16px;
  color: var(--secondary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

#philosophy,
#footer,
#book {
  scroll-margin-top: 0;
}

@keyframes paperLift {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mistDrift {
  from {
    transform: translate3d(0, 8px, 0);
  }
  to {
    transform: translate3d(20px, -12px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::after,
  .hero-logo,
  .hero-content,
  .hero-scroll,
  .hero-wash .ink-mist {
    animation: none !important;
  }

  .hero::after {
    opacity: 0;
  }

  .hero-logo,
  .hero-content,
  .hero-scroll,
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Mobile chrome — hidden on desktop */
.menu-toggle,
.header-lotus,
.nav-backdrop,
.drawer {
  display: none;
}

/* Phone / small tablet */
@media (max-width: 768px) {
  img {
    max-width: 100%;
  }

  body.is-nav-open {
    overflow: hidden;
  }

  .header {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    height: 64px;
    padding: 0 20px;
    background: rgba(252, 249, 248, 0.8);
    border-bottom: 1px solid rgba(116, 120, 114, 0.3);
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle img {
    width: 18px;
    height: 12px;
  }

  .brand {
    justify-content: center;
    height: auto;
    gap: 0;
  }

  .brand-mark,
  .brand img.brand-mark {
    display: none;
  }

  .brand-name {
    font-size: 26px;
    letter-spacing: 0.1em;
    line-height: 1.3;
  }

  html[data-lang="en"] .brand-name {
    font-size: 14px;
    letter-spacing: 0.02em;
    max-width: 8.8em;
    text-align: center;
  }

  .header-lotus {
    display: none;
  }

  .lang-toggle-compact {
    display: inline-flex;
    grid-column: 3;
    justify-self: end;
    min-width: 44px;
    width: auto;
    height: 36px;
    padding: 0 8px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .header-lotus img {
    width: 20px;
    height: 20px;
  }

  .header-end {
    display: none;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 28;
    background: rgba(24, 36, 25, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    width: min(312px, 82vw);
    height: 100%;
    padding: 32px;
    background: rgba(252, 249, 248, 0.96);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateX(-105%);
    transition: transform 0.28s ease;
  }

  body.is-nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.is-nav-open .drawer {
    transform: translateX(0);
  }

  .drawer-title {
    margin-bottom: 8px;
    padding-bottom: 32px;
    color: var(--primary);
    font-family: var(--font-headline);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
  }

  .drawer-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .drawer-link {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    color: var(--on-surface-variant);
    font-family: var(--font-headline);
    font-size: 18px;
    line-height: 1.6;
    border-radius: 12px;
  }

  .drawer-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .drawer-link.is-active {
    color: var(--primary);
    background: rgba(253, 221, 185, 0.2);
  }

  .hero-wash .ink-mountains {
    width: 70%;
    right: -8%;
    bottom: 30%;
    opacity: 0.12;
  }

  .hero-wash .ink-mist {
    width: 86%;
    left: -8%;
    opacity: 0.16;
  }

  .hero {
    height: auto;
    min-height: 100svh;
    padding: 64px 20px 80px;
    background-image: url("assets/ink-landscape-mobile.jpg?v=1");
    background-position: center 28%;
  }

  .hero-video {
    object-position: center 28%;
  }

  .hero-logo {
    width: 192px;
    height: 192px;
    margin: 48px 0 0;
  }

  .hero-content {
    padding: 31px 4px 0;
  }

  .hero h1 {
    max-width: 100%;
    margin-bottom: 16px;
    font-size: 26px;
    letter-spacing: 0.2em;
    white-space: normal;
  }

  html[data-lang="en"] .hero h1 {
    width: 100%;
    letter-spacing: -0.02em;
  }

  html[data-lang="en"] .hero-lead {
    width: 100%;
  }

  .hero-lead {
    width: auto;
    max-width: 100%;
    height: auto;
    font-size: 16px;
    line-height: 1.6;
    white-space: normal;
    color: white;
  }

  .hero-scroll {
    margin-top: 32px;
    padding: 12px 32px;
    background: var(--primary);
    border-radius: 12px;
    gap: 0;
  }

  .hero-scroll span {
    color: var(--on-primary);
  }

  .hero-scroll img {
    display: none;
  }

  .philosophy {
    padding: 64px 20px 80px;
  }

  .philosophy-inner {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 32px;
  }

  .philosophy-copy {
    max-width: none;
    align-items: center;
    text-align: center;
  }

  .philosophy-copy h2 {
    font-size: 28px;
  }

  .philosophy-body {
    font-size: 16px;
  }

  .eyebrow {
    justify-content: center;
  }

  .btn-more {
    margin-top: 28px;
  }

  .philosophy-visual {
    width: 100%;
  }

  .food-frame {
    height: auto;
    border-radius: 12px;
  }

  .footer {
    padding: 32px 20px 40px;
  }

  .footer-copy {
    white-space: normal;
  }

  #philosophy,
  #footer,
  #book {
    scroll-margin-top: 72px;
  }
}
