/* Une lettre pour Noël – one stylesheet for the public pages and the admin area. */

/* Fonts are served from our own server (static/fonts) so no visitor data goes to Google.
   If the files are missing, the browser falls back to Georgia. */
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #F7F1E6;
  --surface: #FFFDF8;
  --surface-soft: #FBF6EC;
  --line: #E3D7C2;
  --line-soft: #EDE4D3;
  --input-line: #CDBFA6;
  --ink: #2A2320;
  --text: #4A3F38;
  --text-soft: #5C5048;
  --muted: #6A5D52;
  --green: #1E4A3A;
  --green-hover: #2C6150;
  --green-tint: #EEF5F1;
  --green-tint-line: #B9CFC4;
  --red: #7A1F2B;
  --red-hover: #8E2A37;
  --red-tint: #FBF0F1;
  --red-tint-line: #D9B7BC;
  --gold: #A8854A;
  --gold-light: #C9A96A;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Lora", Georgia, serif;
  --gutter: 32px;
}

/* ---------- Basics ---------- */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  /* Modern digits everywhere: Cormorant's old-style "1" and "0" look like the letters "I" and "O". */
  font-variant-numeric: lining-nums;
}

a { color: var(--green); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--green);
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 12px; background: var(--surface); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.keep-lines { white-space: pre-line; }
.green-text { color: var(--green); }
.red-text { color: var(--red); }
.muted { color: var(--muted); }
.small-caps { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* Card with the thin double frame of the design. */
.framed-card {
  background: var(--surface);
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: 6px;
}

/* ---------- Header and footer ---------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
}
.brand-star { color: var(--gold); display: flex; }
.header-link { font-size: 17px; }

.site-footer {
  margin: 72px auto 0;
  padding: 0 var(--gutter) 64px;
  text-align: center;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- Shared pieces ---------- */

.eyebrow { margin: 0; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.lead { margin: 0; max-width: 680px; font-size: 21px; color: var(--text); }

/* Gold line – star – gold line. */
.ornament { display: flex; align-items: center; gap: 16px; color: var(--gold); }
.ornament::before,
.ornament::after { content: ""; width: 80px; height: 1px; background: var(--gold); }

.button {
  display: inline-block;
  padding: 12px 26px;
  border: 0;
  border-radius: 2px;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button-green { background: var(--green); color: var(--surface); }
.button-green:hover { background: var(--green-hover); color: var(--surface); }
.button-red { background: var(--red); color: var(--surface); }
.button-red:hover { background: var(--red-hover); color: var(--surface); }
.button-ghost { background: transparent; border: 1px solid var(--input-line); color: var(--muted); }
.button-ghost:hover { border-color: var(--muted); color: var(--ink); }
.button-disabled { background: var(--line-soft); color: var(--muted); cursor: default; }
.button-large { padding: 14px 32px; font-size: 19px; }
.button-small { padding: 7px 16px; font-size: 16px; }

.notice { display: flex; align-items: flex-start; gap: 14px; margin: 0; padding: 16px 20px; font-size: 16px; }
.notice-info { background: var(--green-tint); border: 1px solid var(--green-tint-line); color: var(--green); }
.notice-error { background: var(--red-tint); border: 1px solid var(--red-tint-line); color: var(--red); }
.notice-icon { flex: 0 0 24px; margin-top: 2px; }

.pill {
  align-self: flex-start;
  padding: 4px 12px;
  border: 1px solid var(--green-tint-line);
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green);
  font-size: 15px;
}
.pill.waiting { border-color: var(--red-tint-line); background: var(--red-tint); color: var(--red); }

/* ---------- Home page ---------- */

.home { position: relative; overflow: hidden; }

.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.hero h1 { font-size: 76px; line-height: 1.05; }

.choices {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 40px 36px;
  color: var(--ink);
  text-decoration: none;
}
.choice:hover { border-color: var(--gold-light); color: var(--ink); }
.choice-title { font-family: var(--display); font-size: 36px; font-weight: 600; line-height: 1.1; }
.choice-text { color: var(--text); }
.choice .button { margin-top: 8px; }
.pick-link { margin: 28px auto 0; padding: 0 var(--gutter); text-align: center; font-size: 18px; }

.steps-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 88px var(--gutter) 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.steps-section h2 { font-size: 44px; text-align: center; }
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.step-number { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; color: var(--gold); }
.step-title { font-size: 20px; font-weight: 500; }
.step-text { font-size: 17px; color: var(--text-soft); }

/* Two Christmas cards with stamp edges beside the title, only on wide screens. */
.christmas-card {
  display: none;
  position: absolute;
  top: 150px;
  width: 172px;
  padding: 4px;
  border: 7px dotted var(--bg);
}
.christmas-card-left { left: calc(50% - 660px); background: var(--red); }
.christmas-card-right { right: calc(50% - 660px); background: var(--green); }
.christmas-card-frame { padding: 6px; border: 1px solid var(--gold-light); }
.christmas-card-inner {
  height: 196px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
}
.christmas-card-text { font-family: var(--display); font-size: 24px; font-style: italic; font-weight: 600; line-height: 1.05; text-align: center; }

@media (min-width: 1320px) {
  .christmas-card { display: block; }
}

/* ---------- Page intro (list, address, thank-you pages) ---------- */

.page-intro {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.page-intro h1 { font-size: 60px; }
.page-intro p { margin: 0; }

/* ---------- List page ---------- */

.list-area {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 16px;
  color: var(--text);
}
.stat-number { font-family: var(--display); font-size: 48px; font-weight: 700; line-height: 1; }

/* "Choose for me" box above the list. */
.pick-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: 20px 24px;
  background: var(--red-tint);
  border: 1px solid var(--red-tint-line);
}
.pick-box-text { flex: 999 1 320px; display: flex; flex-direction: column; gap: 2px; color: var(--text); font-size: 17px; }
.pick-box-text strong { font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--red); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 32px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.toolbar-checkbox { flex: 1 1 280px; min-height: 52px; align-items: center; }

.people { background: var(--surface); border: 1px solid var(--line); }
.people-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 14px 28px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.col-name { flex: 999 1 240px; }
.col-count { flex: 0 0 230px; }
.col-action { flex: 0 0 150px; }

.people-list { margin: 0; padding: 0; list-style: none; }
.person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line-soft);
}
.person:last-child { border-bottom: 0; }
.person-name { flex: 999 1 240px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.person-name .name { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.15; }
.person-name .age { font-size: 16px; color: var(--muted); }
.person-count { flex: 0 0 230px; display: flex; align-items: center; gap: 12px; }
.person .button { flex: 0 0 150px; padding-left: 16px; padding-right: 16px; }

.count-badge {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green-tint-line);
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
}
.count-badge.waiting { border-color: var(--red-tint-line); background: var(--red-tint); color: var(--red); }
.count-label { font-size: 15px; line-height: 1.35; color: var(--green); }
.count-label.waiting { color: var(--red); }

