/* Wong Cheung Wah U-I Oil — editorial heritage brand site */

:root {
  --cream: #f6f1e8;
  --cream-deep: #ebe4d6;
  --paper: #fdfbf7;
  --ink: #1c1814;
  --ink-soft: #4a443c;
  --ink-muted: #7a7268;
  --red: #9b1c1c;
  --red-soft: rgba(155, 28, 28, 0.08);
  --gold: #b8956a;
  --border: rgba(28, 24, 20, 0.1);
  --shadow: 0 24px 64px rgba(28, 24, 20, 0.08);
  --shadow-soft: 0 8px 32px rgba(28, 24, 20, 0.06);
  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
  --container: min(72rem, calc(100% - 2.5rem));
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font-serif: "Noto Serif TC", "Songti TC", serif;
  --font-sans: "Noto Sans TC", "PingFang TC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  max-width: 62ch;
  margin: 0;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section--paper {
  background: var(--paper);
}

.section-header {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-header--center {
  text-align: center;
}

.section-header--center p {
  margin-inline: auto;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0 0 0.75rem;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--ink-muted);
}

/* Header */
.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(calc(100% - 1.5rem), 68rem);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0.875rem 0.625rem 1rem;
  background: rgba(253, 251, 247, 0.82);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 24, 20, 0.06);
  border-radius: 0;
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand__logo {
	width: 2.5rem;
	height: 2.9rem;
	border-radius: 0;
	object-fit: cover;
	flex-shrink: 0;
}

.brand__text {
  min-width: 0;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__sub {
  font-size: 0.6875rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-desktop a {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 0;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  background: var(--red-soft);
  color: var(--red);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--cream-deep);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}

.menu-toggle:active {
  transform: scale(0.96);
}

.menu-toggle__lines {
  position: relative;
  width: 1.125rem;
  height: 0.75rem;
}

.menu-toggle__lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease), opacity 0.2s;
}

.menu-toggle__lines span:nth-child(1) { top: 0; }
.menu-toggle__lines span:nth-child(2) { top: 0.3125rem; }
.menu-toggle__lines span:nth-child(3) { top: 0.625rem; }

.menu-toggle[aria-expanded="true"] .menu-toggle__lines span:nth-child(1) {
  top: 0.3125rem;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines span:nth-child(3) {
  top: 0.3125rem;
  transform: rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(28, 24, 20, 0.55);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.nav-mobile.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-mobile__panel {
  width: min(24rem, 100%);
  padding: 2rem;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.nav-mobile a {
  display: block;
  padding: 0.875rem 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  transform: translateY(1rem);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease), color 0.2s;
}

.nav-mobile.is-open a {
  transform: translateY(0);
  opacity: 1;
}

.nav-mobile.is-open a:nth-child(1) { transition-delay: 0.05s; }
.nav-mobile.is-open a:nth-child(2) { transition-delay: 0.1s; }
.nav-mobile.is-open a:nth-child(3) { transition-delay: 0.15s; }
.nav-mobile.is-open a:nth-child(4) { transition-delay: 0.2s; }
.nav-mobile.is-open a:nth-child(5) { transition-delay: 0.25s; }

.nav-mobile a:hover {
  color: var(--red);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  padding-block: 7rem 4rem;
  overflow: hidden;
  background-color: var(--cream);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.7;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28, 24, 20, 0.88) 0%, rgba(28, 24, 20, 0.35) 45%, rgba(28, 24, 20, 0.15) 100%),
    linear-gradient(135deg, rgba(155, 28, 28, 0.15), transparent 50%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
  max-width: 40rem;
}

.hero__title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  color: #fff;
  margin: 0;
}

/* Landing hero (centered) */
.hero--landing {
  align-items: center;
  text-align: center;
}

.hero--landing .hero__bg img {
  object-position: center;
  transform: scale(1.1);
}

.hero--landing .hero__overlay {
  background:
    linear-gradient(to bottom, rgba(28, 24, 20, 0.55) 0%, rgba(28, 24, 20, 0.45) 50%, rgba(28, 24, 20, 0.75) 100%),
    linear-gradient(135deg, rgba(155, 28, 28, 0.2), transparent 55%);
}

.hero__content--center {
  max-width: 50rem;
  margin-inline: auto;
  justify-items: center;
  gap: 1.25rem;
}

