/* ============================================================
   SALAAM SUITES — base / shared components
   Themeable via the --bg / --surface / --brand / --accent hooks.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); }

/* ---------- TYPE ---------- */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent); opacity: 0.7;
}
.eyebrow.center::after { content: ""; width: 28px; height: 1px; background: var(--accent); opacity: 0.7; }
.display { font-family: var(--font-display); line-height: 1.04; letter-spacing: -0.02em; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-soft); max-width: 56ch; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease-soft),
              background var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft), color var(--dur-fast);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--action); color: #fff; box-shadow: 0 6px 18px rgba(61,161,74,0.28); }
.btn-primary:hover { background: var(--green-600); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(61,161,74,0.34); }
.btn-gold { background: var(--accent); color: #20180a; box-shadow: 0 6px 18px rgba(200,162,75,0.30); }
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--hairline); }
.btn-ghost:hover { border-color: var(--brand); transform: translateY(-2px); }
.btn-light { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.30); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
.link-more {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--brand);
  font-size: 15px; transition: gap var(--dur-fast) var(--ease-soft);
}
.link-more:hover { gap: 14px; }
.link-more svg { width: 16px; height: 16px; }

/* ---------- TOP NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s6); padding: 18px var(--gutter);
  transition: background var(--dur-med) var(--ease-soft), box-shadow var(--dur-med),
              padding var(--dur-med), border-color var(--dur-med);
  border-bottom: 1px solid transparent;
  --nav-fg: var(--nav-top, #ffffff);
}
.nav.scrolled { --nav-fg: var(--nav-down, var(--text)); }
.nav.scrolled {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--shadow-sm);
  border-color: var(--hairline);
  padding-block: 12px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; z-index: 2; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; flex: none; overflow: hidden;
}
.brand-mark img.brand-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark svg { width: 22px; height: 22px; color: var(--gold-300); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: 0.01em; color: var(--nav-fg, var(--text)); }
.brand-sub { font-size: 9.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); margin-top: 4px; font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > li > a {
  position: relative; display: inline-block; padding: 10px 16px; font-size: 14.5px; font-weight: 500;
  color: var(--nav-fg, var(--text)); border-radius: var(--r-sm); transition: color var(--dur-fast);
}
.nav-links > li > a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-med) var(--ease-out);
}
.nav-links > li > a:hover::after { transform: scaleX(1); }
.nav-has-menu { position: relative; }
.nav-submenu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 240px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden;
  transition: opacity var(--dur-fast), transform var(--dur-fast) var(--ease-out), visibility 0s linear var(--dur-fast); z-index: 50;
}
/* invisible hover bridge across the gap so the menu doesn't vanish before you reach it */
.nav-submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-has-menu:hover .nav-submenu,
.nav-submenu:hover { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition: opacity var(--dur-fast), transform var(--dur-fast) var(--ease-out), visibility 0s; }
.nav-submenu a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--r-sm); color: var(--text); transition: background var(--dur-fast); }
.nav-submenu a:hover { background: var(--green-50); }
.nav-submenu a strong { font-size: 14.5px; font-weight: 600; }
.nav-submenu a span { font-size: 12px; color: var(--text-soft); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

/* language toggle */
.lang-toggle { display: inline-flex; align-items: center; background: color-mix(in srgb, var(--surface) 40%, transparent); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 3px; }
.lang-toggle button { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding: 5px 11px; border-radius: var(--r-pill); color: var(--nav-fg, var(--text-soft)); opacity: 0.7; transition: all var(--dur-fast); }
.lang-toggle button.active { background: var(--brand); color: #fff; opacity: 1; }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--nav-fg, var(--text)); border-radius: 2px; transition: all var(--dur-fast); }

/* ---------- PHOTO PLACEHOLDERS ---------- */
.ph {
  position: relative; overflow: hidden; background: var(--green-800);
  background-image:
    linear-gradient(135deg, rgba(0,0,0,0.30), rgba(0,0,0,0) 55%),
    radial-gradient(120% 120% at 80% 0%, var(--green-600), var(--green-900) 70%);
  color: rgba(255,255,255,0.92);
}
.ph::before {
  content: ""; position: absolute; inset: 0; opacity: 0.10; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M36 0l36 36-36 36L0 36z'/%3E%3Cpath d='M36 14l22 22-22 22-22-22z'/%3E%3Ccircle cx='36' cy='36' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}
.ph-label {
  position: absolute; left: 0; bottom: 0; padding: 16px 18px; z-index: 2;
  display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em;
  color: rgba(255,255,255,0.85);
}
.ph-label svg { width: 15px; height: 15px; opacity: 0.8; }
/* real photo inside a .ph placeholder */
.ph > .ph-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; display: block; }
.ph:has(.ph-photo)::before { display: none; }
.ph:has(.ph-photo) .ph-label { display: none; }
.ph.gold {
  background-image:
    linear-gradient(135deg, rgba(0,0,0,0.25), rgba(0,0,0,0) 55%),
    radial-gradient(120% 120% at 80% 0%, var(--gold-400), var(--gold-700) 75%);
}
.ph.sand {
  background-image:
    linear-gradient(135deg, rgba(0,0,0,0.10), rgba(0,0,0,0) 55%),
    radial-gradient(120% 120% at 80% 0%, var(--sand-300), var(--sand-400) 80%);
  color: var(--green-900);
}
.ph.sand .ph-label { color: rgba(20,40,27,0.6); }

/* ---------- BOOKING BAND ---------- */
.booking {
  position: relative; z-index: 30;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 10px;
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 6px; align-items: stretch;
}
.bk-field { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; border-radius: var(--r-md); transition: background var(--dur-fast); cursor: pointer; }
.bk-field + .bk-field::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--hairline); }
.bk-field:hover { background: var(--green-50); }
.bk-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 7px; }
.bk-label svg { width: 13px; height: 13px; }
.bk-value { font-size: 15px; font-weight: 500; color: var(--text); background: transparent; border: none; outline: none; width: 100%; cursor: pointer; }
.bk-value::placeholder { color: var(--ink-300); }
select.bk-value { appearance: none; }
.bk-sub { font-size: 11.5px; color: var(--ink-400); }
.bk-submit { align-self: stretch; }
.bk-submit button { width: 100%; height: 100%; min-height: 60px; padding-inline: 30px; }