.people-empty { margin: 0; padding: 48px 28px; text-align: center; color: var(--muted); }

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

.two-columns {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
}
.recipient-card { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; padding: 32px; }
.recipient-name { font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1.1; color: var(--green); }
.quote { margin: 0; font-size: 17px; font-style: italic; color: var(--text); }

.form-column { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.form-column h1 { font-size: 48px; }
.form-intro { display: flex; flex-direction: column; gap: 6px; }
.form-intro p, .form-column > p { margin: 0; color: var(--text); }

.form-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.form-page-intro { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.form-page-intro h1 { font-size: 54px; }
.form-page-intro p { margin: 0; color: var(--text); }
.form-card { display: flex; flex-direction: column; gap: 22px; padding: 36px; background: var(--surface); border: 1px solid var(--line); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 17px; }
.field-short { max-width: 200px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.optional { color: var(--muted); }
.field-hint { margin: 0; font-size: 15px; color: var(--muted); }
.field-error { margin: 0; font-size: 15px; font-weight: 500; color: var(--red); }

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--input-line);
  border-radius: 2px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
}
textarea { padding: 12px 16px; resize: vertical; }
input[readonly] { background: var(--bg); border-color: var(--line); color: var(--text); }
[aria-invalid="true"] { border-color: var(--red); }

fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; }
legend { margin-bottom: 10px; padding: 0; font-size: 17px; font-weight: 500; }

