/* ================================================================
   REDESIGNED PAGES CSS
   Shared styles for support, blog, and other content pages
================================================================ */

/* ================================================================
   PAGE LAYOUT
================================================================ */
.page-wrapper {
  min-height: 100vh;
}

.content-section {
  padding: calc(80px + 3rem) 2rem 4rem;
  background: var(--paper);
}

.content-inner {
  max-width: 800px;
  margin: 0 auto;
}

.content-inner.narrow {
  max-width: 700px;
}

.content-inner.article {
  max-width: 750px;
}

/* ================================================================
   PAGE HEADER
================================================================ */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-eyebrow {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--red-pen);
  display: inline-block;
  margin-bottom: 0.5rem;
  transform: rotate(-2deg);
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--ink-light);
  line-height: 1.7;
}

.page-subtitle a {
  color: var(--red-pen);
  text-decoration: none;
}

.page-subtitle a:hover {
  text-decoration: underline;
}

/* ================================================================
   FORM STYLES (Support page)
================================================================ */
.support-form {
  background: var(--paper);
  border: 1px solid var(--paper-lines);
  border-radius: 4px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.07);
}

/* Washi tape decoration */
.support-form::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 30px;
  width: 80px;
  height: 24px;
  background: var(--washi-coral);
  border-radius: 2px;
  transform: rotate(-2deg);
  opacity: 0.8;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--ink-mid);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--paper-lines);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper-warm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--washi-coral);
  box-shadow: 0 0 0 3px rgba(245, 168, 154, 0.2);
}

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

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

@media (max-width: 580px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.submit-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

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

/* ================================================================
   SHARED FOLDER PAGE
================================================================ */
.shared-content-section {
  /* Lets the body's paper texture run unbroken down to the footer. The
     `.content-section` background shorthand would otherwise drop that texture
     from this section alone, leaving a visible seam below the card wherever the
     section stops short of the footer. */
  background: none;
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.shared-content-inner {
  width: 100%;
  max-width: 640px;
}

.shared-card {
  padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 6vw, 4rem);
  text-align: center;
  background: var(--paper-warm);
  border: 1px solid var(--paper-lines);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(42, 31, 18, 0.1);
}

.shared-archive-icon {
  display: block;
  width: clamp(76px, 18vw, 112px);
  height: auto;
  margin: 0 auto 1.4rem;
  border-radius: 22%;
  box-shadow: 0 8px 18px rgba(42, 31, 18, 0.14);
}

.shared-title {
  max-width: 20ch;
  margin: 0 auto 1rem;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 400;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.shared-metadata {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  margin: 0 auto 1.35rem;
  color: var(--ink-light);
  font-size: 0.82rem;
  font-weight: 600;
}

.shared-metadata span + span::before {
  content: '·';
  margin-right: 1rem;
  color: var(--kraft-dark);
}

.shared-description,
.shared-instructions {
  max-width: 46ch;
  margin-right: auto;
  margin-left: auto;
  color: var(--ink-light);
  line-height: 1.7;
}

.shared-instructions {
  margin-top: 0.45rem;
}

.shared-actions {
  display: grid;
  justify-items: center;
  gap: 2rem;
  margin-top: 2.25rem;
}

.shared-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: min(100%, 280px);
  padding: 0.95rem 1.45rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.shared-open-btn:hover,
.shared-open-btn:focus-visible {
  background: var(--ink-mid);
  color: var(--paper);
  transform: translateY(-1px);
}

.shared-open-btn:focus-visible,
.app-store-btn:focus-visible {
  outline: 3px solid var(--washi-coral);
  outline-offset: 4px;
}

.shared-download {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
}

.shared-download p {
  color: var(--ink-light);
  font-size: 0.86rem;
}

.shared-download .app-store-btn {
  display: inline-block;
  line-height: 0;
}

.shared-download .app-store-btn img {
  display: block;
  width: auto;
  height: 52px;
}

@media (max-width: 480px) {
  .shared-content-section {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .shared-card {
    border-radius: 14px;
  }

  .shared-metadata span + span::before {
    margin-right: 0.6rem;
  }
}

/* Success/error message */
.message-card {
  text-align: center;
  padding: 3rem;
  background: var(--paper);
  border: 1px solid var(--paper-lines);
  border-radius: 4px;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.07);
}

.message-card p {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
}

/* ================================================================
   BLOG POST LIST
================================================================ */
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-item {
  background: var(--paper);
  border: 1px solid var(--paper-lines);
  border-radius: 4px;
  margin-bottom: 1.25rem;
  position: relative;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-item:hover {
  transform: translateY(-2px);
  box-shadow: 3px 5px 15px rgba(0,0,0,0.1);
}

.blog-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 1.75rem 2rem;
}

.blog-item-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-item-date {
  font-family: var(--font-hand);
  font-size: 0.85rem;
  color: var(--ink-light);
}

.blog-item-author {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-top: 0.25rem;
}

.blog-item-author strong {
  font-weight: 600;
}

.blog-item-excerpt {
  font-size: 0.9rem;
  color: var(--ink-mid);
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* RSS link */
.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-hand);
  font-size: 0.9rem;
  color: var(--ink-light);
  text-decoration: none;
  margin-top: 2rem;
  transition: color 0.2s;
}

.rss-link:hover {
  color: var(--washi-coral);
}

.rss-link svg {
  width: 18px;
  height: 18px;
}

/* ================================================================
   MARKDOWN CONTENT (Blog posts)
================================================================ */
.markdown {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
}

.markdown h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.markdown h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--ink);
}

.markdown h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.markdown p {
  margin-bottom: 1.25rem;
}

.markdown a {
  color: var(--red-pen);
  text-decoration: none;
  transition: color 0.2s;
}

.markdown a:hover {
  color: var(--washi-coral);
  text-decoration: underline;
}

.platform-marker {
  display: inline-block;
  font-size: 0.8em;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--washi-coral);
  padding: 0.15em 0.55em;
  border-radius: 0.3em;
  line-height: 1.4;
  vertical-align: 0.1em;
}

.markdown img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.blog-image.mid {
  display: block;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  width: 65%;
  border-radius: 6px;
}

.blog-image.full {
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
  border-radius: 6px;
}

.markdown blockquote {
  border-left: 4px solid var(--washi-coral);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ink-mid);
}

.markdown ul, .markdown ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.markdown li {
  margin-bottom: 0.5rem;
}

.markdown code {
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.9em;
  background: var(--paper-warm);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--paper-lines);
}

.markdown pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.markdown pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.markdown hr {
  border: none;
  border-top: 1px dashed var(--paper-lines);
  margin: 2rem 0;
}

@media (prefers-color-scheme: dark) {
  .markdown pre {
    background: #0a0806;
  }
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--ink-light);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--washi-coral);
}
