/* Hidden Eden — Island Immersive Retreats
   Palette read from the original: warm sand paper, deep teal chrome,
   gold reserved for small accents and the sun itself. */

:root {
  --sand:      #f7f1e8;
  --paper:     #ffffff;
  --teal:      #2c6e6b;
  --teal-deep: #1b4f4d;
  --teal-pale: #e2efec;
  --ink:       #14322f;
  --ink-dim:   rgba(20, 50, 47, 0.64);
  --ink-faint: rgba(20, 50, 47, 0.34);
  --line:      rgba(20, 50, 47, 0.13);
  --gold:      #c89b3c;
  --gold-deep: #a97e26;
  --gold-pale: #f4e8cd;
  --alarm:     #b5503a;

  --display: "Bodoni Moda", "Didot", Georgia, serif;
  --body: "Karla", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 62rem;
}

* { box-sizing: border-box; }

/* present to screen readers, absent from the page */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
html, body { margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; line-height: 1.1; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ---------- the sun mark ---------- */

.sun-mark {
  width: clamp(230px, 52vw, 400px);
  height: auto;
  display: block;
}
.sun-mark--sm { width: 42px; }

/* ---------- gate ---------- */

.gate { min-height: 100dvh; display: grid; place-items: center; padding: 3rem var(--gutter); text-align: center; }
.gate__inner { max-width: 30rem; width: 100%; }
.gate .sun-mark { margin: 0 auto 0.5rem; }

.gate h1 { font-size: clamp(2.5rem, 8.5vw, 4rem); letter-spacing: 0.01em; }
.gate h1 em { font-style: italic; color: var(--teal); }

.gate__sub {
  color: var(--ink-dim);
  margin: 1.25rem auto 2.5rem;
  font-size: 1rem;
  max-width: 26rem;
}

.codefield { display: flex; flex-direction: column; gap: 0.9rem; }

input, textarea, select {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.8rem 0.9rem;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, textarea:focus, select:focus { border-color: var(--teal); outline: none; }

.codefield input {
  font-family: var(--mono);
  font-size: 1.35rem;
  letter-spacing: 0.42em;
  text-align: center;
  text-transform: uppercase;
  padding: 1rem 0.5rem 1rem 0.92rem;
}

.btn {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--teal);
  border-radius: 4px;
  background: var(--teal);
  color: var(--sand);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.btn[disabled] { opacity: 0.45; cursor: progress; }

.btn--ghost { background: transparent; color: var(--teal); }
.btn--ghost:hover { background: var(--teal-pale); color: var(--teal-deep); }

.btn--quiet { background: transparent; color: var(--ink-dim); border-color: var(--line); }
.btn--quiet:hover { color: var(--ink); border-color: var(--ink-faint); background: transparent; }

.btn--danger { background: transparent; border-color: rgba(181, 80, 58, 0.4); color: var(--alarm); }
.btn--danger:hover { background: rgba(181, 80, 58, 0.08); border-color: var(--alarm); }

.btn--sm { padding: 0.5rem 0.9rem; font-size: 0.64rem; }

.notice { margin-top: 1rem; font-size: 0.85rem; color: var(--alarm); min-height: 1.2em; }

.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* ---------- retreat hero ---------- */

.hero { padding: clamp(2.5rem, 8vw, 5rem) 0 2.5rem; }
.hero__mark { margin-bottom: 1.75rem; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 4rem); margin-bottom: 0.6rem; }

.hero__tagline {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--teal);
  margin-bottom: 1.5rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hero__desc { max-width: 40rem; color: var(--ink-dim); margin-top: 1.5rem; }

.hero__image {
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 2rem;
}

/* ---------- day strip ---------- */

.days {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 1rem 0;
  margin: 2rem 0 0.5rem;
  background: linear-gradient(var(--sand) 68%, transparent);
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }

.day-tab {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.18s ease;
}
.day-tab:hover { color: var(--ink); border-color: var(--ink-faint); }
.day-tab[aria-selected="true"] {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--sand);
}

/* ---------- itinerary ---------- */

.itinerary { padding-bottom: 6rem; }

.moment {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 1.5rem;
  padding: 0 0 1rem;
  animation: rise 0.5s ease backwards;
}

.moment__time {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
  padding-top: 1.6rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* the card is what makes a moment feel like a thing, not a paragraph */
.moment__body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.6rem;
  min-width: 0;
}

.moment h3 { font-size: clamp(1.35rem, 3.4vw, 1.85rem); margin-bottom: 0.5rem; }
.moment p { color: var(--ink-dim); margin: 0 0 1rem; }

/* the small facts about a moment: where it is, what to wear */
.marks { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }

.mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--teal-pale);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  color: var(--teal-deep);
  text-decoration: none;
}
.mark > span { color: var(--gold-deep); }

.mark--map { border-color: var(--teal); transition: background 0.18s ease; }
.mark--map::after { content: "\2197"; margin-left: 0.1rem; color: var(--teal); }
.mark--map:hover { background: var(--teal); color: var(--sand); }
.mark--map:hover > span, .mark--map:hover::after { color: var(--sand); }

/* kept so older saved moments still render */
.dress { display: none; }

