/* ============================================================
   Sandspit Holiday Park — shared styles
   Palette: estuary ink, shell, sandbar, pōhutukawa, harbour
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=Public+Sans:wght@400;600;700&display=swap');

:root {
  --ink: #22312e;
  --shell: #fbf8f2;
  --sandbar: #ede3d0;
  --pohutukawa: #b23a31;
  --pohutukawa-dark: #93291f;
  --harbour: #3e6e68;
  --dune: #8fa58b;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--shell);
  line-height: 1.6;
  font-size: 1rem;
}

img { max-width: 100%; display: block; }
a { color: var(--harbour); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--harbour);
  outline-offset: 2px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { font-family: var(--display); line-height: 1.15; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 600; }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--harbour);
  margin-bottom: .5rem;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--shell);
  border-bottom: 1px solid var(--sandbar);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  padding-top: .7rem; padding-bottom: .7rem;
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none;
  line-height: 1.1;
}
.brand-logo { height: 48px; width: auto; display: block; }
.brand span { color: var(--harbour); display: block; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 760px) { .brand-logo { height: 40px; } .brand span { display: none; } }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 1.1rem; }
nav.main a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
nav.main a[aria-current="page"] { color: var(--pohutukawa); }
nav.main a:hover { color: var(--harbour); }

.btn {
  display: inline-block;
  background: var(--pohutukawa);
  color: #fff !important;
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--pohutukawa-dark); }
.btn.big { padding: .85rem 1.7rem; font-size: 1.1rem; }
.btn.ghost { background: transparent; color: var(--ink) !important; border: 2px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff !important; }

/* mobile nav */
.nav-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--ink); border-radius: 8px; padding: .35rem .6rem; font-family: var(--display); font-weight: 600; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  nav.main {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--shell);
    border-bottom: 1px solid var(--sandbar);
    flex-direction: column; align-items: stretch;
    padding: 1rem 1.25rem;
  }
  nav.main.open { display: flex; }
  nav.main a { padding: .5rem 0; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex; align-items: flex-start;
  background: var(--ink);
}
.hero img.bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: .78;
}
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slides img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: heroFade 28s infinite;
}
.hero-slides img:nth-child(1) { animation-delay: 0s; }
.hero-slides img:nth-child(2) { animation-delay: 7s; }
.hero-slides img:nth-child(3) { animation-delay: 14s; }
.hero-slides img:nth-child(4) { animation-delay: 21s; }
@keyframes heroFade {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  22%  { opacity: 1; }
  25%  { opacity: 0; }
  100% { opacity: 0; }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(34,49,46,.12), rgba(34,49,46,.40));
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slides img { animation: none; opacity: 0; }
  .hero-slides img:first-child { opacity: 1; }
}
.hero .panel {
  position: absolute;
  z-index: 2;
  top: 1.1rem; right: 1.1rem;
  margin: 0; padding: 0;
}
.hero .panel-inner {
  background: rgba(251, 248, 242, .93);
  border-radius: 16px;
  padding: .7rem 1.5rem .85rem;
  width: min(560px, 92vw);
}
.hero .panel-inner .eyebrow { margin-bottom: .3rem; }
.hero .panel-inner h1 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.hero p.lede { margin: .35rem 0 .7rem; font-size: .92rem; }
.hero .panel-inner .btn { padding: .55rem 1.2rem; font-size: 1rem; }
@media (max-width: 760px) {
  .hero .panel { position: static; top: 0; }
  .hero .panel-inner { width: 100%; border-radius: 0; }
}

