/*
Theme Name: Tomato - The Stillness Journal
Theme URI: https://wearetomato.com/blog
Description: Custom WordPress theme for The Stillness Journal, aligned with the Tomato — Architecture of Serenity brand system (2026).
Version: 2.0.0
Author: TOMATO Estudio de Arquitectura
Author URI: https://wearetomato.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tomato-journal
Requires at least: 5.9
Requires PHP: 7.4
*/

/* ==========================================================================
   FONTS — Hanken Grotesk (UI/body) + Yourlove (lyric accent). Self-hosted.
   ========================================================================== */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/HankenGrotesk-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/HankenGrotesk-Italic-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Yourlove";
  src: url("fonts/YourLove.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ==========================================================================
   DESIGN TOKENS — mirror of the main Tomato site (styles/tokens.css)
   ========================================================================== */
:root {
  --forest:     #303E2B;
  --moss:       #797F77;
  --terracotta: #6D281F;
  --ink:        #1A1A1A;
  --offwhite:   #F9F8F6;
  --sand:       #D9D2C5;
  --slate:      #4A4E51;
  --muted:      #636363;
  --stone-50:   #F1F1F0;
  --stone-100:  #E6E6E5;
  --graphite:   #2B2D2E;
  --near-black: #0F0F0F;

  --font-sans:   "Hanken Grotesk", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-script: "Yourlove", "Caveat", cursive;

  --wrap: 1440px;
  --pad-x: 48px;
  --measure: 720px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 400ms;
}

/* ==========================================================================
   RESET / GLOBAL
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--offwhite);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--terracotta); }
h1, h2, h3, h4 { font-family: var(--font-sans); color: var(--forest); font-weight: 400; text-wrap: pretty; }
em { font-style: italic; }
strong { font-weight: 600; }

/* ==========================================================================
   SITE HEADER — replicates the main Tomato nav (links back to the site)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(249,248,246,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(48,62,43,0.10);
}
.header-wrapper {
  max-width: var(--wrap); margin: 0 auto;
  padding: 18px var(--pad-x);
  display: flex; align-items: center; gap: 32px;
}
.site-logo { display: flex; align-items: center; }
.site-logo img { height: 30px; width: auto; }
.site-logo .site-title-text {
  font-size: 18px; font-weight: 600; color: var(--forest);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.site-navigation { margin-left: auto; }
.main-navigation {
  display: flex; align-items: center; gap: 34px; list-style: none;
}
.main-navigation a {
  font-size: 13px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--slate);
}
.main-navigation a:hover { color: var(--forest); }
.main-navigation .nav-current > a { color: var(--forest); }
.nav-cta {
  font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--forest); border: 1px solid var(--forest);
  padding: 10px 18px; transition: all var(--dur) var(--ease);
  white-space: nowrap; flex-shrink: 0;
}
.main-navigation { flex-wrap: nowrap; }
.nav-cta:hover { background: var(--forest); color: var(--offwhite); }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.site-content { min-height: 60vh; }
.content-wrapper { max-width: var(--wrap); margin: 0 auto; padding: 72px var(--pad-x); }
.sidebar { display: none; } /* editorial single-column layout */

/* ==========================================================================
   BLOG INDEX / ARCHIVE — editorial cards
   ========================================================================== */
.archive-hero { max-width: var(--wrap); margin: 0 auto; padding: 80px var(--pad-x) 24px; }
.archive-hero .eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--slate);
}
.archive-hero h1 {
  font-size: clamp(36px, 5vw, 64px); font-weight: 300; letter-spacing: -0.02em;
  line-height: 1.05; margin-top: 16px; color: var(--forest);
}
.archive-hero p { margin-top: 18px; max-width: 52ch; color: var(--slate); font-size: 18px; }

