/* ============================================
   Valor — premium Shopify theme landing page
   Aesthetic: refined luxury minimalism
   ============================================ */

/* Fonts */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-v21-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-v21-latin-300italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-v21-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-v21-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/lexend-v26-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lexend-v26-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/lexend-v26-latin-500.woff2') format('woff2');
}

/* Design tokens */
:root {
  --ink: #0f0f0e;
  --ink-soft: #2a2a27;
  --paper: #faf8f4;
  --paper-warm: #f3efe8;
  --rule: #1a1a17;
  --rule-soft: rgba(15, 15, 14, 0.12);
  --muted: rgba(15, 15, 14, 0.72);
  --muted-soft: rgba(15, 15, 14, 0.65);
  --accent: #7a6344;

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Lexend', -apple-system, sans-serif;

  --container: 1200px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  min-height: 76px;
}

.brand {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}

.nav {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav a {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
  line-height: 1;
}

.nav a:hover { color: var(--ink); }

.nav-demo {
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s var(--ease);
}

.nav-demo:hover {
  background: var(--ink);
  color: var(--paper) !important;
}

/* ============================================
   Typography
   ============================================ */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 28px;
}

.eyebrow-light {
  color: rgba(250, 248, 244, 0.72);
}

.hero-title,
.section-title {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-title em,
.section-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-title {
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1.02;
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  margin-bottom: 72px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 140px 0 160px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(139, 115, 85, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 48px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-note {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-secondary {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.hero-secondary a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 99, 68, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.hero-secondary a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  font-family: var(--sans);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--rule-soft);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-disabled {
  background: rgba(15, 15, 14, 0.2);
  color: rgba(250, 248, 244, 0.7);
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 140px 0;
  border-top: 1px solid var(--rule-soft);
}

.section-dark {
  background: var(--ink);
  color: var(--paper);
  border-top: none;
}

.section-dark .section-title { color: var(--paper); }
.section-dark em { color: #d4b896; }

.section-muted {
  background: var(--paper-warm);
}

/* ============================================
   Features
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 64px 48px;
}

.feature {
  position: relative;
}

.feature-num {
  font-family: var(--serif);
  font-size: 28px;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: 0;
  margin-bottom: 24px;
  line-height: 1;
}

.feature h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--ink);
}

.feature p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 380px;
}

/* ============================================
   Included list
   ============================================ */
.included-list {
  list-style: none;
  max-width: 780px;
}

.included-list li {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 28px 0;
  border-top: 1px solid rgba(250, 248, 244, 0.12);
}

.included-list li:last-child {
  border-bottom: 1px solid rgba(250, 248, 244, 0.12);
}

.included-label {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--paper);
}

.included-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(250, 248, 244, 0.82);
  padding-top: 4px;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  max-width: 820px;
}

.faq details {
  border-top: 1px solid var(--rule-soft);
  padding: 28px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--rule-soft);
}

.faq summary {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s var(--ease);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  font-size: 28px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details[open] summary {
  color: var(--accent);
}

.faq details p {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 680px;
}

.faq details p a {
  border-bottom: 1px solid var(--rule-soft);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(250, 248, 244, 0.72);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.footer-links a {
  font-size: 14px;
  color: rgba(250, 248, 244, 0.82);
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--paper);
}

.footer-copy {
  grid-column: 1 / -1;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(250, 248, 244, 0.2);
  font-size: 12px;
  color: rgba(250, 248, 244, 0.7);
  letter-spacing: 0.04em;
}

/* ============================================
   Built for
   ============================================ */
.built-for-lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 580px;
  margin-bottom: 56px;
  font-weight: 300;
}

.built-for-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 64px;
  max-width: 800px;
}

.built-for-list li {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.built-for-list li:nth-last-child(-n+2) {
  border-bottom: none;
}

/* ============================================
   Contact form
   ============================================ */
.contact-form {
  max-width: 680px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  transition: border-color 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: rgba(15, 15, 14, 0.24);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

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

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted-soft);
}

.form-submit {
  margin-top: 8px;
  min-width: 200px;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.form-status {
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  min-height: 1.5em;
  max-width: 520px;
}

.form-privacy-note {
  margin-top: 20px;
  font-size: 12px;
  font-style: italic;
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: 0.02em;
  max-width: 520px;
}
.form-privacy-note a {
  color: #5C4A33;
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 74, 51, 0.4);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}
.form-privacy-note a:hover {
  border-bottom-color: #5C4A33;
}

.form-status.success {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  font-weight: 400;
  color: var(--ink);
}

.form-status.error {
  color: #8a3a3a;
}

.form-status.info {
  color: var(--ink);
  font-style: italic;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .container { padding: 0 24px; }

  .header-inner {
    padding-top: 20px;
    padding-bottom: 20px;
    min-height: 72px;
  }

  .brand {
    font-size: 26px;
  }

  .nav { gap: 20px; }
  .nav a:not(.nav-demo) { display: none; }

  .nav-demo {
    padding: 11px 20px;
    font-size: 13px;
  }

  .hero { padding: 80px 0 100px; }
  .section { padding: 80px 0; }

  .hero-lede { font-size: 18px; }

  .included-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    align-items: flex-start;
  }

  .faq summary { font-size: 18px; }

  .built-for-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .built-for-list li {
    font-size: 20px;
    padding: 18px 0;
  }

  .built-for-list li:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--rule-soft);
  }

  .built-for-list li:last-child {
    border-bottom: none;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .form-submit {
    width: 100%;
  }
}

