/* =========================================================
   NoCap Feedback — Main Stylesheet
   Monochrome, editorial, premium
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ----- Reset & Variables ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #000000;
  --gray-950: #0a0a0a;
  --gray-900: #171717;
  --gray-800: #262626;
  --gray-700: #404040;
  --gray-600: #525252;
  --gray-500: #737373;
  --gray-400: #a3a3a3;
  --gray-300: #d4d4d4;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --gray-50: #fafafa;
  --white: #ffffff;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.08);

  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img { max-width: 100%; display: block; }

/* ----- Typography Utilities ----- */
.text-xs   { font-size: 0.75rem; line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem; line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem; line-height: 2.5rem; }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black    { font-weight: 900; }

.tracking-tight  { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-wide   { letter-spacing: 0.025em; }
.tracking-wider  { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-muted    { color: var(--gray-500); }

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 640px;
}

/* ----- Navigation ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.nav__logo {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
  white-space: nowrap;
}

.nav__logo span {
  color: var(--gray-500);
  font-weight: 400;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover {
  color: var(--black);
  background: var(--gray-100);
}

.nav__link--active {
  color: var(--black);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  width: 32px;
  height: 32px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}

.nav__hamburger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger--open span:nth-child(2) { opacity: 0; }
.nav__hamburger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--black);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--gray-800);
}

.btn--secondary {
  background: var(--white);
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn--ghost {
  background: transparent;
  color: var(--gray-700);
}

.btn--ghost:hover {
  background: var(--gray-100);
  color: var(--black);
}

.btn--sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn--lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.btn--xl {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn--full {
  width: 100%;
}

/* Google OAuth button */
.btn--google {
  background: var(--white);
  color: var(--gray-800);
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.btn--google:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  box-shadow: var(--shadow);
}

.btn--google svg {
  flex-shrink: 0;
}

/* ----- Form Elements ----- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--gray-900);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gray-900);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}

.form-error {
  font-size: 0.8125rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ----- Auth Pages ----- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gray-50);
}

.auth-page__header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-page__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
  margin-bottom: 0.375rem;
}

.auth-card__subtitle {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 2rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.auth-divider__line {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-divider__text {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-400);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.auth-footer a {
  color: var(--black);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ----- Alert/Messages ----- */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.alert--info {
  background: var(--gray-50);
  border-color: var(--gray-200);
  color: var(--gray-700);
}

/* ----- Dashboard ----- */
.app-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.app-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 2rem;
}

.app-nav__left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.app-nav__brand {
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
}

.app-nav__company {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-500);
  padding: 0.25rem 0.625rem;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.app-nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.app-nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  letter-spacing: -0.01em;
}

.app-nav__link:hover {
  color: var(--black);
  background: var(--gray-100);
}

.app-nav__link--active {
  color: var(--black);
  font-weight: 600;
}

.app-nav__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-main {
  flex: 1;
  padding: 2.5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ----- Stats Bar ----- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.stat-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card__sub {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ----- Page Sections ----- */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
  margin-bottom: 0.375rem;
}

.page-subtitle {
  font-size: 0.9375rem;
  color: var(--gray-500);
}

/* ----- Survey Link Card ----- */
.survey-link-card {
  background: var(--gray-50);
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.survey-link-card__url {
  flex: 1;
  font-size: 0.9rem;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  color: var(--gray-700);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----- Survey Editor ----- */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.editor-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.editor-panel__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.question-block {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-100);
}

.question-block:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.question-block__num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

.question-block__fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.slider-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* ----- Preview Panel ----- */
.preview-panel {
  position: sticky;
  top: 80px;
  background: var(--gray-950);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  overflow: hidden;
}

.preview-panel__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.preview-question {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  min-height: 2.5em;
  transition: opacity var(--transition);
}

.preview-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preview-option {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-300);
  cursor: pointer;
  transition: all var(--transition);
}

.preview-option:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.preview-slider-wrap {
  padding: 0.5rem 0;
}

.preview-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.625rem;
}

/* Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"].light {
  background: var(--gray-200);
}

input[type="range"].light::-webkit-slider-thumb {
  background: var(--black);
}

/* ----- Responses Table ----- */
.responses-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.responses-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.responses-table thead tr {
  background: var(--gray-50);
  border-bottom: 1.5px solid var(--gray-200);
}

.responses-table th {
  text-align: left;
  padding: 0.875rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
  white-space: nowrap;
}

.responses-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responses-table tbody tr:last-child td {
  border-bottom: none;
}

.responses-table tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.responses-table tbody tr:hover td {
  background: var(--gray-100);
}

.responses-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-400);
}

.responses-empty__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.delete-btn:hover {
  background: #fef2f2;
  color: #dc2626;
}

.responses-empty__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

/* ----- Landing / Home Page ----- */
.landing-hero {
  padding: 8rem 1.5rem 6rem;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.landing-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
}

.landing-headline {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.05;
  color: var(--black);
  margin-bottom: 1.5rem;
}

.landing-headline em {
  font-style: normal;
  color: var(--gray-500);
}

