/* RELINK dark palette: shared by the public site and Gutenberg canvas. */
:root,
.editor-styles-wrapper {
  color-scheme: dark;
  --relink-background: #07111a;
  --relink-surface: #0c1824;
  --relink-raised: #102231;
  --relink-text: #edf5fa;
  --relink-muted: #a6bac9;
  --relink-line: #234258;
  --relink-mist: #0c1824;
  --relink-link: #4bbeea;
}

body,
.editor-styles-wrapper {
  background: var(--relink-background);
  color: var(--relink-text);
}

h1, h2, h3, h4, h5, h6,
.section h2,
.section h3,
.promise-strip strong,
.integration-points strong {
  color: var(--relink-text);
}
.section .about-signature { color: var(--relink-text) !important; }

a { color: var(--relink-link); }
a:hover { color: #a1e6ff; }
a:focus-visible,
button:focus-visible { outline-color: var(--relink-link); }

.site-header {
  background: var(--relink-background);
  border-color: var(--relink-line);
}
.brand-wordmark a { color: var(--relink-text); }
.brand-wordmark span { color: var(--relink-link); }
.brand-full {
  width: clamp(250px, 28vw, 350px);
  flex-shrink: 0;
  margin: 0 !important;
  padding: 8px 12px;
  border-radius: 3px;
  background: transparent;
}
.brand-full img { display: block; width: 100%; aspect-ratio: 900 / 196; }

.main-nav .wp-block-navigation__submenu-container {
  background: var(--relink-surface) !important;
  color: var(--relink-text) !important;
  border: 1px solid var(--relink-line);
  border-radius: 6px;
  min-width: 235px;
  padding: 8px;
  box-shadow: 0 12px 30px #0004;
}
.main-nav .wp-block-navigation__submenu-container a { padding: 10px 12px; }
.main-nav .wp-block-navigation__submenu-container a:hover { background: var(--relink-raised); }
.service-grid h3 a { color: var(--relink-text); text-decoration: none; }
.service-grid h3 a:hover { color: var(--relink-link); text-decoration: underline; text-underline-offset: 4px; }
.hosting-figure { padding: 28px 15px 10px; background: #0c2030; border: 1px solid #234258; border-radius: 12px; }
.hosting-figure img { border: 0; box-shadow: none; }
.page-hero { background: radial-gradient(ellipse at 90% 20%, #123047 0%, transparent 65%), #0c1824; padding-top: 58px; padding-bottom: 65px; }
.page-hero h1 { font-size: clamp(38px, 5vw, 65px); max-width: 970px; line-height: 1.1; letter-spacing: -.045em; margin-top: 0; margin-bottom: 28px; }
.page-hero .intro { max-width: 780px; font-size: 19px; }
.page-detail { padding-top: 75px; padding-bottom: 75px; }
.page-detail .wp-block-columns { align-items: flex-start !important; }
.page-detail .process-grid { margin-bottom: 30px; }
.page-detail > p { max-width: 850px; }
@media (max-width: 781px) {
  .page-detail .process-grid { grid-template-columns: 1fr; gap: 25px; }
  .page-hero, .page-detail { padding-top: 45px; padding-bottom: 45px; }
  .page-hero .intro { font-size: 17px; }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { padding: 10px 0 0; border: 0; border-radius: 0; box-shadow: none; min-width: 0; background: transparent !important; }
}

/* Core centers constrained children separately. Keep short titles and copy
   aligned with the same 1200px content edge, rather than their own widths. */
.section > .wp-block-heading,
.section > .eyebrow,
.section > .intro,
.section > .wp-block-paragraph {
  margin-left: max(0px, calc((100% - 1200px) / 2)) !important;
  margin-right: auto !important;
}
.section .section-head { align-items: flex-start; }
.section-head > p { margin-top: 0; }
.section-head > p:last-child { align-self: flex-end; }

@media (max-width: 480px) {
  .brand-full { width: min(245px, calc(100vw - 128px)); padding: 7px 0; }
  .hero h1 { font-size: clamp(32px, 11.5vw, 45px); }
}
@media (max-width: 781px) {
  .section-head > p { margin-top: 20px; }
}
.main-nav { color: #d4e3ed; }
.main-nav a:hover { color: var(--relink-link); }
.main-nav .nav-contact a {
  color: #91db58;
  border-color: #3e6336;
  background: #11251e;
}
.main-nav .nav-contact a:hover {
  color: var(--relink-background);
  background: var(--relink-green);
}
/* Match Core's more specific default-overlay rules, not just the closed menu. */
.wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay),
.wp-block-navigation:not(.has-text-color) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
  background: var(--relink-background);
  color: var(--relink-text);
}
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { color: var(--relink-text); }

.hero {
  background: radial-gradient(ellipse at 85% 35%, #103049 0%, transparent 56%),
    linear-gradient(180deg, #091722 0%, #07111a 100%);
}
.section .eyebrow,
.eyebrow,
.service-grid .service-number,
.process-grid .step,
.integration-points p::before,
.section .integration-label { color: var(--relink-link) !important; }
.integration-figure img {
  border: 1px solid #2a4c65;
  box-shadow: 0 20px 70px #00000026;
}

.wp-block-button__link {
  background: var(--relink-green);
  color: #07111a;
  border-color: var(--relink-green);
}
.wp-block-button__link:hover {
  background: #89df48;
  color: #07111a;
  border-color: #89df48;
}
.is-style-outline > .wp-block-button__link {
  background: transparent;
  color: var(--relink-text);
  border-color: #34566f;
}
.is-style-outline > .wp-block-button__link:hover {
  background: #102b3d;
  color: var(--relink-text);
  border-color: var(--relink-link);
}

.service-grid {
  background: var(--relink-surface);
  border-color: var(--relink-line);
  border-radius: 10px;
  overflow: hidden;
}
.service-grid > .wp-block-group { border-color: var(--relink-line); }
.service-grid .service-link { background: #102c3c; }
.service-link a { color: #83dafa; }
.integration-section,
.about,
.industry-hero { background: var(--relink-surface); }
.future-strip,
.future-fields p { border-color: #31516a; }
.future-fields p { color: #bddeed; }

.infrastructure {
  background: #0a1c2a;
  border-top: 1px solid #24485e;
  border-bottom: 1px solid #24485e;
}
.infrastructure p { color: var(--relink-muted); }
.industry-section { background: var(--relink-background); }
.industry-panel {
  background: var(--relink-raised);
  box-shadow: inset 0 0 0 1px #234258;
}
.industry-side { border-color: #31516a; }
.about-monogram {
  background: var(--relink-raised);
  border-color: #31516a;
}
.about-monogram p { color: var(--relink-link); }
.about-monogram::before { border-color: #2d526d; }
.about-monogram::after { border-color: #008dbd; }

.contact-value a { color: #83dafa; }
.site-footer {
  background: #050d14;
  border-top: 1px solid var(--relink-line);
}
.footer-links a { color: #c4d7e4; }
.footer-brand span { color: var(--relink-muted); }
.legal .draft-notice {
  background: #2c2518;
  color: #f2d597;
  border-color: #c18c17;
}
.callout { background: #102b3d; }

/* Original RELINK imagery, with a readable foreground and a 40px motion bleed. */
.scene { position: relative; isolation: isolate; overflow: hidden; }
.section.scene > .scene-image {
  position: absolute; inset: -40px 0; max-width: none; width: 100%;
  margin: 0 !important; transform: translate3d(0, var(--scene-offset, 0px), 0);
  pointer-events: none; z-index: -1;
}
.scene > .scene-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene > .scene-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #07111af5 0%, #07111ae8 38%, #07111a45 100%); }
.scene > .scene-body { position: relative; margin-top: 0; }
.hero.scene { padding-top: 96px; padding-bottom: 40px; background: #07111a; }
.hero.scene h1 { max-width: 790px; font-size: clamp(46px, 6.4vw, 86px); }
.hero.scene .hero-description { max-width: 590px; font-size: 19px; color: #d0dfe7; }
.hero.scene .hero-note { max-width: 570px; color: #c3d3de; }
.hero.scene .promise-strip { margin-top: 66px !important; border-color: #64819266; }
.hero.scene .promise-strip p { color: #c3d3de; }
.hero.scene .promise-strip strong { color: #edf5fa; }
.infrastructure.scene { padding-top: 110px; padding-bottom: 110px; }
.infrastructure.scene > .scene-image::after { background: linear-gradient(90deg, #07111aeb, #07111ac9); }
.infrastructure.scene p { color: #cfdee8; }
.security-scene { min-height: 240px; margin: 0 !important; overflow: hidden; }
.security-scene img { display: block; width: 100%; max-height: 330px; object-fit: cover; }
.evidence { padding-top: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--relink-line); }
.evidence-grid { display: grid; grid-template-columns: 1fr 1.4fr 1.3fr; align-items: center; gap: 45px; }
.evidence-grid > .wp-block-group { margin: 0 !important; }
.section .stat-value { font-size: clamp(48px, 5vw, 68px); font-weight: 600; letter-spacing: -.05em; color: var(--relink-green); line-height: 1; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.section .stat-label { margin: 0; color: #d0dfe7; font-size: 14px; }
.evidence-note { padding-left: 30px; border-left: 1px solid var(--relink-line); }
.evidence-note p { font-size: 15px; margin: 0; }
.process { padding-top: 30px; padding-bottom: 90px; }
.project-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; margin-top: 50px !important; }
.project-grid > .wp-block-group { margin: 0 !important; min-width: 0; }
.project-grid .wp-block-image { margin: 0 0 28px !important; height: 115px; display: flex; align-items: center; justify-content: flex-start; }
.project-grid img { display: block; height: 110px; width: 130px; object-fit: contain; }
.project-grid .step { color: var(--relink-link); font: 11px ui-monospace, monospace; letter-spacing: .04em; margin: 0 0 16px; }
.project-grid h3 { font-size: 21px; line-height: 1.25; margin: 0 0 16px; }
.project-grid p { font-size: 14px; line-height: 1.7; }

@media (max-width: 1023px) {
  .section.scene > .scene-image { transform: none !important; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
  .evidence-grid { gap: 25px; }
  .hero.scene { padding-top: 65px; }
}
@media (max-width: 781px) {
  .brand-full { width: 280px; }
  .hero.scene h1 { max-width: 650px; font-size: clamp(42px, 7vw, 66px); }
  .hero.scene .hero-description { font-size: 17px; }
  .scene > .scene-image::after { background: linear-gradient(90deg, #07111af0, #07111aaf); }
  .hero.scene .promise-strip { margin-top: 40px !important; }
  .hero.scene .promise-strip p { flex-basis: 100%; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .evidence-note { grid-column: 1 / -1; padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--relink-line); }
  .infrastructure.scene { padding-top: 65px; padding-bottom: 65px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .brand-full { width: min(245px, calc(100vw - 128px)); }
  .hero.scene { padding-top: 45px; }
  .hero.scene h1 { font-size: clamp(38px, 11vw, 49px); }
  .hero.scene .promise-strip { grid-template-columns: 1fr; gap: 18px; }
  .project-grid { grid-template-columns: 1fr; gap: 30px; }
  .project-grid > .wp-block-group { display: grid; grid-template-columns: 75px 1fr; column-gap: 20px; padding-top: 24px; border-top: 1px solid var(--relink-line); }
  .project-grid .wp-block-image { grid-column: 1; grid-row: 1 / 4; height: 80px; margin: 0 !important; }
  .project-grid img { width: 75px; height: 75px; }
  .project-grid .step, .project-grid h3, .project-grid p { grid-column: 2; margin-top: 0; }
  .project-grid h3 { font-size: 21px; }
  .evidence { padding-top: 32px; padding-bottom: 32px; }
  .evidence-grid { gap: 25px 18px; }
  .section .stat-label { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .section.scene > .scene-image { transform: none !important; }
}

@media print {
  body, .editor-styles-wrapper, .hero, .section, .industry-panel, .service-grid {
    background: #fff;
    color: #10243c;
    box-shadow: none;
  }
  h1, h2, h3, h4, h5, h6, .section h2, .section h3,
  .section p, .section strong, .section a { color: #10243c !important; }
  .scene-image { display: none !important; }
}
