/* ============================================================
   styles/page.css — DoneAgo
   Shared styles for all inner pages: blog posts, about, support, etc.
   Always load alongside styles/style.css
   ============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #ffffff;
  --surface:  #f5f5f7;
  --border:   #d2d2d7;
  --text:     #1d1d1f;
  --text-2:   #3d3d3f;
  --text-3:   #6e6e73;
  --accent:   #6366F1;
  --accent-bg:#EEF2FF;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text-2);
  overflow-x: hidden;
  padding-top: 69px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   LAYOUT
   ============================================================ */

.wrapper {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   BLOG POST — HEADER
   ============================================================ */

.post-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.post-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 4px 10px;
  border-radius: 999px;
}

.post-date {
  font-size: 13px;
  color: var(--text-3);
}

.post-header h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 16px;
}

.post-subtitle {
  font-size: 17px;
  color: var(--text-3);
  line-height: 1.65;
  max-width: 580px;
  font-weight: 300;
}

/* ============================================================
   BLOG POST — BODY
   ============================================================ */

.post-body {
  padding: 48px 0 100px;
}

/* ── Intro (no h2) ── */
.post-intro {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.post-intro p {
  font-size: 15px;
  color: var(--text-3);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 640px;
}

.post-intro p:last-child { margin-bottom: 0; }

/* ── Sections ── */
.post-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.post-section:last-child {
  border-bottom: none;
}

.post-section h2 {
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-bottom: 20px;
}

.post-section p {
  font-size: 15px;
  color: var(--text-3);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 640px;
}

.post-section p:last-child { margin-bottom: 0; }

.post-section p strong {
  color: var(--text-2);
  font-weight: 500;
}

/* ── Images ── */
.post-image {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: block;
  margin: 28px 0;
  overflow: hidden;
}

/* Real image */
.post-image img {
  width: 1080px;
  height: 607px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* Placeholder (no real image yet) */
.post-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px 0;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}

.post-image-placeholder i {
  font-size: 28px;
  color: #D1D5DB;
}

.post-image-caption {
  font-size: 12px;
  color: var(--text-3);
  margin-top: -16px;
  margin-bottom: 28px;
  font-style: italic;
}

/* ── Callout block ── */
.post-callout {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 24px 0;
}

.post-callout p {
  font-size: 14px;
  color: #4338CA;
  line-height: 1.7;
  margin: 0;
}

/* ── Back link ── */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-top: 48px;
}

.post-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   BLOG POST — CHORE EXAMPLES GRID
   (reusable for any "state examples" block in how-to posts)
   ============================================================ */

.chore-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}

.chore-room {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.chore-room-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}

.chore-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.chore-item:last-child { border-bottom: none; }

.chore-item-name {
  font-size: 13px;
  color: var(--text-2);
}

.chore-item-states {
  font-size: 12px;
  color: #9CA3AF;
  white-space: nowrap;
}

.chore-item-states .active {
  color: var(--text-2);
  font-weight: 500;
}

.chore-item-states .sep {
  margin: 0 3px;
  color: #D1D5DB;
}

/* ============================================================
   BLOG INDEX PAGE
   ============================================================ */

.blog-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.blog-header h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.1;
}

.blog-header p {
  font-size: 16px;
  color: var(--text-3);
  line-height: 1.65;
  font-weight: 300;
}

.blog-posts-section {
  padding-top: 40px;
}

.blog-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}

.blog-post-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 28px 24px;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 12px;
}

.blog-post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(99,102,241,0.08);
  text-decoration: none;
}

.blog-post-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.blog-post-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 9px;
  border-radius: 999px;
}

.blog-post-date {
  font-size: 12px;
  color: var(--text-3);
}

.blog-post-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1.35;
  margin-bottom: 8px;
}

.blog-post-excerpt {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.7;
  margin-bottom: 16px;
}

.blog-post-read-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.blog-coming-section {
  margin-top: 48px;
}

.blog-coming-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}

.blog-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: #E5E7EB;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  overflow: hidden;
}

.blog-card {
  background: #F9FAFB;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
}

.blog-card-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #D1D5DB;
}

.blog-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #9CA3AF;
  letter-spacing: -.01em;
  line-height: 1.4;
  flex: 1;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-top: 48px;
}

.blog-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  /* Blog post header */
  .post-header {
    padding: 48px 0 36px;
  }

  .post-section h2 {
    font-size: 19px;
  }

  /* Chore examples */
  .chore-examples {
    grid-template-columns: 1fr;
  }

  /* Image placeholder */
  .post-image-placeholder {
    aspect-ratio: 4 / 3;
  }

  /* Blog index header */
  .blog-header {
    padding: 48px 0 36px;
  }

  /* Blog index cards */
  .blog-cards {
    grid-template-columns: 1fr;
  }

  .blog-post-card {
    padding: 22px 20px 18px;
  }

  .blog-post-title {
    font-size: 16px;
  }
}