/*
 * THROBLVK visual refinements
 * Loaded after the foundation stylesheet so these rules can polish the
 * publication without changing its core white / black / red / green / yellow
 * identity.
 */

:root {
  --surface-soft: #f7f7f4;
  --surface-raised: #ffffff;
  --line-strong: #9d9d95;
  --shadow-small: 0 .45rem 1.25rem rgba(10, 10, 10, .08);
  --shadow-medium: 0 1.1rem 2.8rem rgba(10, 10, 10, .13);
  --shadow-cover: .85rem 1rem 0 rgba(181, 31, 46, .82), 0 1.75rem 4rem rgba(0, 0, 0, .38);
  --ease-out: cubic-bezier(.2, .75, .25, 1);
}

::selection {
  color: var(--white);
  background: var(--green);
}

body {
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

main {
  position: relative;
  isolation: isolate;
}

h1,
h2,
h3,
.lede,
.mission-grid blockquote,
.pullquote {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

a {
  text-decoration-skip-ink: auto;
}

input,
textarea,
select,
button {
  border-radius: 0;
}

input,
textarea,
select {
  accent-color: var(--green);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green) !important;
  outline: 3px solid rgba(6, 107, 60, .18);
  outline-offset: 1px;
}

/* Masthead and navigation */
.site-header {
  box-shadow: 0 .25rem 1.25rem rgba(10, 10, 10, .05);
}

.masthead {
  background:
    linear-gradient(90deg, rgba(181, 31, 46, .025), transparent 24%, transparent 76%, rgba(6, 107, 60, .025));
}

.wordmark,
.custom-logo-link {
  transition: opacity 180ms ease;
}

.wordmark:hover,
.custom-logo-link:hover {
  opacity: .78;
}

.wordmark-sub {
  color: #343434;
  font-weight: 500;
}

.primary-nav a {
  position: relative;
  display: block;
  transition: color 160ms ease, background-color 160ms ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  right: .72rem;
  bottom: .48rem;
  left: .72rem;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease-out);
}

.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after,
.primary-nav .current-menu-item > a::after {
  transform: scaleX(1);
}

.primary-nav .membership-link::after,
.primary-nav li.membership-link > a::after {
  display: none;
}

.primary-nav .membership-link,
.primary-nav li.membership-link > a,
.newsletter-form button,
.comment-form .submit {
  transition: background-color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}

.primary-nav .membership-link:hover,
.primary-nav li.membership-link > a:hover,
.newsletter-form button:hover,
.comment-form .submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-small);
}

.department-rail {
  position: sticky;
  top: 0;
  z-index: 18;
  box-shadow: 0 .45rem 1.15rem rgba(10, 10, 10, .1);
}

.admin-bar .department-rail {
  top: 32px;
}

.department-rail a {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  transition: color 150ms ease, opacity 150ms ease;
}

.department-rail a:hover {
  opacity: .9;
}

/* Editorial surfaces and section rhythm */
.section.dark {
  background:
    radial-gradient(circle at 82% 10%, rgba(6, 107, 60, .2), transparent 29rem),
    linear-gradient(135deg, #0a0a0a, #111111 58%, #080808);
}

.section.red {
  background:
    radial-gradient(circle at 12% 10%, rgba(230, 184, 0, .14), transparent 24rem),
    linear-gradient(135deg, var(--red), var(--red-dark));
}

.section.paper-deep {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .62), transparent 38%),
    var(--paper-deep);
}

.section-heading {
  position: relative;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.section-heading::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: min(8rem, 34%);
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0 34%, var(--yellow) 34% 67%, var(--green) 67%);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(230, 184, 0, .14), transparent 18rem),
    linear-gradient(120deg, rgba(181, 31, 46, .045), transparent 38%, rgba(6, 107, 60, .045));
}

.page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--ink) 0 25%, var(--red) 25% 50%, var(--yellow) 50% 75%, var(--green) 75%);
}

.page-kicker {
  padding-bottom: .9rem;
  border-bottom: 1px solid rgba(10, 10, 10, .14);
}

