/*
Theme Name: Sorteria Premium
Theme URI: https://sorteriasolutions.com/
Author: Alphateds
Description: Premium Gutenberg block theme for Sorteria Solutions, AI-enabled fire protection engineering.
Version: 4.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: sorteria-premium
*/

/* ==========================================================================
   1. Font Faces
   ========================================================================== */

@font-face {
  font-family: "Poppins";
  src: url("./assets/fonts/poppins-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("./assets/fonts/poppins-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("./assets/fonts/poppins-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("./assets/fonts/poppins-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("./assets/fonts/poppins-800-latin.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. Design Tokens
   ========================================================================== */

:root {
  --ink: #0f1419;
  --charcoal: #171b20;
  --steel: #5a6470;
  --muted: #8892a0;
  --line: #e2e7eb;
  --paper: #ffffff;
  --soft: #f5f7f9;
  --mist: #edf1f4;
  --red: #e53922;
  --red-dark: #c42d1a;
  --red-glow: rgba(229, 57, 34, 0.12);
  --cyan: #39bfd0;
  --green: #8bc45f;
  --shadow-sm: 0 2px 8px rgba(15, 20, 25, 0.06);
  --shadow: 0 8px 30px rgba(15, 20, 25, 0.1);
  --shadow-lg: 0 20px 60px rgba(15, 20, 25, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --inner: 1280px;
  --site-shell: min(var(--inner), calc(100vw - 48px));
  --site-edge: clamp(24px, 4vw, 60px);
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* ==========================================================================
   3. Reset + Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body :focus-visible {
  outline: 3px solid rgba(229, 57, 34, 0.6);
  outline-offset: 3px;
  border-radius: 2px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  padding-left: 1.25em;
}

/* ==========================================================================
   4. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.8rem, 5.5vw, 5.5rem);
  max-width: 900px;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  max-width: 800px;
}

h3 {
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0;
}

p, ul, ol {
  color: var(--steel);
  line-height: 1.65;
}

.eyebrow,
.card-kicker,
.case-tag,
.sorteria-service-card__kicker,
.overlay-kicker,
.sorteria-team-role {
  display: inline-block;
  margin: 0 0 16px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.large-copy {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--steel);
  line-height: 1.6;
  max-width: 640px;
}

.section-intro {
  max-width: 600px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   5. Layout Primitives
   ========================================================================== */

.section {
  width: var(--site-shell);
  padding: clamp(80px, 9vw, 140px) 0;
}

.sorteria-page > .section:not(.hero-reference) {
  padding-left: var(--site-edge);
  padding-right: var(--site-edge);
}

.section + .section {
  margin-top: 0;
}

.wp-site-blocks {
  padding-bottom: 0;
}

.wp-site-blocks > * {
  margin-block-start: 0 !important;
}

.sorteria-header + main,
.sorteria-header + .wp-block-group,
.sorteria-page {
  margin-top: 0 !important;
}

/* ==========================================================================
   6. Header
   ========================================================================== */

.sorteria-header {
  position: relative;
  z-index: 100;
  padding-top: 0;
  background: var(--paper);
}

.sorteria-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 var(--site-edge);
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
}

.sorteria-topbar a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}

.sorteria-topbar a:hover {
  color: #fff;
}

.sorteria-topbar__contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sorteria-topbar__contact span {
  color: rgba(255, 255, 255, 0.5);
}

.sorteria-topbar__socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sorteria-topbar__socials a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.sorteria-topbar__socials a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sorteria-topbar__socials svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.sorteria-navbar {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(0, 1fr) auto;
  align-items: center;
  width: var(--site-shell);
  min-height: 72px;
  padding: 0 var(--site-edge);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.sorteria-brand {
  display: flex;
  align-items: center;
  gap: 0;
}

.sorteria-brand .site-logo-wordmark {
  margin: 0;
}

.sorteria-brand .site-logo-wordmark img {
  display: block;
  width: clamp(164px, 14vw, 210px) !important;
  height: auto !important;
  max-height: 68px;
  border-radius: 0;
  object-fit: contain !important;
}

.brand-text {
  max-width: 200px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sorteria-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 14px);
}

.sorteria-menu p {
  margin: 0;
}

.sorteria-menu p a,
.mega-trigger-button,
.mega-trigger-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  color: var(--steel);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.sorteria-menu p a:hover,
.sorteria-menu a:focus-visible,
.mega-trigger-button:hover,
.mega-trigger-button:focus-visible,
.mega-trigger-button[aria-expanded="true"],
.mega-trigger-button .wp-block-button__link:hover,
.mega-trigger-button .wp-block-button__link:focus-visible,
.mega-trigger-button .wp-block-button__link[aria-expanded="true"] {
  color: var(--red);
  border-bottom-color: var(--red);
}

.mobile-menu-only {
  display: none;
}

/* Mega Menu */
.sorteria-mega-menu {
  position: relative;
}

.sorteria-mega-menu::before {
  content: "";
  position: absolute;
  top: 100%;
  left: -28px;
  right: -28px;
  height: 32px;
  background: rgba(255, 255, 255, 0);
}

.sorteria-mega-panel {
  position: fixed;
  top: var(--mega-top, 112px);
  left: 50vw;
  transform: translateX(-50%) translateY(8px);
  width: min(960px, calc(100vw - 60px));
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 240;
}

.sorteria-mega-menu.is-mega-open .sorteria-mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-panel-grid {
  gap: 12px !important;
}

.mega-card {
  min-height: 130px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.mega-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.mega-card p:first-child {
  margin: 0 0 4px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mega-card h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.mega-card > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.mega-card-featured,
.mega-card-cta {
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.mega-card-featured h3,
.mega-card-featured h3 a,
.mega-card-cta h3,
.mega-card-cta h3 a {
  color: #fff;
}

.mega-card-featured > p:last-child,
.mega-card-cta > p:last-child {
  color: rgba(255, 255, 255, 0.65);
}

/* Nav CTA */
.nav-cta .wp-block-button__link {
  min-height: 40px;
  padding: 10px 22px;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(229, 57, 34, 0.25);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.nav-cta .wp-block-button__link:hover {
  background: var(--red-dark);
  box-shadow: 0 6px 20px rgba(229, 57, 34, 0.35);
  transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  grid-template-columns: 1fr;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-open {
  overflow: hidden;
}


/* ==========================================================================
   7. Hero, Dark
   ========================================================================== */

.hero-reference {
  width: 100%;
  padding: 0;
  background: var(--charcoal);
  overflow: hidden;
}

.product-hero {
  width: var(--site-shell);
  padding: clamp(60px, 7vw, 100px) var(--site-edge) clamp(50px, 6vw, 80px);
  background: var(--charcoal);
}

.product-hero-grid {
  gap: clamp(32px, 5vw, 80px) !important;
  align-items: center;
}

.product-hero .eyebrow {
  color: var(--red);
}

.product-hero .hero-title {
  max-width: 800px;
  color: #fff;
  font-size: clamp(3rem, 5.8vw, 6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-subcopy-strong {
  margin-top: 20px !important;
  color: var(--red) !important;
  font-family: var(--font);
  font-size: clamp(1rem, 1.4vw, 1.2rem) !important;
  font-weight: 700;
  line-height: 1.4;
}

.product-hero .hero-subcopy {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.65;
}

.hero-main-action {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 36px) !important;
}

.hero-project-image {
  margin: 0;
}

.hero-project-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.command-center-asset {
  width: min(100%, 560px);
  margin: 0 0 0 auto !important;
}

.command-center-asset img,
.command-center-asset video,
.command-center-asset iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(125, 175, 197, 0.28);
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.sorteria-vimeo-embed {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(125, 175, 197, 0.28);
  border-radius: 10px;
  background: #071d28;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.sorteria-vimeo-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.sorteria-vimeo-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 76px;
  height: 76px;
  padding: 0;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(255, 99, 42, 0.96);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, background 180ms ease;
}

.sorteria-vimeo-play span {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid currentColor;
}

.sorteria-vimeo-play:hover,
.sorteria-vimeo-play:focus-visible {
  background: #ff6b32;
  transform: translate(-50%, -50%) scale(1.06);
}

.sorteria-vimeo-play:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 5px;
}

.sorteria-vimeo-play[hidden] {
  display: none;
}

.hero-proof-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.hero-proof-line span {
  min-height: 52px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-proof-line span:first-child {
  border-left: 0;
}

/* Page hero cards (inner pages) */
.page-hero-card {
  background: var(--soft);
}

.page-hero-card .eyebrow {
  margin-bottom: 12px;
}

.page-hero-card h1 {
  max-width: 800px;
}

.page-hero-card .large-copy {
  margin-top: 16px;
}

.page-hero-card .wp-block-columns {
  gap: clamp(32px, 5vw, 72px) !important;
  align-items: center;
}

.page-hero-card .cutout-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   8. Buttons
   ========================================================================== */

.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.is-style-primary-action .wp-block-button__link,
.sorteria-contact-form button {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(229, 57, 34, 0.25);
}

.is-style-primary-action .wp-block-button__link:hover,
.sorteria-contact-form button:hover {
  background: var(--red-dark);
  box-shadow: 0 6px 24px rgba(229, 57, 34, 0.35);
  transform: translateY(-1px);
}

.is-style-secondary-action .wp-block-button__link {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.is-style-secondary-action .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

.product-hero .is-style-secondary-action .wp-block-button__link,
.page-hero-card .is-style-secondary-action .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.product-hero .is-style-secondary-action .wp-block-button__link:hover,
.page-hero-card .is-style-secondary-action .wp-block-button__link:hover {
  background: var(--ink);
  color: #fff;
}

/* ==========================================================================
   9. Cards, Service, Project, Team, Review
   ========================================================================== */

.sorteria-dynamic-grid,
.testimonial-grid {
  gap: 20px;
}

.sorteria-service-card,
.sorteria-project-card,
.sorteria-team-card,
.review-card,
.sorteria-contact-form,
.detail-editorial,
.detail-facts,
.detail-fact,
.consultation-brief,
.stats-row.compact p {
  border-radius: var(--radius);
}

/* Dynamic post detail layout */
.sorteria-detail-page {
  background: var(--paper);
}

.sorteria-detail-page .section {
  width: var(--site-shell);
  padding-left: var(--site-edge);
  padding-right: var(--site-edge);
}

.detail-hero {
  display: grid;
  gap: 34px;
  padding-top: clamp(64px, 7vw, 92px);
  padding-bottom: 34px;
  background: var(--soft);
}

.detail-hero__intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.55fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: end;
}

.detail-hero__heading h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.6rem, 4.2vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.detail-hero__excerpt {
  display: grid;
  gap: 24px;
  align-content: end;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(7, 23, 35, 0.04);
}

.detail-hero__excerpt p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.68;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.detail-button,
.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.detail-button {
  color: #fff;
  background: var(--red);
  box-shadow: 0 12px 24px rgba(255, 103, 38, 0.2);
}

.detail-button:hover {
  color: #fff;
  background: var(--red-dark);
}

.detail-link {
  color: var(--ink);
  background: #f7fafb;
  border: 1px solid var(--line);
}

.detail-featured-image {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 18px 54px rgba(7, 23, 35, 0.14);
}

.detail-featured-image img {
  width: 100%;
  height: clamp(360px, 42vw, 560px);
  object-fit: cover;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(210px, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-top: 54px;
  padding-bottom: 86px;
}

.detail-editorial {
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
}

.detail-editorial .eyebrow {
  margin-bottom: 18px;
}

.detail-content {
  display: grid;
  gap: 18px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.72;
}

.detail-content > * {
  margin: 0;
}

.detail-content h2,
.detail-content h3 {
  max-width: 760px;
  margin-top: 18px;
  line-height: 1.12;
  letter-spacing: 0;
}

.detail-content h2 {
  font-size: clamp(1.7rem, 2.2vw, 2.35rem);
}

.detail-content h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
}

.detail-facts {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--ink);
  color: #fff;
}

.detail-facts .eyebrow {
  margin-bottom: 8px;
  color: var(--cyan);
}

.detail-fact {
  display: grid;
  gap: 7px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.detail-fact span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-fact strong {
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .detail-hero__intro,
  .detail-body {
    grid-template-columns: 1fr;
  }

  .detail-hero__heading h1 {
    font-size: clamp(2.2rem, 7vw, 3.3rem);
  }

  .detail-featured-image img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .detail-facts {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-facts .eyebrow {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .detail-hero {
    gap: 22px;
    padding-top: 46px;
    padding-bottom: 24px;
  }

  .detail-hero__intro {
    gap: 20px;
  }

  .detail-hero__heading h1 {
    font-size: 2.05rem;
    line-height: 1.06;
  }

  .detail-hero__excerpt,
  .detail-editorial,
  .detail-facts {
    padding: 18px;
  }

  .detail-body {
    gap: 18px;
    padding-top: 30px;
    padding-bottom: 56px;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }
}

/* Service Card */
.sorteria-service-card {
  display: grid;
  align-content: start;
  min-height: 320px;
  padding: 28px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.sorteria-service-card:hover,
.sorteria-service-card:focus-visible {
  border-color: rgba(229, 57, 34, 0.3);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.sorteria-service-card__icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  color: var(--red);
  background: var(--red-glow);
  border: none;
  border-radius: var(--radius-sm);
}

.sorteria-service-card__kicker {
  margin-bottom: 8px;
}

.sorteria-service-card h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.sorteria-service-card p {
  font-size: 0.92rem;
  line-height: 1.6;
}

.sorteria-service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Project Card */
.sorteria-project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.sorteria-project-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.sorteria-project-card__media img {
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.sorteria-project-card__media {
  position: relative;
  display: block;
}

.sorteria-project-card__media span {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border: 1px solid rgba(219, 228, 232, 0.9);
}

.sorteria-project-card__media span,
.sorteria-card-metric {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sorteria-card-metric {
  background: var(--soft);
  color: var(--ink) !important;
  border: 1px solid var(--line);
}

.sorteria-project-card__body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
}

.sorteria-project-card__body h3,
.sorteria-project-card__body p {
  margin: 0;
}

.sorteria-project-card__body h3 a {
  color: var(--ink);
  text-decoration: none;
}

.sorteria-project-card__body h3 a:hover {
  color: var(--red);
}

.sorteria-project-card__body .sorteria-card-metric {
  justify-self: start;
  margin-top: 6px;
}

/* Review Card */
.review-card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.25s;
}

.review-card:hover {
  box-shadow: var(--shadow-sm);
}

.review-card p {
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
}

.testimonial-slider {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.testimonial-slider__controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.testimonial-slider__button,
.testimonial-slider__button .wp-block-button__link {
  min-height: 38px;
  padding: 9px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.testimonial-slider__button:hover,
.testimonial-slider__button .wp-block-button__link:hover {
  color: #fff;
  background: var(--ink);
}

.testimonial-slider__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 40%);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.testimonial-slider__track::-webkit-scrollbar {
  display: none;
}

.testimonial-slider__track .review-card {
  min-height: 230px;
  scroll-snap-align: start;
}

.review-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.review-person figure,
.review-person h3,
.review-person p {
  margin: 0 !important;
}

.review-person img,
.review-person__image img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.review-person cite,
.review-person__copy,
.review-person__name {
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
  font-size: 0.88rem;
}

.review-person cite span,
.review-person__role {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.78rem;
}

.testimonial-slider--managed {
  gap: 24px;
  margin-top: 0;
}

.testimonial-slider__topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.testimonial-slider__topline h2 {
  max-width: 780px;
  margin: 0;
}

.testimonial-slider__topline .eyebrow {
  margin-bottom: 14px;
}

.testimonial-slider--managed .testimonial-slider__controls {
  align-items: center;
}

.testimonial-slider--managed .testimonial-slider__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 42px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(7, 23, 35, 0.04);
}

.testimonial-slider--managed .testimonial-slider__button:hover {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.testimonial-slider--managed .testimonial-slider__track {
  grid-auto-columns: minmax(420px, 56%);
  gap: 18px;
  padding: 2px 2px 6px;
}

.testimonial-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 260px;
  padding: 24px;
  overflow: hidden;
  scroll-snap-align: start;
  background:
    linear-gradient(135deg, rgba(255, 103, 38, 0.08), transparent 34%),
    #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(7, 23, 35, 0.04);
}

.testimonial-card__quote-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
}

.testimonial-card__review {
  max-width: 520px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.08vw, 1.12rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
}

.testimonial-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.testimonial-card__person {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.testimonial-card__person img {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-card__person h3,
.testimonial-card__person p {
  margin: 0;
}

.testimonial-card__person h3 {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.1;
}

.testimonial-card__person p {
  margin-top: 3px;
  color: var(--steel);
  font-size: 0.78rem;
  line-height: 1.25;
}

.testimonial-card__video {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.testimonial-card__video:hover {
  color: #fff;
  background: var(--red);
}

.testimonial-card__video svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 780px) {
  .testimonial-slider__topline {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .testimonial-slider--managed .testimonial-slider__controls {
    justify-content: flex-start;
  }

  .testimonial-slider--managed .testimonial-slider__track {
    grid-auto-columns: minmax(280px, 88%);
  }

  .testimonial-card {
    min-height: 260px;
    padding: 22px;
  }

  .testimonial-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .testimonial-card__video {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   10. Components, Stats, Workflow, Industry, AI Grid
   ========================================================================== */

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: min(var(--inner), calc(100vw - 56px));
  margin: 48px auto 0;
}

.stats-row p {
  margin: 0;
  padding: 0 24px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.stats-row p:first-child {
  border-left: 0;
}

.stats-row strong {
  display: block;
  color: var(--ink);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1;
}

.stats-row span {
  display: block;
  max-width: 130px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.stats-row.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin-top: 0;
  gap: 16px;
}

.stats-row.compact p {
  display: grid;
  min-height: 120px;
  align-content: center;
  justify-items: center;
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stats-row.compact strong,
.stats-row.compact span {
  display: block;
  width: 100%;
  text-align: center;
}

/* Workflow Track */
.workflow-strip {
  margin-top: 0;
  padding-top: 0 !important;
  padding-bottom: clamp(60px, 7vw, 100px);
}

.workflow-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.workflow-track article,
.workflow-track > .workflow-card {
  min-height: 240px;
  padding: clamp(24px, 2.5vw, 36px);
  border-left: 1px solid var(--line);
  transition: background 0.2s;
}

.workflow-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--cyan);
  background: rgba(0, 166, 184, 0.1);
  border: 1px solid rgba(0, 166, 184, 0.18);
  border-radius: 8px;
}

.workflow-icon svg,
.workflow-icon img {
  width: 26px;
  height: 26px;
  fill: none;
  object-fit: contain;
}

.workflow-track article:first-child,
.workflow-track > .workflow-card:first-child {
  border-left: 0;
}

.workflow-track article:hover,
.workflow-track > .workflow-card:hover {
  background: var(--soft);
}

.workflow-track small,
.workflow-card__kicker {
  display: block;
  margin-bottom: 18px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-track strong,
.workflow-card__title {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.25;
}

.workflow-track p:not(.workflow-card__kicker) {
  margin: 12px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

/* AI Check Grid */
.ai-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.ai-check-grid span {
  min-height: 44px;
  display: grid;
  align-items: center;
  padding: 10px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Industry Grid */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.industry-grid span,
.industry-grid .industry-pill {
  min-height: 88px;
  display: grid;
  align-items: center;
  margin: 0;
  padding: 18px 20px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.industry-grid span:hover,
.industry-grid .industry-pill:hover {
  border-color: rgba(229, 57, 34, 0.3);
  box-shadow: var(--shadow-sm);
}

.industry-grid--detail {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.industry-grid--media {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.industry-grid .industry-card {
  position: relative;
  height: 260px;
  min-height: 260px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink);
  box-shadow: 0 1px 0 rgba(7, 23, 35, 0.04);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.industry-grid .industry-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: block;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
  transform: scale(1.01);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.industry-grid .industry-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 23, 35, 0.08), rgba(7, 23, 35, 0.72));
}

.industry-grid .industry-card span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  line-height: 1.18;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.34);
}

.industry-grid .industry-card:hover {
  transform: translateY(-3px);
  border-color: rgba(57, 191, 208, 0.42);
  box-shadow: var(--shadow);
}

.industry-grid .industry-card:hover img {
  filter: saturate(1.02) contrast(1.06);
  transform: scale(1.06);
}

/* ==========================================================================
   11. Sections
   ========================================================================== */

/* Product Suite */
.product-suite {
  background: var(--paper);
}

.product-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-stack article,
.product-stack > .product-card {
  min-height: 340px;
  display: grid;
  grid-template-rows: 82px minmax(54px, auto) minmax(84px, auto) 1fr;
  align-content: start;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  padding: clamp(22px, 2.5vw, 32px);
  border-left: 1px solid var(--line);
  transition: background 0.2s;
}

.product-stack article:first-child,
.product-stack > .product-card:first-child {
  border-left: 0;
}

.product-stack article:hover,
.product-stack > .product-card:hover {
  background: var(--soft);
}

.product-stack span,
.product-stack .product-card__number {
  display: inline-block;
  align-self: start;
  margin-bottom: 0;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.product-stack h3,
.solution-board strong {
  color: var(--ink);
}

.product-stack p:not(.product-card__number):not(.product-card__link) {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.product-stack a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 20px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-stack ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-left: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.product-stack--detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-stack--detail article,
.product-stack--detail > .product-card {
  min-height: 400px;
  border-top: 1px solid var(--line);
}

.product-stack--detail article:nth-child(1),
.product-stack--detail article:nth-child(2),
.product-stack--detail > .product-card:nth-child(1),
.product-stack--detail > .product-card:nth-child(2) {
  border-top: 0;
}

.product-stack--detail article:nth-child(odd),
.product-stack--detail > .product-card:nth-child(odd) {
  border-left: 0;
}

/* Solutions */
.solutions-matrix {
  background: var(--paper);
}

.solution-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.solution-board article,
.solution-board > .solution-card {
  display: grid;
  grid-template-rows: 46px minmax(72px, auto) 1fr;
  align-content: start;
  min-height: 220px;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  padding: clamp(24px, 2.8vw, 36px);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.solution-board article:hover,
.solution-board > .solution-card:hover {
  border-color: rgba(229, 57, 34, 0.25);
  box-shadow: var(--shadow-sm);
}

.solution-board small,
.solution-card__kicker {
  display: block;
  align-self: start;
  margin-bottom: 0;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.solution-board strong,
.solution-card__title {
  display: block;
  max-width: 540px;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  line-height: 1.25;
}

.solution-board p:not(.solution-card__kicker) {
  align-self: start;
  max-width: 600px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.solution-board--detail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Industries */
.industries-panel {
  background: var(--paper);
}

/* Proof Lab, Dark */
.proof-lab {
  background: var(--charcoal);
}

.proof-lab .eyebrow {
  color: var(--red);
}

.proof-lab h2,
.proof-lab h3,
.proof-lab .large-copy {
  color: #fff;
}

.proof-lab p {
  color: rgba(255, 255, 255, 0.7);
}

.proof-lab .wp-block-columns {
  gap: clamp(36px, 5vw, 80px) !important;
  align-items: center;
}

.proof-image {
  border-radius: var(--radius);
  overflow: hidden;
}

.proof-image img {
  border-radius: var(--radius);
}

/* Contractor Problem */
.contractor-problem {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contractor-problem .wp-block-columns {
  gap: clamp(36px, 5vw, 76px) !important;
}

/* Project Feature */
.project-feature {
  background: var(--paper);
}

.project-feature .wp-block-columns {
  gap: clamp(36px, 5vw, 76px) !important;
}

/* Delivery Team */
.delivery-team {
  background: var(--soft);
  border: none;
  border-radius: 0;
}

/* Capability Deck */
.capability-deck {
  background: var(--soft);
  border: none;
  border-radius: 0;
}

.capability-deck .section-intro {
  margin-left: 0;
  margin-right: 0;
}

/* Testimonial Band */
.testimonial-band {
  background: var(--soft);
  border: none;
  border-radius: 0;
}

/* Contact Section */
.contact-section {
  background: var(--paper);
}

/* CTA Band */
.cta-band {
  background: var(--charcoal);
  border-radius: var(--radius);
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  max-width: 700px;
  margin: 0 auto;
}

.cta-band .eyebrow {
  color: #ff8b78;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.7);
}

/* Cutout Image */
.cutout-image {
  border-radius: var(--radius);
  overflow: hidden;
}

.cutout-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Trust Strip */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 24px;
  background: var(--charcoal);
  border-radius: var(--radius);
}

/* ==========================================================================
   12. Footer, Premium Dark
   ========================================================================== */

.sorteria-footer {
  width: var(--site-shell);
  margin-top: 0;
  background: var(--charcoal);
  border-radius: 0;
}

.premium-footer {
  width: var(--site-shell);
  margin: 0 auto;
  padding: 0;
  background: #101417;
  border-radius: 0;
  color: #fff;
}

.premium-footer p,
.premium-footer a,
.premium-footer h2,
.premium-footer h3 {
  color: #fff;
}

.premium-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(48px, 7vw, 80px) var(--site-edge);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-footer__brand {
  display: grid;
  gap: 20px;
}

.premium-footer__brand .footer-logo {
  margin: 0 !important;
}

.premium-footer__brand .footer-logo img {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xs);
}

.premium-footer__brand .footer-logo-wordmark img {
  width: min(210px, 100%) !important;
  height: auto !important;
  border: 0;
  border-radius: 0;
  object-fit: contain !important;
}

.premium-footer__brand h2 {
  max-width: 800px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.04;
}

.premium-footer__brand p {
  max-width: 600px;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  line-height: 1.6;
}

.premium-footer__contact {
  align-self: end;
  padding: clamp(24px, 3vw, 36px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.premium-footer__contact .eyebrow {
  color: #ff8b78;
}

.premium-footer__contact p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.7);
}

.premium-footer__links {
  width: 100%;
  gap: 0 !important;
  padding: 0 var(--site-edge);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-footer__links > .wp-block-column {
  padding: clamp(28px, 3vw, 42px) clamp(18px, 2.2vw, 32px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-footer__links > .wp-block-column:first-child {
  border-left: 0;
}

.premium-footer__links h3 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-footer .footer-links {
  display: grid !important;
  gap: 10px !important;
  margin: 0 !important;
}

.premium-footer .footer-links a {
  width: fit-content;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.premium-footer .footer-links a:hover,
.premium-footer .footer-links a:focus-visible {
  color: #fff;
}

.premium-footer__bottom {
  padding: 20px var(--site-edge);
  gap: 18px;
}

.premium-footer__bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
}

/* ==========================================================================
   13. Contact Form
   ========================================================================== */

.sorteria-contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
}

.sorteria-contact-form .form-status {
  max-width: none;
  margin: 0 0 24px;
  padding: 14px 16px;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  color: var(--ink);
  font-weight: 500;
}

.sorteria-contact-form .form-status--error {
  border-left-color: var(--ink);
  background: #f3f0eb;
}

.sorteria-contact-form h2 {
  margin-bottom: 8px;
}

.sorteria-contact-form p {
  max-width: 480px;
}

.sorteria-contact-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.sorteria-contact-form input,
.sorteria-contact-form textarea,
.sorteria-contact-form select {
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sorteria-contact-form input:focus,
.sorteria-contact-form textarea:focus,
.sorteria-contact-form select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.sorteria-contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.sorteria-contact-form button {
  margin-top: 8px;
}

/* ==========================================================================
   14. Scroll Reveal Animations
   ========================================================================== */

.reveal-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Staggered children */
.sorteria-dynamic-grid .reveal-in:nth-child(2),
.solution-board .reveal-in:nth-child(2) {
  transition-delay: 0.08s;
}

.sorteria-dynamic-grid .reveal-in:nth-child(3),
.solution-board .reveal-in:nth-child(3) {
  transition-delay: 0.16s;
}

.sorteria-dynamic-grid .reveal-in:nth-child(4),
.solution-board .reveal-in:nth-child(4) {
  transition-delay: 0.24s;
}

.sorteria-dynamic-grid .reveal-in:nth-child(5) {
  transition-delay: 0.32s;
}

.sorteria-dynamic-grid .reveal-in:nth-child(6) {
  transition-delay: 0.4s;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ==========================================================================
   15. Responsive, 1100px
   ========================================================================== */

@media (max-width: 1100px) {
  .product-stack,
  .solution-board--detail,
  .industry-grid,
  .industry-grid--media,
  .industry-grid--detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-stack article:nth-child(3),
  .product-stack > .product-card:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .product-stack article:nth-child(4),
  .product-stack > .product-card:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .workflow-track,
  .sorteria-dynamic-grid,
  .testimonial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sorteria-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sorteria-team-card {
    grid-template-rows: 190px 1fr;
  }

  .sorteria-team-card__media,
  .sorteria-team-card__media img {
    min-height: 190px;
  }
}

/* ==========================================================================
   16. Responsive, 980px
   ========================================================================== */

@media (max-width: 980px) {
  .sorteria-page > .section:first-child {
    width: calc(100vw - 36px) !important;
    max-width: calc(100vw - 36px) !important;
  }

  .product-hero {
    width: calc(100vw - 36px) !important;
    max-width: calc(100vw - 36px) !important;
  }

  .sorteria-menu > .sorteria-mega-menu {
    display: none !important;
  }

  .workflow-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-track article:nth-child(3),
  .workflow-track > .workflow-card:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .workflow-track article:nth-child(4),
  .workflow-track > .workflow-card:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .premium-footer__top,
  .premium-footer__links {
    grid-template-columns: 1fr;
  }

  .premium-footer__links {
    display: grid !important;
    padding: 0 var(--site-edge);
  }

  .premium-footer__links > .wp-block-column {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .premium-footer__links > .wp-block-column:first-child {
    border-top: 0;
  }
}

/* ==========================================================================
   17. Responsive, 640px
   ========================================================================== */

@media (max-width: 640px) {
  :root {
    --site-shell: calc(100vw - 28px);
    --site-edge: 18px;
  }

  h1, .hero-title {
    max-width: 100% !important;
    font-size: clamp(2.2rem, 11vw, 3.2rem) !important;
  }

  h2 {
    max-width: 100% !important;
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }

  .sorteria-navbar,
  .sorteria-topbar,
  .sorteria-page > .section:first-child {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }

  .sorteria-page > .section:not(.hero-reference),
  .section-soft,
  .section-split,
  .page-hero-card,
  .contact-section,
  .testimonial-band,
  .cta-band,
  .contractor-problem,
  .proof-lab,
  .project-feature,
  .delivery-team,
  .capability-deck {
    padding: 40px 18px !important;
  }

  .sorteria-navbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px;
    min-height: 64px;
    padding: 0 14px;
  }

  .sorteria-brand {
    min-width: 0;
  }

  .brand-text {
    min-width: 0;
    max-width: 200px;
    overflow-wrap: anywhere;
    font-size: 0.82rem;
  }

  .mobile-menu-toggle {
    display: grid !important;
    justify-self: end;
  }

  .nav-cta {
    display: none !important;
  }

  .sorteria-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 80px 24px 24px;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
    overflow-y: auto;
  }

  .sorteria-menu.is-open {
    transform: translateX(0);
  }

  .sorteria-menu p a,
  .mega-trigger-button {
    min-height: 48px;
    padding: 14px 0;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .mobile-menu-only {
    display: block !important;
  }

  .mobile-menu-cta a {
    color: #fff !important;
    background: var(--red) !important;
    border-radius: var(--radius-sm) !important;
    text-align: center;
  }

  /* Hero mobile */
  .product-hero {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
    padding: 36px 18px 32px !important;
  }

  .product-hero .hero-title {
    font-size: clamp(2.4rem, 10vw, 3rem) !important;
    line-height: 1;
  }

  .hero-project-image img {
    aspect-ratio: 16 / 10;
  }

  .hero-proof-line {
    grid-template-columns: 1fr;
  }

  .hero-proof-line span {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero-proof-line span:first-child {
    border-top: 0;
  }

  /* Grids → single column */
  .workflow-track,
  .sorteria-dynamic-grid,
  .testimonial-grid,
  .ai-check-grid,
  .stats-row.compact,
  .wp-block-group.stats-row.compact {
    grid-template-columns: 1fr !important;
  }

  .workflow-track article,
  .workflow-track > .workflow-card {
    min-height: auto;
    border-left: 0 !important;
    border-top: 1px solid var(--line);
  }

  .workflow-track article:first-child,
  .workflow-track > .workflow-card:first-child {
    border-top: 0;
  }

  .workflow-track small,
  .workflow-card__kicker {
    margin-bottom: 18px;
  }

  .sorteria-service-card {
    min-height: auto;
  }

  .product-stack,
  .product-stack--detail,
  .solution-board,
  .solution-board--detail,
  .industry-grid,
  .industry-grid--media,
  .industry-grid--detail {
    grid-template-columns: 1fr !important;
  }

  .product-stack article,
  .product-stack--detail article,
  .product-stack > .product-card,
  .product-stack--detail > .product-card {
    min-height: auto;
    border-left: 0 !important;
    border-top: 1px solid var(--line) !important;
  }

  .product-stack article:first-child,
  .product-stack > .product-card:first-child {
    border-top: 0 !important;
  }

  .product-stack span,
  .product-stack .product-card__number {
    margin-bottom: 28px;
  }

  .solution-board article,
  .solution-board > .solution-card,
  .industry-grid span,
  .industry-grid .industry-pill {
    min-height: auto;
  }

  /* Flex columns → stacked */
  .product-hero-grid,
  .product-hero-grid.wp-block-columns,
  .page-hero-card .wp-block-columns,
  .proof-lab .wp-block-columns,
  .project-feature .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .product-hero-grid > .wp-block-column,
  .page-hero-card .wp-block-column,
  .proof-lab .wp-block-column,
  .project-feature .wp-block-column {
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .product-hero,
  .product-hero *,
  .product-suite,
  .product-suite *,
  .solutions-matrix,
  .solutions-matrix * {
    max-width: 100%;
  }

  .sorteria-page h2,
  .product-suite h2,
  .solutions-matrix h2,
  .industries-panel h2,
  .project-feature h2,
  .premium-footer__brand h2 {
    max-width: 100% !important;
    font-size: clamp(1.8rem, 8.5vw, 2.4rem) !important;
    line-height: 1.06;
    overflow-wrap: break-word;
  }

  .product-suite,
  .solutions-matrix,
  .industries-panel,
  .capability-deck,
  .project-feature,
  .delivery-team {
    overflow: hidden;
  }

  .sorteria-topbar {
    gap: 8px;
    overflow: hidden;
    min-height: auto;
    padding: 8px 14px;
  }

  .sorteria-topbar__contact {
    flex-wrap: wrap;
    white-space: normal;
    font-size: 0.64rem;
    line-height: 1.4;
  }

  .sorteria-topbar__contact a,
  .sorteria-topbar__contact span {
    max-width: 100%;
    white-space: normal;
  }

  .sorteria-topbar__contact span {
    display: none;
  }

  .premium-footer {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }

  .premium-footer__top,
  .premium-footer__links,
  .premium-footer__bottom {
    padding-left: 18px;
    padding-right: 18px;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-row p {
    border-left: 0;
  }

  .sorteria-topbar__socials {
    display: none;
  }
}

/* ==========================================================================
   18. Pattern Inspired Operations Surface
   ========================================================================== */

:root {
  --ink: #071723;
  --charcoal: #0b1720;
  --deep: #102532;
  --panel: #142f3d;
  --steel: #43515d;
  --muted: #71808b;
  --line: #dbe4e8;
  --paper: #ffffff;
  --soft: #f4f8fa;
  --mist: #eaf1f4;
  --red: #ff6726;
  --red-dark: #de4d14;
  --red-glow: rgba(255, 103, 38, 0.15);
  --cyan: #00a6b8;
  --green: #5ac586;
  --shadow-sm: 0 8px 24px rgba(7, 23, 35, 0.08);
  --shadow: 0 18px 50px rgba(7, 23, 35, 0.12);
  --shadow-lg: 0 32px 90px rgba(7, 23, 35, 0.2);
  --radius: 8px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --content-pad: max(24px, calc((100vw - 1280px) / 2 + 48px));
}

body {
  background: #f8fbfc;
  color: var(--ink);
}

body :focus-visible {
  outline-color: rgba(0, 166, 184, 0.8);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: 0;
  text-wrap: balance;
}

h1,
.product-hero .hero-title {
  font-size: 5rem;
}

h2 {
  font-size: 3.35rem;
}

h3 {
  font-size: 1.22rem;
}

p,
ul,
ol {
  color: var(--steel);
}

.eyebrow,
.card-kicker,
.case-tag,
.sorteria-service-card__kicker,
.overlay-kicker,
.sorteria-team-role {
  color: var(--cyan);
  letter-spacing: 0;
}

.sorteria-page > .section,
.section {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 104px var(--content-pad);
}

.sorteria-page > .section:not(.hero-reference) {
  padding-left: var(--content-pad);
  padding-right: var(--content-pad);
}

.section-intro {
  max-width: 680px;
  color: var(--steel);
}

.sorteria-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 0;
}

.sorteria-topbar {
  min-height: 32px;
  padding: 0 var(--content-pad);
  background: var(--ink);
}

.sorteria-navbar {
  width: 100%;
  min-height: 72px;
  padding: 0 var(--content-pad);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 0;
  box-shadow: none;
}

.sorteria-brand img {
  width: 34px !important;
  height: 34px !important;
  border-radius: 7px;
}

.brand-text {
  display: grid;
  gap: 1px;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.brand-text span {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
}

.sorteria-menu p a,
.mega-trigger-button,
.mega-trigger-button .wp-block-button__link {
  color: #42515d;
  letter-spacing: 0;
  border-bottom: 0;
  min-height: 42px;
  padding: 8px 11px;
  background: transparent;
  box-shadow: none;
}

.sorteria-menu p a:hover,
.sorteria-menu a:focus-visible,
.mega-trigger-button:hover,
.mega-trigger-button:focus-visible,
.mega-trigger-button[aria-expanded="true"],
.mega-trigger-button .wp-block-button__link:hover,
.mega-trigger-button .wp-block-button__link:focus-visible,
.mega-trigger-button .wp-block-button__link[aria-expanded="true"] {
  color: var(--ink);
  border-bottom-color: transparent;
}

.sorteria-menu p a::after,
.mega-trigger-button::after,
.mega-trigger-button .wp-block-button__link::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 8px;
  border-radius: 99px;
  background: transparent;
  transition: background 0.2s;
}

.sorteria-menu p a:hover::after,
.mega-trigger-button:hover::after,
.mega-trigger-button[aria-expanded="true"]::after,
.mega-trigger-button .wp-block-button__link:hover::after,
.mega-trigger-button .wp-block-button__link[aria-expanded="true"]::after {
  background: var(--cyan);
}

.sorteria-mega-panel {
  top: var(--mega-top, 112px);
  width: min(1040px, calc(100vw - 56px));
  padding: 14px;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(219, 228, 232, 0.9);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(7, 23, 35, 0.18);
}

.mega-panel-shell {
  gap: 12px !important;
  margin: 0 !important;
}

.mega-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sorteria-mega-panel .sorteria-team-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
}

.sorteria-mega-panel .sorteria-team-links p {
  margin: 0;
}

.sorteria-mega-panel .sorteria-team-links a {
  display: block;
  min-height: 136px;
  padding: 20px;
  color: var(--ink);
  background: #f7fafb;
  border: 1px solid #e2eaee;
  border-radius: 8px;
  text-decoration: none;
}

.sorteria-mega-panel .sorteria-team-links a span {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mega-card {
  min-height: 136px;
  padding: 20px;
  background: #f7fafb;
  border-color: #e2eaee;
  border-radius: 8px;
}

.mega-card__image {
  display: block;
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--mist);
}

.mega-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mega-card-grid .mega-card__image img {
  aspect-ratio: 5 / 3;
}

.mega-card-featured,
.mega-card-cta {
  background:
    linear-gradient(135deg, rgba(0, 166, 184, 0.18), transparent 42%),
    var(--ink);
  border-color: rgba(255, 255, 255, 0.08);
}

.mega-intro {
  min-height: 100%;
  align-content: end;
}

.mega-card p:first-child {
  color: var(--cyan);
  letter-spacing: 0;
}

.mega-card h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

.mega-card > p:last-child {
  color: #60717d;
}

.nav-cta .wp-block-button__link,
.is-style-primary-action .wp-block-button__link,
.sorteria-contact-form button {
  background: var(--red);
  border-radius: 7px;
  letter-spacing: 0;
  box-shadow: 0 12px 24px rgba(255, 103, 38, 0.22);
}

.nav-cta .wp-block-button__link {
  padding: 11px 18px;
}

.nav-cta .wp-block-button__link:hover,
.is-style-primary-action .wp-block-button__link:hover,
.sorteria-contact-form button:hover {
  background: var(--red-dark);
  box-shadow: 0 14px 32px rgba(255, 103, 38, 0.28);
}

.product-hero {
  width: 100%;
  padding: 96px var(--content-pad) 88px;
  background:
    radial-gradient(circle at 78% 24%, rgba(0, 166, 184, 0.25), transparent 30%),
    linear-gradient(135deg, #071723 0%, #102532 58%, #0b1720 100%);
}

.product-hero-grid {
  gap: 72px !important;
}

.product-hero .hero-title {
  max-width: 860px;
  color: #fff;
  line-height: 0.98;
}

.hero-subcopy-strong {
  color: #b9e9ee !important;
  font-size: 1.08rem !important;
}

.product-hero .hero-subcopy {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.74);
}

.product-hero .is-style-secondary-action .wp-block-button__link {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.product-hero .is-style-secondary-action .wp-block-button__link:hover {
  color: var(--ink);
  background: #fff;
}

.command-center-panel {
  position: relative;
  min-height: 560px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.command-center-panel::before {
  content: "";
  position: absolute;
  inset: 56px 18px auto 18px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.command-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  color: #fff;
}

.command-top span,
.command-timeline span,
.proof-dashboard span {
  color: #7bdce6;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.command-top strong {
  color: #fff;
  font-size: 0.92rem;
}

.command-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 14px;
}

.command-metrics p {
  display: grid;
  gap: 4px;
  min-height: 92px;
  margin: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.command-metrics strong {
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
}

.command-metrics span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.74rem;
  line-height: 1.3;
}

.drawing-window {
  position: relative;
  min-height: 210px;
  margin-top: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    rgba(255, 255, 255, 0.07);
  background-size: 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
}

.drawing-window span,
.drawing-window b {
  position: absolute;
  display: block;
  border-radius: 999px;
}

.drawing-window span:nth-child(1) {
  top: 58px;
  left: 34px;
  width: 70%;
  height: 4px;
  background: #7bdce6;
}

.drawing-window span:nth-child(2) {
  top: 92px;
  left: 82px;
  width: 58%;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
}

.drawing-window span:nth-child(3) {
  top: 130px;
  left: 46px;
  width: 76%;
  height: 4px;
  background: rgba(255, 103, 38, 0.95);
}

.drawing-window b {
  right: 34px;
  bottom: 30px;
  width: 82px;
  height: 82px;
  border: 2px solid rgba(123, 220, 230, 0.9);
}

.command-timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.command-timeline p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
}

.command-timeline strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
}

.hero-proof-line {
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.hero-proof-line span {
  letter-spacing: 0;
}

.product-stack,
.workflow-track {
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(7, 23, 35, 0.04);
}

.process-section {
  padding-top: 104px !important;
  padding-bottom: 104px !important;
  background: #fff;
}

.process-section .workflow-track {
  margin-top: 36px;
}

.product-stack article {
  min-height: 360px;
  background: #fff;
}

.product-stack article:hover {
  background:
    linear-gradient(180deg, rgba(0, 166, 184, 0.06), transparent 54%),
    #fff;
}

.product-stack span {
  color: var(--cyan);
  letter-spacing: 0;
}

.product-stack h3,
.solution-board strong {
  letter-spacing: 0;
}

.product-stack a,
.sorteria-service-card__link {
  color: var(--red);
  letter-spacing: 0;
}

.solution-board article,
.sorteria-service-card,
.sorteria-project-card,
.sorteria-team-card,
.review-card,
.sorteria-contact-form,
.stats-row.compact p,
.industry-grid span {
  border-radius: 8px;
}

.solution-board article {
  background: #fff;
}

.solution-board small {
  color: var(--cyan);
  letter-spacing: 0;
}

.workflow-track article small {
  color: var(--cyan);
  letter-spacing: 0;
}

.capability-deck,
.delivery-team,
.testimonial-band {
  background: #f4f8fa;
}

.sorteria-dynamic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.sorteria-service-card {
  background: #fff;
  min-height: 300px;
  box-shadow: 0 1px 0 rgba(7, 23, 35, 0.04);
}

.sorteria-service-card__icon {
  color: var(--cyan);
  background: rgba(0, 166, 184, 0.12);
  border-radius: 8px;
}

.sorteria-service-card__icon svg {
  width: 26px;
  height: 26px;
  overflow: visible;
}

.sorteria-service-card__icon svg *,
.sorteria-service-card__icon svg path,
.sorteria-service-card__icon svg circle,
.sorteria-service-card__icon svg rect,
.sorteria-service-card__icon svg line,
.sorteria-service-card__icon svg polyline,
.sorteria-service-card__icon svg polygon {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sorteria-service-card__icon {
  position: relative;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(0, 166, 184, 0.18), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(0, 166, 184, 0.2);
}

.sorteria-service-card__icon::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--cyan);
}

.sorteria-project-card {
  background: #fff;
  box-shadow: 0 1px 0 rgba(7, 23, 35, 0.04);
}

.sorteria-project-card__body {
  padding: 24px;
}

.project-feature .wp-block-columns {
  display: block !important;
}

.proof-lab,
.cta-band,
.premium-footer {
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 166, 184, 0.15), transparent 26%),
    var(--ink);
}

.proof-dashboard {
  display: grid;
  gap: 12px;
}

.proof-dashboard div,
.proof-dashboard__item {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
}

.proof-dashboard strong,
.proof-dashboard__title {
  color: #fff;
  font-size: 1.05rem;
}

.ai-check-grid span {
  border-radius: 8px;
  letter-spacing: 0;
}

.premium-footer {
  width: 100%;
}

.premium-footer__contact {
  border-radius: 8px;
}

.premium-footer__brand h2 {
  font-size: 3.65rem;
}

.premium-footer__links h3 {
  letter-spacing: 0;
}

@media (max-width: 1100px) {
  h1,
  .product-hero .hero-title {
    font-size: 3.75rem;
  }

  h2,
  .premium-footer__brand h2 {
    font-size: 2.65rem;
  }

  .product-hero-grid {
    gap: 44px !important;
  }

  .command-center-panel {
    min-height: 480px;
  }

  .product-stack,
  .product-stack--detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  :root {
    --content-pad: 28px;
  }

  .sorteria-navbar {
    grid-template-columns: minmax(0, 1fr) auto;
    position: relative;
    min-height: 72px;
    padding: 0 var(--content-pad) !important;
  }

  .mobile-menu-toggle {
    display: grid !important;
    position: static;
    justify-self: end;
    width: 44px;
    height: 44px;
    padding: 12px;
    transform: none;
    z-index: 320;
    background: #fff;
    box-shadow: none;
  }

  .brand-text span {
    display: none;
  }

  .sorteria-mega-menu,
  .sorteria-menu > p:not(.mobile-menu-only) {
    display: none !important;
  }

  .sorteria-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--content-pad);
    bottom: auto;
    left: var(--content-pad);
    display: grid;
    width: auto;
    max-height: calc(100vh - 128px);
    gap: 8px;
    padding: 10px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(219, 228, 232, 0.95);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(7, 23, 35, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    visibility: hidden;
    z-index: 300;
  }

  .sorteria-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .sorteria-menu .mobile-menu-only {
    display: block !important;
    width: 100%;
  }

  .sorteria-menu .mobile-menu-only a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    width: 100%;
    padding: 13px 15px;
    color: var(--ink);
    background: #f7fafb;
    border: 1px solid #e2eaee;
    border-radius: 7px;
    font-size: 0.92rem;
    font-weight: 700;
  }

  .sorteria-menu .mobile-menu-only a::after {
    content: "";
    width: 5px;
    height: 5px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .command-center-panel {
    min-height: 430px;
  }
}

@media (max-width: 640px) {
  :root {
    --content-pad: 18px;
  }

  h1,
  .product-hero .hero-title,
  h1.hero-title {
    font-size: 2.24rem !important;
    line-height: 1.03;
  }

  h2,
  .premium-footer__brand h2 {
    font-size: 2rem !important;
    line-height: 1.08;
  }

  .sorteria-page > .section,
  .section,
  .sorteria-page > .section:not(.hero-reference) {
    width: 100% !important;
    max-width: 100% !important;
    padding: 52px var(--content-pad) !important;
  }

  .sorteria-navbar,
  .sorteria-topbar,
  .product-hero,
  .premium-footer {
    width: 100% !important;
    max-width: 100% !important;
  }

  .product-hero {
    width: calc(100vw - 14px) !important;
    max-width: calc(100vw - 14px) !important;
    margin-left: 7px !important;
    margin-right: 7px !important;
    padding-top: 48px !important;
    padding-bottom: 42px !important;
    overflow: hidden;
  }

  .product-hero-grid,
  .product-hero-grid > .wp-block-column,
  .product-hero .wp-block-column {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-basis: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
  }

  .product-hero * {
    max-width: 100% !important;
  }

  .product-hero .hero-subcopy,
  .product-hero .hero-subcopy-strong {
    width: 100%;
    max-width: 326px !important;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .command-center-panel {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    padding: 14px;
  }

  .command-top {
    display: grid;
    justify-items: start;
    gap: 8px;
  }

  .command-metrics {
    grid-template-columns: 1fr;
  }

  .drawing-window {
    min-height: 170px;
  }

  .command-timeline p {
    display: grid;
    justify-content: stretch;
  }

  .command-timeline strong,
  .command-top strong {
    overflow-wrap: anywhere;
  }

  .mega-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .mobile-menu-toggle {
    width: 42px;
    height: 42px;
  }
}

/* Final header balance overrides */
.sorteria-header {
  padding-bottom: 14px;
}

.sorteria-navbar {
  min-height: 72px;
}

.sorteria-header + main .product-hero,
.sorteria-header + .sorteria-page .product-hero,
.sorteria-header + .wp-block-group .product-hero {
  margin-top: 0 !important;
}

@media (max-width: 980px) {
  .sorteria-header {
    padding-bottom: 12px;
  }

  .sorteria-navbar {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 72px;
    padding: 0 var(--content-pad) !important;
  }

  .mobile-menu-toggle {
    display: grid !important;
    position: absolute !important;
    top: 50% !important;
    right: var(--content-pad) !important;
    left: auto !important;
    width: 44px;
    height: 44px;
    transform: translateY(-50%) !important;
  }

  .sorteria-brand {
    padding-right: 58px;
  }

  .sorteria-menu {
    top: calc(100% + 10px);
  }
}

@media (max-width: 640px) {
  .product-hero .wp-block-column:first-child {
    text-align: center !important;
  }

  .product-hero .eyebrow,
  .product-hero .hero-title,
  .product-hero .hero-subcopy,
  .product-hero .hero-subcopy-strong {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .product-hero .hero-main-action {
    justify-content: center !important;
  }

  .product-hero .wp-block-column:has(.command-center-asset) {
    flex-basis: 100% !important;
    width: 100% !important;
    max-width: none !important;
    margin-top: 28px !important;
    overflow: visible !important;
  }

  .command-center-asset {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
  }

  .command-center-asset img,
  .command-center-asset video {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 5 !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.36) !important;
  }

  .product-hero .hero-title,
  h1.hero-title {
    max-width: 330px !important;
    font-size: 2rem !important;
    line-height: 1.05;
    overflow-wrap: normal;
    word-break: normal;
  }

  .product-hero {
    padding-top: 44px !important;
  }
}

/* Inner page hero balance, home hero intentionally excluded */
.page-hero-card:not(.product-hero) {
  padding-top: clamp(64px, 7vw, 92px) !important;
  padding-bottom: clamp(56px, 6vw, 82px) !important;
}

.page-hero-card:not(.product-hero) h1 {
  max-width: 760px;
  font-size: clamp(2.35rem, 3.6vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.page-hero-card:not(.product-hero) .large-copy,
.page-hero-card:not(.product-hero) .wp-block-column > p:not(.eyebrow) {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1rem, 1.1vw, 1.12rem);
  line-height: 1.65;
}

.page-hero-card:not(.product-hero) .wp-block-columns {
  align-items: stretch !important;
  gap: clamp(28px, 4vw, 56px) !important;
}

.page-hero-card:not(.product-hero) .wp-block-column {
  display: flex;
  flex-direction: column;
}

.page-hero-card:not(.product-hero) .wp-block-column:first-child {
  justify-content: center;
  min-height: clamp(340px, 32vw, 430px);
}

.page-hero-card:not(.product-hero) .wp-block-column:has(.cutout-image) {
  min-height: clamp(340px, 32vw, 430px);
}

.page-hero-card:not(.product-hero) .cutout-image {
  display: flex;
  height: 100%;
  min-height: clamp(340px, 32vw, 430px);
  margin: 0;
}

.page-hero-card:not(.product-hero) .cutout-image img {
  width: 100%;
  height: 100%;
  min-height: clamp(340px, 32vw, 430px);
  object-fit: cover;
}

@media (max-width: 781px) {
  .page-hero-card:not(.product-hero) h1 {
    font-size: clamp(2rem, 8vw, 2.7rem);
  }

  .page-hero-card:not(.product-hero) .wp-block-column:first-child,
  .page-hero-card:not(.product-hero) .wp-block-column:has(.cutout-image),
  .page-hero-card:not(.product-hero) .cutout-image,
  .page-hero-card:not(.product-hero) .cutout-image img {
    min-height: auto;
  }

  .page-hero-card:not(.product-hero) .cutout-image img {
    aspect-ratio: 16 / 10;
  }
}

/* Mobile navigation refinements */
@media (max-width: 980px) {
  .sorteria-topbar {
    min-height: 34px;
    font-family: var(--font);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0;
  }

  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border-radius: 8px;
  }

  .mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    flex: 0 0 2px;
    margin: 0;
    background: var(--ink);
    border-radius: 99px;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .sorteria-menu {
    gap: 8px;
  }

  .mobile-menu-section {
    display: block !important;
    width: 100%;
  }

  .mobile-menu-section summary,
  .mobile-menu-section__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    width: 100%;
    padding: 13px 15px;
    color: var(--ink);
    background: #f7fafb;
    border: 1px solid #e2eaee;
    border-radius: 7px;
    font-size: 0.92rem;
    font-weight: 800;
    margin: 0 !important;
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu-section summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu-section summary::after,
  .mobile-menu-section__label::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
  }

  .mobile-menu-section[open] summary {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
  }

  .mobile-menu-section.is-open .mobile-menu-section__label {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
  }

  .mobile-menu-section[open] summary::after,
  .mobile-menu-section.is-open .mobile-menu-section__label::after {
    transform: rotate(-135deg);
  }

  .mobile-submenu {
    display: none;
    gap: 7px;
    padding: 8px 0 2px 12px;
  }

  .mobile-menu-section.is-open .mobile-submenu,
  .mobile-menu-section[open] .mobile-submenu {
    display: grid;
  }

  .mobile-submenu p {
    margin: 0;
  }

  .sorteria-menu .mobile-submenu a {
    display: grid;
    justify-content: start;
    gap: 3px;
    min-height: auto;
    padding: 11px 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #e9eef1;
    border-left: 3px solid var(--cyan);
    border-radius: 7px;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
  }

  .sorteria-menu .mobile-submenu a::after {
    display: none;
  }

  .mobile-submenu a span {
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
  }
}

@media (max-width: 640px) {
  .product-hero .hero-title,
  h1.hero-title {
    max-width: 100% !important;
    font-size: clamp(2.45rem, 10.8vw, 2.85rem) !important;
    line-height: 1;
    text-wrap: balance;
  }
}

/* Final mobile hero and hamburger sizing */
@media (max-width: 980px) {
  .sorteria-navbar {
    grid-template-columns: minmax(0, 1fr) 46px !important;
    min-height: 84px !important;
    align-items: center;
  }

  .mobile-menu-toggle {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    justify-self: end;
    align-self: center;
    margin: 0 0 6px 0;
    transform: none !important;
  }

  .sorteria-brand {
    padding-right: 0;
  }

  .sorteria-menu {
    top: calc(100% + 12px);
  }
}

@media (max-width: 640px) {
  .product-hero .hero-title,
  h1.hero-title {
    max-width: 330px !important;
    font-size: clamp(2.55rem, 10.8vw, 2.85rem) !important;
    line-height: 0.98;
    text-wrap: auto;
  }
}

/* Final mobile product card compression */
@media (max-width: 640px) {
  .mobile-menu-toggle {
    display: flex !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: center;
    gap: 5px;
    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    margin: 0 0 8px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 500;
    background: #fff;
    border: 1px solid #dbe4e8;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(7, 23, 35, 0.14);
  }

  .mobile-menu-toggle::before,
  .mobile-menu-toggle::after {
    content: none !important;
  }

  .mobile-menu-toggle span {
    display: block !important;
    width: 19px !important;
    height: 2px !important;
    flex: 0 0 2px;
    margin: 0 !important;
    background: var(--ink) !important;
    border-radius: 99px;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .sorteria-menu {
    top: calc(100% + 10px) !important;
    right: 18px !important;
    left: 18px !important;
  }

  .product-suite {
    padding-top: 58px !important;
    padding-bottom: 58px !important;
  }

  .product-suite h2 {
    font-size: 2.1rem !important;
    line-height: 1.05;
  }

  .product-stack,
  .product-stack--detail {
    grid-template-columns: 1fr !important;
  }

  .product-stack article,
  .product-stack--detail article,
  .product-stack > .product-card,
  .product-stack--detail > .product-card {
    min-height: auto !important;
    padding: 22px 20px !important;
  }

  .product-stack article span,
  .product-stack .product-card__number {
    margin-bottom: 18px !important;
  }

  .product-stack article h3,
  .product-stack .product-card h3 {
    margin-bottom: 10px !important;
    font-size: 1.08rem !important;
  }

  .product-stack article p,
  .product-stack .product-card p:not(.product-card__number):not(.product-card__link) {
    margin-bottom: 14px !important;
    font-size: 0.9rem !important;
    line-height: 1.5;
  }

  .product-stack article a,
  .product-stack .product-card a {
    margin-top: 4px !important;
  }

  .sorteria-menu .mobile-submenu a {
    border-left: 1px solid #e9eef1;
  }

  .mobile-submenu a span {
    color: #6b7b86;
  }
}

/* Final mobile inner page hero image visibility */
@media (max-width: 640px) {
  .page-hero-card:not(.product-hero) {
    padding-top: 44px !important;
    padding-bottom: 42px !important;
    overflow: hidden;
  }

  .page-hero-card:not(.product-hero) .wp-block-columns {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    margin-bottom: 0 !important;
  }

  .page-hero-card:not(.product-hero) .wp-block-column {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-basis: auto !important;
    overflow: visible !important;
  }

  .page-hero-card:not(.product-hero) h1 {
    max-width: 100% !important;
    font-size: clamp(2.15rem, 9.2vw, 2.55rem) !important;
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .page-hero-card:not(.product-hero) .wp-block-column > p:not(.eyebrow),
  .page-hero-card:not(.product-hero) .large-copy {
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }

  .page-hero-card:not(.product-hero) .cutout-image {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 8px;
  }

  .page-hero-card:not(.product-hero) .cutout-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Final mobile/tablet overflow and menu containment */
@media (max-width: 980px) {
  .sorteria-header,
  .sorteria-topbar,
  .sorteria-navbar,
  .sorteria-page,
  .sorteria-page > .section,
  .section,
  .product-hero,
  .page-hero-card {
    box-sizing: border-box;
    max-width: 100vw !important;
  }

  .sorteria-navbar {
    width: 100% !important;
    padding-left: var(--content-pad) !important;
    padding-right: var(--content-pad) !important;
    overflow: visible !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    position: static !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-self: end;
    gap: 5px;
    width: 46px !important;
    height: 46px !important;
    margin: 0 0 8px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .mobile-menu-toggle::before,
  .mobile-menu-toggle::after {
    content: none !important;
  }

  .mobile-menu-toggle span {
    display: block !important;
    width: 19px !important;
    height: 2px !important;
    flex: 0 0 2px;
    margin: 0 !important;
    background: var(--ink) !important;
    border-radius: 99px;
  }

  .nav-cta {
    display: none !important;
  }

  .sorteria-menu {
    box-sizing: border-box;
    right: var(--content-pad) !important;
    left: var(--content-pad) !important;
    width: auto !important;
    max-width: calc(100vw - (var(--content-pad) * 2)) !important;
    padding: 10px !important;
    overflow-x: hidden;
    background: #fff !important;
  }

  .sorteria-menu .mobile-menu-cta {
    display: block !important;
    width: 100%;
    margin: 0 !important;
  }

  .sorteria-menu .mobile-menu-cta a {
    box-sizing: border-box;
    width: 100% !important;
    color: #fff !important;
    background: var(--red) !important;
    border-color: var(--red) !important;
  }

  .sorteria-menu .mobile-menu-cta a::after {
    border-color: #fff !important;
  }
}

@media (max-width: 640px) {
  .sorteria-navbar {
    position: relative !important;
    grid-template-columns: minmax(0, 1fr) 46px !important;
    column-gap: 12px !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .mobile-menu-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 16px !important;
    left: auto !important;
    justify-self: end !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    background: #f7fafb !important;
    border: 1px solid #cfdbe1 !important;
    box-shadow: 0 10px 26px rgba(7, 23, 35, 0.16) !important;
  }

  .sorteria-menu {
    right: 16px !important;
    left: 16px !important;
    width: auto !important;
    max-width: none !important;
  }

  .page-hero-card:not(.product-hero) h1 {
    max-width: 100% !important;
    font-size: clamp(2.18rem, 9vw, 2.75rem) !important;
    line-height: 1.06;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .page-hero-card:not(.product-hero) .wp-block-column > p:not(.eyebrow),
  .page-hero-card:not(.product-hero) .large-copy {
    max-width: 100% !important;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .page-hero-card:not(.product-hero) .cutout-image {
    width: 100% !important;
    max-width: 100% !important;
  }

  .page-hero-card:not(.product-hero) .cutout-image img {
    width: 100% !important;
    min-height: 280px !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover;
  }
}

/* Final header wordmark sizing */
.sorteria-brand .site-logo-wordmark,
.sorteria-brand .site-logo-wordmark a {
  display: block;
  margin: 0 !important;
  line-height: 0;
}

.sorteria-brand .site-logo-wordmark img {
  display: block;
  width: clamp(168px, 14vw, 214px) !important;
  height: auto !important;
  max-height: 70px !important;
  border-radius: 0 !important;
  object-fit: contain !important;
}

/* Final mobile brand logo visibility */
@media (max-width: 640px) {
  .sorteria-brand {
    gap: 0;
    min-width: 0;
  }

  .sorteria-brand .site-logo-wordmark img {
    width: 224px !important;
    max-width: calc(100vw - 124px) !important;
    height: auto !important;
  }
}

/* Final mobile hero video player */
@media (max-width: 640px) {
  .sorteria-page > .section:first-child.product-hero,
  .sorteria-page > .section.product-hero,
  .product-hero {
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .product-hero-grid,
  .product-hero-grid > .wp-block-column,
  .product-hero .wp-block-column {
    overflow: visible !important;
  }

  .product-hero .hero-main-action {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }

  .product-hero .hero-main-action .wp-block-button,
  .product-hero .hero-main-action .wp-block-button__link {
    width: 100%;
    min-width: 0;
  }

  .product-hero .hero-main-action .wp-block-button__link {
    padding-left: 14px !important;
    padding-right: 14px !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
  }

  .command-center-asset,
  .command-center-asset video {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Final team directory */
.delivery-team {
  background: #f4f8fa;
}

.delivery-team > h2 {
  max-width: 860px;
}

.sorteria-team-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: 18px;
}

.sorteria-team-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(7, 23, 35, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sorteria-team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(57, 191, 208, 0.42);
  box-shadow: var(--shadow);
}

.sorteria-team-card__media {
  margin: 0;
  background: #fff;
  overflow: hidden;
  aspect-ratio: 4 / 5 !important;
}

.sorteria-team-card__media img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

.sorteria-team-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
}

.sorteria-team-card .sorteria-team-role {
  margin: 0;
  color: var(--cyan);
}

.sorteria-team-card h3,
.sorteria-team-card p {
  margin: 0;
}

.sorteria-team-card h3 {
  font-size: clamp(1.12rem, 1.15vw, 1.36rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.sorteria-team-card__summary {
  color: var(--steel);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 2px;
}

.sorteria-team-card__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.sorteria-team-card__socials a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 9px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
}

.sorteria-team-card__socials a:hover {
  color: var(--red);
  border-color: rgba(229, 57, 34, 0.35);
  background: #fff;
}

.sorteria-team-card__socials svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .sorteria-team-card {
    transition: none;
  }

  .sorteria-team-card:hover {
    transform: none;
  }
}

@media (max-width: 1100px) {
  .sorteria-team-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .sorteria-page > .section.delivery-team,
  .section.delivery-team {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    overflow: hidden;
  }

  .sorteria-team-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr !important;
  }

  .industry-grid--media .industry-card,
  .industry-grid--detail .industry-card {
    height: 220px;
    min-height: 220px;
  }

  .industry-grid--media .industry-card img,
  .industry-grid--detail .industry-card img {
    min-height: 220px;
  }

  .sorteria-team-card {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    grid-template-rows: auto auto;
  }

  .sorteria-team-card__media img {
    min-height: 0;
  }

  .sorteria-team-card__body {
    padding: 20px;
  }

  .sorteria-team-card h3,
  .sorteria-team-card__summary {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

/* Final managed header controls */
.premium-footer__brand .footer-logo {
  display: inline-flex;
  width: fit-content;
  padding: 10px 14px;
  background: #fff;
  border-radius: 8px;
}

.premium-footer__brand .footer-logo img,
.premium-footer__brand .footer-logo-wordmark img {
  border: 0 !important;
  border-radius: 0 !important;
}

@media (max-width: 980px) {
  .sorteria-navbar {
    position: relative !important;
    overflow: visible !important;
  }

  .sorteria-header-menu.sorteria-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: var(--content-pad) !important;
    bottom: auto !important;
    left: var(--content-pad) !important;
    display: grid !important;
    width: auto !important;
    max-width: calc(100vw - (var(--content-pad) * 2)) !important;
    max-height: calc(100vh - 148px) !important;
    gap: 8px !important;
    padding: 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #fff !important;
    border: 1px solid #dbe4e8 !important;
    border-radius: 8px !important;
    box-shadow: 0 24px 70px rgba(7, 23, 35, 0.18) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    visibility: hidden !important;
    z-index: 450 !important;
    grid-template-columns: 1fr !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
  }

  .sorteria-header-menu.sorteria-menu.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    visibility: visible !important;
  }

  .sorteria-header-menu .sorteria-mega-menu,
  .sorteria-header-menu > p:not(.mobile-menu-only) {
    display: none !important;
  }

  .sorteria-header-menu .mobile-menu-only,
  .sorteria-header-menu .mobile-menu-section {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
    margin: 0 !important;
  }

  .sorteria-header-menu .mobile-menu-section__label,
  .sorteria-header-menu > .mobile-menu-only > a {
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    width: 100%;
    margin: 0 !important;
    padding: 13px 15px !important;
    color: var(--ink) !important;
    background: #f7fafb !important;
    border: 1px solid #e2eaee !important;
    border-radius: 7px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  .sorteria-header-menu .mobile-menu-section__label::after,
  .sorteria-header-menu > .mobile-menu-only > a::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .sorteria-header-menu .mobile-menu-section.is-open .mobile-menu-section__label {
    color: #fff !important;
    background: var(--ink) !important;
    border-color: var(--ink) !important;
  }

  .sorteria-header-menu .mobile-menu-section.is-open .mobile-menu-section__label::after {
    transform: rotate(-135deg);
  }

  .sorteria-header-menu .mobile-submenu {
    display: none !important;
    gap: 7px !important;
    padding: 8px 0 2px 12px !important;
  }

  .sorteria-header-menu .mobile-menu-section.is-open .mobile-submenu {
    display: grid !important;
  }

  .sorteria-header-menu .mobile-submenu p {
    margin: 0 !important;
  }

  .sorteria-header-menu .mobile-submenu a {
    box-sizing: border-box;
    display: grid !important;
    justify-content: start !important;
    gap: 3px !important;
    min-height: auto !important;
    width: 100%;
    padding: 11px 13px !important;
    color: var(--ink) !important;
    background: #fff !important;
    border: 1px solid #e9eef1 !important;
    border-radius: 7px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
  }

  .sorteria-header-menu .mobile-submenu a::after {
    display: none !important;
  }

  .sorteria-header-menu .mobile-submenu a span {
    color: #6b7b86 !important;
    font-family: var(--mono);
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .sorteria-header-menu .mobile-menu-cta a {
    color: #fff !important;
    background: var(--red) !important;
    border-color: var(--red) !important;
    justify-content: center !important;
  }

  .sorteria-header-menu .mobile-menu-cta a::after {
    display: none !important;
  }
}

.process-section .workflow-track > .workflow-card,
.process-section .workflow-track article {
  display: grid;
  grid-template-rows: 72px 42px minmax(64px, auto) 1fr;
  align-content: start;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}

.process-section .workflow-icon {
  align-self: start;
  margin-bottom: 0 !important;
}

.process-section .workflow-card__kicker {
  align-self: end;
  margin-bottom: 0;
}

.process-section .workflow-card__title {
  align-self: start;
}

.process-section .workflow-card.reveal-in,
.process-section .workflow-track article.reveal-in {
  opacity: 1 !important;
  transform: none !important;
  transition: background 0.2s !important;
}

/* Final contact line containment */
.sorteria-topbar__contact,
.consultation-contact {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  white-space: nowrap;
}

.sorteria-topbar__contact a,
.sorteria-topbar__contact span,
.consultation-contact a,
.consultation-contact span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.sorteria-contact-form .consultation-contact {
  width: 100%;
  max-width: none;
  margin-top: 14px;
  overflow-x: auto;
}

@media (max-width: 640px) {
  .consultation-contact {
    display: grid;
    gap: 8px;
    white-space: normal;
  }

  .consultation-contact a,
  .consultation-contact span {
    white-space: normal;
  }
}

/* About page hero image frame */
.sorteria-about-page .sorteria-page > .page-hero-card:first-child .cutout-image {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 3 / 2 !important;
  overflow: hidden !important;
}

.sorteria-about-page .sorteria-page > .page-hero-card:first-child .cutout-image img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
}
