/* =========================================================
   Yoga Zen Apartment - core stylesheet
   Palette sampled from the apartment: white / grey / green.
   Charcoal = all text. Green = the only saturated colour.
   Warmth comes from photography only - never the UI chrome.
   ========================================================= */

:root {
  /* Colour */
  --white:      #FFFFFF; /* cards, nav, booking box, calendar container */
  --stone:      #F5F5F2; /* page background */
  --grey-light: #E4E3DF; /* hairline borders, placeholders, dividers */
  --grey-mid:   #8A8983; /* captions/hints, inactive nav - never body copy */
  --green:      #5A7548; /* the only saturated colour */
  --green-deep: #4C6540; /* small/thin text on green, for contrast */
  --charcoal:   #2A2926; /* all readable text */

  /* Shape */
  --r-card:   8px;
  --r-btn:    6px;
  --r-cell:   2px;
  --border:   0.5px solid var(--grey-light);

  /* Spacing / rhythm */
  --gap:      16px;
  --gap-lg:   32px;
  --section:  56px;
  --maxw:     1120px;
  --maxw-narrow: 720px;
  --header-h: 60px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
          Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -0.2px; }
h2 { font-size: clamp(1.3rem, 3.5vw, 1.7rem); letter-spacing: -0.2px; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1em; }

.inline-link {
  color: var(--charcoal); text-decoration: underline;
  text-underline-offset: 2px; text-decoration-thickness: 1px;
  text-decoration-color: var(--grey-mid);
}
.inline-link:hover, .inline-link:focus-visible { text-decoration-color: var(--green); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--white); color: var(--charcoal);
  padding: 10px 16px; border: var(--border); border-radius: var(--r-btn); z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: var(--maxw-narrow); }
.section { padding: var(--section) 0; }
.section--tight { padding-top: var(--gap-lg); padding-bottom: var(--gap-lg); }
.measure { max-width: var(--maxw-narrow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  border-radius: var(--r-btn); padding: 11px 22px; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: background-color 0.15s ease;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--green-deep); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: var(--gap);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; margin-right: auto; }
.brand-mark {
  width: 14px; height: 14px; border-radius: var(--r-cell);
  background: var(--green); flex: none;
}
.brand-name { font-size: 0.95rem; font-weight: 500; letter-spacing: 0.4px; }

.primary-nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-link {
  display: inline-block; text-decoration: none; color: var(--grey-mid);
  padding: 6px 10px; font-size: 0.95rem; border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--charcoal); }
.nav-link.is-active { color: var(--charcoal); border-bottom-color: var(--green); }

.header-cta { padding: 8px 18px; font-size: 0.9rem; }

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
  display: none; width: 40px; height: 40px; background: none;
  border: var(--border); border-radius: var(--r-btn); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--charcoal); }

/* ---------- Hero / gallery ---------- */
.hero { padding-top: var(--gap-lg); }
.hero-head { max-width: var(--maxw-narrow); margin-bottom: var(--gap-lg); }
.hero-sub { color: var(--charcoal); font-size: 1.05rem; margin: 0; }

.gallery { display: grid; grid-template-columns: 1fr; gap: 10px; }
.gallery-item {
  margin: 0; border-radius: var(--r-card); overflow: hidden;
  aspect-ratio: 4 / 3; position: relative; cursor: pointer;
}
.gallery-item:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Placeholders (grey until photos arrive) ---------- */
.ph {
  background: var(--grey-light); border: var(--border);
  display: flex; align-items: center; justify-content: center;
}
.ph-label { color: var(--grey-mid); font-size: 0.8rem; letter-spacing: 0.4px; }
figure.ph { border-radius: var(--r-card); }

