/*
Theme Name: Mrs. Welsh
Theme URI: https://mrswelsh.com
Author: Mrs. Welsh
Description: A warm, editorial WordPress theme for a personal essay-driven blog. Cormorant Garamond + Lora type pairing, deep red brand accent, ad-zone hooks, and paid-subscription plugin friendly.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, editorial, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready, two-columns
Text Domain: mrs-welsh
*/

/* =========================================================
   TOKENS
   ========================================================= */
:root {
  --mw-red:       #ca122a;
  --mw-red-deep:  #a00c20;
  --mw-red-soft:  #e0364c;
  --mw-bg:        #fbf7f7;
  --mw-bg-elev:   #f3eded;
  --mw-bg-card:   #ffffff;
  --mw-ink:       #1c1614;
  --mw-ink-soft:  #4a3f3a;
  --mw-ink-mute: #7a6f68;
  --mw-rule:      #e6dcdc;
  --mw-gold:      #b88a2c;
  --mw-cream:     #fbf7f7;
  --mw-shadow:    0 1px 0 rgba(28,22,20,.04), 0 8px 24px -16px rgba(28,22,20,.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Lora', Georgia, serif;
  background: var(--mw-bg);
  color: var(--mw-ink);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--mw-red); text-underline-offset: 3px; }
a:hover { color: var(--mw-red-deep); }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================================
   MASTHEAD
   ========================================================= */
.site-header {
  background: var(--mw-red);
  color: #fbf7f7;
  position: relative;
}
.site-header::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
}
.masthead-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 22px 32px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.site-brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit;
}
.site-brand .logo-img { height: 80px; width: auto; display: block; margin-left: -8px; }
.site-brand .brand-text {
  display: flex; flex-direction: column;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,.18);
  align-self: center;
  font-family: 'Cormorant Garamond', serif;
}
.site-brand .brand-text .title {
  font-size: 22px; font-style: italic; font-weight: 600;
}
.site-brand .brand-text .sub {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  font-family: 'Inter', sans-serif; font-weight: 500;
  color: rgba(251,247,247,.7);
  margin-top: 4px;
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-subscribe {
  background: var(--mw-cream); color: var(--mw-red);
  text-decoration: none;
  border: 0; height: 36px; padding: 0 18px; border-radius: 999px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase;
  display: inline-flex; align-items: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-subscribe:hover {
  transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgba(0,0,0,.4);
  color: var(--mw-red);
}

/* nav */
.site-nav {
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.06);
}
.site-nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 32px;
  display: flex; gap: 28px; align-items: center;
  overflow-x: auto;
}
.site-nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 28px;
}
.site-nav a {
  display: inline-block; padding: 14px 0;
  color: rgba(251,247,247,.78);
  text-decoration: none;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  position: relative;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav .current-menu-item > a {
  color: #fff;
}
.site-nav .current-menu-item > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--mw-gold);
}

/* search */
.search-bar {
  max-width: 1180px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; justify-content: flex-end;
}
.search-bar input[type="search"] {
  background: var(--mw-bg-card);
  border: 1px solid var(--mw-rule);
  border-radius: 999px;
  padding: 9px 16px 9px 38px;
  font-family: 'Inter', sans-serif; font-size: 13px;
  width: 260px; max-width: 100%;
  color: var(--mw-ink);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%237a6f68' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-bar input[type="search"]:focus {
  outline: none; border-color: var(--mw-red);
  box-shadow: 0 0 0 3px rgba(202,18,42,.12);
}

/* =========================================================
   LAYOUT
   ========================================================= */
.site-main { max-width: 1180px; margin: 0 auto; padding: 40px 32px 80px; }
.site-main.narrow { max-width: 760px; }

.eyebrow {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--mw-red);
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--mw-rule);
  padding-bottom: 12px; margin-bottom: 28px;
}
.section-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 600; font-style: italic;
  margin: 0;
}
.section-head .meta {
  font-family: 'Inter', sans-serif; font-size: 12px; color: var(--mw-ink-mute);
  letter-spacing: .06em;
}

/* =========================================================
   FEATURED
   ========================================================= */
