/*
Theme Name: Paillette
Theme URI: https://www.paillettemagazine.com/
Author: Charlotte Hardie-Watts
Author URI: https://www.paillettemagazine.com/about/
Description: Hand-coded editorial magazine theme for Paillette Magazine. Lightweight, semantic, optimised for search engines and AI answer engines. No page builder required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: paillette
Tags: blog, news, one-column, custom-logo, featured-images
*/

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/PlayfairDisplay.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/PlayfairDisplay-italic.woff2') format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('assets/fonts/OpenSans.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('assets/fonts/OpenSans-italic.woff2') format('woff2');
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --plum: #281631;
  --plum-soft: #3f3245;
  --pink: #c77991;
  --rose: #ee9cb8;
  --pink-soft: #dea5b6;
  --pink-pale: #ebdce0;
  --blush: #f7f3f3;
  --white: #ffffff;
  --grey: #7a7a7a;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --maxw: 1180px;
  --content: 760px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--plum);
  background: var(--blush);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink); text-decoration: none; transition: color .15s ease; }
a:hover, a:focus { color: var(--plum); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--plum);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
p { margin: 0 0 1.4em; }
::selection { background: var(--pink-soft); color: var(--plum); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--plum); color: #fff; padding: .6em 1em; z-index: 999;
}
.skip-link:focus { left: 0; color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--pink-pale); }
.header-top { display: flex; justify-content: flex-end; max-width: var(--maxw); margin: 0 auto; padding: .7rem 1.25rem 0; }
.header-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
.header-social a { color: var(--plum); display: block; padding: .2rem; transition: color .15s ease, transform .15s ease; }
.header-social a:hover, .header-social a:focus { color: var(--rose); transform: scale(1.15); }
.site-header .wrap { display: flex; flex-direction: column; align-items: center; padding-top: .4rem; }
.site-logo img { width: 200px; height: auto; }
.site-logo { display: block; }
.site-tagline {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--pink); margin: .6rem 0 0;
}
.site-nav { width: 100%; }
.site-nav ul {
  list-style: none; margin: 1rem 0 0; padding: .8rem 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 2rem;
  border-top: 1px solid var(--pink-pale);
}
.site-nav a {
  font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--plum); padding: .2em 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav .current-menu-item a, .site-nav .current_page_item a {
  color: var(--pink); border-bottom-color: var(--pink);
}