.checkbox-label { display: flex; align-items: flex-start; gap: 12px; font-size: 17px; cursor: pointer; }
input[type="checkbox"],
input[type="radio"] { flex: 0 0 22px; width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--green); }

.divider { margin: 0; border: 0; height: 1px; background: var(--line-soft); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

/* Invisible field that only bots fill in. */
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Address page ---------- */

.envelope {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 44px;
}
.envelope address { font-style: normal; font-size: 20px; line-height: 1.55; }
.addressee { font-family: var(--display); font-size: 30px; font-weight: 600; }
.stamp {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 56px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--gold);
  color: var(--gold);
}
.small-note { max-width: 600px; margin: 28px auto 0; padding: 0 var(--gutter); text-align: center; font-size: 16px; color: var(--muted); }

.tips {
  max-width: 820px;
  margin: 48px auto 0;
  padding: 40px var(--gutter) 0;
  border-top: 1px solid var(--line);
}
.tips h2 { font-size: 36px; text-align: center; }
.tips-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px 36px;
  font-size: 17px;
  color: var(--text);
}
.tips-list li::before { content: "✦ "; color: var(--gold); }

.cancel-form { margin-top: 48px; text-align: center; }

/* ---------- Text pages ---------- */

.text-page { max-width: 760px; margin: 0 auto; padding: 56px var(--gutter) 0; color: var(--text); }
.text-page h1 { font-size: 48px; margin-bottom: 8px; }
.text-page h2 { font-size: 28px; margin-top: 32px; }

/* ---------- Admin ---------- */

.admin-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-size: 17px; }
.admin-nav form { margin: 0; }
.language-switch { display: flex; gap: 10px; }
.language-switch [aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  font-family: var(--body);
  font-size: 17px;
  text-decoration: underline;
  cursor: pointer;
}

.login-box { max-width: 440px; margin: 40px auto; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.login-form { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.login-form .field { align-self: stretch; }

.admin-section { display: flex; flex-direction: column; gap: 12px; }
.admin-section h2 { font-size: 36px; }

.entry { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); }
.entry-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.entry-name { font-family: var(--display); font-size: 28px; font-weight: 600; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.entry-actions form { margin: 0; }
.entry-details { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 16px; }
.entry-details dt { color: var(--muted); }
.entry-details dd { margin: 0; }
.entry summary { cursor: pointer; font-size: 16px; color: var(--green); }

.admin-intro h1 { font-size: 44px; }
.admin-intro p { margin: 6px 0 0; }
.admin-form { max-width: 760px; }

.texts-form { display: flex; flex-direction: column; gap: 20px; }
.texts-form h2 { font-size: 30px; }
.text-field + .text-field { margin-top: 6px; }
.text-label-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.text-field textarea { min-height: 52px; padding-top: 12px; }
.save-bar {
  position: sticky;
  bottom: 0;
  padding: 16px 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.sender-list { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.sender { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface-soft); }
.sender form { margin: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 18px; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 50px; }
  .page-intro h1 { font-size: 42px; }
  .form-column h1, .form-page-intro h1 { font-size: 38px; }
  .choice { padding: 28px 24px; }
  .choice-title { font-size: 30px; }
  .people-head { display: none; }
  .person { padding: 18px 16px; }
  .person-count, .person .button { flex: 1 1 auto; }
  .form-card, .recipient-card { padding: 24px 18px; }
  .envelope { padding: 28px 22px; }
  .stamp { display: none; }
  .entry-details { grid-template-columns: 1fr; }
}
