/* NWC Partnership Launch Kit — Shared Styles */
/* Palette: #FAF7F2 bg, #F0EBE3 alt, #2E86AB accent, #2D2A26 text */

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

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #FAF7F2;
  color: #2D2A26;
  line-height: 1.6;
  min-height: 100vh;
  visibility: hidden; /* Revealed by auth.js after password check */
}

/* Layout */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.container-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
.tool-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #F0EBE3;
}

.tool-header h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #2D2A26;
  margin-bottom: 0.5rem;
}

.tool-header p {
  font-size: 1rem;
  color: #6B6560;
  max-width: 560px;
  margin: 0 auto;
}

/* Form */
.form-section {
  background: #fff;
  border: 1px solid #E8E3DC;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.form-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2E86AB;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #F0EBE3;
}

.field {
  margin-bottom: 1.25rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2D2A26;
  margin-bottom: 0.35rem;
}

.field .hint {
  display: block;
  font-size: 0.8rem;
  color: #8C8681;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="url"],
.field textarea,
.field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: #2D2A26;
  background: #FAF7F2;
  border: 1px solid #D9D4CE;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: #2E86AB;
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.12);
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.optional-tag {
  font-size: 0.75rem;
  font-weight: 400;
  color: #A9A49E;
  margin-left: 0.35rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

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

.btn-primary {
  background: #2E86AB;
  color: #fff;
}

.btn-primary:hover {
  background: #256F8F;
}

.btn-primary:disabled {
  background: #A9CDD9;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #F0EBE3;
  color: #2D2A26;
}

.btn-secondary:hover {
  background: #E4DED6;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Loading */
.loading {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
}

.loading.visible {
  display: block;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #F0EBE3;
  border-top-color: #2E86AB;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading p {
  font-size: 0.9rem;
  color: #6B6560;
}

/* Output */
.output-area {
  display: none;
}

.output-area.visible {
  display: block;
}

.output-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.output-actions h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2D2A26;
}

.one-sheet-output {
  background: #fff;
  border: 1px solid #E8E3DC;
  border-radius: 8px;
  padding: 2.5rem;
  line-height: 1.7;
}

.one-sheet-output h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2D2A26;
  margin-bottom: 0.25rem;
}

.one-sheet-output .hook {
  font-size: 1.05rem;
  color: #2E86AB;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.one-sheet-output .links {
  font-size: 0.85rem;
  color: #2E86AB;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #F0EBE3;
}

.one-sheet-output .links a {
  color: #2E86AB;
  text-decoration: none;
  margin-right: 1rem;
}

.one-sheet-output .contact-block {
  font-size: 0.9rem;
  color: #6B6560;
  margin-bottom: 1.5rem;
}

.one-sheet-output h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #2E86AB;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.one-sheet-output p {
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
}

.one-sheet-output ul, .one-sheet-output ol {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}

.one-sheet-output li {
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.one-sheet-output strong {
  font-weight: 600;
}

.one-sheet-output .cta-block {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #F0EBE3;
}

.one-sheet-output .thanks {
  text-align: center;
  font-size: 0.85rem;
  color: #A9A49E;
  margin-top: 1.5rem;
}

/* Error */
.error-msg {
  display: none;
  background: #FFF5F5;
  border: 1px solid #E8B4B4;
  color: #8B3A3A;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.error-msg.visible {
  display: block;
}

/* Responsive */
@media (max-width: 640px) {
  .container, .container-wide {
    padding: 1.25rem 1rem;
  }

  .form-section {
    padding: 1.25rem;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .tool-header h1 {
    font-size: 1.4rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .output-actions {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .one-sheet-output {
    padding: 1.5rem;
  }
}

/* PDF-specific styles (applied during export) */
@media print {
  body {
    background: #fff;
  }

  .container, .container-wide {
    max-width: 100%;
    padding: 0;
  }

  .tool-header, .form-section, .output-actions, .btn-group, .loading, .error-msg {
    display: none !important;
  }

  .output-area {
    display: block !important;
  }

  .one-sheet-output {
    border: none;
    padding: 0;
    box-shadow: none;
  }
}
