@font-face {
  font-family: Cormorant;
  src: url("./fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Cormorant;
  src: url("./fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #14110f;
  --black: #100d0b;
  --paper: #f3ebe0;
  --ivory: #f5eee3;
  --gold: #ceb183;
  --gold-dark: #73532d;
  --muted: #c5b8a9;
  --dark-border: #4d4136;
  --light-border: #cbbdab;
  --serif: Cormorant, Georgia, "Noto Serif TC", "Noto Serif Devanagari", serif;
  --sans: system-ui, "Microsoft JhengHei", "Nirmala UI", sans-serif;
  --gutter: clamp(1.25rem, 4.4vw, 4.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font: 1rem/1.65 var(--sans);
}

button, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
figure, p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: absolute;
  z-index: 8;
  inset: 0 auto auto 0;
  padding: 0.75rem 1.25rem;
  background: var(--paper);
  color: var(--ink);
}

.masthead {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid #332b23;
  background: var(--black);
}

.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
  max-width: 94rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-emblem {
  position: relative;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.3rem;
  overflow: hidden;
  mix-blend-mode: screen;
}

.brand-emblem img {
  position: absolute;
  inset: -0.33rem auto auto 50%;
  width: 5.65rem;
  height: auto;
  max-width: none;
  transform: translateX(-50%);
}

.brand-name {
  font: 500 1.7rem/0.8 var(--serif);
  color: var(--ivory);
  white-space: nowrap;
}

.brand-name span {
  display: block;
  margin-top: 0.4rem;
  font: 500 0.61rem/1 var(--sans);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.8rem);
}

.navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--muted);
}

.navigation a:hover, .text-link:hover { color: var(--gold); }

.locale {
  position: relative;
  justify-self: end;
  min-width: 0;
}

.select-wrap { position: relative; }

.select-wrap::after {
  content: "";
  position: absolute;
  inset: calc(50% - 0.27rem) 0.875rem auto auto;
  width: 0.4rem;
  height: 0.4rem;
  border: solid var(--gold);
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

.locale select {
  appearance: none;
  min-height: 2.75rem;
  max-width: 100%;
  border: 1px solid var(--dark-border);
  border-radius: 0;
  padding: 0.46rem 2.2rem 0.46rem 0.85rem;
  background: var(--black);
  color: var(--ivory);
  font-size: 0.875rem;
  cursor: pointer;
}

.locale-error {
  position: absolute;
  inset: calc(100% + 0.5rem) 0 auto auto;
  width: min(15rem, 80vw);
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--dark-border);
  background: var(--black);
  font-size: 0.875rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  min-height: clamp(36rem, 49vw, 49rem);
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(3rem, 7vw, 7rem) var(--gutter);
  padding-inline-start: max(var(--gutter), calc((100vw - 80rem) / 2));
}

.eyebrow {
  margin-bottom: 1.25rem;
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(3.2rem, 5.55vw, 6.25rem);
  line-height: 0.97;
}

h1 span, h1 em { display: block; }
h1 em { color: var(--gold); }

.hero-description {
  max-width: 26rem;
  margin-top: 1.65rem;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.72rem 1.28rem;
  border: 1px solid transparent;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.button-gold {
  margin-top: 2rem;
  background: var(--gold);
  color: var(--black);
}

.button-gold:hover { background: #e7c99b; }
.button-gold:focus-visible { outline-color: var(--ivory); }

.hero-image {
  position: relative;
  min-width: 0;
  background: #987150;
}

.hero-image img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 69% center;
}

.section-inner {
  width: min(100% - var(--gutter) * 2, 76rem);
  margin-inline: auto;
}

.section-shell { padding: clamp(4rem, 8vw, 8rem) 0; }

.product {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
}

.product-grid, .formula-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 8vw, 8rem);
}

.product-photo {
  width: 100%;
  height: auto;
}

.product .eyebrow { color: var(--gold-dark); }

h2 {
  font-size: clamp(2.75rem, 5vw, 5rem);
  line-height: 1.03;
}

.product-content > p:not(.eyebrow) {
  max-width: 29rem;
  margin-top: 1.35rem;
  color: #4f4237;
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 26rem;
  margin: 2.1rem 0 1.35rem;
  border-block: 1px solid var(--light-border);
}

.product-specs div {
  display: grid;
  gap: 0.3rem;
  padding: 0.95rem 0.7rem 1.02rem 0;
}

.product-specs div + div {
  padding-inline-start: 1.25rem;
  border-inline-start: 1px solid var(--light-border);
}

.product-specs dt {
  color: var(--gold-dark);
  font-size: 0.875rem;
}

.product-specs dd {
  margin: 0;
  font: 500 clamp(2.25rem, 4vw, 3rem)/0.9 var(--serif);
}

.product-specs dd span { font: 500 0.875rem var(--sans); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.product .text-link:hover { color: var(--gold-dark); }

.formula-grid { gap: clamp(2rem, 6vw, 6rem); }
.ingredient-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--dark-border);
}

