/*
Theme Name:   Chopsticks Studio
Theme URI:    https://chopsticks.studio
Author:       Chopsticks Studio
Author URI:   https://chopsticks.studio
Description:  Custom blog theme for Chopsticks Studio — transdisciplinary art, photography, 3D and live audiovisual performance. Matches the design system of the flat site (teal nav, purple footer, Mr Dafoe + Elms Sans).
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:  chopsticks
Tags:         blog, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   DESIGN TOKENS — single source of truth (consolidated per header/footer TODO)
   ========================================================================== */
:root {
  --bg:          #FF999A;                 /* coral — mobile overlay          */
  --teal:        #5399a5;                 /* nav + body text                 */
  --purple:      #675b91;                 /* footer + accents                */
  --white:       #FFFFFF;
  --white60:     rgba(255,255,255,0.6);
  --white30:     rgba(255,255,255,0.3);
  --hero-shadow: drop-shadow(0px 4px 12px rgba(180,60,62,0.4))
                 drop-shadow(0px 2px 4px rgba(0,0,0,0.15));
  --font-display: 'Mr Dafoe', cursive;
  --font-body:    'Elms Sans', Helvetica, sans-serif;
  --content-width: 720px;
  --wide-width:    1080px;
}

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--white);
  color: var(--teal);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 2px;
}

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto; clip-path: none; height: auto; width: auto;
  left: 8px; top: 8px; z-index: 100000;
  background: var(--white); color: var(--teal);
  padding: 12px 20px; font-size: 0.85rem; letter-spacing: 0.08em;
}

/* ==========================================================================
   LAYOUT — fixed nav on top, fixed footer reveal at bottom
   ========================================================================== */
.site-main {
  min-height: 70vh;
  padding-top: clamp(6.5rem, 12vw, 8.5rem);   /* clears the fixed nav + divider */
  padding-bottom: clamp(4rem, 8vw, 7rem);
}
.wrap        { width: min(var(--wide-width), 92vw); margin-inline: auto; }
.wrap-narrow { width: min(var(--content-width), 92vw); margin-inline: auto; }

/* ==========================================================================
   PAGE / SECTION HEADINGS — mirrors sec-label / sec-title on the flat site
   ========================================================================== */
.page-eyebrow {
  font-weight: 300; font-size: 0.72rem;
  letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--purple); opacity: 0.75;
  margin-bottom: 0.9rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 400; line-height: 1.05;
  color: var(--teal);
  filter: drop-shadow(0px 2px 6px rgba(83,153,165,0.25));
  margin-bottom: clamp(2rem, 5vw, 3.2rem);
}

/* ==========================================================================
   BLOG — latest post hero + card grid
   ========================================================================== */
.post-hero {
  display: grid; gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
@media (min-width: 860px) {
  .post-hero { grid-template-columns: 1.25fr 1fr; align-items: center; }
}
.post-hero-media { display: block; line-height: 0; }
.post-hero-media img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 10px;
  filter: drop-shadow(0px 6px 18px rgba(103,91,145,0.28));
}
.post-hero .card-title { font-size: clamp(1.7rem, 4vw, 2.4rem); }

.latest-flag {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--white); background: var(--purple);
  padding: 0.45em 1.1em 0.4em; border-radius: 999px;
  margin-bottom: 1rem;
}

.post-grid {
  display: grid; gap: clamp(1.6rem, 3.5vw, 2.6rem);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.post-card { display: flex; flex-direction: column; }
.post-card-media { display: block; line-height: 0; margin-bottom: 1.1rem; }
.post-card-media img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 8px;
  filter: drop-shadow(0px 4px 12px rgba(103,91,145,0.22));
  transition: transform 0.4s cubic-bezier(.16,1,.3,1), opacity 0.25s;
}
.post-card-media:hover img { transform: translateY(-3px); opacity: 0.92; }

.card-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--purple); opacity: 0.8;
  margin-bottom: 0.55rem;
}
.card-meta a { text-decoration: none; }
.card-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }

