/*
Theme Name: Cedar Trail Notes
Author: Lumen Pine Works
Description: A mobile-first classic editorial theme with dynamic WordPress content, menus, categories, and featured-image driven layouts.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: ptg-theme
*/

:root {
  --ptg-color-bg: #080a08;
  --ptg-color-panel: #11150f;
  --ptg-color-panel-soft: #171c14;
  --ptg-color-text: #f3efe4;
  --ptg-color-muted: #b9b09f;
  --ptg-color-line: rgba(243, 239, 228, 0.16);
  --ptg-color-accent: #d7ff69;
  --ptg-color-accent-strong: #f1ffb0;
  --ptg-color-copper: #c7a46d;
  --ptg-shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
  --ptg-font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ptg-font-serif: Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ptg-color-bg);
  color: var(--ptg-color-text);
  font-family: var(--ptg-font-main);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover,
a:focus-visible {
  color: var(--ptg-color-accent);
}

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

[hidden] {
  display: none !important;
}

.ptg-skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-160%);
  border: 1px solid var(--ptg-color-line);
  border-radius: 6px;
  background: var(--ptg-color-accent);
  color: #11150f;
  padding: 10px 14px;
  font-weight: 700;
}

.ptg-skip-link:focus {
  transform: translateY(0);
}

.ptg-shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.ptg-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--ptg-color-line);
  background: rgba(8, 10, 8, 0.88);
  backdrop-filter: blur(18px);
}

.ptg-header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ptg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
}

.ptg-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ptg-color-line);
  border-radius: 8px;
  background: var(--ptg-color-panel-soft);
  color: var(--ptg-color-accent);
  font-size: 13px;
  text-transform: uppercase;
}

.ptg-brand-text {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ptg-custom-logo {
  display: inline-flex;
  align-items: center;
  max-width: 140px;
  max-height: 48px;
}

.ptg-logo-image {
  width: auto;
  max-width: 140px;
  max-height: 48px;
}

.ptg-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--ptg-color-line);
  border-radius: 999px;
  background: var(--ptg-color-panel);
  color: var(--ptg-color-text);
  padding: 0 14px;
  cursor: pointer;
}

.ptg-menu-toggle:hover,
.ptg-menu-toggle:focus-visible {
  border-color: var(--ptg-color-accent);
  color: var(--ptg-color-accent);
}

.ptg-menu-icon,
.ptg-menu-icon::before,
.ptg-menu-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  content: "";
}

.ptg-menu-icon {
  position: relative;
}

.ptg-menu-icon::before,
.ptg-menu-icon::after {
  position: absolute;
  left: 0;
}

.ptg-menu-icon::before {
  top: -5px;
}

.ptg-menu-icon::after {
  top: 5px;
}

.ptg-menu-panel {
  position: absolute;
  inset: 72px 16px auto;
  border: 1px solid var(--ptg-color-line);
  border-radius: 8px;
  background: rgba(17, 21, 15, 0.98);
  box-shadow: var(--ptg-shadow);
  padding: 10px;
}

.ptg-menu {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ptg-menu a {
  display: flex;
  min-height: 44px;
  align-items: center;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--ptg-color-muted);
  font-size: 14px;
}

.ptg-menu a:hover,
.ptg-menu a:focus-visible,
.ptg-wp-current-menu-item > a,
.ptg-wp-current_page_item > a {
  background: rgba(215, 255, 105, 0.1);
  color: var(--ptg-color-text);
}

.ptg-main {
  min-height: 70vh;
}

.ptg-section {
  padding: 64px 0;
}

.ptg-section + .ptg-section {
  border-top: 1px solid var(--ptg-color-line);
}

.ptg-section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.ptg-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ptg-color-muted);
  font-size: 13px;
  text-transform: lowercase;
}

.ptg-section-number {
  color: var(--ptg-color-accent);
  font-family: var(--ptg-font-serif);
  font-size: 15px;
}

.ptg-section-title {
  max-width: 780px;
  margin: 0;
  font-family: var(--ptg-font-serif);
  font-size: clamp(2rem, 7vw, 5.4rem);
  font-weight: 500;
  line-height: 0.95;
}

.ptg-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ptg-color-line);
  padding: 54px 0 38px;
}

.ptg-hero-grid {
  display: grid;
  gap: 28px;
}

.ptg-hero-copy {
  display: grid;
  align-content: center;
  gap: 22px;
}