/* Homepage cover feature */
.hero-copy {
  position: relative;
  background:
    radial-gradient(circle at 4% 10%, rgba(181, 31, 46, .07), transparent 21rem),
    linear-gradient(135deg, #ffffff, #fbfbf8);
}

.hero-copy::before {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 0;
  width: 5px;
  background: linear-gradient(var(--red) 0 34%, var(--yellow) 34% 67%, var(--green) 67%);
}

.hero-art.magazine-cover-display::before {
  content: "";
  position: absolute;
  inset: 8% 7% 13%;
  background:
    linear-gradient(145deg, rgba(181, 31, 46, .72), transparent 34%),
    linear-gradient(315deg, rgba(6, 107, 60, .58), transparent 38%);
  filter: blur(1.5rem);
  opacity: .52;
}

.hero-art.magazine-cover-display img {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: var(--shadow-cover);
}

.hero-art-caption {
  z-index: 2;
  padding-top: .7rem;
  border-top: 1px solid rgba(255, 255, 255, .32);
}

.button {
  position: relative;
  overflow: hidden;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-small);
}

.button:active {
  transform: translateY(0);
  box-shadow: none;
}

.pulse-item {
  position: relative;
  transition: background-color 180ms ease;
}

.pulse-item::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease-out);
}

.pulse-item:nth-child(3n + 2)::after {
  background: var(--yellow);
}

.pulse-item:nth-child(3n)::after {
  background: var(--green);
}

.pulse-item:hover {
  background: #171717;
}

.pulse-item:hover::after {
  transform: scaleX(1);
}

/* Cards, listings and collection modules */
.story-card,
.platform-item,
.opportunity-card,
.department-card,
.listing,
.product-card,
.shop-item,
.collection-phase,
.tier,
.principle {
  transition: transform 190ms var(--ease-out), box-shadow 190ms ease, border-color 190ms ease, background-color 190ms ease;
}

.story-card img,
.shop-feature-media img,
.shop-hero-media img,
.article-art img,
.wp-block-image img {
  border: 1px solid rgba(10, 10, 10, .12);
}

.story-card img {
  box-shadow: 0 .5rem 1.5rem rgba(10, 10, 10, .08);
  transition: transform 260ms var(--ease-out), box-shadow 260ms ease;
}

.platform-item,
.department-card,
.product-card,
.shop-item,
.tier,
.principle,
.collection-phase {
  box-shadow: inset 0 0 0 1px rgba(10, 10, 10, .025);
}

.platform-number,
.department-card .index,
.phase-number {
  font-weight: 600;
}

.opportunity-card a,
.listing a,
.article-body a:not(.button),
.comments-area a {
  color: var(--red);
  text-decoration-color: rgba(181, 31, 46, .46);
}

.opportunity-card a:hover,
.listing a:hover,
.article-body a:not(.button):hover,
.comments-area a:hover {
  text-decoration-color: currentColor;
}

.shop-hero-media,
.shop-feature-media {
  box-shadow: var(--shadow-small);
}

.shop-card-art {
  isolation: isolate;
}

.shop-card-art::after {
  content: "";
  position: absolute;
  inset: .55rem;
  border: 1px solid rgba(255, 255, 255, .18);
  pointer-events: none;
}

.shop-card-art.yellow::after,
.shop-card-art.paper::after {
  border-color: rgba(10, 10, 10, .16);
}

.filter-button {
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms var(--ease-out);
}

.filter-button:hover {
  transform: translateY(-1px);
}

.product-details summary {
  transition: color 150ms ease;
}

.product-details[open] summary {
  color: var(--red);
}

@media (hover: hover) and (pointer: fine) {
  .story-card:hover,
  .platform-item:hover,
  .opportunity-card:hover,
  .department-card:hover,
  .listing:hover,
  .product-card:hover,
  .shop-item:hover,
  .collection-phase:hover,
  .tier:hover,
  .principle:hover {
    position: relative;
    z-index: 2;
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
  }

  .story-card:hover img {
    box-shadow: var(--shadow-medium);
  }
}

