/*
 * Shared styles for FQ survey pages, matched to the FQ event RSVP pages:
 * content sits directly on the event background, white text, square white buttons.
 * Event pages set --page-bg.
 */

@font-face { font-family: Inter; src: url(/assets/fq/fonts/Inter-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(/assets/fq/fonts/Inter-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(/assets/fq/fonts/Inter-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Inter; src: url(/assets/fq/fonts/Inter-Black.woff2) format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --navy: #073e6b;
  --blush: #fdcfc3;
  --text: #fff;
  --muted: rgba(255, 255, 255, .72);
  --line: rgba(255, 255, 255, .22);
  --black: #111;
  --selected: #8f939a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
}
/* Fixed pseudo-element instead of background-attachment: fixed, which iOS ignores */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--page-bg) center / cover no-repeat;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 56px; }

.lockup { padding: 32px 0 20px; text-align: center; }
.lockup img { width: 100%; max-width: 500px; height: auto; }

.page-title {
  margin: 28px 0 44px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blush);
}
.page-title span { display: block; }

.q { border: 0; margin: 36px 0 0; padding: 0; min-width: 0; }
.q:first-child { margin-top: 0; }
/* Questions shown side by side */
.q-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.q-row:first-child { margin-top: 0; }
.q-row > .q { margin-top: 0; }
.qt { display: block; padding: 0; font-weight: 600; font-size: 17px; line-height: 1.45; margin-bottom: 14px; }
.req { color: var(--blush); }
.hint { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 3px; }

input[type=email], input[type=text], input[type=date], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--black);
  padding: 12px 14px;
  border: 1px solid var(--black);
  border-radius: 0;
  background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
input[type=date] { min-height: 48px; -webkit-appearance: none; appearance: none; text-align: left; }
/* Dropdown: same white box as the text fields, with a drawn arrow */
select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 42px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 16px center;
}
select:invalid { color: #6b6b6b; }
select option { color: var(--black); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--blush); outline-offset: 2px; }