/* Archive header (category / tag / author / date) */
.archive-header { max-width: var(--wrap); margin: 0 auto; padding: 80px var(--pad-x) 8px; }
.archive-title { font-size: clamp(30px, 4vw, 52px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.08; color: var(--forest); }
.archive-description { margin-top: 16px; max-width: 56ch; color: var(--slate); font-size: 17px; }
.no-posts { padding: 40px 0; }
.no-posts h2 { font-size: 26px; color: var(--forest); margin-bottom: 12px; }
.no-posts p { color: var(--slate); }
.no-posts .back-link { display: inline-block; margin-top: 18px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; }

.posts-list { display: grid; gap: 72px; }
.post-card { border-bottom: 1px solid var(--sand); padding-bottom: 72px; }
.post-card:last-of-type { border-bottom: none; }
.post-card .post-thumbnail { overflow: hidden; margin-bottom: 28px; order: -1; }
.post-card .post-thumbnail img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  transition: transform 900ms var(--ease);
}
.post-card:hover .post-thumbnail img { transform: scale(1.03); }
.post-card { display: flex; flex-direction: column; }
.post-meta {
  font-size: 12px; color: var(--slate); text-transform: uppercase;
  letter-spacing: 0.14em; margin-bottom: 14px; display: flex; gap: 14px; flex-wrap: wrap;
}
.post-category { color: var(--forest); font-weight: 600; }
.post-title { font-size: clamp(26px, 3vw, 38px); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
.post-title a { color: var(--forest); }
.post-title a:hover { color: var(--terracotta); }
.post-excerpt { font-size: 18px; color: var(--slate); line-height: 1.7; margin-top: 18px; max-width: 60ch; }
.post-footer { margin-top: 24px; }
.read-more {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--forest);
}
.read-more span { transition: transform var(--dur) var(--ease); }
.read-more:hover span { transform: translateX(6px); }

/* ==========================================================================
   SINGLE POST — editorial, centered
   ========================================================================== */
.journal-article { max-width: 860px; margin: 0 auto; }
.back-to-index {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--slate); margin-bottom: 40px;
}
.back-to-index:hover { color: var(--forest); }
.post-header-single { text-align: center; margin-bottom: 48px; }
.post-header-single .post-meta { justify-content: center; }
.post-title-single {
  font-size: clamp(34px, 4.4vw, 60px); font-weight: 300; letter-spacing: -0.025em;
  line-height: 1.08; margin: 20px auto 24px; max-width: 16ch; color: var(--forest);
}
.post-byline { font-size: 14px; color: var(--muted); }
.post-byline strong { color: var(--slate); font-weight: 600; }

.post-featured-image { margin: 0 0 56px; }
.post-featured-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-featured-image figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 12px; }

.post-content { font-size: 19px; line-height: 1.75; color: var(--ink); max-width: var(--measure); margin: 0 auto; }
.post-content > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.post-content p { margin-bottom: 28px; }
.post-content h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 400; line-height: 1.2; color: var(--forest); margin: 56px 0 20px; }
.post-content h3 { font-size: 22px; font-weight: 500; color: var(--slate); margin: 40px 0 14px; }
.post-content ul, .post-content ol { margin: 0 auto 28px; padding-left: 1.3em; }
.post-content li { margin-bottom: 10px; }
.post-content a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--sand); }
.post-content a:hover { color: var(--terracotta); text-decoration-color: var(--terracotta); }
.post-content hr { border: 0; height: 1px; background: var(--sand); margin: 48px auto; max-width: 120px; }
.post-content blockquote {
  border-left: 2px solid var(--forest); padding-left: 28px; margin: 44px auto;
  font-family: var(--font-script); font-style: normal;
  font-size: clamp(24px, 3vw, 32px); line-height: 1.25; color: var(--forest);
}
/* Figures embedded in the body (full editorial width) */
.post-content figure { max-width: 860px; margin: 44px auto; }
.post-content figure img { width: 100%; height: auto; }
.post-content figure figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 12px; }

/* ==========================================================================
   POST FOOTER — tags, author, related
   ========================================================================== */
.post-footer-single { max-width: var(--measure); margin: 64px auto 0; }
.tags-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.tags-list .tag {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 7px 14px; border: 1px solid var(--sand); color: var(--slate);
}
.tags-list .tag:hover { border-color: var(--forest); color: var(--forest); }

.author-box {
  display: flex; gap: 24px; align-items: center;
  padding: 36px 40px; background: var(--stone-50); border: 1px solid var(--sand); margin-bottom: 64px;
}
.author-box .author-avatar {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 999px;
  background: var(--forest); color: var(--offwhite);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 500; line-height: 1;
}
.author-box .author-avatar img { width: 64px; height: 64px; border-radius: 999px; object-fit: cover; }
.author-box h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 8px; }
.author-box .author-name { font-size: 20px; color: var(--forest); margin-bottom: 8px; }
.author-box .author-bio { font-size: 15px; color: var(--slate); line-height: 1.6; margin-bottom: 12px; }
.author-box .author-link { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }

.related-posts h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--slate);
  border-top: 1px solid var(--sand); padding-top: 40px; margin-bottom: 32px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.related-post-card .related-thumbnail { overflow: hidden; margin-bottom: 14px; }
