:root {
  --black: #111111;
  --muted: #6c6c6c;
  --line: #dedede;
  --surface: #ffffff;
  --background: #f4f3f1;
  --danger: #b42318;
  --success: #176b3a;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--black);
  font-family: "Poppins", sans-serif;
}

button, input, select, textarea { font: inherit; }

.site-header {
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo { width: auto; height: 42px; object-fit: contain; }
.brand-logo.is-yoyo { height: 48px; max-width: 128px; filter: invert(1); }
.brand-logo.is-stop { height: 36px; max-width: 150px; filter: invert(1); }
.header-label { color: #707070; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

.page-shell {
  width: min(760px, calc(100% - 32px));
  margin: 48px auto;
  flex: 1;
}

.survey-card, .state-card {
  background: var(--surface);
  border: 1px solid #e9e8e6;
  border-radius: 18px;
  box-shadow: 0 15px 45px rgba(20, 20, 20, .07);
}

.survey-card { overflow: hidden; }

.survey-heading {
  padding: 42px 48px 34px;
  background: linear-gradient(145deg, #fff, #faf9f7);
  border-bottom: 1px solid #ecebe9;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 13px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
}

h1 { margin: 0; font-size: clamp(27px, 5vw, 38px); line-height: 1.2; letter-spacing: -.03em; }
.survey-heading p { max-width: 600px; margin: 14px 0 0; color: var(--muted); line-height: 1.7; white-space: pre-line; }

#survey-form { padding: 36px 48px 42px; }
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 12px; }
.identity-grid .field:first-child:last-child, .identity-grid .field:nth-child(3) { grid-column: 1 / -1; }

.field { margin-bottom: 26px; }
.field-label { display: flex; gap: 4px; margin-bottom: 9px; font-size: 14px; font-weight: 600; }
.required-mark { color: #a41313; }
.field-help { display: block; margin: -4px 0 10px; color: #777; font-size: 12px; line-height: 1.5; }

input[type="text"], input[type="tel"], select, textarea {
  width: 100%;
  border: 1px solid #cfcfce;
  border-radius: 9px;
  background: #fff;
  color: var(--black);
  padding: 12px 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

textarea { min-height: 122px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #222; box-shadow: 0 0 0 3px rgba(0, 0, 0, .08); }
.invalid { border-color: var(--danger) !important; }

.question-block { padding: 25px 0 4px; border-top: 1px solid #ecebea; }
.question-block:first-child { border-top: 0; }
.question-number { color: #8a8a8a; font-weight: 400; }

.scale-control { display: flex; gap: 9px; margin-top: 13px; }
.scale-option { flex: 1; position: relative; }
.scale-option input { position: absolute; opacity: 0; pointer-events: none; }
.scale-option span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #cfcfce;
  border-radius: 8px;
  cursor: pointer;
  transition: .16s ease;
}
.scale-option input:checked + span { background: #111; border-color: #111; color: #fff; }
.scale-option:hover span { border-color: #111; }
.scale-labels { display: flex; justify-content: space-between; gap: 20px; margin-top: 8px; color: #747474; font-size: 11px; }

.primary-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 9px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background .18s, transform .18s;
}
.primary-button:hover { background: #333; }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: .65; }

.privacy-note { margin: 15px auto 0; color: #888; font-size: 11px; line-height: 1.5; text-align: center; }
.form-alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 8px; background: #fef3f2; color: var(--danger); font-size: 13px; }
.honeypot { position: absolute; left: -10000px; opacity: 0; }

.state-card { min-height: 360px; padding: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.state-card p { max-width: 480px; color: var(--muted); line-height: 1.7; }
.state-icon, .success-mark { width: 62px; height: 62px; margin-bottom: 24px; display: grid; place-items: center; border-radius: 50%; background: #f0efed; font-size: 28px; font-weight: 600; }
.success-mark { background: #e9f6ee; color: var(--success); }
.spinner { width: 32px; height: 32px; border: 3px solid #dedede; border-top-color: #111; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer { padding: 32px 20px; background: #050505; }
.footer-inner { width: min(900px, 100%); margin: auto; display: flex; align-items: center; justify-content: center; gap: 38px; }
.footer-inner span { height: 42px; width: 1px; background: #424242; }
.footer-inner img { width: 132px; max-height: 54px; object-fit: contain; }
.footer-inner .yoyo-logo { width: 96px; }
.is-hidden { display: none !important; }

@media (max-width: 620px) {
  .header-inner { width: calc(100% - 28px); min-height: 66px; }
  .header-label { display: none; }
  .page-shell { margin: 24px auto; }
  .survey-heading, #survey-form { padding: 28px 22px; }
  .identity-grid { grid-template-columns: 1fr; gap: 0; }
  .identity-grid .field { grid-column: auto !important; }
  .scale-control { gap: 5px; }
  .scale-option span { min-height: 40px; font-size: 13px; }
  .state-card { min-height: 320px; padding: 32px 22px; }
}