.page-hero {
  background: var(--ink);
  color: var(--shell);
  padding: 3rem 0 2.4rem;
}
.page-hero .eyebrow { color: var(--dune); }
.page-hero p { max-width: 60ch; margin-top: .6rem; color: #d8ded9; }

/* policies page decorative backdrop */
.policy-hero { position: relative; overflow: hidden; }
.policy-hero .wrap { position: relative; z-index: 1; }
.policy-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.policy-hero-bg svg { width: 100%; height: 100%; display: block; }

/* reusable decorative hero backdrop (cabins, camping, etc.) */
.art-hero { position: relative; overflow: hidden; }
.art-hero .wrap { position: relative; z-index: 1; }
.art-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.art-hero-bg svg { width: 100%; height: 100%; display: block; }

/* ---------- tide line divider (signature) ---------- */
.tide { display: block; width: 100%; height: 34px; }
.tide.flip { transform: scaleY(-1); }

/* ---------- sections ---------- */
section.band { padding: 3rem 0; }
section.band.sand { background: var(--sandbar); }
.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); margin-top: 1.5rem; }
.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); margin-top: 1.5rem; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.tile {
  background: var(--shell);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2d8c4;
  display: flex; flex-direction: column;
}
.tile img { height: 200px; width: 100%; object-fit: cover; }
.tile .pad { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.tile .pad .btn { margin-top: auto; align-self: flex-start; }

/* ---------- cabin cards ---------- */
.cabin {
  background: #fff;
  border: 1px solid #e2d8c4;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 2rem;
  scroll-margin-top: 90px;
}
.cabin .photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: var(--sandbar); }
.cabin .photos img { width: 100%; height: 190px; object-fit: cover; }
.cabin .photos.one { grid-template-columns: 1fr; }
.cabin .photos.one img { height: 300px; }
.cabin .photos.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) {
  .cabin .photos { grid-template-columns: 1fr 1fr; }
  .cabin .photos img { height: 130px; }
}
.cabin .body { padding: 1.4rem 1.5rem 1.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0 1rem; }
.chip {
  background: var(--sandbar);
  border-radius: 999px;
  padding: .25rem .85rem;
  font-size: .85rem;
  font-weight: 600;
}
.cabin h4 { font-family: var(--display); font-size: 1rem; margin: 1rem 0 .2rem; color: var(--harbour); }
.cabin .body .btn { margin-top: 1.1rem; }
.cabin p + p { margin-top: .5rem; }

/* ---------- cabin category: sidebar + detail ---------- */
.cabin-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; margin-top: 1.8rem; align-items: start; }
@media (max-width: 820px) { .cabin-layout { grid-template-columns: 1fr; } }

