/* 4 · Spice Route — editorial food journal: paper, ink, saffron and terracotta */
:root {
  --paper: #f3ead9; --paper2: #eadcc3; --card: #fbf6ec; --ink: #1c1410; --brown: #3b2417; --terra: #c2410c; --saffron: #e3a21a; --olive: #5b6b2f;
  --muted: #6b5a4a; --line: rgba(28, 20, 16, .18);
  --f-disp: 'Fraunces', 'Chonburi', Georgia, serif; --f-body: 'Instrument Sans', 'Sarabun', system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 56px); --wrap: 1300px;
  --bk-bg: var(--card); --bk-surface: #fffdf8; --bk-text: var(--ink); --bk-muted: var(--muted); --bk-line: rgba(28, 20, 16, .2);
  --bk-accent: var(--terra); --bk-on-accent: #fff; --bk-radius: 4px; --bk-font: var(--f-body); --bk-send: #1f8f4e;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .14 0 0 0 0 .08 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body { background: var(--paper) var(--grain); color: var(--ink); font: 400 17px/1.65 var(--f-body); font-variant-numeric: lining-nums; }
html[lang="th"] body { line-height: 1.75; }
h1, h2, h3 { margin: 0; font-family: var(--f-disp); font-weight: 600; letter-spacing: -.02em; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { font-weight: 400; letter-spacing: 0; }
h2 { font-size: clamp(40px, 5.6vw, 84px); line-height: 1; }
html[lang="th"] h2 { font-size: clamp(32px, 4.2vw, 60px); line-height: 1.3; }
em { font-style: italic; color: var(--terra); font-weight: 400; }
.eyebrow { margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--terra); }
html[lang="th"] .eyebrow { letter-spacing: .03em; }
.dek { font-family: var(--f-disp); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--brown); max-width: 46ch; font-weight: 400; }
html[lang="th"] .dek { font-family: var(--f-body); font-size: 19px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; font-weight: 600; text-decoration: none; transition: .25s; cursor: pointer; border-radius: 2px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--terra); }
.btn-line { border: 1px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.ul { color: var(--terra); text-decoration: underline; text-underline-offset: 4px; }
.status { font-size: 12px; font-weight: 600; }
.status.is-open { color: var(--olive); }

/* intro: six spice stripes lift away */
.intro { position: fixed; inset: 0; z-index: 200; display: flex; pointer-events: none; }
.intro i { flex: 1; background: var(--c); animation: stripe .8s cubic-bezier(.7, 0, .2, 1) forwards; }
.intro i:nth-child(1) { animation-delay: 1.1s; } .intro i:nth-child(2) { animation-delay: 1.17s; } .intro i:nth-child(3) { animation-delay: 1.24s; }
.intro i:nth-child(4) { animation-delay: 1.31s; } .intro i:nth-child(5) { animation-delay: 1.38s; } .intro i:nth-child(6) { animation-delay: 1.45s; }
@keyframes stripe { to { transform: translateY(-101%); } }
.intro span { position: absolute; inset: 0; display: grid; place-items: center; font: italic 600 clamp(60px, 12vw, 160px) var(--f-disp); color: #fbf6ec; animation: introTxt 1.2s forwards; }
@keyframes introTxt { 0% { opacity: 0; letter-spacing: .3em; } 40%, 70% { opacity: 1; letter-spacing: -.02em; } 100% { opacity: 0; } }
.no-intro .intro { display: none; }

/* header */
.hd { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 24px; padding: 14px var(--pad); transition: background .3s, box-shadow .3s; }
.hd.scrolled { background: rgba(243, 234, 217, .9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.hd-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: italic 600 26px var(--f-disp); }
.hd-nav { margin-left: auto; display: flex; gap: 26px; }
.hd-nav a { display: flex; gap: 6px; align-items: baseline; text-decoration: none; font-weight: 500; font-size: 15px; }
.hd-nav i { font: italic 400 13px var(--f-disp); color: var(--terra); }
.hd-nav a:hover span { text-decoration: underline; text-underline-offset: 5px; }
.lang { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.lang button { padding: 4px 6px; font-weight: 600; color: var(--muted); }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* cover */
.cover { padding: 92px var(--pad) clamp(50px, 6vw, 90px); max-width: calc(var(--wrap) + var(--pad) * 2); margin: 0 auto; }
.mast { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-block: 3px double var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.mast-mid { font-family: var(--f-disp); font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 400; }
.cover-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 30px clamp(30px, 5vw, 80px); margin-top: clamp(30px, 4vw, 54px); }
.cover-copy { grid-row: 1; }
.cover h1 { font-size: clamp(56px, 8.4vw, 136px); line-height: .92; letter-spacing: -.035em; font-weight: 800; }
html[lang="th"] .cover h1 { font-size: clamp(40px, 5.4vw, 86px); line-height: 1.25; }
.cover h1 em { font-weight: 400; }
.cover-copy .dek { margin: 28px 0 0; }
.cover-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cover-copy > * { animation: rise 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--intro, 1.7s) + var(--i, 0) * .1s); }
.cover-copy > :nth-child(2) { --i: 1; } .cover-copy > :nth-child(3) { --i: 2; } .cover-copy > :nth-child(4) { --i: 3; }
.no-intro { --intro: 0s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.cover-art { grid-row: 1 / span 2; grid-column: 2; position: relative; }
.cover-photo { width: 100%; aspect-ratio: 4 / 5.2; object-fit: cover; filter: saturate(.92) contrast(1.04); animation: reveal 1.4s cubic-bezier(.7, 0, .2, 1) both; animation-delay: calc(var(--intro, 1.7s) - .2s); }
@keyframes reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.cover-disc { position: absolute; left: -16%; bottom: 12%; width: 54%; aspect-ratio: 1; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: 0 30px 60px -20px rgba(28, 20, 16, .5); animation: rise 1s both; animation-delay: calc(var(--intro, 1.7s) + .4s); }
.cover-disc img { width: 84%; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .25)); }
.cover-ring { position: absolute; left: -22%; bottom: calc(12% - 6%); width: 66%; animation: spin 40s linear infinite; pointer-events: none; }
.cover-ring text { font: 600 9.6px var(--f-body); letter-spacing: 2.6px; fill: var(--terra); }
@keyframes spin { to { rotate: 360deg; } }
.caption { margin: 10px 0 0; font: italic 400 14px var(--f-disp); color: var(--muted); text-align: right; }
.toc { grid-row: 2; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); align-self: end; }
.toc a { display: grid; gap: 2px; padding: 16px 16px 0 0; text-decoration: none; }
.toc li + li a { padding-left: 16px; border-left: 1px solid var(--line); }
.toc b { font: italic 400 34px/1 var(--f-disp); color: var(--terra); }
.toc span { font-weight: 600; }
.toc small { color: var(--muted); font-size: 13px; }