.ingredient-list li {
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--dark-border);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.capsule-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.32;
  min-height: min(16rem, 65vw);
  overflow: hidden;
  border: 1px solid var(--dark-border);
  background: radial-gradient(ellipse at 52% 44%, #5d4231 0, #34261e 48%, #1c1611 100%);
}

.capsule-stage img, .capsule-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.capsule-stage img {
  object-fit: cover;
  object-position: center 52%;
}

.capsule-stage canvas {
  display: block;
  cursor: grab;
  touch-action: pan-y;
}

.capsule-stage canvas:active { cursor: grabbing; }

.capsule-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.capsule-controls {
  display: flex;
  gap: 0.35rem;
}

.capsule-controls button {
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--dark-border);
  padding: 0.25rem 0.65rem;
  background: transparent;
  color: var(--gold);
}

.capsule-controls .capsule-turn {
  font-size: 1.25rem;
  line-height: 1;
}

.capsule-controls button:hover {
  background: #2f241d;
  color: var(--ivory);
}

.portraits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.6rem, 2vw, 1.5rem);
  padding-bottom: clamp(3rem, 7vw, 7rem);
}

.portraits img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 4.8;
  object-fit: cover;
}

.portraits img:first-child { object-position: center 52%; }
.portraits img:last-child { object-position: center top; }

.story {
  border-top: 1px solid var(--dark-border);
  background: #1b1511;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 7vw, 7rem);
}

.story-tagline {
  margin-top: 1rem;
  color: var(--gold);
  font: italic 500 clamp(1.45rem, 2.8vw, 2.1rem)/1.2 var(--serif);
}

.story-intro, .story-details p { color: var(--muted); }

.story-details {
  margin-top: 1.7rem;
  border-top: 1px solid var(--dark-border);
}

.story-details details { border-bottom: 1px solid var(--dark-border); }

.story-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding-block: 0.75rem;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.story-details summary::-webkit-details-marker { display: none; }

.story-details summary::after {
  content: "";
  flex: 0 0 0.7rem;
  width: 0.7rem;
  height: 0.7rem;
  background: linear-gradient(var(--gold), var(--gold)) center / 100% 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) center / 1px 100% no-repeat;
}

.story-details details[open] summary::after { background-size: 100% 1px, 0 0; }
.story-details p { margin-bottom: 1rem; }

.contact {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 7vw, 7rem);
}

.contact-company {
  margin-top: 1.1rem;
  color: #4f4237;
}

.contact address { font-style: normal; }

.contact-info {
  margin: 0;
  border-top: 1px solid var(--light-border);
}

.contact-info div {
  display: grid;
  grid-template-columns: minmax(5rem, 0.35fr) minmax(0, 1fr);
  gap: 0.4rem 1.25rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--light-border);
}

.contact-info dt {
  color: var(--gold-dark);
  font-weight: 550;
}

.contact-info dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.contact-info a { text-underline-offset: 0.22em; }
.contact-info a:hover { color: var(--gold-dark); }

.footer {
  border-top: 1px solid var(--dark-border);
  background: var(--black);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 6rem;
  padding-block: 1rem;
}

.footer-wordmark { font: 500 clamp(1.4rem, 3vw, 1.85rem)/1.15 var(--serif); }

:lang(zh-Hant) h1, :lang(hi) h1 {
  font-size: clamp(2.6rem, 4.5vw, 4.75rem);
  line-height: 1.12;
}

:lang(zh-Hant) h1 em, :lang(hi) h1 em, :lang(zh-Hant) .story-tagline, :lang(hi) .story-tagline { font-style: normal; }
:lang(zh-Hant) h2, :lang(hi) h2 { font-size: clamp(2.35rem, 4.1vw, 4rem); }
:lang(hi) h1, :lang(hi) h2 { line-height: 1.21; letter-spacing: normal; }

@media (max-width: 57rem) {
  .hero-content { padding-inline: var(--gutter); }
  .hero { min-height: 32rem; }
  .product-grid { gap: 2.5rem; }
}

@media (max-width: 43rem) {
  .masthead-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 0.85rem;
    padding-top: 0.55rem;
  }

  .navigation {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .navigation a {
    justify-content: center;
    line-height: 1.3;
    text-align: center;
  }

  .locale { grid-column: 2; grid-row: 1; }
  .hero, .product-grid, .formula-grid, .story-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .hero-content { padding-block: 3.35rem; }
  .hero-image { min-height: clamp(18rem, 82vw, 33rem); }
  .hero-image img { object-position: 66% center; }
  .product-photo { width: 100%; max-height: 36rem; object-fit: cover; }
  .formula-grid { gap: 1.8rem; }
}

@media (max-width: 23rem) {
  .brand { gap: 0.35rem; }
  .brand-name { font-size: 1.45rem; }
  .locale select { padding-inline-start: 0.55rem; }
  .hero-content { padding-block: 2.8rem; }
  .eyebrow { margin-bottom: 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready {
    transition: opacity 560ms ease-out, transform 560ms cubic-bezier(0.2, 0.65, 0.3, 1);
  }

  .reveal-ready.reveal-pending:not(:focus-within) {
    opacity: 0;
    transform: translateY(0.875rem);
    transition: none;
  }

  .reveal-ready:focus-within {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
