/*
Theme Name: An Adoptee's Tale Journal
Author: OpenAI
Description: Clean editorial WordPress theme for writing by Moses on adoption, money, twenties, self, home, journeys and life.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: aat-journal
*/

:root {
  --paper: #f2f1eb;
  --surface: #fafaf6;
  --ink: #171915;
  --muted: #6b7067;
  --line: #d3d5cc;
  --accent: #59614b;
  --accent-dark: #404737;
  --soft: #e1e4da;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: var(--soft);
}

:focus-visible {
  outline: 3px solid rgba(89, 97, 75, 0.35);
  outline-offset: 4px;
}

.wrap {
  width: min(var(--max), 90vw);
  margin-inline: auto;
}

.kicker,
.meta {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.read {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.read:hover {
  color: var(--accent-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 241, 235, 0.96);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.byline {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.navlinks {
  display: flex;
  align-items: center;
}

.navlinks .menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navlinks a {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.navlinks a:hover {
  color: var(--accent);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-search input {
  width: 125px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  padding: 8px 10px;
  color: var(--ink);
}

.header-search button {
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mobile-toggle {
  display: none;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 5vw 14px;
}

.mobile-nav.is-open {
  display: grid;
}

.mobile-nav a {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Homepage hero */
.hero {
  padding: 92px 0 82px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 8vw;
  align-items: end;
}

.hero h1,
.section-head h2,
.home-journeys h2,
.about-band h2,
.page-hero h1,
.article h1,
.standard h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.045em;
}

.hero h1 {
  max-width: 900px;
  margin: 17px 0 28px;
  font-size: clamp(58px, 8vw, 124px);
  line-height: 0.9;
}

.hero p {
  max-width: 700px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.65;
}

.hero-note {
  padding: 8px 0 8px 26px;
  border-left: 1px solid var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-style: italic;
  line-height: 1.5;
}

.hero-note small {
  display: block;
  margin-top: 14px;
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Shared sections */
.section {
  padding: 84px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 38px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.97;
}

/* Featured post */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.feature-copy,
.feature-side {
  min-width: 0;
  padding: 52px;
  background: var(--surface);
}

.feature-side {
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  background: var(--soft);
}

.feature h3 {
  margin: 16px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.feature h3 a:hover {
  color: var(--accent);
}

.excerpt {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.feature-quote {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.1;
}

.feature-quote em {
  color: var(--accent);
}

.feature-side .thumb {
  width: 100%;
  margin: 0;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease, color 0.2s ease;
}

.category-card:hover {
  background: var(--accent);
  color: #fff;
}

.category-card span {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.category-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 400;
}

/* Home & journeys */
.home-journeys {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 7vw;
  align-items: start;
}

.home-journeys h2 {
  margin: 8px 0 18px;
  font-size: clamp(46px, 6vw, 82px);
  line-height: 0.97;
}

.home-journeys > div > p {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.7;
}

.journey-list {
  border-top: 1px solid var(--line);
}

.journey-item {
  padding: 24px 0;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.journey-item strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 400;
}

.journey-item span {
  color: var(--muted);
  line-height: 1.7;
}

/* Post cards */
.posts-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.post-card,
.entry-card {
  min-width: 0;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.post-card h3,
.entry-card h2 {
  margin: 14px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.post-card h3 a:hover,
.entry-card h2 a:hover {
  color: var(--accent);
}

.post-card p,
.entry-card p {
  color: var(--muted);
  line-height: 1.75;
}

.thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--soft);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

/* About band */
.about-band {
  padding: 92px 0;
  background: var(--accent);
  color: #fff;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8vw;
}

.about-band h2 {
  margin: 0;
  font-size: clamp(50px, 7vw, 92px);
  line-height: 0.94;
}

.about-band p {
  margin-top: 0;
  color: #eef0e9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.7;
}

.about-band .kicker {
  color: #cdd5c2;
}

.about-band .read {
  color: #fff;
}

.author-signoff {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Archives */
.page-hero {
  padding: 76px 0 42px;
}

.page-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(54px, 7vw, 96px);
  line-height: 0.97;
}

.archive-description {
  max-width: 720px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.65;
}

.archive-shell {
  padding-bottom: 70px;
}

.pagination {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination a,
.pagination span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  font-size: 12px;
}

.pagination .current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* Article */
.article {
  width: min(820px, 88vw);
  margin-inline: auto;
  padding: 68px 0;
}

.article h1 {
  margin: 18px 0 20px;
  font-size: clamp(52px, 7.5vw, 92px);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.article-by {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.article-hero-image {
  margin-top: 38px;
}

.article-hero-image img {
  width: 100%;
}

.article .entry-content {
  margin-top: 44px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.82;
}

.article .entry-content > * {
  max-width: 100%;
}

.article .entry-content p {
  margin: 0 0 1.4em;
}

.article .entry-content h2,
.article .entry-content h3 {
  margin-top: 1.7em;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.15;
}

.article .entry-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article .entry-content iframe {
  max-width: 100%;
}

.note-box,
.disclaimer {
  margin-top: 36px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.note-box h3,
.related h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
}

.note-box p,
.disclaimer p {
  color: var(--muted);
  line-height: 1.7;
}

.disclaimer strong {
  display: block;
  margin-bottom: 6px;
}

.article-footer {
  margin-top: 50px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

/* Related */
.related {
  width: min(var(--max), 90vw);
  margin: 0 auto 80px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.related-card {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.related-card h3 {
  margin: 10px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

/* Pages & search */
.standard {
  width: min(850px, 90vw);
  margin-inline: auto;
  padding: 72px 0;
}

.standard h1 {
  font-size: clamp(50px, 7vw, 84px);
  line-height: 1;
}

.standard .entry-content {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.8;
}

.standard .entry-content a {
  text-decoration: underline;
}

.search-form-main {
  max-width: 640px;
  margin-top: 24px;
  display: flex;
  gap: 10px;
}

.search-form-main input {
  min-width: 0;
  flex: 1;
  padding: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.search-form-main button {
  padding: 13px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

/* Footer */
.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--accent);
}

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

/* Tablet */
@media (max-width: 1000px) {
  .navlinks,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero,
  .feature,
  .home-journeys,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 48px;
  }

  .category-grid,
  .posts-grid,
  .archive-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-copy,
  .feature-side {
    padding: 36px;
  }

  .feature-side {
    min-height: 300px;
  }
}

/* Mobile */
@media (max-width: 650px) {
  .wrap {
    width: min(var(--max), 88vw);
  }

  .hero {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: clamp(52px, 17vw, 82px);
  }

  .hero p {
    font-size: 19px;
  }

  .hero-note {
    font-size: 21px;
  }

  .category-grid,
  .posts-grid,
  .archive-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .journey-item {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 0;
  }

  .feature-copy,
  .feature-side {
    padding: 28px;
  }

  .feature-side {
    min-height: 250px;
  }

  .page-hero {
    padding-top: 56px;
  }

  .article {
    width: min(88vw, 820px);
    padding-top: 52px;
  }

  .article .entry-content {
    font-size: 20px;
  }

  .search-form-main {
    flex-direction: column;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-wrap {
    gap: 8px;
  }

  .byline {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}


/* Opening journey — plays once per browser session on the front page */
.aatj-origin-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
  opacity: 1;
  visibility: visible;
  transition: opacity .7s ease, visibility .7s ease;
}

.aatj-origin-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.aatj-origin-intro.is-hidden {
  display: none;
}

.aatj-intro-skip {
  position: absolute;
  top: 25px;
  right: 28px;
  z-index: 2;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.aatj-intro-skip:hover {
  color: var(--ink);
}

.aatj-origin-inner {
  position: relative;
  width: min(900px, 88vw);
  padding: 80px 0;
  text-align: center;
}

.aatj-origin-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
}

.aatj-origin-line {
  position: absolute;
  top: 54%;
  right: 0;
  left: 0;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.aatj-origin-line::after {
  content: "";
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  animation: aatj-origin-travel 3.4s ease-in-out forwards .55s;
}

.aatj-origin-places {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 115px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.aatj-origin-sub {
  margin-top: 18px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: 0;
  animation: aatj-origin-appear 1.2s ease forwards 3.65s;
}

@keyframes aatj-origin-travel {
  to { width: 100%; }
}

@keyframes aatj-origin-appear {
  to { opacity: 1; }
}

@media (max-width: 650px) {
  .aatj-origin-inner {
    width: 86vw;
    padding: 60px 0;
  }

  .aatj-origin-line {
    top: 51%;
  }

  .aatj-origin-places {
    margin-top: 92px;
    gap: 8px;
    font-size: 8px;
    letter-spacing: .08em;
  }

  .aatj-intro-skip {
    top: 20px;
    right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aatj-origin-intro {
    display: none !important;
  }

  .aatj-origin-line::after,
  .aatj-origin-sub {
    animation: none !important;
  }
}
