/*
Theme Name: CPF Blog
Theme URI: https://copyandpaste-fonts.com/blog/
Author: Copy and Paste Fonts
Author URI: https://copyandpaste-fonts.com/
Description: A custom WordPress theme for copyandpaste-fonts.com/blog/ - matches the main site's cream, coral and purple brand exactly. Install this theme in wp-content/themes/cpf-blog/ on a WordPress installation running at /blog/.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: cpf-blog
*/

/* ============================================================
   RESET & BASE  (matches main site style-v2.css)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: light only;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #ffffff;
  color: #2d1b3d;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #ff6f51; text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: #ffc94a; color: #2d1b3d; }

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   HEADER  - identical to main site
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 27, 61, .08);
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
  max-width: 1060px;
  margin: 0 auto;
  flex-wrap: nowrap;
  overflow: hidden;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.logo-mark {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  line-height: 1;
  color: #ff6f51;
  font-style: italic;
  font-weight: 900;
}

.logo-text {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  letter-spacing: -.01em;
  color: #2d1b3d;
  font-weight: 700;
}

.logo-text em { font-style: italic; color: #ff6f51; font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.site-nav a {
  color: #5b4a6e;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}

.site-nav a:hover { color: #2d1b3d; background: #ffe8e0; text-decoration: none; }
.site-nav a.current-menu-item { color: #2d1b3d; background: #ffe8e0; }

.site-nav a.nav-blog,
.site-nav a.nav-blog.current-menu-item {
  background: #ff6f51;
  color: #fff !important;
  border-radius: 999px;
  padding: 6px 16px !important;
  font-weight: 700 !important;
}

.site-nav a.nav-blog:hover { background: #e05a3f !important; color: #fff !important; }

/* ============================================================
   BLOG HERO / PAGE HERO
   ============================================================ */
.blog-hero {
  background: #fff;
  padding: 64px 0 56px;
  text-align: center;
  border-bottom: 1px solid rgba(45, 27, 61, .08);
}

.blog-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 900;
  color: #2d1b3d;
  margin: 0 0 14px;
  line-height: 1.1;
}