/* Long-form reading and native WordPress blocks */
.article-body {
  min-width: 0;
}

.article-body > h2,
.article-body > h3,
.article-body .wp-block-heading {
  scroll-margin-top: 5rem;
}

.article-body > h2 {
  padding-top: .5rem;
  border-top: 1px solid var(--line);
}

.article-body > h3 {
  margin-top: 2.4rem;
}

.article-body > ul,
.article-body > ol {
  margin: 1.35rem 0 1.8rem;
  padding-left: 1.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.72;
}

.article-body > ul li,
.article-body > ol li {
  margin-bottom: .65rem;
  padding-left: .25rem;
}

.article-art,
.wp-block-image,
.wp-block-gallery,
.wp-block-embed {
  margin-top: 2.2rem;
  margin-bottom: 2.2rem;
}

.article-art img,
.wp-block-image img {
  box-shadow: var(--shadow-small);
}

figcaption,
.wp-element-caption,
.wp-block-image figcaption,
.wp-block-gallery figcaption {
  margin-top: .65rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .76rem;
  letter-spacing: .045em;
  line-height: 1.45;
}

.article-body blockquote:not(.pullquote),
.wp-block-quote {
  margin: 2.4rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 5px solid var(--green);
  background: var(--surface-soft);
}

.article-body blockquote:not(.pullquote) p,
.wp-block-quote p {
  margin-bottom: .65rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.35;
}