.ptg-hero-title {
  margin: 0;
  font-family: var(--ptg-font-serif);
  font-size: clamp(3rem, 15vw, 8.5rem);
  font-weight: 500;
  line-height: 0.88;
}

.ptg-hero-summary {
  max-width: 650px;
  margin: 0;
  color: var(--ptg-color-muted);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
}

.ptg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ptg-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ptg-color-line);
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
}

.ptg-button-primary {
  border-color: var(--ptg-color-accent);
  background: var(--ptg-color-accent);
  color: #11150f;
}

.ptg-button-primary:hover,
.ptg-button-primary:focus-visible {
  background: var(--ptg-color-accent-strong);
  color: #11150f;
}

.ptg-button-secondary {
  background: rgba(243, 239, 228, 0.04);
  color: var(--ptg-color-text);
}

.ptg-feature {
  display: grid;
  overflow: hidden;
  min-height: 440px;
  border: 1px solid var(--ptg-color-line);
  border-radius: 8px;
  background: var(--ptg-color-panel);
  box-shadow: var(--ptg-shadow);
}

.ptg-feature-media {
  min-height: 260px;
  background: var(--ptg-color-panel-soft);
}

.ptg-feature-media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.ptg-feature-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 24px;
  color: var(--ptg-color-muted);
  text-align: center;
}

.ptg-feature-body {
  display: grid;
  gap: 12px;
  align-content: end;
  padding: 22px;
}

.ptg-feature-label {
  color: var(--ptg-color-accent);
  font-size: 13px;
  text-transform: lowercase;
}

.ptg-feature-title {
  margin: 0;
  font-family: var(--ptg-font-serif);
  font-size: clamp(1.7rem, 6vw, 3rem);
  font-weight: 500;
  line-height: 1;
}

.ptg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--ptg-color-muted);
  font-size: 13px;
}

.ptg-category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.ptg-category-chip {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--ptg-color-line);
  border-radius: 999px;
  background: rgba(243, 239, 228, 0.04);
  padding: 0 14px;
  color: var(--ptg-color-muted);
  font-size: 14px;
}

.ptg-category-chip:hover,
.ptg-category-chip:focus-visible {
  border-color: var(--ptg-color-accent);
  color: var(--ptg-color-accent);
}

.ptg-grid {
  display: grid;
  gap: 16px;
}

.ptg-card {
  overflow: hidden;
  border: 1px solid var(--ptg-color-line);
  border-radius: 8px;
  background: rgba(243, 239, 228, 0.035);
}

.ptg-card-link {
  display: grid;
  height: 100%;
}

.ptg-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ptg-color-panel-soft);
}

.ptg-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.ptg-card:hover .ptg-card-media img,
.ptg-card:focus-within .ptg-card-media img {
  transform: scale(1.04);
}

.ptg-card-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.ptg-card-title {
  margin: 0;
  font-family: var(--ptg-font-serif);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 500;
  line-height: 1.05;
}

.ptg-card-excerpt {
  margin: 0;
  color: var(--ptg-color-muted);
}

.ptg-empty {
  border: 1px solid var(--ptg-color-line);
  border-radius: 8px;
  background: rgba(243, 239, 228, 0.035);
  padding: 24px;
  color: var(--ptg-color-muted);
}

.ptg-single-wrap {
  width: min(80vw, 980px);
  margin: 0 auto;
  padding: 58px 0 72px;
}

.ptg-single-header {
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
}

.ptg-single-title {
  margin: 0;
  font-family: var(--ptg-font-serif);
  font-size: clamp(2.4rem, 10vw, 7rem);
  font-weight: 500;
  line-height: 0.92;
}

.ptg-content {
  color: var(--ptg-color-text);
  font-size: clamp(1rem, 2.2vw, 1.13rem);
}

.ptg-content > * {
  margin-top: 0;
  margin-bottom: 1.35em;
}

.ptg-content h1,
.ptg-content h2,
.ptg-content h3,
.ptg-content h4,
.ptg-content h5,
.ptg-content h6 {
  margin-top: 1.55em;
  margin-bottom: 0.6em;
  font-family: var(--ptg-font-serif);
  font-weight: 500;
  line-height: 1.05;
}

