/*
Theme Name: The Hunting Party
Theme URI: https://kemptand.co/
Author: Chris Kempt
Description: A reversible, core-block editorial theme for The Hunting Party and Chris Kempt's writing.
Version: 1.1.20
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: the-hunting-party
*/

:root {
  --thp-ink: #080a0b;
  --thp-ink-soft: #111416;
  --thp-paper: #eee7d5;
  --thp-paper-muted: #c7c0ae;
  --thp-gold: #c7953b;
  --thp-gold-pale: #e2c985;
  --thp-silver: #7d8589;
  --thp-rule: rgba(238, 231, 213, 0.18);
  --thp-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--thp-ink);
  background: var(--thp-gold-pale);
}

a {
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--thp-gold-pale);
  outline-offset: 4px;
}

.thp-site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--thp-rule);
  background: rgba(8, 10, 11, 0.94);
  backdrop-filter: blur(14px);
}

.thp-site-header .wp-block-site-title {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.thp-site-header .wp-block-site-title a {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--thp-paper);
  text-decoration: none;
}

.thp-site-header .wp-block-site-title a::before {
  display: block;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  content: "";
  background: url("assets/images/hunting-party-site-icon.png") center / cover no-repeat;
  border: 1px solid rgba(238, 231, 213, 0.18);
}

.thp-site-header .wp-block-navigation-item__content {
  position: relative;
}

