/* Constituo — custom layer on top of theme.json
   Only what presets can't do: halftone motif, hero grid, sticky header, cards. */

:root {
  --c-ink: var(--wp--preset--color--ink, #0e1b27);
  --c-navy-soft: var(--wp--preset--color--navy-soft, #16293a);
  --c-accent: var(--wp--preset--color--accent, #f49200);
  --c-slate: var(--wp--preset--color--slate, #485867);
  --c-border: var(--wp--preset--color--border, #e0e6ec);
  --c-surface: var(--wp--preset--color--surface, #f4f6f8);
  /* amber for TEXT on light backgrounds — #f49200 is ~2.1:1 on white (fails AA) */
  --c-accent-text: #a05e00;
}

/* visible keyboard focus (WCAG) */
a:focus-visible, button:focus-visible, .wp-block-button__link:focus-visible {
  outline: 2px solid var(--c-accent-text); outline-offset: 2px;
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---- Sticky, glassy header ---------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--c-border);
}
/* glassy blur only where the mobile overlay can't open — backdrop-filter turns
   the sticky header into the containing block for the fixed overlay menu */
@media (min-width: 600px) {
  .site-header {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(150%) blur(10px);
  }
}
.site-header .wp-block-navigation a {
  color: var(--c-ink);
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 500;
  font-size: 0.98rem;
}
.site-header .wp-block-navigation a:hover { color: var(--c-accent); }

/* Wordmark: CONSTITUO + "still running." lockup */
.brand-mark { line-height: 1; text-decoration: none; display: inline-block; }
.brand-mark .brand-name {
  font-family: var(--wp--preset--font-family--heading);
  /* thin uppercase wordmark — matches the brand banner */
  font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 1.45rem; color: var(--c-ink);
}
.brand-mark .brand-tag {
  /* muted, right-aligned under the wordmark — like the banner's "still running." */
  display: block; margin-top: 2px; text-align: right;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 300; letter-spacing: 0.03em;
  font-size: 0.78rem; color: var(--c-slate);
}

/* ---- Halftone dot motif (brand signature) ------------------------------- */
.halftone {
  background-image: radial-gradient(currentColor 1.7px, transparent 1.9px);
  background-size: 17px 17px;
  color: var(--c-accent);
}
/* dense top-right -> sparse bottom-left, like the logo */
.halftone--corner {
  -webkit-mask-image: radial-gradient(135% 135% at 100% 0%, #000 8%, transparent 62%);
          mask-image: radial-gradient(135% 135% at 100% 0%, #000 8%, transparent 62%);
}

/* ---- Eyebrow / kicker label --------------------------------------------- */
.eyebrow {
  font-family: var(--wp--preset--font-family--heading);
  text-transform: uppercase; letter-spacing: 0.18em;
  font-weight: 600; font-size: 0.78rem; color: var(--c-accent-text);
}

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; overflow: clip; }
.hero__dots {
  position: absolute; inset: 0 0 0 auto; width: min(46%, 620px);
  pointer-events: none; opacity: 0.9;
}
.hero h1 { max-width: 20ch; }
.hero .hero__lead { max-width: 60ch; }

/* small accent rule used under section eyebrows / above headings */
.accent-rule { width: 56px; height: 4px; background: var(--c-accent); border-radius: 4px; }
/* constrained layouts auto-center narrow children — keep the rule left-aligned */
.is-layout-constrained > .accent-rule { margin-left: 0 !important; margin-right: auto !important; }

/* ---- Cards (services / values) ------------------------------------------ */
.card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 16px;
  padding: 2rem 1.85rem; height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(14, 27, 39, 0.45);
  border-color: #cfd8e0;
}
.card .card__num {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700; color: var(--c-accent-text); font-size: 0.95rem; letter-spacing: 0.05em;
}
.card h3 { font-size: 1.3rem; margin: .35rem 0 .6rem; }
.card p { color: var(--c-slate); font-size: 1rem; margin: 0; }

/* ---- Stats band --------------------------------------------------------- */
.stat__num {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1;
  color: var(--c-ink);
}
.stat__num .unit { color: var(--c-accent); }
.stat__label {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  font-weight: 600; color: var(--c-slate); margin-top: .5rem;
}

/* ---- Dark sections (CTA / page hero) ------------------------------------ */
.section-navy { position: relative; overflow: clip; }
.section-navy :where(h1, h2, h3, p, a) { color: #fff; }
.section-navy .eyebrow { color: var(--c-accent); }
.section-navy__dots {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
}

/* On navy, the secondary (outline) button */
.btn-outline a.wp-block-button__link,
.btn-outline .wp-block-button__link {
  background: transparent !important; color: #fff !important;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.4);
}
.btn-outline a.wp-block-button__link:hover { box-shadow: inset 0 0 0 1.5px var(--c-accent); color: var(--c-accent) !important; }

/* ---- Inner page hero ---------------------------------------------------- */
.page-hero { position: relative; overflow: clip; }
.page-hero__dots {
  position: absolute; inset: 0 0 0 auto; width: min(34%, 420px);
  pointer-events: none; opacity: 0.5;
}
.page-hero .eyebrow { color: var(--c-accent-text); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--c-ink); }
.site-footer :where(p, a, h3, li) { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: var(--c-accent); }
.site-footer .brand-mark .brand-name { color: #fff; }
.site-footer .brand-mark .brand-tag { color: rgba(255,255,255,0.6); }
.site-footer h3 { color: #fff; font-size: 1rem; letter-spacing: 0.04em; }
.site-footer .footer-bar { border-top: 1px solid rgba(255,255,255,0.12); }

/* ---- Misc --------------------------------------------------------------- */
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--c-slate); line-height: 1.6; }
.muted { color: var(--c-slate); }
a.wp-block-button__link { transition: background .2s ease, color .2s ease, box-shadow .2s ease; }

/* ---- Language switcher (Polylang) --------------------------------------- */
.lang-switch { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.6rem; align-items: center; }
.lang-switch li { margin: 0; }
.lang-switch a {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--c-slate); text-decoration: none; padding: 0.2rem 0.1rem;
}
.lang-switch a:hover { color: var(--c-accent); }
.lang-switch .current-lang a, .lang-switch .current-lang { color: var(--c-ink); }
.site-footer .lang-switch a { color: rgba(255,255,255,0.7); }

/* ---- Header nav (core/navigation block + language switcher + CTA) ------- */
.site-header .wp-block-navigation a { text-decoration: none; }
.site-header .wp-block-navigation a:hover { color: var(--c-accent-text); }
.site-header .wp-block-navigation .current-menu-item > a { color: var(--c-accent-text); }
.site-header .header-cta .wp-block-button__link {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600; font-size: 0.95rem;
  padding: 0.55rem 1.2rem; border-radius: 8px;
}
/* mobile overlay menu (core/navigation) — on-brand, readable */
.wp-block-navigation__responsive-container.is-menu-open { padding: 4.5rem 1.75rem 2rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
  font-size: 1.5rem; font-family: var(--wp--preset--font-family--heading); font-weight: 600;
  padding: 0.35rem 0;
}
.cn-langs .lang-switch { gap: 0.5rem; }
.cn-langs { border-left: 1px solid var(--c-border); padding-left: 1rem; }

/* ---- Language switcher (Polylang) --------------------------------------- */
@media (max-width: 1024px) {
  .hero { padding-top: 4.5rem !important; padding-bottom: 4.5rem !important; }
}
@media (max-width: 781px) {
  /* type scale: desktop sizes render enormous at 390px (h1 was 46px / 7 lines) */
  h1, .wp-block-post-title { font-size: clamp(1.9rem, 7.5vw, 2.4rem) !important; line-height: 1.15; }
  h2.wp-block-heading { font-size: clamp(1.5rem, 6vw, 1.8rem) !important; line-height: 1.2; }
  .lead, .hero .hero__lead { font-size: 1.05rem; }
  .eyebrow { font-size: 0.72rem; letter-spacing: 0.14em; }
  /* hero CTAs: stacked, full width, easy thumb targets */
  .hero .wp-block-buttons { width: 100%; }
  .hero .wp-block-button { width: 100%; }
  .hero .wp-block-button__link { display: block; width: 100%; text-align: center; }
  .hero { padding-top: 3.25rem !important; padding-bottom: 3.5rem !important; }
  .hero__dots { width: 72%; opacity: 0.35; }
  .hero h1 { max-width: none; }
  .section-navy { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
  .card { padding: 1.6rem 1.4rem; }
  .stat-block { margin-bottom: 0.5rem; }
  .stat__num { font-size: 2.7rem; }
  .brand-mark .brand-name { font-size: 1.18rem; letter-spacing: 0.12em; }

  /* small screens: contact stays reachable via the overlay menu */
  .site-header .header-cta { display: none; }
  .cn-langs { border-left: 0; padding-left: 0; }
}
@media (max-width: 600px) {
  .page-hero { padding-top: 4rem !important; }
}

/* ---- Footer link columns -------------------------------------------------- */
.site-footer .footer-links { line-height: 2; margin: 0; }
.site-footer .footer-links a { text-decoration: none; }
.site-footer .footer-links a:hover { text-decoration: underline; }

/* ---- Contact form (Contact Form 7) -------------------------------------- */
.wpcf7 .cf-row { margin-bottom: 1.1rem; }
.wpcf7 .cf-row label {
  display: block; font-weight: 600; font-size: 0.9rem; color: var(--c-ink);
  margin-bottom: 0.35rem; font-family: var(--wp--preset--font-family--heading);
}
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea {
  box-sizing: border-box; width: 100%; border: 1px solid var(--c-border); border-radius: 10px;
  padding: 0.7rem 0.9rem; font: inherit; font-size: 1rem; color: var(--c-ink);
  background: #fff; transition: border-color .2s ease, box-shadow .2s ease;
  min-height: 44px;
}
.wpcf7 input:focus, .wpcf7 textarea:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(244, 146, 0, 0.25);
}
.wpcf7 textarea { min-height: 9rem; resize: vertical; }
.wpcf7 .wpcf7-submit {
  background: var(--c-accent); color: var(--c-ink); border: 0; cursor: pointer;
  font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1rem;
  padding: 0.75rem 1.6rem; border-radius: 10px; min-height: 44px;
  transition: background .2s ease, color .2s ease;
}
.wpcf7 .wpcf7-submit:hover { background: var(--c-accent-deep, #d97e00); color: #fff; }
.wpcf7 .wpcf7-not-valid-tip { color: #b91c1c; font-size: 0.85rem; margin-top: 0.3rem; }
.wpcf7 .wpcf7-response-output {
  margin: 1.25rem 0 0; padding: 0.8rem 1rem; border-radius: 10px;
  border: 1px solid var(--c-border); font-size: 0.95rem;
}
.wpcf7 form.sent .wpcf7-response-output { border-color: #10b981; background: #ecfdf5; color: #065f46; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output {
  border-color: #f59e0b; background: #fffbeb; color: #92400e;
}
.wpcf7 .wpcf7-spinner { margin: 0 0 0 0.75rem; }

/* ---- Header submenu dropdown ---------------------------------------------
   Core gives submenus the nav's OVERLAY colors (navy bg + white text) — keep
   that on-brand look and just soften the box. */
.site-header .wp-block-navigation__submenu-container {
  border-radius: 12px; border: 0;
  box-shadow: 0 20px 40px -24px rgba(14, 27, 39, 0.6);
  padding: 0.4rem; min-width: 240px;
}
.site-header .wp-block-navigation__submenu-container a {
  padding: 0.6rem 0.95rem; border-radius: 8px; font-size: 0.93rem;
}
@media (min-width: 600px) {
  .site-header .wp-block-navigation__submenu-container a { white-space: nowrap; }
}
/* overlay: submenu children smaller than top-level items, wrapping allowed */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item a {
  font-size: 1.05rem; font-weight: 500; white-space: normal;
}
.site-header .wp-block-navigation__submenu-container a:hover {
  background: rgba(255, 255, 255, 0.1); color: var(--c-accent);
}

/* Animated datacenter wireframe (navy CTA band on the homepage) */
.dc-axo {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 360px;
	margin: 0 auto 2.4rem;
}

/* Navy bands must bleed edge-to-edge like the footer, regardless of the
   post-content container's constrained width (alignfull alone stops at the
   container on wide screens). */
html {
	overflow-x: clip;
}
.section-navy {
	/* core's constrained layout forces margin auto with !important on
	   alignfull children — transform-based breakout wins regardless */
	position: relative;
	left: 50%;
	width: 100vw;
	max-width: none;
	transform: translateX(-50%);
}

/* Animated rack build-out (IT Architecture pages, white sections) */
.racks-axo {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 420px;
	margin: 2.5rem auto 0;
}

/* Technology logo strip (white section above the footer) */
.tech-strip__title {
	text-align: center;
	font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: #8296a6;
	margin: 0;
}
.tech-logos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 1.9rem 2.9rem;
	margin: 1.9rem 0 0;
	padding: 0;
	list-style: none;
}
.tech-logos figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
}
.tech-logos img {
	height: 30px;
	width: auto;
	opacity: .55;
	transition: opacity .2s ease;
}
.tech-logos figure:hover img {
	opacity: .9;
}
.tech-logos figcaption {
	font: 600 9px ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: #9db0be;
}
