/* Unity Bali Group — tokens and components. See Docs/design-handoff/HANDOFF.md §3. */

:root {
  --sand: #F6F2EA;
  --paper: #FBF8F2;
  --sage-mist: #E9ECDF;
  --line: #D9D2C1;
  --card-border: #E6DFCF;
  --input-border: #CFC7B4;
  --ink: #1F2A22;
  --ink-soft: #4A5348;
  --moss: #3D4A36;
  --gold: #BFA23A;
  --gold-deep: #A68A2C;
  --gold-text: #7E6318;
  --gold-on-dark: #F0DFA8;
  --danger: #8A2B1E;
  --whatsapp: #25D366;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', 'Segoe UI', system-ui, sans-serif;

  --radius-card: 28px;
  --radius-media: 20px;
  --radius-input: 14px;
  --radius-pill: 999px;
  --container: 1240px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Smooth only for in-page link clicks; on load, a #fragment must jump instantly or Chrome abandons it. */
html:focus-within { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:focus-within { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--ink); }
a:hover { color: var(--gold-text); }

img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; }

h1, h2, h3, p { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--paper);
}
.skip-link:focus { top: 12px; color: var(--paper); }

.container {
  width: 100%;
  /* 1240px of content plus the gutters, as in the reference. */
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Type ---------- */

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.h-section {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
}

.h-sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
}

.h-small {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.1;
}

.text-soft { color: var(--ink-soft); }
.pretty { text-wrap: pretty; }