.related-post-card .related-thumbnail img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform 900ms var(--ease); }
.related-post-card:hover .related-thumbnail img { transform: scale(1.04); }
.related-post-card h4 { font-size: 17px; font-weight: 500; line-height: 1.3; }
.related-post-card h4 a { color: var(--forest); }
.related-post-card h4 a:hover { color: var(--terracotta); }
.related-date { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 8px; }

/* ==========================================================================
   COMMENTS
   ========================================================================== */
.comments-area { max-width: var(--measure); margin: 64px auto 0; padding-top: 40px; border-top: 1px solid var(--sand); }
.comments-area h2, .comments-area h3 { font-size: 20px; color: var(--forest); margin-bottom: 20px; }
.comment-list { list-style: none; margin-bottom: 40px; }
.comment-list li { padding: 20px 0; border-bottom: 1px solid var(--sand); }
.comment-form label { display: block; font-size: 13px; color: var(--slate); margin-bottom: 6px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--sand); background: #fff;
  font-family: var(--font-sans); font-size: 15px; color: var(--ink); margin-bottom: 18px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--forest); }
.comment-form .submit, .comment-form input[type=submit] {
  background: var(--forest); color: var(--offwhite); border: 1px solid var(--forest);
  padding: 13px 26px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em;
  cursor: pointer; transition: background var(--dur) var(--ease);
}
.comment-form .submit:hover, .comment-form input[type=submit]:hover { background: var(--slate); border-color: var(--slate); }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination { display: flex; justify-content: center; margin-top: 72px; }
.pagination .page-numbers { display: flex; gap: 10px; list-style: none; padding: 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--sand); color: var(--slate); font-size: 14px;
}
.pagination a:hover, .pagination .current {
  background: var(--forest); color: var(--offwhite); border-color: var(--forest);
}

/* ==========================================================================
   SITE FOOTER — replicates the main Tomato footer
   ========================================================================== */
.site-footer { background: var(--near-black); color: var(--offwhite); padding: 112px var(--pad-x) 44px; margin-top: 96px; }
.footer-top {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1.1fr 1.3fr; gap: 40px 72px;
}
.footer-lockup .footer-logo { height: 34px; width: auto; margin-bottom: 26px; filter: brightness(0) invert(1); }
.footer-lockup .footer-tag { font-family: var(--font-script); font-size: 20px; color: var(--sand); margin-bottom: 34px; }
.footer-addresses .addr { font-size: 12px; color: rgba(249,248,246,0.6); line-height: 1.75; margin-bottom: 18px; }
.footer-addresses .addr strong { display: block; color: var(--offwhite); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 3px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
.footer-social a { font-size: 12px; color: rgba(249,248,246,0.7); text-transform: uppercase; letter-spacing: 0.08em; }
.footer-social a:hover { color: var(--sand); }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--sand); margin-bottom: 28px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 16px; line-height: 1.4; }
.footer-col a, .footer-col li { font-size: 15px; color: rgba(249,248,246,0.72); }
.footer-col a:hover { color: var(--offwhite); }
.footer-news p { font-size: 14px; color: rgba(249,248,246,0.6); line-height: 1.65; margin-bottom: 22px; }
.footer-news form { display: flex; flex-direction: column; gap: 12px; }
.footer-news input {
  padding: 12px 14px; background: transparent; border: 1px solid rgba(249,248,246,0.25);
  color: var(--offwhite); font-family: var(--font-sans); font-size: 14px;
}
.footer-news input::placeholder { color: rgba(249,248,246,0.4); }
.footer-news button {
  padding: 12px 18px; background: var(--offwhite); color: var(--near-black); border: none;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.footer-news button:hover { background: var(--sand); }
.footer-bottom {
  max-width: var(--wrap); margin: 80px auto 0; padding-top: 32px;
  border-top: 1px solid rgba(249,248,246,0.12);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: rgba(249,248,246,0.55);
}
.footer-bottom .legal { display: flex; gap: 22px; }
.footer-bottom a { color: rgba(249,248,246,0.7); }
.footer-bottom a:hover { color: var(--offwhite); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --pad-x: 22px; }
  .header-wrapper { padding: 14px 20px; gap: 16px; flex-wrap: wrap; }
  .site-navigation { margin-left: 0; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .main-navigation { gap: 22px; padding-bottom: 4px; }
  .nav-cta { display: none; }
  .content-wrapper { padding: 48px 22px; }
  .post-content { font-size: 18px; }
  .author-box { flex-direction: column; gap: 16px; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 480px) {
  .archive-hero { padding: 56px 22px 16px; }
  .post-featured-image img, .post-card .post-thumbnail img { aspect-ratio: 4/3; }
}
