/* Kuala Melaka Inn case study. Self-contained: no external fonts, scripts or site styles,
   so this folder can be copied as-is to any website (nvss.co.nz, Korvion). */
:root {
	--bg: #fafaf8;
	--surface: #f0f1ee;
	--ink: #17181a;
	--muted: #5b6066;
	--line: #dcdfdb;
	--accent: #1f5f8b;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
	:root { --bg: #141517; --surface: #1d1f22; --ink: #ecedeb; --muted: #a5abb1; --line: #2e3135; --accent: #7fb4dc; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--font); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; text-decoration-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cs-wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

.cs-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; font-size: 14px; color: var(--muted); }
.cs-lang { display: flex; gap: 16px; }
.cs-lang a { text-decoration: none; }
.cs-lang a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

.cs-head { padding-block: 48px 40px; }
.cs-head h1 { max-width: 16ch; margin: 0; font-size: clamp(38px, 6vw, 68px); font-weight: 700; line-height: 1.04; letter-spacing: -.02em; }
.cs-head > p { max-width: 46ch; margin: 18px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.45; }
.cs-meta { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 32px 0 0; padding: 0; }
.cs-meta div { min-width: 0; }
.cs-meta dt { color: var(--muted); font-size: 13px; }
.cs-meta dd { margin: 2px 0 0; font-weight: 600; }

.cs-media { display: grid; grid-template-columns: minmax(0, 3.1fr) minmax(0, 1fr); gap: 28px; align-items: end; }
.cs-screen { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cs-screen-bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cs-screen-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.cs-phone { overflow: hidden; border: 6px solid var(--ink); border-radius: 28px; background: var(--ink); }
.cs-phone video, .cs-phone img { border-radius: 22px; }
.cs-media figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }
.cs-media figure { margin: 0; }
.cs-live { position: relative; display: block; overflow: hidden; box-sizing: content-box; }
.cs-live > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cs-live-frame { position: absolute; top: 0; left: 0; border: 0; transform: scale(var(--cs-scale, .3)); transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.cs-live.is-live .cs-live-frame { opacity: 1; }
.cs-open { position: absolute; right: 16px; bottom: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 6px 20px rgb(0 0 0 / .18); transition: transform .2s ease; }
.cs-live:hover .cs-open { transform: translateY(-2px); }
.cs-live:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (prefers-color-scheme: dark) { .cs-open { color: #0f1215; } }
@media (prefers-reduced-motion: reduce) { .cs-live-frame, .cs-open { transition: none; } }

/* Full-screen live view (live.html) */
.lv-body { display: flex; flex-direction: column; height: 100dvh; margin: 0; background: var(--surface); }
.lv-bar { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.lv-bar a { text-decoration: none; white-space: nowrap; }
.lv-bar a:hover { text-decoration: underline; }
.lv-title { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.lv-devices { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lv-devices button { padding: 7px 14px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.lv-devices button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.lv-devices button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lv-stage { position: relative; flex: 1 1 auto; display: flex; justify-content: center; min-height: 0; }
.lv-loading { position: absolute; top: 40%; left: 0; right: 0; margin: 0; color: var(--muted); text-align: center; }
.lv-frame { position: relative; opacity: 0; transition: opacity .3s ease; }
.lv-frame.is-loaded { opacity: 1; }
.lv-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.lv-frame.is-mobile { width: 390px; max-width: 100%; border-inline: 1px solid var(--line); }
@media (max-width: 767px) { .lv-title, .lv-devices { display: none; } .lv-bar { justify-content: space-between; } }

.cs-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 64px; padding-block: 88px 24px; }
.cs-body h2 { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.3; }
.cs-body p { max-width: 64ch; margin: 0 0 1em; }
.cs-body p:last-child { margin-bottom: 0; }
.cs-body + .cs-body { padding-top: 56px; }

.cs-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-block: 56px 8px; }
.cs-shots figure { margin: 0; }
.cs-shots img { width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.cs-shots figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.cs-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 96px; padding-block: 32px 48px; border-top: 1px solid var(--line); }
.cs-foot p { margin: 0; font-weight: 600; }
.cs-button { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; transition: transform .2s ease; }
@media (prefers-color-scheme: dark) { .cs-button { color: #0f1215; } }
.cs-button:active { transform: translateY(1px); }

@media (max-width: 767px) {
	body { font-size: 16px; }
	.cs-head { padding-block: 24px 28px; }
	.cs-media { grid-template-columns: 1fr; }
	.cs-phone { width: min(260px, 70%); margin-inline: auto; }
	.cs-body { grid-template-columns: 1fr; padding-block: 56px 8px; }
	.cs-body + .cs-body { padding-top: 40px; }
	.cs-shots { grid-template-columns: 1fr; }
	.cs-foot { margin-top: 64px; }
}