.featured {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px;
  align-items: center;
  padding: 40px 0 56px;
  border-bottom: 1px solid var(--mw-rule);
  margin-bottom: 40px;
}
.featured-art {
  aspect-ratio: 5/4;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.08), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, var(--mw-red-deep), var(--mw-red));
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 28px;
  text-align: center;
  padding: 32px;
  line-height: 1.2;
  text-decoration: none;
}
.featured-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.featured-art::before {
  content: ""; position: absolute; inset: 18px;
  border: 1px solid rgba(255,255,255,.18); z-index: 1;
}
.featured h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 5vw, 58px); font-weight: 600;
  line-height: 1.04; margin: 14px 0 16px;
  letter-spacing: -0.01em;
}
.featured h1 a { color: inherit; text-decoration: none; }
.featured h1 a:hover { color: var(--mw-red); }
.featured .dek {
  font-family: 'Lora', serif;
  font-size: 18px; color: var(--mw-ink-soft);
  font-style: italic;
  margin: 0 0 22px; max-width: 56ch;
}
.byline {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Inter', sans-serif; font-size: 13px; color: var(--mw-ink-mute);
}
.avatar {
  height: 36px; width: 36px; border-radius: 999px;
  background: var(--mw-red); color: #fbf7f7;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-weight: 600; font-style: italic;
  font-size: 16px; flex-shrink: 0;
}
.byline .dot { color: var(--mw-rule); }
.byline strong { color: var(--mw-ink); font-weight: 600; }

.read-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 28px;
  background: var(--mw-ink); color: var(--mw-bg);
  text-decoration: none;
  padding: 12px 22px; border-radius: 2px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
  transition: transform .15s ease;
}
.read-btn:hover { transform: translateX(2px); color: var(--mw-bg); }

/* =========================================================
   POST LIST / CARDS
   ========================================================= */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 32px;
}
.post-card { display: flex; flex-direction: column; gap: 14px; }
.post-card .thumb {
  aspect-ratio: 4/3; border-radius: 3px;
  background: linear-gradient(160deg, var(--mw-red-deep), var(--mw-red));
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 18px; text-align: center; padding: 18px;
  line-height: 1.15;
  text-decoration: none;
}
.post-card .thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.post-card .thumb::before {
  content: ""; position: absolute; inset: 12px;
  border: 1px solid rgba(255,255,255,.18); z-index: 1;
}
.post-card .cat {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--mw-red);
  text-decoration: none;
}
.post-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 600;
  line-height: 1.15; margin: 0;
  letter-spacing: -.005em;
}
.post-card h3 a { color: inherit; text-decoration: none; transition: color .15s ease; }
.post-card h3 a:hover { color: var(--mw-red); }
.post-card .excerpt {
  font-family: 'Lora', serif;
  font-size: 15px; color: var(--mw-ink-soft);
  margin: 0; line-height: 1.55;
}
.post-card .meta {
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: var(--mw-ink-mute);
  display: flex; gap: 10px; align-items: center;
  margin-top: 2px;
}

/* =========================================================
   SINGLE POST
   ========================================================= */
.post-hero {
  text-align: center;
  padding: 24px 0 36px;
  border-bottom: 1px solid var(--mw-rule);
  margin-bottom: 40px;
}
.post-hero .cat-tag {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--mw-red);
  margin-bottom: 18px;
  display: inline-block;
  text-decoration: none;
}
.post-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 600; font-style: italic;
  line-height: 1.02;
  margin: 0 0 18px;
  letter-spacing: -.01em;
}
.post-hero .dek {
  font-family: 'Lora', serif;
  font-size: 20px; color: var(--mw-ink-soft);
  max-width: 56ch; margin: 0 auto 28px;
}
.post-byline {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-family: 'Inter', sans-serif; font-size: 13px; color: var(--mw-ink-mute);
}

.post-cover {
  height: 360px; border-radius: 4px;
  margin-bottom: 44px;
  background: linear-gradient(160deg, var(--mw-red-deep), var(--mw-red));
  position: relative; overflow: hidden;
}
.post-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

.entry-content {
  font-family: 'Lora', serif;
  font-size: 19px;
  line-height: 1.75;
  color: var(--mw-ink-soft);
  max-width: 680px; margin: 0 auto;
}
.entry-content p { margin: 0 0 24px; }
.entry-content > p:first-of-type::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 72px; line-height: .85; font-weight: 600;
  color: var(--mw-red);
  float: left; padding: 6px 12px 0 0;
}
.entry-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px; font-weight: 600;
  color: var(--mw-ink);
  margin: 44px 0 16px; line-height: 1.2;
}
.entry-content blockquote {
  margin: 32px 0; padding: 6px 0 6px 24px;
  border-left: 3px solid var(--mw-red);
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 24px; color: var(--mw-ink); line-height: 1.4;
}
.entry-content a {
  color: var(--mw-red);
  text-decoration: underline; text-underline-offset: 3px;
}

/* =========================================================
   AD ZONES
   ========================================================= */
.ad-zone {
  max-width: 680px; margin: 32px auto;
  background: var(--mw-bg-elev);
  border: 1px solid var(--mw-rule);
  border-radius: 4px;
  padding: 24px;
  text-align: center;
  position: relative;
}
.ad-zone::before {
  content: "Advertisement";
  position: absolute; top: 6px; left: 12px;
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--mw-ink-mute); opacity: .7;
}
.ad-zone:empty {
  display: none;  /* hide if no ad code pasted */
}

