/* Kota Kinabalu Hotels — stylesheet
   Palette: South China Sea at dusk, but cool not cream. One warm accent, used
   only for the enquiry action so it always means "talk to a person". */
:root {
  --ink: #17262e;
  --muted: #5b6d73;
  --bg: #f1f5f4;
  --paper: #ffffff;
  --line: #d2dddb;
  --teal: #1c6871;
  --teal-dark: #134c53;
  --teal-tint: #e3eff0;
  --coral: #dd5c28;
  --coral-dark: #b9481b;
  --gold: #b0872b;
  --radius: 6px;
  --measure: 66ch;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 1.9em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { padding-left: 1.2em; max-width: var(--measure); }
li { margin-bottom: 0.3em; }
small, .muted { color: var(--muted); }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* Header */
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; padding: 0.9rem 0; flex-wrap: wrap; }
.brand { white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--teal); }
.site-nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
@media (max-width: 700px) {
  .site-head .wrap { flex-wrap: nowrap; gap: 1rem; }
  .site-nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; margin-left: 0; padding-bottom: 2px; }
  .site-nav::-webkit-scrollbar { display: none; }
}
.site-nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--teal); text-decoration: underline; }

/* Breadcrumb */
.crumbs { font-size: 0.9rem; color: var(--muted); padding: 1rem 0 0; }
.crumbs a { color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; max-width: none; }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line); }

/* Hero */
.hero { padding: 2.2rem 0 1.4rem; }
.hero .lede { font-size: 1.15rem; max-width: 60ch; color: var(--ink); }
.hero .provenance { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }

/* Spec strip: the signature element. Hard facts before any prose. */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.4rem 0 2rem;
}
.specs > div { background: var(--paper); padding: 0.85rem 1rem; }
.specs dt { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.15rem; }
.specs dd { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.specs dd.no { color: var(--muted); font-weight: 500; }
.specs dd .sub { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; }

/* Two-column hotel layout */
.hotel-grid > article > h2:first-child { margin-top: 0.4rem; }
.hotel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; align-items: start; }
.rail { position: sticky; top: 1rem; }
@media (max-width: 860px) {
  .hotel-grid { grid-template-columns: 1fr; }
  .rail { position: static; }
}

/* Enquiry panel — the one warm thing on the page */
.enquire {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--coral);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.4rem;
}
.enquire h2 { margin-top: 0; font-size: 1.3rem; }
.enquire p { font-size: 0.95rem; }
.enquire label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0.7rem 0 0.2rem; }
.enquire input, .enquire select, .enquire textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 0.55rem 0.65rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.enquire textarea { min-height: 4.5rem; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.row2 > div { min-width: 0; }
.enquire input[type="date"] { min-width: 0; }
.btn {
  display: inline-block; text-align: center; font: inherit; font-weight: 600;
  padding: 0.75rem 1.1rem; border-radius: var(--radius); border: 0; cursor: pointer;
  text-decoration: none; width: 100%; margin-top: 0.9rem;
}
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); color: #fff; }
.btn-wa { background: #1f9e5a; color: #fff; }
.btn-wa:hover { background: #17804a; color: #fff; }
.enquire .fine { font-size: 0.8rem; color: var(--muted); margin: 0.7rem 0 0; }

/* Mobile bottom bar */
.bar {
  display: none; position: fixed; inset: auto 0 0 0; z-index: 20;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom));
  gap: 0.6rem;
}
.bar .btn { margin: 0; padding: 0.7rem 0.6rem; font-size: 0.95rem; }
@media (max-width: 860px) {
  .bar { display: flex; }
  body.has-bar { padding-bottom: 4.5rem; }
}

/* Tables — the directory reads as a reference, not a card wall */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin: 1.2rem 0 1.6rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: 0.82rem; color: var(--muted); background: var(--bg); }
tr:last-child td { border-bottom: 0; }
td.name a { font-weight: 600; color: var(--ink); }
td.name a:hover { color: var(--teal); }
td .note { display: block; font-size: 0.82rem; color: var(--muted); }
td.rank { color: var(--muted); width: 2.5rem; }
.stars { color: var(--gold); letter-spacing: 0.05em; white-space: nowrap; }
.tag { display: inline-block; font-size: 0.78rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--teal-tint); color: var(--teal-dark); white-space: nowrap; }
.tag.off { background: #eceff0; color: var(--muted); }

/* Filter chips (home) */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0 0.4rem; }
.chips button, .chips a {
  font: inherit; font-size: 0.92rem; padding: 0.45rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none;
}
.chips button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips button:hover, .chips a:hover { border-color: var(--teal); color: var(--teal); }
.count { font-size: 0.9rem; color: var(--muted); margin: 0.5rem 0 0; }

