/* Shared fluid type, loaded after page styles so breakpoints share one scale. */
:root {
  --ds-title: clamp(26px, calc(18px + 2.222222vw), 36px);
  --ds-section: calc(var(--ds-title) * .914285714);
  --ds-card: clamp(18px, calc(16.4px + .444444vw), 20px);
  --ds-body: clamp(14px, .9375vw, 18px);
  --ds-lead: clamp(14px, 1.041666667vw, 20px);
  --ds-subtitle: clamp(16px, 1.458333333vw, 28px);
  --ds-meta: clamp(11px, .729166667vw, 14px);
  --h2: var(--ds-section);
  --body: var(--ds-body);
  --button: clamp(14px, .9375vw, 18px);
}
@media (min-width: 810px) {
  :root {
    --ds-title: calc(13.6859504px + 2.75482094vw);
    --ds-card: calc(17.322314px + .330578512vw);
  }
}
@media (min-width: 1536px) {
  :root {
    --ds-title: clamp(56px, 3.645833333vw, 70px);
    --ds-card: clamp(22.4px, 1.458333333vw, 28px);
  }
}
.ds-site :is(h1, h2, h3) {
  overflow-wrap: break-word;
  word-break: normal;
}
.ds-site :is(.hero h1, .inner-hero h1, .ds-default-content h1) {
  font-size: var(--ds-title);
  line-height: 1.15;
  letter-spacing: 0;
}
.ds-site main h2,
.ds-site :is(.section-heading, .section-title-center, .company-copy,
  .mission-heading, .why-card, .industry-heading, .about-title, .steel-card,
  .contact-card, .contact-form-panel, .contact-locations, .osp-overview-copy,
  .osp-section-heading, .careers-heading, .careers-story-copy) h2 {
  font-size: var(--ds-section);
  line-height: 1.15;
}
.ds-site :is(.hero h2, .inner-hero .inner-hero-copy .osp-subtitle,
  .inner-hero .inner-hero-copy .careers-subtitle) {
  font-size: var(--ds-subtitle);
  line-height: 1.35;
}
.ds-site :is(.portfolio-card-copy h2, .portfolio-card.is-featured h2,
  .blog-listing .blog-copy h2, .blog-categories h2, .branch-card h2,
  .telecom-services-grid .telecom-service h2, .capability-card h3,
  .project-card h3, .blog-copy h3, .mission-card h3, .job-card h3,
  .benefit-card h3, .osp-overview-copy h3, .osp-capability h3, .osp-step h3,
  .footer-grid h2) {
  font-size: var(--ds-card);
  line-height: 1.3;
}
.ds-site .expertise h2 {
  font-size: clamp(20px, 2.083333333vw, 40px);
  line-height: 1.3;
}
.ds-site .portfolio-grid .portfolio-card-copy h2 {
  font-size: max(17px, calc(var(--ds-card) * .857142857));
}
.ds-site .portfolio-grid .portfolio-card.is-featured h2 {
  font-size: var(--ds-card);
}
.ds-site .osp-step h3 {
  width: 100%;
  white-space: normal;
}
.ds-site .stat strong {
  font-size: clamp(22px, 2.083333333vw, 40px);
  line-height: 1.3;
}
.ds-site main p:not(.eyebrow) {
  font-size: var(--ds-body);
  line-height: 1.6;
}
.ds-site .hero .hero-copy > p,
.ds-site .inner-hero .inner-hero-copy > p:not(.osp-subtitle):not(.careers-subtitle) {
  font-size: var(--ds-lead);
  line-height: 1.6;
}
.ds-site :is(.eyebrow, .branch-card-label, .project-tag) {
  font-size: var(--ds-meta);
  line-height: 1.6;
}
.ds-site main p.branch-card-label {
  font-size: var(--ds-meta);
  line-height: 1.6;
}
.ds-site :is(.industry-list :is(a, .industry-list-item), .steel-card li, .why-card li,
  .osp-benefits li, .job-meta, .branch-address, .branch-card-note,
  .footer-grid li, .footer-grid address, .footer-grid p) {
  font-size: var(--ds-body);
  line-height: 1.6;
}
.ds-site :is(.text-link, .hero-services button, .industry-tabs button,
  .location-tabs button, .branch-directions, .ds-pagination .page-numbers) {
  font-size: clamp(14px, .9375vw, 18px);
  line-height: 1.4;
}
.ds-site :is(.application-dialog h2, .portfolio-popup-copy h2) {
  font-size: clamp(26px, 3.333333333vw, 64px);
  line-height: 1.2;
}
.ds-site :is(.application-dialog, .portfolio-popup-copy) p,
.ds-site :is(.application-dialog, .portfolio-popup-copy) li,
.ds-site .draft-contact-form .gfield_label,
.ds-site .draft-contact-form .gfield_description {
  font-size: var(--ds-body);
  line-height: 1.6;
}
.ds-site .draft-contact-form :is(input:not([type=hidden]), select, textarea) {
  font-size: clamp(16px, .9375vw, 18px);
  line-height: 1.5;
}
.ds-site .ds-gravity-wrapper .draft-contact-form .gform_footer .gform_button.ds-gravity-submit {
  font-size: clamp(14px, .9375vw, 18px)!important;
  line-height: 1.4!important;
}
.ds-site :is(address, .footer-grid a, .branch-address a, .gfield_description) {
  overflow-wrap: anywhere;
}
@media (min-width: 992px) {
  .ds-site .careers-hero {
    height: auto;
    min-height: min(28.177083333vw, 541px);
  }
  .ds-site .careers-hero > .container { padding-bottom: 32px; }
}
@media (max-width: 991px) {
  .ds-site main :is(h1, h2, h3) { text-wrap: pretty; }
  .ds-site :is(.portfolio-card-copy h2, .stat strong) { white-space: normal; }
  .ds-site .hero-copy h2 { min-height: 0; }
  .ds-site :is(.button, .text-link, .hero-services button, .industry-tabs button,
    .location-tabs button, .ds-pagination .page-numbers) { min-height: 44px; }
}