.wp-block-quote cite {
  color: var(--muted);
  font-family: var(--sans);
  font-size: .75rem;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wp-block-pullquote {
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wp-block-pullquote blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.wp-block-pullquote p {
  color: var(--red);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
}

.wp-block-separator {
  width: 100%;
  height: 1px;
  margin: 3rem 0;
  border: 0;
  background: var(--line);
}

.wp-block-table {
  overflow-x: auto;
}

.wp-block-table table,
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: .92rem;
}

.wp-block-table th,
.wp-block-table td,
.article-body th,
.article-body td {
  padding: .9rem .8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.wp-block-table th,
.article-body th {
  color: var(--green);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-body pre,
.wp-block-code,
.wp-block-preformatted {
  max-width: 100%;
  overflow-x: auto;
  padding: 1.2rem;
  color: #f5f5f2;
  background: var(--ink);
  border-left: 5px solid var(--yellow);
  font-size: .88rem;
  line-height: 1.65;
}

.article-body code:not(pre code) {
  padding: .12em .32em;
  background: var(--paper-deep);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.wp-block-button__link {
  min-height: 3rem;
  padding: .75rem 1.05rem;
  color: var(--white);
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 0;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}

.wp-block-button__link:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-2px);
}

.wp-block-cover {
  min-height: 28rem;
}

.wp-block-cover__inner-container {
  width: min(100% - 2.5rem, var(--max));
}

.article-rail {
  top: 4.6rem;
  background: linear-gradient(135deg, rgba(243, 243, 240, .72), transparent 75%);
}

.rail-item {
  transition: padding-left 160ms ease, border-color 160ms ease;
}

.rail-item:hover {
  padding-left: .45rem;
  border-color: var(--green);
}

.disclosure {
  box-shadow: inset 0 0 0 1px rgba(10, 10, 10, .035);
}

/* Forms, search and comments */
.newsletter-form input {
  box-shadow: inset 0 1px 0 rgba(10, 10, 10, .05);
}

.newsletter-form input::placeholder {
  color: #66665f;
  opacity: 1;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  max-width: 42rem;
  margin-top: 1.5rem;
}

.search-form label {
  min-width: 0;
}

.search-field {
  width: 100%;
  min-height: 3.2rem;
  padding: .75rem 1rem;
  border: 1px solid var(--line-strong);
  background: var(--white);
}

.search-submit {
  min-height: 3.2rem;
  padding: .75rem 1.1rem;
  border: 1px solid var(--ink);
  color: var(--white);
  background: var(--ink);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.comment-list {
  margin: 0;
}

.comment-list .comment-body {
  padding: 1rem 0 1.3rem;
  border-bottom: 1px solid var(--line);
}

.comment-form label {
  display: block;
  margin-bottom: .35rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.comment-form textarea {
  min-height: 10rem;
  resize: vertical;
}

/* Footer */
.site-footer {
  position: relative;
}

.site-footer::before {
  content: "";
  display: block;
  height: 7px;
  background: linear-gradient(90deg, var(--ink) 0 25%, var(--red) 25% 50%, var(--yellow) 50% 75%, var(--green) 75%);
}

.footer-wordmark {
  text-wrap: nowrap;
}

.footer-grid a {
  width: fit-content;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .24em;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.footer-grid a:hover {
  text-decoration-color: currentColor;
}

.page-edit-link {
  box-shadow: var(--shadow-medium);
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}

.page-edit-link:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

@media (max-width: 1050px) {
  .masthead {
    gap: .75rem;
  }

  .primary-nav-inner {
    scrollbar-color: var(--green) transparent;
    scrollbar-width: thin;
  }

  .article-rail {
    top: 4.25rem;
  }
}

@media (max-width: 782px) {
  .admin-bar .department-rail {
    top: 46px;
  }
}

@media (max-width: 780px) {
  .masthead {
    background: var(--white);
  }

  .primary-nav.open {
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .3);
  }

  .primary-nav a::after {
    right: 1rem;
    bottom: 0;
    left: 1rem;
  }

  .primary-nav a:hover,
  .primary-nav a[aria-current="page"],
  .primary-nav .current-menu-item > a {
    color: #ffd43b;
    background: #151515;
  }

  .hero-copy::before {
    top: 1.25rem;
    right: 1.25rem;
    bottom: auto;
    left: 1.25rem;
    width: auto;
    height: 5px;
    background: linear-gradient(90deg, var(--ink) 0 25%, var(--red) 25% 50%, var(--yellow) 50% 75%, var(--green) 75%);
  }

  .hero-art.magazine-cover-display img {
    box-shadow: .55rem .65rem 0 rgba(181, 31, 46, .8), 0 1.2rem 2.5rem rgba(0, 0, 0, .34);
  }

  .section-heading {
    gap: 1rem;
  }

  .article-rail {
    background: transparent;
  }
}

@media (max-width: 600px) {
  .admin-bar .department-rail {
    top: 0;
  }
}

@media (max-width: 520px) {
  h1,
  .article-body h1 {
    font-size: clamp(3rem, 18vw, 5rem);
  }

  h2 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .preview-bar {
    letter-spacing: .08em;
  }

  .hero-copy {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .button-row .button {
    width: 100%;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .search-submit {
    width: 100%;
  }

  .article-body p {
    font-size: 1.08rem;
    line-height: 1.72;
  }

  .article-body blockquote:not(.pullquote),
  .wp-block-quote {
    padding: 1rem;
  }

  .shop-card-art::after {
    inset: .4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .site-header::after,
  .page-hero::after,
  .site-footer::before,
  .section-heading::after,
  .hero-copy::before,
  .signal-line {
    forced-color-adjust: none;
  }

  .button,
  .filter-button,
  .wp-block-button__link {
    border: 1px solid ButtonText;
  }
}

@media print {
  .preview-bar,
  .site-header,
  .department-rail,
  .article-rail,
  .site-footer,
  .page-edit-link,
  .button-row,
  .comments-area {
    display: none !important;
  }

  body {
    color: #000000;
    background: #ffffff;
    font-size: 11pt;
  }

  main,
  .section {
    padding: 0;
    border: 0;
  }

  .container,
  .narrow,
  .article-body {
    width: 100%;
    max-width: none;
  }

  .article-layout {
    display: block;
  }

  .article-body h1 {
    font-size: 42pt;
  }

  a {
    color: #000000;
  }

  .article-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--sans);
    font-size: 8pt;
  }

  img,
  blockquote,
  table,
  figure {
    break-inside: avoid;
  }
}