.landing-body {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
  font-weight: 400;
}

.landing-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.landing-social-proof {
  margin-top: 4rem;
  font-size: 0.8125rem;
  color: var(--gray-400);
  letter-spacing: 0.02em;
}

/* Feature grid */
.features-section {
  padding: 5rem 1.5rem;
  border-top: 1px solid var(--gray-100);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 3rem auto 0;
}

.feature-card {
  padding: 2rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-card__icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.feature-card__body {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.section-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
}

/* ----- Public Survey Page ----- */
.survey-page {
  min-height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.survey-progress {
  height: 3px;
  background: var(--gray-100);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.survey-progress__bar {
  height: 100%;
  background: var(--black);
  border-radius: 0 2px 2px 0;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.survey-header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}

.survey-brand {
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
}

.survey-counter {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-400);
}

.survey-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.survey-question-wrap {
  width: 100%;
  max-width: 640px;
}

/* Question slides */
.question-slide {
  display: none;
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.question-slide.active {
  display: block;
}

.question-slide.exit {
  animation: slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

.question-step {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.875rem;
}

.question-text {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 2rem;
}

.open-answer {
  font-family: var(--font);
  font-size: 1.0625rem;
  color: var(--gray-900);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  width: 100%;
  outline: none;
  resize: none;
  line-height: 1.6;
  min-height: 140px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.open-answer:focus {
  border-color: var(--gray-900);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.open-answer::placeholder {
  color: var(--gray-300);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}

.option-item {
  position: relative;
}

.option-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-700);
  line-height: 1.4;
}

.option-label:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
  color: var(--black);
}

.option-item input[type="radio"]:checked + .option-label {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-300);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
}

.option-item input[type="radio"]:checked + .option-label .option-letter {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
  color: var(--white);
}

/* Slider question */
.slider-question {
  padding: 1rem 0;
}

.slider-value-display {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--black);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1;
  transition: transform 0.15s ease;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15em;
}

.slider-currency {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--gray-400);
  line-height: 1;
}

.slider-value-display.bump {
  transform: scale(1.12);
}

.slider-question input[type="range"] {
  background: var(--gray-200);
  height: 6px;
  border-radius: 3px;
}

.slider-question input[type="range"]::-webkit-slider-thumb {
  background: var(--black);
  width: 26px;
  height: 26px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.slider-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
}

.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-100);
}

.question-nav__left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ----- Thanks Page ----- */
.thanks-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.thanks-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gray-900);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.thanks-check svg {
  color: var(--white);
}

.thanks-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--black);
  margin-bottom: 0.75rem;
}

.thanks-sub {
  font-size: 1.0625rem;
  color: var(--gray-500);
  max-width: 380px;
  margin: 0 auto 2.5rem;
}

/* ----- Footer ----- */
.footer {
  border-top: 1px solid var(--gray-100);
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer__text {
  font-size: 0.8125rem;
  color: var(--gray-400);
}

/* ----- Utility ----- */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.gap-2 { gap: 0.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-600);
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 65px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gray-200);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    z-index: 99;
  }

  .nav__links--open {
    display: flex;
  }

  .nav__links li {
    width: 100%;
  }

  .nav__links .nav__link,
  .nav__links .btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.625rem 0.75rem;
  }

  .nav__links .btn {
    margin-top: 0.5rem;
    text-align: center;
  }

  .nav__hamburger {
    display: flex;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .slider-config {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

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

  .app-nav__links {
    display: none;
  }

  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  .landing-hero {
    padding: 5rem 1.5rem 4rem;
  }

  .question-nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  .question-nav__left,
  .question-nav .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .stats-bar {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Template switcher ── */
.template-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.template-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem 0.875rem;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font);
}

.template-card:hover {
  border-color: var(--gray-900);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.template-card--active {
  border-color: var(--gray-900);
  background: var(--gray-900);
}

.template-card--active .template-card__name {
  color: var(--white);
}

.template-card--active .template-card__sub {
  color: var(--gray-500);
}


.template-card__name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.2rem;
}

.template-card__sub {
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ── Q3 mode toggle ── */
.mode-toggle {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mode-toggle__opt {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.875rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all var(--transition);
  user-select: none;
}

.mode-toggle__opt:has(input:checked) {
  border-color: var(--gray-900);
  background: var(--gray-900);
  color: white;
}

.mode-toggle__opt input {
  display: none;
}

/* ── Notes field (optional textarea on Q1 & Q2) ── */
.notes-field {
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none;
  resize: none;
  line-height: 1.5;
  min-height: 64px;
  margin-top: 0.75rem;
  transition: border-color var(--transition), background var(--transition);
}

.notes-field:focus {
  border-color: var(--gray-400);
  background: var(--white);
}

.notes-field::placeholder {
  color: var(--gray-300);
}

/* ── Star rating display (Q3 stars mode) ── */
.star-display {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  letter-spacing: 0.05em;
}

.star {
  color: var(--gray-200);
  transition: color 0.12s ease;
  line-height: 1;
}

.star--filled {
  color: var(--gray-900);
}
