/*
Theme Name: VoxSci
Theme URI: https://thevoxsci.com/
Author: VoxSci
Author URI: https://thevoxsci.com/
Description: A bespoke WordPress block theme for VoxSci built around the Signal from Noise scientific/editorial design system.
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: voxsci
*/

:root {
  --vox-ink: #0b1f33;
  --vox-ink-soft: #29445e;
  --vox-paper: #f6f3ec;
  --vox-paper-bright: #fcfbf8;
  --vox-blue: #124b78;
  --vox-blue-pale: #ddeaf2;
  --vox-orange: #f46a22;
  --vox-terracotta: #c94a32;
  --vox-rule: #b8c5ce;
  --vox-muted: #667786;
  --vox-focus: #f46a22;
  --vox-radius-xs: 2px;
  --vox-radius-sm: 6px;
  --vox-radius-md: 10px;
  --vox-gutter: clamp(1rem, 3vw, 3rem);
  --vox-section: clamp(4rem, 8vw, 9rem);
  --vox-section-tight: clamp(2.5rem, 5vw, 5.5rem);
  --vox-measure: 68ch;
  --vox-grid-max: 1440px;
  --vox-transition: 180ms ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(90deg, rgba(184, 197, 206, 0.18) 1px, transparent 1px) 0 0 / calc((100vw - min(100vw, var(--vox-grid-max))) / 2 + (min(100vw, var(--vox-grid-max)) / 12)) 100%,
    var(--vox-paper);
  color: var(--vox-ink);
  font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  margin: 0;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--vox-blue);
  text-underline-offset: 0.18em;
  transition: color var(--vox-transition), text-decoration-color var(--vox-transition);
}

a:hover {
  color: var(--vox-terracotta);
}

button,
input,
textarea,
select {
  font: inherit;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--vox-focus);
  outline-offset: 4px;
}

.skip-link {
  background: var(--vox-ink);
  color: var(--vox-paper-bright);
  font-weight: 700;
  left: var(--vox-gutter);
  padding: 0.65rem 0.9rem;
  position: absolute;
  top: 0.75rem;
  transform: translateY(-160%);
  transition: transform var(--vox-transition);
  z-index: 1000;
}

.skip-link:focus {
  transform: translateY(0);
}

.wp-site-blocks {
  min-height: 100vh;
}

.wp-site-blocks > main,
main.wp-block-group {
  margin-block-start: 0;
}

.alignwide {
  max-width: min(calc(100vw - (var(--vox-gutter) * 2)), var(--vox-grid-max));
}

.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

.vox-site-header {
  backdrop-filter: blur(14px);
  background: rgba(246, 243, 236, 0.88);
  border-bottom: 1px solid rgba(184, 197, 206, 0.65);
  position: sticky;
  top: 0;
  z-index: 20;
}

.vox-header-inner {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(8rem, 1fr) auto;
  margin-inline: auto;
  max-width: min(calc(100vw - (var(--vox-gutter) * 2)), var(--vox-grid-max));
  min-height: 76px;
}

.vox-brand-lockup {
  align-items: center;
  color: var(--vox-ink);
  display: inline-flex;
  font-weight: 800;
  gap: 0.7rem;
  letter-spacing: 0;
  text-decoration: none;
}

.vox-wordmark {
  color: var(--vox-ink);
  font-size: 1.18rem;
  letter-spacing: 0;
}

.vox-mark {
  aspect-ratio: 1;
  border: 1px solid var(--vox-blue);
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 2.25rem;
}

.vox-mark::before,
.vox-mark::after {
  content: "";
  position: absolute;
}

.vox-mark::before {
  border-bottom: 9px solid transparent;
  border-left: 15px solid var(--vox-orange);
  border-top: 9px solid transparent;
  left: 0.65rem;
}

.vox-mark::after {
  background: var(--vox-blue);
  height: 1px;
  right: -0.45rem;
  top: 50%;
  width: 1.1rem;
}

.vox-nav-wrap {
  align-items: center;
  display: flex;
  gap: clamp(0.8rem, 2vw, 1.8rem);
}

.wp-block-navigation {
  --navigation-layout-justification-setting: flex-end;
  font-size: 0.9rem;
  font-weight: 650;
}

.wp-block-navigation a {
  color: var(--vox-ink-soft);
  text-decoration: none;
}

.wp-block-navigation a:hover,
.wp-block-navigation .current-menu-item > a {
  color: var(--vox-ink);
}

.wp-block-navigation__responsive-container.is-menu-open {
  background: var(--vox-paper-bright);
  color: var(--vox-ink);
  padding: 1.25rem;
}

.vox-header-cta .wp-block-button__link,
.wp-block-button.is-style-vox-primary .wp-block-button__link,
.wp-block-button .wp-block-button__link {
  align-items: center;
  background: var(--vox-ink);
  border: 1px solid var(--vox-ink);
  border-radius: var(--vox-radius-sm);
  color: var(--vox-paper-bright);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 750;
  gap: 0.6rem;
  justify-content: center;
  line-height: 1.1;
  min-height: 2.75rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  transition: background var(--vox-transition), border-color var(--vox-transition), color var(--vox-transition), transform var(--vox-transition);
}

.vox-header-cta .wp-block-button__link::after,
.wp-block-button.is-style-vox-primary .wp-block-button__link::after,
.wp-block-button .wp-block-button__link::after {
  color: var(--vox-orange);
  content: ">";
  font-weight: 900;
}

.vox-header-cta .wp-block-button__link:hover,
.wp-block-button.is-style-vox-primary .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:hover {
  background: var(--vox-blue);
  border-color: var(--vox-blue);
  transform: translateY(-1px);
}

.wp-block-button.is-style-vox-secondary .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border-color: var(--vox-rule);
  color: var(--vox-ink);
}

.wp-block-button.is-style-vox-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--vox-blue-pale);
  border-color: var(--vox-blue);
  color: var(--vox-ink);
}

.vox-section {
  padding-block: var(--vox-section);
  position: relative;
}

.vox-section-tight {
  padding-block: var(--vox-section-tight);
}

.vox-section-dark {
  background: var(--vox-ink);
  color: var(--vox-paper-bright);
}

.vox-section-dark a {
  color: var(--vox-paper-bright);
}

.vox-section-dark .vox-kicker,
.vox-section-dark .vox-meta {
  color: var(--vox-blue-pale);
}