/* Link lists */
.links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; padding: 0; list-style: none; max-width: none; }
.links a { font-weight: 500; }

/* Landmark table */
.landmarks td:last-child { color: var(--muted); }

/* Similar hotels */
.similar { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem; max-width: none; }
.similar li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; }
.similar a { font-weight: 600; color: var(--ink); text-decoration: none; }
.similar a:hover { color: var(--teal); }
.similar small { display: block; margin-top: 0.2rem; }

/* Notes section on home */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; margin-top: 1rem; }
.notes h3 { margin-top: 0; }

/* Footer: dark mini-directory */
.site-foot { background: var(--ink); color: #c9d6d3; margin-top: 4rem; padding: 3rem 0 3.5rem; font-size: 0.95rem; }
.site-foot .brand-foot { color: #fff; font-size: 1.5rem; }
.site-foot .brand-foot span { color: #8fd0c6; }
.foot-lede { color: #c9d6d3; max-width: 52ch; margin: 0.8rem 0 2.2rem; }
.foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 2.5rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; gap: 2.2rem; } }
.foot-grid h4 { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-weight: 600; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: #a9d4a5; margin: 0 0 0.9rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; max-width: none; }
.foot-grid li { margin: 0 0 0.55rem; }
.foot-grid a { color: #e6eeec; text-decoration: none; font-size: 1.02rem; }
.foot-grid a:hover { color: #fff; text-decoration: underline; }
.foot-fine { color: #8a9c99; font-size: 0.82rem; max-width: 70ch; margin: 2.6rem 0 0; border-top: 1px solid #2a3c44; padding-top: 1.2rem; }
.site-foot p { max-width: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .bar, .site-nav, .enquire { display: none; } }
td.num { white-space: nowrap; }

/* Images and placeholders */
.ph { margin: 0; width: 100%; overflow: hidden; border-radius: var(--radius); background: var(--teal-tint); }
.ph img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.ph iframe { width: 100%; height: 100%; border: 0; display: block; }
.ph-empty { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%;
  background: repeating-linear-gradient(135deg, #e6edeb 0 10px, #eef3f2 10px 20px); border: 1.5px dashed #9fb3af; border-radius: var(--radius); color: var(--muted); }
.ph-empty span { font-size: 0.8rem; line-height: 1.4; padding: 0.6rem; }
.ph-empty b { display: block; color: var(--ink); }
.ph-empty code { display: block; font-size: 0.75rem; word-break: break-all; }
.ph-empty em { display: block; font-style: normal; opacity: 0.8; }
.hero-img { margin: 1.4rem 0 0; }
.img-credit { font-size: 0.72rem; color: var(--muted); margin: 0.3rem 0 0; text-align: left; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin: 1rem 0 0.5rem; }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery .ph:first-child { grid-column: 1 / -1; } }
.thumb { width: 72px; min-width: 72px; }
.thumb .ph-empty span { font-size: 0; padding: 0; } /* thumbnails: pattern only, no label */
td.pic { width: 72px; padding-right: 0; }
.agent { display: flex; gap: 0.8rem; align-items: center; margin: 0 0 0.6rem; }
.agent .ph { width: 56px; min-width: 56px; }
.agent .ph img, .agent .ph-empty { border-radius: 50%; }
.agent .ph-empty span { font-size: 0; }
.agent p { margin: 0; font-size: 0.9rem; }
.agent p b { display: block; }
.home-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .home-hero { grid-template-columns: 1fr; } }
.area-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; list-style: none; padding: 0; max-width: none; }
.area-cards a { display: block; font-weight: 600; color: var(--ink); text-decoration: none; margin-top: 0.5rem; }
.area-cards a:hover { color: var(--teal); }
.area-cards small { display: block; color: var(--muted); }
.cta-band { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; margin-top: 1rem; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } }
