/*
Theme Name: Greenway Atlas
Author: North Meadow Creative
Description: A mobile-first classic WordPress theme for environmental travel journals, route notes, and sustainable field stories.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: otp-theme
*/

:root {
  --otp-ink: #161811;
  --otp-forest: #243c2a;
  --otp-moss: #6f8f4d;
  --otp-lime: #d9fb5a;
  --otp-cream: #f5f0df;
  --otp-paper: #fffbef;
  --otp-clay: #c87954;
  --otp-sky: #b6d5cf;
  --otp-line: rgba(22, 24, 17, 0.16);
  --otp-shadow: 0 18px 50px rgba(22, 24, 17, 0.12);
  --otp-radius: 8px;
  --otp-container: 1180px;
  --otp-content: 80vw;
  --otp-font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --otp-font-display: Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--otp-cream);
  color: var(--otp-ink);
  font-family: var(--otp-font-main);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--otp-forest);
}

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

.otp-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;
}

.otp-screen-reader-text:focus,
.otp-skip-link:focus {
  position: fixed;
  z-index: 100000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--otp-lime);
  color: var(--otp-ink);
  border: 2px solid var(--otp-ink);
  border-radius: var(--otp-radius);
}

.otp-container {
  width: min(calc(100% - 32px), var(--otp-container));
  margin-inline: auto;
}

.otp-site-main {
  min-height: 60vh;
}

.otp-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 223, 0.9);
  border-bottom: 1px solid var(--otp-line);
  backdrop-filter: blur(16px);
}

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

.otp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--otp-ink);
  font-weight: 800;
  text-decoration: none;
}

.otp-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--otp-ink);
  color: var(--otp-lime);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.otp-brand-title {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otp-logo-image {
  width: auto;
  max-width: 180px;
  max-height: 52px;
}

.otp-menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  cursor: pointer;
  background: var(--otp-ink);
  color: var(--otp-paper);
  border: 1px solid var(--otp-ink);
  border-radius: 50%;
}

.otp-menu-icon,
.otp-menu-icon::before,
.otp-menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}

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

.otp-menu-icon::before,
.otp-menu-icon::after {
  position: absolute;
  content: "";
  left: 0;
}

.otp-menu-icon::before {
  top: -6px;
}

.otp-menu-icon::after {
  top: 6px;
}

.otp-menu-toggle[aria-expanded="true"] .otp-menu-icon {
  background: transparent;
}

.otp-menu-toggle[aria-expanded="true"] .otp-menu-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.otp-menu-toggle[aria-expanded="true"] .otp-menu-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

.otp-primary-nav {
  position: absolute;
  top: calc(100% + 1px);
  left: 16px;
  right: 16px;
  display: none;
  padding: 12px;
  background: var(--otp-paper);
  border: 1px solid var(--otp-line);
  border-radius: var(--otp-radius);
  box-shadow: var(--otp-shadow);
}

.otp-primary-nav.otp-is-open {
  display: block;
}

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

.otp-menu a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--otp-ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--otp-radius);
}

.otp-menu a:hover,
.otp-menu a:focus-visible {
  background: var(--otp-lime);
}

.otp-button,
.otp-comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  cursor: pointer;
  color: var(--otp-paper);
  background: var(--otp-ink);
  border: 1px solid var(--otp-ink);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.otp-button:hover,
.otp-button:focus-visible,
.otp-comment-form .submit:hover,
.otp-comment-form .submit:focus-visible {
  transform: translateY(-1px);
  color: var(--otp-ink);
  background: var(--otp-lime);
}

.otp-button-secondary {
  color: var(--otp-ink);
  background: transparent;
}

.otp-hero {
  padding: 46px 0 34px;
  overflow: hidden;
}

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

.otp-hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.otp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0;
  color: var(--otp-forest);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.otp-eyebrow::before {
  width: 10px;
  height: 10px;
  content: "";
  background: var(--otp-lime);
  border: 1px solid var(--otp-ink);
  border-radius: 50%;
}

.otp-hero-title,
.otp-section-title,
.otp-single-title,
.otp-archive-title {
  margin: 0;
  color: var(--otp-ink);
  font-family: var(--otp-font-display);
  font-weight: 700;
  line-height: 0.98;
}

.otp-hero-title {
  max-width: 860px;
  font-size: clamp(3rem, 11vw, 8.2rem);
}

.otp-hero-text {
  max-width: 650px;
  margin: 0;
  color: rgba(22, 24, 17, 0.78);
  font-size: clamp(1.02rem, 2vw, 1.25rem);
}

.otp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.otp-hero-mosaic {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  grid-auto-rows: minmax(120px, 1fr);
  gap: 10px;
  min-height: 440px;
}

.otp-mosaic-tile,
.otp-mosaic-fallback,
.otp-lime-card,
.otp-mini-card {
  border-radius: var(--otp-radius);
}

