/* =============================================================================
   Art Price Lab Ghost Theme — screen.css
   Matches artpricelab.com: teal + cream palette, Playfair Display + DM Sans
   ============================================================================= */

/* --- Variables --- */
:root {
  --color-bg: #FAF7F2;
  --color-surface: #F2EDE6;
  --color-border: #E0D8CE;
  --color-text: #2D3332;
  --color-text-muted: #6B7675;
  --color-primary: #1D6A6A;
  --color-primary-dark: #155050;
  --color-primary-light: #2A8E8E;
  --color-accent: #C4793A;
  --color-accent-dark: #A8612A;
  --color-white: #FFFFFF;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --radius: 0.75rem;
  --shadow-soft: 0 2px 8px -2px rgba(29,106,106,0.08), 0 4px 16px -4px rgba(29,106,106,0.06);
  --shadow-medium: 0 4px 12px -2px rgba(29,106,106,0.12), 0 8px 24px -4px rgba(29,106,106,0.08);
  --max-width: 1200px;
  --narrow-width: 720px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--color-text);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* --- Layout --- */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--narrow-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  gap: 1rem;
}

.site-header-logo { display: flex; align-items: center; gap: 0.75rem; }

.site-logo {
  height: 2rem;
  width: auto;
  filter: brightness(0) invert(1);
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.site-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-list .nav-item a,
.nav-list li a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem;
  transition: color 0.15s, background 0.15s;
}

.nav-list .nav-item a:hover,
.nav-list li a:hover { color: #fff; background: rgba(255,255,255,0.12); }

.nav-cta {
  background: var(--color-accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0.4rem 1rem !important;
}

.nav-cta:hover { background: var(--color-accent-dark) !important; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s;
}

.mobile-nav {
  display: none;
  background: var(--color-primary-dark);
  padding: 0.5rem 1.5rem 1rem;
}

.mobile-nav-list { list-style: none; }
.mobile-nav-list li a {
  display: block;
  color: rgba(255,255,255,0.85);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.625rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-nav.is-open { display: block; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}
.btn-accent:hover { background: var(--color-accent-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* --- Blog Hero --- */
.blog-hero {
  background: linear-gradient(135deg, #155050 0%, #1D6A6A 60%, #2A8E8E 100%);
  padding: 4rem 0;
  text-align: center;
}

.blog-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.75rem;
}

.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.blog-hero-sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.75);
  max-width: 540px;
  margin: 0 auto;
}

/* --- Post Feed --- */
.post-feed-section { padding: 3.5rem 0; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

/* --- Post Cards --- */
.post-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.post-card-image-link { display: block; overflow: hidden; aspect-ratio: 16/9; }
.post-card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-card-image { transform: scale(1.03); }

.post-card-content { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }

.post-card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
}

.post-card-title a { color: var(--color-text); }
.post-card-title a:hover { color: var(--color-primary); }

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

/* --- Featured Post --- */
.featured-post-wrap { margin-bottom: 2.5rem; }

.featured-post-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--color-border);
}

.featured-post-image { overflow: hidden; }
.featured-post-image img { width: 100%; height: 100%; object-fit: cover; }

.featured-post-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.featured-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(196,121,58,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  width: fit-content;
}

.featured-post-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}
.featured-post-title a { color: var(--color-text); }
.featured-post-title a:hover { color: var(--color-primary); }

.featured-post-excerpt { color: var(--color-text-muted); font-size: 0.9375rem; }

.post-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.pagination a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-white);
  transition: background 0.15s;
}

.pagination a:hover { background: var(--color-surface); }
.pagination .page-number { color: var(--color-text-muted); font-size: 0.875rem; }

/* --- Blog CTA Strip --- */
.blog-cta-strip {
  background: var(--color-primary);
  padding: 2.5rem 0;
  text-align: center;
}

.blog-cta-strip .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-strip-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

/* --- Post Full (Article) --- */
.post-full-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.post-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.post-full-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.875rem;
}

