/* ==========================================================================
   Sumba Waterfall — "Limestone & Mist"
   Base: tokens, reset, typography, buttons, header, drawer, footer, motion
   ========================================================================== */

:root {
    --ink: #16201b;
    --ink-2: #223029;
    --moss: #34473d;
    --stone: #f3efe6;
    --stone-2: #e9e2d4;
    --paper: #fbf9f4;
    --sand: #d9cdb6;
    --bronze: #7a5c34;
    --bronze-2: #b08d5b;
    --pool: #2f6f6a;
    --text: #1d2521;
    --text-soft: #454f49;
    --muted: #626961;
    --line: rgba(22, 32, 27, .16);
    --line-soft: rgba(22, 32, 27, .08);
    --line-light: rgba(243, 239, 230, .2);

    --serif: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
    --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --max: 1320px;
    --max-wide: 1600px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --header-h: 96px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    interpolate-size: allow-keywords;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1.5rem);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--stone);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(47, 111, 106, .15);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
p { margin: 0; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.12;
    letter-spacing: -.01em;
    margin: 0;
    text-wrap: balance;
    font-optical-sizing: auto;
}

p, li, dd { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--pool); outline-offset: 3px; }

::selection { background: var(--ink); color: var(--stone); }

.sw-sr {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.sw-skip {
    position: absolute; left: 1rem; top: -100px; z-index: 1000;
    background: var(--ink); color: var(--stone); padding: .75rem 1.25rem;
    font-size: .8rem; letter-spacing: .08em;
}
.sw-skip:focus { top: 1rem; }

main:focus { outline: none; }

/* Layout -------------------------------------------------------------------- */
.sw-container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: max(var(--gutter), env(safe-area-inset-left));
}
.sw-container--wide { max-width: var(--max-wide); }

/* Labels -------------------------------------------------------------------- */
.sw-eyebrow {
    display: inline-flex; align-items: center; gap: .85rem;
    font-family: var(--sans);
    font-size: .7rem; font-weight: 600;
    letter-spacing: .24em; text-transform: uppercase;
    color: var(--bronze);
    margin-bottom: 1.25rem;
}
.sw-eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.sw-eyebrow--light { color: var(--sand); }

.sw-byline, .sw-postcard__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem;
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--muted);
}
.sw-byline span + span::before, .sw-postcard__meta span + span::before {
    content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%;
    background: var(--bronze-2); margin-right: 1rem; vertical-align: middle; transform: translateY(-1px);
}
.sw-byline--light { color: rgba(243, 239, 230, .78); }

/* Buttons & links ------------------------------------------------------------- */
.sw-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 48px;
    padding: .9rem 1.65rem;
    font-family: var(--sans);
    font-size: .72rem; font-weight: 600;
    letter-spacing: .18em; text-transform: uppercase;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: 0;
    white-space: nowrap;
    transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.sw-btn .ti { font-size: 1.05rem; letter-spacing: 0; }
.sw-btn--sm { min-height: 40px; padding: .7rem 1.1rem; }
.sw-btn--solid { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.sw-btn--solid:hover { background: var(--bronze); border-color: var(--bronze); }
.sw-btn--ghost { color: var(--ink); border-color: var(--line); }
.sw-btn--ghost:hover { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.sw-btn--light { background: var(--stone); color: var(--ink); border-color: var(--stone); }
.sw-btn--light:hover { background: var(--paper); border-color: var(--bronze-2); color: var(--bronze); }
.sw-btn--ghost-light { color: var(--stone); border-color: rgba(243, 239, 230, .55); }
.sw-btn--ghost-light:hover { background: var(--stone); color: var(--ink); border-color: var(--stone); }

.sw-link {
    display: inline-flex; align-items: center; gap: .6rem;
    font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink);
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--line);
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.sw-link .ti { font-size: 1rem; transition: transform .35s var(--ease); }
.sw-link:hover { color: var(--bronze); border-color: var(--bronze); }
.sw-link:hover .ti-arrow-right { transform: translateX(4px); }
.sw-link:hover .ti-arrow-left { transform: translateX(-4px); }
.sw-link--light { color: var(--stone); border-color: var(--line-light); }
.sw-link--light:hover { color: var(--sand); border-color: var(--sand); }

/* Site note strip ---------------------------------------------------------- */
.sw-note { background: var(--ink); color: rgba(243, 239, 230, .78); font-size: .72rem; letter-spacing: .06em; }
.sw-note__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 36px; }
.sw-note__link { display: inline-flex; align-items: center; gap: .4rem; color: var(--stone); white-space: nowrap; }
.sw-note__link:hover { color: var(--sand); }
@media (max-width: 640px) { .sw-note__inner > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } }

/* Header ------------------------------------------------------------------- */
.sw-header {
    position: sticky; top: 0; z-index: 200;
    background: rgba(243, 239, 230, .92);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line-soft);
    transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease);
}
.sw-header__inner {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem;
    min-height: var(--header-h);
}
.sw-brand { display: inline-flex; align-items: center; }
.sw-brand__word {
    font-family: var(--serif); font-size: 1.5rem; font-weight: 400; letter-spacing: .01em; color: var(--ink);
    white-space: nowrap; transition: color .4s var(--ease);
}
.sw-brand__logo { height: 76px; width: auto; max-width: 240px; object-fit: contain; }
.sw-brand--light .sw-brand__word { color: var(--stone); }

.sw-header__nav { display: none; justify-self: center; }
.sw-header__actions { display: flex; align-items: center; gap: 1rem; justify-self: end; }

/* Desktop navigation */
.nav-menu { list-style: none; display: flex; align-items: center; gap: .25rem; }
.nav-menu > li { position: relative; display: flex; align-items: center; }
.nav-menu > li > .menu-link {
    position: relative; display: inline-flex; align-items: center;
    padding: .6rem .7rem; font-size: .83rem; font-weight: 500; letter-spacing: .03em;
    color: var(--ink); transition: color .25s var(--ease);
}
.nav-menu > li > .menu-link::after {
    content: ''; position: absolute; left: .7rem; right: .7rem; bottom: .3rem; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-menu > li:hover > .menu-link::after,
.nav-menu > li.current-menu-item > .menu-link::after,
.nav-menu > li.current-menu-ancestor > .menu-link::after { transform: scaleX(1); }
.sub-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 32px; margin-left: -.45rem; color: var(--muted);
}
.sub-toggle .ti { font-size: .8rem; transition: transform .3s var(--ease); }
.is-open > .sub-toggle .ti { transform: rotate(180deg); }

