/* petits biscuit — palette and type taken from the logo */
:root {
  --paper: #faebd5;
  --paper-light: #fdf5ea;
  --paper-deep: #f1dcc0;
  --ink: #611f21;        /* the logo's burgundy */
  --ink-deep: #4a1517;
  --ink-soft: #8a4b45;
  --rule: #dcbca6;
  --serif: "Cormorant Garamond", "Garamond", "Georgia", serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .38 0 0 0 0 .2 0 0 0 0 .12 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --scallop: 1.1rem;     /* awning scallop radius */
}

* { box-sizing: border-box; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  background: var(--paper) var(--grain);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  flex: 1;
}

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-weight: 600; line-height: 1.1; margin: 0; }

.logo { display: block; width: min(100%, 24rem); height: auto; margin: 0 auto; }
.logo--small { width: 10rem; }

/* letter-spaced caps, like CAFÉ / PÂTISSERIE on the logo */
.caps {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.center { text-align: center; }
.note { font-size: 1.05rem; color: var(--ink-soft); }

/* ── burgundy awning header ─────────────────────── */
.hero {
  position: relative;
  background: var(--ink) var(--grain);
  color: var(--paper);
  text-align: center;
  padding: 2.75rem 1.5rem 3rem;
  padding-top: max(2.75rem, env(safe-area-inset-top));
}
/* scalloped edge, like a café awning */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: calc(var(--scallop) * -1 + 1px);
  height: var(--scallop);
  background: radial-gradient(circle at 50% 0, var(--ink) calc(var(--scallop) - 0.5px), transparent var(--scallop)) 0 0 / calc(var(--scallop) * 2) var(--scallop) repeat-x;
  filter: drop-shadow(0 3px 2px rgba(74, 21, 23, 0.18));
}
.hero .lede {
  font-size: 1.4rem; font-style: italic; line-height: 1.45;
  margin: 1.5rem auto 0; max-width: 28rem; color: var(--paper);
}
.hero--small { padding: 1.5rem 1rem 1.75rem; }

/* the short rules either side of a label, as under "biscuit" */
.divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.5rem;
  color: var(--ink);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.5; }

/* ── event cards (home) ─────────────────────────── */
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.events li {
  display: flex; align-items: stretch;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 0 var(--ink);
}
.datebox {
  flex: none; width: 5.25rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper);
  padding: 0.9rem 0.5rem; line-height: 1;
}
.datebox .day { font-size: 2.5rem; font-weight: 600; }
.datebox .mon { margin-top: 0.35rem; font-size: 0.75rem; }
.event-body { padding: 1rem 1.25rem; align-self: center; }
.events h3 { font-size: 1.5rem; }
.events p { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 1.1rem; }
.empty { text-align: center; font-style: italic; color: var(--ink-soft); }

.by-invite {
  margin-top: 2.5rem; text-align: center;
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--ink-soft); border-radius: 1rem;
  font-size: 1.1rem; font-style: italic;
}

/* ── invitation page: cream card on burgundy ────── */
body.on-red { background: var(--ink) var(--grain); color: var(--paper); }
body.on-red main { padding-top: 2.25rem; padding-top: max(2.25rem, env(safe-area-inset-top)); }

.card {
  margin-top: 1.75rem;
  padding: 2.75rem 2rem 2.5rem;
  text-align: center;
  color: var(--ink);
  background: var(--paper) var(--grain);
  border-radius: 1.25rem;
  /* double frame, echoing the logo's oval */
  box-shadow:
    inset 0 0 0 7px var(--paper),
    inset 0 0 0 8.5px var(--ink),
    inset 0 0 0 11px var(--paper),
    inset 0 0 0 12px var(--ink),
    0 18px 40px rgba(20, 4, 5, 0.35);
}
.card .kicker { color: var(--ink-soft); margin: 0; }
.card .dear { font-size: 1.5rem; font-style: italic; margin: 0.35rem 0 0; }
.card h1 { font-size: clamp(2.1rem, 9vw, 3.1rem); margin: 0.5rem 0 0; }

.when {
  display: inline-block;
  margin: 1.5rem 0 0;
  padding: 0.5rem 1.1rem;
  background: var(--ink); color: var(--paper);
  border-radius: 999px;
  font-size: 1.15rem; font-weight: 600; line-height: 1.3;
}
.card .where { margin: 0.75rem 0 0; color: var(--ink-soft); }
.card .details { margin: 1.25rem auto 0; max-width: 26rem; }
.card .signoff { font-style: italic; margin: 1.25rem 0 0; font-size: 1.3rem; }

