/*
Theme Name: KPCAS
Description: A native WordPress block theme for KP Consulting and Services.
Version: 0.3.0
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: kpcas
License: GPL-2.0-or-later
*/

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a, button { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: .22em; }
a:focus-visible, button:focus-visible { outline: 3px solid #d76a00; outline-offset: 5px; }
.wp-site-blocks > * { margin-block-start: 0; }
/* One shared gutter keeps header, sections, and footer on the same baseline. */
:root { --kpcas-gutter: clamp(24px, 5.6vw, 80px); --kpcas-width: 1440px; }
.kpcas-header { position: relative; z-index: 20; background: #fff; border-bottom: 1px solid #e4e6ed; }
.kpcas-header-inner { max-width: var(--kpcas-width); margin: auto; min-height: 88px; padding: 16px var(--kpcas-gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.kpcas-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.kpcas-brand > *, .kpcas-header-inner > * { margin-block: 0; }
.kpcas-brand-name { font-size: 20px; letter-spacing: -.035em; font-weight: 600; }
.kpcas-brand-name a { color: #101f45; text-decoration: none; }
.kpcas-navigation { font-size: 14px; font-weight: 500; }
.kpcas-navigation .wp-block-navigation__container { gap: 30px; }
.kpcas-navigation .wp-block-navigation-item__content { padding: 10px 0; text-decoration: none; }
.kpcas-navigation .wp-block-navigation-item__content:hover { color: #132c91; text-decoration: underline; text-decoration-color: #ff891b; text-decoration-thickness: 2px; }
.kpcas-home > .wp-block-post-content { margin: 0; }
/* Explicit resets prevent WordPress flow margins from offsetting grid siblings. */
.kpcas-hero > *, .kpcas-about > *, .kpcas-services > *, .kpcas-services-grid > *, .kpcas-service > *, .kpcas-footer-top > * { margin-block: 0; }
.kpcas-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; max-width: none; padding: 80px max(var(--kpcas-gutter), calc((100vw - 1280px)/2)) 88px; min-height: 660px; margin: 0; overflow: hidden; color: #fff; background: #101f52; }
.kpcas-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, transparent calc(50% - 1px), #ffffff08 50%, transparent calc(50% + 1px)), radial-gradient(ellipse at 100% 0%, #314fa259, transparent 60%); pointer-events: none; }
.kpcas-hero-copy { position: relative; z-index: 2; align-self: center; min-width: 0; }
.kpcas-eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .16em; font-weight: 600; margin: 0 0 32px; color: #c7d3f0; }
.kpcas-eyebrow::before { content: ''; flex: 0 0 24px; height: 2px; background: #ff891b; }
.kpcas-hero-title { font-size: clamp(3.5rem, 6.8vw, 6.1rem); line-height: 1.06; letter-spacing: -.055em; font-weight: 500; margin: 0 0 36px; color: #fff; }
.kpcas-hero-title em { font-style: normal; color: #ffa451; }
.kpcas-hero .wp-block-buttons { gap: 12px; margin: 0; align-items: stretch; }
.wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 20px; transition: background .2s, transform .2s, box-shadow .2s; text-decoration: none; }
.wp-block-button__link::after { content: '\2197'; font-size: 1.2em; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 6px 18px #101f4515; }
.kpcas-hero .wp-block-button__link { background: #ff9a38; color: #101b3a; border: 1px solid #ff9a38; border-radius: 3px; padding: 15px 22px; font-size: 12px; line-height: 20px; }
.kpcas-hero .is-style-outline .wp-block-button__link { background: transparent; color: #fff; border: 1px solid #8290b5; }
.kpcas-hero-visual { position: relative; align-self: center; width: 100%; aspect-ratio: 640 / 560; margin: 0; min-width: 0; }
.kpcas-hero-image { position: absolute; inset: 0; margin: 0; transform: none; }
.kpcas-hero-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.kpcas-section { max-width: var(--kpcas-width); margin: 0 auto; padding: 88px var(--kpcas-gutter); }
.kpcas-section h2 { font-size: clamp(2.2rem, 3.8vw, 3.4rem); line-height: 1.13; letter-spacing: -.045em; font-weight: 500; text-wrap: balance; }
.kpcas-about { display: grid; grid-template-columns: 1.25fr 1fr; align-items: start; gap: 80px; }
.kpcas-about-copy h2 { margin: 0 0 28px; }
.kpcas-about-copy p { color: #536079; font-size: 17px; line-height: 1.8; margin: 0; }
.kpcas-about-copy p + p { margin-top: 20px; }
.kpcas-about-image { margin: 8px 0 0; }
.kpcas-about-image img { display: block; width: 100%; aspect-ratio: 1.15; object-fit: cover; border-radius: 3px; }
.kpcas-services { display: grid; grid-template-columns: .75fr 1.65fr; align-items: start; gap: 64px; max-width: none; padding: 80px max(var(--kpcas-gutter), calc((100vw - 1280px)/2)) 88px; background: #eff1f5; border-top: 1px solid #dde2eb; }
.kpcas-services > h2 { position: sticky; top: 40px; margin: 0; max-width: 360px; }
.kpcas-services-grid { display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: service; }
.kpcas-service { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 24px; row-gap: 20px; padding: 32px 0; background: transparent; border: 0; border-top: 1px solid #c8cfde; border-radius: 0; }
.kpcas-service:first-child { padding-top: 0; border-top: 0; }
.kpcas-service:last-child { padding-bottom: 0; }
.kpcas-service::before { counter-increment: service; content: '0' counter(service); grid-column: 1; grid-row: 1; color: #132c91; font-size: 13px; line-height: 2; font-variant-numeric: tabular-nums; padding-top: 2px; }
.kpcas-service h3 { grid-column: 2; font-size: clamp(1.3rem, 1.9vw, 1.65rem); line-height: 1.25; letter-spacing: -.025em; font-weight: 550; margin: 0; max-width: 560px; }
.kpcas-service p { grid-column: 2; color: #536079; margin: 0; font-size: 16px; line-height: 1.75; }
.kpcas-service .wp-block-buttons { grid-column: 2; margin: 0; }
.kpcas-service .wp-block-button__link { min-height: 44px; border: none; border-bottom: 1px solid #aeb9d2; border-radius: 0; padding: 4px 0; color: #132c91; background: transparent; font-size: 12px; }
.kpcas-service:hover h3 { color: #132c91; }
.kpcas-footer { background: #0b1635; color: #f8f9fc; border-top: 3px solid #ff891b; }
.kpcas-footer a { color: inherit; }
.kpcas-footer-inner { max-width: var(--kpcas-width); margin: auto; padding: 56px var(--kpcas-gutter) 24px; }
.kpcas-footer-top { display: grid; grid-template-columns: 1.2fr .7fr 1fr; align-items: start; gap: 48px; }
.kpcas-footer-brand .wp-block-site-title { font-size: 28px; font-weight: 500; line-height: 1.3; margin: 0; }
.kpcas-footer-brand .wp-block-site-title a { text-decoration: none; }
.kpcas-footer-brand .wp-block-site-tagline { color: #b8c2da; font-size: 15px; margin: 14px 0 0; }
.kpcas-footer-links { font-size: 15px; }
.kpcas-footer-links p { margin: 0; }
.kpcas-footer-links p + p { margin-top: 12px; }
.kpcas-footer-contact { color: #b8c2da; font-size: 15px; margin: 0; }
.kpcas-footer-contact a { color: #fff; }
.kpcas-footer-bottom { border-top: 1px solid #ffffff26; display: flex; justify-content: space-between; padding-top: 22px; margin-top: 40px; font-size: 12px; color: #b8c2da; }
.kpcas-footer-bottom p { margin: 0; }
.kpcas-page, .kpcas-archive { padding: 0 40px 100px; min-height: 55vh; }
.kpcas-page-heading { max-width: 1060px; margin: 0 auto 60px; padding: 76px 0 50px; border-bottom: 1px solid #d9dfea; }
.kpcas-page-heading h1 { font-size: clamp(2.4rem, 5.2vw, 4.8rem); margin: 0; max-width: 1000px; }
.kpcas-page-heading .wp-block-post-date { margin-top: 24px; color: #536079; }
.kpcas-page-heading .wp-block-post-terms { margin-bottom: 20px; font-size: 14px; }
.kpcas-page > .wp-block-post-featured-image { max-width: 1060px; margin: 0 auto 40px; }
.kpcas-page .wp-block-post-content { overflow-wrap: anywhere; }
.kpcas-page .wp-block-post-content h2 { margin-top: 2em; font-size: 2rem; }
.kpcas-page .wp-block-post-content h3 { margin-top: 1.7em; font-size: 1.45rem; }
.kpcas-page pre { white-space: pre-wrap; background: #edf0f6; border-radius: 6px; padding: 24px; }
.kpcas-page .wp-block-code { color: #0b1635 !important; font-family: inherit; }
.kpcas-page input:not([type=checkbox]):not([type=radio]), .kpcas-page textarea, .kpcas-page select { max-width: 100%; border: 1px solid #a9b3c6; padding: 12px; border-radius: 4px; font: inherit; }
.kpcas-page input[type=submit], .kpcas-page button[type=submit] { background: #132c91; color: #fff; border: 0; border-radius: 4px; padding: 14px 24px; }
.kpcas-post-navigation { max-width: 780px; margin: 60px auto 0; display: flex; justify-content: space-between; gap: 30px; border-top: 1px solid #d9dfea; padding-top: 24px; }
.kpcas-archive > .wp-block-query { max-width: 1184px; margin: auto; }
.kpcas-category-bar { max-width: 1184px; margin: 0 auto 36px; }
.kpcas-category-bar > p { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: #536079; }
.kpcas-category-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.kpcas-category-list li { margin: 0; padding: 0; list-style: none; }
.kpcas-category-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid #c8cfde; border-radius: 4px; background: #fff; color: #132c91; font-size: 14px; line-height: 1.5; text-decoration: none; }
.kpcas-category-list a:hover { border-color: #132c91; background: #edf0f6; }
.kpcas-category-list .current-cat > a { background: #132c91; border-color: #132c91; color: #fff; }
.kpcas-archive .wp-block-post-template { gap: 32px; }
.kpcas-archive .wp-block-post-template > li { padding: 24px; background: white; border: 1px solid #dce1eb; border-radius: 8px; }
.kpcas-archive .wp-block-post-title { font-size: 1.6rem; }
.kpcas-archive .wp-block-post-title a { text-decoration: none; }
.kpcas-archive .wp-block-post-date { font-size: 13px; color: #536079; }
.kpcas-archive .wp-block-post-featured-image img { aspect-ratio: 1.5; object-fit: cover; }
.kpcas-not-found { padding-top: 90px; text-align: center; }
.kpcas-not-found .wp-block-buttons { justify-content: center; }
.kpcas-reveal { animation: kpcas-arrive .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes kpcas-arrive { from { opacity: .6; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) {
  .kpcas-navigation .wp-block-navigation__container { gap: 20px; }
  .kpcas-hero { gap: 24px; min-height: 560px; padding-top: 64px; padding-bottom: 64px; }
  .kpcas-hero-title { font-size: clamp(3rem, 6.8vw, 5.5rem); }
  .kpcas-about { gap: 40px; }
  .kpcas-services { gap: 36px; grid-template-columns: 1fr; }
  .kpcas-services > h2 { position: static; max-width: 580px; }
  .kpcas-service { column-gap: 14px; grid-template-columns: 28px minmax(0,1fr); }
}
@media (max-width: 800px) {
  .kpcas-about { grid-template-columns: 1fr; gap: 32px; }
  .kpcas-about-image img { aspect-ratio: 1.9; }
  .kpcas-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
  .kpcas-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  .kpcas-navigation .wp-block-navigation__responsive-container.is-menu-open { padding: 32px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 24px; }
  .kpcas-header-inner { padding-block: 14px; min-height: 76px; }
  .kpcas-brand-name { font-size: 18px; }
  .kpcas-brand .wp-block-site-logo img { width: 42px; }
  .kpcas-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 40px; }
  .kpcas-hero-title { font-size: clamp(3.1rem, 12vw, 5rem); line-height: 1.06; margin-bottom: 28px; }
  .kpcas-eyebrow { font-size: 10px; letter-spacing: .1em; margin-bottom: 24px; }
  .kpcas-hero .wp-block-buttons { flex-direction: row; gap: 10px; }
  .kpcas-hero .wp-block-button__link { font-size: 10px; padding: 12px; gap: 12px; min-height: 48px; }
  .kpcas-hero-visual { aspect-ratio: 640 / 560; min-height: 0; margin: 0; max-width: 440px; justify-self: center; }
  .kpcas-section { padding-block: 56px; }
  .kpcas-about { grid-template-columns: 1fr; gap: 28px; }
  .kpcas-about-copy h2 { margin-bottom: 24px; }
  .kpcas-about-copy p { font-size: 16px; }
  .kpcas-about-image { margin: 0; }
  .kpcas-about-image img { aspect-ratio: 1.35; }
  .kpcas-services { grid-template-columns: 1fr; gap: 36px; }
  .kpcas-services > h2 { position: static; max-width: 340px; }
  .kpcas-service { padding-block: 28px; column-gap: 12px; row-gap: 16px; }
  .kpcas-service h3 { font-size: 1.25rem; }
  .kpcas-footer-inner { padding-top: 40px; }
  .kpcas-footer-top { grid-template-columns: 1fr; gap: 28px; }
  .kpcas-footer-bottom { gap: 20px; margin-top: 32px; }
  .kpcas-page,.kpcas-archive { padding: 0 24px 56px; }
  .kpcas-page-heading { padding: 40px 0 28px; margin-bottom: 28px; }
  .kpcas-archive .wp-block-post-template { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
