/*
Theme Name: Similes Write
Theme URI: https://simileswrite.com/
Author: Similes Write
Author URI: https://simileswrite.com/
Description: A bespoke, lightweight theme designed for Similes Write - beautiful, fast and fully responsive.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: similes-write
Tags: blog, custom-logo, featured-images, responsive-layout
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
*/

/* ============ 1. Design tokens & reset ============ */
:root {
  --navy: #16324f;
  --navy-deep: #0d2233;
  --navy-soft: #24425f;
  --teal: #0e7c86;
  --teal-dark: #0a5f66;
  --teal-soft: #e7f2f3;
  --amber: #f5a524;
  --amber-dark: #c9820d;
  --amber-soft: #fdf3dd;
  --bg: #faf8f3;
  --card: #ffffff;
  --ink: #2c3a47;
  --muted: #687d8f;
  --line: #e9e1d2;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(13, 34, 51, 0.07);
  --shadow-md: 0 12px 32px -14px rgba(13, 34, 51, 0.28);
  --shadow-lg: 0 26px 50px -18px rgba(13, 34, 51, 0.32);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0 0 1.25em; }

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

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

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

::selection { background: var(--amber); color: var(--navy-deep); }

/* ============ 2. Utilities ============ */
.container { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--navy-deep); color: #fff; padding: 10px 18px; border-radius: 8px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal-dark); margin: 0 0 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--amber); flex: none; }
.eyebrow-light { color: var(--amber); }

