/* Foundation */
html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
.editor-styles-wrapper {
  background: var(--pr-color-bg);
  color: var(--pr-color-body);
  font-family: var(--pr-font-sans);
  font-size: var(--pr-fs-body);
  line-height: var(--pr-lh-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.pr-site {
  overflow-x: hidden;
}

body.pr-site :is(#wrapper, .site) {
  background: var(--pr-color-bg);
}

body.page :is(.entry-header, .page-hero-section, .entry-hero) {
  display: none;
}

body.page :is(.content-container, .content-area, .site-main, .entry-content, .entry-content-wrap) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.page .content-wrap {
  display: block;
}

.single-content :is(.wp-block-group, .wp-block-columns, figure, p, h1, h2, h3) {
  margin-top: 0;
}

.single-content > .wp-block-group {
  margin-block: 0;
}

.single-content .wp-block-group:last-child {
  margin-bottom: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.editor-styles-wrapper :is(h1, h2, h3) {
  color: var(--pr-color-text);
  font-family: var(--pr-font-sans);
  font-weight: var(--pr-weight-heading);
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: var(--pr-fs-h1); }
h2 { font-size: var(--pr-fs-h2); }
h3 {
  font-size: var(--pr-fs-h3);
  letter-spacing: -0.025em;
  line-height: 1.16;
}

p,
li {
  color: var(--pr-color-body);
}

a {
  color: var(--pr-color-primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--pr-color-primary-hover);
  text-decoration: none;
}

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

.pr-eyebrow {
  margin: 0 0 10px;
  color: var(--pr-color-primary);
  font-size: 12px;
  font-weight: var(--pr-weight-bold);
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.pr-small {
  color: var(--pr-color-muted);
  font-size: var(--pr-fs-small);
}

.pr-kicker {
  color: var(--pr-color-muted);
  font-size: 13px;
  font-weight: var(--pr-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Containers and sections */
.pr-container {
  width: min(calc(100% - (var(--pr-container-gutter) * 2)), var(--pr-container));
  margin-inline: auto;
}

:is(.pr-section, .pr-hero, .pr-cta) > .wp-block-group__inner-container {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.pr-section {
  --pr-context-bg: var(--pr-surface-dark-bg);
  --pr-context-bg-deep: var(--pr-color-bg-deep);
  --pr-context-bg-soft: var(--pr-surface-dark-soft-bg);
  --pr-context-card: var(--pr-surface-dark-card);
  --pr-context-card-hover: #171e27;
  --pr-context-field: #111315;
  --pr-context-text: var(--pr-surface-dark-text);
  --pr-context-body: var(--pr-surface-dark-body);
  --pr-context-muted: var(--pr-surface-dark-muted);
  --pr-context-border: var(--pr-surface-dark-border);
  --pr-context-border-soft: var(--pr-surface-dark-border-soft);
  --pr-context-border-strong: var(--pr-color-border-strong);
  --pr-context-accent: var(--pr-color-primary);
  --pr-context-hover-bg: rgba(255, 255, 255, 0.02);
  --pr-context-active-bg: rgba(20, 26, 34, 0.72);
  --pr-context-row-hover: rgba(255, 255, 255, 0.024);
  --pr-context-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  --pr-context-shadow-hover: 0 10px 26px rgba(0, 0, 0, 0.22);
  --pr-context-placeholder: rgba(148, 163, 184, 0.78);

  position: relative;
  padding-block: var(--pr-section-y);
  background: var(--pr-context-bg);
  color: var(--pr-context-body);
}

.pr-section + .pr-section {
  border-top: 1px solid var(--pr-context-border-soft);
}

.pr-section--large { padding-block: var(--pr-section-y-large); }

.pr-section--soft {
  --pr-context-bg: var(--pr-surface-dark-soft-bg);
  background: var(--pr-context-bg);
}

.pr-section--card {
  --pr-context-bg: var(--pr-surface-dark-card);
  background: var(--pr-context-bg);
}

.pr-section--bordered {
  border-block: 1px solid var(--pr-context-border);
}

.pr-section--light {
  --pr-context-bg: var(--pr-surface-light-bg);
  --pr-context-bg-deep: #ffffff;
  --pr-context-bg-soft: #edf1f2;
  --pr-context-card: var(--pr-surface-light-card);
  --pr-context-card-hover: #ffffff;
  --pr-context-field: #ffffff;
  --pr-context-text: var(--pr-surface-light-text);
  --pr-context-body: var(--pr-surface-light-body);
  --pr-context-muted: var(--pr-surface-light-muted);
  --pr-context-border: var(--pr-surface-light-border);
  --pr-context-border-soft: rgba(16, 21, 28, 0.1);
  --pr-context-border-strong: rgba(0, 109, 120, 0.52);
  --pr-context-accent: var(--pr-surface-light-accent);
  --pr-context-hover-bg: rgba(255, 255, 255, 0.62);
  --pr-context-active-bg: rgba(255, 255, 255, 0.82);
  --pr-context-row-hover: rgba(16, 21, 28, 0.035);
  --pr-context-shadow: 0 8px 24px rgba(16, 21, 28, 0.055);
  --pr-context-shadow-hover: 0 10px 26px rgba(16, 21, 28, 0.075);
  --pr-context-placeholder: rgba(63, 75, 87, 0.62);

  border-block: 1px solid var(--pr-context-border);
  background: var(--pr-context-bg);
  color: var(--pr-context-body);
  color-scheme: light;
}

.pr-section--light + .pr-section {
  border-top: 0;
}

.pr-section--light :where(h2, h3, h4, h5, h6) {
  color: var(--pr-context-text);
}

.pr-section--light :where(p, li),
.pr-section--light :is(.pr-section__description, .pr-lead) {
  color: var(--pr-context-body);
}

.pr-section--light :where(.pr-eyebrow) {
  color: var(--pr-context-accent);
}

.pr-section--light :where(.pr-small, .pr-kicker) {
  color: var(--pr-context-muted);
}

.pr-section--light :where(a:not(.pr-btn, .wp-block-button__link)) {
  color: var(--pr-context-accent);
}

.pr-section--light :where(a:not(.pr-btn, .wp-block-button__link)):is(:hover, :focus-visible) {
  color: #005a63;
}

.pr-section__head {
  max-width: 860px;
  margin-bottom: var(--pr-space-7);
}

.pr-section__head--center,
.pr-section:has(.pr-faq) .pr-section__head {
  margin-inline: auto;
  text-align: center;
}

.pr-section:has(.pr-faq) .pr-section__head {
  width: 100%;
  max-width: 900px;
}

.pr-section:has(.pr-faq) .pr-section__description {
  margin-inline: auto;
}

.pr-section:has(.pr-faq) .pr-faq {
  text-align: left;
}

.pr-section__title {
  max-width: 920px;
  margin-bottom: 20px;
}

.pr-section__title.pr-heading--narrow {
  font-size: min(var(--pr-fs-h2), 42px);
}

.pr-hero__title.pr-heading--narrow {
  font-size: min(var(--pr-fs-h1), 50px);
}

.pr-section__description,
.pr-lead {
  max-width: var(--pr-narrow);
  margin-bottom: 0;
  color: var(--pr-color-body);
  font-size: var(--pr-fs-body);
  line-height: 1.7;
  text-wrap: pretty;
}

/* Layout primitives */
.pr-grid {
  display: grid;
  grid-auto-rows: 1fr;
  gap: var(--pr-card-gap);
}

.pr-grid--natural-rows { grid-auto-rows: auto; }
.pr-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pr-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pr-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

:is(
  .pr-grid,
  .pr-split,
  .pr-hero__grid,
  .pr-trust-strip__grid,
  .pr-factory-panel__stats,
  .pr-featured-project,
  .pr-rfq-layout,
  .pr-faq,
  .pr-interface-review,
  .pr-interface-review__outputs
) > .wp-block-group__inner-container {
  display: contents;
}

.pr-grid > .wp-block-group__inner-container > * {
  margin-block: 0;
}

.pr-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pr-space-8);
  align-items: center;
}

.pr-split__content {
  min-width: 0;
}

/* Lists and utility elements */
.pr-list {
  display: grid;
  gap: var(--pr-space-3);
  margin: var(--pr-space-5) 0 0;
  padding: 0;
  list-style: none;
}

.pr-list li {
  position: relative;
  padding-left: 24px;
}

.pr-list li::before {
  position: absolute;
  top: 0.77em;
  left: 0;
  width: 10px;
  height: 1px;
  background: var(--pr-color-primary);
  content: "";
}

.pr-divider {
  height: 1px;
  border: 0;
  background: var(--pr-color-border);
}

::selection {
  background: var(--pr-color-primary);
  color: var(--pr-color-bg);
}

:focus-visible {
  outline: 2px solid var(--pr-color-primary);
  outline-offset: 3px;
}