/* Figma form labels use the card-heading scale, separate from body/help text. */
.ds-site.contact-page .draft-contact-form .gfield_label {
  font-size: var(--ds-card);
  line-height: 1.071428571;
  font-weight: 500;
}
.ds-site.contact-page .draft-contact-form .gfield_required {
  font-size: inherit;
  line-height: 0;
  vertical-align: baseline;
  color: #df1936;
}
/* Preserve the Figma section rhythm while keeping headings in safe line boxes.
   The source's 64px section titles used 40px boxes; account for the extra
   line-box height in the following gap instead of clipping the glyphs. */
@media (min-width: 992px) {
  .ds-site .capabilities-section .section-heading {
    margin-bottom: max(12px, calc(min(68px, 3.541666667vw) - var(--ds-section) * .525));
  }
  .ds-site .projects-section .section-title-center h2 {
    margin-bottom: max(1px, calc(min(35px, 1.822916667vw) - var(--ds-section) * .525));
  }
  .ds-site .steel-section .section-title-center h2 {
    margin-bottom: max(3px, calc(min(38px, 1.979166667vw) - var(--ds-section) * .525));
  }
  .ds-site .expertise h2 {
    margin-bottom: max(8px, calc(min(30px, 1.5625vw) - clamp(20px, 2.083333333vw, 40px) * .3));
  }
}
/* Portfolio popup titles: compact purple/black text, with the full heading visible on two lines. */
.ds-site .portfolio-popup-copy h2 {
  font-size: clamp(26px, 2.083333333vw, 40px);
  line-height: 1.2;
  color: var(--ink);
  max-width: none;
  margin-left: 0;
}
@media (max-width: 991px) and (min-width: 768px) {
  .ds-site .portfolio-popup-copy h2 { font-size: 32px; }
}
.ds-site .portfolio-popup-copy p { line-height: 1.555555556; }
.ds-site .portfolio-popup-copy p + p { margin-top: .8em; }
/* Let intermediate desktop banners accommodate their fluid text. */
@media (min-width:992px) and (max-width:1399px) {
  .ds-site .inner-hero:not(.ds-page-hero):not(.ds-article-hero) {
    height:auto;
    min-height:min(28.177083333vw,541px);
  }
  .ds-site .inner-hero:not(.ds-page-hero):not(.ds-article-hero) > .container {
    padding-bottom:32px;
  }
  .ds-site .inner-hero:not(.ds-page-hero):not(.ds-article-hero) .inner-hero-gradient {
    height:100%;
  }
  .ds-site .inner-hero:not(.ds-page-hero):not(.ds-article-hero) .inner-hero-image {
    top:0;
    height:100%;
    object-fit:cover;
    object-position:center;
  }
  .ds-site .blog-hero h1 {white-space:normal;}
}
/* Reserve two complete body lines for capability hover summaries. */
.ds-site .capability-grid {--description-height:calc(var(--ds-body) * 3.2);}
/* Keep the overlapping Steel card in section flow when its text wraps. */
@media (min-width:992px) and (max-width:1399px) {
  .ds-site .steel-layout {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:start;
  }
  .ds-site .steel-layout > .steel-image {grid-area:1 / 1;}
  .ds-site .steel-layout > .steel-card {
    grid-area:1 / 1;
    position:relative;
    top:auto;
    margin-top:4.270833333vw;
  }
  .ds-site .steel-card .button {
    max-width:100%;
    white-space:normal;
    text-align:left;
  }
}
/* Compact phone controls and blue banner spacing. Tablet/desktop retain their scale. */
@media (max-width:767px) {
  .ds-site .button {
    min-height:44px;
    height:auto;
    padding:8px 16px;
    gap:8px;
  }
  .ds-site :is(.industry-tabs button,.location-tabs button) {
    min-height:44px;
    padding:8px 14px;
  }
  .ds-site .hero-services button {height:44px;min-height:44px;}
  .ds-site .ds-gravity-wrapper .draft-contact-form .gform_footer .gform_button.ds-gravity-submit {
    min-height:44px;
    height:auto;
    padding:10px 18px!important;
  }
  .ds-site .hero-container {padding-block:24px;}
  .ds-site .hero-copy h1 {min-height:0;margin-bottom:14px;}
  .ds-site .hero-copy h2 {min-height:0;margin-bottom:12px;}
  .ds-site .hero-copy > p {min-height:0;margin-bottom:18px;}
  .ds-site .inner-hero > .container {padding-block:24px;}
  .ds-site .inner-hero h1 {margin-bottom:16px;}
  .ds-site .inner-hero-copy > :last-child {margin-bottom:0;}
}

