:root {
  --ink: #1B1F2A;
  --surface: #242938;
  --paper: #EDEAE3;
  --paper-dim: #B7B2A6;
  --accent: #E3A857;
  --rule: rgba(237, 234, 227, 0.14);
  --danger: #C97B63;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  margin: 0;
}

a { color: var(--paper); }

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--rule);
  max-width: 760px;
  margin: 0 auto;
}

.masthead__brand {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.masthead__cta {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.masthead__cta:hover { border-color: var(--accent); }

/* ---------- Notice / flash ---------- */

.notice {
  max-width: 760px;
  margin: 1rem auto 0;
  padding: 0.85rem 1.25rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  font-size: 0.92rem;
}
.notice p { margin: 0; }

/* ---------- Main / hero ---------- */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.hero p {
  margin: 0.9rem 0 0;
  color: var(--paper-dim);
  max-width: 46ch;
}

.hero--form { padding: 2.75rem 0 2rem; }

/* ---------- Program list ---------- */

.program { padding: 1.5rem 0; }
.program--past { padding-top: 0.5rem; }

.program__heading {
  font-size: 0.95rem;
  color: var(--paper-dim);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.program__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.entry { border-bottom: 1px solid var(--rule); }

.entry__link {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.15rem 0;
  text-decoration: none;
  color: inherit;
}

.entry__date {
  flex: 0 0 3.6rem;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.entry__day {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  color: var(--accent);
}

.entry__month {
  font-size: 0.72rem;
  color: var(--paper-dim);
  letter-spacing: 0.03em;
}

.entry__body { flex: 1; min-width: 0; }

.entry__title {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
}

.entry__meta {
  display: block;
  font-size: 0.85rem;
  color: var(--paper-dim);
  margin-top: 0.2rem;
}

.entry--past .entry__day,
.entry--past .entry__title { color: var(--paper-dim); }

.program__empty {
  color: var(--paper-dim);
  padding: 1rem 0;
}
.program__empty a { color: var(--accent); }

/* ---------- Forms ---------- */

.sheet {
  padding: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.sheet--static { gap: 1rem; }

.field-row {
  display: flex;
  gap: 1.25rem;
}
.field-row .field { flex: 1; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 0.82rem;
  color: var(--paper-dim);
  font-weight: 500;
}

input, textarea {
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  padding: 0.65rem 0.8rem;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.15s ease;
}

input:focus, textarea:focus {
  border-color: var(--accent);
}

textarea { resize: vertical; }

.button {
  align-self: flex-start;
  background: var(--accent);
  color: var(--ink);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s ease;
}
.button:hover { opacity: 0.88; }

.button--ghost {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* ---------- Created / token ---------- */

.callout {
  color: var(--paper-dim);
  max-width: 52ch;
}

.token-box {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 0.9rem 1rem;
  border-radius: 3px;
  word-break: break-all;
  font-size: 0.85rem;
}

/* ---------- Event detail page ---------- */

.event-page { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--rule); }

.event-page__date {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.event-page h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); }

.event-page__location,
.event-page__host {
  color: var(--paper-dim);
  margin: 0.5rem 0 0;
}

.event-page__description {
  margin-top: 1.5rem;
  max-width: 60ch;
  white-space: pre-line;
}

.danger-form { margin-top: 2rem; }

/* ---------- RSVP ---------- */

.rsvp { padding: 2rem 0; }

.guest-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.guest-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.guest-list__name { font-weight: 500; }
.guest-list__note { color: var(--paper-dim); font-size: 0.88rem; }

/* ---------- Footer ---------- */

.colophon {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  color: var(--paper-dim);
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .field-row { flex-direction: column; }
  .entry__link { gap: 1rem; }
  .entry__date { flex-basis: 3rem; }
}

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