.otp-mosaic-tile {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  color: var(--otp-paper);
  background: var(--otp-forest);
  text-decoration: none;
}

.otp-mosaic-tile:nth-child(1) {
  grid-row: span 2;
}

.otp-mosaic-tile:nth-child(4) {
  grid-column: span 2;
}

.otp-mosaic-tile img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 240ms ease;
}

.otp-mosaic-tile:hover img,
.otp-mosaic-tile:focus-visible img {
  transform: scale(1.04);
}

.otp-mosaic-label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: calc(100% - 24px);
  min-height: 34px;
  padding: 7px 10px;
  overflow: hidden;
  color: var(--otp-paper);
  background: rgba(22, 24, 17, 0.78);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otp-mosaic-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--otp-paper);
  background:
    linear-gradient(135deg, rgba(217, 251, 90, 0.32), transparent 45%),
    linear-gradient(225deg, rgba(182, 213, 207, 0.36), transparent 48%),
    var(--otp-forest);
  font-family: var(--otp-font-display);
  font-size: 1.4rem;
  text-align: center;
}

.otp-lime-card {
  display: grid;
  align-content: space-between;
  min-height: 180px;
  padding: 18px;
  color: var(--otp-ink);
  background: var(--otp-lime);
  border: 1px solid rgba(22, 24, 17, 0.18);
}

.otp-lime-card strong {
  display: block;
  font-family: var(--otp-font-display);
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 0.9;
}

.otp-lime-card span {
  max-width: 180px;
  font-weight: 800;
}

.otp-tag-section {
  padding: 18px 0 48px;
}

.otp-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.otp-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--otp-ink);
  background: var(--otp-paper);
  border: 1px solid var(--otp-line);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.otp-tag-chip:hover,
.otp-tag-chip:focus-visible {
  background: var(--otp-ink);
  color: var(--otp-paper);
}

.otp-panel {
  padding: 56px 0;
  background: var(--otp-paper);
  border-top: 1px solid var(--otp-line);
  border-bottom: 1px solid var(--otp-line);
}

.otp-panel-alt {
  background: var(--otp-forest);
  color: var(--otp-paper);
}

.otp-section-head {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.otp-section-title {
  max-width: 860px;
  font-size: clamp(2.2rem, 6vw, 5.4rem);
}

.otp-panel-alt .otp-section-title,
.otp-panel-alt .otp-eyebrow,
.otp-panel-alt .otp-section-text {
  color: var(--otp-paper);
}

.otp-section-text {
  max-width: 680px;
  margin: 0;
  color: rgba(22, 24, 17, 0.72);
}

.otp-mini-grid {
  display: grid;
  gap: 12px;
}

.otp-mini-card {
  display: grid;
  gap: 18px;
  min-height: 210px;
  padding: 20px;
  background: var(--otp-cream);
  border: 1px solid var(--otp-line);
}

.otp-mini-card:nth-child(2) {
  background: var(--otp-lime);
}

.otp-mini-card:nth-child(3) {
  color: var(--otp-paper);
  background: var(--otp-ink);
}

.otp-mini-card h3 {
  margin: 0;
  font-family: var(--otp-font-display);
  font-size: 1.7rem;
  line-height: 1;
}

.otp-mini-card p {
  margin: 0;
}

.otp-mini-index {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}

.otp-post-grid {
  display: grid;
  gap: 16px;
}

.otp-post-card {
  min-width: 0;
}

.otp-post-card-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  color: inherit;
  background: var(--otp-paper);
  border: 1px solid var(--otp-line);
  border-radius: var(--otp-radius);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.otp-post-card-link:hover,
.otp-post-card-link:focus-visible {
  transform: translateY(-2px);
  color: inherit;
  box-shadow: var(--otp-shadow);
}

.otp-post-media {
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(217, 251, 90, 0.55), transparent 45%),
    var(--otp-sky);
}

.otp-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.otp-post-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 18px;
  color: var(--otp-forest);
  font-family: var(--otp-font-display);
  font-size: 1.4rem;
  text-align: center;
}

.otp-post-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.otp-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(22, 24, 17, 0.64);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.otp-post-title {
  margin: 0;
  font-family: var(--otp-font-display);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.02;
}

.otp-post-excerpt {
  margin: 0;
  color: rgba(22, 24, 17, 0.72);
}

.otp-empty-state {
  padding: 28px;
  background: var(--otp-paper);
  border: 1px solid var(--otp-line);
  border-radius: var(--otp-radius);
}

.otp-cta {
  padding: 58px 0;
  background: var(--otp-ink);
  color: var(--otp-paper);
}

.otp-cta-grid {
  display: grid;
  gap: 24px;
  align-items: end;
}

.otp-cta h2 {
  max-width: 800px;
  margin: 0;
  font-family: var(--otp-font-display);
  font-size: clamp(2.2rem, 7vw, 5.6rem);
  line-height: 0.98;
}