/* ---------- Amenities (plain rows, no boxes) ---------- */
.amenities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.amenity { display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.amenity-icon { color: var(--green); font-size: 0.7rem; flex: none; }

/* ---------- Booking + reviews ---------- */
.book-section { background: var(--white); border-top: var(--border); border-bottom: var(--border); }
.book-layout { display: grid; grid-template-columns: 1fr; gap: var(--gap-lg); }
.book-lead { color: var(--charcoal); }

.book-links { display: grid; gap: 10px; margin-bottom: var(--gap-lg); }
.book-card {
  display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  background: var(--green); border: 1px solid var(--green); border-radius: var(--r-card);
  padding: 16px 18px; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.book-card:hover, .book-card:focus-visible { background: var(--green-deep); border-color: var(--green-deep); }
.book-card-name { font-weight: 500; color: var(--white); }
.book-card-hint { color: var(--white); font-size: 0.85rem; }

/* Calendar / availability widget */
.calendar-embed {
  min-height: 320px; background: var(--white); border: var(--border);
  border-radius: var(--r-card); padding: 16px; position: relative;
}
.calendar-loading { display: block; text-align: center; padding: 24px 0; }
.calendar-embed.is-loaded .calendar-loading { display: none; }

/* Reviews */
.reviews-title { margin-bottom: var(--gap); }
.review-card {
  margin: 0 0 12px; background: var(--white); border: var(--border);
  border-radius: var(--r-card); padding: 16px 18px;
}
.review-card blockquote { margin: 0 0 8px; font-size: 0.98rem; }
.review-meta { color: var(--grey-mid); font-size: 0.85rem; }

/* ---------- Area hub: guide cards ---------- */
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.guide-card {
  display: block; text-decoration: none; background: var(--white);
  border: var(--border); border-radius: var(--r-card); padding: 20px;
  transition: border-color 0.15s ease;
}
.guide-card:hover, .guide-card:focus-visible { border-color: var(--green); }
.guide-card-title {
  font-size: 1.15rem; font-weight: 500; color: var(--charcoal); margin: 0 0 6px;
}
.guide-card-title .arrow {
  color: var(--green); display: inline-block; transition: transform 0.15s ease;
}
.guide-card:hover .arrow, .guide-card:focus-visible .arrow { transform: translateX(3px); }
.guide-card-desc { color: var(--charcoal); font-size: 0.95rem; margin: 0; }

/* ---------- Guide article ---------- */
.breadcrumb { font-size: 0.85rem; color: var(--grey-mid); margin: 0 0 10px; }
.breadcrumb a { color: var(--charcoal); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-decoration-color: var(--green); }
.breadcrumb .sep { color: var(--grey-light); margin: 0 6px; }

.article-hero {
  height: clamp(200px, 42vw, 380px); margin: 0 0 var(--gap-lg);
  border-radius: var(--r-card); overflow: hidden;
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-meta { color: var(--grey-mid); font-size: 0.9rem; margin: 0 0 2em; }
.article-body h2 { margin-top: 1.8em; }
.article-body h3 { margin-top: 1.5em; font-size: 1.15rem; }

/* Shop entries as scannable, numbered lists */
.shop-group-title { font-size: 1rem; font-weight: 500; margin: 1.4em 0 0.2em; }
.shop-list { list-style: none; counter-reset: shop; margin: 0.4em 0 1.4em; padding: 0; }
.shop {
  counter-increment: shop; position: relative;
  padding: 14px 0 14px 44px; border-top: var(--border); scroll-margin-top: 80px;
}
.shop:first-child { border-top: none; }
.shop::before {
  content: counter(shop); position: absolute; left: 0; top: 14px;
  width: 28px; height: 28px; border-radius: var(--r-card);
  background: var(--stone); border: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 500; color: var(--charcoal);
}
.shop-name { font-size: 1.02rem; font-weight: 500; margin: 0 0 3px; color: var(--charcoal); }
.shop p { margin: 0 0 4px; }
.shop-links { font-size: 0.9rem; color: var(--grey-mid); margin: 4px 0 0; }
.shop:target { background: var(--stone); border-radius: var(--r-card); }

/* Cheat-sheet table - highlighted header, zebra rows, rounded frame */
.table-wrap {
  overflow-x: auto; margin: 1.2em 0 1.8em;
  border: var(--border); border-radius: var(--r-card);
}
.cheat-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.cheat-table thead th {
  background: var(--charcoal); color: var(--white); font-weight: 500;
  text-align: left; padding: 14px 16px; white-space: nowrap;
}
.cheat-table tbody th, .cheat-table tbody td {
  text-align: left; padding: 13px 16px; border-top: var(--border); vertical-align: top;
}
.cheat-table tbody th { font-weight: 500; color: var(--charcoal); }
.cheat-table tbody tr:nth-child(even) { background: var(--stone); }

/* Author block */
.author-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white); border: var(--border); border-radius: var(--r-card); padding: 20px;
}
.author-avatar {
  width: 56px; height: 56px; border-radius: var(--r-card); flex: none;
  background: var(--grey-light); border: var(--border);
  object-fit: cover; display: block;
}
.author-label { color: var(--grey-mid); font-size: 0.8rem; margin: 0 0 4px; }
.author-name { font-weight: 500; margin: 0 0 4px; }
.author-bio { color: var(--charcoal); margin: 0; font-size: 0.95rem; }

/* Pre-footer: more guides (compact, title-only guide cards) */
.prefooter { background: var(--white); border-top: var(--border); }
.guide-card--compact { padding: 16px 18px; }
.guide-card--compact .guide-card-title { margin: 0; font-size: 1rem; }

/* Ranked quick-list (e.g. breakfast top 5) - stands out like the cheat table */
.ranking-list {
  counter-reset: rank; list-style: none; margin: 1.2em 0 1.8em; padding: 0;
  border: var(--border); border-radius: var(--r-card); overflow: hidden;
}
.ranking-list li {
  counter-increment: rank; position: relative;
  padding: 13px 16px 13px 50px; border-top: var(--border);
}
.ranking-list li:first-child { border-top: none; }
.ranking-list li:nth-child(even) { background: var(--stone); }
.ranking-list li::before {
  content: counter(rank); position: absolute; left: 14px; top: 12px;
  width: 24px; height: 24px; border-radius: var(--r-cell);
  background: var(--charcoal); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 500;
}
.ranking-list a { font-weight: 500; }

/* Callout note + numbered tips */
.note {
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  padding: 16px 18px; margin: 1.4em 0;
}
.note p { margin: 0; }
.tips-list { padding-left: 1.3em; margin: 0.5em 0 1.5em; }
.tips-list li { margin-bottom: 8px; padding-left: 4px; }

/* Plain body lists (unclassed ul/ol inside an article) */
.article-body ul:not([class]), .article-body ol:not([class]) { padding-left: 1.3em; margin: 0.5em 0 1.2em; }
.article-body ul:not([class]) li, .article-body ol:not([class]) li { margin-bottom: 7px; }
.article-body ul:not([class]) ul { margin: 7px 0 4px; }

/* Guide article: cafe-style entries with pros/cons */
.cafe { padding: 24px 0; border-top: var(--border); scroll-margin-top: 80px; }
.cafe:first-of-type { border-top: none; padding-top: 6px; }
.cafe h3 { margin-top: 0; }
.cafe-bestfor { margin: 0 0 0.8em; }
.cafe-meta { font-size: 0.9rem; color: var(--grey-mid); margin: 0.9em 0 0; }
.proscons-label { font-weight: 500; margin: 1em 0 0.3em; }
.proscons { list-style: none; padding: 0; margin: 0.3em 0 0; }
.proscons li { position: relative; padding-left: 24px; margin-bottom: 5px; }
.proscons li::before { position: absolute; left: 0; font-weight: 600; }
.proscons .pro::before { content: "\2713"; color: var(--green); }
.proscons .con::before { content: "\2715"; color: var(--grey-mid); }

/* ---------- Location ---------- */
.location-address { color: var(--charcoal); margin-bottom: var(--gap); }
.map {
  height: 340px; border-radius: var(--r-card);
  border: var(--border); overflow: hidden; background: var(--grey-light);
}
.map-directions { margin-top: 12px; margin-bottom: 0; }
/* Leaflet chrome tuned to the palette */
.leaflet-container { font-family: var(--font); background: var(--grey-light); }
.leaflet-control-zoom a { color: var(--charcoal); border-color: var(--grey-light); }
.leaflet-control-attribution { font-size: 10px; }
.map-pin svg { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: var(--border); padding: var(--gap-lg) 0; }
.footer-inner { display: flex; flex-direction: column; gap: var(--gap); align-items: flex-start; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; }
.lang-switch { display: flex; align-items: center; gap: 8px; }
.lang-link { text-decoration: none; color: var(--grey-mid); font-size: 0.9rem; }
.lang-link.is-active { color: var(--charcoal); }
.lang-sep { color: var(--grey-light); }
.footer-platforms { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }
.footer-platforms a { color: var(--charcoal); text-decoration: none; font-size: 0.9rem; }
.footer-platforms a:hover { border-bottom: 1px solid var(--green); }
.footer-copy { color: var(--grey-mid); font-size: 0.85rem; margin: 0; }

/* ---------- Sticky book bar (mobile only) ---------- */
.sticky-book {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--white); border-top: var(--border);
  padding: 10px 20px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.sticky-book-btn { display: block; width: 100%; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(42, 41, 38, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox-content { width: min(100%, 900px); aspect-ratio: 4 / 3; border-radius: var(--r-card); }
.lightbox-img { max-width: min(100%, 1200px); max-height: 88vh; border-radius: var(--r-card); object-fit: contain; display: block; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px;
  background: var(--white); border: none; border-radius: var(--r-btn);
  font-size: 1.1rem; color: var(--charcoal); cursor: pointer;
}

/* =========================================================
   Responsive - mobile-first; enhancements scale up
   ========================================================= */

/* Small tablets and up */
@media (min-width: 600px) {
  .amenities { grid-template-columns: 1fr 1fr; }
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
  }
  .gallery-item--lead { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .footer-copy { margin-left: auto; }
}

/* Desktop */
@media (min-width: 900px) {
  :root { --section: 72px; }

  .nav-toggle { display: none; }
  .sticky-book { display: none; }           /* header CTA carries it on desktop */

  .amenities { grid-template-columns: repeat(3, 1fr); }

  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery-item--lead { grid-column: 1 / 3; grid-row: 1 / 3; aspect-ratio: auto; }

  .guide-grid { grid-template-columns: repeat(3, 1fr); }

  .book-layout { grid-template-columns: 1.6fr 1fr; align-items: start; }
}

/* ---------- Mobile nav behaviour ---------- */
@media (max-width: 899px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }            /* sticky bar carries booking on mobile */
  .nav-menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white); border-bottom: var(--border);
    padding: 8px 20px 16px; display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-link { padding: 12px 0; border-bottom: none; }
  .nav-link.is-active { border-bottom: none; color: var(--green); }
  .site-header { position: sticky; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
