/**
 * Your Voice Profile - Global Styles
 * Brand: Bright Lime Green (#A3E635)
 * Font: Archivo Narrow
 * Design: Vanilla CSS, no frameworks
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Narrow:wght@400;700&display=swap');

/* CSS Variables - Color Palette */
:root {
  /* Brand Family - Bright Lime Green */
  --brand:              #A3E635;
  --brand-accent:       #F7FEE7;
  --brand-alt:          #D9F99D;
  --brand-alt-accent:   #4D7C0F;

  /* Neutrals (with cool lime tint) */
  --contrast:           #1C1F1A;
  --contrast-accent:    #E8F3E5;
  --base-accent:        #6B7565;
  --border-base:        #E8F2E4;
  --border-contrast:    #575E52;

  /* Pure */
  --base:               #FFFFFF;
  --tint:               #FAFEF7;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Archivo Narrow', sans-serif;
  font-weight: 400;
  color: var(--contrast);
  background-color: var(--base);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--contrast);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout - Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: var(--base);
  border-bottom: 2px solid var(--border-base);
  padding: 20px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--contrast);
}

header .logo-accent {
  color: var(--brand);
}

/* Main Content */
main {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 5px;
  font-family: 'Archivo Narrow', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand);
  color: var(--contrast);
}

.btn-primary:hover {
  background-color: var(--brand-alt-accent);
  color: var(--base);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--base);
  color: var(--brand);
  border: 2px solid var(--brand);
}

.btn-secondary:hover {
  background-color: var(--brand-accent);
  text-decoration: none;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.125rem;
}

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

/* Form Elements */
input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-base);
  border-radius: 4px;
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 1rem;
  color: var(--contrast);
  background-color: var(--base);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
  color: var(--contrast);
}

.form-group {
  margin-bottom: 24px;
}

/* Radio Buttons */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border: 2px solid var(--border-base);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-option:hover {
  border-color: var(--brand);
  background-color: var(--brand-accent);
}

.radio-option input[type="radio"] {
  margin-right: 12px;
  margin-top: 4px;
  flex-shrink: 0;
}

.radio-option label {
  margin: 0;
  cursor: pointer;
  flex: 1;
}

.radio-option.selected {
  border-color: var(--brand);
  background-color: var(--brand-accent);
}

/* Progress Bar */
.progress-container {
  margin: 30px 0;
  padding: 20px;
  background-color: var(--tint);
  border-radius: 5px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background-color: var(--border-base);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--brand);
  transition: width 0.3s ease;
}

.progress-text {
  margin-top: 10px;
  text-align: center;
  color: var(--contrast);
  font-weight: 700;
}

/* Survey Sections */
.survey-section {
  margin-bottom: 40px;
  padding: 30px;
  background-color: var(--tint);
  border-radius: 5px;
  border: 2px solid var(--border-base);
}

.survey-section h2 {
  margin-bottom: 8px;
}

.survey-section p {
  color: var(--base-accent);
  margin-bottom: 24px;
}

.question {
  margin-bottom: 32px;
}

.question-text {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--contrast);
}

.question-tier {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--brand);
  color: var(--contrast);
  border-radius: 3px;
  font-size: 0.875rem;
  margin-left: 8px;
}

.question-tier.paid {
  background-color: var(--brand-alt-accent);
  color: var(--base);
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid var(--border-base);
  border-top: 4px solid var(--brand);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alert Messages */
.alert {
  padding: 16px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 2px solid;
}

.alert-success {
  background-color: #D1FAE5;
  border-color: #10B981;
  color: #065F46;
}

.alert-error {
  background-color: #FEE2E2;
  border-color: #EF4444;
  color: #991B1B;
}

.alert-info {
  background-color: var(--brand-accent);
  border-color: var(--brand);
  color: var(--contrast);
}

/* Profile Result */
.profile-result {
  background-color: var(--tint);
  border: 2px solid var(--border-base);
  border-radius: 5px;
  padding: 30px;
  margin: 30px 0;
}

.profile-content {
  background-color: var(--base);
  padding: 24px;
  border-radius: 4px;
  border: 1px solid var(--border-base);
  white-space: pre-wrap;
  font-family: 'Archivo Narrow', sans-serif;
  line-height: 1.8;
  margin-bottom: 20px;
}

.profile-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  color: var(--base-accent);
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Content Input (Paid Tier) */
.content-sources {
  margin-top: 30px;
  padding: 24px;
  background-color: var(--tint);
  border-radius: 5px;
  border: 2px solid var(--brand);
}

.source-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}

.source-item input,
.source-item textarea {
  flex: 1;
}

.source-item button {
  padding: 8px 16px;
  background-color: var(--base-accent);
  color: var(--base);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .nav-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  header .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .profile-actions {
    flex-direction: column;
  }
}