.otp-cta p {
  max-width: 560px;
  margin: 12px 0 0;
  color: rgba(255, 251, 239, 0.76);
}

.otp-contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.otp-contact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--otp-paper);
  font-weight: 800;
}

.otp-archive-head {
  padding: 44px 0 24px;
}

.otp-archive-title {
  font-size: clamp(2.6rem, 8vw, 6rem);
}

.otp-single-wrap {
  width: var(--otp-content);
  margin: 0 auto;
  padding: 42px 0 64px;
}

.otp-single-header {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
}

.otp-single-title {
  font-size: clamp(2.8rem, 8vw, 6.8rem);
}

.otp-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: rgba(22, 24, 17, 0.66);
  font-weight: 800;
}

.otp-single-content {
  font-size: clamp(1.05rem, 2vw, 1.16rem);
}

.otp-single-content > * {
  max-width: 100%;
}

.otp-single-content h2,
.otp-single-content h3,
.otp-single-content h4 {
  margin-top: 1.6em;
  margin-bottom: 0.45em;
  font-family: var(--otp-font-display);
  line-height: 1.05;
}

.otp-single-content p,
.otp-single-content ul,
.otp-single-content ol {
  margin-top: 0;
  margin-bottom: 1.2em;
}

.otp-single-content a {
  color: var(--otp-forest);
  font-weight: 800;
}

.otp-single-content img,
.otp-single-content figure {
  border-radius: var(--otp-radius);
}

.otp-single-content blockquote {
  margin: 1.5em 0;
  padding: 18px 20px;
  background: var(--otp-paper);
  border-left: 6px solid var(--otp-lime);
  border-radius: var(--otp-radius);
}

.otp-post-navigation {
  display: grid;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--otp-line);
}

.otp-post-navigation a {
  display: block;
  padding: 14px 16px;
  background: var(--otp-paper);
  border: 1px solid var(--otp-line);
  border-radius: var(--otp-radius);
  font-weight: 800;
  text-decoration: none;
}

.otp-site-footer {
  padding: 42px 0 22px;
  color: var(--otp-paper);
  background: var(--otp-forest);
}

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

.otp-footer-grid .otp-brand {
  color: var(--otp-paper);
}

.otp-footer-text {
  max-width: 380px;
  margin: 14px 0 0;
  color: rgba(255, 251, 239, 0.72);
}

.otp-footer-title {
  margin: 0 0 12px;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.otp-footer-menu {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.otp-footer-menu a {
  color: rgba(255, 251, 239, 0.78);
  text-decoration: none;
}

.otp-footer-menu a:hover,
.otp-footer-menu a:focus-visible {
  color: var(--otp-lime);
}

.otp-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 34px;
  padding-top: 18px;
  color: rgba(255, 251, 239, 0.62);
  border-top: 1px solid rgba(255, 251, 239, 0.16);
  font-size: 0.9rem;
}

.otp-footer-bottom p {
  margin: 0;
}

.otp-page-links {
  margin-top: 28px;
}

.otp-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
}

.otp-pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 12px;
  background: var(--otp-paper);
  border: 1px solid var(--otp-line);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.otp-pagination .current {
  background: var(--otp-ink);
  color: var(--otp-paper);
}

.otp-comments {
  width: var(--otp-content);
  margin: 0 auto 64px;
}

.otp-comment-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.otp-comment-list .comment-body {
  padding: 18px;
  background: var(--otp-paper);
  border: 1px solid var(--otp-line);
  border-radius: var(--otp-radius);
}

.otp-comment-form input:not([type="submit"]),
.otp-comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--otp-ink);
  background: var(--otp-paper);
  border: 1px solid var(--otp-line);
  border-radius: var(--otp-radius);
}

@media (min-width: 700px) {
  .otp-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .otp-footer-grid {
    grid-template-columns: 1.4fr 0.8fr 1fr;
  }
}

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

  .otp-primary-nav {
    position: static;
    display: block;
    width: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .otp-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
  }

  .otp-menu a {
    padding: 10px 12px;
  }

  .otp-hero {
    padding: 62px 0 54px;
  }

  .otp-hero-grid {
    grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.94fr);
    align-items: center;
  }

  .otp-post-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .otp-cta-grid {
    grid-template-columns: 1.4fr 0.6fr;
  }
}

@media (max-width: 520px) {
  .otp-container {
    width: min(calc(100% - 24px), var(--otp-container));
  }

  .otp-hero-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    min-height: 0;
  }

  .otp-mosaic-tile,
  .otp-mosaic-tile:nth-child(1),
  .otp-mosaic-tile:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
    min-height: 190px;
  }

  .otp-single-wrap,
  .otp-comments {
    width: 80vw;
  }
}

@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;
  }
}
