:root {
  color-scheme: light;
  --page: #faf7f0;
  --paper: #f4e8d7;
  --ink: #33251e;
  --muted: #634e43;
  --accent: #861d22;
  --cta: #821b21;
  --cta-ink: #fff7eb;
  --hairline: #b58d64;
  --faint-line: #d9c9b7;
  --footer: #4a1218;
  --gold: #f1d397;
  --serif: "Noto Serif TC", "Songti TC", "Songti SC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --gutter: clamp(24px, 5.5vw, 96px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #241b19;
  --paper: #32221f;
  --ink: #f9edda;
  --muted: #e0c9b7;
  --accent: #f5bc91;
  --cta: #edc691;
  --cta-ink: #361d1a;
  --hairline: #a88161;
  --faint-line: #5f483d;
  --footer: #321318;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page: #241b19;
    --paper: #32221f;
    --ink: #f9edda;
    --muted: #e0c9b7;
    --accent: #f5bc91;
    --cta: #edc691;
    --cta-ink: #361d1a;
    --hairline: #a88161;
    --faint-line: #5f483d;
    --footer: #321318;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button[hidden] { display: none; }
h1, h2, h3, p { margin: 0; }
img { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: 12px; top: 10px; z-index: 5; padding: 12px 18px; color: var(--cta-ink); background: var(--cta); transform: translateY(-170%); }
.skip:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--faint-line); }
.bar, .collection, .site-footer { padding-inline: var(--gutter); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 1800px; min-height: 78px; margin: auto; }
.brand, .header-nav, .header-nav a, .theme-switch, .hero-button, .product-link, .footer-brand, .footer-shop, .mobile-bar a { display: inline-flex; align-items: center; }
.brand { gap: 10px; min-height: 50px; font-family: var(--serif); font-weight: 700; font-size: 23px; letter-spacing: .12em; }
.brand-mark { position: relative; width: 48px; height: 48px; overflow: hidden; }
.brand-mark img { position: absolute; height: 120%; width: 120%; inset: -10%; }
.mark-dark, .theme-sun { display: none; }
:root[data-theme="dark"] :is(.mark-light, .theme-moon) { display: none; }
:root[data-theme="dark"] :is(.mark-dark, .theme-sun) { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) :is(.mark-light, .theme-moon) { display: none; }
  :root:not([data-theme]) :is(.mark-dark, .theme-sun) { display: block; }
}
.header-nav { gap: clamp(14px, 2vw, 32px); }
.header-nav a { gap: 5px; min-height: 44px; font-size: 15px; letter-spacing: .06em; }
.header-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.theme-switch { justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.theme-switch:hover { color: var(--accent); }
.theme-switch .icon { width: 21px; height: 21px; }

.hero { display: grid; grid-template-columns: 42% 58%; max-width: 1800px; margin: auto; }
.hero-paper, .hero-art { position: relative; min-width: 0; }
.hero-paper {
  display: grid;
  align-content: center;
  min-height: clamp(450px, 42vw, 720px);
  padding: clamp(48px, 5vw, 88px) clamp(34px, 4vw, 75px) clamp(48px, 5vw, 88px) var(--gutter);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(35deg, transparent 0 5px, rgb(135 104 69 / .03) 5px 6px),
    repeating-linear-gradient(130deg, transparent 0 7px, rgb(135 104 69 / .025) 7px 8px);
}
.paper-corners {
  position: absolute;
  inset: clamp(12px, 1.4vw, 26px);
  color: var(--hairline);
  opacity: .8;
  pointer-events: none;
  background:
    linear-gradient(currentColor, currentColor) left 0 top 8px / 30px 1px,
    linear-gradient(currentColor, currentColor) left 8px top 0 / 1px 30px,
    linear-gradient(currentColor, currentColor) right 0 top 8px / 30px 1px,
    linear-gradient(currentColor, currentColor) right 8px top 0 / 1px 30px,
    linear-gradient(currentColor, currentColor) left 0 bottom 8px / 30px 1px,
    linear-gradient(currentColor, currentColor) left 8px bottom 0 / 1px 30px,
    linear-gradient(currentColor, currentColor) right 0 bottom 8px / 30px 1px,
    linear-gradient(currentColor, currentColor) right 8px bottom 0 / 1px 30px;
  background-repeat: no-repeat;
}
.hero-copy { position: relative; }
.season { display: flex; align-items: baseline; gap: .55em; margin-bottom: clamp(14px, 1.8vw, 30px); color: var(--accent); font-family: var(--serif); font-size: clamp(16px, 1.6vw, 25px); letter-spacing: .11em; }
.season span { font-family: Georgia, serif; font-style: italic; letter-spacing: .03em; }
.season::after { content: ""; align-self: center; height: 1px; width: clamp(45px, 7vw, 125px); background-color: var(--hairline); margin-left: .2em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; }
h1 { font-size: clamp(46px, 5.95vw, 106px); line-height: 1.16; letter-spacing: .045em; }
.intro { margin: clamp(18px, 2.3vw, 38px) 0 clamp(18px, 2vw, 34px); font-size: clamp(15px, 1.17vw, 20px); line-height: 1.85; color: var(--muted); letter-spacing: .04em; }
.hero-button { gap: 21px; min-height: 48px; padding: 10px 24px; background: var(--cta); color: var(--cta-ink); font-family: var(--serif); font-weight: 600; letter-spacing: .12em; }
.hero-button .icon, .product-link .icon, .footer-shop .icon { transition: transform .2s ease; }
.hero-button:hover .icon { transform: translateX(4px); }
.hero-art { overflow: hidden; background: #791d1e; }
.hero-art img {
  position: absolute;
  inset: 0 0 0 auto;
  width: 177%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: right center;
}

.collection { max-width: 1680px; margin: auto; padding-block: clamp(50px, 5.2vw, 96px) clamp(55px, 6vw, 108px); scroll-margin-top: 16px; }
.section-heading { display: flex; align-items: center; gap: clamp(20px, 3vw, 55px); margin-bottom: clamp(24px, 2.7vw, 52px); }
.section-heading::after { content: ""; height: 1px; background-color: var(--hairline); flex: 1; }
h2 { font-size: clamp(30px, 3.3vw, 58px); line-height: 1.3; letter-spacing: .055em; }
.products { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(20px, 2.4vw, 46px); }
.product { min-width: 0; }
.product > a { display: flex; height: 100%; flex-direction: column; }
.product-image { overflow: hidden; background: var(--paper); }
.product-image img { width: 100%; height: auto; aspect-ratio: 1; transition: transform .4s ease; }
.product h3 { margin: clamp(16px, 1.5vw, 26px) 0 8px; line-height: 1.55; font-size: clamp(20px, 1.76vw, 31px); }
.product p { color: var(--muted); font-size: clamp(15px, 1.05vw, 18px); line-height: 1.9; margin-bottom: 13px; }
.product-link, .footer-shop { align-self: flex-start; min-height: 44px; gap: .35em; }
.product-link { margin-top: auto; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 1px; }
.product a:hover .product-link .icon, .footer-shop:hover .icon { transform: translate(2px,-2px); }
@media (hover: hover) {
  .product a:hover .product-image img { transform: scale(1.025); }
}

.site-footer { display: flex; align-items: center; justify-content: center; gap: clamp(30px, 5vw, 70px); min-height: 125px; padding-block: 24px; background: var(--footer); color: var(--gold); }
.footer-brand { font-family: var(--serif); font-weight: 600; font-size: 23px; gap: 7px; letter-spacing: .13em; }
.footer-brand img { width: 48px; height: 48px; }
.footer-shop { align-self: center; font-size: 15px; letter-spacing: .04em; }
.site-footer a:focus-visible { outline-color: var(--gold); }
.mobile-bar { display: none; }

@media (max-width: 820px) and (min-width: 681px) {
  .hero-paper { padding-inline: 32px; min-height: 400px; }
  .product h3 { font-size: 19px; }
}
@media (max-width: 680px) {
  :root { --gutter: clamp(20px, 6vw, 36px); }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .bar { min-height: 64px; padding-right: max(11px, calc(var(--gutter) - 8px)); }
  .brand { gap: 5px; font-size: 19px; }
  .brand-mark { width: 41px; height: 41px; }
  .header-nav { gap: 6px; }
  .header-nav a { font-size: 14px; }
  .header-nav .desktop-link, .hero-button, .footer-shop { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-paper { min-height: 0; padding: 35px var(--gutter) 34px; text-align: center; }
  .paper-corners { inset: 12px; }
  .season { justify-content: center; font-size: 16px; margin-bottom: 12px; }
  .season::before, .season::after { content: ""; align-self: center; width: 32px; height: 1px; margin: 0 .18em; background-color: var(--hairline); }
  h1 { font-size: clamp(45px, 12vw, 66px); line-height: 1.14; }
  .intro { margin: 14px 0 0; }
  .hero-art { aspect-ratio: 1.42; }
  .collection { padding-block: 42px 47px; }
  .products { grid-template-columns: 1fr; gap: 32px; }
  .section-heading { gap: 18px; }
  .product + .product { padding-top: 29px; border-top: 1px solid var(--faint-line); }
  h2 { font-size: 31px; }
  .product h3 { font-size: clamp(22px, 5.7vw, 28px); }
  .product p { margin-bottom: 3px; }
  .mobile-bar { position: fixed; z-index: 3; inset: auto 0 0; display: grid; grid-template-columns: 1fr 1fr; padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); gap: 8px; border-top: 1px solid var(--faint-line); background-color: var(--page); }
  .mobile-bar a { justify-content: center; gap: 8px; min-height: 46px; padding: 7px 10px; color: var(--accent); font-size: 15px; font-weight: 600; }
  .mobile-bar .shop { background: var(--cta); color: var(--cta-ink); }
  .site-footer { min-height: 96px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: appear .55s ease-out both; }
  @keyframes appear { from { opacity: .35; transform: translateY(7px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .product a:hover .product-image img, .hero-button:hover .icon, .product a:hover .product-link .icon, .footer-shop:hover .icon { transform: none; }
}
