/*
Theme Name: Royal 1999
Description: Royal 1999 Lao-language guide.
Version: 1.0.0
Text Domain: royal1999
*/
:root { color-scheme: dark; --bg: #141318; --panel: #201c23; --gold: #f0cf89; --text: #fff7e6; --muted: #d0c8bd; --border: #786039; }
* { box-sizing: border-box; }
body { margin: 0px; background: var(--bg); color: var(--text); font: 16px / 1.75 "Noto Sans Lao", "Lao UI", system-ui, sans-serif; }
a { color: var(--gold); text-underline-offset: 0.22em; }
a:hover { color: rgb(255, 241, 191); }
img { max-width: 100%; height: auto; }
h1, h2 { margin: 0px 0px 0.45em; line-height: 1.35; }
h2 { font-size: clamp(1.2rem, 3vw, 2.05rem); }
p { margin: 0.7em 0px 1em; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(1210px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; top: 0px; left: 0px; transform: translateY(-110%); padding: 0.65rem; z-index: 30; background: var(--panel); }
.skip:focus { transform: none; }
.mast { background: repeating-radial-gradient(at 15% -145%, transparent 0px, transparent 15px, rgba(130, 101, 56, 0.133) 16px, rgba(130, 101, 56, 0.133) 17px, transparent 18px, transparent 30px), rgb(21, 20, 25); }
.head-row, .brand, .head-tools, .foot-row, .foot nav { display: flex; align-items: center; gap: 1rem; }
.head-row, .foot-row { justify-content: space-between; }
.head-row { min-height: 78px; }
.brand { gap: 0.55rem; }
.brand > a { text-decoration: none; display: flex; flex-direction: column; color: var(--gold); line-height: 1.18; }
.brand b { font: 800 clamp(1.25rem, 3vw, 1.88rem) / 1.1 Georgia, serif; letter-spacing: 0.035em; }
.brand small { margin-top: 0.3em; font-size: 0.72rem; color: var(--muted); }
.brand .custom-logo { width: 48px; height: 48px; display: block; }
.head-tools { text-align: center; }
.head-tools > a, .language { border: 1px solid rgb(116, 96, 67); border-radius: 1.4rem; padding: 0.22rem 0.8rem; text-decoration: none; }
.language { color: var(--muted); }
.gold-button, .head-tools .action { padding: 0.45rem 0.95rem; border: 1px solid rgb(255, 231, 174); border-radius: 0.4rem; display: inline-flex; align-items: center; gap: 0.45rem; color: rgb(31, 21, 10); background: linear-gradient(rgb(255, 228, 164), rgb(201, 149, 73)); font-weight: 800; text-decoration: none; }
.categories { background: rgb(21, 20, 24); border-top: 1px solid rgb(179, 146, 85); border-bottom: 1px solid rgb(89, 69, 41); }
.category-row { display: grid; grid-template-columns: repeat(9, minmax(0px, 1fr)); gap: 0.2rem; }
.category-row a { display: flex; min-width: 0px; align-items: center; flex-direction: column; gap: 0.16rem; padding: 0.62rem 0.12rem; color: var(--gold); text-decoration: none; font-size: 0.9rem; text-align: center; }
.category-row a:hover { background: rgb(52, 42, 33); }
.category-row a span { font: 2rem / 1.18 Georgia, serif; text-shadow: rgba(200, 148, 67, 0.333) 0px 0px 12px; }
.hero { min-height: clamp(390px, 37vw, 590px); position: relative; display: grid; place-items: center; text-align: center; isolation: isolate; overflow: hidden; }
.hero > img, .hero::after { position: absolute; inset: 0px; width: 100%; height: 100%; }
.hero > img { object-fit: cover; object-position: center center; z-index: -2; }
.hero::after { content: ""; z-index: -1; background: linear-gradient(0deg,var(--bg),transparent 28%,transparent 80%,#14131822),radial-gradient(ellipse at center,#100c19b8,transparent 65%); }
.hero-copy { padding: 1.7rem 1rem; color: rgb(255, 241, 193); text-shadow: rgb(8, 7, 11) 0px 3px 15px; }
.hero h1 { margin: 0px; font: 900 clamp(3.4rem, 10vw, 8rem) / 1.05 Georgia, serif; letter-spacing: 0.035em; }
.hero p { font-size: clamp(0.93rem, 2.3vw, 1.35rem); }
.hero .gold-button { text-shadow: none; }
.hero-dots { position: absolute; bottom: 1rem; display: flex; gap: 0.45rem; }
.hero-dots button { border: 1px solid rgb(213, 177, 108); background: rgb(39, 33, 43); border-radius: 50%; width: 0.85rem; height: 0.85rem; padding: 0px; cursor: pointer; }
.hero-dots button[aria-pressed="true"] { background: var(--gold); }
.quick-rail { display: grid; gap: 0.4rem; position: fixed; z-index: 5; right: 0.6rem; top: 29%; width: 3rem; }
.quick-rail a { display: grid; place-items: center; min-height: 2.7rem; background: rgb(40, 35, 46); border: 1px solid rgb(128, 99, 64); border-radius: 0.4rem; font-size: 1.25rem; text-decoration: none; }
.spotlight { display: grid; grid-template-columns: repeat(5, minmax(0px, 1fr)); gap: 0.8rem; align-items: center; margin: 0.3rem auto 2.75rem; }
.spotlight a { position: relative; display: grid; text-decoration: none; border-radius: 50% 50% 0.8rem 0.8rem; isolation: isolate; color: var(--text); border: 1px solid rgb(137, 102, 55); overflow: hidden; }
.spotlight img { width: 100%; aspect-ratio: 1.22 / 1; object-fit: cover; object-position: center center; border-radius: inherit; opacity: 0.82; }
.spotlight a:nth-child(3) { transform: scale(1.1); z-index: 1; box-shadow: rgba(200, 153, 78, 0.314) 0px 6px 36px; }
.spotlight a:hover img { opacity: 1; }
.spotlight span { position: absolute; inset: auto 0px 0px; text-align: center; font-weight: 800; background: linear-gradient(transparent, rgb(34, 23, 16) 45%); padding: 0.85rem 0.25rem 0.35rem; }
.intro-row img { aspect-ratio: 1.47 / 1; object-fit: cover; }
.feature-strip { padding: 1.75rem 0px 1.2rem; text-align: center; }
.feature-strip h2, .faq h2 { color: var(--gold); }
.feature-grid { display: grid; grid-template-columns: repeat(6, minmax(0px, 1fr)); gap: 0.55rem; text-align: left; }
.feature-grid a { display: grid; min-width: 0px; text-decoration: none; color: var(--text); border: 1px solid rgb(143, 112, 71); background: rgb(33, 27, 28); border-radius: 0.55rem; overflow: hidden; }
.feature-grid img { width: 100%; aspect-ratio: 1.65 / 1; object-fit: cover; }
.feature-grid span { padding: 0.4rem 0.6rem; font-weight: 700; line-height: 1.5; }
.faq { padding-block: 1.5rem; }
.faq details { background: var(--panel); padding: 0.65rem 1rem; margin-block: 0.55rem; border: 1px solid var(--border); border-radius: 0.5rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.guides { margin: 1.25rem 0px 2.6rem; }
.section-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 0.9rem; }
.section-top h2 { color: var(--gold); }
.arrows { display: flex; gap: 0.35rem; margin-bottom: 0.4rem; }
.arrows button { background: rgb(40, 32, 42); color: var(--gold); border: 1px solid var(--border); border-radius: 0.45rem; width: 2.5rem; height: 2.5rem; font-size: 1.5rem; cursor: pointer; }
.track { display: grid; grid-auto-flow: column; grid-auto-columns: calc(20% - 0.8rem); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.15rem 0.2rem 0.65rem; scrollbar-color: rgb(170, 132, 72) rgb(37, 32, 39); }
.guide { min-width: 0px; display: flex; flex-direction: column; scroll-snap-align: start; color: var(--text); text-decoration: none; border-radius: 0.8rem; padding: 0.4rem; background: linear-gradient(rgb(42, 35, 43), rgb(31, 26, 34)); border: 1px solid rgb(77, 61, 52); }
.guide:hover { background: rgb(57, 45, 42); }
.guide img { width: 100%; aspect-ratio: 1.13 / 1; object-fit: cover; border: 2px solid rgb(195, 154, 84); border-radius: 0.55rem; }
.guide span { padding: 0.52rem 0.35rem; line-height: 1.45; font-weight: 700; overflow-wrap: anywhere; }
.field-row { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 0px; margin: 1.15rem 0px; border: 1px solid var(--border); border-radius: 0.85rem; background: linear-gradient(135deg, rgb(41, 33, 42), rgb(27, 25, 31)); overflow: hidden; }
.field-row img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.field-row.reverse img { order: 2; }
.field-row > div { padding: clamp(1rem, 3.5vw, 3rem); }
.field-row h2, .reading h2 { color: var(--gold); }
.field-row p, .reading p { color: var(--muted); }
.field-row p:last-child { margin-bottom: 0px; }
.field-notes { margin-bottom: 3rem; }
.reading { max-width: 900px; padding-block: 2.8rem; }
.reading h1 { font-size: clamp(1.9rem, 5vw, 3.6rem); }
.reading h2 { margin-top: 1.55em; }
.reading figure { margin: 1.25rem 0px; }
.reading img { display: block; width: min(100%, 540px); border-radius: 0.85rem; border: 2px solid rgb(195, 154, 84); }
.foot { padding: 2rem 0px; border-top: 1px solid var(--border); color: var(--gold); background: linear-gradient(rgba(16, 15, 19, 0.91), rgba(16, 15, 19, 0.95)), url("assets/palace.webp") center center / cover; }
.foot-row { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); align-items: start; gap: 1rem; }
.foot nav { display: grid; gap: 0.25rem; }
.foot nav a, .foot-brand p { color: var(--muted); }
.foot-brand strong { font: 800 1.65rem Georgia, serif; }
.mobile-nav { display: none; }
@media (max-width: 800px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .wrap { width: calc(100% - 26px); }
  .head-row { min-height: 65px; }
  .head-tools { gap: 0.4rem; }
  .head-tools .action { padding: 0.35rem 0.55rem; font-size: 0.82rem; }
  .head-tools .contact-link, .language { display: none; }
  .brand .custom-logo { width: 38px; height: 38px; }
  .category-row { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 76px; overflow-x: auto; scrollbar-width: thin; width: 100%; padding-inline: 0.55rem; }
  .category-row a { padding: 0.35rem 0.1rem; font-size: 0.72rem; }
  .category-row a span { font-size: 1.55rem; }
  .hero { min-height: clamp(250px, 66vw, 350px); }
  .hero h1 { font-size: clamp(2.8rem, 12vw, 5.2rem); }
  .quick-rail { display: none; }
  .spotlight { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc(33.3333% - 0.333333rem); overflow-x: auto; gap: 0.5rem; scroll-snap-type: x mandatory; margin-bottom: 1.5rem; padding-block: 0.3rem; }
  .spotlight a { scroll-snap-align: start; font-size: 0.72rem; }
  .spotlight a:nth-child(3) { transform: none; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
  .foot-row { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
  .track { gap: 0.5rem; grid-auto-columns: calc(33.3333% - 0.333333rem); }
  .guide { padding: 0.25rem; }
  .guide span { font-size: 0.75rem; padding: 0.35rem 0.18rem; }
  .field-row { grid-template-columns: minmax(0px, 1fr); }
  .field-row.reverse img { order: 0; }
  .field-row img { height: auto; min-height: 0px; aspect-ratio: 16 / 9; }
  .mobile-nav { display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); position: fixed; inset: auto 0px 0px; min-height: 64px; padding: 4px 5px calc(4px + env(safe-area-inset-bottom)); background: rgb(27, 23, 30); border-top: 1px solid var(--border); z-index: 20; }
  .mobile-nav .action { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--gold); text-decoration: none; line-height: 1.28; font-size: 0.73rem; }
  .mobile-nav .action > span { font-size: 1.35rem; }
}
