/* ===== NOMO QR Feedback Page ===== */
/* Dark luxury aesthetic matching nomohuqqa.ru */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Montserrat:wght@300;400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  --bg-deep: #0a0e14;
  --bg-primary: #11151c;
  --bg-elevated: #181e28;
  --bg-surface: #1e2530;

  --gold-primary: #d9bf71;
  --gold-light: #e9d58a;
  --gold-dim: #a8923e;
  --gold-glow: rgba(217, 191, 113, 0.12);

  --text-primary: #f0efe8;
  --text-secondary: #9a9a8e;
  --text-muted: #5c5c52;

  --negative: #c45e5e;
  --negative-soft: rgba(196, 94, 94, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 100px;

  --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-dramatic: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 9999;
}

/* --- Container --- */
.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  padding: 0 24px;
}

/* --- Screens --- */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  padding: 48px 0 40px;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--transition-smooth),
    transform var(--transition-smooth);
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* --- Main Screen --- */
#main-screen {
  justify-content: center;
  align-items: center;
  gap: 56px;
}

/* Logo */
.logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: logoReveal 1s var(--transition-smooth) both;
}

.logo {
  width: 180px;
  height: auto;
  filter: brightness(1.05);
  transition: filter var(--transition-fast);
}

@keyframes logoReveal {
  from {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* Buttons container */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  animation: buttonsReveal 0.8s 0.3s var(--transition-smooth) both;
}

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

/* --- Buttons --- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 18px 28px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
  min-height: 58px;
  line-height: 1.3;
}

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

/* Primary button — gold */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dim));
  color: var(--bg-deep);
  font-weight: 600;
  box-shadow:
    0 2px 12px rgba(217, 191, 113, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.12) 100%);
  pointer-events: none;
}

.btn-primary:active {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold-primary));
  box-shadow: 0 1px 6px rgba(217, 191, 113, 0.15);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Secondary button — outline */
.btn-secondary {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-dim);
  font-weight: 400;
}

.btn-secondary:active {
  background: var(--gold-glow);
  border-color: var(--gold-primary);
}

/* Site link */
.site-link {
  display: block;
  text-align: center;
  margin-top: 32px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
  animation: buttonsReveal 0.8s 0.5s var(--transition-smooth) both;
}

.site-link:active {
  color: var(--gold-light);
}

/* --- Feedback Screen --- */
#feedback-screen {
  gap: 0;
}

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 24px;
  align-self: flex-start;
  transition: color var(--transition-fast);
  letter-spacing: 0.02em;
}

.back-btn:active {
  color: var(--text-primary);
}

/* Screen title */
.screen-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: 28px;
}

/* --- Tags --- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--bg-surface);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}

.tag:active {
  transform: scale(0.96);
}

.tag.selected {
  background: var(--gold-glow);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  box-shadow: 0 0 12px rgba(217, 191, 113, 0.08);
}

/* --- Textarea --- */
textarea {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-surface);
  background: var(--bg-elevated);
  color: var(--text-primary);
  resize: vertical;
  min-height: 120px;
  max-height: 240px;
  margin-bottom: 20px;
  transition: border-color var(--transition-fast);
  outline: none;
}

textarea::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

textarea:focus {
  border-color: var(--gold-dim);
}

/* Submit button full width */
#submit-btn {
  width: 100%;
  margin-bottom: 16px;
}

/* --- Status Message --- */
.status-message {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.4em;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.status-message.error {
  color: var(--negative);
}

/* --- Success Screen --- */
#success-screen {
  justify-content: center;
  align-items: center;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: successReveal 0.6s var(--transition-smooth) both;
}

@keyframes successReveal {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--gold-primary);
  margin-bottom: 8px;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 191, 113, 0.15); }
  50% { box-shadow: 0 0 0 12px rgba(217, 191, 113, 0); }
}

.success-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.success-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
}

.success-content .btn-secondary {
  margin-top: 16px;
  padding: 14px 40px;
}

/* --- Safe area for notched phones --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .container {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
