/*
Theme Name: WP Post AI Medium
Theme URI: https://wppostai.com
Author: Jesús Iniesta
Author URI: https://jesusiniesta.es/about
Description: Clean editorial theme for blog.wppostai.com.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.1
Text Domain: wppostai-medium
*/

:root {
  --wpai-page: #f7f5ef;
  --wpai-paper: #fffefa;
  --wpai-ink: #171717;
  --wpai-muted: #68635b;
  --wpai-line: #ded8ca;
  --wpai-accent: #117c6f;
  --wpai-accent-strong: #0d594f;
  --wpai-mark: #e7f3ef;
  --wpai-max: 1180px;
  --wpai-reading: 720px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--wpai-page);
  color: var(--wpai-ink);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: rgba(17, 124, 111, 0.35);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--wpai-accent-strong);
  text-decoration-color: currentColor;
}

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

.site-shell {
  min-height: 100vh;
}

.site-header {
  border-bottom: 1px solid var(--wpai-line);
  background: rgba(247, 245, 239, 0.94);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--wpai-max);
  padding: 16px 24px;
}

.site-header__brand {
  align-items: baseline;
  display: inline-flex;
  gap: 10px;
  text-decoration: none;
}

.site-header__brand-name {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
}

.site-header__brand-mark {
  color: var(--wpai-accent);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.site-header__nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-header__nav ul,
.site-footer__nav ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: inherit;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav li,
.site-footer__nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav a,
.site-header__cta {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-header__cta {
  border: 1px solid var(--wpai-ink);
  border-radius: 999px;
  padding: 8px 14px;
}

.site-main {
  margin: 0 auto;
  max-width: var(--wpai-max);
  padding: 0 24px 72px;
}

.home-hero {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  padding: 72px 0 44px;
}

.home-hero__eyebrow {
  color: var(--wpai-accent);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.home-hero__title {
  font-size: clamp(48px, 8vw, 108px);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
  max-width: 820px;
}

.home-hero__summary {
  color: var(--wpai-muted);
  font-size: 23px;
  line-height: 1.35;
  margin: 26px 0 0;
  max-width: 680px;
}

.home-hero__panel {
  align-self: end;
  border-left: 2px solid var(--wpai-ink);
  padding-left: 22px;
}

.home-hero__panel-title {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.home-hero__panel-copy {
  color: var(--wpai-muted);
  margin: 0;
}

.post-list {
  border-top: 1px solid var(--wpai-line);
}

.article-card {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 180px;
  padding: 34px 0;
  border-bottom: 1px solid var(--wpai-line);
}

.article-card__kicker {
  color: var(--wpai-accent);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.article-card__title {
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

.article-card__title-link {
  text-decoration: none;
}

.article-card__excerpt {
  color: var(--wpai-muted);
  margin: 14px 0 0;
  max-width: 720px;
}

.article-card__meta,
.post-header__meta,
.archive-header__description,
.site-footer__copy {
  color: var(--wpai-muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.article-card__meta {
  margin-top: 18px;
}

.article-card__image-link {
  aspect-ratio: 4 / 3;
  background: var(--wpai-mark);
  overflow: hidden;
}

.article-card__image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.post-header {
  margin: 0 auto;
  max-width: var(--wpai-reading);
  padding: 72px 0 34px;
}

.post-header__title {
  font-size: clamp(44px, 8vw, 86px);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 14px 0 18px;
}

.post-header__excerpt {
  color: var(--wpai-muted);
  font-size: 23px;
  line-height: 1.36;
  margin: 0;
}

.post-featured-image {
  margin: 0 auto 44px;
  max-width: 960px;
}

.post-featured-image__image {
  width: 100%;
}

.post-content {
  margin: 0 auto;
  max-width: var(--wpai-reading);
}

.post-content > * {
  margin-left: auto;
  margin-right: auto;
}

.post-content p {
  margin-bottom: 1.35em;
  margin-top: 0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 2em 0 0.7em;
}

.post-content h2 {
  font-size: 31px;
}

.post-content h3 {
  font-size: 24px;
}

.post-content blockquote {
  border-left: 3px solid var(--wpai-accent);
  color: #2f3935;
  font-size: 22px;
  margin: 2em 0;
  padding-left: 24px;
}

.post-content ul,
.post-content ol {
  padding-left: 1.3em;
}

.post-content li + li {
  margin-top: 0.45em;
}

.post-footer {
  margin: 48px auto 0;
  max-width: var(--wpai-reading);
}

.post-footer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post-footer__tag {
  background: var(--wpai-mark);
  border-radius: 999px;
  color: var(--wpai-accent-strong);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
  text-decoration: none;
}

.subscription-panel {
  border-top: 1px solid var(--wpai-line);
  margin-top: 42px;
  padding-top: 28px;
}

.subscription-panel__title {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.subscription-panel__copy {
  color: var(--wpai-muted);
  margin: 0 0 16px;
}

.subscription-panel__fallback-link {
  color: var(--wpai-accent-strong);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 900;
}

.archive-header {
  margin: 0 auto;
  max-width: var(--wpai-reading);
  padding: 54px 0 28px;
}

.archive-header__title {
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1;
  margin: 0 0 12px;
}

.not-found {
  margin: 0 auto;
  max-width: var(--wpai-reading);
  padding: 72px 0;
}

.not-found__title {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1;
  margin: 0 0 18px;
}

.not-found__copy {
  color: var(--wpai-muted);
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--wpai-line);
  margin: 0 auto;
  max-width: var(--wpai-max);
  padding: 28px 24px 48px;
}

.site-footer__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__nav a {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .home-hero,
  .article-card {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding-top: 42px;
  }

  .home-hero__panel {
    border-left: 0;
    border-top: 2px solid var(--wpai-ink);
    padding-left: 0;
    padding-top: 18px;
  }

  .article-card__image-link {
    max-width: 320px;
  }
}
