/*
Theme Name: In Prison Documentary
Theme URI: https://www.inprisonmywholelife.com/
Author: Codex
Description: A classic PHP WordPress theme for documentary, justice, incarceration, and social commentary publishing.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
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: inprison-documentary
*/

:root {
  --ip-bg: #f4efe6;
  --ip-paper: #fffaf0;
  --ip-ink: #171512;
  --ip-muted: #6e675c;
  --ip-line: rgba(23, 21, 18, 0.16);
  --ip-dark: #120f0c;
  --ip-dark-2: #211b16;
  --ip-dark-line: rgba(255, 250, 240, 0.16);
  --ip-text-light: #fff6e8;
  --ip-accent: #b84b32;
  --ip-accent-2: #d8a24f;
  --ip-radius: 18px;
  --ip-shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ip-bg);
  color: var(--ip-ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

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

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

.screen-reader-text,
.ip-skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.ip-skip-link:focus {
  z-index: 100;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--ip-paper);
  color: var(--ip-ink);
}

.ip-shell {
  width: min(100% - 40px, var(--ip-shell));
  margin: 0 auto;
}

.ip-site-header {
  position: sticky;
  z-index: 60;
  top: 0;
  border-bottom: 1px solid var(--ip-dark-line);
  background: rgba(18, 15, 12, 0.92);
  color: var(--ip-text-light);
  backdrop-filter: blur(18px);
}

body.admin-bar .ip-site-header {
  top: 32px;
}

.ip-header-shell {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}

.ip-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.ip-logo-frame {
  display: grid;
  width: 58px;
  height: 58px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 246, 232, 0.32);
  border-radius: 50%;
  background: #29221c;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.ip-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ip-brand-fallback {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ip-accent);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 800;
}

.ip-brand-copy {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.ip-brand-name {
  max-width: 210px;
  overflow: hidden;
  color: var(--ip-text-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-brand-tagline {
  max-width: 210px;
  overflow: hidden;
  color: rgba(255, 246, 232, 0.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-category-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.ip-category-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 4px;
  overflow-x: auto;
  list-style: none;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ip-category-list::-webkit-scrollbar {
  display: none;
}

.ip-category-list li {
  flex: 0 0 auto;
}

.ip-category-list a {
  display: inline-flex;
  max-width: 210px;
  min-height: 34px;
  align-items: center;
  overflow: hidden;
  padding: 8px 13px;
  border: 1px solid rgba(255, 246, 232, 0.18);
  border-radius: 999px;
  color: rgba(255, 246, 232, 0.86);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-category-list a:hover,
.ip-category-list a:focus {
  border-color: var(--ip-accent-2);
  background: var(--ip-accent-2);
  color: var(--ip-dark);
}

.ip-header-actions {
  display: flex;
  flex: 0 0 auto;
}

.ip-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ip-accent);
  color: #fff;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ip-button:hover,
.ip-button:focus {
  background: var(--ip-accent-2);
  color: var(--ip-dark);
  transform: translateY(-1px);
}

.ip-button-secondary {
  border-color: rgba(255, 246, 232, 0.28);
  background: transparent;
  color: var(--ip-text-light);
}

.ip-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--ip-accent);
  color: #fff;
  cursor: pointer;
}

.ip-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.ip-hero {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  background: var(--ip-dark);
  color: var(--ip-text-light);
}

.ip-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ip-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(18, 15, 12, 0.92), rgba(18, 15, 12, 0.68) 42%, rgba(18, 15, 12, 0.12)),
    linear-gradient(0deg, rgba(18, 15, 12, 0.7), rgba(18, 15, 12, 0.08) 45%);
}

.ip-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 720px;
  align-content: center;
  padding: 90px 0 120px;
}

.ip-hero-copy {
  width: min(100%, 760px);
}

.ip-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--ip-accent-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ip-kicker::before {
  width: 34px;
  height: 1px;
  background: currentColor;
  content: "";
}

.ip-hero-title,
.ip-page-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 8vw, 112px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.92;
}

