/* =========================================================
   Salam di Zanzibar – global styles, menu & animations
   Design system "01 C Braun" · Plus Jakarta Sans
   Page layout is still inline in the HTML prototypes; this
   file holds everything that needs states, media queries
   or motion. See DEVELOPER.md.
   ========================================================= */

/* ---------- Fonts (self-hosted, SIL OFL 1.1) ---------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/pjs-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/pjs-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
  --c-ground: #F3EDE4;
  --c-card: #FBF8F3;
  --c-espresso: #1E1510;
  --c-copper: #8E5A31;
  --c-tan: #C99467;
  --c-text-muted: #5E4B3E;
  --c-border: #E8DDCF;
  --c-footer-text: #CDBFAE;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-inout: cubic-bezier(.7, 0, .2, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-ground); }
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; }
a { color: var(--c-espresso); }
a:hover { color: var(--c-copper); }
:focus-visible { outline: 2px solid var(--c-tan); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Header / burger ---------- */
.burger { display: none; border: 0; background: transparent; padding: 0; font: inherit; }
@media (max-width: 1080px) {
  header .dnav, header .dright { display: none !important; }
  .burger { display: inline-flex; }
}

/* ---------- Full-page menu (animated) ---------- */
.mnav {
  display: flex;
  visibility: hidden;
  clip-path: circle(0% at calc(100% - 48px) 44px);
  transition: clip-path .7s var(--ease-inout), visibility 0s linear .7s;
}
.menu-open .mnav {
  visibility: visible;
  clip-path: circle(150% at calc(100% - 48px) 44px);
  transition: clip-path .7s var(--ease-inout), visibility 0s;
}
.mnav button { border: 0; padding: 0; font: inherit; }
.mnav nav a,
.mnav > div:last-child {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .35s ease, transform .35s ease;
}
.menu-open .mnav nav a,
.menu-open .mnav > div:last-child {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .6s var(--ease-out);
}
.menu-open .mnav nav a:nth-child(1) { transition-delay: .20s; }
.menu-open .mnav nav a:nth-child(2) { transition-delay: .25s; }
.menu-open .mnav nav a:nth-child(3) { transition-delay: .30s; }
.menu-open .mnav nav a:nth-child(4) { transition-delay: .35s; }
.menu-open .mnav nav a:nth-child(5) { transition-delay: .40s; }
.menu-open .mnav nav a:nth-child(6) { transition-delay: .45s; }
.menu-open .mnav nav a:nth-child(7) { transition-delay: .50s; }
.menu-open .mnav nav a:nth-child(8) { transition-delay: .55s; }
.menu-open .mnav > div:last-child { transition-delay: .62s; }
.mnav nav a svg { transition: transform .25s var(--ease-out); }
.mnav nav a:hover svg, .mnav nav a:focus-visible svg { transform: translateX(6px); }
.menu-open, .menu-open body { overflow: hidden; }

/* ---------- Mobile sticky booking bar (tour pages) ---------- */
.mbar { display: none; }
@media (max-width: 975px) { .mbar { display: flex; } }

/* ---------- Buttons & links ---------- */
a.sdz-button, button.sdz-button {
  transition: transform .2s var(--ease-out), box-shadow .2s ease, filter .2s ease;
}
a.sdz-button:hover, button.sdz-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 21, 16, .18);
  filter: brightness(1.04);
}
a.sdz-button:active, button.sdz-button:active { transform: translateY(0); }
a svg.sdz-icon { transition: transform .25s var(--ease-out); }
a:hover > svg:last-child[style*="flex: none"] { transform: translateX(3px); }

/* ---------- Cards & images ---------- */
article { transition: transform .35s var(--ease-out), box-shadow .35s ease; }
article:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(30, 21, 16, .12); }
article img { transition: transform .8s var(--ease-out); }
article:hover img { transform: scale(1.04); }
figure img { transition: transform .6s var(--ease-out), filter .3s ease; }
figure:hover img { transform: scale(1.02); }

/* ---------- Hero entrance ---------- */
@keyframes sdzUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes sdzZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
h1 { animation: sdzUp .9s var(--ease-out) both .1s; }
h1 + p { animation: sdzUp .9s var(--ease-out) both .25s; }
img.sdz-hero-image { animation: sdzZoom 2.2s var(--ease-out) both; }
:has(> img.sdz-hero-image) { overflow: hidden; }
body { overflow-x: clip; }

/* ---------- Scroll reveal (classes set by site.js) ---------- */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .8s var(--ease-out); transition-delay: var(--rv-delay, 0s); }
.js .rv.is-in { opacity: 1; transform: none; }

/* ---------- FAQ accordion ---------- */
details > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--c-copper); border-bottom: 2px solid var(--c-copper);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--ease-out);
}
details[open] > summary::after { transform: rotate(225deg) translate(-3px, -3px); }
details[open] > summary ~ * { animation: sdzUp .4s var(--ease-out) both; }

/* ---------- Filters (tours, gallery) ---------- */
[data-filter] { cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
[data-filter][aria-pressed="true"] { background: var(--c-espresso) !important; color: var(--c-ground) !important; border-color: var(--c-espresso) !important; }
.is-filtered-out { display: none !important; }
.is-filtered-in { animation: sdzUp .45s var(--ease-out) both; }

/* ---------- Contact form ---------- */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
form input:focus, form select:focus, form textarea:focus { outline: 2px solid var(--c-tan); outline-offset: 1px; border-color: var(--c-copper) !important; }
form [aria-invalid="true"] { border-color: #B3261E !important; }
.form-status { grid-column: 1 / -1; margin: 0; font-size: 15px; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status[data-state="success"] { padding: 14px 16px; border-radius: 12px; background: #E7F1E4; color: #1F4D1A; }
.form-status[data-state="error"] { padding: 14px 16px; border-radius: 12px; background: #FBE6E3; color: #8A1F14; }
.form-status a { color: inherit; font-weight: 700; }
form button[type="submit"][disabled] { opacity: .65; cursor: progress; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
}