.post-full-excerpt {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.post-full-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.author-info { display: flex; align-items: center; gap: 0.5rem; }

.author-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.author-name { font-size: 0.875rem; font-weight: 600; }
.post-date, .read-time { font-size: 0.8125rem; color: var(--color-text-muted); }

/* --- Post Feature Image --- */
.post-full-image {
  margin: 0 0 2.5rem;
  max-height: 500px;
  overflow: hidden;
}

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

.post-full-image figcaption {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  padding: 0 1rem;
}

/* --- Post Content --- */
.post-full-content { padding-bottom: 3rem; }

.gh-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.gh-content h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  margin: 2.5rem 0 0.875rem;
  color: var(--color-text);
}

.gh-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.gh-content p { margin-bottom: 1.5rem; }

.gh-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gh-content a:hover { color: var(--color-primary-dark); }

.gh-content ul, .gh-content ol {
  margin: 0 0 1.5rem 1.5rem;
}

.gh-content li { margin-bottom: 0.375rem; }

.gh-content blockquote {
  border-left: 4px solid var(--color-primary);
  margin: 2rem 0;
  padding: 0.75rem 1.5rem;
  background: rgba(29,106,106,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.gh-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-soft);
}

.gh-content pre {
  background: #1e2a2a;
  color: #e2f0f0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.gh-content code {
  background: rgba(29,106,106,0.08);
  color: var(--color-primary-dark);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

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

.gh-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* Ghost specific */
.kg-width-wide { margin: 1.5rem -2rem; }
.kg-width-full { margin: 1.5rem calc(50% - 50vw); }
.kg-card { margin: 1.5rem 0; }
.kg-image-card img { border-radius: var(--radius); }
.kg-gallery-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kg-gallery-row { display: flex; gap: 0.5rem; flex: 1; }
.kg-gallery-image img { border-radius: calc(var(--radius) / 2); }
.kg-bookmark-card { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.kg-bookmark-container { display: flex; text-decoration: none; color: inherit; }
.kg-bookmark-content { padding: 1rem; flex: 1; }
.kg-bookmark-title { font-weight: 600; margin-bottom: 0.25rem; }
.kg-bookmark-description { font-size: 0.875rem; color: var(--color-text-muted); }
.kg-bookmark-thumbnail { width: 120px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { height: 100%; object-fit: cover; }

/* --- Post Footer --- */
.post-full-footer { padding: 2rem 0 3rem; }

.post-tag-pill {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-primary);
  background: rgba(29,106,106,0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin: 0 0.375rem 0.5rem 0;
}

.post-cta-box {
  margin-top: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, #155050, #1D6A6A);
  border-radius: var(--radius);
  text-align: center;
}

.post-cta-box h3 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
}

.post-cta-box p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

/* --- Subscribe Section --- */
.post-subscribe {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0;
  text-align: center;
}

.post-subscribe h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-subscribe p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.subscribe-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  background: var(--color-white);
  color: var(--color-text);
  outline: none;
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29,106,106,0.12);
}

/* --- Tag Header --- */
.tag-header {
  background: var(--color-surface);
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
}

.tag-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  text-transform: capitalize;
}

.tag-description { color: var(--color-text-muted); margin-top: 0.5rem; }
.tag-count { font-size: 0.875rem; color: var(--color-text-muted); margin-top: 0.375rem; }

/* --- Error Page --- */
.error-page {
  padding: 6rem 0;
  text-align: center;
}

.error-code {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* --- Footer --- */
.site-footer {
  background: #0F3535;
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-logo {
  height: 1.75rem;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: #fff;
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.25rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
}

.footer-nav a {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

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

.footer-copyright {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .mobile-menu-toggle { display: flex; }

  .featured-post-card { grid-template-columns: 1fr; }
  .featured-post-image { max-height: 240px; }

  .kg-width-wide { margin: 1.5rem -1rem; }
  .kg-width-full { margin: 1.5rem -1.5rem; }

  .blog-hero { padding: 2.5rem 0; }
  .post-full-header { padding: 2rem 0 1.5rem; }
}

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

  .subscribe-form { flex-direction: column; align-items: stretch; }
  .subscribe-form input[type="email"] { min-width: unset; }
}
