/* Meta Holiday 2026 Gifting — shared styles for the form pages, the root
   and 404 pages. Colours are tokens; config.js overrides them at runtime
   so theme edits don't require touching this file. */

:root {
  --bg: #06101f;
  --bg-glow: #12284b;
  --surface: #f7f3ea;
  --surface-alt: #efe9dc;
  --text: #0b0f14;
  --muted: #5b6270;
  --line: #dcd5c6;
  --accent: #0b1a33;
  --accent-text: #ffffff;
  --gold: #b8933f;
  --focus: #0064e0;
  --error: #b3261e;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(60rem 40rem at 12% -10%, color-mix(in srgb, var(--bg-glow) 75%, transparent), transparent 60%),
    radial-gradient(50rem 36rem at 100% 100%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  /* min-height + margin:auto on the card: centers when it fits, scrolls
     normally when it doesn't. */
  min-height: 100%;
  display: flex;
  justify-content: center;
  padding: 32px 16px 48px;
  -webkit-font-smoothing: antialiased;
}

.page { width: 100%; max-width: 680px; margin: auto; }

header.masthead { color: #fff; text-align: center; padding: 8px 0 24px; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
header.masthead h1 { font-size: 34px; font-weight: 600; letter-spacing: -0.01em; margin-top: 10px; }
header.masthead .subtitle { font-size: 17px; opacity: 0.8; margin-top: 4px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  padding: 28px 28px 32px;
}
.card .intro { color: var(--muted); margin-bottom: 8px; }
.card .due { font-weight: 600; color: var(--accent); margin-bottom: 8px; }

fieldset { border: 0; padding: 0; margin: 26px 0 0; }
fieldset:first-of-type { margin-top: 18px; }
legend {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  color: var(--accent); padding-bottom: 10px; border-bottom: 1px solid var(--line);
  width: 100%; margin-bottom: 14px;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid .span2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.field label, .field .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.field .help { color: var(--muted); font-size: 13px; margin-top: 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field select, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 12px; min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6270' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field .error { display: none; color: var(--error); font-size: 13px; margin-top: 6px; }
.field.invalid .error { display: block; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; font-weight: 500; font-size: 15px;
}
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.field.invalid .choice { border-color: var(--error); }

.file-input { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-input input[type=file] { font: inherit; font-size: 14px; }

.note {
  background: var(--surface-alt); border-left: 3px solid var(--gold);
  padding: 10px 14px; border-radius: 0 9px 9px 0; font-size: 14px; color: var(--text);
}

.hidden { display: none !important; }

.actions { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
button.primary, a.button {
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 10px;
  padding: 14px 20px; min-height: 50px; width: 100%;
  transition: transform .08s, opacity .15s;
}
button.primary:hover { opacity: 0.94; }
button.primary:active { transform: translateY(1px); }
button.primary[disabled] { opacity: 0.6; cursor: default; }
button.secondary {
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 10px;
  padding: 12px 18px; min-height: 46px; width: 100%;
}
.form-error { color: var(--error); font-size: 14px; text-align: center; }

.confirmation { text-align: center; padding: 24px 0 8px; }
.confirmation .check {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 26px;
}
.confirmation h2 { font-size: 26px; font-weight: 600; }
.confirmation p { color: var(--muted); margin-top: 8px; }
.confirmation .actions { max-width: 360px; margin: 24px auto 0; }

footer.foot { text-align: center; color: rgba(255,255,255,0.55); font-size: 12px; padding-top: 22px; }

/* Root + 404 */
body.plain { align-items: center; }
.plain-card { text-align: center; color: #fff; margin: auto; }
.plain-card .muted { color: rgba(255,255,255,0.7); margin-top: 10px; }

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