.facilitator {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--moss); color: var(--paper); }
.btn--secondary { border-color: var(--ink); color: var(--ink); background: transparent; padding: 0 26px; }
.btn--secondary:hover { background: var(--paper); color: var(--ink); }
.btn--on-photo { background: var(--paper); color: var(--ink); }
.btn--on-photo:hover { background: #fff; color: var(--ink); }
.btn--lg { min-height: 54px; gap: 12px; letter-spacing: normal; }
.btn--block { width: 100%; min-height: 52px; }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 15px; }
/* Softer and warmer than primary, for buttons that invite (Get your ticket, Book a session on service pages). */
.btn--soft { background: var(--gold-on-dark); border-color: var(--gold); color: var(--ink); }
.btn--soft:hover { background: #F6E9BF; border-color: var(--gold-deep); color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Tags ---------- */

.tag {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.tag--filled { background: var(--sage-mist); border-color: var(--sage-mist); color: var(--moss); }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.site-header__brand { display: flex; align-items: center; }
.site-header__brand img { height: 46px; width: auto; display: block; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-nav a { text-decoration: none; padding: 10px 0; }

/* Phones: the logo and the menu sit on two centred lines. */
@media (max-width: 640px) {
  .site-header { justify-content: center; gap: 0; padding-top: 16px; padding-bottom: 8px; }
  .site-nav { width: 100%; justify-content: center; gap: 0 24px; font-size: 14px; }
  /* Service pages: a slimmer header, as tall as the picture strip under it (see .service__hero). */
  body:has(.service) .site-header { padding-top: 12px; padding-bottom: 5px; }
  body:has(.service) .site-header__brand img { height: 40px; }
  body:has(.service) .site-nav a { padding: 8px 0; }
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(28px, 4vw, 44px);
  padding-bottom: clamp(24px, 4vw, 48px);
}
/* Edge to edge. Phones show the square image whole; wider screens the 16:9 picture, whole. */
.hero__media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero__media { aspect-ratio: 1672 / 941; }
  .hero__media img { object-position: 50% 15%; }
}
.hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: url(data:image/webp;base64,UklGRuwAAABXRUJQVlA4IOAAAABwBQCdASoYABgAPxF+tVWsJ6SjKAgBgCIJaACdMoM1cRuHlbGtnTFYZCWtalldI6XI3TtQAP6/hTeMYkyV2HfVyfXI8DuYimxVUro0N9s6jp73pjsAArQV74Q9/zIg+qMZNLRD4JUiP1gaYbHv6fSMNUGNdH+RRfN7oc6FddVH6SFbGz441uGUwNGPwdXQy7JrjtjDvbX17XiozAq+wpKFreh67Vc8ZjWIjLAPCZ5wY9llVA3+YRiHm7KMlAYoMCbr8aLaoBGiPsK9UgqQ25bYDIdgCc1ZU4Zax6fEX+wAAA==) center / cover;
}
.hero__content {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.hero__eyebrow { color: var(--gold-text); font-size: clamp(13px, 1.5vw, 18px); font-weight: 500; }
.hero__title {
  max-width: 760px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero__intro { max-width: 640px; color: var(--ink-soft); font-size: clamp(16px, 1.5vw, 19px); text-wrap: pretty; }
.hero__actions { padding-top: 8px; justify-content: center; }

/* ---------- About ---------- */

.about {
  max-width: calc(820px + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(40px, 4vw, 64px) var(--gutter) clamp(56px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}
.about__mark { height: 54px; width: auto; }
.about__quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.2;
  text-wrap: balance;
}

/* ---------- Events list ---------- */

.events {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: clamp(40px, 4vw, 56px);
}
.events__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.events__heading { display: flex; flex-direction: column; gap: 6px; }
.events__count, .events__note { color: var(--ink-soft); font-size: 15px; }
.events__note { text-align: center; }

/* ---------- Event card ---------- */

.event-card {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: clamp(24px, 4vw, 56px);
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: clamp(14px, 1.6vw, 20px);
}
.event-card__poster {
  flex: 1 1 300px;
  max-width: 460px;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-media);
  overflow: hidden;
}
.event-card__poster img,
.event-detail__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-card__body {
  flex: 999 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: clamp(8px, 2vw, 28px) clamp(8px, 2vw, 24px) clamp(12px, 2vw, 28px) 0;
}
.event-card__titles { display: flex; flex-direction: column; gap: 2px; }
.event-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.05;
}
.event-card__title a { text-decoration: none; }
.event-card__facilitator { font-size: clamp(22px, 2vw, 28px); }
.event-card__summary { max-width: 560px; color: var(--ink-soft); text-wrap: pretty; }
.event-card__actions { padding-top: 4px; }

.meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 14px 24px;
  font-size: 15px;
}
.meta-list li { display: flex; align-items: center; gap: 10px; }
.meta-list .icon { flex: none; color: var(--gold-text); }

/* ---------- Contact ---------- */

.contact { background: var(--sage-mist); }
.contact__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px 48px;
  padding-top: clamp(72px, 8vw, 112px);
  padding-bottom: clamp(72px, 8vw, 112px);
}
.contact__text { flex: 1 1 380px; display: flex; flex-direction: column; gap: 14px; }
.contact__text p { color: var(--moss); max-width: 520px; }
.contact__action { flex: 0 1 auto; max-width: 100%; }
.contact__action .btn { max-width: 100%; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer--ruled { border-top: 1px solid var(--line); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 36px;
  padding-bottom: 44px;
  font-size: 14px;
  color: var(--ink-soft);
}
.site-footer__logo { height: 34px; width: auto; display: block; }
.site-footer__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer__meta a { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* ---------- Event detail ---------- */

.page {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 12px;
  padding-bottom: clamp(80px, 9vw, 120px);
}

.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-soft);
}

.event-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(32px, 5vw, 72px);
}
.event-detail__main {
  flex: 999 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
/* One column (phones and small tablets, where the card would wrap under everything else): the date, price and booking
   card comes right after the poster, before the description. */
@media (max-width: 1030px) {
  .event-detail { flex-direction: column; align-items: stretch; gap: 40px; }
  .event-detail__main { display: contents; }
  .event-detail__main > * { order: 3; }
  .event-detail__head { order: 1; }
  .event-detail__poster { order: 2; }
  .reserve { order: 2; flex: none; }
}
.event-detail__head { display: flex; flex-direction: column; gap: 14px; }
.event-detail__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 5.6vw, 76px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.event-detail__facilitator { font-size: clamp(24px, 2.4vw, 32px); }
.event-detail__poster {
  max-width: 640px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.prose { display: flex; flex-direction: column; gap: 14px; max-width: 660px; }
.prose p { color: var(--ink-soft); text-wrap: pretty; }

.bio {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  max-width: 660px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.bio__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--sage-mist);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--moss);
}
.bio__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; }
.bio__text p { color: var(--ink-soft); }