/* Entrance animation */
@keyframes riseFade {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title,
.hero-lede,
.hero-actions,
.hero-note {
  animation: riseFade 0.9s var(--ease) both;
}

.hero-lede { animation-delay: 0.15s; }
.hero-actions { animation-delay: 0.3s; }
.hero-note { animation-delay: 0.45s; }

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

/* ─────────────────────────────────────────────────────────
 * V6 — Free launch additions
 * ─────────────────────────────────────────────────────── */

/* Narrow container for content pages (license, docs, changelog, success) */
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Page titles for content pages */
.page-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 16px 0 24px;
  color: var(--ink);
}
.page-title em {
  font-style: italic;
  color: var(--accent);
}

.page-lede {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 56px;
  max-width: 580px;
}

/* ─── Get Started / Steps list (homepage) ─────────────── */

.steps-list {
  list-style: none;
  padding: 0;
  margin: 56px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.steps-list li {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule-soft);
}

.steps-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.steps-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--accent);
  font-weight: 300;
  min-width: 64px;
  flex-shrink: 0;
}

.steps-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 8px;
  color: var(--ink);
}

.steps-body p {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

.steps-cta {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.steps-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

.steps-note a {
  color: #5C4A33;
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 74, 51, 0.4);
}

/* ─── Download modal ──────────────────────────────────── */

.download-modal {
  border: none;
  border-radius: 4px;
  padding: 0;
  max-width: 540px;
  width: calc(100% - 32px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  margin: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.download-modal::backdrop {
  background: rgba(15, 15, 14, 0.5);
  backdrop-filter: blur(2px);
}

.download-form {
  padding: 40px;
  position: relative;
}

.download-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.download-modal-close:hover {
  color: var(--ink);
}

.download-modal-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 2rem;
  line-height: 1.15;
  margin: 12px 0 12px;
  color: var(--ink);
}

.download-modal-lede {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 28px;
}

.download-form .form-field {
  margin-bottom: 18px;
}

.download-form .form-field label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--ink);
}

.download-form input[type="email"],
.download-form input[type="text"],
.download-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.download-form input:focus,
.download-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.form-hint code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.85em;
  background: rgba(15, 15, 14, 0.06);
  padding: 1px 4px;
  border-radius: 2px;
}

.form-optional {
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}

.form-checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0 24px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.form-checkbox a {
  color: #5C4A33;
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 74, 51, 0.4);
}

.download-form .form-submit {
  width: 100%;
}

/* ─── Download success page ───────────────────────────── */

.download-cta {
  margin: 48px 0 64px;
  text-align: center;
  padding: 40px 24px;
  background: var(--paper-warm);
  border-radius: 4px;
}

.btn-large {
  font-size: 1.1rem;
  padding: 18px 36px;
}

.download-meta {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

.next-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  margin: 64px 0 24px;
  color: var(--ink);
}

.next-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}

.next-steps li {
  counter-increment: step;
  position: relative;
  padding: 24px 0 24px 56px;
  border-bottom: 1px solid var(--rule-soft);
}

