/* Unity Bali Group — tokens and components. See 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;

  --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; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Tags ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.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; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1254 / 834;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__media img {
  object-fit: cover;
  object-position: 50% 50%;
  /* LQIP from design-handoff/ASSETS.md */
  background: url(data:image/webp;base64,UklGRnAAAABXRUJQVlA4IGQAAAAQBACdASoYABAAPu1iqU2ppaOiMAgBMB2JZACdLwABcZwjImC8r56OAAD+zYEy5lUMijzc90LVxJ5e8z8pdc4l7CoULBxRR+3chGQSRqqQ+H40v0WTfcGUPkulLXS/52zxQAAA) center / cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  /* Extended above the design value (.28 at 32%, clear at 55%) so the eyebrow and intro read on the busy foliage. */
  background: linear-gradient(to top, rgba(18,26,20,.78) 0%, rgba(18,26,20,.5) 30%, rgba(18,26,20,.22) 55%, rgba(18,26,20,0) 72%);
}
.hero__content {
  max-width: var(--container);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: clamp(28px, 5vw, 72px);
  padding-bottom: clamp(28px, 5vw, 72px);
  color: var(--paper);
}
.hero__eyebrow {
  color: var(--gold-on-dark);
  /* Sits on bright foliage where the scrim is weakest: a little larger and heavier, with a soft dark halo. */
  font-size: 14px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(18, 26, 20, .55), 0 0 16px rgba(18, 26, 20, .65);
}
.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: 560px;
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 300;
  text-wrap: pretty;
}
.hero__actions { padding-top: 8px; }

/* ---------- About ---------- */

.about {
  max-width: calc(820px + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(80px, 9vw, 128px) 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;
}
.about__text { max-width: 640px; color: var(--ink-soft); text-wrap: pretty; }

/* ---------- Events list ---------- */

.events {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: clamp(88px, 9vw, 128px);
}
.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;
}
.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); }

.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;
}
.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; }
.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); }
.form__error { padding: 12px 16px; border-radius: var(--radius-input); background: #F7E7E2; }
.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__body { white-space: pre-line; 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; }
.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; }

.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; }
.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; }
.review-notes { display: flex; flex-direction: column; gap: 6px; }
.review-notes__list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
