:root {
  color-scheme: light;
  --ink: #241a16;
  --earth: #33241e;
  --paper: #f6eee1;
  --muted: #6f5447;
  --line: #d8c9b5;
  --gold: #e8b875;
  --cream: #f7ede0;
  --display: "Noto Serif Thai", "Leelawadee UI", Georgia, serif;
  --body: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.65; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h2, h3 { font-family: var(--display); line-height: 1.26; text-wrap: balance; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid #a85b2b; outline-offset: 5px; }
.skip { position: absolute; z-index: 2; top: 12px; left: 12px; transform: translateY(-150%); background: var(--paper); padding: 8px 16px; }
.skip:focus { transform: none; }
.frame { width: min(1160px, calc(100% - 96px)); margin-inline: auto; }

.masthead, footer { background: #201611; color: var(--cream); }
.masthead { border-bottom: 1px solid #dca66c2b; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 21px/1 Georgia, serif; letter-spacing: .085em; white-space: nowrap; }
.spark { color: var(--gold); font: 24px/1 Georgia, serif; }
nav { display: flex; align-items: center; gap: clamp(20px, 4vw, 46px); font-size: .92rem; }
nav a, .back-top { text-decoration: none; }
nav a:hover, .back-top:hover { color: var(--gold); }

.hero {
  color: var(--cream);
  background-color: #2a1d17;
  background-image: linear-gradient(90deg, #1e1512 0%, #1e1512ee 18%, #1e151277 46%, #1e151200 72%), url('assets/hero.webp');
  background-position: center, center 55%;
  background-size: cover;
}
.hero-inner { position: relative; display: flex; align-items: center; min-height: clamp(488px, 48vw, 660px); padding-block: 78px; }
.hero-copy { position: relative; }
.eyebrow { display: flex; align-items: center; gap: .85em; font-weight: 600; color: var(--gold); }
.eyebrow span { width: 26px; height: 1px; background: currentColor; }
.hero h1 { margin: 10px 0 18px -.055em; font: 400 clamp(65px, 11vw, 150px)/.98 Georgia, serif; letter-spacing: -.063em; }
.hero-line { margin-bottom: 30px; font-family: var(--display); font-size: clamp(24px, 3.45vw, 42px); font-weight: 600; line-height: 1.35; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; padding: 11px 17px; min-height: 46px; width: fit-content; font-size: .92rem; font-weight: 700; text-decoration: none; }
.button span { font: 1.16rem/1 sans-serif; }
.amber { color: #2c1c13; background: var(--gold); }
.amber:hover { background: #f8d298; }
.ink { color: var(--cream); background: #2b221f; }
.ink:hover { background: #50382a; }
.hero-caption { display: flex; align-items: center; gap: .6em; position: absolute; right: 0; bottom: 20px; color: #ffefd9; font-size: .76rem; text-shadow: 0 1px 8px #120a06, 0 1px 2px #120a06; }
.hero-caption span { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.works { padding-block: 70px 82px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.section-heading h2, .notes h2, .about h2 { font-size: clamp(29px, 4vw, 49px); font-weight: 700; }
.section-heading p { color: var(--muted); }
.featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.23fr); background: #eee1cd; }
.cover-stage { display: grid; place-items: center; padding: 35px 24px; background: radial-gradient(ellipse at 47% 44%, #405365, #172532 77%); }
.cover-stage img { width: min(56%, 234px); height: auto; box-shadow: 5px 15px 25px #0d151be0, -1px 0 2px #f0d8af6e; }
.feature-copy { padding: clamp(26px, 5vw, 66px); align-self: center; }
.genre { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .84rem; font-weight: 650; }
.genre-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.blue { background: #344a69; }
.red { background: #994033; }
.orange { background: #ab5527; }
.green { background: #5f734b; }
.feature-copy h3, .chuan-copy h3 { font-size: clamp(38px, 5vw, 62px); margin: 6px 0 3px; }
.subtitle { font-weight: 700; font-size: clamp(1rem, 1.7vw, 1.27rem); }
.synopsis { margin-top: 14px; max-width: 43ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 19px; margin-top: 25px; }
.text-link { width: fit-content; font-size: .9rem; font-weight: 700; text-underline-offset: 4px; }
.text-link:hover { color: #8a4125; }

.secondary-works { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, .85fr); gap: 24px; margin-top: 24px; }
.chuan-card { position: relative; isolation: isolate; display: flex; min-height: 296px; align-items: end; overflow: hidden; background: #432922; color: var(--cream); }
.chuan-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 51%; }
.chuan-card::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(70deg, #2b1611 6%, #2b1611cf 39%, #2b16111a 78%), linear-gradient(0deg, #281511b0, #28151100 55%); }
.chuan-copy { padding: 24px 28px; }
.chuan-copy .genre { color: #f5d1bb; }
.chuan-copy .genre-dot { background: #ee8c75; }
.chuan-copy h3 { font-size: clamp(37px, 4.3vw, 57px); }
.chuan-copy > p:last-child { margin-top: 7px; max-width: 35ch; }
.other-works { display: grid; align-content: start; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; gap: 18px; padding: 27px 18px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover { background: #ede0cd; }
summary strong { display: block; font-family: var(--display); font-size: 2.05rem; line-height: 1.35; margin-top: 5px; }
.toggle::before { content: '+'; display: block; font: 1.85rem/1 Georgia, serif; color: #7c4e38; }
details[open] .toggle::before { content: '−'; }
details p { padding: 0 20px 23px; color: var(--muted); }

.notes { background: #e9d9c3; border-block: 1px solid #d8c3a8; }
.notes-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: clamp(25px, 7vw, 95px); padding-block: 47px; }
.notes-image img { width: 100%; aspect-ratio: 1.65; height: auto; object-fit: cover; object-position: center; }
.notes h3 { margin: 13px 0 6px; font-size: 1.36rem; }
.notes p { max-width: 48ch; }
.about { display: flex; align-items: start; gap: 25px; padding-block: 64px; }
.author-mark { width: clamp(60px, 10vw, 84px); height: auto; border-radius: 50%; aspect-ratio: 1; }
.about h2 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 9px; }
.about p { max-width: 58ch; }
.back-top { color: #f0d9c4; font-size: .87rem; }

.astrology { background: #ede0ce; border-top: 1px solid var(--line); }
.astrology-inner { padding-block: clamp(42px, 7vw, 84px); }
.astrology-intro { max-width: 760px; margin-bottom: clamp(22px, 4vw, 40px); }
.astrology-kicker, .volume-number { color: #764c34; font-size: .88rem; font-weight: 700; }
.astrology h2 { margin-block: 5px 12px; font-size: clamp(29px, 4vw, 49px); text-wrap: initial; }
.astrology-intro > p:last-child { max-width: 61ch; }
.astrology-set { display: grid; grid-template-columns: minmax(126px, 188px) minmax(0, 1fr); align-items: center; gap: clamp(22px, 6vw, 72px); padding: clamp(22px, 4vw, 46px); background: #30221b; color: var(--cream); }
.astrology-set img { width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: contain; }
.astrology-set h3 { font-size: clamp(30px, 4vw, 47px); }
.astrology-set-copy p { margin-block: 8px 19px; max-width: 45ch; color: #efdbc3; }
.astrology-volumes-title { margin-block: 34px 15px; font-size: clamp(23px, 3vw, 31px); }
.astrology-volumes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); list-style: none; padding: 0; margin: 0; }
.astrology-volumes li { display: flex; flex-direction: column; min-width: 0; padding: clamp(11px, 1.6vw, 18px); background: #faf2e7; border: 1px solid #ddcdb8; }
.astrology-volumes img { width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: contain; background: #f0e4d3; margin-bottom: 13px; }
.astrology-volumes h4 { margin: 3px 0 0; font-family: var(--display); font-size: clamp(1.03rem, 1.6vw, 1.2rem); line-height: 1.35; }
.volume-subtitle { margin-top: 5px; color: var(--muted); font-size: .85rem; }
.astrology-volumes a { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; padding-top: 8px; gap: 5px; }

@media (max-width: 960px) {
  .frame { width: calc(100% - 64px); }
  .section-heading { align-items: start; flex-direction: column; gap: 7px; }
  .feature-copy { padding: 30px; }
  .cover-stage img { width: min(73%, 234px); }
  .astrology-volumes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 690px) {
  .frame { width: calc(100% - 36px); }
  .header-inner, .footer-inner { min-height: 62px; }
  .wordmark { gap: 6px; font-size: 17px; }
  .spark { font-size: 19px; }
  nav { gap: 15px; font-size: .84rem; }
  .hero { background-image: linear-gradient(90deg, #1d1511ee 0%, #1d151194 40%, #1d151112 100%), url('assets/hero.webp'); background-position: center, 63% center; }
  .hero-inner { min-height: 456px; padding-block: 64px; }
  .hero h1 { font-size: clamp(58px, 14vw, 96px); }
  .hero-caption { bottom: 14px; }
  .works { padding-block: 44px 49px; }
  .featured, .secondary-works, .notes-inner { grid-template-columns: 1fr; }
  .cover-stage { padding: 28px 16px; }
  .cover-stage img { width: min(56%, 185px); }
  .feature-copy { padding: 23px 20px 30px; }
  .secondary-works { gap: 19px; margin-top: 19px; }
  .chuan-copy { padding: 20px; }
  .notes-inner { gap: 22px; padding-block: 32px 36px; }
  .about { padding-block: 38px; gap: 17px; }
  .astrology-volumes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .header-inner { gap: 8px; }
  nav { gap: 10px; font-size: .78rem; }
  .astrology-set { grid-template-columns: 1fr; gap: 17px; }
  .astrology-set img { width: min(50%, 155px); }
}

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