.ptg-content a {
  color: var(--ptg-color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.ptg-content img {
  border-radius: 8px;
}

.ptg-content blockquote {
  margin-inline: 0;
  border-left: 3px solid var(--ptg-color-accent);
  padding-left: 18px;
  color: var(--ptg-color-muted);
  font-family: var(--ptg-font-serif);
  font-size: 1.35em;
}

.ptg-content table {
  width: 100%;
  border-collapse: collapse;
}

.ptg-content th,
.ptg-content td {
  border: 1px solid var(--ptg-color-line);
  padding: 10px;
}

.ptg-content input,
.ptg-content textarea,
.ptg-content select {
  width: 100%;
  border: 1px solid var(--ptg-color-line);
  border-radius: 6px;
  background: var(--ptg-color-panel);
  color: var(--ptg-color-text);
  padding: 11px 12px;
}

.ptg-post-nav {
  display: grid;
  gap: 12px;
  margin-top: 46px;
  padding-top: 30px;
  border-top: 1px solid var(--ptg-color-line);
}

.ptg-post-nav-item a {
  display: grid;
  gap: 4px;
  border: 1px solid var(--ptg-color-line);
  border-radius: 8px;
  background: rgba(243, 239, 228, 0.035);
  padding: 16px;
}

.ptg-post-nav-label {
  color: var(--ptg-color-accent);
  font-size: 13px;
}

.ptg-comments {
  margin-top: 52px;
  border-top: 1px solid var(--ptg-color-line);
  padding-top: 32px;
}

.ptg-comments-title,
.ptg-comment-reply-title {
  margin: 0 0 20px;
  font-family: var(--ptg-font-serif);
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 500;
  line-height: 1;
}

.ptg-comment-list {
  display: grid;
  gap: 16px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.ptg-comment-body {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--ptg-color-line);
  border-radius: 8px;
  background: rgba(243, 239, 228, 0.035);
  padding: 14px;
}

.ptg-comment-avatar img {
  border-radius: 50%;
}

.ptg-comment-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.ptg-comment-date,
.ptg-comment-note {
  color: var(--ptg-color-muted);
  font-size: 13px;
}

.ptg-comment-text > *:last-child {
  margin-bottom: 0;
}

.ptg-comment-reply a {
  color: var(--ptg-color-accent);
  font-size: 13px;
  font-weight: 700;
}

.ptg-comment-form,
.ptg-search-form {
  display: grid;
  gap: 14px;
}

.ptg-form-field {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--ptg-color-muted);
}

.ptg-input,
.ptg-textarea {
  width: 100%;
  border: 1px solid var(--ptg-color-line);
  border-radius: 6px;
  background: var(--ptg-color-panel);
  color: var(--ptg-color-text);
  padding: 11px 12px;
}

.ptg-search-form {
  max-width: 620px;
  margin-top: 24px;
}

.ptg-page-title {
  margin: 0;
  font-family: var(--ptg-font-serif);
  font-size: clamp(2.4rem, 10vw, 6rem);
  font-weight: 500;
  line-height: 0.95;
}

.ptg-footer {
  border-top: 1px solid var(--ptg-color-line);
  background: #050605;
  padding: 46px 0 26px;
}

.ptg-footer-grid {
  display: grid;
  gap: 28px;
}

.ptg-footer-title {
  margin: 0;
  font-family: var(--ptg-font-serif);
  font-size: clamp(2rem, 9vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
}

.ptg-footer-text,
.ptg-footer-copy {
  margin: 0;
  color: var(--ptg-color-muted);
}

.ptg-footer-widgets {
  display: grid;
  gap: 18px;
}

.ptg-footer-widget {
  border-top: 1px solid var(--ptg-color-line);
  padding-top: 18px;
}

.ptg-footer-nav {
  margin-top: 28px;
}

.ptg-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 32px;
  border-top: 1px solid var(--ptg-color-line);
  padding-top: 18px;
}

.ptg-screen-reader-text {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.alignwide {
  max-width: 1120px;
  margin-inline: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

@media (min-width: 720px) {
  .ptg-section {
    padding: 88px 0;
  }

  .ptg-hero {
    padding: 76px 0 54px;
  }

  .ptg-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: stretch;
  }

  .ptg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ptg-post-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ptg-footer-grid {
    grid-template-columns: 1fr minmax(260px, 0.55fr);
    align-items: start;
  }
}

@media (min-width: 960px) {
  .ptg-menu-toggle {
    display: none;
  }

  .ptg-menu-panel {
    position: static;
    display: block !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .ptg-menu {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .ptg-menu a {
    min-height: 38px;
  }

  .ptg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ptg-card:first-child {
    grid-column: span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