.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  border: 0; cursor: pointer; line-height: 1.2;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-amber { background: var(--amber); color: var(--navy-deep); box-shadow: 0 10px 24px -10px rgba(245, 165, 36, 0.7); }
.btn-amber:hover { background: #ffb63d; color: var(--navy-deep); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: #fff; }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -12px rgba(14, 124, 134, 0.8); }
.btn-teal:hover { background: var(--teal-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--teal-dark); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; }

.link-more { font-weight: 700; color: var(--teal-dark); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.link-more span { transition: transform 0.25s var(--ease); }
.link-more:hover span { transform: translateX(4px); }

/* ============ 3. Topbar ============ */
.topbar { background: var(--navy-deep); color: #c3d2df; font-size: 0.8rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar-tagline { margin: 0; letter-spacing: 0.02em; }
.topbar-link { color: var(--amber); font-weight: 700; white-space: nowrap; }
.topbar-link:hover { color: #ffc95e; }

/* ============ 4. Header & navigation ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 8px 28px -12px rgba(13, 34, 51, 0.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.site-brand { flex: none; line-height: 0; }
.site-brand .custom-logo { height: 58px; width: auto; max-width: 250px; }
.site-name { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.site-name:hover { color: var(--teal-dark); }

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: inline-block; padding: 10px 16px; border-radius: 999px;
  color: var(--navy); font-weight: 600; font-size: 0.96rem;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-list a:hover { background: var(--teal-soft); color: var(--teal-dark); }
.nav-list .current-menu-item > a, .nav-list .current-category-ancestor > a { color: var(--teal-dark); background: var(--teal-soft); }
.nav-list .menu-cta > a { background: var(--amber); color: var(--navy-deep); font-weight: 700; box-shadow: 0 6px 16px -8px rgba(245, 165, 36, 0.8); }
.nav-list .menu-cta > a:hover { background: var(--amber-dark); color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 11px; background: var(--navy); border: 0; border-radius: 12px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2.5px; border-radius: 3px; background: #fff; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.mobile-nav.is-open { max-height: 480px; }
.mobile-nav-list { list-style: none; margin: 0; padding: 12px 24px 20px; }
.mobile-nav-list a { display: block; padding: 12px 4px; color: var(--navy); font-weight: 600; border-bottom: 1px solid #f0ebe0; }
.mobile-nav-list li:last-child a { border-bottom: 0; }
.mobile-nav-list .menu-cta > a { color: var(--amber-dark); font-weight: 800; }

/* ============ 5. Hero ============ */
.hero { padding: 28px 0 0; }
.hero-inner {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: clamp(40px, 6vw, 80px) clamp(28px, 5vw, 72px);
  background:
    radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.6px),
    linear-gradient(130deg, var(--navy-deep) 0%, var(--navy) 55%, var(--teal-dark) 130%);
  background-size: 26px 26px, cover;
  color: #fff;
  box-shadow: var(--shadow-md);
}
.hero-inner::after {
  content: "\201C"; position: absolute; right: 30px; top: -56px;
  font-family: var(--font-head); font-size: 19rem; line-height: 1;
  color: rgba(255, 255, 255, 0.06); pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.hero-title { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin: 0 0 16px; letter-spacing: -0.01em; }
.hero-text { color: rgba(255, 255, 255, 0.85); font-size: 1.08rem; line-height: 1.7; margin: 0 0 28px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-search { display: flex; gap: 0; background: #fff; border-radius: 999px; padding: 6px; max-width: 560px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45); }
.hero-search-field { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 20px; font-size: 1rem; font-family: var(--font-body); color: var(--ink); }
.hero-search-field:focus { outline: none; }
.hero-search:focus-within { outline: 3px solid var(--amber); outline-offset: 2px; }
.hero-search-btn { border: 0; border-radius: 999px; background: var(--navy-deep); color: #fff; font-weight: 700; padding: 12px 30px; cursor: pointer; font-size: 0.95rem; transition: background-color 0.25s var(--ease); }
.hero-search-btn:hover { background: var(--teal-dark); }

/* ============ 6. Sections, featured & cards ============ */
.site-main { padding-bottom: 76px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 60px 0 30px; }

.featured {
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 34px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.featured:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.featured-media { display: block; min-height: 340px; overflow: hidden; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.featured:hover .featured-media img { transform: scale(1.04); }
.featured-body { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; }
.featured-title { font-size: clamp(1.6rem, 2.8vw, 2.3rem); margin: 10px 0 14px; }
.featured-title a { color: var(--navy); }
.featured-title a:hover { color: var(--teal-dark); }
.featured-excerpt { color: var(--muted); line-height: 1.75; margin: 0 0 18px; }
.featured-body .btn { align-self: flex-start; margin-top: 8px; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-art {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 180px;
  background:
    radial-gradient(rgba(255, 255, 255, 0.1) 1.5px, transparent 1.6px),
    linear-gradient(135deg, var(--teal) 0%, var(--navy) 90%);
  background-size: 24px 24px, cover;
}
.card-art-mark { font-family: var(--font-head); font-size: 4.6rem; line-height: 1; color: rgba(255, 255, 255, 0.9); transform: translateY(6px); }
.card-art-lg .card-art-mark { font-size: 7rem; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.card-badge {
  align-self: flex-start; display: inline-block; margin: 0 0 14px;
  background: var(--amber); color: var(--navy-deep);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.card-badge:hover { background: var(--navy-deep); color: #fff; }
.card-title { font-size: 1.28rem; line-height: 1.32; margin: 0 0 10px; }
.card-title a { color: var(--navy); }
.card-title a:hover { color: var(--teal-dark); }
.card-excerpt { color: var(--muted); font-size: 0.94rem; line-height: 1.7; margin: 0 0 18px; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  border-top: 1px solid #f0ebe0; padding-top: 15px;
  font-size: 0.82rem; color: var(--muted);
}
.meta-dot { color: var(--amber-dark); font-weight: 800; }

/* ============ 7. Quote band ============ */
.quote-band { margin-top: 68px; }
.quote-band-inner {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 22px; padding: clamp(40px, 5vw, 64px) clamp(28px, 5vw, 72px);
  background:
    radial-gradient(rgba(255, 255, 255, 0.09) 1.5px, transparent 1.6px),
    linear-gradient(120deg, var(--teal-dark), var(--teal) 130%);
  background-size: 26px 26px, cover;
  box-shadow: var(--shadow-md);
}
.quote-band-inner::before {
  content: "\201C"; position: absolute; left: 50%; top: -70px; transform: translateX(-50%);
  font-family: var(--font-head); font-size: 15rem; line-height: 1; color: rgba(255, 255, 255, 0.1); pointer-events: none;
}
.quote-band-quote { position: relative; z-index: 1; font-family: var(--font-head); font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.5; color: #fff; max-width: 760px; margin: 0 auto 26px; }
.quote-band .btn { position: relative; z-index: 1; }

/* ============ 8. Archive band ============ */
.archive-band { padding: 28px 0 0; }
.archive-band-inner {
  border-radius: 22px; padding: clamp(36px, 5vw, 60px) clamp(28px, 5vw, 60px);
  background:
    radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.6px),
    linear-gradient(130deg, var(--navy-deep), var(--navy-soft) 120%);
  background-size: 26px 26px, cover;
  box-shadow: var(--shadow-md);
}
.archive-title { color: #fff; font-size: clamp(2rem, 4.4vw, 3rem); margin: 0 0 12px; }
.archive-desc { color: rgba(255, 255, 255, 0.85); max-width: 680px; line-height: 1.75; }
.archive-desc p { margin: 0; }
.archive-count {
  display: inline-block; margin: 18px 0 0; background: var(--amber); color: var(--navy-deep);
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 999px;
}
.archive-list { padding-top: 44px; }

/* ============ 9. Single article & pages ============ */
.entry-wrap { padding: 44px 0 0; }
.entry-header { text-align: center; max-width: 720px; margin: 0 auto 30px; }
.entry-title { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.18; margin: 12px 0 16px; text-wrap: balance; }
.entry-meta { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.entry-media { margin: 8px 0 36px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-md); }
.entry-media img { width: 100%; }
.entry-content { font-size: 1.11rem; line-height: 1.85; color: #33414e; }
.entry-content > p:first-of-type::first-letter {
  font-family: var(--font-head); font-weight: 700; font-size: 3.3em;
  float: left; line-height: 0.86; padding: 6px 12px 0 0; color: var(--teal-dark);
}
.entry-content h2 { font-size: 1.65rem; margin: 2.2em 0 0.8em; }
.entry-content h3 { font-size: 1.32rem; margin: 2em 0 0.7em; }
.entry-content h4 { font-size: 1.1rem; margin: 1.8em 0 0.6em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.5em; padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.55em; }
.entry-content li::marker { color: var(--teal-dark); font-weight: 700; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--teal); }
.entry-content blockquote {
  position: relative; margin: 2.2em 0; padding: 26px 28px 26px 30px;
  background: var(--amber-soft); border-left: 5px solid var(--amber); border-radius: 0 14px 14px 0;
  font-family: var(--font-head); font-size: 1.28rem; line-height: 1.6; color: var(--navy);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote::before {
  content: "\201C"; position: absolute; left: 12px; top: 2px;
  font-family: var(--font-head); font-size: 3.4rem; line-height: 1; color: var(--amber-dark); opacity: 0.35;
}
.entry-content code { background: #f1ece1; padding: 2px 8px; border-radius: 6px; font-size: 0.92em; }
.entry-content pre { background: var(--navy-deep); color: #eef4f8; padding: 22px; border-radius: 14px; overflow-x: auto; font-size: 0.92rem; line-height: 1.7; }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { text-align: center; font-size: 0.86rem; color: var(--muted); margin-top: 10px; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 0; }
.entry-tags a { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; font-size: 0.84rem; font-weight: 600; color: var(--muted); transition: all 0.2s var(--ease); }
.entry-tags a:hover { border-color: var(--teal); color: var(--teal-dark); transform: translateY(-2px); }

.related { margin-top: 64px; }

.post-navigation { margin: 56px 0 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-navigation a {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.post-navigation a:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-navigation .nav-label { display: block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-dark); margin-bottom: 6px; }
.post-navigation .nav-title { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.05rem; line-height: 1.4; }
.post-navigation .nav-next { text-align: right; }

.page-wrap { padding: 48px 0 8px; }
.page-title { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 24px; }

/* ============ 10. Pagination ============ */
.pagination { margin-top: 52px; }
.pagination .nav-links { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 46px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  color: var(--navy); font-weight: 700; font-size: 0.95rem;
  transition: all 0.2s var(--ease);
}
a.page-numbers:hover { border-color: var(--teal); color: var(--teal-dark); transform: translateY(-2px); }
.page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.page-numbers.dots { border: 0; background: none; }

/* ============ 11. Comments ============ */
.comments-area { margin-top: 64px; border-top: 1px solid var(--line); padding-top: 44px; }
.comments-title { font-size: 1.5rem; margin: 0 0 28px; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list .comment { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.comment-author { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-weight: 700; color: var(--navy); font-style: normal; }
.comment-metadata { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; }
.comment-content { font-size: 0.96rem; line-height: 1.75; }
.comment-reply-link { font-weight: 700; font-size: 0.86rem; }
.comment-respond { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 4vw, 40px); }
.comment-reply-title { font-size: 1.4rem; margin: 0 0 20px; }
.comment-form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--navy); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 16px;
  font-family: var(--font-body); font-size: 0.96rem; background: #fff; color: var(--ink); margin-bottom: 18px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.comment-form .form-submit { margin: 0; }
.comment-form input[type="submit"] { display: inline-flex; padding: 14px 30px; border-radius: 999px; border: 0; background: var(--teal); color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.25s var(--ease); }
.comment-form input[type="submit"]:hover { background: var(--teal-dark); transform: translateY(-2px); }

/* ============ 12. Search, 404 & empty states ============ */
.search-head { text-align: center; padding: 56px 0 8px; }
.search-title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin: 0 0 10px; }
.search-title span { color: var(--teal-dark); }
.search-count { color: var(--muted); }
.no-results { text-align: center; padding: 40px 0 20px; }
.error-404 { text-align: center; padding: 90px 0; }
.error-code { font-family: var(--font-head); font-size: clamp(4.5rem, 12vw, 7.5rem); line-height: 1; color: var(--teal); margin: 0 0 10px; }
.error-title { font-size: 1.8rem; margin: 0 0 14px; }
.error-text { color: var(--muted); max-width: 480px; margin: 0 auto 30px; }
.empty-state {
  text-align: center; background: var(--card); border: 1px dashed var(--line);
  border-radius: 22px; padding: clamp(44px, 7vw, 84px) clamp(28px, 5vw, 60px); margin-top: 44px;
}
.empty-state h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 14px; }
.empty-state p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; line-height: 1.75; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ============ 13. Footer ============ */
.site-footer { background: var(--navy-deep); color: #c3d2df; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 44px; padding-top: 64px; padding-bottom: 20px; }
.footer-site-name { font-family: var(--font-head); font-size: 1.65rem; font-weight: 700; color: #fff; margin: 0 0 8px; }
.footer-tagline { color: var(--amber); font-weight: 600; font-size: 0.95rem; margin: 0 0 14px; }
.footer-about { font-size: 0.93rem; line-height: 1.75; color: #9db0c1; max-width: 340px; }
.footer-heading { color: #fff; font-family: var(--font-body); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; margin: 6px 0 20px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 4px; }
.footer-list a { display: inline-block; padding: 6px 0; color: #9db0c1; font-size: 0.94rem; transition: color 0.2s var(--ease), transform 0.2s var(--ease); }
.footer-list a:hover { color: #fff; transform: translateX(5px); }
.footer-list .menu-cta > a { color: var(--amber); font-weight: 700; }
.footer-list .menu-cta > a:hover { color: #ffc95e; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 44px; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.copyright, .footer-note { margin: 0; font-size: 0.86rem; color: #8fa2b4; }

/* ============ 14. Back to top ============ */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--amber); color: var(--navy-deep); font-size: 1.35rem; font-weight: 800; line-height: 1;
  box-shadow: var(--shadow-md); opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #ffc95e; transform: translateY(-3px); }

/* ============ 15. Responsive ============ */
@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav { display: block; }
  .featured { grid-template-columns: 1fr; }
  .featured-media { min-height: 260px; aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .topbar-tagline { display: none; }
  .topbar-inner { justify-content: center; }
  .site-brand .custom-logo { height: 46px; max-width: 200px; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .hero-search { flex-direction: column; border-radius: 18px; gap: 6px; }
  .hero-search-btn { width: 100%; }
  .to-top { right: 18px; bottom: 18px; }
}

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