/* One phone gutter across every page; overlapping cards keep vertical overlap only. */
.ds-site .hero-services > .hero-mobile-control { display:none; }
@media (max-width:767px) {
  .ds-site { --ds-mobile-gutter:20px; }
  .ds-site .container {
    width:calc(100% - 2 * var(--ds-mobile-gutter));
    margin-inline:auto;
  }
  .ds-site .hero-services > .container {
    width:100%;
    padding-inline:var(--ds-mobile-gutter);
  }
  .ds-site :is(.why-image,.industry-image,.steel-image) { width:100%; }
  .ds-site :is(.why-card,.industry-card,.steel-card,.contact-card) {
    width:100%;
    margin-inline:0;
    padding-inline:var(--ds-mobile-gutter);
  }
  .ds-site :is(.mission-card,.contact-form-panel) {
    padding-inline:var(--ds-mobile-gutter);
  }
  .ds-site .hero-services.has-mobile-select > [role="tablist"] { display:none; }
  .ds-site .hero-services.has-mobile-select > .hero-mobile-control {
    display:block;
    padding-block:12px;
  }
  .ds-site #hero-service-select {
    display:block;
    width:100%;
    min-width:0;
    height:44px;
    padding:10px 42px 10px 14px;
    border:1px solid #ffffff60;
    border-radius:8px;
    appearance:none;
    font:500 16px/1.4 "Inter Tight",sans-serif;
    color:#fff;
    background:#102c40 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    text-overflow:ellipsis;
    cursor:pointer;
  }
  .ds-site #hero-service-select:focus-visible { outline:2px solid #fff; outline-offset:3px; }
  .ds-site #hero-service-select option { background:#102c40; color:#fff; }
}

