/*
Theme Name: Taxwise Journal
Theme URI: https://example.com/taxwise-journal
Author: OpenAI
Description: A welcoming, editorial WordPress theme for tax education and personal-finance blogs.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taxwise-journal
*/

:root {
  --ink: #172a26;
  --muted: #64736d;
  --green: #1d5b48;
  --green-dark: #143f34;
  --mint: #e7f0e9;
  --paper: #fbfaf6;
  --line: #e4e6df;
  --gold: #d99748;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  color: #fff;
  background: var(--green-dark);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner,
.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50% 50% 50% 12px;
  color: #fff;
  background: var(--green);
  font-family: var(--sans);
  font-size: 17px;
}

.custom-logo-link img {
  max-height: 52px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 27px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: var(--green);
}

.nav-cta,
.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 4px;
  color: #fff !important;
  background: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.nav-cta:hover,
.button-link:hover {
  transform: translateY(-1px);
  color: #fff;
  background: var(--green-dark);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 11px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.home-hero {
  overflow: hidden;
  padding: 76px 0 66px;
  background: var(--mint);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 55px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-title,
.page-title {
  max-width: 640px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5.2vw, 66px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero-title em {
  color: var(--green);
  font-weight: 500;
}

.hero-copy {
  max-width: 500px;
  margin: 20px 0 26px;
  color: #465850;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.text-link {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.hero-art {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: 48% 48% 7px 7px;
  background: #d3e2d5;
}

.hero-art::before {
  position: absolute;
  top: 28px;
  right: 35px;
  width: 185px;
  height: 185px;
  border: 1px solid rgba(29, 91, 72, 0.17);
  border-radius: 50%;
  content: "";
}

.hero-art::after {
  position: absolute;
  right: -52px;
  bottom: -100px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(29, 91, 72, 0.24);
  border-radius: 50%;
  content: "";
}

.art-sun {
  position: absolute;
  top: 64px;
  right: 77px;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: #e6bd77;
}

.art-paper {
  position: absolute;
  z-index: 1;
  top: 73px;
  left: 19%;
  display: flex;
  width: 205px;
  height: 255px;
  flex-direction: column;
  padding: 27px 25px;
  transform: rotate(-7deg);
  border: 1px solid #e8e4d8;
  border-radius: 4px;
  background: #fffdf6;
  box-shadow: 0 18px 45px rgba(27, 55, 45, 0.12);
}

.art-paper-label {
  margin-bottom: 18px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.art-paper-line {
  height: 7px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #dce5dc;
}

.art-paper-line.short {
  width: 62%;
}

.art-paper-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--green);
  font-family: var(--serif);
  font-size: 23px;
}

.home-section {
  padding: 65px 0 76px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(29px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(23, 42, 38, 0.08);
}

.post-card-image,
.post-card-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1.6;
  object-fit: cover;
  background: #e5eee7;
}

.post-card-placeholder {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #dceade, #f1e7d5);
}

.post-card-placeholder::before,
.post-card-placeholder::after {
  position: absolute;
  content: "";
}

.post-card-placeholder::before {
  top: 22%;
  left: 35%;
  width: 28%;
  height: 65%;
  transform: rotate(9deg);
  border-radius: 3px;
  background: rgba(255, 253, 246, 0.9);
  box-shadow: 12px 9px 0 rgba(29, 91, 72, 0.12);
}

.post-card-placeholder::after {
  right: 15%;
  bottom: -45%;
  width: 55%;
  aspect-ratio: 1;
  border: 1px solid rgba(29, 91, 72, 0.2);
  border-radius: 50%;
}

.post-card-body {
  padding: 22px 22px 24px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

.post-meta a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.post-card h3 {
  margin: 12px 0 9px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.post-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--green);
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.content-area {
  padding: 56px 0 80px;
}

.archive-header {
  margin-bottom: 36px;
}

.archive-header .page-title {
  font-size: clamp(38px, 5vw, 56px);
}

.archive-description {
  max-width: 670px;
  margin-top: 14px;
  color: var(--muted);
}

.archive-description > :first-child {
  margin-top: 0;
}

.archive-description > :last-child {
  margin-bottom: 0;
}

.pagination {
  margin-top: 38px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination .page-numbers {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  text-decoration: none;
}

.pagination .current {
  color: #fff;
  background: var(--green);
}

.single-header {
  max-width: 790px;
  margin: 0 auto 34px;
}

.single-header .page-title {
  margin: 12px 0 18px;
  font-size: clamp(38px, 5vw, 58px);
}

.single-featured-image {
  width: 100%;
  max-height: 540px;
  margin: 0 auto 38px;
  border-radius: 5px;
  object-fit: cover;
}

.entry-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.8;
}

.entry-content > :first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 1.7em;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
}

.entry-content h2 {
  font-size: 34px;
}

.entry-content h3 {
  font-size: 27px;
}

.entry-content blockquote {
  margin: 1.7em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--gold);
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: 24px;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  padding: 11px;
  border: 1px solid var(--line);
  text-align: left;
}

.entry-content pre {
  overflow-x: auto;
  padding: 18px;
  background: #eef2ed;
}

.entry-content .alignwide {
  max-width: 900px;
  margin-inline: 50%;
  transform: translateX(-50%);
}

.entry-content .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-inline: 50%;
  transform: translateX(-50%);
}