/* ---------- TRUST / CERT STRIP ---------- */
.cert-badge { display: flex; align-items: center; gap: 14px; }
.cert-ring {
  width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--accent); box-shadow: var(--shadow-sm);
}
.cert-ring svg { width: 30px; height: 30px; color: var(--brand); }
.cert-badge .ct { display: flex; flex-direction: column; }
.cert-badge .ct strong { font-size: 15px; font-weight: 700; color: var(--text); }
.cert-badge .ct span { font-size: 12.5px; color: var(--text-soft); }

/* ---------- REVIEWS ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 16px; height: 16px; }

/* ---------- FOOTER ---------- */
.footer { background: var(--green-950); color: rgba(255,255,255,0.62); padding-block: clamp(56px, 7vw, 96px) 32px; }
.footer a { color: rgba(255,255,255,0.62); transition: color var(--dur-fast); }
.footer a:hover { color: var(--gold-300); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: var(--s10); }
.footer h4 { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 18px; font-weight: 600; }
.footer ul { display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; }
.footer-brand .brand-name { color: #fff; }
.footer-soc { display: flex; gap: 10px; margin-top: 20px; }
.footer-soc a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.16); display: grid; place-items: center; }
.footer-soc a:hover { border-color: var(--gold-300); background: rgba(200,162,75,0.10); }
.footer-soc svg { width: 17px; height: 17px; }
.footer-bottom { margin-top: var(--s16); padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.10); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; }

/* ---------- SCROLL REVEAL (keyframe-based for reliability) ---------- */
.reveal { opacity: 0; }
.reveal.in { animation: rv-up var(--dur-slow) var(--ease-out) both; }
.reveal[data-rv="left"].in { animation-name: rv-left; }
.reveal[data-rv="right"].in { animation-name: rv-right; }
.reveal[data-rv="scale"].in { animation-name: rv-scale; }
[data-stagger] > * { opacity: 0; }
[data-stagger].in > * { animation: rv-up var(--dur-med) var(--ease-out) both; }