.next-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--accent);
}

.next-steps li:last-child {
  border-bottom: none;
}

.next-steps strong {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.next-steps p {
  margin: 4px 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.next-meta {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.875rem;
  color: var(--muted);
}

.next-meta p {
  margin: 6px 0;
}

/* ─── Earlier versions list on download success ──────── */
.earlier-versions {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-soft);
}

.earlier-versions-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
  margin: 0 0 12px;
  color: var(--ink);
}

.earlier-versions-lede {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

.earlier-versions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.earlier-versions-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.earlier-versions-list li:last-child {
  border-bottom: none;
}

.earlier-versions-list a {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
  transition: border-color 0.2s var(--ease);
}

.earlier-versions-list a:hover {
  border-bottom-color: var(--ink);
}

.earlier-versions-date {
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── Legal / License content ─────────────────────────── */

.legal-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}

.legal-content h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  margin: 56px 0 16px;
  color: var(--ink);
}

.legal-content h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 32px 0 12px;
  color: var(--ink);
}

.legal-content p,
.legal-content ul,
.legal-content ol {
  margin-bottom: 16px;
  color: var(--muted);
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  color: #5C4A33;
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 74, 51, 0.4);
}

.legal-meta {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

/* ─── Changelog ───────────────────────────────────────── */

.changelog {
  margin: 56px 0;
}

.changelog-entry {
  padding: 40px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.changelog-entry:last-child {
  border-bottom: none;
}

.changelog-header {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.changelog-version {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  margin: 0;
  color: var(--ink);
}

.changelog-meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 16px;
}

.changelog-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--paper);
  border-radius: 2px;
}

.changelog-summary {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 24px;
}

.changelog-note {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--paper-warm);
  border-left: 3px solid var(--rule-soft);
}

.changelog-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  background: var(--paper-warm);
  border-radius: 3px;
}

.changelog-list em {
  font-style: italic;
  color: var(--ink);
}

.changelog-category {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 24px 0 8px;
  color: var(--ink);
}

.changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.changelog-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--muted);
  line-height: 1.55;
}

.changelog-list li::before {
  content: "·";
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: bold;
}

.changelog-download {
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
}

.changelog-license-note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}

.changelog-license-note a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-soft);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}

.changelog-license-note a:hover {
  border-bottom-color: var(--ink);
}

.changelog-table-lede {
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  margin: 16px 0 20px;
  line-height: 1.6;
}

.changelog-table-wrap {
  margin: 0 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.changelog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.changelog-table th,
.changelog-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}

.changelog-table thead th {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.changelog-table tbody th {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
}

.changelog-table tbody td {
  color: var(--muted);
}

.changelog-table tbody td:last-child {
  color: var(--ink);
  font-weight: 500;
}

.changelog-table tbody tr:last-child th,
.changelog-table tbody tr:last-child td {
  border-bottom: none;
}

.changelog-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  background: var(--paper-warm);
  border-radius: 3px;
}

@media (max-width: 600px) {
  .changelog-table {
    font-size: 0.88rem;
  }
  .changelog-table th,
  .changelog-table td {
    padding: 10px 12px;
  }
}

.changelog-meta-section {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-soft);
}

.changelog-meta-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 16px;
  color: var(--ink);
}

.changelog-meta-section p,
.changelog-meta-section ol {
  color: var(--muted);
  line-height: 1.7;
}

.changelog-meta-section ol {
  padding-left: 24px;
  margin: 16px 0;
}

.changelog-meta-section li {
  margin-bottom: 8px;
}

/* ─── Docs ────────────────────────────────────────────── */

.docs-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.docs-content h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  margin: 56px 0 24px;
  color: var(--ink);
}

.docs-content h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 8px;
  color: var(--ink);
}

.docs-content p {
  margin-bottom: 16px;
}

.docs-content em {
  font-style: italic;
  color: var(--ink);
}

.docs-content code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  background: rgba(15, 15, 14, 0.06);
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--ink);
}

.docs-content a {
  color: #5C4A33;
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 74, 51, 0.4);
}

.docs-content ul {
  padding-left: 24px;
  margin-bottom: 24px;
}

.docs-content ul li {
  margin-bottom: 8px;
}

.docs-steps {
  list-style: none;
  counter-reset: docstep;
  padding: 0;
  margin: 32px 0 48px;
}