/* Phone services are readable cards in normal flow, with no sideways scrolling. */
@media (max-width:767px) {
  .ds-site .capability-stage {
    height:auto;
    padding:20px var(--ds-mobile-gutter);
    overflow:visible;
    background:var(--paper);
  }
  .ds-site .capability-stage > img {
    position:static;
    display:block;
    width:100%;
    height:clamp(180px,56vw,320px);
    min-height:0;
    object-fit:cover;
    object-position:center;
    border-radius:12px;
  }
  .ds-site .capability-shade { display:none; }
  .ds-site .capability-grid {
    position:static;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
    width:100%;
    margin:16px 0 0;
    gap:12px;
    overflow:visible;
  }
  .ds-site .capability-card {
    display:grid;
    grid-template-columns:minmax(0,1fr) 24px;
    align-items:center;
    gap:10px 16px;
    height:auto;
    padding:20px;
    border:1px solid #e5e1ec;
    border-radius:12px;
    color:var(--ink);
    background:#fff;
  }
  .ds-site .capability-card h3 {
    position:static;
    grid-column:1;
    grid-row:1;
    max-width:none;
    margin:0;
    transform:none;
  }
  .ds-site .capability-card p {
    position:static;
    grid-column:1 / -1;
    grid-row:2;
    display:block;
    height:auto;
    margin:0;
    overflow:visible;
    -webkit-line-clamp:unset;
    opacity:1;
    transform:none;
    color:var(--text-secondary);
  }
  .ds-site .capability-card > .arrow {
    position:static;
    grid-column:2;
    grid-row:1;
    opacity:1;
    filter:none;
  }
  .ds-site .capability-card.is-active { color:#fff; }
  .ds-site .capability-card.is-active p { color:inherit; }
  .ds-site .capability-card.is-active > .arrow { filter:brightness(0) invert(1); }
}

/* Native optional service-editor content follows the shared reading layout. */
.ds-site .ds-service-body { padding-block:40px; }
.ds-site .ds-service-body.ds-entry-content { max-width:min(78ch,calc(100% - 40px)); }

/* Editable service copy must not force an overview column beyond its grid. */
.ds-site.osp-page .osp-overview-grid > * { min-width:0; }
.ds-site.osp-page .osp-benefits li { min-width:0; overflow-wrap:anywhere; }
@media (min-width:992px) {
  .ds-site.osp-page .osp-overview-grid {
    grid-template-columns:minmax(0,810fr) minmax(0,845fr);
  }
}

/* Careers banner: source line rhythm, with backgrounds covering its full copy. */
@media (min-width:992px) {
  .ds-site .careers-hero > .container {
    padding-top:min(1.25vw,24px);
    padding-bottom:min(1.5625vw,30px);
  }
  .ds-site .careers-hero h1 { line-height:1.0714285714; }
  .ds-site .careers-hero .inner-hero-copy .careers-subtitle { line-height:1.0714285714; }
  .ds-site .careers-hero .inner-hero-copy > p:not(.osp-subtitle):not(.careers-subtitle) {
    line-height:1.5;
  }
  .ds-site .careers-hero .inner-hero-copy > p:last-child { margin-bottom:0; }
  .ds-site .careers-hero .inner-hero-gradient { height:100%; }
  .ds-site .careers-hero .inner-hero-image {
    height:calc(100% + min(4.84375vw,93px));
    object-fit:cover;
    object-position:center;
  }
}

/* Match the short inner-banner gradients and the service photo's Figma frame. */
@media (min-width:1400px) {
  .ds-site :is(.portfolio-hero,.blog-hero,.contact-hero) .inner-hero-gradient {
    height:max(100%,min(28.59375vw,549px));
  }
  .ds-site .osp-hero .inner-hero-image {
    height:calc(100% + min(9.479166667vw,182px));
    object-fit:cover;
    object-position:center;
  }
}
/* Portfolio banner: preserve its dedicated artwork crop and full image coverage. */
.ds-site .portfolio-hero .inner-hero-shade { display:none; }
@media (min-width:992px) {
  .ds-site .portfolio-hero .portfolio-banner-art {
    height:calc(100% + min(.677083333vw,13px));
  }
}

/* Shared image/video frame preserves the original hero crop and mobile flow. */
.ds-site .hero-media { overflow: hidden; }
.ds-site .hero-media-image,
.ds-site .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: inherit;
}
.ds-site .hero-video[hidden],
.ds-site .hero-video-toggle[hidden] { display: none !important; }
.ds-site .hero-video-toggle {
  position: absolute; z-index: 3; right: 20px; bottom: 90px;
  min-height: 44px; padding: 10px 16px; border: 1px solid #ffffff80;
  border-radius: 24px; background: #081e31d9; color: #fff;
  font: inherit; font-size: 14px; cursor: pointer;
}
.ds-site .hero-video-toggle:hover { background: var(--purple); }
.ds-site .hero-video-toggle:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
@media (max-width: 991px) {
  .ds-site .hero-video-toggle { bottom: 16px; right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-site .hero-video:not([data-user-playing]) { visibility: hidden; }
}
/* The full-width copy container must not intercept the media playback control. */
.ds-site .hero > .hero-container { pointer-events: none; }
.ds-site .hero > .hero-container .hero-copy { pointer-events: auto; }
/* Match the Figma button text slot without changing the shared font scale. */
.ds-site .button { font-size: var(--button); line-height: 1.333333333; }
@media (min-width: 992px) {
  .ds-site .steel-card .button { gap: 10px; }
  /* Restore the source footer heading slot and reserve the social column width. */
  .ds-site .site-footer .footer-grid h2 { line-height: min(2.604166667vw, 50px); }
  .ds-site #footer-social { min-width: min(8.541666667vw, 164px); }
}
