/* Hahei Holiday Haven — shared styles */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,500&family=Lato:wght@400;700&display=swap');

:root {
  --sage: #94b4af;
  --sage-dark: #7a9e98;
  --slate: #566874;
  --slate-dark: #3f4d56;
  --mauve: #a5787f;
  --cream: #f7f0f0;
  --paper: #fbfaf8;
  --ink: #33393c;
  --ink-soft: #5a6265;
  --white: #ffffff;
  --radius: 4px;
  --max-width: 1180px;
  font-size: 17px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

h1, h2, h3, .display {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--slate-dark);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase; }

p { margin: 0 0 1em; }

a { color: var(--slate-dark); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid #e7e2df;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--slate-dark);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand span {
  color: var(--mauve);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--mauve);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--slate-dark);
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid #e7e2df;
  }

  .nav-links.open {
    max-height: 400px;
  }

  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
  }
}

/* Hero */

.hero {
  position: relative;
  background: var(--sage);
  color: var(--white);
  padding-top: 3.5rem;
  overflow: hidden;
}

.hero .container {
  position: relative;
}

.hero-eyebrow {
  font-style: italic;
  font-family: 'Playfair Display', serif;
  text-align: right;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 2rem;
}

.hero-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 620px;
  box-shadow: 0 18px 40px rgba(30, 45, 50, 0.18);
  margin-bottom: -3rem;
  position: relative;
  z-index: 2;
}

.hero-card h3 {
  color: var(--slate-dark);
  margin-bottom: 0.9rem;
}

.hero-photo {
  width: 100%;
  height: clamp(220px, 38vw, 420px);
  object-fit: cover;
  margin-top: 3rem;
}

/* Facts row */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 3rem 0 2rem;
  border-bottom: 1px dotted #d8d2ce;
}

.fact h3 {
  color: var(--slate);
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
}

.fact p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  margin: 0;
  color: var(--ink);
}

@media (max-width: 640px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
}

/* Section */

.section {
  padding: 3rem 0;
}

.section-tight {
  padding: 1.5rem 0 3rem;
}

.section-alt {
  background: var(--cream);
}

.section-slate {
  background: var(--slate-dark);
  color: #dfe6e8;
}

.section-slate h2, .section-slate h3 { color: var(--white); }

/* Two column amenities */

.amenity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.amenity-grid li {
  padding-left: 1.4rem;
  position: relative;
}

.amenity-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mauve);
}

.amenity-grid li.highlight {
  font-weight: 700;
}

@media (max-width: 560px) {
  .amenity-grid { grid-template-columns: 1fr; }
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery img { height: 200px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
}

/* Cards (things to do) */

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
}

.card h3 {
  color: var(--ink);
  border-bottom: 2px solid var(--mauve);
  display: inline-block;
  padding-bottom: 0.3rem;
  margin-bottom: 0.7rem;
}

.card-photos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-photos img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (max-width: 780px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* Getting around grid */

.getting-around {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

@media (max-width: 780px) {
  .getting-around { grid-template-columns: 1fr; }
}

/* Food/drink pill list */

.pill-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 3rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  max-width: 700px;
}

.pill-list li::before {
  content: "— ";
  color: var(--mauve);
}

@media (max-width: 560px) {
  .pill-list { grid-template-columns: 1fr; }
}

/* CTA button */

.btn {
  display: inline-block;
  background: var(--mauve);
  color: var(--white);
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.15s ease;
}

.btn:hover {
  background: #8f6169;
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--white);
  color: var(--white);
  text-decoration: none;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
}

/* Info boxes (guest info page) */

.info-box {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
}

.info-box h3 {
  color: var(--slate-dark);
}

.label-bar {
  background: var(--mauve);
  color: var(--white);
  text-align: center;
  padding: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

.label-bar + .info-box {
  border-radius: 0 0 var(--radius) var(--radius);
}

.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 780px) {
  .two-col { grid-template-columns: 1fr; }
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e7e2df;
}

.checklist li::before {
  content: "";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--sage);
  border-radius: 3px;
  margin-top: 2px;
}

.house-rules {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
}

.house-rules ul {
  columns: 2;
  list-style: none;
  margin: 0;
  padding: 1.5rem 1.8rem;
  gap: 1.5rem;
}

.house-rules li {
  break-inside: avoid;
  padding: 0.35rem 0;
}

@media (max-width: 560px) {
  .house-rules ul { columns: 1; }
}

.notice {
  border-left: 4px solid var(--mauve);
  background: var(--cream);
  padding: 1rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

/* Footer */

.site-footer {
  background: var(--slate-dark);
  color: #cfd8db;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--white);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Calendar image */

.calendar-image {
  border: 1px solid #e7e2df;
  border-radius: var(--radius);
}

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.photo-pair img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid #e7e2df;
}

@media (max-width: 480px) {
  .photo-pair { grid-template-columns: 1fr; }
}

/* Things-to-do map */

#things-map {
  height: 420px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid #e7e2df;
  margin-top: 1rem;
  z-index: 1;
}

.leaflet-popup-content {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
}

.leaflet-popup-content strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}

.leaflet-popup-content p {
  margin: 0.4em 0;
}