/* ---------- Hero (front page) ---------- */
.hero { background: var(--white); text-align: center; padding: 4rem 1.25rem 4.5rem; }
.hero h1 { margin-bottom: .4em; }
.hero .lede { max-width: 640px; margin: 0 auto; font-size: 1.15rem; color: var(--plum-soft); }
.hero .eyebrow {
  font-size: .78rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--pink); margin-bottom: 1.2rem; font-weight: 600;
}
.btn {
  display: inline-block; background: var(--plum); color: #fff !important;
  font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: .9em 2.2em; border-radius: 999px; margin-top: 1.6rem;
}
.btn:hover { background: var(--pink); }
.btn--ghost { background: transparent; color: var(--plum) !important; border: 1.5px solid var(--plum); }
.btn--ghost:hover { background: var(--plum); color: #fff !important; }

/* ---------- Home collage banner ---------- */
.home-banner { background: var(--white); padding: 0 0 3.5rem; }
.home-banner img { display: block; width: min(1240px, 96vw); margin: 0 auto; border-radius: 8px; }

/* ---------- Article cards ---------- */
.section-head { display: flex; align-items: baseline; justify-content: center; margin: 3.5rem 0 1.8rem; }
.section-head h2 { margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem; padding: 0; margin: 0 0 4rem; list-style: none; }
@media (max-width: 880px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--white); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; text-align: center;
  box-shadow: 0 1px 3px rgba(40, 22, 49, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(40, 22, 49, .12); }
.card-thumb { overflow: hidden; display: block; position: relative; margin: 1.1rem 1.1rem 0; border-radius: 6px; }
.card-thumb img { width: 100%; height: auto; display: block; }
.card-pill {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  background: var(--rose); color: #fff; border-radius: 999px; padding: .35em 1.1em;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.card-pill a { color: #fff; }
.card-pill a:hover { color: var(--plum); }
.card-body { padding: 1.6rem 1.6rem 2rem; display: flex; flex-direction: column; flex: 1; }
.card-body > .card-pill { position: static; align-self: center; margin-bottom: 1rem; }
.card h3 { font-size: 1.55rem; margin-bottom: .7rem; }
.card h3 a { color: var(--rose); }
.card h3 a:hover { color: var(--plum); }
.card p { font-size: .92rem; font-weight: 600; color: var(--grey); margin-bottom: 0; }

/* ---------- Single article ---------- */
.article-header { background: var(--white); text-align: center; padding: 3.5rem 1.25rem 2.8rem; }
.article-header .card-cat { margin-bottom: .9rem; }
.article-header h1 { max-width: 850px; margin-left: auto; margin-right: auto; }
.article-meta { font-size: .85rem; color: var(--grey); margin-top: 1rem; }
.article-meta a { color: var(--plum); font-weight: 600; }
.article-meta a:hover { color: var(--pink); }
.article-hero { max-width: 980px; margin: -1.6rem auto 0; padding: 0 1.25rem; }
.article-hero img { width: 100%; border-radius: 12px; box-shadow: 0 14px 40px rgba(40, 22, 49, .14); }
.article-body { max-width: var(--content); margin: 3rem auto 0; padding: 0 1.25rem; }
.article-body h2 { margin-top: 1.8em; }
.article-body img, .article-body figure { margin: 2rem auto; }
.article-body figure { max-width: 100%; }
.article-body .wp-block-image img { border-radius: 8px; }
.article-body blockquote:not(.instagram-media) {
  border-left: 3px solid var(--pink-soft); margin: 2rem 0; padding: .3rem 0 .3rem 1.4rem;
  font-family: var(--serif); font-size: 1.18rem; font-style: italic; color: var(--plum-soft);
}
.wp-block-embed { margin: 2rem auto; }
.wp-block-embed .wp-block-embed__wrapper { display: flex; justify-content: center; }
.wp-block-gallery { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 560px) { .wp-block-gallery { grid-template-columns: 1fr; } }
.wp-block-gallery .wp-block-image { margin: 0; }
.wp-block-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.article-tags { max-width: var(--content); margin: 2.5rem auto 0; padding: 0 1.25rem; }
.article-tags a {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  background: var(--pink-pale); color: var(--plum); border-radius: 999px;
  padding: .35em 1em; margin: 0 .4em .5em 0;
}
.article-tags a:hover { background: var(--pink-soft); }

/* ---------- Author box ---------- */
.author-box {
  max-width: var(--content); margin: 3rem auto; padding: 2rem;
  background: var(--white); border-radius: 12px; display: flex; gap: 1.5rem; align-items: flex-start;
}
.author-box img { border-radius: 50%; width: 84px; height: 84px; object-fit: cover; flex-shrink: 0; }
.author-box h2 { font-size: 1.25rem; margin-bottom: .3em; }
.author-box p { font-size: .95rem; margin-bottom: .8em; color: var(--plum-soft); }
.author-box .author-links a { font-weight: 600; font-size: .88rem; margin-right: 1.2em; }
@media (max-width: 560px) { .author-box { flex-direction: column; } }

/* ---------- Post navigation ---------- */
.post-nav {
  max-width: var(--content); margin: 0 auto 4rem; padding: 1.5rem 1.25rem 0;
  display: flex; justify-content: space-between; gap: 2rem;
  border-top: 1px solid var(--pink-pale); font-size: .92rem;
}
.post-nav span { display: block; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); margin-bottom: .3em; }
.post-nav .next { text-align: right; margin-left: auto; }
.post-nav a { color: var(--plum); font-family: var(--serif); font-size: 1.05rem; }
.post-nav a:hover { color: var(--pink); }

/* ---------- Archive ---------- */
.archive-header { background: var(--white); text-align: center; padding: 3rem 1.25rem; margin-bottom: 3rem; }
.archive-header h1 { margin-bottom: .2em; }
.archive-header p { max-width: 620px; margin: 0 auto; color: var(--plum-soft); }
.pagination { display: flex; justify-content: center; gap: .5rem; margin: 0 0 4rem; }
.pagination .page-numbers {
  padding: .45em 1em; border-radius: 8px; background: var(--white); color: var(--plum); font-weight: 600; font-size: .9rem;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--plum); color: #fff; }

/* ---------- Pages ---------- */
.page-body { max-width: var(--content); margin: 3rem auto 4rem; padding: 0 1.25rem; }
.page-body .wp-block-image img { border-radius: 10px; }

/* Front page bio gets a wider stage for the media-text layout */
.home .page-body, .page-body:has(.wp-block-media-text) { max-width: 1080px; }
.wp-block-media-text { display: grid; grid-template-columns: 1fr 42%; gap: 2.5rem; align-items: center; margin: 2rem 0; }
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { order: -1; }
.wp-block-media-text__media img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 10px 30px rgba(40, 22, 49, .12); }
@media (max-width: 760px) {
  .wp-block-media-text { grid-template-columns: 1fr; }
  .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { order: 0; }
}