/* spice band */
.spice-band { padding: 22px 0; border-block: 1px solid var(--ink); background: var(--brown); color: var(--paper); --mq-gap: 2.6rem; --mq-dur: 44s; }
.spice-band span { display: inline-flex; align-items: center; gap: 2.6rem; font: italic 400 30px var(--f-disp); white-space: nowrap; }
.spice-band span::after { content: '❋'; font-style: normal; color: var(--saffron); font-size: 20px; }

/* signatures */
.sig { padding: clamp(80px, 10vw, 140px) var(--pad) 40px; }
.sig-head { max-width: var(--wrap); margin: 0 auto 30px; }
.sig-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 6vw, 100px); }
.sig-stick { position: sticky; top: 8vh; height: 84vh; display: grid; grid-template-rows: 1fr auto; align-items: center; justify-items: center; gap: 10px; }
.plate-stage { position: relative; width: min(100%, 52vh); aspect-ratio: 1; }
.plate-bg { position: absolute; inset: 9%; border-radius: 50%; background: var(--pc, var(--saffron)); transition: background .8s; box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .18); }
.plate-bg::after { content: ''; position: absolute; inset: -5%; border-radius: 50%; border: 1px dashed var(--ink); opacity: .3; }
.plate-img { position: absolute; inset: 15%; width: 70%; height: 70%; object-fit: cover; border-radius: 50%; border: 8px solid var(--card); box-shadow: 0 24px 40px -16px rgba(28, 20, 16, .55); transition: opacity .5s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.plate-img.out { opacity: 0; transform: scale(.7) rotate(-40deg); }
.orbit { position: absolute; inset: 0; z-index: 2; animation: spin 50s linear infinite; }
.orbit span { position: absolute; left: 50%; top: 50%; translate: -50% -50%; transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1)); padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font: italic 400 15px var(--f-disp); white-space: nowrap; animation: counter 50s linear infinite; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .3); }
html[lang="th"] .orbit span { font: 500 14px var(--f-body); }
@keyframes counter { to { rotate: -360deg; } }
.orbit span.pop { animation: counter 50s linear infinite, chip .6s cubic-bezier(.2, .8, .2, 1.3) both; }
@keyframes chip { from { opacity: 0; scale: .3; } }
.radar-box { display: grid; justify-items: center; }
.radar { width: 230px; overflow: visible; }
.radar .grid { fill: none; stroke: var(--line); }
.radar .axis { stroke: var(--line); }
.radar .shape { fill: rgba(194, 65, 12, .22); stroke: var(--terra); stroke-width: 2; }
.radar .dot { fill: var(--terra); }
.radar text { font: 600 11px var(--f-body); fill: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.radar-cap { margin: 0; font: italic 400 14px var(--f-disp); color: var(--muted); }
.chapter { min-height: 92vh; display: grid; align-content: center; gap: 18px; padding: 6vh 0; opacity: .3; transition: opacity .6s; }
.chapter.on { opacity: 1; }
.chapter .no { font: italic 400 22px var(--f-disp); color: var(--terra); }
.chapter h3 { font-size: clamp(42px, 4.8vw, 72px); line-height: 1; font-weight: 400; font-style: italic; }
html[lang="th"] .chapter h3 { font-style: normal; line-height: 1.3; }
.chapter .alt { margin-top: -10px; color: var(--muted); font-size: 18px; }
.chapter p.story { margin: 0; font-size: 19px; line-height: 1.7; max-width: 44ch; }
.chapter p.story::first-letter { float: left; font: 600 4.2em/.8 var(--f-disp); margin: .08em .1em 0 0; color: var(--terra); }
html[lang="th"] .chapter p.story::first-letter { float: none; font: inherit; margin: 0; color: inherit; }
.chapter .ins b { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin-bottom: 8px; }
.chapter .ins div { display: flex; flex-wrap: wrap; gap: 6px; }
.chapter .ins span { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.chapter .pr { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.chapter .pr b { font-family: var(--f-disp); color: var(--terra); }
.chapter .mob-img { display: none; }

/* words */
.words { padding: clamp(80px, 10vw, 140px) var(--pad); background: var(--ink); color: var(--paper); text-align: center; }
.words .eyebrow { color: var(--saffron); }
.cloud { max-width: 1100px; margin: 30px auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 8px 28px; }
.cloud span { font-family: var(--f-disp); line-height: 1.1; transition: color .3s; }
.cloud span:nth-child(odd) { font-style: italic; color: var(--saffron); }
.cloud span:hover { color: #fff; }
.words-score { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 14px; margin-top: 20px; color: rgba(243, 234, 217, .7); }
.words-score b { font: 800 64px/1 var(--f-disp); color: var(--paper); }
.words .ul { color: var(--saffron); }

/* index */
.index { padding: clamp(80px, 10vw, 140px) var(--pad); max-width: calc(var(--wrap) + var(--pad) * 2); margin: 0 auto; }
.index-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 60px; align-items: end; margin-bottom: 40px; }
.index-head .eyebrow { grid-column: 1 / -1; margin: 0; }
.index-head .dek { margin: 0; }
.sections { position: sticky; top: 66px; z-index: 10; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 10px 0; margin-bottom: 30px; background: var(--paper) var(--grain); border-block: 1px solid var(--ink); }
.sections button { flex: none; display: flex; align-items: baseline; gap: 6px; padding: 6px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border-radius: 2px; }
.sections button i { font: italic 400 13px var(--f-disp); color: var(--terra); }
.sections button[aria-current="true"] { background: var(--ink); color: var(--paper); }
.sections button[aria-current="true"] i { color: var(--saffron); }
.index-body { columns: 2; column-gap: clamp(30px, 5vw, 80px); column-rule: 1px solid var(--line); }
.isec { break-inside: avoid-column; margin-bottom: 38px; scroll-margin-top: 140px; }
.isec-h { display: flex; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 6px; break-after: avoid; }
.isec-h i { font: italic 400 30px var(--f-disp); color: var(--terra); }
.isec-h h3 { font-size: 30px; font-weight: 600; }
html[lang="th"] .isec-h h3 { font-size: 24px; }
.entry { padding: 10px 0; border-bottom: 1px dotted var(--line); break-inside: avoid; cursor: default; }
.entry-top { display: flex; align-items: baseline; gap: 8px; }
.entry-top b { font: 600 19px/1.3 var(--f-disp); }
html[lang="th"] .entry-top b { font: 500 18px/1.45 var(--f-body); }
.entry-top .lead-dots { flex: 1; border-bottom: 2px dotted rgba(28, 20, 16, .35); transform: translateY(-5px); min-width: 20px; }
.entry-top .p { font: 600 18px var(--f-disp); color: var(--terra); white-space: nowrap; }
.entry .alt { font-size: 14px; color: var(--muted); }
.entry .o { font-size: 13.5px; color: var(--brown); margin-top: 2px; }
.entry .o span + span::before { content: ' · '; color: var(--terra); }
.entry .ic { width: 14px; height: 14px; color: var(--terra); vertical-align: -2px; }
.entry[data-preview] .entry-top b { text-decoration: underline; text-decoration-color: rgba(194, 65, 12, .35); text-underline-offset: 4px; }
.fd-peek { border-radius: 50%; width: 230px; aspect-ratio: 1; border: 6px solid var(--card); }

/* reserve */
.reserve { padding: clamp(80px, 10vw, 140px) var(--pad); background: var(--paper2) var(--grain); border-top: 1px solid var(--ink); }
.res-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(30px, 6vw, 90px); align-items: start; }
.res-copy { position: sticky; top: 110px; }
.res-copy .dek { margin: 24px 0 30px; }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--terra); }
html[lang="th"] .facts dt { letter-spacing: .02em; }
.facts dd { margin: 0; font-family: var(--f-disp); font-size: 19px; }
html[lang="th"] .facts dd { font-family: var(--f-body); font-size: 17px; }
.facts a { text-decoration: none; }
.res-card { background: var(--card); padding: clamp(20px, 3vw, 36px); border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }

/* visit */
.visit { padding: clamp(70px, 9vw, 120px) var(--pad); }
.visit-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.map { aspect-ratio: 4 / 3.3; border: 1px solid var(--ink); padding: 8px; background: var(--card); }
.map iframe { width: 100%; height: 100%; border: 0; filter: sepia(.35) saturate(.8); }
.addr { font: 400 20px/1.5 var(--f-disp); margin: 22px 0 0; }
html[lang="th"] .addr { font-family: var(--f-body); font-size: 18px; }

/* footer */
.ft { padding: 60px var(--pad) 110px; border-top: 3px double var(--ink); overflow: hidden; }
.ft-word { font: italic 400 clamp(100px, 25vw, 400px)/.85 var(--f-disp); letter-spacing: -.05em; color: var(--terra); text-align: center; }
.colophon { max-width: var(--wrap); margin: 30px auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.colophon a { text-decoration: none; color: var(--ink); }
.mbar { display: none; }
.fd-toast { background: var(--ink); border-radius: 2px; }

@media (max-width: 1080px) {
  .hd-nav { display: none; }
  .lang { margin-left: auto; }
  .cover-grid { grid-template-columns: 1fr; }
  .cover-art { grid-row: auto; grid-column: auto; width: 82%; margin-left: auto; }
  .toc { grid-row: auto; }
  .sig-grid { grid-template-columns: 1fr; }
  .sig-stick { display: none; }
  .chapter { min-height: 0; opacity: 1; padding: 40px 0; border-top: 1px solid var(--line); }
  .chapter .mob-img { display: block; width: min(300px, 76%); margin: 0 auto; border-radius: 50%; border: 14px solid var(--pc); box-shadow: 0 18px 30px -14px rgba(28, 20, 16, .45); aspect-ratio: 1; object-fit: cover; }
  .index-head { grid-template-columns: 1fr; }
  .res-grid, .visit-grid { grid-template-columns: 1fr; }
  .res-copy { position: static; }
}
@media (max-width: 760px) {
  body { padding-bottom: 70px; }
  .mast .mast-mid { display: none; }
  .cover-art { width: 90%; }
  .cover-disc { left: -10%; width: 50%; }
  .cover-ring { left: -15%; width: 62%; }
  .toc { grid-template-columns: 1fr; }
  .toc li + li a { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-bottom: 12px; }
  .index-body { columns: 1; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .res-card { box-shadow: 6px 6px 0 var(--ink); }
  .mbar { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(243, 234, 217, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--ink); }
  .mbar a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 10px; font-weight: 600; font-size: 14px; text-decoration: none; border: 1px solid var(--ink); }
  .mbar .mbar-main { background: var(--ink); color: var(--paper); }
}