.house-pin {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid var(--slate-dark);
  border-radius: 50% 50% 50% 0;
  transform: rotate(45deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.house-pin span {
  display: block;
  font-size: 18px;
  line-height: 1;
  transform: rotate(-45deg);
}

.map-link {
  display: inline-block;
  margin-top: 0.6rem;
  margin-right: 1.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mauve);
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

.pill-list .map-link {
  margin: 0 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-slate .map-link {
  color: var(--white);
  opacity: 0.75;
}

/* Dive conditions */

.dive-hero {
  padding-bottom: 0;
  overflow: visible;
  z-index: 2;
}

.dive-card {
  max-width: 680px;
  margin-bottom: -3rem;
}

.dive-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.dive-card-top h3 {
  margin: 0;
}

.data-status {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.data-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9c2be;
}

.data-status.is-live::before { background: #5a9a78; }
.data-status.is-example { color: #9a6a22; }
.data-status.is-example::before { background: #d9a441; }

.dive-window {
  margin: 1.1rem 0 0;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dive-verdict {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 5rem);
  line-height: 1;
  margin: 0.4rem 0 0.8rem;
  color: var(--slate-dark);
}

.dive-reason {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  margin: 0;
}

.dive-reserve {
  margin: 1.2rem 0 0;
  border-left: 4px solid var(--mauve);
  background: var(--cream);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Verdict colours, used for the headline and over-limit figures */
.v-go { color: #3f7d5e; }
.v-warn { color: #a8711c; }
.v-nogo { color: #a4434e; }
.t-go { color: #3f7d5e; }
.t-warn { color: #a8711c; }
.t-nogo { color: #a4434e; }

.dive-controls {
  padding-top: 5rem;
}

.dive-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
}

.dive-control-row > div {
  min-width: 0;
}

.dive-label {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 0.6rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  font: 700 0.9rem 'Lato', sans-serif;
  color: var(--slate-dark);
  background: var(--white);
  border: 1.5px solid #d8d2ce;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
}

.chip:hover { border-color: var(--sage-dark); }

.chip[aria-pressed="true"] {
  background: var(--slate-dark);
  border-color: var(--slate-dark);
  color: var(--white);
}

.chip:focus-visible,
.day-btn:focus-visible,
.limit-form input:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--mauve);
  outline-offset: 2px;
}

.dive-facts {
  margin-top: 1.5rem;
  border-bottom: 0;
  padding-bottom: 0;
}

.dive-facts .fact p {
  font-variant-numeric: tabular-nums;
}

.fact-sub {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.day-btn {
  background: var(--white);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  padding: 0.9rem 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--ink);
  font-family: 'Lato', sans-serif;
  min-width: 0;
}

.day-btn:hover { border-color: #d8d2ce; }

.day-btn[aria-pressed="true"] {
  border-color: var(--slate-dark);
  box-shadow: 0 8px 20px rgba(30, 45, 50, 0.10);
}

.day-name {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

.day-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.day-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d8d2ce;
}

.dot-go, .key-go { background: #5a9a78; }
.dot-warn, .key-warn { background: #d9a441; }
.dot-nogo, .key-nogo { background: #b85c66; }

.day-meta {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-soft);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.day-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

.key {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 0.6rem;
}

.key:first-child { margin-left: 0; }

@media (max-width: 640px) {
  .day-strip { gap: 0.3rem; }
  .day-meta { display: none; }
  .day-num { font-size: 1.3rem; }
  .day-name { font-size: 0.62rem; letter-spacing: 0.02em; }
}

.dive-charts {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 780px) {
  .dive-charts { grid-template-columns: 1fr; }
}

.dive-charts > div { min-width: 0; }

.dive-charts h3 small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ink-soft);
}

.chart {
  overflow-x: auto;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 320px;
}

.chart-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

.limit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 1.2rem 0 0;
  max-width: 460px;
}

.limit-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--slate-dark);
}

.limit-form label small {
  font-weight: 400;
  color: var(--ink-soft);
}

.limit-form input {
  font: 1rem 'Lato', sans-serif;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid #d8d2ce;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}

.log-heading {
  margin-top: 2.5rem;
}

.log-form {
  align-items: end;
}

.log-form .btn {
  border: none;
  cursor: pointer;
  font: 700 1rem 'Lato', sans-serif;
  justify-self: start;
}

.log-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  max-width: 460px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.log-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid #e7e2df;
}

/* Conditions page: mode tabs, fishing stars, maramataka */

.mode-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.2rem;
  gap: 4px;
}

.mode-tabs button {
  font: 700 0.95rem 'Lato', sans-serif;
  letter-spacing: 0.02em;
  color: var(--white);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  cursor: pointer;
}

.mode-tabs button[aria-selected="true"] {
  background: var(--white);
  color: var(--slate-dark);
}

.mode-tabs button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.verdict-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.bite {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  margin-bottom: 0.9rem;
}

.bite-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}

.bite-stars {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--mauve);
  letter-spacing: 0.06em;
}

.star-off { color: #e2dbd8; }

.bite-word {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
}

.day-stars {
  font-size: 0.8rem;
  color: var(--mauve);
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .day-stars { font-size: 0.55rem; letter-spacing: 0; }
}

.legend-extra {
  margin-left: 0.6rem;
}

.moon-wrap {
  align-items: center;
}

.moon-night {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

#moonText {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.2rem;
  max-width: 34ch;
}

.moon-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.moon-disc {
  width: 140px;
  height: 140px;
}

.moon-month {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(15, 16px);
  gap: 5px;
  justify-content: center;
}

.mn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.mn.r0 { background: #e2dbd8; }
.mn.r1 { background: #c9d9d6; }
.mn.r2 { background: var(--sage); }
.mn.r3 { background: var(--slate-dark); }

.mn.is-now {
  outline: 2px solid var(--mauve);
  outline-offset: 2px;
}

.mn-key {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.3rem 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

.mn-key .mn {
  width: 10px;
  height: 10px;
  margin-left: 0.5rem;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.score-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.score-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e7dcdc;
}

.score-list li span:last-child {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

[hidden] {
  display: none !important;
}

.bite-block {
  margin-bottom: 2.5rem;
}

.chart-wide svg {
  min-width: 640px;
}