.bio__photo img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; }
.host-photo-preview { width: min(160px, 100%); border-radius: 50%; }

.card {
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
}

.reserve {
  box-sizing: content-box; /* 340px basis plus padding, as in the reference */
  flex: 1 1 340px;
  min-width: 0;
  padding: clamp(24px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-margin-top: 16px;
}
#reserve-form { scroll-margin-top: 16px; }
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  font-size: 15px;
}
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 500; }
.facts__info { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.price-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.price-list__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--card-border);
  font-size: 15px;
}
.price-list__title { font-weight: 500; }
.price-list__price { font-weight: 500; text-align: right; }
.price-list__meta { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); }
.external-booking { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--card-border); }
.reserve__questions { font-size: 14px; color: var(--ink-soft); text-align: center; padding: 12px 0; }

/* ---------- Forms ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form--ruled { padding-top: 24px; border-top: 1px solid var(--card-border); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--moss); }
.input {
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-input);
  border: 1px solid var(--input-border);
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  width: 100%;
}
/* The reference inputs are content-box: 48px + borders. Selects are border-box there too. */
input.input { min-height: 50px; }
select.input { padding: 0 12px; }
.input.invalid { border-color: var(--danger); }
.validation-message, .form__error { font-size: 14px; color: var(--danger); }
.form__note { font-size: 13px; color: var(--ink-soft); }
/* Bold / italic / list / empty-line buttons above a text box (FormatBar.razor, format-bar.js). */
.format-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.format-bar__btn {
  min-width: 40px; min-height: 36px; padding: 0 12px;
  font: inherit; font-size: 15px; color: var(--moss);
  background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.format-bar__btn:hover, .format-bar__btn:focus-visible { background: var(--sage-mist); border-color: var(--sage-mist); }
.format-bar__btn:disabled { cursor: progress; opacity: .7; }
/* Small copies of the photos in a text, under its box (format-bar.js), shown as soon as they are added. */
.format-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.format-photos figure { margin: 0; width: 120px; }
.format-photos img { display: block; width: 120px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.format-photos figcaption { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Service editor: the title as it will show, updated while typing (service-editor.js). */
.title-preview { margin: 4px 0 0; font-size: 17px; color: var(--ink); }
.form__error { padding: 12px 16px; border-radius: var(--radius-input); background: #F7E7E2; }
/* hold-while-updating.js: "the site is updating, your form will be sent" and "we filled in what you typed". */
.form-hold { margin: 0; padding: 12px 16px; border-radius: var(--radius-input); background: var(--sage-mist); color: var(--ink); font-size: 15px; }
.validation-errors { margin: 0; padding-left: 20px; }

/* Honeypot: off-screen, not display:none, so naive bots still fill it. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}
.thanks img { height: 44px; width: auto; }
.thanks p { color: var(--ink-soft); }

/* ---------- 404 ---------- */

.not-found {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.not-found img { height: 54px; width: auto; }
.not-found h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
}

/* ---------- Staff area (login, host, admin) ---------- */

.staff-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 10px 0;
  font-size: 15px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.staff-nav a { text-decoration: none; padding: 10px 0; }
.staff-nav__user { margin-left: auto; color: var(--ink-soft); }
.staff-nav form { margin: 0; }
.link-button {
  background: none; border: 0; padding: 10px 0; min-height: 44px;
  font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer;
}
.link-button:hover { color: var(--gold-text); }

.panel { padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 20px; }
.panel--narrow { max-width: 460px; width: 100%; margin: 0 auto; }

.stat-row { display: flex; flex-wrap: wrap; gap: 16px; }
.stat {
  flex: 1 1 160px;
  padding: 18px 22px;
  border-radius: var(--radius-media);
  background: var(--sage-mist);
  display: flex; flex-direction: column; gap: 2px;
}
.stat__value { font-family: var(--font-body); font-size: 34px; line-height: 1.1; font-weight: 300; }
.stat__label { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--moss); }

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--card-border); vertical-align: top; }
.table th { font-weight: 500; color: var(--moss); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.table td { overflow-wrap: anywhere; }

.status-msg { padding: 12px 16px; border-radius: var(--radius-input); background: var(--sage-mist); color: var(--moss); }

.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-form .field { flex: 1 1 200px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field__legend { padding: 0; font-size: 14px; color: var(--moss); }

.contact__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.05;
}

/* ---------- Messages (staff) ---------- */

.message__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.message__head form { margin: 0; }
.message__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.message__tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.message__tabs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.message__tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); font-weight: 500; }
.message__empty-bin form { display: grid; gap: 8px; justify-items: start; }
.message__tabs ~ .status-msg, .message__tabs ~ .form__error { margin-bottom: 16px; }
.message__body { overflow-wrap: anywhere; }
.message--handled { opacity: .7; }

