/* Sentosa Shores — Destination Travel Guide */
:root {
  --khaki: #c4a882;
  --khaki-light: #e8dcc8;
  --khaki-dark: #9a7f5c;
  --jungle: #2d6a4f;
  --jungle-dark: #1b4332;
  --jungle-light: #40916c;
  --sky: #4fc3f7;
  --sky-deep: #0288d1;
  --paper: #f5f0e8;
  --paper-warm: #ebe3d5;
  --earth: #5c4a3a;
  --earth-muted: #7a6b5c;
  --text: #3d3429;
  --text-muted: #6b5f52;
  --white: #ffffff;
  --highlight: #fff9c4;
  --highlight-border: #f9e547;
  --sidebar-w: 17rem;
  --topbar-h: 3.75rem;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(45, 106, 79, 0.1);
  --font-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-ui: "Trebuchet MS", "Lucida Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 1.5rem);
}

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--paper);
}

a { color: var(--jungle); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--sky-deep); }

img { max-width: 100%; height: auto; display: block; }

/* ── Minimal top bar ── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 2px solid var(--khaki-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem 0 calc(var(--sidebar-w) + 1.5rem);
  z-index: 300;
  box-shadow: 0 1px 8px rgba(92, 74, 58, 0.06);
}

.top-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--jungle-dark);
}

.top-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 42% 42%;
  background: linear-gradient(180deg, var(--sky) 0%, var(--khaki) 55%, var(--jungle-light) 100%);
  flex-shrink: 0;
}

.top-logo span { color: var(--khaki-dark); }

.top-cta {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--jungle);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
}

.top-cta:hover {
  background: var(--jungle-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.sidebar-toggle {
  display: none;
  background: none;
  border: 2px solid var(--khaki);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  color: var(--earth);
  font-size: 1.1rem;
  line-height: 1;
}

/* ── Guide shell ── */
.guide-shell {
  display: flex;
  min-height: 100vh;
  padding-top: var(--topbar-h);
}

/* ── Fixed sidebar ── */
.guide-sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--topbar-h));
  background: linear-gradient(180deg, var(--jungle-dark) 0%, var(--jungle) 100%);
  color: var(--white);
  overflow-y: auto;
  z-index: 200;
  display: flex;
  flex-direction: column;
  border-right: 3px solid var(--khaki);
}

.sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-edition {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--khaki);
  margin-bottom: 0.35rem;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--white);
}

.chapter-nav {
  list-style: none;
  padding: 1rem 0;
  flex: 1;
}

.chapter-nav li { margin: 0; }

.chapter-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  border-left: 3px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.chapter-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.chapter-nav a.active,
.chapter-nav a:target {
  color: var(--white);
  background: rgba(79, 195, 247, 0.12);
  border-left-color: var(--sky);
}

.chapter-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--khaki);
  min-width: 1.4rem;
}

.sidebar-footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-footer a {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

.sidebar-footer a:hover { color: var(--sky); }

/* CSS scrollspy: highlight chapter when section is in view */
@supports (animation-timeline: view()) {
  .chapter {
    view-timeline-name: --chapter;
    view-timeline-axis: block;
  }

  .chapter-nav a[data-chapter] {
    animation: nav-highlight linear both;
    animation-timeline: --chapter;
    animation-range: entry 20% exit 80%;
  }

  @keyframes nav-highlight {
    0%, 100% {
      color: rgba(255, 255, 255, 0.72);
      background: transparent;
      border-left-color: transparent;
    }
    10%, 90% {
      color: var(--white);
      background: rgba(79, 195, 247, 0.12);
      border-left-color: var(--sky);
    }
  }
}

/* ── Main content ── */
.guide-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 2.5rem 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.breadcrumbs a { color: var(--earth-muted); }
.breadcrumbs a:hover { color: var(--jungle); }

.breadcrumbs span { color: var(--khaki-dark); }

/* Cover hero */
.cover-hero {
  background:
    linear-gradient(135deg, rgba(27, 67, 50, 0.88) 0%, rgba(45, 106, 79, 0.75) 45%, rgba(79, 195, 247, 0.35) 100%),
    linear-gradient(160deg, var(--jungle-dark) 0%, var(--jungle) 50%, var(--khaki-dark) 100%);
  color: var(--white);
  padding: 3.5rem 2.5rem 3rem;
  position: relative;
}

.cover-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--khaki), var(--sky), var(--jungle-light));
}

.cover-kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--khaki);
  margin-bottom: 0.85rem;
}