.rsvp { margin-top: 2rem; }
.rsvp .divider { margin-bottom: 0.5rem; }
.rsvp-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

.field { display: block; margin: 1rem auto 0; max-width: 20rem; text-align: left; }
.field span { display: block; margin-bottom: 0.3rem; }

input, textarea, select {
  width: 100%;
  font: inherit; font-size: max(1.15rem, 16px); color: var(--ink);
  background: var(--paper-light);
  border: 1.5px solid var(--ink-soft); border-radius: 0.6rem;
  padding: 0.65rem 0.8rem;
}
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

button {
  font: inherit; font-size: 1.2rem; font-weight: 600;
  cursor: pointer;
  min-height: 3rem;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: transform 0.08s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
button:hover { background: var(--ink-deep); border-color: var(--ink-deep); }
button:active { transform: translateY(1px); }
button.ghost { background: transparent; color: var(--ink); }
button.ghost:hover { background: var(--paper-deep); }
button.small { font-size: 1rem; min-height: 2.5rem; padding: 0.35rem 1rem; }
button:disabled { opacity: 0.55; cursor: wait; }

.status { min-height: 1.5em; margin: 1rem 0 0; font-style: italic; }
.answered { font-size: 1.45rem; margin: 0.75rem 0 0; }
.answered-mark {
  display: inline-grid; place-items: center;
  width: 3.25rem; height: 3.25rem; margin-top: 0.5rem;
  border-radius: 50%; background: var(--ink); color: var(--paper);
  font-size: 1.6rem;
}
.link-button {
  min-height: 2.75rem; background: none; border: 0; padding: 0 0.5rem;
  color: var(--ink-soft); font-weight: 400; font-size: 1.05rem; text-decoration: underline; border-radius: 0;
}
.link-button:hover { background: none; border: 0; color: var(--ink); }

/* ── host tools ─────────────────────────────────── */
.host-out { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.75rem; }
.host-out li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 0.25rem 0.5rem; align-items: center;
  padding: 0.85rem 1rem;
  background: var(--paper-light); border: 1.5px solid var(--ink); border-radius: 0.9rem;
}
.host-out strong { grid-column: 1; font-size: 1.25rem; }
.host-out code { grid-column: 1 / -1; grid-row: 2; font-size: 0.85rem; word-break: break-all; color: var(--ink-soft); }
.warn { border: 1px dashed var(--ink-soft); border-radius: 0.75rem; padding: 0.75rem 1rem; font-size: 1rem; margin: 0 0 1rem; }

/* ── footer band ────────────────────────────────── */
footer {
  background: var(--ink) var(--grain);
  color: var(--paper);
  text-align: center;
  padding: 1.5rem 1rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
body.on-red footer { background: none; opacity: 0.8; }

/* ── phones ─────────────────────────────────────── */
@media (max-width: 560px) {
  body { font-size: 1.15rem; }
  main { padding: 2.75rem 1rem 3rem; }
  .hero { padding: 2rem 1.25rem 2.25rem; }
  .hero .lede { font-size: 1.25rem; }
  .logo { width: min(100%, 18rem); }
  .logo--small { width: 8rem; }

  .datebox { width: 4.5rem; }
  .datebox .day { font-size: 2.1rem; }
  .event-body { padding: 0.85rem 1rem; }
  .events h3 { font-size: 1.3rem; }

  body.on-red main { padding-top: 1.5rem; padding-left: 0.75rem; padding-right: 0.75rem; }
  .card { padding: 2.25rem 1.4rem 2rem; margin-top: 1.25rem; }
  .card .dear { font-size: 1.35rem; }
  .when { font-size: 1.05rem; }

  /* big, thumb-friendly stacked buttons */
  .rsvp-buttons { flex-direction: column; align-items: stretch; }
  .rsvp-buttons button { width: 100%; min-height: 3.25rem; }
  .field { max-width: none; }

  .host-out li { grid-template-columns: 1fr 1fr; }
  .host-out strong { grid-column: 1 / -1; }
  .host-out code { grid-row: auto; }
  .host-out button { width: 100%; }
}