.entry-content .wp-block-image img {
  border-radius: 4px;
}

.entry-footer {
  max-width: 720px;
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.entry-footer a {
  margin-right: 8px;
}

.comments-area {
  max-width: 720px;
  margin: 48px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.comments-area h2,
.comments-area h3 {
  font-family: var(--serif);
  font-weight: 500;
}

.comment-list {
  padding-left: 22px;
}

.comment-form input:not([type="checkbox"]):not([type="submit"]),
.comment-form textarea,
.search-form input[type="search"] {
  width: 100%;
  border: 1px solid #cbd4cd;
  border-radius: 3px;
  padding: 11px 12px;
  background: #fff;
}

.comment-form input[type="submit"],
.search-form input[type="submit"] {
  min-height: 42px;
  margin-top: 8px;
  border: 0;
  border-radius: 3px;
  padding: 0 16px;
  color: #fff;
  background: var(--green);
  font-weight: 700;
  cursor: pointer;
}

.search-form {
  display: flex;
  max-width: 480px;
  gap: 8px;
  margin-top: 20px;
}

.search-form input[type="submit"] {
  flex: 0 0 auto;
  margin: 0;
}

.empty-state {
  padding: 34px;
  border: 1px dashed #cbd4cd;
  border-radius: 4px;
  background: #fff;
}

.empty-state h2 {
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 500;
}

.site-footer {
  padding: 44px 0 24px;
  color: #e8f0ea;
  background: var(--green-dark);
}

.footer-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 36px;
  padding-bottom: 32px;
}

.footer-brand {
  color: #fff;
}

.footer-about {
  max-width: 360px;
  margin: 13px 0 0;
  color: #c3d2c9;
  font-size: 14px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: #e8f0ea;
  font-size: 14px;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 19px;
  border-top: 1px solid rgba(232, 240, 234, 0.2);
  color: #c3d2c9;
  font-size: 12px;
}

.footer-disclaimer {
  max-width: 620px;
  margin: 0;
}

@media (max-width: 800px) {
  .header-inner,
  .container {
    width: min(100% - 36px, 620px);
  }

  .header-inner {
    min-height: 72px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    gap: 18px;
    padding: 18px max(18px, calc((100% - 620px) / 2));
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .site-nav.is-open {
    display: flex;
    flex-direction: column;
  }

  .site-nav ul {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
  }

  .nav-cta {
    align-self: flex-start;
  }

  .hero-grid {
    grid-template-columns: 1fr 0.8fr;
    gap: 25px;
  }

  .hero-art {
    min-height: 290px;
  }

  .art-paper {
    left: 10%;
    transform: scale(0.86) rotate(-7deg);
    transform-origin: top left;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-grid .post-card:last-child:nth-child(odd) {
    display: none;
  }
}

@media (max-width: 580px) {
  .home-hero {
    padding: 50px 0 45px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 46px;
  }

  .hero-art {
    min-height: 275px;
    margin: 5px 13px 0;
  }

  .art-paper {
    left: 22%;
  }

  .home-section,
  .content-area {
    padding: 46px 0 56px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .post-grid .post-card:last-child:nth-child(odd) {
    display: block;
  }

  .post-card h3 {
    font-size: 22px;
  }

  .single-header .page-title,
  .archive-header .page-title {
    font-size: 39px;
  }

  .entry-content {
    font-size: 17px;
  }

  .entry-content h2 {
    font-size: 29px;
  }

  .footer-main,
  .footer-bottom {
    flex-direction: column;
  }

  .footer-bottom {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
