/* Hidden Creek Spa — mobile-first styles */

:root {
  --green-dark: #1c4532;
  --green: #2f6f4f;
  --green-light: #e6f2ec;
  --gold: #c9a227;
  --text: #22302a;
  --text-muted: #5c6f66;
  --bg: #f7f5f0;
  --card-bg: #ffffff;
  --danger: #b23a48;
  --radius: 12px;
  /* Landing / site chrome */
  --jungle: #0f2e22;
  --creek: #5fb3a6;
  --creek-deep: #2e7f76;
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* Short pages (staff login, about) keep the footer at the bottom. */
main {
  flex: 1 0 auto;
  width: 100%;
}

.header-bar {
  background: var(--green-dark);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-bar .logo {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
}

.lang-picker {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
}

.lang-picker:focus,
.lang-picker:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.lang-picker option {
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.95rem;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--green-dark);
}

h1 {
  font-size: 1.7rem;
  margin: 0.5rem 0 0.25rem;
}

h2 {
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 0;
}

.loading {
  color: var(--text-muted);
}

/* Cards: services, slots, booking summary */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.card {
  background: var(--card-bg);
  border: 1px solid #e3ded4;
  border-radius: var(--radius);
  padding: 1rem;
}

.card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Buttons: 44px+ tap targets for mobile */
.btn {
  display: inline-block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:active {
  background: var(--green-dark);
}

.btn-secondary {
  background: var(--green-light);
  color: var(--green-dark);
}

.btn-danger {
  background: var(--danger);
}

/* Slot grid: thumb-sized time chips */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.slot-chip {
  min-height: 48px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--green-dark);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.slot-chip:active {
  background: var(--green-light);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #cfc9bc;
  border-radius: var(--radius);
  background: #fff;
}

.form-control:focus {
  outline: 2px solid var(--green);
  border-color: var(--green);
}

/* Schedule Builder Component */
.schedule-builder {
  margin: 0.5rem 0 1rem;
}

.schedule-rows {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.8fr) minmax(90px, 1fr) minmax(90px, 1fr) 36px;
  align-items: end;
  gap: 0.5rem;
  background: var(--card-bg);
  border: 1px solid #e3ded4;
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}

.schedule-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.schedule-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.schedule-row .form-control {
  min-height: 42px;
  height: 42px;
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
}

.schedule-remove-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  padding: 0;
  border: 1px solid #e0d9cf;
  border-radius: 50%;
  background: #fdfbf7;
  color: var(--danger);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.schedule-remove-btn:hover,
.schedule-remove-btn:focus {
  background: #fce8eb;
  border-color: var(--danger);
  color: var(--danger);
  outline: none;
}

.schedule-add-btn {
  margin-top: 0.6rem;
  min-height: 42px;
  font-size: 0.95rem;
}

@media (max-width: 500px) {
  .schedule-row {
    grid-template-columns: 1fr 1fr 36px;
    grid-template-areas:
      "day day remove"
      "start end .";
    row-gap: 0.6rem;
  }

  .schedule-field-day {
    grid-area: day;
  }

  .schedule-field-start {
    grid-area: start;
  }

  .schedule-field-end {
    grid-area: end;
  }

  .schedule-remove-btn {
    grid-area: remove;
    align-self: center;
    justify-self: end;
    margin: 0;
  }
}

/* Status banners */
.banner {
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.banner-info {
  background: var(--green-light);
  color: var(--green-dark);
}

.banner-error {
  background: #f9e3e6;
  color: var(--danger);
}

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--green-light);
  color: var(--green-dark);
}

.status-cancelled {
  background: #f9e3e6;
  color: var(--danger);
}

.back-link {
  display: inline-block;
  margin: 0.5rem 0;
  color: var(--green-dark);
}

/* Edit pop-up (native <dialog>) */
.modal {
  width: min(92vw, 480px);
  border: none;
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--card-bg);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(28, 69, 50, 0.5);
}

.dialog-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dialog-footer .btn {
  width: auto;
  flex: 1;
}

/* ------------------------------------------------------------------------
   Public site: landing, about, contact
   ------------------------------------------------------------------------ */

html {
  scroll-behavior: smooth;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--creek-deep);
}

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

/* Header: logo · Book shortcut · language */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.book-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--jungle);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.book-pill:active {
  background: #b08d1f;
}

.logo-tag {
  margin-left: 0.35rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.3rem 0.6rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.85;
}

.header-link:hover,
.header-link:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Staff dashboard: panel buttons as a thumb-friendly grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

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

