/*
Theme Name: Longtail Inmate SEO
Theme URI: https://textinganinmate.com/
Author: OpenAI Codex
Description: A minimal reusable WordPress theme for long-tail inmate messaging domains.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: longtail-inmate-seo
*/

:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --ink: #17211f;
  --muted: #56625f;
  --line: #dce7e3;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --coral: #f97361;
  --mint: #dff7ef;
  --shadow: 0 16px 40px rgba(23, 33, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

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

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

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 250, 249, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav,
.nav-links,
.actions,
.proof-list,
.message-panel,
.footer-grid {
  display: flex;
  align-items: center;
}

.nav {
  min-height: 76px;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.nav-links {
  gap: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.1;
}

.button-primary {
  background: var(--teal);
  color: #fff;
}

.button-primary:hover,
.button-primary:focus {
  background: var(--teal-dark);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 3.5rem;
  background:
    linear-gradient(90deg, rgba(247, 250, 249, 0.98), rgba(247, 250, 249, 0.74)),
    url("assets/og-image.png") right 8% center / min(34rem, 70vw) no-repeat;
}

.hero-content {
  display: grid;
  gap: 2rem;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 12ch;
  margin-top: 1rem;
  font-size: 3.75rem;
}

h2 {
  font-size: 2.35rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
  color: var(--muted);
}

.lede {
  max-width: 720px;
  margin-top: 1.2rem;
  font-size: 1.2rem;
}

.actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.proof-list {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.75rem 0 0;
  padding: 0;
}

.proof-list div,
.message-panel,
.feature-card,
.faq-card,
.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.proof-list div {
  min-width: 10rem;
  padding: 1rem;
}

.proof-list dt {
  font-size: 1.2rem;
  font-weight: 900;
}

.proof-list dd {
  margin: 0;
  color: var(--muted);
}

.message-panel {
  flex-wrap: wrap;
  gap: 0.8rem;
  width: min(100%, 860px);
  padding: 1rem;
}

.hero-image {
  width: 4rem;
  height: 4rem;
  border-radius: 8px;
}

.message-panel span,
.message-panel small {
  color: var(--muted);
  font-weight: 800;
}

.message-panel strong {
  padding: 0.55rem 0.7rem;
  background: var(--mint);
  border-radius: 8px;
}

section {
  padding: 4rem 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2rem;
  align-items: start;
}

.split-section p,
.section-heading {
  margin-top: 1rem;
}

.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.8rem;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps span {
  grid-row: span 2;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  background: var(--teal);
  color: #fff;
  border-radius: 8px;
  font-weight: 900;
}

.steps strong {
  font-size: 1.1rem;
}

.feature-grid,
.faq-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

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

.feature-card,
.faq-card,
.post-card,
.content-card {
  padding: 1.25rem;
}

.feature-card h3,
.faq-card h3 {
  margin-bottom: 0.7rem;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.blog-hero,
.single-hero {
  padding: 4rem 0 2rem;
  background:
    linear-gradient(90deg, rgba(247, 250, 249, 0.98), rgba(247, 250, 249, 0.82)),
    url("assets/og-image.png") right 8% center / 18rem no-repeat;
}

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

.post-card {
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.post-card a,
.post-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--mint);
}

.post-card-body {
  gap: 0.6rem;
  padding: 1.1rem;
}

.post-card small,
.post-meta,
.back-link {
  color: var(--muted);
  font-weight: 800;
}

.post-card strong {
  font-size: 1.25rem;
  line-height: 1.2;
}

.post-card span span {
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 2.6rem;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

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

.single-hero h1 {
  max-width: 15ch;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.featured-image {
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.featured-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.post-content {
  font-size: 1.05rem;
}

.post-content > * + * {
  margin-top: 1rem;
}

.post-content a {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: underline;
}

.empty-state {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.keyword-band,
.cta-band,
.post-next-step {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  align-items: center;
  padding: 2rem;
  background: #182725;
  color: #fff;
  border-radius: 8px;
}

.keyword-band p,
.keyword-band .section-kicker,
.cta-band p,
.cta-band .section-kicker,
.post-next-step p,
.post-next-step .section-kicker {
  color: #dff7ef;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.keyword-list span {
  padding: 0.55rem 0.8rem;
  background: rgba(223, 247, 239, 0.12);
  border: 1px solid rgba(223, 247, 239, 0.28);
  border-radius: 8px;
  font-weight: 800;
}

.cta-band .actions,
.post-next-step .actions {
  justify-content: flex-end;
  margin-top: 0;
}

.site-footer {
  padding: 3rem 0 2rem;
  background: #101816;
  color: #fff;
}

.site-footer p,
.site-footer a {
  color: #d5e5df;
}

.footer-grid {
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.brand-footer {
  margin-bottom: 1rem;
}

.footer-meta {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.content-shell {
  padding: 2rem 0;
}

.content-card {
  max-width: 820px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  h1 {
    max-width: 100%;
    font-size: 2.8rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(247, 250, 249, 0.98), rgba(247, 250, 249, 0.84)),
      url("assets/og-image.png") right 1rem top 1rem / 13rem no-repeat;
  }

  .split-section,
  .keyword-band,
  .cta-band,
  .post-next-step {
    grid-template-columns: 1fr;
  }

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

  .cta-band .actions,
  .post-next-step .actions {
    justify-content: flex-start;
  }
}

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

  .wrap {
    width: min(1120px, calc(100% - 24px));
  }

  .nav {
    min-height: auto;
    padding: 0.85rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
  }

  .nav-cta {
    width: 100%;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .lede {
    font-size: 1rem;
  }

  section {
    padding: 3rem 0;
  }

  .feature-grid,
  .faq-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .proof-list div,
  .button {
    width: 100%;
  }

  .keyword-band,
  .cta-band,
  .post-next-step {
    padding: 1.25rem;
  }

  .footer-grid {
    flex-direction: column;
  }
}