.hero__est {
  font-family: var(--font-serif);
  font-size: clamp(0.875rem, 2vw, 1rem);
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.hero__title--xl {
	font-size: 4.5rem;
	letter-spacing: 0.02em;
	margin: 0;
	font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
}

.hero__brandmark {
  display: inline-block;
  padding: 0.35rem 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin: 0;
}

.hero__tagline {
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.hero__scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
}

.hero__scroll-arrow {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
  animation: scrollPulse 2s var(--ease) infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-width: 52rem;
  margin-inline: auto;
}

.timeline__item {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding: 0 0 2.5rem 2rem;
  border-left: 2px solid var(--border);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -0.5rem;
  top: 0.4rem;
  width: 0.875rem;
  height: 0.875rem;
  background: var(--red);
  border: 2px solid var(--cream);
}

.timeline__marker {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timeline__year {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.timeline__era {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.timeline__body h3 {
  font-size: 1.25rem;
  margin: 0.25rem 0 0.5rem;
}

.timeline__body p {
  color: var(--ink-soft);
}

/* Essence section */
.subsection {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection__title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.subsection__title--center {
  text-align: center;
  border-bottom: none;
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.cert-card {
  padding: 2rem 1.75rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
}

.cert-card__year {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.cert-card h3 {
  font-size: 1.125rem;
  margin: 0.5rem 0 0.5rem;
}

.cert-card p {
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* Generations */
.generations {
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.timeline--generations .timeline__year {
  font-size: 1.25rem;
  font-variant-numeric: normal;
}

.timeline--generations .timeline__body h3 {
  margin-top: 0;
}

/* Brand quote */
.brand-quote {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 0 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.6;
  color: var(--ink);
  border-top: 1px solid var(--border);
}

/* Split feature */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split__media {
  position: relative;
}

.split__frame {
  padding: 0.5rem;
  background: var(--paper);
  border-radius: calc(var(--radius-lg) + 0.5rem);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.split__frame img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: var(--cream-deep);
}

.split__content {
  display: grid;
  gap: 1.25rem;
}

/* Ingredient list */
.ingredient-grid {
  display: grid;
  gap: 0.75rem;
}

.ingredient-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.ingredient-item:hover {
  border-color: rgba(155, 28, 28, 0.2);
  box-shadow: var(--shadow-soft);
}

.ingredient-item__dot {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.55rem;
  border-radius: 0;
  background: var(--red);
}

.ingredient-item strong {
  color: var(--ink);
  font-weight: 600;
}

.ingredient-item__tag {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--red);
}

.ingredient-item p {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.ingredient-item__classic {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.7;
}

.ingredient-item__benefit::before {
  content: "藥油功效";
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--red);
}

.ingredient-item__benefit {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  color: var(--ink-soft);
}

/* Usage guide rows */
.usage-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--paper);
}

.usage-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s var(--ease);
}

.usage-row:last-child {
  border-bottom: none;
}

.usage-row:hover {
  background: var(--cream-deep);
}

.usage-row__num {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.usage-row__body h4 {
  font-size: 1.0625rem;
  margin: 0 0 0.75rem;
}

.usage-detail {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.usage-detail > div {
  display: grid;
  gap: 0.2rem;
}

.usage-detail dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--red);
}

.usage-detail dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

@media (min-width: 768px) {
  .usage-row {
    grid-template-columns: 5.5rem 1fr;
    padding: 1.75rem 2.25rem;
  }

  .usage-row__num {
    font-size: 2rem;
  }
}

/* Location */
.location-block {
  display: grid;
  gap: 2rem;
  padding: 2rem;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.location-block:last-child {
  margin-bottom: 0;
}

.location-block__title {
  font-size: 1.375rem;
  margin: 0;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 0.35em;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th,
.data-table td {
  padding: 0.875rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  width: 32%;
  font-weight: 600;
  color: var(--ink);
  padding-right: 1rem;
}

.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: none;
}

.map-embed {
  width: 100%;
  height: 16rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--cream-deep);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding-block: 3.5rem 2rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  display: grid;
  gap: 1rem;
}

.footer-brand__logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0;
}

.footer-brand p {
  font-size: 0.9375rem;
  max-width: 28ch;
}

.footer-links {
  display: grid;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .split {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .map-embed {
    height: 20rem;
  }
}

@media (min-width: 1024px) {
  .hero__content {
    max-width: 48rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