@media (max-width: 400px) {
  .header-bar .logo {
    font-size: 1.05rem;
  }
}

/* Gold = "go to booking", everywhere it appears */
.btn-gold {
  background: var(--gold);
  color: var(--jungle);
}

.btn-gold:active {
  background: #b08d1f;
}

/* Photo placeholders: canopy-lit green panels with a fern and a caption
   naming the shot. Swap the contents for an <img> and keep the class. */
.ph {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background:
    radial-gradient(110% 90% at 15% 0%, #3b7d5d 0%, var(--green-dark) 48%, var(--jungle) 100%);
  color: #dff0e8;
}

.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-fern {
  position: absolute;
  right: 4%;
  bottom: 8%;
  width: 42%;
  height: auto;
  aspect-ratio: 1;
  color: #9fd9c9;
  opacity: 0.32;
  pointer-events: none;
}

.ph figcaption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.65rem;
  right: 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Hero */
.hero {
  padding-bottom: 1.5rem;
}

.ph-hero {
  aspect-ratio: 4 / 3;
  border-radius: 0;
  max-width: 960px;
  margin: 0 auto;
}

.hero-text {
  padding-top: 1.5rem;
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 8.5vw, 3.2rem);
}

.lede {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
}

/* The place: three blocks threaded by the creek. The line is a repeating
   SVG wave that starts under the eyebrow and flows down into the booking
   section, where it ends in a pool beside the heading. */
.place {
  position: relative;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.place::before {
  content: "";
  position: absolute;
  left: calc(1rem + 2px);
  top: 3rem;
  bottom: -1.6rem;
  width: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='40' viewBox='0 0 14 40'><path d='M7 0C12 10 2 30 7 40' fill='none' stroke='%235fb3a6' stroke-width='2' stroke-linecap='round'/></svg>")
    repeat-y;
  animation: creek-flow 2.6s linear infinite;
  pointer-events: none;
}

@keyframes creek-flow {
  to {
    background-position-y: 40px;
  }
}

.place .eyebrow {
  position: relative;
  padding-left: 2rem;
}

.place .eyebrow::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.15rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--creek);
  box-shadow: 0 0 0 4px rgba(95, 179, 166, 0.25);
}

.place-block {
  position: relative;
  margin: 1.5rem 0 0;
  padding-left: 2rem;
}

.place-block .ph {
  aspect-ratio: 3 / 2;
}

.place-block h2 {
  margin: 1rem 0 0.4rem;
  font-size: 1.55rem;
}

.place-block p {
  margin: 0;
  line-height: 1.6;
}

/* Booking section: the creek ends here */
.booking {
  scroll-margin-top: 4.5rem;
  padding-top: 0.5rem;
}

.booking-head {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
}

.creek-pool {
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--creek);
  box-shadow: 0 0 0 6px rgba(95, 179, 166, 0.25);
}

.section-title {
  margin: 0 0 0.25rem;
  font-size: 1.7rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2.25rem 1rem 2.75rem;
  background: var(--jungle);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.site-footer-inner {
  max-width: 640px;
  margin: 0 auto;
}

.footer-brand {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
}

.footer-line {
  margin: 0.15rem 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-nav .footer-staff {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

/* About / contact pages */
.page {
  padding-top: 1.75rem;
}

.page-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.9rem, 7.5vw, 2.8rem);
}

.prose p,
p.prose {
  line-height: 1.65;
  margin: 0 0 1rem;
}

.prose .ph,
.page .ph-map {
  margin: 1.5rem 0;
}

.prose h2,
.page > h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.45rem;
}

.page-cta {
  margin-top: 1.75rem;
}

.contact-list {
  margin: 0 0 1.5rem;
  padding: 0;
  background: var(--card-bg);
  border: 1px solid #e3ded4;
  border-radius: var(--radius);
}

.contact-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid #ece7dd;
}

.contact-row:first-child {
  border-top: none;
}

.contact-row dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.15rem;
}

.contact-row dd {
  margin: 0;
}

.contact-row a {
  color: var(--green-dark);
  font-weight: 600;
}

.ph-map {
  aspect-ratio: 16 / 9;
}

/* Wider screens: hero photo becomes a wide frame, place blocks put the
   photo beside the text, still hanging off the creek. */
@media (min-width: 640px) {
  .ph-hero {
    aspect-ratio: 21 / 9;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .hero-text {
    padding-top: 2.25rem;
  }

  .place-block {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 1.25rem;
    align-items: center;
    margin-top: 2rem;
  }

  .place-block h2 {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .place::before {
    animation: none;
  }
}