/* ---------- Contact page ---------- */

.contact-page {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(32px, 5vw, 72px);
}
.contact-page__intro { flex: 1 1 340px; display: flex; flex-direction: column; gap: 14px; }
.contact-page__intro p { color: var(--ink-soft); max-width: 520px; }
.community { display: flex; align-items: flex-start; gap: 16px; margin-top: 14px; padding: 22px 24px; background: var(--sage-mist); border-color: transparent; max-width: 520px; }
.community__icon { flex: none; color: var(--whatsapp); }
.community__text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.contact-page__intro .community p { color: var(--ink-soft); }
.contact-page__form { flex: 999 1 420px; min-width: 0; padding: clamp(24px, 2.6vw, 36px); scroll-margin-top: 16px; }
textarea.input { min-height: 160px; padding: 12px 16px; line-height: 1.5; resize: vertical; }

/* Welcome pop-up (homepage). */
html:has(.welcome[open]) { overflow: hidden; }
.welcome {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(31, 42, 34, .3);
  overflow-y: auto;
}
.welcome[open] { animation: welcome-rise .5s cubic-bezier(.2, .7, .2, 1); }
.welcome:focus-visible { outline: none; }
.welcome::backdrop {
  background: rgba(31, 42, 34, .5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: welcome-fade .5s ease;
}
.welcome__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(36px, 7vw, 52px) clamp(24px, 7vw, 52px);
  text-align: center;
}
.welcome__body p { color: var(--ink-soft); }
.welcome__mark { height: 54px; width: auto; }
.welcome__title {
  font: 500 clamp(30px, 6vw, 38px)/1.15 var(--font-display);
  letter-spacing: -0.005em;
}
.welcome__rule { width: 48px; height: 1px; background: var(--gold); }
.welcome__action { margin-top: 12px; }
@keyframes welcome-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes welcome-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .welcome[open], .welcome::backdrop { animation: none; }
}

/* Floating WhatsApp button (contact page). */
.whatsapp {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 5;
}
.whatsapp__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 6px 18px rgba(31, 42, 34, .28);
  cursor: pointer;
  transition: transform .15s ease;
}
.whatsapp__button:hover { transform: scale(1.06); }
.whatsapp__button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .whatsapp__button { transition: none; } }

.account-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.account-links a { display: inline-block; padding: 10px 0; }
.panel--narrow-left { max-width: 560px; }
.checks--column { flex-direction: column; gap: 0; }
.telegram { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 20px; border-top: 1px solid var(--card-border); }
.telegram form { margin: 0; }