.docs-steps li {
  counter-increment: docstep;
  position: relative;
  padding: 24px 0 24px 64px;
  border-bottom: 1px solid var(--rule-soft);
}

.docs-steps li::before {
  content: counter(docstep, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.75rem;
  color: var(--accent);
}

.docs-steps li:last-child {
  border-bottom: none;
}

.docs-steps p {
  margin: 0;
  line-height: 1.65;
}

.docs-faq {
  margin: 12px 0;
  padding: 16px 20px;
  background: var(--paper-warm);
  border-radius: 4px;
  border: 1px solid var(--rule-soft);
}

.docs-faq summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
  padding: 4px 0;
  outline: none;
}

.docs-faq summary:hover {
  color: var(--accent);
}

.docs-faq[open] summary {
  margin-bottom: 12px;
}

.docs-faq p {
  margin: 0;
  line-height: 1.65;
}

/* ─── Mobile adjustments ──────────────────────────────── */

@media (max-width: 600px) {
  .download-form {
    padding: 32px 24px;
  }

  .download-modal-title {
    font-size: 1.6rem;
  }

  .steps-list li {
    gap: 20px;
  }

  .steps-num {
    min-width: 48px;
    font-size: 1.6rem;
  }

  .next-steps li,
  .docs-steps li {
    padding-left: 48px;
  }

  .next-steps li::before {
    font-size: 1.25rem;
  }

  .docs-steps li::before {
    font-size: 1.4rem;
  }

  .changelog-header {
    gap: 12px;
  }

  .changelog-version {
    font-size: 1.5rem;
  }
}

/* ─────────────────────────────────────────────────────────
 * V6.1 — Free-launch audit corrections
 * ─────────────────────────────────────────────────────── */

/* Why Valor SEO section */
.why-valor-text {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 20px;
}

.why-valor-text:last-child {
  margin-bottom: 0;
}

.why-valor-text a {
  color: #5C4A33;
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 74, 51, 0.4);
}

.why-valor-text a:hover {
  border-bottom-color: rgba(92, 74, 51, 0.8);
}

/* Docs TOC */
.docs-toc {
  background: var(--paper-warm);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 0 0 48px;
}

.docs-toc-label {
  margin: 0 0 12px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}

.docs-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-toc ul li {
  margin: 0;
}

.docs-toc ul a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
  display: inline-block;
  padding: 2px 0;
}

.docs-toc ul a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* Smooth scroll for anchor links */
html {
  scroll-behavior: smooth;
}

/* Anchor-link offset for fixed header (if any future header is sticky) */
.docs-content h2[id] {
  scroll-margin-top: 24px;
}

