:root {
  --bg: #fcfbf8;
  --surface: #ffffff;
  --surface-muted: #f7f4ee;
  --border: #ece7df;
  --text: #111827;
  --text-soft: #6b7280;
  --primary: #f7b91e;
  --primary-strong: #e0a400;
  --shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.03);
  --shadow-card: 0 10px 30px rgba(17, 24, 39, 0.05);
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  padding: 2px 24px 4px;
  min-height: 100svh;
}

.nps-page {
  width: min(100%, 1200px);
  margin: 0 auto;
  min-height: calc(100svh - 4px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 4px;
  width: 100%;
}

.brand-logo {
  display: block;
  width: 156px;
  height: auto;
}

.hero-label {
  margin: 0;
  color: var(--primary-strong);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
}

.hero-panel {
  display: grid;
  gap: 10px;
}

.hero-copy {
  max-width: 680px;
  margin: -64px auto 0;
  text-align: center;
}

.hero-copy h1,
.survey-form__header h2,
.thank-you h2 {
  margin: 0;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.45rem);
  line-height: 1;
  font-weight: 680;
}

.hero-subtitle {
  max-width: 38ch;
  margin: 6px auto 0;
  color: var(--text-soft);
  line-height: 1.42;
  font-size: 0.84rem;
  font-weight: 450;
}

.survey-card {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 18px 22px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.survey-state {
  display: grid;
  gap: 12px;
  text-align: center;
  padding: 18px 8px;
}

.survey-form {
  display: grid;
  gap: 14px;
}

.survey-form__header {
  text-align: center;
}

.survey-form__header h2 {
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  line-height: 1.22;
  font-weight: 600;
  max-width: 40ch;
  margin: 0 auto;
}

.scale__buttons {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.score-button {
  min-height: 34px;
  border: 1px solid #ddd4c7;
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface-muted);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.score-button:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: var(--shadow-soft);
}

.score-button.is-selected {
  border-color: #efb100;
  background: #f7b91e;
  box-shadow: 0 6px 16px rgba(247, 185, 30, 0.2);
}

.survey-form__footer {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.survey-form__field {
  display: grid;
  gap: 6px;
}

.survey-form__field label {
  color: #374151;
  font-size: 0.82rem;
  font-weight: 500;
}

.survey-form__field input,
.survey-form__field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.survey-form__field input::placeholder,
.survey-form__field textarea::placeholder {
  color: #9ca3af;
}

.survey-form__field input:focus,
.survey-form__field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(247, 185, 30, 0.14);
}

.survey-form__field textarea {
  min-height: 72px;
  resize: vertical;
}

.survey-form__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 2px;
  padding-top: 2px;
}

.form-status {
  min-height: 0;
  margin: 0;
  color: #b45309;
  margin-right: auto;
  font-size: 0.78rem;
}

.form-status--center {
  justify-self: center;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.form-status:empty {
  display: none;
}

.submit-button,
.ghost-button {
  appearance: none;
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.submit-button {
  border: 0;
  color: var(--text);
  font-weight: 650;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(247, 185, 30, 0.18);
  min-width: 124px;
}

.ghost-button {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.submit-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.thank-you {
  text-align: center;
}

.thank-you p {
  margin: 12px 0 22px;
  color: var(--text-soft);
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .page-shell {
    padding: 12px 14px 32px;
    min-height: auto;
  }

  .nps-page {
    min-height: auto;
  }

  .topbar {
    margin-bottom: 8px;
  }

  .brand-logo {
    width: 136px;
  }

  .hero-panel {
    gap: 12px;
  }

  .hero-copy {
    margin-top: 0;
  }

  .survey-card {
    padding: 18px;
  }

  .scale__buttons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .score-button {
    min-height: 42px;
  }

  .hero-subtitle {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .survey-form__header h2 {
    font-size: 1.3rem;
  }

  .survey-form__field label {
    font-size: 0.94rem;
  }

  .survey-form__field textarea {
    min-height: 84px;
  }

  .survey-form__footer {
    gap: 12px;
  }

  .survey-form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .submit-button,
  .ghost-button {
    width: 100%;
  }
}
