/*
Theme Name: Relocation Journal
Theme URI: https://example.com
Author: Custom Build
Description: An editorial theme for immigration, visa, housing and relocation content. Passport-stamp motifs, dashed route-line dividers, and a serif/sans/mono type system built for long-form reading and ad placements.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: relocation-journal
*/

/* ---------------------------------------------
   TOKENS
--------------------------------------------- */
:root {
  --ink: #1B2A41;
  --paper: #FAF7F0;
  --paper-raised: #FFFFFF;
  --teal: #1F6F6B;
  --teal-dark: #16504D;
  --gold: #C9962C;
  --slate: #5B6B79;
  --mist: #E4DFD3;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --content-width: 700px;
  --wide-width: 1120px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; 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 {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1.3em; }

.container {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------
   ROUTE LINE — signature divider motif
   A dashed horizontal line with small waypoint
   nodes, evoking a flight path / travel route.
--------------------------------------------- */
.route-line {
  position: relative;
  height: 1px;
  margin: 2.5rem 0;
  background-image: linear-gradient(to right, var(--mist) 0 8px, transparent 8px 14px);
  background-size: 14px 1px;
  background-repeat: repeat-x;
}
.route-line::before,
.route-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}
.route-line::before { left: 0; }
.route-line::after { right: 0; }
.route-line--tight { margin: 1.25rem 0; }

/* ---------------------------------------------
   STAMP — passport-stamp category badge
--------------------------------------------- */
.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-dark);
  border: 1.5px solid var(--teal);
  border-radius: var(--radius);
  padding: 3px 9px;
  transform: rotate(-1.5deg);
  background: rgba(31, 111, 107, 0.05);
}
a.stamp { text-decoration: none; }
a.stamp:hover { background: rgba(31, 111, 107, 0.12); color: var(--teal-dark); }
.stamp--gold {
  border-color: var(--gold);
  color: #8a6417;
  background: rgba(201, 150, 44, 0.08);
  transform: rotate(1deg);
}

/* ---------------------------------------------
   HEADER
--------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--mist);
  background: var(--paper);
  position: relative;
  z-index: 10;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  gap: 20px;
  flex-wrap: wrap;
}
.site-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.site-title a { color: var(--ink); text-decoration: none; }
.site-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  letter-spacing: 0.05em;
  margin-top: 2px;
  text-transform: uppercase;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.primary-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  border-bottom-color: var(--gold);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

/* ---------------------------------------------
   LAYOUT
--------------------------------------------- */
.site-main {
  padding: 44px 0 60px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}
.layout--narrow { grid-template-columns: minmax(0, 1fr); max-width: var(--content-width); margin: 0 auto; }

/* ---------------------------------------------
   AD SLOTS
--------------------------------------------- */
.ad-slot {
  margin: 2rem 0;
  padding: 6px;
  border: 1px dashed var(--mist);
  border-radius: var(--radius);
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mist);
  position: absolute;
}
.ad-slot--sidebar { min-height: 250px; }

/* ---------------------------------------------
   POST CARDS (index / archive)
--------------------------------------------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.post-card {
  padding: 30px 0;
  border-bottom: 1px solid var(--mist);
}
.post-card:first-child { padding-top: 0; }
.post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.post-card__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}
.post-card__title {
  font-size: 27px;
  margin-bottom: 10px;
}
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--teal); }
.post-card__excerpt { color: #374553; margin-bottom: 12px; }
.post-card__readmore {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.post-card__readmore::after { content: " \2192"; }

/* ---------------------------------------------
   SINGLE POST
--------------------------------------------- */
.entry-header { max-width: var(--content-width); margin: 0 auto 6px; }
.entry-title {
  font-size: clamp(30px, 4.5vw, 44px);
  margin-top: 14px;
}
.entry-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--slate);
}
.entry-content {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: 18px;
}
.entry-content h2 {
  font-size: 26px;
  margin-top: 2.1em;
  padding-top: 0.2em;
  position: relative;
}
.entry-content h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 14px;
}
.entry-content h3 { font-size: 20px; margin-top: 1.8em; color: var(--teal-dark); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin-bottom: 1.3em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold);
  font-style: italic;
  color: var(--slate);
}
.entry-content em { color: var(--slate); }
.entry-content a { text-decoration-color: var(--mist); }
.entry-content img { border-radius: var(--radius); margin: 1.5em 0; }

.entry-footer {
  max-width: var(--content-width);
  margin: 2.5rem auto 0;
}
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------
   SIDEBAR
--------------------------------------------- */
.widget {
  margin-bottom: 34px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--mist);
}
.widget:last-child { border-bottom: none; }
.widget-title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin-bottom: 14px;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { margin-bottom: 10px; font-size: 14.5px; }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }

/* ---------------------------------------------
   FOOTER
--------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--mist);
  margin-top: 40px;
  padding: 36px 0;
  background: var(--paper-raised);
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer__note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}
.footer-nav ul { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0; }
.footer-nav a { color: var(--slate); font-size: 13px; text-decoration: none; }
.footer-nav a:hover { color: var(--teal); }

/* ---------------------------------------------
   MISC / UTILITY
--------------------------------------------- */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
}
.pagination {
  display: flex;
  gap: 10px;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.pagination a, .pagination span {
  padding: 6px 12px;
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.search-form {
  display: flex;
  gap: 8px;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  font-family: var(--font-body);
  background: var(--paper-raised);
}
.search-form button {
  padding: 9px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.author-box {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--paper-raised);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  margin: 2.5rem 0;
}
.author-box__avatar img { border-radius: 50%; width: 56px; height: 56px; }
.author-box__name { font-family: var(--font-display); font-weight: 600; margin-bottom: 4px; }
.author-box__bio { font-size: 14px; color: var(--slate); margin: 0; }

/* ---------------------------------------------
   RESPONSIVE
--------------------------------------------- */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-block; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 4px; padding: 14px 0; }
  .site-header__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .entry-content { font-size: 16.5px; }
  .post-card__title { font-size: 22px; }
}