/* ---------- Event editor and approvals ---------- */
.poster-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: var(--sage-mist);
  color: var(--moss);
  letter-spacing: 0.12em;
}
.event-form { gap: 24px; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.field-row .field { flex: 1 1 220px; min-width: 0; }
.price-options { display: flex; flex-direction: column; gap: 20px; }
.price-option {
  margin: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.price-option + .price-option { padding-top: 20px; border-top: 1px solid var(--card-border); }
/* Floated, the legend sits inside the box instead of on its top border. */
.price-option > legend { float: left; width: 100%; font-weight: 500; }
.price-option .field-row .field { flex-basis: 180px; }
/* The days are only asked for once "Recurring event" is ticked. */
.event-form:not(:has(#ev-recurring:checked)) .recurring-days { display: none; }
.recurring-weeks .input { max-width: 120px; }
/* The external link is only asked for when booking goes through an external website. */
.event-form:not(:has(#ev-booking-mode option[value="External"]:checked)) .booking-url { display: none; }
.event-form:not(:has(#ev-booking-mode option[value="External"]:checked)) .spots-optional { display: none; }
.poster-field { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.poster-field .field { flex: 1 1 260px; min-width: 0; }
.poster-field__preview { flex: 0 0 auto; width: min(200px, 100%); aspect-ratio: 1 / 1; border-radius: var(--radius-media); overflow: hidden; }
.poster-field__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
input[type="file"].input { padding: 10px 12px; height: auto; }
.approval-actions { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; border-top: 1px solid var(--card-border); }
.approval-actions form { margin: 0; }
.pending-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pending-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 0; border-bottom: 1px solid var(--card-border); }
.pending-list li:last-child { border-bottom: 0; }
.preview-note { margin-bottom: 20px; }
.nowrap { white-space: nowrap; }
.table-actions { display: flex; align-items: center; gap: 0 16px; }
.table-actions form { margin: 0; }
.table-actions .link-button { padding: 0; min-height: 0; }
.review-notes { display: flex; flex-direction: column; gap: 6px; }
.review-notes__list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }

/* ---- Service pages (/services/{id}) and their editor ---- */

/* A short strip of the picture with the title near its bottom. The picture is pinned to the bottom at its full
   height (--svc-hero-full, set by service-nav.js), so when the strip shrinks on scroll the top is cut away and the
   people and the title stay in view. */
.service__hero { position: relative; height: clamp(120px, 15vw, 190px); overflow: hidden; background: var(--moss); }
/* Phones: as tall as the slimmer header above it (about 96px, see .site-header). */
@media (max-width: 640px) { .service__hero { height: 96px; } }
.service__hero img { position: absolute; left: 0; bottom: 0; width: 100%; height: var(--svc-hero-full, 100%); object-fit: cover; object-position: center 40%; display: block; }
.service__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 28, 20, 0.7), rgba(20, 28, 20, 0.1) 75%); }
.service__hero-text { position: absolute; inset: 0; z-index: 1; margin: 0 auto; display: flex; align-items: flex-end; padding-bottom: clamp(12px, 2vw, 24px); }
.service__title {
  font-family: var(--font-display);
  font-weight: 500;
  /* A little smaller as the picture shrinks (--svc-shrink goes from 0 to 1). */
  font-size: calc(clamp(28px, 3.8vw, 46px) - var(--svc-shrink, 0) * clamp(6px, 1.4vw, 18px));
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  text-wrap: balance;
}
/* Picture, title and section links stick together from the first load; service-nav.js shrinks the picture on scroll. */
.service__top { position: sticky; top: 0; z-index: 20; background: var(--sand); }
/* service-nav.js keeps the text still itself (the margin under the top block grows as the block shrinks). The
   browser's own scroll anchoring would correct for that a second time, mid-measure, and on phones the page then
   shakes up and down while scrolling. */
.service { overflow-anchor: none; }
.service__intro { padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.service__tagline { max-width: 660px; color: var(--ink-soft); font-size: 19px; text-wrap: pretty; }
.service__page { display: flex; flex-direction: column; gap: 56px; padding-top: 32px; padding-bottom: 64px; }

/* Inside the sticky top block (see .service__top). */
.svc-tabs { position: relative; padding: 10px 0; background: var(--sand); border-bottom: 1px solid var(--line); }
.svc-tabs__menu { display: flex; flex-direction: column; gap: 8px; }
/* Every link is always visible: the rows wrap instead of scrolling sideways. */
.svc-tabs__row { display: flex; flex-wrap: wrap; gap: 6px; padding: 1px; }
.svc-tabs__row[hidden] { display: none; }

/* Phones, once scrolled into the text (service-nav.js adds .is-folded): the links fold into one line saying where
   you are; tapping it (.is-open) drops the full menu over the page. */
.svc-tabs__toggle { display: none; }
.svc-tabs.is-folded .svc-tabs__toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 40px; padding: 0 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--moss); background: var(--moss); color: var(--paper);
  font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.svc-tabs__where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-tabs__where-sub { opacity: 0.8; }
.svc-tabs__chevron { flex: none; width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.svc-tabs.is-open .svc-tabs__chevron { transform: rotate(-135deg); margin-top: 4px; }
.svc-tabs.is-folded .svc-tabs__menu { display: none; }
.svc-tabs.is-folded.is-open .svc-tabs__menu {
  display: flex; position: absolute; top: 100%; left: 0; right: 0;
  padding: 12px var(--gutter) 16px;
  max-height: calc(100dvh - var(--svc-bar, 120px) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--sand); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(20, 28, 20, 0.15);
}
@media (prefers-reduced-motion: reduce) { .svc-tabs__chevron { transition: none; } }
.svc-tabs a {
  flex: none; display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none;
  min-height: 34px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--card-border); background: var(--paper); color: var(--ink); font-size: 14px;
}
.svc-tabs a:hover { border-color: var(--input-border); }
.svc-tabs a[aria-current] { background: var(--moss); border-color: var(--moss); color: var(--paper); }
/* Subsections: smaller, softer pills. */
.svc-tabs__row--sub a { min-height: 30px; padding: 0 12px; font-size: 13px; background: var(--sage-mist); border-color: var(--sage-mist); color: var(--ink-soft); }
.svc-tabs__row--sub a[aria-current] { background: var(--gold-on-dark); border-color: var(--gold); color: var(--ink); }

/* An event card that is one big link (service pages): no buttons. */
/* Compact: a small poster beside the text, sized to its content (no tall empty space). */
.event-card--linked { flex-wrap: nowrap; align-items: center; gap: clamp(14px, 3vw, 28px); padding: 12px; border-radius: var(--radius-media); }
.event-card--linked .event-card__poster { flex: 0 0 clamp(96px, 26%, 190px); max-width: none; border-radius: 14px; }
.event-card--linked .event-card__body { flex: 1 1 auto; gap: 10px; padding: 4px 8px 4px 0; }
.event-card--linked .event-card__title { font-size: clamp(24px, 2.6vw, 30px); }
.event-card--linked .event-card__facilitator { font-size: clamp(18px, 1.8vw, 21px); }
.event-card--linked .event-card__summary { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card--linked .meta-list { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 6px 18px; font-size: 14px; }
@media (max-width: 520px) {
  .event-card--linked .event-card__summary { display: none; }
}
.event-card--linked { position: relative; transition: box-shadow .15s, border-color .15s; }
.event-card--linked:hover { border-color: var(--input-border); box-shadow: 0 6px 24px rgba(31, 42, 34, 0.08); }
.event-card__link { color: inherit; }
.event-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.event-card__link:focus-visible { outline: none; }
.event-card__link:focus-visible::after { outline: 2px solid var(--gold-text); outline-offset: 3px; }

/* "Get your ticket" on a linked card sits above the card-wide link (.event-card__link::after). */
.event-card__ticket { position: relative; z-index: 1; align-self: flex-start; }
/* Previews only: an event shown from pending-events.json. */
.unpublished-tag { display: inline-block; font-family: var(--font-body); font-size: 11px; padding: 4px 10px; background: var(--gold-on-dark); border-color: var(--gold); color: var(--ink); vertical-align: middle; }

/* Bookings and tickets section: one line per thing to book or event, with its button. */
.book-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.book-list[hidden] { display: none; }
.book-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding: 12px 12px 12px 22px; background: var(--paper); border: 1px solid var(--card-border); border-radius: var(--radius-media);
}
.book-item__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.4vw, 26px); line-height: 1.2; min-width: 0; }
.book-popover {
  width: min(380px, calc(100vw - 2 * var(--gutter))); margin: auto; padding: 24px;
  border: 1px solid var(--card-border); border-radius: var(--radius-card); background: var(--paper); color: var(--ink);
  box-shadow: 0 18px 48px rgba(20, 28, 20, 0.2);
}
.book-popover:popover-open { display: flex; flex-direction: column; gap: 14px; }
.book-popover::backdrop { background: rgba(31, 42, 34, 0.4); }
.book-popover__title { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.15; color: var(--moss); }
.book-popover__choices { display: flex; flex-direction: column; gap: 10px; }
.book-popover .link-button { align-self: center; }
.svc-section { display: flex; flex-direction: column; gap: 22px; max-width: 760px; scroll-margin-top: calc(var(--svc-bar, 56px) + 20px); }
.svc-sub { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; scroll-margin-top: calc(var(--svc-bar, 56px) + 20px); }
/* Service page headings are semibold (600, a weight the site loads for Cormorant Garamond), since Hosts cannot format titles. */
.svc-heading { font-family: var(--font-display); font-weight: 650; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.15; color: var(--moss); }
.svc-subtitle { font-family: var(--font-display); font-weight: 650; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; color: var(--moss); }
.svc-subheading { font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--moss); padding-top: 8px; border-top: 1px solid var(--line); }
.svc-section .event-card { max-width: none; }
.bio--plain { padding-top: 0; border-top: 0; }

.rich-text { display: flex; flex-direction: column; gap: 14px; max-width: 660px; }
.rich-text p, .rich-text li { color: var(--ink-soft); text-wrap: pretty; }
/* Jost is loaded up to 500 only (a plain <strong> would be a faked, heavy bold); 450 is a light bold that sits under the titles. */
.rich-text strong { font-weight: 450; color: var(--ink); }
.rich-text__gap { height: 12px; } /* plus the 14px flex gap: about one empty line */
.rich-text ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
/* A photo placed in the text with the editor's Photo button (RichText.razor). */
.rich-text__image { display: block; margin: 6px 0; }
.rich-text__image img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-input); }

