:root {
  --type-display: clamp(48px, 4.75vw, 72px);
  --type-display-compact: clamp(44px, 4.25vw, 64px);
  --type-section: clamp(28px, 2.35vw, 36px);
  --type-feature: clamp(36px, 3.15vw, 48px);
  --type-card: 24px;
  --type-lead: 20px;
  --type-body: 18px;
  --type-small: 14px;
  --space-cta-y: 60px;
  --space-footer-top: 120px;
  --space-footer-bottom: 96px;
}

/* Shared chrome follows the restrained 14/20 px navigation scale. */
body site-header .nav,
body site-header .actions {
  font-size: var(--type-small);
  line-height: 20px;
}

body site-header .brand {
  line-height: 1;
}

body .footer-title strong {
  font-size: clamp(40px, 3.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

body .footer-title span {
  font-size: 24px;
  line-height: 1.25;
}

body .footer-nav-group,
body .footer-contact {
  font-size: var(--type-small);
  line-height: 20px;
}

/* Home */
.page-home .hero-kicker {
  font-size: var(--type-lead);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.page-home .hero h1 {
  font-size: var(--type-display);
  line-height: 1.08;
  letter-spacing: -0.018em;
}

.page-home .hero-lede {
  font-size: var(--type-lead);
  line-height: 1.55;
}

.page-home .platform-title,
.page-home .platform-title span {
  font-size: var(--type-section);
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.page-home .workflow-showcase .workflow-label,
.page-home .section-label,
.page-home .pain-overline,
.page-home .clients-label {
  font-size: var(--type-small);
  line-height: 20px;
}

.page-home .workflow-showcase .workflow-intro h2,
.page-home .pain h2,
.page-home .dual h2 {
  font-size: var(--type-section);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.page-home .workflow-detail h3 {
  font-size: clamp(32px, 2.5vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.page-home .workflow-detail-summary {
  font-size: var(--type-lead);
  line-height: 1.45;
}

.page-home .workflow-detail-body {
  font-size: var(--type-body);
  line-height: 1.65;
}

.page-home .zopa-layout h2 {
  font-size: var(--type-section);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.page-home .zopa-layout p {
  font-size: var(--type-lead);
  line-height: 1.55;
}

.page-home .pain-item h3,
.page-home .dual h3 {
  font-size: var(--type-card);
  line-height: 1.3;
}

.page-home .pain-item li,
.page-home .pain-item > div > p:not(.pain-overline),
.page-home .dual .brain-note p {
  font-size: var(--type-body);
  line-height: 1.65;
}

.page-home .dual-heading > p {
  font-size: var(--type-small);
  line-height: 20px;
}

.page-home .clients h2 {
  font-size: var(--type-feature);
  line-height: 1.08;
  letter-spacing: -0.012em;
}

.page-home .clients-heading > p {
  font-size: var(--type-lead);
  line-height: 1.55;
}

/* Platform overview */
.page-platform .hero-copy h1 {
  font-size: var(--type-display-compact);
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.page-platform .hero-intro p {
  font-size: var(--type-lead);
  line-height: 1.5;
}

.page-platform .section-title {
  font-size: var(--type-section);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.page-platform .infra-stat strong {
  font-size: var(--type-feature);
  line-height: 1.05;
  letter-spacing: -0.012em;
}

.page-platform .infra-stat span {
  font-size: 16px;
  line-height: 1.4;
}

.page-platform .infra-stat p {
  font-size: 16px;
  line-height: 1.65;
}

.page-platform .engine-copy h3 {
  font-size: var(--type-feature);
  line-height: 1.08;
  letter-spacing: -0.012em;
}

.page-platform .engine-copy p {
  font-size: var(--type-lead);
  line-height: 1.55;
}

.page-platform .engine-copy .ghost-button {
  font-size: var(--type-small);
  line-height: 20px;
}

.page-platform .demo-cta h2 {
  font-size: var(--type-section);
  line-height: 1.15;
}

/* Product detail pages */
.page-product .product-hero .hero-copy h1 {
  font-size: var(--type-display-compact);
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.page-product .product-hero .hero-intro p {
  font-size: var(--type-lead);
  line-height: 1.5;
}

.page-product .capability-head h2 {
  font-size: var(--type-section);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.page-product .capability-head p {
  font-size: var(--type-lead);
  line-height: 1.5;
}

.page-product .feature-item h3 {
  font-size: var(--type-card);
  line-height: 1.3;
}

.page-product .feature-item p {
  font-size: var(--type-body);
  line-height: 1.6;
}

.page-product .product-cta h2 {
  font-size: var(--type-section);
  line-height: 1.15;
}

/* Solution pages */
.solution-law-page .solution-hero .hero-copy h1,
.solution-government-page .solution-hero .hero-copy h1 {
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.solution-law-page .solution-hero .hero-intro p,
.solution-government-page .solution-hero .hero-intro p {
  font-size: var(--type-lead);
  line-height: 1.5;
}

.solution-law-page .value-section h2,
.solution-law-page .workflow-panel h2,
.solution-law-page .statement-copy h2,
.solution-law-page .platform-intro h2,
.solution-law-page .security-head h2,
.solution-law-page .cta-band h2,
.solution-government-page .value-section h2,
.solution-government-page .workflow-panel h2,
.solution-government-page .statement-copy h2,
.solution-government-page .platform-intro h2,
.solution-government-page .security-head h2,
.solution-government-page .cta-band h2 {
  font-size: var(--type-section);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.solution-law-page .value-card h3,
.solution-law-page .workflow-item h3,
.solution-government-page .value-card h3,
.solution-government-page .workflow-item h3 {
  font-size: var(--type-card);
  line-height: 1.3;
}

.solution-law-page .platform-card h3,
.solution-government-page .platform-card h3 {
  font-size: var(--type-section);
  line-height: 1.12;
}

.solution-law-page .platform-card p,
.solution-law-page .security-head p,
.solution-government-page .platform-card p,
.solution-government-page .security-head p {
  font-size: var(--type-lead);
  line-height: 1.5;
}

/* About */
.page-about .about-hero h1 {
  font-size: var(--type-display);
  line-height: 1.05;
  letter-spacing: -0.018em;
}

.page-about .about-hero h2 {
  font-size: var(--type-display-compact);
  line-height: 1.14;
  letter-spacing: -0.018em;
}

.page-about .about-hero-lede {
  font-size: var(--type-lead);
  line-height: 1.6;
}

.page-about .story-heading {
  font-size: var(--type-feature);
  line-height: 1.1;
  letter-spacing: -0.012em;
}

.page-about .story-card h3 {
  font-size: var(--type-card);
  line-height: 1.3;
}

.page-about .story-card > p {
  font-size: var(--type-body);
  line-height: 1.7;
}

.page-about .belief-quote p {
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.45;
}

.page-about .workflow-showcase .workflow-label {
  font-size: var(--type-small);
  line-height: 20px;
}

.page-about .workflow-showcase .workflow-intro h2,
.page-about .pain > h2,
.page-about .tech-direction-title,
.page-about .brand-vision h2 {
  font-size: var(--type-section);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.page-about .workflow-detail h3,
.page-about .sovereignty-layout h2 {
  font-size: clamp(32px, 2.5vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.page-about .workflow-detail-summary,
.page-about .sovereignty-layout .subtitle {
  font-size: var(--type-lead);
  line-height: 1.45;
}

.page-about .workflow-detail-body,
.page-about .sovereignty-layout .body,
.page-about .pain-row,
.page-about .brand-vision p {
  font-size: var(--type-body);
  line-height: 1.65;
}

.page-about .pain-row-primary {
  font-size: var(--type-card);
  line-height: 1.4;
}

.page-about .tech-direction-item {
  font-size: 16px;
  line-height: 1.4;
}

.page-about .about-cta h2 {
  font-size: var(--type-feature);
  line-height: 1.12;
  letter-spacing: -0.012em;
}

.page-about .about-prefooter p {
  font-size: var(--type-section);
  line-height: 1.15;
}

/* Contact */
.page-contact .contact-page .intro h1 {
  font-size: var(--type-display-compact);
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.page-contact .contact-page .intro p {
  font-size: var(--type-lead);
  line-height: 1.5;
}

.page-contact .contact-page .partner-label,
.page-contact .contact-page label,
.page-contact .contact-page .privacy,
.page-contact .contact-page .back-link {
  font-size: var(--type-small);
  line-height: 20px;
}

.page-contact .contact-page input,
.page-contact .contact-page textarea,
.page-contact .contact-page select,
.page-contact .contact-page button {
  font-size: 16px;
}

/* Open platform follows the same hierarchy as platform, product and solution pages. */
.open-platform-page .open-hero h1 {
  font-size: var(--type-display-compact);
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.open-platform-page .open-hero-intro p,
.open-platform-page .integration-lead,
.open-platform-page .security-intro p,
.open-platform-page .scenario-copy p {
  font-size: var(--type-lead);
  line-height: 1.5;
}

.open-platform-page .capability-title,
.open-platform-page .integration h2,
.open-platform-page .security-intro h2,
.open-platform-page .scenario-copy h3,
.open-platform-page .open-footer-cta h2 {
  font-size: var(--type-section);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.open-platform-page .scenarios-layout > h2 {
  font-size: var(--type-feature);
  line-height: 1.12;
  letter-spacing: -0.012em;
}

.open-platform-page .capability-card h3,
.open-platform-page .integration-points h3 {
  font-size: var(--type-card);
  line-height: 1.3;
}

.open-platform-page .capability-card p,
.open-platform-page .integration-points p,
.open-platform-page .security-list p {
  font-size: var(--type-body);
  line-height: 1.65;
}

.open-platform-page .security-intro p {
  margin-top: 24px;
}

/* Shared compact CTA rhythm across equivalent page-ending conversion bands. */
.open-platform-page .open-footer-cta,
.page-about .about-prefooter {
  height: auto;
  padding: 0;
}

.open-platform-page .open-footer-cta .open-shell,
.page-about .about-prefooter-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 48px;
  width: min(1438px, calc(100vw - 48px));
  height: auto;
  margin: 0 auto;
  padding: var(--space-cta-y) 20px;
}

.open-platform-page .open-footer-cta h2,
.open-platform-page .open-button--light {
  position: static;
  inset: auto;
}

.open-platform-page .open-footer-cta h2,
.page-about .about-prefooter p {
  max-width: none;
  margin: 0;
  font-size: var(--type-section);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.0036px;
}

.open-platform-page .open-button--light {
  justify-self: end;
  min-width: 140px;
  min-height: 48px;
  border: 1px solid #ffffff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
}

/* Shared lightweight reveal for non-product marketing surfaces. */
@media (prefers-reduced-motion: no-preference) {
  body:not(.product-motion-page):not(.solution-law-page) main [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition:
      opacity 560ms cubic-bezier(0.22, 1, 0.36, 1),
      transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

  body:not(.product-motion-page):not(.solution-law-page) main [data-reveal="left"] {
    transform: translate3d(-18px, 18px, 0);
  }

  body:not(.product-motion-page):not(.solution-law-page) main [data-reveal="right"] {
    transform: translate3d(18px, 18px, 0);
  }

  body:not(.product-motion-page):not(.solution-law-page) main [data-reveal].is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body main [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 767px) {
  :root {
    --type-display: clamp(34px, 9.4vw, 40px);
    --type-display-compact: clamp(32px, 8.8vw, 38px);
    --type-section: clamp(24px, 6.4vw, 28px);
    --type-feature: clamp(28px, 7.6vw, 34px);
    --type-card: 21px;
    --type-lead: 16px;
    --type-body: 15.5px;
    --space-cta-y: 48px;
  }

  .open-platform-page .open-footer-cta .open-shell,
  .page-about .about-prefooter-inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 24px;
    width: min(100% - 32px, 560px);
    padding: var(--space-cta-y) 0;
  }

  .open-platform-page .open-button--light,
  .page-about .about-prefooter a {
    justify-self: start;
  }

  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body :where(h1, h2, h3) {
    text-wrap: balance;
  }

  body :where(p, li) {
    text-wrap: pretty;
  }

  body :where(
      .primary-button,
      .solid-button,
      .ghost-button,
      .demo-cta-button,
      .about-button,
      .open-button,
      .submit-button
    ) {
    min-height: 48px;
  }

  body main :where(img, video) {
    max-width: 100%;
  }

  body main :where(
      .hero-visual,
      .hero-media,
      .video-panel,
      .feature-visual,
      .infra-visual,
      .engine-image,
      .workflow-media,
      .statement-media,
      .platform-card__media,
      .open-hero-media,
      .integration-visual,
      .scenario-visual,
      .platform-video,
      .zopa-image,
      .brand-vision-media
    ) {
    overflow: hidden;
    border-radius: min(12px, 3vw);
  }

  .page-platform .infra-visual {
    height: clamp(240px, 62vw, 320px);
  }

  .page-platform .engine-image {
    width: 100%;
    max-height: 360px;
    margin-right: 0;
    margin-left: 0;
    aspect-ratio: 16 / 10;
  }

  .page-platform .engine-image img,
  .page-about .brand-vision-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .page-about .story-card img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .page-about .brand-vision-media {
    max-height: min(58vh, 360px);
  }

  .page-contact .visual-panel {
    height: min(400px, calc(var(--app-viewport-height, 100vh) * 0.52));
  }

  .page-contact .contact-page .contact-card {
    padding: 24px 18px 22px;
  }

  .page-contact .contact-page .contact-card h2 {
    font-size: clamp(21px, 5.8vw, 23px);
    line-height: 1.28;
  }

  .page-contact .contact-page .form-grid {
    gap: 14px;
  }

  .page-contact .contact-page .field input,
  .page-contact .contact-page .phone-input {
    height: 44px;
  }

  .page-contact .contact-page .field textarea,
  .page-contact .contact-page .phone-input input {
    font-size: 15.5px;
    line-height: 1.55;
  }

  .page-contact .contact-page .submit-button {
    min-height: 48px;
    height: 48px;
  }

  .open-platform-page .open-hero h1 {
    font-size: clamp(31px, 8.6vw, 36px);
    line-height: 1.2;
  }

  .open-platform-page .open-hero-intro p,
  .open-platform-page .integration-lead,
  .open-platform-page .security-intro p,
  .open-platform-page .scenario-copy p {
    font-size: var(--type-lead);
    line-height: 1.62;
  }

  .open-platform-page .capability-title,
  .open-platform-page .integration h2,
  .open-platform-page .security-intro h2,
  .open-platform-page .scenarios-layout > h2,
  .open-platform-page .scenario-copy h3,
  .open-platform-page .open-footer-cta h2 {
    font-size: var(--type-section);
    line-height: 1.18;
  }

  .open-platform-page .security-list h3 {
    font-size: var(--type-card);
    line-height: 1.28;
  }

  .open-platform-page .open-hero-media,
  .open-platform-page .integration-visual,
  .open-platform-page .scenario-visual {
    max-height: min(58vh, 360px);
  }

  body .footer-title strong {
    font-size: 40px;
  }

  body .footer-title span {
    font-size: 22px;
  }

  .page-home .hero-kicker {
    font-size: 16px;
    line-height: 24px;
  }

  .page-home .hero h1,
  .page-platform .hero-copy h1,
  .page-product .product-hero .hero-copy h1,
  .page-about .about-hero h1,
  .page-about .about-hero h2,
  .page-contact .contact-page .intro h1 {
    line-height: 1.1;
    letter-spacing: -0.014em;
  }

  .page-home .hero-lede,
  .page-platform .hero-intro p,
  .page-product .product-hero .hero-intro p,
  .page-contact .contact-page .intro p {
    font-size: var(--type-lead);
    line-height: 1.58;
  }

  .page-home .platform-title,
  .page-home .platform-title span,
  .page-home .workflow-showcase .workflow-intro h2,
  .page-home .pain h2,
  .page-home .dual h2,
  .page-platform .section-title,
  .page-product .capability-head h2,
  .page-about .workflow-showcase .workflow-intro h2,
  .page-about .pain > h2,
  .page-about .tech-direction-title,
  .page-about .brand-vision h2 {
    line-height: 1.16;
  }

  .page-home .pain-item li,
  .page-home .pain-item > div > p:not(.pain-overline),
  .page-home .dual .brain-note p,
  .page-platform .infra-stat p,
  .page-product .feature-item p,
  .page-about .story-card > p,
  .page-about .workflow-detail-body,
  .page-about .sovereignty-layout .body,
  .page-about .pain-row,
  .page-about .brand-vision p {
    line-height: 1.7;
  }

  .solution-law-page .solution-hero .hero-copy h1,
  .solution-government-page .solution-hero .hero-copy h1 {
    font-size: var(--type-display-compact) !important;
    line-height: 1.08 !important;
  }

  .solution-law-page .value-section h2,
  .solution-law-page .workflow-panel h2,
  .solution-law-page .statement-copy h2,
  .solution-law-page .platform-intro h2,
  .solution-law-page .security-head h2,
  .solution-law-page .cta-band h2,
  .solution-government-page .value-section h2,
  .solution-government-page .workflow-panel h2,
  .solution-government-page .statement-copy h2,
  .solution-government-page .platform-intro h2,
  .solution-government-page .security-head h2,
  .solution-government-page .cta-band h2 {
    font-size: var(--type-section) !important;
    line-height: 1.16 !important;
  }
}


@media (max-width: 420px) {
  :root {
    --type-display: clamp(32px, 9.2vw, 38px);
    --type-display-compact: clamp(30px, 8.6vw, 36px);
    --type-section: clamp(23px, 6.2vw, 27px);
    --type-feature: clamp(26px, 7.2vw, 32px);
    --type-card: 20px;
    --type-lead: 15.5px;
    --type-body: 15px;
  }

  .page-home .hero h1 {
    font-size: clamp(34px, 10.2vw, 39px);
    line-height: 1.14;
  }

  .page-home .hero-kicker {
    font-size: 15px;
    line-height: 22px;
  }

  .page-home .hero-lede {
    line-height: 1.52;
  }

  .page-about .about-hero h1 {
    font-size: clamp(34px, 9.6vw, 38px);
  }

  .page-about .about-hero h2 {
    font-size: clamp(30px, 8.8vw, 36px);
  }

  body:not(.product-motion-page):not(.solution-law-page) main [data-reveal] {
    transform: translate3d(0, 16px, 0);
    transition-duration: 460ms;
  }
}