/* =========================================================
   COMMENTS
   ========================================================= */
.comments-area {
  max-width: 680px; margin: 56px auto 0;
}
.comments-area h2.comments-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 600; font-style: italic;
  margin: 0 0 20px;
}
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-body {
  padding: 22px 0;
  border-bottom: 1px solid var(--mw-rule);
}
.comment-author cite {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--mw-ink); font-style: normal;
}
.comment-meta a {
  font-family: 'Inter', sans-serif; font-size: 12px; color: var(--mw-ink-mute);
  text-decoration: none;
}
.comment-content {
  font-family: 'Lora', serif; font-size: 16px;
  color: var(--mw-ink-soft); margin-top: 8px; line-height: 1.6;
}

#respond {
  background: var(--mw-bg-card); border: 1px solid var(--mw-rule);
  border-radius: 4px; padding: 20px; margin-top: 28px;
}
#respond h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-style: italic; font-weight: 600;
  margin: 0 0 14px;
}
#respond textarea, #respond input[type="text"], #respond input[type="email"], #respond input[type="url"] {
  width: 100%;
  font-family: 'Lora', serif; font-size: 16px;
  border: 1px solid var(--mw-rule);
  padding: 10px 14px;
  background: var(--mw-bg);
  border-radius: 3px;
  margin-bottom: 12px;
  color: var(--mw-ink);
}
#respond textarea:focus, #respond input:focus {
  outline: none; border-color: var(--mw-red);
  box-shadow: 0 0 0 3px rgba(202,18,42,.12);
}
#respond .submit, .btn-primary {
  background: var(--mw-red); color: var(--mw-cream);
  border: 0; padding: 10px 20px; border-radius: 2px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase;
  transition: background .15s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
#respond .submit:hover, .btn-primary:hover { background: var(--mw-red-deep); }

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
  display: flex; gap: 8px; justify-content: center;
  margin: 48px 0 0;
}
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border: 1px solid var(--mw-rule);
  border-radius: 2px;
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: var(--mw-ink-soft);
  text-decoration: none;
  transition: all .15s ease;
}
.pagination .page-numbers:hover { border-color: var(--mw-ink); color: var(--mw-ink); }
.pagination .page-numbers.current {
  background: var(--mw-red); border-color: var(--mw-red); color: var(--mw-cream);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--mw-bg-elev);
  border-top: 1px solid var(--mw-rule);
  margin-top: 80px;
  padding: 48px 0 36px;
}
.site-footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
}
.site-footer h5 {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--mw-ink-mute); margin: 0 0 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a {
  font-family: 'Lora', serif; font-size: 16px;
  color: var(--mw-ink-soft); text-decoration: none;
}
.site-footer ul a:hover { color: var(--mw-red); }
.site-footer .brand-mini {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; font-style: italic; font-weight: 600;
  color: var(--mw-ink);
}
.site-footer .brand-mini-sub {
  font-family: 'Inter', sans-serif; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--mw-ink-mute); margin-top: 4px;
}
.site-footer .about-line {
  font-family: 'Lora', serif; font-size: 15px;
  color: var(--mw-ink-soft); font-style: italic;
  margin: 18px 0 0; max-width: 36ch;
}
.site-footer-bottom {
  max-width: 1180px; margin: 36px auto 0; padding: 18px 32px 0;
  border-top: 1px solid var(--mw-rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: var(--mw-ink-mute);
}

/* =========================================================
   WP BLOCK COMPAT (Gutenberg)
   ========================================================= */
.wp-block-image { margin: 32px 0; }
.wp-block-image img { border-radius: 3px; }
.wp-block-pullquote {
  border-top: 2px solid var(--mw-red);
  border-bottom: 2px solid var(--mw-red);
  padding: 24px 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 26px;
  text-align: center;
  color: var(--mw-ink);
}
.wp-block-quote {
  border-left: 3px solid var(--mw-red);
  padding-left: 24px;
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 22px;
}

/* =========================================================
   WIDGETS
   ========================================================= */
.widget { margin-bottom: 32px; }
.widget-title {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--mw-ink-mute); margin: 0 0 14px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; gap: 28px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .masthead-inner { padding: 16px 20px; flex-wrap: wrap; }
  .site-brand .logo-img { height: 56px; }
  .site-brand .brand-text .title { font-size: 18px; }
  .site-brand .brand-text .sub { font-size: 10px; }
  .btn-subscribe { padding: 0 12px; font-size: 11px; }
  .site-nav-inner { padding: 0 20px; gap: 18px; }
  .site-main { padding: 28px 20px 60px; }
  .post-grid { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .featured h1 { font-size: 36px; }
  .post-hero h1 { font-size: 38px; }
  .search-bar { padding: 12px 20px; }
  .search-bar input[type="search"] { width: 100%; }
}