/* the whole picture, always. height is capped so a tall photo can't
   run away with the page; a narrow one simply sits centred. */
.moment__image {
  max-width: 100%;
  max-height: 340px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin: 1.25rem auto 0;
  display: block;
}

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 320px;
  margin-top: 1.25rem;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.courses { list-style: none; margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--line); }
.courses li { padding: 0.7rem 0; }
.courses .course__name { font-family: var(--display); font-size: 1.08rem; font-style: italic; }
.courses .course__desc { color: var(--ink-dim); font-size: 0.92rem; }
.courses .course__pairing {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ---------- the horizon ---------- */

.horizon {
  position: relative;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--teal) 12%, var(--gold) 46%, var(--gold) 54%, var(--teal) 88%, transparent);
  opacity: 0.55;
  margin: 2.75rem 0 2.25rem;
}

.horizon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, var(--gold-pale) 48%, transparent 70%);
  animation: breathe 5s ease-in-out infinite;
}

.horizon__label {
  position: absolute;
  left: 50%;
  top: 2.1rem;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@keyframes breathe {
  0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.16); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- locked moment ---------- */

.moment--locked { opacity: 1; }
.moment--locked .moment__body { background: transparent; border-style: dashed; }
.moment--locked .moment__time { color: var(--ink-faint); }

.veil { height: 0.85rem; border-radius: 999px; background: var(--ink); opacity: 0.08; margin-bottom: 0.7rem; }
.veil--short { width: 42%; }
.veil--mid { width: 76%; }

.countdown {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
  margin-top: 0.9rem;
  display: block;
}

/* ---------- host ---------- */

.host {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 2rem;
}
.host:empty { display: none; }
.host img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.host h3 { font-size: 1.4rem; }
.host p { color: var(--ink-dim); font-size: 0.94rem; margin: 0.4rem 0 0; }

/* ---------- empty / loading ---------- */

.quiet {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3rem 0;
  text-align: center;
}

/* ---------- admin ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.bar__brand { display: flex; align-items: center; gap: 0.75rem; }
.bar__brand strong { font-family: var(--display); font-size: 1.15rem; font-weight: 500; letter-spacing: 0.03em; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.panel > h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field > label {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.field--wide { grid-column: 1 / -1; }
.field textarea { min-height: 5.5rem; resize: vertical; }
.field input, .field textarea, .field select { background: var(--sand); }

.hint { font-size: 0.78rem; color: var(--ink-faint); }

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.check input { width: auto; accent-color: var(--teal); }

.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }

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

.row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sand);
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.row:hover { border-color: var(--teal); background: var(--teal-pale); }

.row__time { font-family: var(--mono); font-size: 0.8rem; color: var(--gold-deep); flex: 0 0 4rem; font-variant-numeric: tabular-nums; }
.row__main { flex: 1; min-width: 0; }
.row__main strong { font-weight: 500; display: block; }
.row__main small { color: var(--ink-faint); }

.tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  background: var(--paper);
  flex: 0 0 auto;
}
.tag--live { color: var(--teal-deep); border-color: transparent; background: var(--teal-pale); }
.tag--timed { color: var(--gold-deep); border-color: transparent; background: var(--gold-pale); }

.editor { border: 1px solid var(--teal); border-radius: 6px; padding: 1.35rem; background: var(--teal-pale); }
.editor input, .editor textarea, .editor select { background: var(--paper); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  background: var(--teal);
  color: var(--sand);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  z-index: 40;
  animation: rise 0.25s ease;
}
.toast--bad { background: var(--alarm); }

.hidden { display: none !important; }

@media (max-width: 620px) {
  .moment { grid-template-columns: 1fr; gap: 0.4rem; }
  .moment__time { padding-top: 0; text-align: left; }
  .moment__body { padding: 1.25rem; }
  .host { flex-direction: column; padding: 1.25rem; }
  .moment__image { max-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition: none !important; }
}

/* ---------- uploaded pictures ---------- */

.upload {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.upload__preview {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--teal-pale);
  display: grid;
  place-items: center;
}
.upload__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.upload__empty {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  padding: 0 0.3rem;
  line-height: 1.3;
}

.upload__controls { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; min-width: 0; }
.upload__controls input[type="file"] { font-family: var(--body); font-size: 0.8rem; padding: 0; border: 0; background: none; width: auto; max-width: 100%; }
.upload__controls input[type="file"]::file-selector-button {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  margin-right: 0.7rem;
  border: 1px solid var(--teal);
  border-radius: 4px;
  background: var(--teal);
  color: var(--sand);
  cursor: pointer;
}

/* a retreat's own logo, in place of the sun */
.retreat-logo {
  max-width: 240px;
  max-height: 200px;
  width: auto;
  height: auto;
  display: block;
}

/* ---------- add to home screen ---------- */

.install {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(26rem, calc(100vw - 2rem));
  box-shadow: 0 6px 24px rgba(20, 50, 47, 0.14);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  z-index: 30;
  animation: rise 0.35s ease;
}
.install p { margin: 0; flex: 1; font-size: 0.85rem; color: var(--ink-dim); line-height: 1.45; }
.install__actions { display: flex; flex-direction: column; gap: 0.4rem; flex: 0 0 auto; }