.ip-hero-text {
  width: min(100%, 620px);
  margin: 26px 0 0;
  color: rgba(255, 246, 232, 0.84);
  font-size: 19px;
}

.ip-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.ip-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.ip-hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 246, 232, 0.2);
  border-radius: 999px;
  color: rgba(255, 246, 232, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.ip-section {
  padding: 92px 0;
}

.ip-section-dark {
  background: var(--ip-dark);
  color: var(--ip-text-light);
}

.ip-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.ip-section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
}

.ip-section-text {
  max-width: 540px;
  margin: 10px 0 0;
  color: var(--ip-muted);
}

.ip-section-dark .ip-section-text {
  color: rgba(255, 246, 232, 0.7);
}

.ip-dossier-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
}

.ip-dossier-grid-balanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.ip-dossier-card {
  overflow: hidden;
  border: 1px solid var(--ip-line);
  border-radius: var(--ip-radius);
  background: var(--ip-paper);
  box-shadow: 0 24px 60px rgba(44, 34, 26, 0.08);
}

.ip-dossier-card-feature {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  min-height: 272px;
}

.ip-dossier-grid-balanced .ip-dossier-card-feature:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  grid-template-columns: 32% minmax(0, 1fr);
  min-height: 238px;
}

.ip-dossier-card-large {
  display: grid;
  grid-template-columns: 1fr 0.86fr;
}

.ip-dossier-media,
.ip-card-media {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  background: #221b16;
}

.ip-dossier-card-large .ip-dossier-media {
  min-height: 440px;
}

.ip-dossier-card-feature .ip-dossier-media {
  min-height: 272px;
}

.ip-dossier-media img,
.ip-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ip-dossier-content {
  display: grid;
  align-content: center;
  padding: 34px;
}

.ip-label {
  color: var(--ip-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ip-dossier-content h3 {
  margin: 12px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
}

.ip-dossier-content p {
  margin: 0;
  color: var(--ip-muted);
}

.ip-dossier-card-feature .ip-dossier-content {
  min-width: 0;
  padding: 26px;
}

.ip-dossier-card-feature .ip-dossier-content h3 {
  font-size: clamp(24px, 2.3vw, 36px);
}

.ip-dossier-card-feature .ip-dossier-content p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ip-dossier-stack {
  display: grid;
  gap: 22px;
}

.ip-dossier-stack .ip-dossier-card {
  display: grid;
  grid-template-columns: 0.88fr 1fr;
}

.ip-dossier-stack .ip-dossier-media {
  min-height: 220px;
}

.ip-dossier-stack .ip-dossier-content {
  padding: 24px;
}

.ip-dossier-stack h3 {
  font-size: 29px;
}

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

.ip-post-card {
  overflow: hidden;
  border: 1px solid var(--ip-line);
  border-radius: var(--ip-radius);
  background: var(--ip-paper);
  box-shadow: 0 20px 54px rgba(44, 34, 26, 0.08);
}

.ip-post-card .ip-card-media {
  aspect-ratio: 16 / 10;
  min-height: 0;
}

.ip-post-list {
  width: min(100%, 980px);
  grid-template-columns: 1fr;
}

.ip-post-list .ip-post-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: stretch;
}

.ip-post-list .ip-card-media {
  width: 220px;
  height: 168px;
  aspect-ratio: auto;
}

.ip-post-list .ip-card-body {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 20px 24px;
}

.ip-post-list .ip-card-title {
  font-size: 30px;
}

.ip-post-list .ip-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ip-card-body {
  padding: 22px;
}

.ip-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--ip-muted);
  font-size: 12px;
  font-weight: 800;
}

.ip-card-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1.08;
}

.ip-card-excerpt {
  margin: 12px 0 0;
  color: var(--ip-muted);
  font-size: 15px;
}

.ip-focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--ip-dark-line);
  background: var(--ip-dark-line);
}

.ip-focus-item {
  min-height: 250px;
  padding: 26px;
  background: var(--ip-dark-2);
}

.ip-focus-item h3 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.05;
}

.ip-focus-item p {
  margin: 0;
  color: rgba(255, 246, 232, 0.68);
}

