/* Shared section components used by more than one variant:
   nav, mobile menu, booking bar, stays cards, enquiry, visit, footer. */

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  color: var(--ivory-50); transition: background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease), transform .6s var(--ease);
}
.nav.is-solid { background: rgba(251, 248, 241, .96); color: var(--tea-900); box-shadow: 0 10px 30px -18px rgba(11, 33, 27, .5); backdrop-filter: blur(8px); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand .icon { width: 44px; height: 44px; color: var(--brass-500); }
.brand__name { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: .14em; line-height: 1; }
.brand__sub { display: block; font-size: 10px; letter-spacing: .28em; margin-top: 4px; opacity: .8; }
.nav__links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; text-decoration: none; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 1px; background: var(--brass-500); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; width: 48px; height: 48px; border: 1px solid currentColor; background: none; border-radius: 2px; cursor: pointer; align-items: center; justify-content: center; color: inherit; }
@media (max-width: 1000px) {
  .nav__links, .nav__cta .btn { display: none; }
  .menu-btn { display: inline-flex; }
}

.menu {
  position: fixed; inset: 0; z-index: 99; background: var(--tea-950); color: var(--ivory-50);
  padding: calc(var(--nav-h) + 32px) var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between;
}
.menu[hidden] { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { overflow: hidden; border-bottom: 1px solid rgba(220, 227, 214, .12); }
.menu a.menu__link { display: block; padding: 14px 0; font-family: var(--font-display); font-size: clamp(36px, 9vw, 56px); text-decoration: none; animation: menuIn .8s var(--ease) both; }
.menu li:nth-child(2) a { animation-delay: .06s; } .menu li:nth-child(3) a { animation-delay: .12s; }
.menu li:nth-child(4) a { animation-delay: .18s; } .menu li:nth-child(5) a { animation-delay: .24s; }
@keyframes menuIn { from { transform: translateY(100%); } to { transform: none; } }
.menu-open .nav { color: var(--ivory-50); background: transparent; box-shadow: none; }
.menu-open { overflow: hidden; }

/* ---------- booking bar ---------- */
.booking {
  position: relative; z-index: 5; background: var(--ivory-50); border-top: 3px solid var(--brass-500);
  box-shadow: 0 40px 80px -40px rgba(11, 33, 27, .45); padding: 28px;
  display: grid; grid-template-columns: 1fr 1fr 1.1fr 1.6fr auto; gap: 20px; align-items: end;
}
.booking .field { min-width: 0; position: relative; }
.booking__note { position: absolute; top: 100%; left: 0; font-size: 12px; color: var(--ink-500); margin-top: 4px; white-space: nowrap; }
.booking__guests { display: flex; gap: 14px; flex-wrap: wrap; }
.booking__guests .field { gap: 6px; }
.booking .btn { height: 52px; }
.booking__cap { grid-column: 1 / -1; font-size: 13px; color: var(--ink-500); margin: 8px 0 0; }
.booking__close { display: none; }
@media (max-width: 1100px) { .booking { grid-template-columns: 1fr 1fr; row-gap: 34px; } .booking .btn { grid-column: 1 / -1; } }

.sheet-btn { display: none; }
@media (max-width: 760px) {
  .booking-wrap { position: fixed; inset: auto 0 0 0; z-index: 120; transform: translateY(105%); transition: transform .5s var(--ease); max-height: 92vh; overflow: auto; }
  .sheet-open .booking-wrap { transform: none; }
  .booking { grid-template-columns: 1fr; row-gap: 20px; padding: 24px 20px 28px; box-shadow: 0 -20px 60px rgba(0, 0, 0, .35); }
  .booking__note { position: static; }
  .booking__close { display: inline-flex; justify-self: end; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; color: var(--tea-900); }
  .sheet-btn { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 110; }
  .sheet-open .sheet-btn { display: none; }
}

/* ---------- stays ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--tea-900); transition: background-color .3s, color .3s, border-color .3s; }
.pill[aria-pressed="true"] { background: var(--tea-900); color: var(--ivory-50); border-color: var(--tea-900); }
.pill:hover { border-color: var(--brass-500); }

.stays-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 32px; }
.stay-card { background: var(--ivory-50); display: flex; flex-direction: column; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.stay-card:hover { transform: translateY(-8px); box-shadow: 0 30px 50px -30px rgba(11, 33, 27, .45); }
.stay-card .ph { aspect-ratio: 4 / 3; }
.stay-card:hover .ph > img { transform: scale(1.06); }
.stay-card__body { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.stay-card .eyebrow::before { display: none; }
.stay-card p { margin: 0; font-size: 15px; }
.stay-card__meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-500); padding-top: 12px; border-top: 1px solid var(--line); margin-top: auto; }
.stay-card__meta .icon { width: 20px; height: 20px; color: var(--brass-700); }
.stay-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-family: var(--font-display); font-size: 22px; color: var(--tea-900); }
.price small { font-family: var(--font-body); font-size: 12px; color: var(--ink-500); }

/* ---------- enquiry ---------- */
.enquiry { display: grid; gap: 20px; }
.enquiry__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .enquiry__row { grid-template-columns: 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.seg legend { margin-bottom: 10px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; color: var(--tea-900); transition: background-color .3s, color .3s; }
.on-dark .seg label { color: var(--mist-100); border-color: rgba(220, 227, 214, .3); }
.seg input:checked + label { background: var(--brass-500); border-color: var(--brass-500); color: var(--tea-900); }
.seg input:focus-visible + label { outline: 2px solid var(--brass-500); outline-offset: 3px; }
[data-for][hidden] { display: none !important; }

/* ---------- visit ---------- */
.visit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.visit-list li { display: grid; grid-template-columns: 28px 1fr; gap: 16px; }
.visit-list .icon { color: var(--brass-500); margin-top: 3px; }
.visit-list strong { display: block; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-500); font-weight: 600; margin-bottom: 4px; }
.on-dark .visit-list strong { color: var(--brass-300); }
.visit-list a { text-decoration: none; border-bottom: 1px solid var(--line); }
.map { position: relative; min-height: 420px; background: var(--sand-200) url("photos/town-view.webp") center / cover; }
.map__btn { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(15, 42, 34, .35); cursor: pointer; color: var(--ivory-50); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.map__pin { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--brass-500); box-shadow: 0 0 0 4px rgba(251, 248, 241, .8); }
.map__pin::before, .map__pin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--brass-500); animation: pulse 2.4s var(--ease) infinite; }
.map__pin::after { animation-delay: 1.2s; }