/* The big button at the bottom of an event page. */
.service-link { align-self: flex-start; max-width: 100%; text-align: center; height: auto; padding-top: 14px; padding-bottom: 14px; }

/* The bottom of an event page: the host's other events. */
.other-events { display: flex; flex-direction: column; gap: 20px; max-width: 860px; margin-top: clamp(48px, 6vw, 80px); }
.other-events .event-card { max-width: none; }

/* Editor */
.svc-list, .svc-subs, [data-sub-list] { display: flex; flex-direction: column; gap: 16px; }
.svc-row { border: 1px solid var(--card-border); border-radius: var(--radius-media); padding: 16px 20px 20px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; background: var(--sand); }
.svc-row--sub { background: var(--paper); border-radius: 16px; }
.svc-row > legend { font-weight: 500; }
.svc-row__auto { display: none; }
.svc-row:not([data-kind="Text"]) > .svc-row__text { display: none; }
.svc-row[data-kind="Events"] > .svc-row__auto[data-auto="Events"],
.svc-row[data-kind="Host"] > .svc-row__auto[data-auto="Host"],
.svc-row[data-kind="Bookings"] > .svc-row__auto[data-auto="Bookings"] { display: flex; flex-direction: column; gap: 12px; }
.svc-book { display: flex; flex-direction: column; gap: 8px; }
.svc-book__row { display: flex; align-items: center; gap: 12px; }
.svc-book__row .input { flex: 1 1 auto; min-width: 0; }
/* What visitors will see, drawn as on the service page but smaller and not clickable (inert). */
.svc-preview { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px dashed var(--input-border); border-radius: 16px; background: var(--sand); }
.svc-row--sub .svc-preview { background: var(--paper); }
.svc-preview__label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.svc-preview .event-card--linked { box-shadow: none; }
.svc-subs { padding-left: 14px; border-left: 2px solid var(--card-border); align-items: flex-start; }
.svc-subs > [data-sub-list] { align-self: stretch; }
.svc-row__tools { display: flex; flex-wrap: wrap; gap: 4px 20px; }
/* Folding rows away (service-editor.js). Without JavaScript the heading is plain text. */
.svc-fold-all { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: -12px; }
.svc-row__toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: default; }
.svc-row__toggle .icon { display: none; flex: none; transition: transform 0.15s; }
[data-collapsible] .svc-row__toggle { cursor: pointer; min-height: 32px; }
[data-collapsible] .svc-row__toggle .icon { display: block; }
[data-collapsible] .svc-row__toggle:hover { color: var(--gold-text); }
.svc-row__summary { display: none; color: var(--ink); font-weight: 400; overflow-wrap: anywhere; }
.svc-row.is-collapsed { padding-top: 0; padding-bottom: 4px; }
.svc-row.is-collapsed > :not(legend) { display: none !important; }
.svc-row.is-collapsed > legend .icon { transform: rotate(-90deg); }
.svc-row.is-collapsed > legend .svc-row__summary { display: inline; }