.ip-listing,
.ip-entry {
  padding: 82px 0;
}

.ip-page-header {
  margin-bottom: 34px;
}

.ip-page-title {
  font-size: clamp(44px, 6vw, 84px);
}

.ip-listing .ip-page-title {
  max-width: 920px;
  font-size: clamp(40px, 5.2vw, 72px);
}

.ip-entry-wrap {
  width: min(100% - 40px, 820px);
  margin: 0 auto;
}

.ip-entry-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ip-line);
}

.ip-entry-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.ip-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: var(--ip-muted);
  font-size: 13px;
  font-weight: 800;
}

.ip-entry-content {
  font-size: 19px;
}

.ip-entry-content h2,
.ip-entry-content h3 {
  margin-top: 42px;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
}

.ip-entry-content p {
  margin: 0 0 22px;
}

.ip-entry-content a {
  color: var(--ip-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ip-entry-content img {
  border-radius: var(--ip-radius);
}

.ip-entry-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ip-line);
  color: var(--ip-muted);
}

.ip-pagination {
  margin-top: 34px;
}

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

.ip-pagination a,
.ip-pagination span {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--ip-line);
  border-radius: 999px;
  background: var(--ip-paper);
  font-weight: 800;
}

.ip-pagination .current {
  background: var(--ip-dark);
  color: var(--ip-text-light);
}

.ip-empty {
  max-width: 720px;
  padding: 30px;
  border: 1px solid var(--ip-line);
  border-radius: var(--ip-radius);
  background: var(--ip-paper);
}

.ip-site-footer {
  padding: 58px 0;
  border-top: 1px solid var(--ip-dark-line);
  background: var(--ip-dark);
  color: var(--ip-text-light);
}

.ip-footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
}

.ip-footer-brand {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.ip-footer-brand p {
  margin: 0;
  color: rgba(255, 246, 232, 0.68);
}

.ip-footer-meta {
  color: rgba(255, 246, 232, 0.56);
  font-size: 13px;
  text-align: right;
}

@media (max-width: 1040px) {
  body.admin-bar .ip-site-header {
    top: 46px;
  }

  .ip-header-shell {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .ip-category-nav {
    display: none;
    flex: 0 0 100%;
    width: 100%;
  }

  .ip-site-header.is-open .ip-category-nav {
    display: block;
  }

  .ip-category-list {
    justify-content: flex-start;
    padding: 10px 0 4px;
  }

  .ip-header-actions {
    display: none;
  }

  .ip-menu-toggle {
    display: inline-block;
  }

  .ip-dossier-grid,
  .ip-dossier-card-large,
  .ip-dossier-card-feature,
  .ip-dossier-stack .ip-dossier-card,
  .ip-post-grid,
  .ip-focus-grid,
  .ip-footer-grid {
    grid-template-columns: 1fr;
  }

  .ip-dossier-card-feature {
    min-height: 0;
  }

  .ip-dossier-card-feature .ip-dossier-media {
    min-height: 250px;
  }

  .ip-footer-meta {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .ip-shell,
  .ip-entry-wrap {
    width: min(100% - 32px, var(--ip-shell));
  }

  .ip-brand-tagline {
    display: none;
  }

  .ip-brand-name {
    max-width: 190px;
  }

  .ip-hero,
  .ip-hero-content {
    min-height: 660px;
  }

  .ip-hero-content {
    padding: 72px 0 92px;
  }

  .ip-hero-title {
    font-size: 48px;
  }

  .ip-hero-text,
  .ip-entry-content {
    font-size: 17px;
  }

  .ip-hero-actions,
  .ip-button {
    width: 100%;
  }

  .ip-section,
  .ip-listing,
  .ip-entry {
    padding: 58px 0;
  }

  .ip-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ip-post-list .ip-post-card {
    grid-template-columns: 1fr;
  }

  .ip-post-list .ip-card-media {
    width: 100%;
    height: 210px;
  }

  .ip-post-list .ip-card-body {
    padding: 20px;
  }

  .ip-post-list .ip-card-title {
    font-size: 26px;
  }
}
