/*
Theme Name: EMC Solutions Clean
Theme URI: https://emcsolutions.net/
Author: Marketang Group
Description: Clean-room EMC Solutions WordPress theme.
Version: 2026.08.07.5
Requires at least: 6.8
Requires PHP: 8.3
Text Domain: emc-clean
*/

:root {
  --emc-navy: #10283f;
  --emc-navy-dark: #081927;
  --emc-blue: #2377bd;
  --emc-blue-light: #e8f3fb;
  --emc-cyan: #60b8df;
  --emc-ink: #172637;
  --emc-muted: #5f6d7a;
  --emc-line: #dce4eb;
  --emc-surface: #f5f8fb;
  --emc-white: #fff;
  --emc-shadow: 0 18px 50px rgba(8, 25, 39, .1);
  --emc-radius: 18px;
  --emc-wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--emc-ink);
  background: var(--emc-white);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--emc-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: #14598f; }
button, input, select, textarea { font: inherit; }
button, .button, .wp-element-button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--emc-cyan); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip: auto !important; width: auto; height: auto; margin: 0; padding: .7rem 1rem;
  top: 8px; left: 8px; z-index: 10000; background: var(--emc-white); color: var(--emc-navy);
}
.wrap { width: min(calc(100% - 40px), var(--emc-wrap)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 820px); margin-inline: auto; }
.section { padding: clamp(64px, 8vw, 108px) 0; }
.section.compact { padding: clamp(48px, 6vw, 78px) 0; }
.section.surface { background: var(--emc-surface); }
.section.navy { color: var(--emc-white); background: var(--emc-navy); }
.eyebrow { margin: 0 0 10px; color: var(--emc-blue); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.navy .eyebrow, .hero .eyebrow { color: #9cd9f3; }
h1, h2, h3, h4 { margin: 0 0 .65em; color: var(--emc-navy); line-height: 1.12; letter-spacing: -.025em; overflow-wrap: normal; word-break: normal; hyphens: none; }
h1 { font-size: clamp(2.55rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
.navy h2, .navy h3, .hero h1, .page-hero h1 { color: var(--emc-white); }
p { margin: 0 0 1.15em; }
.lede { max-width: 760px; color: var(--emc-muted); font-size: clamp(1.08rem, 2vw, 1.28rem); }
.navy .lede, .hero .lede { color: rgba(255, 255, 255, .83); }
.section-heading { max-width: 760px; margin-bottom: 38px; }

.button {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border: 2px solid var(--emc-blue); border-radius: 999px;
  color: var(--emc-white); background: var(--emc-blue); font-weight: 750; line-height: 1.15;
  text-decoration: none; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover, .button:focus-visible { color: var(--emc-white); background: #175f99; border-color: #175f99; transform: translateY(-2px); }
.button.ghost { color: var(--emc-white); background: transparent; border-color: rgba(255,255,255,.68); }
.button.ghost:hover, .button.ghost:focus-visible { background: var(--emc-white); color: var(--emc-navy); border-color: var(--emc-white); }
.button.light { color: var(--emc-navy); background: var(--emc-white); border-color: var(--emc-white); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(8, 25, 39, .96);
  border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(14px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-logo { flex: 0 0 auto; }
.site-logo img { width: 196px; max-height: 58px; object-fit: contain; object-position: left center; }
.primary-nav ul { display: flex; align-items: center; gap: 27px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: rgba(255,255,255,.9); font-size: .94rem; font-weight: 700; text-decoration: none; }
.primary-nav a:hover, .primary-nav a:focus-visible, .primary-nav .current-menu-item > a { color: #82cff0; }
.nav-cta a { padding: 11px 18px; border-radius: 999px; color: var(--emc-white) !important; background: var(--emc-blue); }
.menu-toggle {
  display: none; width: 46px; height: 46px; padding: 10px; border: 1px solid rgba(255,255,255,.35);
  border-radius: 10px; color: var(--emc-white); background: transparent;
}
.menu-toggle .menu-icon, .menu-toggle .menu-icon::before, .menu-toggle .menu-icon::after {
  display: block; width: 100%; height: 2px; content: ""; background: currentColor;
}
.menu-toggle .menu-icon { position: relative; }
.menu-toggle .menu-icon::before { position: absolute; left: 0; top: -7px; }
.menu-toggle .menu-icon::after { position: absolute; left: 0; top: 7px; }

.hero {
  position: relative; min-height: min(780px, calc(100vh - 82px)); display: grid; align-items: center;
  color: var(--emc-white); background: var(--emc-navy-dark); isolation: isolate; overflow: hidden;
}
.hero::before { position: absolute; inset: 0; z-index: -2; content: ""; background: var(--hero-image) center/cover no-repeat; }
.hero::after { position: absolute; inset: 0; z-index: -1; content: ""; background: linear-gradient(90deg, rgba(4,17,29,.92) 0%, rgba(7,28,44,.76) 48%, rgba(8,25,39,.25) 100%); }
.hero-content { max-width: 850px; padding-block: 96px; }
.hero h1 { max-width: 820px; margin-bottom: 22px; text-wrap: balance; }
.hero .lede { max-width: 690px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 18px 30px; margin-top: 42px; padding: 0; list-style: none; color: rgba(255,255,255,.9); font-weight: 700; }
.hero-proof li::before { content: "✓"; margin-right: 9px; color: #79caec; }

.page-hero {
  position: relative; min-height: 365px; display: grid; place-items: center; text-align: center;
  color: var(--emc-white); isolation: isolate; overflow: hidden; background: var(--emc-navy);
}
.page-hero::before { position: absolute; inset: 0; z-index: -2; content: ""; background: var(--page-hero-image) center/cover no-repeat; }
.page-hero::after { position: absolute; inset: 0; z-index: -1; content: ""; background: rgba(8,25,39,.78); }
.page-hero p { max-width: 720px; margin: 0 auto; color: rgba(255,255,255,.82); font-size: 1.1rem; }

.two-col { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: clamp(38px, 7vw, 86px); }
.media-frame { position: relative; overflow: hidden; border-radius: var(--emc-radius); box-shadow: var(--emc-shadow); }
.media-frame img { width: 100%; min-height: 460px; object-fit: cover; }
.check-list { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { position: absolute; left: 0; top: .05em; content: "✓"; color: var(--emc-blue); font-weight: 900; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; min-height: 100%; flex-direction: column; overflow: hidden; border: 1px solid var(--emc-line); border-radius: var(--emc-radius); background: var(--emc-white); box-shadow: 0 10px 32px rgba(15,40,63,.06); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: #d9e4ec; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.035); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 26px; }
.card-body p { color: var(--emc-muted); }
.card-link { margin-top: auto; font-weight: 800; text-decoration: none; }
.card-link::after { content: " →"; }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.value { padding: 30px; border-radius: var(--emc-radius); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.value-number { display: inline-grid; width: 46px; height: 46px; place-items: center; margin-bottom: 20px; border-radius: 50%; color: var(--emc-navy); background: var(--emc-cyan); font-weight: 900; }

.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial { margin: 0; padding: 30px; border: 1px solid var(--emc-line); border-radius: var(--emc-radius); background: var(--emc-white); box-shadow: 0 8px 28px rgba(15,40,63,.06); }
.testimonial blockquote { margin: 0 0 24px; color: var(--emc-muted); }
.testimonial figcaption { font-weight: 800; color: var(--emc-navy); }
.testimonial figcaption span { display: block; margin-top: 2px; color: var(--emc-muted); font-size: .88rem; font-weight: 500; }

.steps { counter-reset: emc-step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { counter-increment: emc-step; padding: 26px 22px; border-top: 3px solid var(--emc-blue); background: var(--emc-white); box-shadow: 0 8px 28px rgba(15,40,63,.06); }
.step::before { content: "0" counter(emc-step); display: block; margin-bottom: 16px; color: var(--emc-blue); font-weight: 900; }

.cta-band { padding: 44px 0; color: var(--emc-white); background: linear-gradient(100deg, var(--emc-blue), #15517f); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.cta-inner h2 { margin: 0; color: var(--emc-white); font-size: clamp(1.75rem, 3vw, 2.55rem); }

.entry-wrap { padding: 70px 0 90px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.25em; }
.service-detail { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(35px, 6vw, 80px); align-items: start; }
.service-detail .media-frame img { min-height: 380px; }
.service-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0; padding: 0; list-style: none; }
.service-points li { padding: 13px 15px; border-radius: 10px; background: var(--emc-blue-light); font-weight: 700; line-height: 1.35; }

.form-shell { padding: clamp(24px, 5vw, 48px); border: 1px solid var(--emc-line); border-radius: var(--emc-radius); background: var(--emc-white); box-shadow: var(--emc-shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full, .form-section { grid-column: 1 / -1; }
.form-field label, .form-legend { color: var(--emc-navy); font-size: .92rem; font-weight: 800; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #bfcbd5; border-radius: 8px; color: var(--emc-ink); background: var(--emc-white);
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--emc-blue); box-shadow: 0 0 0 3px rgba(35,119,189,.15); outline: 0; }
.form-section { margin: 16px 0 0; padding: 24px 0 6px; border-top: 1px solid var(--emc-line); }
.form-section h2, .form-section h3 { margin-bottom: 6px; }
.form-options { display: flex; flex-wrap: wrap; gap: 12px 22px; padding-top: 6px; }
.form-options label { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 500; }
.form-options input { width: 20px; height: 20px; margin-top: 2px; }
.form-status { margin: 0 0 24px; padding: 14px 16px; border-radius: 8px; background: #e9f7ed; color: #185f31; font-weight: 700; }
.form-status.error { background: #fff0ef; color: #8c2820; }
.form-note { color: var(--emc-muted); font-size: .9rem; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.contact-card { padding: 30px; color: var(--emc-white); border-radius: var(--emc-radius); background: var(--emc-navy); }
.contact-card h2, .contact-card a { color: var(--emc-white); }
.contact-card a { word-break: break-word; }

.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { padding: 26px; border: 1px solid var(--emc-line); border-radius: var(--emc-radius); background: var(--emc-white); }
.article-card .meta, .post-meta { color: var(--emc-muted); font-size: .86rem; }
.article-card h2 { font-size: 1.35rem; }
.post-article { max-width: 840px; margin: 0 auto; }
.topic-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 34px; }
.topic-group { padding: 26px; border: 1px solid var(--emc-line); border-radius: var(--emc-radius); background: var(--emc-white); }
.topic-group h3 { margin-bottom: 16px; }
.topic-group ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.topic-group a { display: inline-flex; min-height: 38px; align-items: center; padding: 7px 13px; border-radius: 999px; background: var(--emc-blue-light); color: var(--emc-navy); font-weight: 700; text-decoration: none; }
.topic-group a:hover, .topic-group a:focus-visible { background: var(--emc-blue); color: var(--emc-white); }

.site-footer { color: rgba(255,255,255,.76); background: var(--emc-navy-dark); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: 50px; padding: 70px 0 46px; }
.footer-logo { width: 220px; margin-bottom: 22px; }
.site-footer h2 { color: var(--emc-white); font-size: 1.05rem; letter-spacing: 0; }
.site-footer a { color: rgba(255,255,255,.84); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .86rem; }

@media (max-width: 980px) {
  .cards, .testimonial-grid, .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .two-col, .service-detail, .contact-grid, .topic-groups { grid-template-columns: 1fr; }
  .media-frame img { min-height: 360px; }
  .footer-grid { grid-template-columns: 1.2fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  body.admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 72px; }
  .site-logo img { width: 174px; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 14px 20px 24px; background: var(--emc-navy-dark); border-top: 1px solid rgba(255,255,255,.12); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { display: block; min-height: 46px; padding: 12px 8px; }
  .nav-cta a { display: inline-flex; margin-top: 8px; padding: 11px 18px; }
  .hero { min-height: 620px; }
  .hero::after { background: rgba(5,20,32,.78); }
  .hero-content { padding-block: 74px; }
  .page-hero { min-height: 310px; }
  .cta-inner { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid > :last-child { grid-column: auto; }
}

@media (max-width: 620px) {
  .wrap, .narrow { width: min(calc(100% - 28px), var(--emc-wrap)); }
  .section { padding: 58px 0; }
  .cards, .testimonial-grid, .archive-grid, .steps, .service-points { grid-template-columns: 1fr; }
  .button-row .button { width: 100%; }
  .hero-proof { display: grid; gap: 10px; }
  .card-body, .testimonial { padding: 22px; }
  .form-shell { padding: 22px 16px; }
  .media-frame img { min-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
