/* The homepage (written by home/build.mjs). The colours are the temple's own: lamp-lit wood at night, gold leaf, paper. */
:root {
  --bg: #120e0b;
  --bg-tint: #18120e;
  --panel: #201812;
  --line: rgba(222, 186, 118, 0.26);
  --line-strong: rgba(232, 200, 134, 0.6);
  --gold: #e6c682;
  --gold-deep: #c9a45c;
  --text: #f3eada;
  --muted: #c4b79f;
  --serif: "Noto Serif KR", "Noto Serif JP", "Noto Serif SC", "Noto Serif Thai", "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", "Nanum Myeongjo", Georgia, "Times New Roman", serif;
  --sans: "Pretendard", "Noto Sans KR", "Noto Sans JP", "Noto Sans SC", "Noto Sans Thai", "Malgun Gothic", "Apple SD Gothic Neo", "Hiragino Sans", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
:lang(ko), :lang(ja), :lang(zh-Hans) { word-break: keep-all; line-break: strict; }
:lang(ja), :lang(zh-Hans) { word-break: normal; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap.narrow { width: min(780px, 100% - 2 * var(--gutter)); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 30; background: var(--panel); padding: 8px 14px; border-radius: 8px; }

/* The bar at the top */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px var(--gutter); background: rgba(18, 14, 11, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 18px; white-space: nowrap; margin: 0; }
.seal { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #8f2f24; color: #f6e7c8; font: 700 19px/1 var(--serif); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.top nav { display: flex; gap: 4px; margin-inline: auto 0; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { padding: 8px 11px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14.5px; white-space: nowrap; }
.top nav a:hover { color: var(--text); background: rgba(230, 198, 130, 0.1); }
.languages { position: relative; font-size: 14.5px; }
.languages summary { list-style: none; cursor: pointer; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); white-space: nowrap; }
.languages summary::-webkit-details-marker { display: none; }
.languages ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px; padding: 6px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.languages a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.languages a:hover, .languages a[aria-current] { background: rgba(230, 198, 130, 0.14); color: var(--gold); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 999px; background: linear-gradient(180deg, #f0d596, #d2ab5f); color: #2a1c0c; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transition: transform 0.15s, filter 0.15s; }
.button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button.quiet { background: rgba(18, 14, 11, 0.5); color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.top .button { min-height: 40px; padding: 8px 18px; }

/* The first screen */
.hero { position: relative; display: grid; align-items: end; min-height: min(88vh, 860px); isolation: isolate; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18, 14, 11, 0.15) 0%, rgba(18, 14, 11, 0.2) 38%, rgba(18, 14, 11, 0.86) 82%, var(--bg) 100%); }
.hero-text { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: 120px 0 clamp(36px, 7vh, 72px); }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 14.5px; letter-spacing: 0.08em; }
h1 { font-size: clamp(34px, 6.4vw, 66px); letter-spacing: -0.01em; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55); max-width: 16em; }
.hero .lead { max-width: 38em; margin: 18px 0 26px; font-size: clamp(16.5px, 1.6vw, 19px); color: #efe5d2; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.actions.centre { justify-content: center; margin-top: 34px; }
.notes { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; color: var(--muted); font-size: 14.5px; }
.notes li::before { content: "◆"; margin-right: 8px; color: var(--gold-deep); font-size: 9px; vertical-align: 2px; }

/* Sections */
.band { padding: clamp(56px, 9vw, 104px) 0; }
.band.tinted { background: var(--bg-tint); border-block: 1px solid var(--line); }
h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; }
h2::before { content: ""; display: block; width: 44px; height: 2px; margin-bottom: 18px; background: var(--gold-deep); }
h2.second { margin-top: clamp(48px, 7vw, 80px); }
.band .lead { max-width: 46em; margin-bottom: 34px; color: var(--muted); font-size: 17px; }
h3 { font-size: 19px; }
.two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.two p { color: #e3d8c3; max-width: 40em; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts div { padding: 20px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.facts dt { font: 700 clamp(24px, 3vw, 32px)/1.2 var(--serif); color: var(--gold); }
.facts dd { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 18px; }
.cards figure { overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); aspect-ratio: 16 / 9; }
.cards img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.cards li:hover img { transform: scale(1.04); }
.cards h3 { margin: 14px 0 4px; }
.cards p, .list p, .rites p, .steps p, .pair p { color: var(--muted); margin: 0; font-size: 15.5px; }
.minor { margin: 44px 0 14px; color: var(--gold); font-size: 16px; font-family: var(--sans); font-weight: 600; letter-spacing: 0.04em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 14.5px; }
.chips b { color: var(--text); font-weight: 600; margin-right: 4px; }

.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 30px; }
.strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.list li { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.list h3 { margin-bottom: 6px; color: var(--gold); font-size: 18px; }
.list.four { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.list.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.robes { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.robes i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair article { padding: 24px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; }
.when { margin: 8px 0 10px !important; color: var(--gold) !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.rites { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 16px; }
.rites li { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(143, 47, 36, 0.16), transparent 60%), var(--panel); overflow: hidden; }
.mark { position: absolute; right: 12px; top: 2px; font: 700 76px/1 var(--serif); color: rgba(230, 198, 130, 0.13); }
.day { color: var(--gold) !important; font-weight: 600; margin-bottom: 4px !important; }
.host { margin: 6px 0 10px !important; color: var(--text) !important; font-size: 14.5px !important; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%; background: #8f2f24; color: #f6e7c8; font: 700 17px/1 var(--serif); }
.steps h3 { margin-bottom: 6px; }

#faq details { border-bottom: 1px solid var(--line); }
#faq summary { cursor: pointer; padding: 18px 34px 18px 0; position: relative; font-weight: 600; font-size: 17px; list-style: none; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; color: var(--gold); font-size: 22px; font-weight: 400; }
#faq details[open] summary::after { content: "–"; }
#faq details p { color: var(--muted); padding: 0 34px 20px 0; margin: 0; }

.foot { padding: 44px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.foot .brand { margin-bottom: 12px; }
.foot-languages { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0; }

.missing { display: grid; place-items: center; min-height: 100vh; padding: 24px; text-align: center; }
.missing .seal { margin: 0 auto 22px; width: 52px; height: 52px; font-size: 28px; }
.missing p { margin: 0 0 12px; color: var(--muted); }
.missing b { color: var(--text); }

@media (max-width: 860px) {
  .top nav { display: none; }
  .languages { margin-left: auto; }
  .two, .pair { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .brand span:last-child { display: none; }
  .hero { min-height: 82vh; }
  .hero-text { padding-top: 96px; }
  .languages summary { padding: 8px 10px; }
  .top .button { padding: 8px 14px; }
  .cards { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .cards img { transition: none; }
}
.foot-business { margin: 18px 0 10px; font-size: 13px; line-height: 1.7; overflow: hidden; }
/* Each item carries its own divider on the left; the first one in every row is pushed outside and clipped,
   so a row that wraps never starts with a divider. */
.foot-business p { display: flex; flex-wrap: wrap; margin: 0 0 0 -21px; }
.foot-business .item { position: relative; padding-left: 21px; white-space: nowrap; }
.foot-business .item::before { content: '|'; position: absolute; left: 8px; opacity: 0.35; }
.foot-business .label { opacity: 0.75; margin-right: 4px; }
.foot-business .pending { opacity: 0.7; }
@media (max-width: 640px) {
  .foot-business p { display: block; margin: 0; }
  .foot-business .item { display: block; padding-left: 0; white-space: normal; }
  .foot-business .item::before { content: none; }
}