@keyframes rv-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes rv-left { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
@keyframes rv-right { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes rv-scale { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

/* i18n: hide the inactive language; the shown one keeps its natural/author display */
html[lang="en"] [data-lang="bm"] { display: none; }
html[lang="bm"] [data-lang="en"] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, [data-stagger] > * { animation: none !important; opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- MOBILE NAV / RESPONSIVE ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 90; background: var(--green-950); color: #fff; display: flex; flex-direction: column; padding: 90px var(--gutter) 40px; transform: translateX(100%); transition: transform var(--dur-med) var(--ease-out); }
.mobile-menu.open { transform: none; }
.mobile-menu a { font-family: var(--font-display); font-size: 30px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.10); color: #fff; }
.mobile-menu .m-sub a { font-size: 18px; font-family: var(--font-ui); color: var(--gold-300); padding: 8px 0 8px 16px; border: none; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s8); }
}
@media (max-width: 860px) {
  .nav-links, .nav-actions .lang-toggle, .nav-actions .btn { display: none; }
  .nav-burger { display: flex; }
  .booking { grid-template-columns: 1fr 1fr; }
  .bk-submit { grid-column: span 2; }
  .bk-field + .bk-field::before { display: none; }
}
@media (max-width: 560px) {
  .booking { grid-template-columns: 1fr; }
  .bk-submit { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- PRAYER-TIME BAR (data via /js/solat.js) ---------- */
.solat-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md, 12px); padding: 12px 18px; margin: 18px 0 6px; font-size: 13px; }
.solat-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-700, #1F6B43); }
.solat-title svg { width: 16px; height: 16px; }
.solat-chip { color: var(--text-soft); white-space: nowrap; }
.solat-chip b { color: var(--text); font-weight: 600; margin-right: 3px; }
.solat-chip.next { background: var(--green-50, #EAF4EC); color: var(--green-800, #17573A); border-radius: var(--r-pill, 999px); padding: 4px 11px; }
.solat-chip.next b { color: inherit; }
.solat-count { margin-left: auto; font-weight: 600; color: var(--accent, #B88735); white-space: nowrap; }
@media (max-width: 700px) { .solat-count { margin-left: 0; flex-basis: 100%; } }

/* ---------- SEASONAL MODE (Ramadan / Syawal, via /js/solat.js) ---------- */
.season-chip { display: inline-flex; align-items: center; gap: 9px; background: rgba(200,162,75,0.16); border: 1px solid rgba(200,162,75,0.45); color: var(--gold-300, #E8C772); border-radius: var(--r-pill, 999px); padding: 8px 18px; font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; margin-bottom: 22px; backdrop-filter: blur(4px); }
.season-chip svg { width: 17px; height: 17px; }
.season-iftar { display: flex; align-items: center; justify-content: center; gap: 9px; text-align: center; font-size: 13.5px; color: var(--green-800, #17573A); background: var(--green-50, #EAF4EC); border: 1px solid color-mix(in srgb, var(--green-700, #1F6B43) 22%, transparent); border-radius: var(--r-pill, 999px); padding: 9px 18px; margin: 12px auto 0; width: fit-content; }
.season-iftar svg { width: 16px; height: 16px; flex: none; }
.season-iftar b { font-weight: 700; }
/* faint crescent watermark over the homepage hero during Ramadan */
body[data-season="ramadan"] .s-hero::before { content: ""; position: absolute; top: 9%; right: 5%; width: clamp(120px, 16vw, 230px); aspect-ratio: 1; z-index: 1; pointer-events: none; opacity: 0.22; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23E8C772" stroke-width="0.9"><path d="M12 3a7 7 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg>') center/contain no-repeat; }

/* ---------- BATIK / WAU DIVIDER ---------- */
.batik-div { display: flex; justify-content: center; padding: clamp(26px, 4vw, 44px) var(--gutter, 24px); color: var(--accent, #B88735); }
.batik-div svg { width: min(720px, 100%); height: auto; display: block; }
.batik-div .bd-wau { animation: bd-float 7s ease-in-out infinite; transform-origin: 360px 32px; }
@keyframes bd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .batik-div .bd-wau { animation: none; } }

/* ---------- "RUN ON LUMIN" FOOTER STRIP ---------- */
.lumin-strip { border-top: 1px solid rgba(255,255,255,0.10); margin-top: 34px; }
.lumin-strip a { display: flex; align-items: center; gap: 16px; padding: 18px 0; color: inherit; }
.lumin-strip img { width: 40px; height: 40px; flex: none; border-radius: 50%; }
.lumin-strip-text { font-size: 13px; color: rgba(255,255,255,0.72); line-height: 1.55; max-width: 70ch; }
.lumin-strip-text b { color: var(--gold-300, #E8C772); }
.lumin-strip-cta { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--gold-300, #E8C772); white-space: nowrap; }
.lumin-strip a:hover .lumin-strip-cta { text-decoration: underline; }
@media (max-width: 700px) { .lumin-strip a { flex-wrap: wrap; } .lumin-strip-cta { margin-left: 56px; } }

/* ---------- KB (loghat Kelantan) toast ---------- */
.kb-toast { position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 16px); z-index: 200; background: var(--green-950, #0E2218); color: var(--gold-300, #E8C772); font-size: 14px; font-weight: 600; padding: 12px 22px; border-radius: var(--r-pill, 999px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; }
.kb-toast.show { opacity: 1; transform: translate(-50%, 0); }