/* Visually hidden native inputs, styled siblings */
.sr { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

/* Rating scale (single 1-5 question): white square buttons like the RSVP YES / NO */
.scale { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 10px; }
.pill { position: relative; display: block; cursor: pointer; }
.pill span {
  display: block; height: 100%;
  background: #fff; border: 1px solid var(--black);
  padding: 10px 6px; text-align: center;
  font-size: 12px; color: #444; line-height: 1.3;
  transition: background .12s;
}
.pill strong { display: block; font-size: 20px; font-weight: 400; color: var(--black); margin-bottom: 2px; }
.pill:hover span { background: #ececec; }
.pill input:checked + span { background: var(--selected); border-color: var(--selected); color: #fff; }
.pill input:checked + span strong { font-weight: 700; color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--blush); outline-offset: 2px; }
.pill.wide { grid-column: 1 / -1; }
.pill.wide span { font-size: 15px; padding: 12px; color: var(--black); }
.scale-ends { display: none; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.scale-ends.always { display: flex; font-size: 13px; margin-top: 8px; }

/* Matrix (rate each row 1-5) */
.matrix { width: 100%; }
.matrix-head, .matrix-row { display: grid; grid-template-columns: 1fr repeat(5, 44px); align-items: center; }
.matrix-head { font-size: 16px; font-weight: 700; color: var(--text); padding-bottom: 6px; text-align: center; }
.matrix-row { border-top: 1px solid var(--line); padding: 8px 0; }
.row-label { padding-right: 10px; font-size: 15px; }
.dot { position: relative; display: flex; justify-content: center; cursor: pointer; padding: 4px 0; }
.dot span { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--black); transition: background .12s; }
.dot:hover span { background: #ececec; }
.dot input:checked + span { background: radial-gradient(var(--selected) 40%, #fff 44%); }
.dot input:focus-visible + span { outline: 3px solid var(--blush); outline-offset: 2px; }
.dot em { display: none; }

/* Checkboxes and single-choice lists */
.checks { display: grid; gap: 4px; }
.check { position: relative; display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: 15px; cursor: pointer; }
.check .box { width: 20px; height: 20px; background: #fff; border: 1px solid var(--black); flex: none; display: grid; place-items: center; }
.check:hover .box { background: #ececec; }
.check input:checked + .box { background: var(--selected); border-color: var(--selected); }
.check input:checked + .box::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check input:focus-visible + .box { outline: 3px solid var(--blush); outline-offset: 2px; }
.check .box.round { border-radius: 50%; }
.check input:checked + .box.round { background: #fff; border-color: var(--black); }
.check input:checked + .box.round::after { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--selected); transform: none; }
/* Consent checkbox, styled like the FQ RSVP forms: black rounded box with a white check */
.q.consent { margin-top: 44px; }
.consent .check { align-items: flex-start; font-size: 15px; line-height: 1.5; }
.consent .check .box { width: 22px; height: 22px; margin-top: 1px; background: #000; border: 1px solid #000; border-radius: 5px; }
.consent .check input:checked + .box { background: var(--selected); border-color: var(--selected); }
.consent .check input:not(:checked) + .box { background: #fff; }
.consent .check input:checked + .box::after { border-color: #fff; }
.consent a { color: var(--blush); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent a:focus-visible { outline: 3px solid var(--blush); outline-offset: 2px; }
.other-text { margin-top: 8px; }
.other-text[hidden] { display: none; }

/* Validation: blush reads clearly on the blue, red does not */
.field-error { color: var(--blush); font-weight: 600; font-size: 14px; margin: 10px 0 0; }
.field-error::before { content: "! "; }
.q.invalid input[type=email], .q.invalid input[type=text], .q.invalid input[type=date], .q.invalid select { box-shadow: 0 0 0 3px var(--blush); }
.q.invalid .pill span { border-color: var(--blush); }
.matrix-row.invalid .row-label { color: var(--blush); font-weight: 600; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.actions { margin-top: 32px; }
.submit {
  width: 100%; padding: 16px 24px;
  background: #fff; color: #000;
  border: 1px solid #000; border-radius: 0; cursor: pointer;
  font: inherit; font-size: 18px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase;
  transition: background .12s;
}
.submit:hover { background: #ececec; }
.submit:focus-visible { outline: 3px solid var(--blush); outline-offset: 3px; }
.submit:disabled { opacity: .7; cursor: progress; }
.form-status { text-align: center; color: var(--blush); font-weight: 600; font-size: 15px; margin: 16px 0 0; min-height: 1em; }

.thanks { text-align: center; padding: 8px 8px 24px; }
.thanks h2 { font-weight: 900; font-size: 30px; letter-spacing: .08em; text-transform: uppercase; color: var(--blush); margin: 0 0 12px; }
.thanks p { margin: 0; font-size: 17px; }
.thanks:focus { outline: none; }

/* Intro text under the page title, and the notice shown when a form isn't open */
.intro { text-align: center; font-size: 17px; line-height: 1.6; margin: -24px auto 40px; max-width: 600px; }
.intro p { margin: 0 0 10px; }
.intro .small { font-size: 14px; color: var(--muted); }
.intro a { color: var(--blush); }
.notice { text-align: center; padding: 8px 8px 24px; }
.notice h2 { font-weight: 900; font-size: 26px; letter-spacing: .08em; text-transform: uppercase; color: var(--blush); margin: 0 0 12px; }
.notice p { margin: 0; font-size: 17px; line-height: 1.5; }

/* Plain text pages such as terms and conditions */
.doc { font-size: 16px; line-height: 1.65; }
.doc h2 { font-size: 20px; color: var(--blush); margin: 32px 0 10px; }
.doc a { color: var(--blush); }
.doc .placeholder { border: 1px dashed var(--line); padding: 24px; text-align: center; }


@media (max-width: 600px) {
  .lockup { padding: 24px 0 12px; }
  .page-title { margin: 20px 0 32px; letter-spacing: .05em; }
  .q, .q-row { margin-top: 30px; }
  .scale { gap: 6px; }
  .pill span { font-size: 0; padding: 12px 2px; }
  .pill strong { font-size: 18px; margin: 0; }
  .pill.wide span { font-size: 14px; }
  .scale-ends { display: flex; }
  /* Long scales (e.g. 0 to 10) need tighter buttons to fit one row on a phone */
  .scale[style*="--cols: 11"] { gap: 3px; }
  .scale[style*="--cols: 11"] .pill strong { font-size: 15px; }
  .matrix-head { display: none; }
  .matrix-row { grid-template-columns: repeat(5, 1fr); padding: 12px 0; }
  .row-label { grid-column: 1 / -1; padding: 0 0 10px; }
  .dot { flex-direction: column; align-items: center; gap: 4px; }
  .dot em { display: block; font-style: normal; font-size: 14px; font-weight: 700; color: var(--text); }
}
