/* Hong Zhong Mahjong — public site.
   Light: xuan paper + cinnabar red. Dark: mahjong-table green felt + gold. */

:root {
    --bg: #f4ecd8;
    --bg-2: #ede2c6;
    --surface: #fbf6e8;
    --ink: #2b1d16;
    --ink-2: #5d4a3c;
    --line: #d8c9a3;
    --red: #b8231a;
    --red-ink: #ffffff;
    --gold: #9a7420;
    --jade: #1d5a47;
    --tile-face: #fbf8ee;
    --tile-edge: #cfc6ad;
    --tile-back: #1f6b53;
    --shadow: rgba(60, 35, 15, .16);
    --display: 'Ma Shan Zheng', 'Noto Serif SC', serif;
    --serif: 'Noto Serif SC', 'Songti SC', serif;
    --sans: 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

:root[data-theme="dark"] {
    --bg: #0e2a22;
    --bg-2: #0a201a;
    --surface: #143629;
    --ink: #f1e7cc;
    --ink-2: #bdb496;
    --line: #2b5744;
    --red: #e5483a;
    --red-ink: #fff;
    --gold: #dcb75c;
    --jade: #4cb592;
    --tile-face: #f3eedb;
    --tile-edge: #b7ae93;
    --tile-back: #2f8a6a;
    --shadow: rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.7 var(--sans);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { max-width: 100%; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-2); }

/* ---------- masthead ---------- */
.masthead {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.masthead-in { display: flex; align-items: center; gap: 24px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-text strong { display: block; font: 900 17px/1.1 var(--serif); letter-spacing: .01em; }
.brand-text small { color: var(--ink-2); font-size: 12px; letter-spacing: .08em; }

.seal {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; flex: none;
    background: var(--red); color: var(--red-ink);
    font: 400 26px/1 var(--display);
    border-radius: 3px;
    box-shadow: inset 0 0 0 2px color-mix(in srgb, #fff 35%, transparent), 0 1px 0 var(--shadow);
    transform: rotate(-3deg);
}

.nav { display: flex; gap: 4px; }
.nav a {
    padding: 8px 12px; text-decoration: none; font-weight: 500; font-size: 14.5px;
    border-bottom: 2px solid transparent; color: var(--ink-2);
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--red); }

.theme {
    appearance: none; cursor: pointer;
    width: 40px; height: 40px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    border-radius: 50%;
    font: 400 20px/1 var(--display);
    display: grid; place-items: center;
}
.theme:hover { border-color: var(--red); }
.theme .moon, :root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: inline; }

@media (max-width: 860px) {
    .masthead-in { flex-wrap: wrap; padding-block: 10px; gap: 8px 16px; }
    .nav { order: 3; width: 100%; overflow-x: auto; margin-inline: -4px; padding-bottom: 2px; }
    .nav a { white-space: nowrap; }
}

/* ---------- shared type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 900; line-height: 1.2; margin: 0; }
.eyebrow { font: 500 13px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.numeral { font: 400 54px/1 var(--display); color: var(--red); }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); }

/* ---------- mahjong tile ---------- */
.tile {
    --w: 118px;
    position: relative;
    width: var(--w); aspect-ratio: 3 / 4;
    display: grid; place-items: center;
    background: linear-gradient(160deg, var(--tile-face), color-mix(in srgb, var(--tile-face) 88%, #b9ad8a));
    border-radius: calc(var(--w) * .1);
    box-shadow:
        0 0 0 1px var(--tile-edge),
        calc(var(--w) * .07) calc(var(--w) * .09) 0 var(--tile-back),
        calc(var(--w) * .07) calc(var(--w) * .09) 0 1px color-mix(in srgb, var(--tile-back) 70%, #000),
        calc(var(--w) * .16) calc(var(--w) * .2) calc(var(--w) * .2) var(--shadow);
}
.tile > span {
    font: 400 calc(var(--w) * .66)/1 var(--display);
    margin-top: calc(var(--w) * -.03);
}
.tile.zhong > span { color: #c4261b; }
.tile.fa > span { color: #1a7a4c; }
.tile.bai::after {
    content: ''; position: absolute; inset: 16% 18%;
    border: calc(var(--w) * .035) solid #2d5fa8; border-radius: 4px;
}

/* ---------- hero ---------- */
.hero { padding: 64px 0 80px; overflow: hidden; position: relative; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font: 400 clamp(64px, 11vw, 132px)/.95 var(--display); color: var(--red); letter-spacing: .02em; margin: 14px 0 8px; }
.hero .latin { font: 900 clamp(22px, 3vw, 32px)/1.2 var(--serif); }
.hero p.lead { max-width: 34em; font-size: 18px; color: var(--ink-2); margin: 20px 0 28px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
    display: inline-block; text-decoration: none; cursor: pointer;
    padding: 12px 24px; font: 700 15px/1.2 var(--sans); letter-spacing: .02em;
    background: var(--red); color: var(--red-ink); border: 2px solid var(--red);
    border-radius: 3px;
    box-shadow: 3px 3px 0 color-mix(in srgb, var(--red) 40%, #000);
    transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 color-mix(in srgb, var(--red) 40%, #000); }
.btn.alt { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--line); }

.hero-photo { position: relative; padding: 0 28px 28px 0; justify-self: end; width: min(420px, 100%); }
.frame { margin: 0; position: relative; background: var(--surface); padding: 10px; border: 1px solid var(--line); border-radius: 3px; box-shadow: 10px 10px 0 var(--red); }
.frame img { display: block; width: 100%; height: auto; border-radius: 1px; }
:root[data-theme="dark"] .frame { box-shadow: 10px 10px 0 var(--tile-back); }
.hero-photo .tile { position: absolute; z-index: 3; }
.hero-photo .t1 { --w: 92px; left: -34px; bottom: 6px; transform: rotate(-9deg); }
.hero-photo .t2 { --w: 70px; right: 0; top: -22px; transform: rotate(8deg); }
.vert {
    position: absolute; right: -4px; top: 150px; writing-mode: vertical-rl;
    font: 400 22px/1.5 var(--display); color: var(--gold); letter-spacing: .3em; opacity: .85;
}

@media (max-width: 860px) {
    .hero { padding: 36px 0 48px; }
    .hero-in { grid-template-columns: 1fr; }
    .hero-photo { order: -1; justify-self: center; width: min(300px, 86%); }
    .hero-photo .t1 { --w: 72px; left: -26px; }
    .hero-photo .t2 { --w: 56px; }
    .vert { display: none; }
}

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 14px; }
.gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.band { margin: 0 0 14px; height: clamp(220px, 38vw, 430px); overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: #000; }
.band img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 48%; display: block; }
.g-a, .g-d { grid-row: span 2; }
.g-b img { object-position: 50% 45%; }
.gallery video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
@media (max-width: 760px) {
    .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
    .g-a, .g-d { grid-row: span 2; }
}

/* ---------- find us (contact) ---------- */
.find { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.find .frame { box-shadow: 8px 8px 0 var(--red); }
:root[data-theme="dark"] .find .frame { box-shadow: 8px 8px 0 var(--tile-back); }
.find h2 { font-size: clamp(22px, 3vw, 30px); margin: 10px 0 12px; }
.find p { color: var(--ink-2); max-width: 32em; }
@media (max-width: 700px) { .find { grid-template-columns: 1fr; } .find .frame { max-width: 300px; } }

/* ---------- meander border ---------- */
.meander {
    height: 18px;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cpath d='M2 16V2h32v12H8V6h20v4H12' fill='none' stroke='%23b8231a' stroke-width='2' stroke-linejoin='miter'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    opacity: .55;
}
:root[data-theme="dark"] .meander {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cpath d='M2 16V2h32v12H8V6h20v4H12' fill='none' stroke='%23dcb75c' stroke-width='2' stroke-linejoin='miter'/%3E%3C/svg%3E");
}

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.steps li {
    position: relative; padding: 22px 18px 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
}
.steps li::before {
    counter-increment: s; content: counter(s, cjk-ideographic);
    display: block; font: 400 40px/1 var(--display); color: var(--red); margin-bottom: 8px;
}
.steps h3 { font-size: 16px; margin-bottom: 6px; }
.steps p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- two-column blocks ---------- */
.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 28px; }
.panel h3 { font-size: 20px; margin-bottom: 10px; }
.panel p { margin: 0 0 10px; color: var(--ink-2); }
.panel p:last-child { margin-bottom: 0; }
.panel .tag { display: inline-block; margin-bottom: 12px; padding: 2px 10px; font: 700 12px/1.6 var(--sans); letter-spacing: .12em; color: var(--red-ink); background: var(--jade); border-radius: 2px; }

/* ---------- page head ---------- */
.page-head { padding: 56px 0 28px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(30px, 5vw, 46px); margin-top: 10px; }
.page-head p { margin: 12px 0 0; max-width: 40em; color: var(--ink-2); font-size: 17px; }
.page-body { padding: 44px 0 80px; }

/* ---------- price list ---------- */
.menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
@media (max-width: 760px) { .menu { grid-template-columns: 1fr; } }
.dish { padding: 20px 0; border-bottom: 1px solid var(--line); }
.dish h3 { font-size: 19px; margin-bottom: 8px; }
.dish ul { list-style: none; margin: 0; padding: 0; }
.dish li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; }
.dish li .dots { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.dish li .price { font: 700 16px/1 var(--serif); color: var(--red); white-space: nowrap; }

.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.pack { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 4px; padding: 22px; }
.pack h3 { font-size: 18px; }
.pack .big { font: 400 46px/1 var(--display); color: var(--red); margin: 10px 0 2px; }
.pack .big small { font: 500 14px var(--sans); color: var(--ink-2); margin-left: 6px; }
.pack .price { font: 900 22px/1.2 var(--serif); }
.pack .each { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.note { margin-top: 26px; padding: 16px 20px; border-left: 4px solid var(--gold); background: var(--surface); color: var(--ink-2); font-size: 15px; }
.empty { padding: 28px; border: 1px dashed var(--line); color: var(--ink-2); border-radius: 4px; }

/* ---------- prose (terms / refund) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin: 40px 0 10px; display: flex; gap: 12px; align-items: baseline; }
.prose h2 .n { font: 400 30px/1 var(--display); color: var(--red); }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose .stamp { display: inline-block; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }

.callout { margin: 20px 0 8px; padding: 22px 26px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: 3px; }
.callout strong { font-family: var(--serif); font-size: 18px; }
.callout p { margin: 8px 0 0; color: var(--ink-2); }

.flow { list-style: none; counter-reset: f; padding: 0; margin: 18px 0; }
.flow li { counter-increment: f; position: relative; padding: 14px 0 14px 64px; border-bottom: 1px solid var(--line); }
.flow li::before { content: counter(f, cjk-ideographic); position: absolute; left: 0; top: 6px; font: 400 40px/1 var(--display); color: var(--red); width: 48px; text-align: center; }
.flow li strong { display: block; font-family: var(--serif); }
.flow li span { color: var(--ink-2); font-size: 15px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 26px; }
.contact-card .k { font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.contact-card .v { display: block; margin-top: 12px; font: 600 19px/1.45 var(--serif); text-decoration: none; word-break: break-word; }
.contact-card a.v:hover { color: var(--red); }
.contact-card p { margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- footer ---------- */
.foot { margin-top: 24px; background: var(--bg-2); border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; padding: 40px 0 26px; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand strong { font: 900 17px var(--serif); }
.foot-brand p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; max-width: 28em; }
.foot-col { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.foot-col h4 { margin: 0 0 6px; font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.foot-col a { text-decoration: none; color: var(--ink-2); }
.foot-col a:hover { color: var(--red); }
.copy { padding: 14px 0 30px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