.cabin-list { position: sticky; top: 84px; }
@media (max-width: 820px) { .cabin-list { position: static; } }
.cabin-list h2 { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--harbour); margin-bottom: .6rem; }
.cabin-list ul { list-style: none; display: flex; flex-direction: column; gap: .35rem; }
@media (max-width: 820px) { .cabin-list ul { flex-direction: row; flex-wrap: wrap; } }
.cabin-list button {
  width: 100%; text-align: left;
  font-family: var(--display); font-weight: 600; font-size: 1.02rem;
  background: #fff; color: var(--ink);
  border: 1.5px solid #e2d8c4; border-radius: 10px;
  padding: .7rem .9rem; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
}
.cabin-list button:hover { border-color: var(--harbour); }
.cabin-list button[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cabin-list button .n { font-size: .8rem; font-weight: 600; opacity: .7; }

.cabin-detail { background: #fff; border: 1px solid #e2d8c4; border-radius: 16px; overflow: hidden; }
.cabin-detail .hero-photo img { width: 100%; height: auto; max-height: 560px; object-fit: contain; display: block; background: #f3ece0; }
.cabin-detail .hero-photo .placeholder {
  height: 300px; display: flex; align-items: center; justify-content: center;
  background: var(--sandbar); color: var(--harbour); font-family: var(--display); font-weight: 600; text-align: center; padding: 1rem;
}
.cabin-detail .subphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 3px; background: var(--sandbar); }
.cabin-detail .subphotos img { width: 100%; height: 110px; object-fit: cover; }
.cabin-detail .subphotos .subslot {
  height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; border: 2px dashed #cbb68f; color: var(--harbour);
  font-family: var(--display); font-weight: 600; font-size: .85rem; text-align: center; padding: .4rem; gap: .2rem;
}
.cabin-detail .subphotos .subslot small { font-family: var(--body); font-weight: 400; opacity: .7; font-size: .68rem; }
@media (max-width: 520px) { .cabin-detail .hero-photo img { max-height: 320px; } .cabin-detail .hero-photo .placeholder { height: 220px; } }
.cabin-detail .detail-body { padding: 1.5rem 1.6rem 1.7rem; }
.cabin-detail h3 { font-size: 1.6rem; }
.cabin-detail .meta { display: grid; gap: .6rem; margin: 1rem 0; }
.cabin-detail .meta .row { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; }
.cabin-detail .meta .row span:first-child { font-weight: 700; color: var(--harbour); }
@media (max-width: 420px) { .cabin-detail .meta .row { grid-template-columns: 1fr; gap: .1rem; } }
.cabin-detail .book-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.3rem; }
.cabin-detail .layout { margin-top: 1.4rem; }
.cabin-detail .layout h4 { font-family: var(--display); font-size: 1rem; color: var(--harbour); margin-bottom: .4rem; }
.cabin-detail .layout img { width: 100%; max-width: 560px; border: 1px solid #e2d8c4; border-radius: 10px; background: #fff; cursor: zoom-in; display: block; }
.cabin-detail .layout small { display: block; color: #8a8271; margin-top: .35rem; font-size: .8rem; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 28, 26, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox .lb-img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.lightbox .lb-btn {
  position: absolute; background: rgba(255,255,255,.15); color: #fff;
  border: none; cursor: pointer; font-family: var(--display);
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.8rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-btn:hover { background: rgba(255,255,255,.3); }
.lightbox .lb-close { top: 1.2rem; right: 1.2rem; }
.lightbox .lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 520px) {
  .lightbox .lb-prev { left: .4rem; } .lightbox .lb-next { right: .4rem; }
  .lightbox .lb-btn { width: 42px; height: 42px; }
}

/* ---------- info list / policies ---------- */
.info-block { margin-top: 2rem; max-width: 70ch; }
.info-block h2 { margin-bottom: .6rem; }
.info-block h3 { margin: 1.2rem 0 .3rem; color: var(--harbour); }
.info-block ul { padding-left: 1.2rem; margin: .4rem 0; }
.notice {
  background: var(--sandbar);
  border-left: 4px solid var(--pohutukawa);
  border-radius: 8px;
  padding: .9rem 1.1rem;
  margin-top: 1.2rem;
  max-width: 70ch;
}

/* ---------- contact ---------- */
form.contact { display: grid; gap: .9rem; max-width: 480px; margin-top: 1rem; }
form.contact label { font-weight: 600; font-size: .92rem; display: grid; gap: .3rem; }
form.contact input, form.contact textarea {
  font: inherit;
  padding: .6rem .8rem;
  border: 1.5px solid #cfc4ac;
  border-radius: 8px;
  background: #fff;
}
form.contact input:focus, form.contact textarea:focus { outline: 3px solid var(--harbour); border-color: var(--harbour); }
.map-embed { border: 0; width: 100%; height: 380px; border-radius: 14px; margin-top: 1.5rem; }
.contact-facts { display: grid; gap: .3rem; margin-top: 1rem; }

/* ---------- footer ---------- */
footer.site-footer {
  background: var(--ink);
  color: #cfd8d2;
  padding: 3rem 0 2rem;
  margin-top: 0;
}
footer .cols {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 860px) { footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { footer .cols { grid-template-columns: 1fr; } }
footer h5 {
  font-family: var(--display);
  color: var(--shell);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .7rem;
}
footer a { color: #cfd8d2; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer ul { list-style: none; }
footer li { margin: .25rem 0; }
footer .legal {
  border-top: 1px solid #3a4a46;
  margin-top: 2.2rem; padding-top: 1.2rem;
  font-size: .85rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}