.blog-hero p {
  color: #5b4a6e;
  font-size: 17px;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   BLOG ARCHIVE (post grid)
   ============================================================ */
.blog-archive { padding: 48px 0 80px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.post-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(45, 27, 61, .1);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -20px rgba(107, 63, 160, .18);
}

.post-card a { color: inherit; text-decoration: none; }

.post-thumb {
  background: linear-gradient(135deg, #ffe8e0 0%, #f0e7ff 100%);
  height: 200px;
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumb-emoji {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, #ffe8e0 0%, #f0e7ff 100%);
}

.post-body { padding: 20px 22px 24px; }

.post-cat {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #ff6f51;
  margin: 0 0 8px;
}

.post-title {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 700;
  color: #2d1b3d;
  line-height: 1.3;
  margin: 0 0 10px;
}

.post-title a:hover { color: #ff6f51; }

.post-excerpt {
  font-size: 13.5px;
  color: #5b4a6e;
  line-height: 1.55;
  margin: 0 0 14px;
}

.post-meta { font-size: 12px; color: #9d8aae; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 56px 0 80px;
  align-items: start;
}

@media (max-width: 860px) {
  .single-post-layout { grid-template-columns: 1fr; }
  .post-sidebar { order: 2; }
}

/* Post header */
.post-header { margin-bottom: 36px; }

.post-header .post-cat {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #ff6f51;
  margin: 0 0 12px;
}

.post-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 900;
  color: #2d1b3d;
  line-height: 1.15;
  margin: 0 0 18px;
}

.post-header .post-meta-full {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #9d8aae;
  flex-wrap: wrap;
}

/* Featured image */
.post-featured-img {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 36px;
}

.post-featured-img img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

/* Post content typography */
.post-content {
  font-size: 16.5px;
  line-height: 1.8;
  color: #2d1b3d;
}

.post-content h2 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 700;
  color: #2d1b3d;
  margin: 40px 0 14px;
  line-height: 1.25;
}

.post-content h3 {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 700;
  color: #2d1b3d;
  margin: 28px 0 10px;
}

.post-content p { margin: 0 0 22px; }

.post-content ul,
.post-content ol {
  margin: 0 0 22px;
  padding-left: 24px;
}

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

.post-content blockquote {
  background: #fff;
  border-left: 4px solid #ff6f51;
  margin: 28px 0;
  padding: 18px 24px;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #5b4a6e;
}

.post-content a { color: #ff6f51; text-decoration: underline; }
.post-content a:hover { color: #2d1b3d; }

.post-content img {
  border-radius: 12px;
  margin: 24px 0;
}

.post-content code {
  background: #f0e7ff;
  color: #6b3fa0;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .9em;
  font-family: 'Courier New', monospace;
}

.post-content pre {
  background: #2d1b3d;
  color: #ffffff;
  padding: 20px 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
}

.post-content pre code { background: none; color: inherit; padding: 0; }

/* Try the generator CTA box inside posts */
.generator-cta-box {
  background: linear-gradient(135deg, #ffe8e0 0%, #f0e7ff 100%);
  border-radius: 16px;
  padding: 28px 28px 24px;
  text-align: center;
  margin: 36px 0;
  border: 1px solid rgba(107, 63, 160, .15);
}

.generator-cta-box .cta-emoji { font-size: 36px; margin-bottom: 10px; }

.generator-cta-box h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 900;
  color: #2d1b3d;
  margin: 0 0 8px;
}

.generator-cta-box p {
  font-size: 14.5px;
  color: #5b4a6e;
  margin: 0 0 18px;
  line-height: 1.55;
}

.generator-cta-box a {
  display: inline-block;
  background: #ff6f51;
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  transition: background .2s;
}

.generator-cta-box a:hover { background: #e05a3f; }

/* Tags */
.post-tags { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px; }

.post-tags a {
  background: #f0e7ff;
  color: #6b3fa0;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .18s;
}

.post-tags a:hover { background: #e0ccff; }

/* Author box */
.author-box {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(45, 27, 61, .1);
  padding: 24px;
  margin-top: 44px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6f51, #6b3fa0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.author-info h4 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  color: #2d1b3d;
  margin: 0 0 6px;
}

.author-info p { font-size: 13.5px; color: #5b4a6e; line-height: 1.55; margin: 0; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.post-sidebar { position: sticky; top: 90px; }

.sidebar-widget {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(45, 27, 61, .1);
  padding: 22px 22px 20px;
  margin-bottom: 24px;
}

.sidebar-widget h3 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  color: #2d1b3d;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(45, 27, 61, .08);
}

.sidebar-widget ul { list-style: none; }

.sidebar-widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(45, 27, 61, .06);
  font-size: 14px;
}

.sidebar-widget ul li:last-child { border-bottom: none; padding-bottom: 0; }

.sidebar-widget ul li a { color: #2d1b3d; text-decoration: none; font-weight: 500; }
.sidebar-widget ul li a:hover { color: #ff6f51; }

.sidebar-generator-cta {
  background: linear-gradient(135deg, #2d1b3d 0%, #6b3fa0 100%);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  color: #ffffff;
}

.sidebar-generator-cta .emoji { font-size: 32px; margin-bottom: 10px; }
.sidebar-generator-cta h3 { color: #fff; margin: 0 0 10px; border: none; font-size: 17px; }
.sidebar-generator-cta p { font-size: 13.5px; color: rgba(255, 255, 255, .75); margin: 0 0 18px; }

.sidebar-generator-cta a {
  display: inline-block;
  background: #ff6f51;
  color: #fff !important;
  padding: 11px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  transition: background .2s;
}

.sidebar-generator-cta a:hover { background: #ffc94a; color: #2d1b3d !important; }

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts { padding: 56px 0; border-top: 1px solid rgba(45, 27, 61, .08); }

.related-posts h2 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 900;
  color: #2d1b3d;
  margin: 0 0 28px;
  text-align: center;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 60px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid rgba(45, 27, 61, .15);
  color: #5b4a6e;
  text-decoration: none;
  transition: all .15s;
}

.pagination a:hover { background: #ffe8e0; border-color: #ff6f51; color: #ff6f51; }
.pagination span.current { background: #ff6f51; border-color: #ff6f51; color: #fff; }
.pagination .dots { border: none; color: #9d8aae; }

/* ============================================================
   FOOTER  - matches main site exactly
   ============================================================ */
.site-footer {
  background: #2d1b3d;
  color: #ffffff;
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  margin-top: 40px;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 Q 50 0, 100 15 T 200 15 T 300 15 T 400 15 T 500 15 T 600 15 T 700 15 T 800 15 T 900 15 T 1000 15 T 1100 15 T 1200 15 L 1200 30 Z' fill='%232d1b3d'/%3E%3C/svg%3E") top/100% 100% no-repeat;
  transform: translateY(-29px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px 40px;
  text-align: left;
  max-width: 900px;
  margin: 0 auto 32px;
}

@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.footer-col h4 {
  font-family: 'Fraunces', serif;
  font-size: 15px; font-weight: 700;
  color: #ffc94a; margin: 0 0 12px;
  letter-spacing: .01em;
}

.footer-col a {
  display: block; color: rgba(255, 255, 255, .7);
  text-decoration: none; font-size: 13.5px;
  line-height: 1; margin-bottom: 10px;
  transition: color .15s;
}

.footer-col a:hover { color: #fff; }

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin: 28px auto 24px;
  max-width: 900px;
}

.foot-brand {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 900;
  margin: 0 0 10px;
  display: flex; align-items: center;
  justify-content: center; gap: 10px;
}

.foot-mark {
  font-style: italic; color: #ffc94a;
  font-size: 36px; line-height: 1;
  transform: rotate(-6deg); display: inline-block;
}

.foot-tag {
  max-width: 520px; margin: 0 auto 22px;
  color: rgba(255, 255, 255, .7);
  font-size: 14.5px; line-height: 1.6;
}

.foot-meta { color: rgba(255, 255, 255, .5); font-size: 13px; margin: 0; }
.foot-meta a { color: rgba(255, 255, 255, .5); }
.foot-meta a:hover { color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .site-nav { gap: 2px; }
  .site-nav a { padding: 6px 9px; font-size: 12.5px; }
  .posts-grid { grid-template-columns: 1fr; }
  .single-post-layout { grid-template-columns: 1fr; }
}