.card-title {
  font-weight: 700; font-size: 1.25rem; line-height: 1.3;
  letter-spacing: 0.01em; margin-bottom: 0.6rem;
}
.card-title a { color: var(--teal); text-decoration: none; transition: opacity 0.2s; }
.card-title a:hover { opacity: 0.75; }

.card-excerpt {
  font-size: 0.95rem; line-height: 1.8; letter-spacing: 0.02em;
  color: var(--teal);
}

.card-more {
  margin-top: 0.8rem;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--purple); text-decoration: none;
  transition: opacity 0.2s;
}
.card-more:hover { opacity: 0.7; }

/* ==========================================================================
   SINGLE POST / PAGE — entry content, mirrors .about-body rhythm
   ========================================================================== */
.entry-header { margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.entry-header .card-meta { justify-content: flex-start; }

.entry-thumb { line-height: 0; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.entry-thumb img {
  width: 100%; border-radius: 10px;
  filter: drop-shadow(0px 6px 18px rgba(103,91,145,0.28));
}

.entry-content > * { margin-bottom: 1.6rem; }
.entry-content {
  font-weight: 300;
  font-size: clamp(1rem, 3.4vw, 1.05rem);
  line-height: 1.88; letter-spacing: 0.02em;
  color: var(--teal);
}
.entry-content em     { font-style: italic; }
.entry-content strong { font-weight: 700; }
.entry-content a      { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { opacity: 0.75; }

.entry-content h2, .entry-content h3, .entry-content h4 {
  font-weight: 700; color: var(--teal); line-height: 1.3;
  margin-top: 2.6rem;
}
.entry-content h2 { font-size: 1.55rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; }

.entry-content blockquote {
  border-left: 3px solid var(--purple);
  padding: 0.3rem 0 0.3rem 1.4rem;
  font-style: italic; color: var(--purple);
}
.entry-content blockquote cite {
  display: block; margin-top: 0.7rem;
  font-style: normal; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75;
}

.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: 0.5rem; }

.entry-content figure { line-height: 0; }
.entry-content figure img { border-radius: 8px; }
.entry-content figcaption {
  line-height: 1.6; margin-top: 0.7rem;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple); opacity: 0.8;
}

.entry-content pre {
  background: rgba(83,153,165,0.08);
  border-radius: 8px; padding: 1.2rem 1.4rem;
  overflow-x: auto; font-size: 0.85rem; line-height: 1.6;
}
.entry-content code { font-size: 0.9em; }

/* WP core alignment / media classes */
.alignwide  { width: min(var(--wide-width), 92vw); margin-inline: calc((min(var(--wide-width),92vw) - 100%) / -2); }
.alignfull  { width: 100vw; margin-inline: calc(50% - 50vw); }
.aligncenter { display: block; margin-inline: auto; }
.alignleft  { float: left; margin: 0.4rem 1.4rem 1rem 0; }
.alignright { float: right; margin: 0.4rem 0 1rem 1.4rem; }
.wp-caption { max-width: 100%; }
.wp-block-embed iframe { max-width: 100%; }

/* Tags under a post */
.entry-tags {
  margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.entry-tags a {
  font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--purple); text-decoration: none;
  border: 1px solid rgba(103,91,145,0.35); border-radius: 999px;
  padding: 0.4em 1em; transition: background 0.2s, color 0.2s;
}
.entry-tags a:hover { background: var(--purple); color: var(--white); }

/* Prev / next post navigation */
.post-nav {
  margin-top: clamp(2.6rem, 6vw, 4rem);
  display: grid; gap: 1.2rem;
  border-top: 1px solid rgba(83,153,165,0.25);
  padding-top: 2rem;
}
@media (min-width: 680px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { text-decoration: none; color: var(--teal); }
.post-nav .nav-label {
  display: block; font-size: 0.64rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 0.4rem;
}
.post-nav .nav-post-title { font-weight: 700; font-size: 1rem; line-height: 1.4; }
.post-nav .nav-next { text-align: right; }
.post-nav a:hover .nav-post-title { opacity: 0.7; }

/* ==========================================================================
   PAGINATION (archive)
   ========================================================================== */
.pagination {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem;
}
.pagination .page-numbers {
  min-width: 2.4rem; padding: 0.55em 0.9em;
  display: inline-flex; justify-content: center; align-items: center;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--teal); text-decoration: none;
  border: 1px solid rgba(83,153,165,0.35); border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--teal); color: var(--white); }