.nav-menu .submenu {
    list-style: none; position: absolute; top: calc(100% + .5rem); left: -1rem; min-width: 300px;
    padding: .75rem 0; background: var(--paper); border: 1px solid var(--line-soft);
    box-shadow: 0 30px 60px -30px rgba(22, 32, 27, .25);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.nav-menu .submenu::before { content: ''; position: absolute; left: 0; right: 0; top: -.6rem; height: .6rem; }
.nav-menu > li:hover > .submenu,
.nav-menu > li:focus-within > .submenu,
.nav-menu > li.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }
.nav-menu .submenu .menu-link {
    display: block; padding: .55rem 1.5rem; font-size: .88rem; line-height: 1.45; color: var(--text-soft);
    transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-menu .submenu .menu-link:hover,
.nav-menu .submenu .current-menu-item > .menu-link { color: var(--bronze); background: var(--stone); }

/* Overlay header on the homepage hero */
.sw-has-hero .sw-header.is-overlay:not(.is-scrolled) {
    background: transparent; border-color: var(--line-light);
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sw-has-hero .sw-header.is-overlay:not(.is-scrolled) .sw-brand__word,
.sw-has-hero .sw-header.is-overlay:not(.is-scrolled) .nav-menu > li > .menu-link,
.sw-has-hero .sw-header.is-overlay:not(.is-scrolled) .sub-toggle,
.sw-has-hero .sw-header.is-overlay:not(.is-scrolled) .sw-menu-toggle { color: var(--stone); }
.sw-has-hero .sw-header.is-overlay:not(.is-scrolled) .sw-header__cta { background: var(--stone); color: var(--ink); border-color: var(--stone); }
.sw-has-hero .sw-header.is-overlay:not(.is-scrolled) .sw-brand__logo { filter: brightness(0) invert(1); }

/* Menu toggle */
.sw-menu-toggle {
    display: inline-flex; align-items: center; gap: .75rem; min-height: 44px; padding: 0 .25rem;
    font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.sw-menu-toggle__bars { display: grid; gap: 6px; width: 24px; }
.sw-menu-toggle__bars span { display: block; height: 1px; background: currentColor; transition: transform .35s var(--ease); }
.sw-menu-toggle[aria-expanded="true"] .sw-menu-toggle__bars span:first-child { transform: translateY(3.5px) rotate(45deg); }
.sw-menu-toggle[aria-expanded="true"] .sw-menu-toggle__bars span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (min-width: 1200px) {
    .sw-header__nav { display: block; }
    .sw-menu-toggle { display: none; }
}
@media (max-width: 520px) {
    .sw-header__cta { display: none; }
    .sw-brand__word { font-size: 1.25rem; }
    .sw-brand__logo { height: 60px; }
    :root { --header-h: 76px; }
}

/* Drawer ------------------------------------------------------------------- */
.sw-drawer {
    position: fixed; inset: 0; z-index: 190;
    background: rgba(22, 32, 27, .35);
    opacity: 0; visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
    overscroll-behavior: contain;
}
.sw-drawer.is-open { opacity: 1; visibility: visible; }
.sw-drawer__panel {
    position: absolute; inset: 0 0 0 auto; width: min(460px, 100%);
    display: flex; flex-direction: column;
    background: var(--stone);
    padding: calc(var(--header-h) + 36px + 1.5rem) var(--gutter) calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(24px); transition: transform .45s var(--ease);
}
.sw-drawer.is-open .sw-drawer__panel { transform: none; }
.sw-drawer .nav-menu { flex-direction: column; align-items: stretch; gap: 0; }
.sw-drawer .nav-menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); }
.sw-drawer .nav-menu > li > .menu-link { flex: 1; padding: 1rem 0; font-family: var(--serif); font-size: 1.55rem; letter-spacing: 0; }
.sw-drawer .nav-menu > li > .menu-link::after { display: none; }
.sw-drawer .sub-toggle { width: 48px; height: 48px; margin: 0; color: var(--ink); }
.sw-drawer .sub-toggle .ti { font-size: 1.1rem; }
.sw-drawer .nav-menu .submenu {
    position: static; flex-basis: 100%; min-width: 0; display: none; padding: 0 0 1rem;
    background: none; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none;
}
.sw-drawer .nav-menu > li.is-open > .submenu { display: block; }
.sw-drawer .nav-menu .submenu .menu-link { padding: .45rem 0 .45rem 1rem; border-left: 1px solid var(--line); background: none; }
.sw-drawer__foot { margin-top: auto; padding-top: 2rem; display: grid; gap: .75rem; }
.sw-drawer__note { margin-top: .75rem; font-size: .78rem; color: var(--muted); }
body.sw-lock { overflow: hidden; }

/* Footer ------------------------------------------------------------------- */
.sw-footer {
    background: var(--ink); color: rgba(243, 239, 230, .72);
    padding: clamp(4rem, 8vw, 6.5rem) 0 calc(2rem + env(safe-area-inset-bottom));
    font-size: .9rem;
}
.sw-footer__top { display: grid; grid-template-columns: 1fr; gap: 3.5rem; padding-bottom: 3.5rem; border-bottom: 1px solid var(--line-light); }
.sw-footer__brand .sw-brand__logo { height: 136px; max-width: 300px; }
.sw-footer__note { margin: 1.25rem 0 2.25rem; max-width: 34ch; line-height: 1.7; }
.sw-footer__label {
    font-size: .68rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
    color: var(--bronze-2); margin-bottom: 1.1rem;
}
.sw-footer__label span { color: var(--stone); letter-spacing: .14em; margin-left: .5rem; }
.sw-footer__contact { list-style: none; display: grid; gap: .7rem; }
.sw-footer__contact a { display: inline-flex; align-items: center; gap: .7rem; color: var(--stone); overflow-wrap: anywhere; }
.sw-footer__contact .ti { font-size: 1.1rem; color: var(--bronze-2); }
.sw-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.sw-footer__col ul { list-style: none; display: grid; gap: .6rem; }
.sw-footer__col a, .sw-footer__contact a span { transition: color .25s var(--ease); }
.sw-footer__col a { line-height: 1.5; }
.sw-footer__col a:hover, .sw-footer__contact a:hover span { color: var(--sand); }
.sw-footer__group { padding: 2.75rem 0; border-bottom: 1px solid var(--line-light); }
.sw-footer__logos { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; }
.sw-footer__logos img {
    height: 34px; width: auto; max-width: 130px; object-fit: contain;
    transition: transform .3s var(--ease);
}
.sw-footer__logos a:hover img { transform: translateY(-2px); }
.sw-footer__bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
    padding-top: 2rem; font-size: .78rem; letter-spacing: .04em; color: rgba(243, 239, 230, .55);
}
.sw-footer__bottom a:hover { color: var(--sand); }
@media (max-width: 520px) { .sw-footer__brand .sw-brand__logo { height: 116px; } }
@media (min-width: 768px) { .sw-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sw-footer__top { grid-template-columns: 4fr 8fr; gap: 5rem; } }