.vox-grid {
  display: grid;
  gap: clamp(1.4rem, 3vw, 3rem);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.vox-grid > :where(.wp-block-group, .wp-block-heading, p, .wp-block-query-title, .wp-block-post-title, .wp-block-post-excerpt, .wp-block-search) {
  grid-column: span 6;
}

.vox-grid > .vox-kicker {
  grid-column: span 2;
}

.vox-grid > .vox-subtitle {
  grid-column: span 4;
}

.vox-rule-top {
  border-top: 1px solid var(--vox-rule);
}

.vox-rule-bottom {
  border-bottom: 1px solid var(--vox-rule);
}

.vox-kicker,
.vox-meta {
  color: var(--vox-muted);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.vox-display,
.vox-page-title,
h1,
h2,
h3 {
  color: inherit;
  font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 0.98;
}

.vox-display {
  font-size: clamp(2.75rem, 8vw, 6.6rem);
  max-width: 11ch;
}

.vox-page-title {
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  max-width: 12ch;
}

.vox-section-title {
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.02;
  max-width: 13ch;
}

.vox-subtitle {
  color: var(--vox-ink-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  line-height: 1.55;
  max-width: var(--vox-measure);
}

.vox-serif {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 520;
}

.vox-hero {
  min-height: min(820px, calc(100vh - 76px));
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 7rem);
}

.vox-hero-copy {
  grid-column: 1 / span 6;
  position: relative;
  z-index: 2;
}

.vox-hero-visual {
  align-self: stretch;
  display: grid;
  grid-column: 7 / -1;
  min-height: clamp(22rem, 46vw, 40rem);
  place-items: center;
  position: relative;
}

.vox-hero-visual::before {
  border-left: 1px solid var(--vox-rule);
  content: "";
  height: 100%;
  left: 4%;
  position: absolute;
  top: 0;
}

.vox-signal-canvas {
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(184, 197, 206, 0.72);
  border-radius: var(--vox-radius-sm);
  display: none;
  inline-size: min(100%, 720px);
  min-height: 280px;
  overflow: hidden;
}

.js .vox-signal-canvas {
  display: block;
}

.vox-signal-fallback {
  display: block;
  inline-size: min(100%, 700px);
  overflow: visible;
}

.js .vox-signal-fallback {
  display: none;
}

.has-static-signal .vox-signal-canvas {
  display: none;
}

.has-static-signal .vox-signal-canvas + .vox-signal-fallback {
  display: block;
}

.vox-signal-fallback .field-rule {
  stroke: rgba(184, 197, 206, 0.45);
}

.vox-signal-fallback .noise-line {
  stroke: rgba(18, 75, 120, 0.24);
}

.vox-signal-fallback .node {
  fill: var(--vox-paper-bright);
  stroke: rgba(18, 75, 120, 0.5);
  stroke-width: 1.2;
}

.vox-signal-fallback .node-strong {
  stroke: var(--vox-blue);
  stroke-width: 1.8;
}

.vox-signal-fallback .signal-line {
  stroke: var(--vox-orange);
}

.vox-signal-fallback .signal-line-secondary {
  stroke: var(--vox-blue);
}

.vox-signal-fallback .signal-triangle {
  fill: transparent;
  stroke: var(--vox-terracotta);
}

.vox-path-label {
  border-top: 1px solid var(--vox-rule);
  display: grid;
  gap: 0.35rem;
  padding-top: 0.9rem;
}

.vox-number {
  color: var(--vox-orange);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.vox-sequence {
  counter-reset: vox-sequence;
  display: grid;
}

.vox-sequence-item {
  border-top: 1px solid var(--vox-rule);
  counter-increment: vox-sequence;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(4rem, 0.6fr) minmax(0, 2.5fr) minmax(10rem, 1fr);
  padding-block: clamp(1.35rem, 3vw, 2.5rem);
}

.vox-sequence-item::before {
  color: var(--vox-orange);
  content: counter(vox-sequence, decimal-leading-zero);
  font-weight: 850;
  letter-spacing: 0.08em;
}

.vox-service-mark {
  align-self: start;
  background:
    linear-gradient(90deg, rgba(184, 197, 206, 0.36) 1px, transparent 1px) 0 0 / 24px 100%,
    linear-gradient(180deg, rgba(184, 197, 206, 0.22) 1px, transparent 1px) 0 0 / 100% 22px,
    rgba(252, 251, 248, 0.72);
  border: 1px solid var(--vox-rule);
  border-radius: var(--vox-radius-sm);
  min-height: 7rem;
  padding: 0.75rem;
  position: relative;
}

.vox-service-mark svg {
  display: block;
  width: 100%;
}

.vox-service-mark .field {
  stroke: rgba(18, 75, 120, 0.22);
  stroke-width: 0.9;
}

.vox-service-mark .ghost {
  stroke: rgba(18, 75, 120, 0.42);
  stroke-width: 1;
}

.vox-service-mark .signal {
  stroke: var(--vox-orange);
  stroke-width: 2.4;
}

.vox-service-mark .signal-secondary {
  stroke: var(--vox-terracotta);
  stroke-width: 1.7;
}

.vox-service-mark .node {
  fill: var(--vox-paper-bright);
  stroke: var(--vox-blue);
  stroke-width: 1.2;
}

.vox-service-mark .node-soft {
  fill: var(--vox-paper-bright);
  stroke: rgba(18, 75, 120, 0.4);
  stroke-width: 1;
}

.vox-service-mark .marker {
  fill: transparent;
  stroke: var(--vox-terracotta);
  stroke-width: 1.6;
}

.vox-service-mark .panel {
  fill: rgba(221, 234, 242, 0.34);
  stroke: rgba(18, 75, 120, 0.38);
  stroke-width: 1;
}

.vox-service-mark::after {
  background: var(--vox-orange);
  content: "";
  height: 1px;
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  width: 34%;
}

.vox-audience-grid,
.vox-principle-grid,
.vox-work-grid,
.vox-post-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.6rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vox-audience-panel,
.vox-principle,
.vox-work-placeholder,
.vox-post-preview,
.vox-contact-panel {
  background: rgba(252, 251, 248, 0.68);
  border: 1px solid var(--vox-rule);
  border-radius: var(--vox-radius-sm);
  padding: clamp(1rem, 2.2vw, 1.8rem);
}

.vox-section-dark :where(.vox-audience-panel, .vox-principle, .vox-post-preview, .vox-contact-panel) {
  background: rgba(252, 251, 248, 0.06);
  border-color: rgba(221, 234, 242, 0.35);
  color: var(--vox-paper-bright);
}

.vox-audience-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.vox-audience-panel h3,
.vox-principle h3,
.vox-post-preview h3 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.08;
}

.vox-list-plain {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.vox-list-plain li {
  border-top: 1px solid rgba(184, 197, 206, 0.7);
  padding-block: 0.65rem;
}

.vox-placeholder-media {
  align-items: center;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(18, 75, 120, 0.08), rgba(244, 106, 34, 0.08)),
    var(--vox-paper-bright);
  border: 1px solid var(--vox-rule);
  color: var(--vox-muted);
  display: flex;
  font-size: 0.8rem;
  font-weight: 760;
  justify-content: center;
  min-height: 10rem;
  padding: 1rem;
  text-align: center;
}

.vox-page-hero {
  padding-block: clamp(4rem, 9vw, 9rem) clamp(2.5rem, 5vw, 5rem);
}

.vox-page-hero .vox-kicker {
  grid-column: 1 / span 2;
}

.vox-page-hero .vox-page-title {
  grid-column: 3 / span 6;
}

.vox-page-hero .vox-subtitle {
  grid-column: 9 / -1;
}

.vox-service-detail {
  border-top: 1px solid var(--vox-rule);
  padding-block: clamp(2rem, 4vw, 4rem);
}

.vox-service-detail h2 {
  grid-column: 1 / span 4;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
}

.vox-service-detail .vox-service-copy {
  display: grid;
  gap: 1.4rem;
  grid-column: 5 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vox-contact-shell {
  align-items: start;
}

.vox-contact-main {
  grid-column: 1 / span 7;
}

.vox-contact-aside {
  grid-column: 9 / -1;
}

.vox-form-slot label {
  color: var(--vox-ink-soft);
  display: block;
  font-size: 0.82rem;
  font-weight: 760;
  margin-bottom: 0.35rem;
}

.vox-form-slot input,
.vox-form-slot textarea {
  background: var(--vox-paper-bright);
  border: 1px solid var(--vox-rule);
  border-radius: var(--vox-radius-xs);
  color: var(--vox-ink);
  min-height: 2.9rem;
  padding: 0.75rem 0.85rem;
  width: 100%;
}

.vox-form-slot textarea {
  min-height: 9rem;
  resize: vertical;
}

.vox-form-row {
  margin-bottom: 1rem;
}

.vox-article-shell {
  padding-block: clamp(3rem, 7vw, 7rem);
}

.vox-article-header {
  border-bottom: 1px solid var(--vox-rule);
  margin-bottom: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.vox-article-content {
  max-width: var(--vox-measure);
}

.vox-article-content :where(p, li) {
  line-height: 1.75;
}

.vox-article-content blockquote {
  border-left: 3px solid var(--vox-orange);
  color: var(--vox-ink-soft);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  margin-inline: 0;
  padding-left: 1.2rem;
}

.vox-article-content pre {
  background: var(--vox-ink);
  border-radius: var(--vox-radius-sm);
  color: var(--vox-paper-bright);
  overflow: auto;
  padding: 1rem;
}

.vox-article-content .wp-block-image,
.vox-article-content figure {
  margin-block: 2rem;
}

.vox-callout,
.is-style-vox-callout {
  background: var(--vox-blue-pale);
  border-left: 3px solid var(--vox-blue);
  padding: 1.1rem 1.2rem;
}

.vox-query-loop .wp-block-post {
  border-top: 1px solid var(--vox-rule);
  padding-block: 1.5rem;
}

.vox-site-footer {
  background: var(--vox-ink);
  color: var(--vox-paper-bright);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.vox-footer-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: 1.3fr 1fr 1fr;
  margin-inline: auto;
  max-width: min(calc(100vw - (var(--vox-gutter) * 2)), var(--vox-grid-max));
}

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

.vox-site-footer .vox-meta {
  color: var(--vox-blue-pale);
}

.vox-reveal {
  opacity: 1;
  transform: none;
}

.js .vox-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js .vox-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  body {
    background: var(--vox-paper);
  }

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

  .vox-hero-copy,
  .vox-hero-visual,
  .vox-page-hero .vox-kicker,
  .vox-page-hero .vox-page-title,
  .vox-page-hero .vox-subtitle,
  .vox-contact-main,
  .vox-contact-aside {
    grid-column: 1 / -1;
  }

  .vox-hero {
    min-height: auto;
  }

  .vox-hero-visual {
    min-height: clamp(19rem, 58vw, 31rem);
  }

  .vox-sequence-item {
    grid-template-columns: minmax(3rem, 0.25fr) minmax(0, 1.2fr);
  }

  .vox-service-mark {
    grid-column: 2;
  }

  .vox-audience-grid,
  .vox-principle-grid,
  .vox-work-grid,
  .vox-post-grid,
  .vox-footer-grid {
    grid-template-columns: 1fr;
  }

  .vox-service-detail h2,
  .vox-service-detail .vox-service-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --vox-section: clamp(3rem, 14vw, 4.5rem);
    --vox-gutter: clamp(1rem, 5vw, 1.35rem);
  }

  html {
    scroll-behavior: auto;
  }

  .vox-header-inner {
    grid-template-columns: 1fr auto;
    min-height: 68px;
  }

  .vox-header-cta {
    display: none;
  }

  .vox-display {
    font-size: clamp(2.4rem, 14vw, 4rem);
    max-width: 9ch;
  }

  .vox-section-title,
  .vox-page-title {
    max-width: 100%;
  }

  .vox-service-detail .vox-service-copy {
    grid-template-columns: 1fr;
  }

  .vox-sequence-item {
    grid-template-columns: 1fr;
  }

  .vox-service-mark {
    grid-column: auto;
  }
}

@media (max-width: 375px) {
  .vox-wordmark {
    font-size: 1rem;
  }

  .vox-mark {
    width: 2rem;
  }

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

  .vox-placeholder-media {
    min-height: 8rem;
  }
}

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

  .js .vox-reveal {
    opacity: 1;
    transform: none;
  }

  .vox-signal-canvas {
    opacity: 0.96;
  }
}
