/* MTA Brand DNA — badanie satysfakcji klientów */

:root {
  --accent: #AA5D26;
  --accent-light: #C68E4D;
  --bg: #050505;
  --bg-card: #0D0D0D;
  --bg-elevated: #121212;
  --bg-input: #0D0D0D;
  --text: #FFFFFF;
  --muted: #A3A3A3;
  --muted-2: #A5AFBD;
  --border: #3A3A3A;
  --success: #4BDE80;
  --success-dark: #19C37D;
  --danger: #ef4444;
}

html { scroll-behavior: smooth; }

body {
  font-feature-settings: "ss01", "cv01";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(170, 93, 38, 0.06), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(198, 142, 77, 0.04), transparent 50%);
  background-attachment: fixed;
}

/* Animated gradient text — h1 */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.bg-gradient-to-r.bg-clip-text {
  animation: gradientShift 8s ease infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Cards/sections */
section[data-section] {
  position: relative;
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.7) 0%, rgba(10, 10, 10, 0.9) 100%),
    radial-gradient(ellipse at top right, rgba(170, 93, 38, 0.08), transparent 50%);
  background-blend-mode: normal, screen;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(170, 93, 38, 0.1) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(58, 58, 58, 0.4);
  border-color: transparent !important;
}

section[data-section]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170, 93, 38, 0.4) 30%, rgba(198, 142, 77, 0.6) 50%, rgba(170, 93, 38, 0.4) 70%, transparent);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

section[data-section]:focus-within::before { opacity: 1; }

section[data-section]:focus-within {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 0 1px rgba(170, 93, 38, 0.3) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(170, 93, 38, 0.5),
    0 0 80px -10px rgba(170, 93, 38, 0.25);
}

/* Section h2 */
section[data-section] h2 {
  letter-spacing: -0.02em;
}

/* Inputs */
input[type="text"], input[type="email"], input[type="tel"],
textarea, select {
  background: rgba(8, 8, 8, 0.6) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 16px;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  background: rgba(8, 8, 8, 0.85) !important;
}
input:hover, textarea:hover, select:hover {
  border-color: #4a4a4a;
}
@media (min-width: 640px) {
  input[type="text"], input[type="email"], input[type="tel"], textarea, select {
    font-size: 15px;
  }
}

/* NPS scale — 1-10 buttons */
.nps-scale {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}
@media (max-width: 640px) {
  .nps-scale {
    grid-template-columns: repeat(5, 1fr);
  }
}
.nps-option {
  position: relative;
  cursor: pointer;
}
.nps-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.nps-option .nps-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 0;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.15s ease;
}
.nps-option:hover .nps-btn {
  border-color: var(--accent-light);
  background: rgba(170, 93, 38, 0.1);
}
.nps-option input[type="radio"]:checked + .nps-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-color: var(--accent);
  color: #050505;
  font-weight: 700;
}
.nps-option input[type="radio"]:focus-visible + .nps-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.nps-scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Submit button */
#submitBtn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}
#submitBtn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px rgba(170, 93, 38, 0.5);
}
#submitBtn:active:not(:disabled) {
  transform: translateY(0);
}
#submitBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading state */
.loading {
  position: relative;
  pointer-events: none;
}
.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  border-radius: inherit;
}

/* Field-level error */
.field-error-msg {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #fca5a5;
  line-height: 1.3;
}
.field-error-msg::before {
  content: '⚠ ';
  font-weight: 700;
}
.field-invalid {
  border-color: rgba(239, 68, 68, 0.7) !important;
  background-color: rgba(239, 68, 68, 0.05) !important;
}
.field-invalid:focus {
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

/* NPS scale: błąd walidacji rzutuje na obwódki kafelków, bo sam .nps-scale to grid bez bordera. */
.nps-scale.field-invalid .nps-btn {
  border-color: rgba(239, 68, 68, 0.6);
  background-color: rgba(239, 68, 68, 0.05);
}

/* Toast (success/error notifications) */
#toast {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  z-index: 1000;
  max-width: 90vw;
}
#toast.show {
  display: block;
  animation: slideIn 0.3s ease forwards;
}
#toast.error { border-color: var(--danger); color: #fca5a5; }
#toast.success { border-color: var(--success); color: var(--success); }
@keyframes slideIn {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Mobile touch targets */
button, label[for] {
  min-height: 44px;
}

/* Bottom safe area (iOS) */
main {
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + 4rem);
}

section[data-section] {
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
  padding-top: clamp(1.25rem, 4vw, 2rem);
  padding-bottom: clamp(1.25rem, 4vw, 2rem);
}

header { padding-top: env(safe-area-inset-top, 0); }

@media (hover: none) {
  button:not(:disabled):hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

@media (max-width: 380px) {
  body { font-size: 14px; }
  h1, h2, h3 { letter-spacing: -0.01em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

label[for] { cursor: pointer; }