.pagination .dots { border: none; }

/* ==========================================================================
   COMMENTS
   ========================================================================== */
.comments-area {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid rgba(83,153,165,0.25);
  padding-top: clamp(2rem, 5vw, 3rem);
}
.comments-title, .comment-reply-title {
  font-weight: 700; font-size: 1.2rem; margin-bottom: 1.6rem;
}
.comment-list { list-style: none; }
.comment-list .comment { margin-bottom: 1.8rem; }
.comment-list .children { list-style: none; padding-left: clamp(1rem, 4vw, 2.4rem); margin-top: 1.8rem; }
.comment-meta { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
.comment-meta img { border-radius: 50%; }
.comment-author { font-weight: 700; font-size: 0.9rem; }
.comment-date {
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--purple); text-decoration: none;
}
.comment-content { font-size: 0.95rem; line-height: 1.8; }
.comment-reply-link {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--purple); text-decoration: none;
}

.comment-form { display: grid; gap: 1rem; margin-top: 1rem; }
.comment-form label {
  display: block; font-size: 0.68rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 0.4rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 0.75em 1em;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--teal);
  background: rgba(83,153,165,0.06);
  border: 1px solid rgba(83,153,165,0.35); border-radius: 6px;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: 2px solid var(--purple); outline-offset: 1px;
}
.comment-form .form-submit input {
  cursor: pointer;
  background: var(--purple); color: var(--white); border: none;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.24em;
  text-transform: uppercase; padding: 0.95em 2.2em; border-radius: 999px;
  transition: opacity 0.2s;
}
.comment-form .form-submit input:hover { opacity: 0.85; }
.comment-form .comment-form-cookies-consent {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.8rem; line-height: 1.5;
}
.comment-form .comment-form-cookies-consent label {
  margin: 0; text-transform: none; letter-spacing: 0.02em; font-size: 0.8rem;
}

/* ==========================================================================
   SEARCH FORM & NO RESULTS & 404
   ========================================================================== */
.search-form { display: flex; gap: 0.6rem; max-width: 480px; }
.search-form .search-field {
  flex: 1; padding: 0.75em 1.1em;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--teal);
  background: rgba(83,153,165,0.06);
  border: 1px solid rgba(83,153,165,0.35); border-radius: 999px;
}
.search-form .search-submit {
  cursor: pointer;
  background: var(--teal); color: var(--white); border: none;
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; padding: 0 1.8em; border-radius: 999px;
  transition: opacity 0.2s;
}
.search-form .search-submit:hover { opacity: 0.85; }

.no-results p { margin-bottom: 1.6rem; line-height: 1.8; }

.error-404 { text-align: center; padding-block: clamp(2rem, 8vw, 5rem); }
.error-404 .page-title { margin-bottom: 1.2rem; }
.error-404 .search-form { margin: 2rem auto 0; }

/* ==========================================================================
   SIDEBAR-LESS WIDGET AREA (below content, optional)
   ========================================================================== */
.blog-widgets {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid rgba(83,153,165,0.25);
  padding-top: clamp(2rem, 5vw, 3rem);
  display: grid; gap: 2.4rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.blog-widgets .widget-title {
  font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--purple); margin-bottom: 1rem;
}
.blog-widgets ul { list-style: none; }
.blog-widgets li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.blog-widgets a { color: var(--teal); text-decoration: none; }
.blog-widgets a:hover { text-decoration: underline; text-underline-offset: 3px; }