.cover-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  max-width: 18ch;
  margin-bottom: 1rem;
}

.cover-deck {
  font-size: 1.08rem;
  max-width: 52ch;
  opacity: 0.92;
  margin-bottom: 1.5rem;
}

.cover-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cover-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--sky);
  line-height: 1;
}

.cover-stat span {
  font-size: 0.78rem;
  opacity: 0.8;
}

/* Chapters */
.chapter {
  padding: 3rem 2.5rem;
  border-bottom: 1px solid var(--khaki-light);
}

.chapter:nth-child(even) {
  background: var(--white);
}

.chapter-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.chapter-label {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--jungle);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(45, 106, 79, 0.25);
}

.chapter-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--jungle-dark);
  line-height: 1.2;
  padding-top: 0.25rem;
}

.chapter-lead {
  font-size: 1.1rem;
  color: var(--earth-muted);
  margin-bottom: 1.5rem;
  max-width: 65ch;
}

.chapter p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  max-width: 72ch;
}

.chapter h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--jungle);
  margin: 2rem 0 0.65rem;
}

/* Structured sections with icons */
.guide-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.guide-block {
  background: var(--paper);
  border: 1px solid var(--khaki-light);
  border-radius: var(--radius);
  padding: 1.35rem;
  border-top: 3px solid var(--jungle);
}

.guide-block.sky { border-top-color: var(--sky); }
.guide-block.khaki { border-top-color: var(--khaki-dark); }

.guide-block-icon {
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
  line-height: 1;
}

.guide-block h4 {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jungle-dark);
  margin-bottom: 0.5rem;
}

.guide-block p {
  font-size: 0.94rem;
  margin-bottom: 0;
}

/* Highlight box — yellow notepad */
.highlight-box {
  background: var(--highlight);
  border: 1px solid var(--highlight-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  max-width: 72ch;
  box-shadow: 2px 3px 0 rgba(196, 168, 130, 0.35);
  position: relative;
}

.highlight-box::before {
  content: "★ Highlight";
  display: block;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--earth);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.highlight-box p { margin-bottom: 0; color: var(--text); }

/* Pro tip box */
.pro-tip {
  background: linear-gradient(135deg, var(--paper-warm) 0%, var(--khaki-light) 100%);
  border-left: 4px solid var(--sky);
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0;
  max-width: 72ch;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pro-tip::before {
  content: "Pro tip";
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sky-deep);
  margin-bottom: 0.35rem;
}

.pro-tip p { margin-bottom: 0; color: var(--text); }

/* Feature cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--khaki-light);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--jungle-dark);
  margin: 0 0 0.5rem;
}

.feature-card p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  background: var(--jungle-dark);
  color: var(--white);
  padding: 1.75rem 2rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--sky);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-item span {
  font-size: 0.82rem;
  opacity: 0.85;
}

/* Footer */
.site-footer {
  background: var(--earth);
  color: rgba(255, 255, 255, 0.82);
  padding: 2.5rem 2.5rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--khaki);
  margin-bottom: 0.65rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.65;
  opacity: 0.85;
}

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--khaki);
  margin-bottom: 0.75rem;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 0.4rem; }

.footer-col a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.footer-col a:hover { color: var(--sky); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  opacity: 0.65;
}

.footer-bottom a { color: rgba(255, 255, 255, 0.7); }

/* Legal pages */
.legal-hero {
  background: var(--jungle-dark);
  color: var(--white);
  padding: 2.5rem 2.5rem 2rem;
}

.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.legal-hero p {
  opacity: 0.85;
  max-width: 55ch;
}

.legal-body {
  padding: 2.5rem;
  max-width: 52rem;
}

.legal-body h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--jungle-dark);
  margin: 2rem 0 0.75rem;
}

.legal-body p,
.legal-body li {
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.legal-body ul {
  margin: 0 0 1rem 1.25rem;
}

/* Scroll reveal */
@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    transform: translateY(1.25rem);
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }

  @keyframes reveal-up {
    to { opacity: 1; transform: translateY(0); }
  }
}

@supports not (animation-timeline: view()) {
  .reveal { opacity: 1; transform: none; }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .top-bar {
    padding-left: 1.25rem;
  }

  .sidebar-toggle { display: block; }

  .guide-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    top: var(--topbar-h);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }

  .guide-sidebar.open {
    transform: translateX(0);
  }

  .guide-main {
    margin-left: 0;
  }

  .chapter,
  .cover-hero,
  .breadcrumbs,
  .site-footer,
  .legal-body,
  .legal-hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