/* Form-status when error appears in modal */
.download-form .form-status {
  margin: 12px 0 4px;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.download-form .form-status.error {
  color: #B22222;
  font-weight: 500;
}

.download-form .form-status.success {
  color: #2E7D32;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────
 * V6.2 — Mobile audit corrections
 * ─────────────────────────────────────────────────────── */

/* ─── 1. Download modal — mobile fix ─────────────────── */
/* Modal starts from top on mobile so title + close button are always visible */
@media (max-width: 600px) {
  .download-modal {
    top: max(16px, env(safe-area-inset-top, 16px));
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* ─── 2. Mobile header — touch target 44px minimum ─── */
@media (max-width: 768px) {
  .nav-demo {
    min-height: 44px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
  }

  .brand {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ─── 3. Hero — tighter mobile spacing ─────────────── */
@media (max-width: 768px) {
  .hero {
    padding: 64px 0 88px;
  }

  .hero-title {
    font-size: clamp(44px, 13vw, 64px);
  }
}

/* ─── 4. Long URLs / emails — prevent overflow ─────── */
.legal-content a,
.docs-content a,
.form-privacy-note a,
.next-meta a,
.legal-meta a,
.changelog-meta-section a {
  overflow-wrap: anywhere;
}

/* ─── 5. Inside page — mobile single-column for screenshots ─── */
@media (max-width: 560px) {
  .mobile-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── 6. Back-to-top button ─────────────────────────── */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 15, 14, 0.82);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: rgba(15, 15, 14, 0.95);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.back-to-top:focus-visible {
  box-shadow: 0 0 0 3px rgba(122, 99, 68, 0.4);
}

@media (max-width: 768px) {
  .back-to-top {
    right: 18px;
    bottom: 18px;
    width: 42px;
    height: 42px;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.1s ease, visibility 0.1s ease;
    transform: none;
  }
  .back-to-top.is-visible {
    transform: none;
  }
}

/* ─── 7. Mobile menu (hamburger) ──────────────────────── */
/* Desktop: show Demo, hide mobile Menu trigger */
.mobile-menu-trigger {
  display: none;
}

/* Mobile: hide Demo, show Menu trigger */
@media (max-width: 768px) {
  .nav-demo-desktop {
    display: none !important;
  }
  .nav .mobile-menu-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 72px;
    padding: 10px 20px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    line-height: 1;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
  }
  .nav .mobile-menu-trigger:hover,
  .nav .mobile-menu-trigger:focus-visible {
    background: var(--ink);
    color: var(--paper);
  }
}

/* Backdrop — blurred dim overlay behind the panel */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.mobile-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Panel — slides in from the right */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(88vw, 380px);
  height: 100vh;
  height: 100dvh;
  z-index: 150;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s var(--ease);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.06);
  visibility: hidden;
}

.mobile-menu-panel.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Hide panel entirely from layout on desktop (no rendering cost) */
@media (min-width: 769px) {
  .mobile-menu-panel,
  .mobile-menu-backdrop {
    display: none !important;
  }
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--rule-soft);
}

.mobile-menu-brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
  cursor: pointer;
  transition: opacity 0.2s var(--ease);
}

.mobile-menu-close:hover,
.mobile-menu-close:focus-visible {
  opacity: 0.6;
}

/* Actions area — pushed to the bottom of the panel via margin-top: auto.
   Places the primary Download CTA in the natural thumb zone on mobile. */
.mobile-menu-actions {
  margin-top: auto;
  padding: 28px 28px 12px;
}

/* Primary CTA — the Download button (sits inside .mobile-menu-actions) */
.mobile-menu-cta {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 16px 24px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.mobile-menu-cta:hover,
.mobile-menu-cta:focus-visible {
  background: rgba(15, 15, 14, 0.85);
  color: var(--paper);
}

/* Primary navigation links */
.mobile-menu-nav,
.mobile-menu-secondary {
  display: flex;
  flex-direction: column;
  padding: 0 28px;
}

.mobile-menu-nav a,
.mobile-menu-secondary a {
  padding: 14px 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
  transition: color 0.2s var(--ease);
}

.mobile-menu-nav a:last-child,
.mobile-menu-secondary a:last-child {
  border-bottom: none;
}

.mobile-menu-nav a:hover,
.mobile-menu-secondary a:hover,
.mobile-menu-nav a:focus-visible,
.mobile-menu-secondary a:focus-visible {
  color: var(--muted);
}

/* Secondary section: smaller, slightly muted */
.mobile-menu-secondary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}

.mobile-menu-secondary a {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--muted);
}

.mobile-menu-secondary a:hover,
.mobile-menu-secondary a:focus-visible {
  color: var(--ink);
}

.mobile-menu-footer {
  margin: 0 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ─── 8. Inside page section jump-nav ─────────────────── */
.inside-jump-nav {
  background: var(--paper-warm);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  padding: 20px 0;
  position: sticky;
  top: 100px; /* Sit under sticky site-header (measured 97px + buffer) */
  z-index: 50;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(243, 239, 232, 0.92);
}

.inside-jump-nav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  align-items: center;
}

.inside-jump-nav a {
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 4px;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.inside-jump-nav a:hover,
.inside-jump-nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--accent);
  outline: none;
}

@media (max-width: 600px) {
  .inside-jump-nav {
    padding: 12px 0;
    top: 88px; /* Sit under sticky mobile header (measured 85px + buffer) */
  }
  .inside-jump-nav .container {
    gap: 4px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }
  .inside-jump-nav a {
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .gallery-section[id] {
    scroll-margin-top: 160px; /* Header (85) + jump-nav (63) + buffer */
  }
}

/* Desktop section anchor offset (header + jump-nav) */
@media (min-width: 601px) {
  .gallery-section[id] {
    scroll-margin-top: 190px; /* Header (97) + jump-nav (81) + buffer */
  }
}