/* ---------- Contact ---------- */
.contact-cta {
  max-width: 620px; margin: 3rem auto 4rem; padding: 3rem 2rem;
  background: var(--white); border-radius: 14px; text-align: center;
}
.contact-cta .email {
  font-family: var(--serif); font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 600; word-break: break-all;
}

/* ---------- Hire-me band ---------- */
.hire-band { background: var(--plum); color: #fff; text-align: center; padding: 3.5rem 1.25rem; margin-top: 4rem; }
.hire-band h2 { color: #fff; }
.hire-band p { max-width: 560px; margin: 0 auto 1.4rem; color: var(--pink-pale); }
.hire-band .btn { background: var(--pink); margin-top: 0; }
.hire-band .btn:hover { background: #fff; color: var(--plum) !important; }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--pink-soft); padding: 2.5rem 1.25rem; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand { text-align: left; }
.footer-brand img { width: 110px; height: auto; }
.footer-tagline { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--plum); margin: .4rem 0 0; }
.site-footer .colophon { font-size: .95rem; color: var(--plum-soft); margin: 0; text-align: center; flex: 1; }
.footer-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.2rem; }
.footer-social a { color: var(--plum); display: block; padding: .3rem; transition: color .15s ease, transform .15s ease; }
.footer-social a:hover, .footer-social a:focus { color: var(--rose); transform: scale(1.15); }
@media (max-width: 700px) {
  .footer-grid { flex-direction: column; text-align: center; }
  .footer-brand { text-align: center; }
}

/* ---------- Recent Posts (Instagram) section ---------- */
.page-body h2.insta-head, .insta-section h2 { text-align: center; }
.insta-section { padding: 1rem 1.25rem 0; }

/* ---------- 404 / search ---------- */
.error-page { text-align: center; padding: 5rem 1.25rem; }
.search-form { display: flex; gap: .6rem; max-width: 420px; margin: 1.5rem auto; }
.search-form input[type=search] {
  flex: 1; padding: .7em 1em; border: 1.5px solid var(--pink-pale); border-radius: 8px;
  font-family: var(--sans); font-size: .95rem; background: #fff;
}
.search-form input[type=search]:focus { outline: none; border-color: var(--pink); }
.search-form button {
  background: var(--plum); color: #fff; border: 0; border-radius: 8px;
  padding: .7em 1.4em; font-weight: 600; cursor: pointer;
}
.search-form button:hover { background: var(--pink); }

/* ---------- Utility ---------- */
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
