/*
 * Brandform Performance workspace - shared site styles
 * Loaded by index.html, commercial.html, product.html, ways-of-working.html, pricing.html
 * Design tokens are scoped to AgencyOS; the pricing page defines its own overrides.
 */

/* =========================================================================
   Site-level nav bar (top of every page, above each doc's internal layout)
   ========================================================================= */

.site-nav {
  background: #F7F6F2;
  border-bottom: 1px solid #E3E0D8;
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, sans-serif;
}
.site-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-nav-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: #1A1A18;
  text-decoration: none !important;
  border-bottom: 0 !important;
  letter-spacing: -0.01em;
}
.site-nav-brand .accent { color: #0D7377; }
.site-nav-brand .pipe { color: #8A877F; margin: 0 8px; font-weight: 400; }
.site-nav-brand .workspace { font-family: 'Roboto', sans-serif; font-weight: 500; color: #5C5A54; font-size: 13px; letter-spacing: 0; }

.site-nav-docs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.site-nav-docs a {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #5C5A54;
  padding: 6px 12px;
  border-radius: 6px;
  border-bottom: 0 !important;
  text-decoration: none !important;
  transition: background 120ms ease, color 120ms ease;
}
.site-nav-docs a:hover {
  background: #E3E0D8;
  color: #1A1A18;
}
.site-nav-docs a.is-current {
  color: #0A5C5F;
  background: #D6EDED;
}

@media (max-width: 760px) {
  .site-nav-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
    gap: 8px;
  }
  .site-nav-docs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .site-nav-docs a { white-space: nowrap; }
}

/* =========================================================================
   Per-section feedback block (injected by site.js)
   ========================================================================= */

.feedback {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed #E3E0D8;
  font-family: 'Roboto', system-ui, sans-serif;
}
.feedback h4 {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8A877F;
  margin: 0 0 8px;
}
.feedback textarea {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: #1A1A18;
  background: #EDEBE5;
  border: 1px solid #E3E0D8;
  border-radius: 8px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.feedback textarea:focus {
  border-color: #0D7377;
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.12);
}
.feedback textarea::placeholder {
  color: #8A877F;
  font-style: italic;
}
.feedback.has-value h4::after {
  content: ' · saved';
  color: #2D8A4E;
  font-weight: 500;
}

/* =========================================================================
   Floating "Copy feedback as JSON" button
   ========================================================================= */

.fb-copy {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 11px 16px 11px 18px;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: #0D7377;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(13, 115, 119, 0.28);
  cursor: pointer;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.fb-copy:hover {
  background: #0A5C5F;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(13, 115, 119, 0.35);
}
.fb-copy.is-copied { background: #2D8A4E; }
.fb-copy.is-empty { background: #8A877F; box-shadow: 0 4px 12px rgba(26, 26, 24, 0.12); }
.fb-copy-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
}

@media (max-width: 480px) {
  .fb-copy { bottom: 12px; right: 12px; padding: 9px 14px; font-size: 12.5px; }
}

/* =========================================================================
   Print: hide interactive chrome
   ========================================================================= */

@media print {
  .site-nav, .feedback, .fb-copy { display: none !important; }
}

/* =========================================================================
   Password gate - modal overlay
   ========================================================================= */

#pw-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(26, 26, 24, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 220ms ease;
}
#pw-gate-overlay.pw-gate-in { opacity: 1; }

.pw-gate-panel {
  background: #F7F6F2;
  border: 1px solid #E3E0D8;
  border-radius: 16px;
  padding: 40px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(26, 26, 24, 0.35);
}

.pw-gate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #D6EDED;
  border-radius: 50%;
  color: #0D7377;
  margin-bottom: 20px;
}

.pw-gate-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: #1A1A18;
  margin: 0 0 10px;
}

.pw-gate-desc {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 15px;
  color: #5C5A54;
  margin: 0 0 24px;
  line-height: 1.55;
}

.pw-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pw-gate-input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 15px;
  background: #EDEBE5;
  border: 1px solid #E3E0D8;
  border-radius: 10px;
  outline: none;
  color: #1A1A18;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  box-sizing: border-box;
}
.pw-gate-input:focus {
  border-color: #0D7377;
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.12);
}
.pw-gate-input::placeholder { color: #8A877F; }

.pw-gate-error {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 13px;
  color: #c0392b;
  margin: 0;
  min-height: 18px;
  text-align: left;
}

.pw-gate-btn {
  width: 100%;
  padding: 13px 20px;
  background: #0D7377;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, transform 100ms ease;
}
.pw-gate-btn:hover { background: #0A5C5F; }
.pw-gate-btn:active { transform: scale(0.98); }

@keyframes pw-gate-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.pw-gate-shake { animation: pw-gate-shake 0.55s ease; }

/* =========================================================================
   Password gate - locked doc cards (index page)
   ========================================================================= */

.doc-card[data-locked] { position: relative; }

/* Translucent overlay when locked */
.doc-card[data-locked].is-locked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: rgba(237, 235, 229, 0.55);
  pointer-events: none;
  z-index: 1;
}

/* Lock badge - centred on tile */
.card-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: #F7F6F2;
  border: 1px solid #E3E0D8;
  border-radius: 50%;
  color: #0D7377;
  box-shadow: 0 2px 8px rgba(26, 26, 24, 0.18);
}
.doc-card[data-locked].is-locked .card-lock { display: flex; }

/* Nav lock indicators */
.site-nav-docs a.nav-locked {
  padding-right: 8px;
}
.site-nav-docs a.nav-locked::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 5px;
  vertical-align: -1px;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C5A54' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