.thp-site-header .wp-block-navigation-item__content::after {
  position: absolute;
  right: 0;
  bottom: -0.45rem;
  left: 0;
  height: 1px;
  content: "";
  background: var(--thp-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.thp-site-header .wp-block-navigation-item__content:hover::after,
.thp-site-header .current-menu-item .wp-block-navigation-item__content::after {
  transform: scaleX(1);
}

.thp-nav-book > a {
  padding: 0.65rem 0.9rem !important;
  color: var(--thp-ink) !important;
  background: var(--thp-gold-pale);
}

.thp-nav-book > a::after {
  display: none;
}

.thp-hero {
  min-height: min(830px, calc(100vh - 82px));
  border-bottom: 1px solid var(--thp-rule);
}

.thp-hero .wp-block-cover__background {
  background: linear-gradient(90deg, rgba(8, 10, 11, 0.98) 0%, rgba(8, 10, 11, 0.84) 38%, rgba(8, 10, 11, 0.14) 76%, rgba(8, 10, 11, 0.34) 100%) !important;
}

.thp-hero-copy {
  width: min(700px, 100%);
  margin-right: auto !important;
  margin-left: 0 !important;
}

.thp-eyebrow {
  color: var(--thp-gold-pale);
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.thp-hero-title {
  max-width: 9ch;
  margin-top: 0.25rem !important;
  color: var(--thp-paper);
  font-size: clamp(2.3rem, 5.6vw, 5rem) !important;
  letter-spacing: -0.055em !important;
  line-height: 0.87 !important;
  text-wrap: balance;
}

.thp-hero-subtitle {
  max-width: 26ch;
  color: var(--thp-gold);
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.2rem, 2.25vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.thp-hero-hook {
  max-width: 48ch;
  color: var(--thp-paper-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.55;
}

.thp-section {
  position: relative;
  border-bottom: 1px solid var(--thp-rule);
}

.thp-section-number {
  margin: 0;
  color: var(--thp-silver);
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.thp-section-title {
  max-width: none;
  margin-top: 0.7rem !important;
  font-size: clamp(1.45rem, 3.1vw, 3rem) !important;
  letter-spacing: -0.035em !important;
  line-height: 1 !important;
  text-wrap: balance;
}

.thp-deck {
  color: var(--thp-paper-muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.thp-copy p:not(.thp-eyebrow):not(.thp-section-number) {
  max-width: 63ch;
}

.thp-ideas-grid {
  border-top: 1px solid var(--thp-rule);
  border-left: 1px solid var(--thp-rule);
}

.thp-idea-card {
  position: relative;
  min-height: 290px;
  border-right: 1px solid var(--thp-rule);
  border-bottom: 1px solid var(--thp-rule);
  transition: background-color 180ms ease, transform 180ms ease;
}

.thp-idea-card::before {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 28px;
  height: 1px;
  content: "";
  background: var(--thp-gold);
  box-shadow: 8px 0 0 var(--thp-gold);
}

.thp-idea-card:hover {
  z-index: 1;
  background: #15191b;
  transform: translateY(-3px);
}

.thp-idea-card h3 {
  margin-top: 3.5rem;
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1;
}

.thp-idea-card p {
  color: var(--thp-paper-muted);
}

.thp-card-link {
  margin-top: auto !important;
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.thp-writing-query .wp-block-post-template {
  gap: 0;
  border-top: 1px solid var(--thp-rule);
}

.thp-writing-query .wp-block-post {
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--thp-rule);
}

.thp-writing-query .wp-block-post-title {
  max-width: 23ch;
  font-size: clamp(1.15rem, 2.1vw, 1.9rem);
  line-height: 1.05;
}

.thp-post-meta {
  color: var(--thp-silver);
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.thp-book-layout {
  align-items: start !important;
}

.thp-edition-note {
  color: var(--thp-paper-muted);
  font-family: var(--wp--preset--font-family--utility);
  font-size: 0.9rem;
}

.thp-edition-grid {
  gap: clamp(1rem, 2.25vw, 2rem) !important;
}

.thp-edition-card {
  height: 100%;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--thp-rule);
  background: rgba(255, 255, 255, 0.015);
}

.thp-edition-card--coming {
  background: rgba(125, 133, 137, 0.08);
}

.thp-edition-art {
  overflow: hidden;
  width: 100%;
  margin: 0 0 1.5rem;
  border: 1px solid rgba(226, 201, 133, 0.26);
  background: #080a0b;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.thp-edition-art img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.thp-edition-card h3 {
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.15rem, 1.75vw, 1.5rem);
  line-height: 1;
}

.thp-edition-price {
  color: var(--thp-gold-pale);
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.thp-edition-card > .wp-block-buttons {
  margin-top: auto !important;
}

.thp-cover-window {
  position: relative;
  overflow: hidden;
  aspect-ratio: 0.69;
  min-height: 540px;
  background-color: #030405;
  background-image: url("assets/images/hunting-party-cover-wrap.png");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 205% auto;
  border: 1px solid rgba(226, 201, 133, 0.4);
  box-shadow: var(--thp-shadow);
}

.thp-cover-window::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.25);
}

.thp-pullquote {
  border-top: 1px solid var(--thp-gold);
  border-bottom: 1px solid var(--thp-gold);
}

.thp-pullquote p {
  color: var(--thp-gold-pale);
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.thp-fact-list {
  border-top: 1px solid var(--thp-rule);
}

.thp-fact {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--thp-rule);
}

.thp-fact strong {
  color: var(--thp-gold-pale);
  font-family: var(--wp--preset--font-family--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thp-page-hero {
  border-bottom: 1px solid var(--thp-rule);
  background: radial-gradient(circle at 82% 20%, rgba(199, 149, 59, 0.13), transparent 28%), var(--thp-ink-soft);
}

.thp-article-header {
  border-bottom: 1px solid var(--thp-rule);
}

.thp-prose {
  font-size: clamp(1.08rem, 1.5vw, 1.24rem);
}

.thp-prose > * {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.thp-prose > .alignwide,
.thp-prose > .alignfull {
  max-width: none;
}

.thp-prose h2 {
  margin-top: 3em;
  font-size: clamp(2.2rem, 4vw, 3.9rem);
  line-height: 1;
}

.thp-prose h3 {
  margin-top: 2.5em;
}

.thp-prose blockquote {
  margin-top: 2.5em;
  margin-bottom: 2.5em;
  padding: 1.5rem 0 1.5rem 1.8rem;
  border-left: 2px solid var(--thp-gold);
}

.thp-site-footer {
  border-top: 1px solid var(--thp-rule);
  background: #050607;
}

.thp-site-footer a {
  color: var(--thp-paper);
}

.thp-footer-social-label {
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  color: var(--thp-silver);
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.thp-footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thp-footer-social-links a {
  color: var(--thp-paper-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.thp-footer-social-links a:hover {
  color: var(--thp-gold-pale);
  text-decoration: underline;
}

.thp-footer-mark {
  color: var(--thp-gold-pale);
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.4rem, 3.5vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.85;
  text-transform: uppercase;
}

.thp-smallprint {
  color: var(--thp-silver);
  font-size: 0.82rem;
}

.thp-downloads-grid {
  gap: 0 !important;
  margin-top: 0 !important;
  border-top: 1px solid var(--thp-rule);
  border-left: 1px solid var(--thp-rule);
}

.thp-download-card {
  height: 100%;
  border-right: 1px solid var(--thp-rule);
  border-bottom: 1px solid var(--thp-rule);
  background: rgba(255, 255, 255, 0.015);
  transition: background-color 180ms ease, transform 180ms ease;
}

.thp-download-card:hover {
  z-index: 1;
  background: #15191b;
  transform: translateY(-3px);
}

.thp-download-preview {
  overflow: hidden;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(226, 201, 133, 0.26);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.thp-download-preview img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 220ms ease;
}

.thp-download-card:hover .thp-download-preview img {
  transform: scale(1.015);
}

.thp-download-card h3 {
  margin-top: 0.4rem;
  font-size: clamp(1.25rem, 2.25vw, 2rem);
  line-height: 1;
}

.thp-download-card h3 a {
  color: var(--thp-paper);
  text-decoration: none;
}

.thp-download-card h3 a:hover {
  color: var(--thp-gold-pale);
}

.thp-download-card p:not(.thp-section-number) {
  color: var(--thp-paper-muted);
}

.thp-download-card .wp-block-buttons {
  margin-top: auto !important;
}

.thp-download-card--companion {
  display: grid !important;
  grid-template-columns: minmax(14rem, 0.9fr) minmax(18rem, 1.1fr);
  column-gap: clamp(1.25rem, 3vw, 3.25rem);
  align-items: start;
  border: 1px solid var(--thp-rule);
}

.thp-download-card--companion .thp-download-preview {
  grid-column: 1;
  grid-row: 1 / span 4;
  margin: 0;
}

.thp-download-card--companion > :not(.thp-download-preview) {
  grid-column: 2;
}

.thp-home-download-list {
  border-top: 1px solid var(--thp-rule);
}

.thp-home-download-list .wp-block-post-template {
  margin: 0;
  padding: 0;
  list-style: none;
}

.thp-home-download-list .wp-block-post {
  margin: 0;
}

.thp-home-download-item {
  display: grid;
  grid-template-columns: minmax(11rem, 0.8fr) minmax(16rem, 1.2fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: baseline;
  padding: clamp(1.2rem, 2.4vw, 1.75rem) 0;
  border-bottom: 1px solid var(--thp-rule);
}

.thp-home-download-item h3,
.thp-home-download-item p {
  margin: 0;
}

.thp-home-download-item h3 {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.05;
}

.thp-home-download-item h3 a {
  color: var(--thp-paper);
  text-decoration: none;
  transition: color 160ms ease;
}

.thp-home-download-item h3 a::after {
  color: var(--thp-gold);
  content: " \2197";
  font-size: 0.7em;
}

.thp-home-download-item h3 a:hover {
  color: var(--thp-gold-pale);
}

.thp-home-download-item p {
  color: var(--thp-paper-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.thp-extract-landing-preview {
  overflow: hidden;
  margin-top: 0;
  border: 1px solid rgba(226, 201, 133, 0.26);
  box-shadow: var(--thp-shadow);
}

.thp-extract-landing-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.thp-book-landing-cover {
  width: min(420px, 100%);
  margin-right: auto;
  margin-left: auto;
  border: 1px solid rgba(226, 201, 133, 0.26);
  box-shadow: var(--thp-shadow);
}

.thp-book-landing-cover img {
  display: block;
  width: 100%;
}

.thp-extract-landing .wp-block-buttons {
  margin-top: var(--wp--preset--spacing--30);
}

@media (max-width: 860px) {
  .thp-hero {
    min-height: 760px;
  }

  .thp-hero .wp-block-cover__background {
    background: linear-gradient(180deg, rgba(8, 10, 11, 0.35) 0%, rgba(8, 10, 11, 0.68) 42%, rgba(8, 10, 11, 0.98) 100%) !important;
  }

  .thp-hero .wp-block-cover__inner-container {
    display: flex;
    align-items: end;
    min-height: 700px;
  }

  .thp-book-layout {
    gap: 3.5rem !important;
  }

  .thp-cover-window {
    width: min(440px, 100%);
    min-height: 0;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 600px) {
  .thp-site-header {
    position: static;

    /*
     * iOS Safari can treat a backdrop-filtered ancestor as the containing
     * block for fixed descendants. WordPress's mobile navigation overlay is
     * fixed, so leaving the filter here can constrain the open menu to the
     * height of the header instead of the viewport.
     */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .thp-site-header .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  @supports (height: 100dvh) {
    .thp-site-header .wp-block-navigation__responsive-container.is-menu-open {
      height: 100dvh;
      min-height: 100dvh;
    }
  }

  .thp-hero {
    min-height: 720px;
  }

  .thp-hero-title {
    font-size: clamp(2.1rem, 11.2vw, 3.45rem) !important;
  }

  .thp-section-title {
    max-width: none;
  }

  .thp-idea-card {
    min-height: 240px;
  }

  .thp-download-card {
    min-height: 0;
  }

  .thp-download-card--companion {
    display: flex !important;
  }

  .thp-download-card--companion .thp-download-preview {
    margin-bottom: 0.65rem;
  }

  .thp-home-download-item {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .wp-block-buttons .wp-block-button,
  .wp-block-buttons .wp-block-button__link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
