html {
  scroll-behavior: smooth;
  background: var(--yc-bg);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--yc-bg);
  color: var(--yc-text);
  font-family: var(--yc-font-body);
  font-size: var(--yc-text-md);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

::selection {
  color: var(--yc-white);
  background: var(--yc-primary-blue);
}

:where(a) {
  color: var(--yc-primary-blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: color var(--yc-motion-fast) var(--yc-ease-out), opacity var(--yc-motion-fast) var(--yc-ease-out);
}

:where(a:hover) {
  color: var(--yc-deep-navy);
}

:where(a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible) {
  outline: 3px solid rgba(2, 129, 219, 0.38);
  outline-offset: 3px;
  border-radius: var(--yc-radius-sm);
}

:where(h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
  color: var(--yc-deep-navy);
  font-family: var(--yc-font-heading);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h1, .wp-block-post-title {
  font-size: var(--yc-text-4xl);
  max-width: 12.5ch;
}

h2 { font-size: var(--yc-text-3xl); }
h3 { font-size: var(--yc-text-2xl); }
h4 { font-size: var(--yc-text-xl); letter-spacing: -0.02em; }

p { margin-top: 0; }

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

li + li { margin-top: 0.35rem; }

hr, .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--yc-border);
  margin-block: var(--yc-space-12);
}

.wp-site-blocks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wp-site-blocks > main {
  flex: 1;
}

.wp-block-post-content {
  width: 100%;
}

.wp-block-post-content > :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, .wp-block-buttons, .wp-block-group, .wp-block-columns, .wp-block-cover, .wp-block-jet-form-builder-form-block) {
  max-width: var(--wp--style--global--content-size);
  margin-left: auto;
  margin-right: auto;
}

.wp-block-post-content > .alignwide {
  max-width: var(--wp--style--global--wide-size);
}

.wp-block-post-content > .alignfull {
  max-width: none;
  margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
  margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
}


/* Global content rhythm refined from the approved “Our Websites solutions” section. */
.wp-block-post-content p,
.wp-block-post-content li {
  font-size: var(--yc-text-md);
  line-height: 1.56;
}

.wp-block-post-content p {
  margin-bottom: 0.8rem;
}

.wp-block-post-content > :where(h2, h3, h4, h5, h6) + p,
.wp-block-post-content :where(.wp-block-column, .wp-block-group) > :where(h2, h3, h4, h5, h6) + p {
  margin-top: 0.12rem;
}

.wp-block-post-content p + p {
  margin-top: -0.15rem;
}

.wp-block-post-content p + ul,
.wp-block-post-content p + ol,
.wp-block-post-content ul + p,
.wp-block-post-content ol + p {
  margin-top: 0.42rem;
}

.wp-block-post-content ul,
.wp-block-post-content ol {
  margin-top: 0;
  margin-bottom: 0.9rem;
  padding-left: 1.12rem;
}

.wp-block-post-content li + li {
  margin-top: 0.24rem;
}

.wp-block-post-content ul li::marker,
.wp-block-post-content ol li::marker {
  color: var(--yc-primary-blue);
}

.wp-block-post-content .wp-block-column p,
.wp-block-post-content .wp-block-group p,
.wp-block-post-content .wp-block-column ul,
.wp-block-post-content .wp-block-group ul,
.wp-block-post-content .wp-block-column ol,
.wp-block-post-content .wp-block-group ol {
  max-width: none;
}

/* v0.2 responsive typography refinements */
body {
  font-size: var(--yc-text-md);
  line-height: clamp(1.55, 1.48 + 0.25vw, 1.68);
}

:where(h1, h2, h3, h4, h5, h6) {
  text-wrap: balance;
  font-style: normal;
}

:where(h1, h2, h3, h4, h5, h6) :where(em, i),
.wp-block-post-content :where(h1, h2, h3, h4, h5, h6) :where(em, i) {
  font-style: normal;
}

h1, .wp-block-post-title {
  font-size: var(--yc-text-4xl);
  max-width: 18ch;
}

h2 { font-size: var(--yc-text-3xl); }
h3 { font-size: var(--yc-text-2xl); }
h4 { font-size: var(--yc-text-xl); }

.wp-block-post-content > :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, .wp-block-buttons, .wp-block-group, .wp-block-columns, .wp-block-cover, .wp-block-jet-form-builder-form-block, .jet-listing-grid, .jet-listing-grid__slider, .elementor-widget-jet-listing-grid) {
  width: min(100% - (var(--yc-gutter) * 2), var(--wp--style--global--content-size));
}

.wp-block-post-content > .alignwide,
.wp-block-post-content > .jet-listing-grid,
.wp-block-post-content > .elementor-widget-jet-listing-grid,
.wp-block-post-content .jet-listing-grid {
  width: min(100% - (var(--yc-gutter) * 2), var(--wp--style--global--wide-size));
  max-width: var(--wp--style--global--wide-size);
}

@media (max-width: 782px) {
  body { line-height: 1.58; }

  .wp-block-post-content > p,
  .wp-block-post-content > ul,
  .wp-block-post-content > ol {
    font-size: var(--yc-text-md);
  }
}


/* v0.8 — Full-width and Spectra alignment fixes.
   These rules prevent full-width Spectra containers from being boxed by the
   theme content-width rhythm. Prefer adding .yc-full-bleed to Spectra
   containers that must span the viewport. */
.yc-template-main,
.yc-page-shell,
.yc-template-main > .wp-block-post-content {
  max-width: none !important;
  width: 100%;
}

.wp-block-post-content > :where(.alignfull, .yc-full-bleed, .wp-block-uagb-container.alignfull, .wp-block-uagb-container.yc-full-bleed),
.wp-block-post-content :where(.uagb-is-root-container.alignfull, .uagb-is-root-container.yc-full-bleed),
.is-layout-constrained > :where(.wp-block-uagb-container.alignfull, .wp-block-uagb-container.yc-full-bleed) {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

.wp-block-post-content > :where(.alignwide, .yc-align-wide, .wp-block-uagb-container.alignwide, .wp-block-uagb-container.yc-align-wide) {
  width: min(100% - (var(--yc-gutter) * 2), var(--wp--style--global--wide-size)) !important;
  max-width: var(--wp--style--global--wide-size) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.wp-block-post-content > :where(.wp-block-uagb-container:not(.alignfull):not(.alignwide):not(.yc-full-bleed):not(.yc-align-wide)) {
  width: min(100% - (var(--yc-gutter) * 2), var(--wp--style--global--content-size));
  max-width: var(--wp--style--global--content-size);
  margin-left: auto;
  margin-right: auto;
}

.yc-section-content,
.yc-container {
  width: min(100% - (var(--yc-gutter) * 2), var(--yc-container-xl));
  max-width: var(--yc-container-xl);
  margin-left: auto;
  margin-right: auto;
}

.yc-full-bleed > .uagb-container-inner-blocks-wrap,
.wp-block-uagb-container.alignfull > .uagb-container-inner-blocks-wrap {
  width: min(100% - (var(--yc-gutter) * 2), var(--yc-container-xl));
  max-width: var(--yc-container-xl);
  margin-left: auto;
  margin-right: auto;
}

/* Stable utility classes for manual CSS work. Use these instead of generated
   IDs/classes from Spectra, Gutenberg, or the Site Editor preview. */
.yc-no-box,
.yc-no-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.yc-card,
.yc-soft-card {
  border: 1px solid var(--yc-border);
  border-radius: var(--yc-radius-lg);
  background: var(--yc-white);
  box-shadow: var(--yc-shadow-sm);
}
