/*
 * Feed the Fold — shared web styles for /join and /setup pages.
 *
 * Mirrors the iOS "editorial" aesthetic without trying to be
 * pixel-perfect. Single-column, ~620px max width, Cormorant Garamond
 * for display, system sans-serif for body, warm paper background,
 * terracotta accent.
 *
 * Keep this file boring — these are unauthenticated marketing-ish
 * pages where simplicity buys reliability.
 */

:root {
  /* Palette — eyeballed from the iOS ThemeManager.Editorial.Colors set.
     Not pixel-perfect, but visually recognizable as the same brand. */
  --paper: #f5f1e8;
  --paper-deep: #ece5d4;
  --surface: #fbf8f1;
  --ink: #1a1815;
  --muted: #6b635a;
  --hairline: #d8cfbc;
  --terracotta: #b8523d;
  --terracotta-deep: #993f2d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ---- Type ---- */

.kicker {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 12px;
}

h1 {
  font-family: "Cormorant Garamond", "Hoefler Text", "Times New Roman", serif;
  font-weight: 500;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 16px;
}

h2 {
  font-family: "Cormorant Garamond", "Hoefler Text", "Times New Roman", serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.25;
  margin: 32px 0 10px;
  color: var(--ink);
}

p {
  margin: 0 0 14px;
  color: var(--ink);
}

p.muted,
.muted {
  color: var(--muted);
}

/* ---- Card ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 24px;
  margin-top: 28px;
}

hr.hairline {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 28px 0;
}

/* ---- Form ---- */

form .field {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="text"],
textarea,
select {
  width: 100%;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
}

textarea {
  min-height: 80px;
}

input[type="checkbox"] {
  margin-right: 8px;
  vertical-align: middle;
}

.checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 15px;
}

.checkboxes label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
}

.radios {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radios label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  cursor: pointer;
}

.radios input[type="radio"] {
  margin: 0;
  accent-color: var(--terracotta);
}

/* ---- Blocked-dates calendar ---- */

.blocked-calendar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blocked-month {
  display: flex;
  flex-direction: column;
}

.blocked-month-title {
  font-family: "Cormorant Garamond", "Hoefler Text", "Times New Roman", serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 6px 2px;
}

.blocked-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.blocked-dow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 4px 0;
}

.blocked-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blocked-day.empty {
  cursor: default;
}

.blocked-day.outside {
  color: var(--hairline);
  cursor: not-allowed;
}

.blocked-day.in-range:hover {
  background: var(--paper-deep);
}

.blocked-day.blocked {
  background: var(--terracotta);
  color: var(--paper);
  border-color: var(--terracotta);
}

.blocked-day.blocked:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
}

/* ---- Button ---- */

.button {
  display: inline-block;
  background: var(--terracotta);
  color: var(--paper);
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background: var(--terracotta-deep);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- State containers ---- */

.state {
  display: none;
}

.state.active {
  display: block;
}

.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

footer {
  margin-top: 64px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

footer a {
  color: var(--muted);
}