/* Floating WhatsApp -------------------------------------------------------- */
.sw-wa-float {
    position: fixed; z-index: 150;
    right: max(1.25rem, env(safe-area-inset-right)); bottom: max(1.25rem, env(safe-area-inset-bottom));
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ink); color: var(--stone);
    box-shadow: 0 16px 40px -16px rgba(22, 32, 27, .6);
    transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.sw-wa-float .ti { font-size: 1.6rem; }
.sw-wa-float:hover { background: var(--pool); transform: translateY(-2px); }

/* Cookie notice ------------------------------------------------------------ */
.sw-cookie {
    position: fixed; z-index: 160;
    left: max(1rem, env(safe-area-inset-left)); bottom: max(1rem, env(safe-area-inset-bottom));
    width: min(420px, calc(100% - 6.5rem));
    display: grid; gap: 1rem; padding: 1.25rem 1.35rem;
    background: var(--paper); border: 1px solid var(--line);
    box-shadow: 0 24px 60px -30px rgba(22, 32, 27, .35);
    font-size: .82rem; line-height: 1.6; color: var(--text-soft);
}
.sw-cookie a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sw-cookie .sw-btn { justify-self: start; }
.sw-cookie { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.sw-cookie.is-leaving { opacity: 0; transform: translateY(12px); pointer-events: none; }
/* The hidden attribute must always win over component display rules */
[hidden], .sw-cookie[hidden] { display: none !important; }

/* Motion ------------------------------------------------------------------- */
.js .sw-reveal {
    opacity: 0; transform: translateY(14px);
    transition: opacity .7s var(--ease), transform .8s var(--ease);
}
.js .sw-reveal.is-in { opacity: 1; transform: none; }

.sw-rise { animation: sw-rise 1s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms + 150ms); }
@keyframes sw-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.sw-kenburns { animation: sw-settle 2.6s var(--ease) both; transform-origin: 50% 60%; }
@keyframes sw-settle { from { transform: scale(1.07); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
    .js .sw-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .sw-rise, .sw-kenburns { animation: none !important; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