/* ---------- footer ---------- */
.footer { background: var(--tea-950); color: var(--mist-200); padding: 120px 0 40px; }
.footer__close { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; padding-bottom: 72px; border-bottom: 1px solid rgba(220, 227, 214, .14); }
.footer__close .h1 { font-size: clamp(48px, 7vw, 104px); }
.footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding: 64px 0; }
@media (max-width: 860px) { .footer__cols { grid-template-columns: 1fr 1fr; } }
.footer h3 { font-family: var(--font-body); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass-300); font-weight: 600; margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer a { text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.footer a:hover { color: var(--brass-300); }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid rgba(220, 227, 214, .14); font-size: 13px; }
.footer__legal ul { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- variant switcher (prototype only) ---------- */
.variant-switch { position: fixed; right: 16px; bottom: 16px; z-index: 130; display: flex; gap: 4px; background: rgba(11, 33, 27, .9); padding: 6px; border-radius: 999px; backdrop-filter: blur(6px); }
.variant-switch a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; color: var(--mist-100); font-size: 12px; text-decoration: none; letter-spacing: .06em; }
.variant-switch a[aria-current="page"] { background: var(--brass-500); color: var(--tea-900); font-weight: 600; }
@media (max-width: 760px) { .variant-switch { bottom: 76px; right: 12px; } }

/* ---------- gallery band ---------- */
.band { padding: 110px 0; background: var(--ivory-100); overflow: hidden; }
.band__viewport { overflow-x: auto; scrollbar-width: none; }
.band__viewport::-webkit-scrollbar { display: none; }
.band__track { display: flex; gap: 18px; width: max-content; padding: 0 var(--gutter); animation: marquee 80s linear infinite; }
.band__viewport:hover .band__track, .band__viewport:focus-within .band__track, .band__viewport:focus .band__track { animation-play-state: paused; }
.band__item { margin: 0; position: relative; height: clamp(260px, 34vw, 440px); overflow: hidden; }
.band__item:nth-child(odd) { aspect-ratio: 4 / 5; } .band__item:nth-child(even) { aspect-ratio: 4 / 3; }
.band__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.band__item:hover img { transform: scale(1.06); }
.band__item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; font-size: 13px; color: var(--ivory-50); background: linear-gradient(transparent, rgba(11,33,27,.8)); opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.band__item:hover figcaption { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .band__track { animation: none; } .band__track > [aria-hidden="true"] { display: none; } }
.photo-credit { font-size: 12px; opacity: .8; }

/* ---- club crest (real KDH Club logo, tinted via mask) ---- */
.crest { display: inline-block; flex: none; width: 52px; height: 52px; background-color: var(--brass-500); -webkit-mask: url("logo/kdh-crest-mask.png") center / contain no-repeat; mask: url("logo/kdh-crest-mask.png") center / contain no-repeat; transition: transform .8s var(--ease); }
.brand:hover .crest { transform: rotate(-8deg); }
.nav .crest { -webkit-mask-image: url("logo/kdh-crest-mask-small.png"); mask-image: url("logo/kdh-crest-mask-small.png"); }
.nav .crest { background-color: var(--brass-300); }
.nav.is-solid .crest { background-color: var(--tea-900); }
.footer .crest { background-color: var(--brass-300); }
.footer .brand .crest { width: 72px; height: 72px; }
@media (max-width: 760px) { .crest { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .brand:hover .crest { transform: none; } }
